Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1704945 - Enable pcie support for rockchip SoCs such as the rk3399
Summary: Enable pcie support for rockchip SoCs such as the rk3399
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1792564 (view as bug list)
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2019-04-30 21:03 UTC by Ryan Blakley
Modified: 2021-06-15 18:18 UTC (History)
34 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to enable pcie and pwm fan support for Rockpro64 (5.88 KB, patch)
2019-04-30 21:03 UTC, Ryan Blakley
no flags Details | Diff

Description Ryan Blakley 2019-04-30 21:03:34 UTC
Created attachment 1560518 [details]
Patch to enable pcie and pwm fan support for Rockpro64

1. Please describe the problem: I have attached a patch that enables pcie and pwm fan support for the Rockpro64. This support finally enables the use of the nvme and sata pcie adapter cards, so that I could move the rootfs to an nvme drive instead of the slow sd card. It also enables the on board cpu fan power port finally, so that it's not using just passive cooling.

Additional Information: I'd like the fix to be added to both F29 and F30 if possible please.

Comment 1 Laura Abbott 2019-04-30 21:24:59 UTC
Has this been submitted upstream for review yet? Generally we want everything to be accepted or on its way there first.

Comment 2 Ryan Blakley 2019-04-30 21:43:28 UTC
(In reply to Laura Abbott from comment #1)
> Has this been submitted upstream for review yet? Generally we want
> everything to be accepted or on its way there first.

I've never submitted a patch upstream for the kernel, wasn't sure what the proper process was. I figured it might would be added quicker if I submitted it here, since patches have been super slow for the Pine 64 rockchip devices. I will look into getting setup on the mailing list though.

Comment 3 Ryan Blakley 2019-06-24 15:16:50 UTC
(In reply to Laura Abbott from comment #1)
> Has this been submitted upstream for review yet? Generally we want
> everything to be accepted or on its way there first.

Sorry for the delay, it looks like someone beat me to submitting the patch upstream for enabling the pcie nodes. I tested the patch and it boots successfully, so we would need it and the config changes from my patch to enable the pcie slot. Could we get this added into Fedora possibly, I'm okay with skipping adding the pwm fan nodes, I found another solution for powering the cpu and case fan that's more reliable?

https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts?h=next-20190624&id=bba821f5479eaab474b2ec1e230ec8b532089722

Comment 4 Justin M. Forbes 2019-08-20 17:43:00 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There are a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 30 kernel bugs.

Fedora 30 has now been rebased to 5.2.9-200.fc30.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 31, and are still experiencing this issue, please change the version to Fedora 31.

If you experience different issues, please open a new bug report for those.

Comment 5 Ryan Blakley 2019-08-20 19:15:45 UTC
I just checked the 5.2.8-200.fc30(9-200 isn't available yet) and it doesn't have the dts entries or the config options. I checked the latest rawhide kernel, kernel-5.3.0-0.rc5.git0.1.fc32 and it has the dts changes mentioned in my previous comment. But still doesn't have the needed config options enabled, it needs the below config settings set so the module is built.

CONFIG_PCIE_ROCKCHIP_HOST=y
CONFIG_PCIE_ROCKCHIP=y
CONFIG_PHY_ROCKCHIP_PCIE=m

Comment 6 Peter Robinson 2019-10-13 23:10:54 UTC
There's been issues with pcie on some rockchips devices which is why it's not currently enabled, it's being worked upon.

Comment 7 Ryan Blakley 2019-10-14 14:20:31 UTC
(In reply to Peter Robinson from comment #6)
> There's been issues with pcie on some rockchips devices which is why it's
> not currently enabled, it's being worked upon.

I understand, thank you for the update.

Comment 8 Peter Robinson 2020-02-11 11:01:59 UTC
*** Bug 1792564 has been marked as a duplicate of this bug. ***

Comment 9 Peter Robinson 2020-03-17 00:10:24 UTC
So I think I've finally got towards the bottom of this \o/

There's a shared IRQ bug that's picked up by CONFIG_DEBUG_SHIRQ which isn't enabled in the arm64 defconfig so likely no seen by others. I've reported it to Rockchip for their investigation, it seems they saw something but never got a patch upstream:

https://patchwork.kernel.org/patch/9892991/

Comment 10 Peter Robinson 2020-03-17 00:11:29 UTC
Just for reference, and possibly unrelated, but might make it boot faster when pcie is enabled:
https://github.com/96rocks/u-boot/commit/01c5534eb4f9576eb8efb05c234eb310b4e1cd0e

Comment 11 Peter Robinson 2020-03-22 18:40:59 UTC
For reference this was the last patch around this issue but it's still not fixed upstream:

https://patchwork.kernel.org/patch/9928629/

Comment 12 Jean Lucas 2020-06-29 09:12:08 UTC
Hi all, for what its worth, I'd been using the PCIe SATA card sold by Pine64 with the RockPro64 for a few months now on Arch Linux ARM with no issues, apart from quirks with the card itself (the card supports a max of 6Gb transfer, which is not evenly divided among the ports, so if you use e.g. two drives, you have to pass `libata.force=3.0G` to prevent link saturation). The Arch Linux ARM kernel uses vanilla upstream sources i.e. no patches for RK3399 relating to PCIe[0]. Are there currently still blockers to enabling the 3 PCIe modules necessary for this SoC on Fedora 32?

[0] https://github.com/archlinuxarm/PKGBUILDs/tree/master/core/linux-aarch64

Comment 13 Peter Robinson 2020-06-29 09:23:02 UTC
> patches for RK3399 relating to PCIe[0]. Are there currently still blockers
> to enabling the 3 PCIe modules necessary for this SoC on Fedora 32?

I bet that Arch doesn't enable CONFIG_DEBUG_SHIRQ, yes there's still issues, if there wasn't this bug would be closed and it would be enabled. Please actually read the actual details in the bug.

Comment 14 Jean Lucas 2020-06-29 15:27:42 UTC
You're right, Arch doesn't enable DEBUG_SHIRQ. I read more into this issue through the LKML discussion links you posted, and understand a bit better what the issue is. My apologies for not doing that before posting.

Comment 15 Peter Robinson 2021-01-03 11:33:33 UTC
It's now known the rockchip pcie controller is based on Cadence IP, the ultimate end goal would be to use that driver: https://www.spinics.net/lists/linux-pci/msg100411.html

Comment 16 Jordan Williams 2021-06-03 18:09:26 UTC
I'm experiencing this issue on Fedora 34 on both the Workstation and IoT editions on the RockPro64. The NVMe drive doesn't appear in the output of lsblk. If I switch to Armbian, it shows up.

Comment 17 Peter Robinson 2021-06-08 07:49:35 UTC
Still needs review and more testing but this looks promising:
https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210607213328.1711570-1-javierm@redhat.com/


Note You need to log in before you can comment on or make changes to this bug.