PCIe missing on RK3399
Johan Jonker
jbx6244 at gmail.com
Sat Dec 28 01:35:08 PST 2024
On 12/28/24 01:51, Vicente Bergas wrote:
> On Thu, Dec 12, 2024 at 1:12 PM Vicente Bergas <vicencb at gmail.com> wrote:
>>
>> On Wed, Dec 11, 2024 at 6:31 PM Vicente Bergas <vicencb at gmail.com> wrote:
>>>
>>> On Wed, Dec 11, 2024 at 4:35 PM Heiko Stübner <heiko at sntech.de> wrote:
>>>>
>>>> Am Mittwoch, 11. Dezember 2024, 16:10:21 CET schrieb Vicente Bergas:
>>>>> On Wed, Dec 11, 2024 at 2:36 PM Heiko Stübner <heiko at sntech.de> wrote:
>>>>>>
>>>>>> Hi Vicente,
>>>>>
>>>>> Hi Heiko,
>>>>> thanks for taking a look at it!
>>>>>
>>>>>> Am Mittwoch, 11. Dezember 2024, 13:55:01 CET schrieb Vicente Bergas:
>>>>>>> i've tested the Linux kernel 6.13-rc1 and rc2 and in both cases PCIe
>>>>>>> is not detected on the RK3399 platform (rk3399-gru-kevin), whereas the
>>>>>>> kernel version 6.12.3 works fine.
>>>>>>>
>>>>>>> 6.13 configuration is based on the same one as 6.12 and there aren't
>>>>>>> any significant PCI-related differences.
>>>>>>>
>>>>>>> The messages from dmesg on 6.13 don't show any PCI-related errors.
>>>>>>>
>>>>>>> Does somebody know what is going on?
>>>>>>
>>>>>> so I just booted a rk3399-puma-haikou with a pci-nvme-adapter in the
>>>>>> pcie slot. And I get:
>>>>>>
>>>>>> [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
>>>>>> [ 0.000000] Linux version 6.13.0-rc2-00101-g260ae63734ff-dirty (hstuebner at phil) (aarch64-linux-gnu-gcc (Debian 14.2.0-6) 14.2.0, GNU ld (GNU Binutils for Debian) 2.43.1) #1134 SMP PREEMPT Tue Dec 10 21:06:34 CET 2024
>>>>>> ...
>>>>>> [ 3.428114] rockchip-pcie f8000000.pcie: host bridge /pcie at f8000000 ranges:
>>>>>> [ 3.435978] rockchip-pcie f8000000.pcie: MEM 0x00fa000000..0x00fbdfffff -> 0x00fa000000
>>>>>> [ 3.445478] rockchip-pcie f8000000.pcie: IO 0x00fbe00000..0x00fbefffff -> 0x00fbe00000
>>>>>> [ 3.455298] rockchip-pcie f8000000.pcie: using DT '/pcie at f8000000' for 'ep' GPIO lookup
>>>>>>
>>>>>> So there seems to be not some general failure.
>>>>>>
>>>>>> Does
>>>>>> # ls /sys/devices/platform/f8000000.pcie
>>>>>> list some "waiting_for_supplies" or something?
>>>>>
>>>>> yes, indeed there is such a file in there:
>>>>>
>>>>> ### 6.13-rc2
>>>>> $ ls /sys/devices/platform/f8000000.pcie
>>>>> power
>>>>> driver_override
>>>>> modalias
>>>>> of_node
>>>>> subsystem
>>>>> supplier:platform:ff720000.gpio
>>>>> supplier:platform:ff770000.syscon:pcie-phy
>>>>> supplier:platform:ff780000.gpio
>>>>> supplier:platform:pinctrl
>>>>> supplier:platform:regulator-pp3300-wifi-bt
>>>>> supplier:platform:regulator-wlan-pd-n
>>>>> uevent
>>>>> waiting_for_supplier
>>>>>
>>>>> $ cat /sys/devices/platform/f8000000.pcie/waiting_for_supplier
>>>>> 1
>>>>>
>>>>> ### 6.12.3
>>>>> $ ls /sys/devices/platform/f8000000.pcie
>>>>> pci0000:00
>>>>> power
>>>>> driver
>>>>> driver_override
>>>>> modalias
>>>>> of_node
>>>>> subsystem
>>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.5
>>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.6
>>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.7
>>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.8
>>>>> supplier:platform:ff770000.syscon:pcie-phy
>>>>> supplier:platform:ff780000.gpio
>>>>> supplier:platform:pinctrl
>>>>> supplier:platform:pp3300-wifi-bt
>>>>> supplier:platform:pp900-ap
>>>>> supplier:platform:wlan-pd-n
>>>>> supplier:regulator:regulator.17
>>>>> supplier:regulator:regulator.23
>>>>> supplier:regulator:regulator.25
>>>>> uevent
>>>>>
>>>>> What does that mean?
>>>>
>>>> waiting_for_supplier means that some supplier has not yet probed
>>>> and thus the driver also cannot probe yet.
>>>>
>>>> But your 6.13-rc2 supplier list does look way too short. In my boot on
>>>> rk3399-puma-haikou above, I got:
>>>>
>>>> $ ls /sys/devices/platform/f8000000.pcie
>>>> driver
>>>> driver_override
>>>> modalias
>>>> of_node
>>>> pci0000:00
>>>> power
>>>> subsystem
>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.2
>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.3
>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.4
>>>> supplier:phy:phy-ff770000.syscon:pcie-phy.5
>>>> supplier:platform:ff770000.syscon:pcie-phy
>>>> supplier:platform:ff790000.gpio
>>>> supplier:platform:pinctrl
>>>> supplier:platform:regulator-dc-12v
>>>> supplier:platform:regulator-vcc3v3-baseboard
>>>> supplier:platform:regulator-vcca-0v9
>>>> supplier:platform:regulator-vcca-1v8
>>>> supplier:regulator:regulator.10
>>>> supplier:regulator:regulator.11
>>>> supplier:regulator:regulator.29
>>>> supplier:regulator:regulator.3
>>>> uevent
>>>
>>> Just tested 6.13-rc2 with the DTB from 6.12.3 and it works fine. So,
>>> it is a DT issue.
>>> I suspect this commit may be the root cause:
>>> 5c96e63301978f4657c9082c55a066763c8db7b1
>>> arm64: dts: rockchip: adapt regulator nodenames to preferred form
>>
>> (Added: Johan Jonker)
Hi,
I used a script to find regulator nodes.
Due to the strange external construction these nodes were missed.
Question for Heiko:
Now that we touch them do you want to keep it this way or combine them?
Johan
>>
>> The 6.13-rc2 kernel with 5c96e63301978f4657c9082c55a066763c8db7b1
>> reverted works fine, i've just tested that to confirm.
>>
>> Regards,
>> Vicente.
>
> Hello,
> i've applied this patch and it is now working for me.
> Please, can you check it? (DTS is not a language i am fluent with).
> If it is fine, i can send a proper patch with `git send-email`.
>
> ---
>
> Follow up from 5c96e63301978f4657c9082c55a066763c8db7b1:
> Fix more Rockchip DT regulator nodenames.
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
> b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
> index 988e6ca32fac..a9ea4b0daa04 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-chromebook.dtsi
> @@ -22,11 +22,11 @@ pp900_ap: regulator-pp900-ap {
> };
>
> /* EC turns on w/ pp900_usb_en */
> - pp900_usb: pp900-ap {
> + pp900_usb: regulator-pp900-ap {
> };
>
> /* EC turns on w/ pp900_pcie_en */
> - pp900_pcie: pp900-ap {
> + pp900_pcie: regulator-pp900-ap {
> };
>
> pp3000: regulator-pp3000 {
> @@ -126,7 +126,7 @@ pp1800_pcie: regulator-pp1800-pcie {
> };
>
> /* Always on; plain and simple */
> - pp3000_ap: pp3000_emmc: pp3000 {
> + pp3000_ap: pp3000_emmc: regulator-pp3000 {
> };
>
> pp1500_ap_io: regulator-pp1500-ap-io {
> @@ -160,7 +160,7 @@ pp3300_disp: regulator-pp3300-disp {
> };
>
> /* EC turns on w/ pp3300_usb_en_l */
> - pp3300_usb: pp3300 {
> + pp3300_usb: regulator-pp3300 {
> };
>
> /* gpio is shared with pp1800_pcie and pinctrl is set there */
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> index 6d9e60b01225..1a470c519db1 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
> @@ -189,39 +189,39 @@ ppvar_gpu: ppvar-gpu {
> };
>
> /* EC turns on w/ pp900_ddrpll_en */
> - pp900_ddrpll: pp900-ap {
> + pp900_ddrpll: regulator-pp900-ap {
> };
>
> /* EC turns on w/ pp900_pll_en */
> - pp900_pll: pp900-ap {
> + pp900_pll: regulator-pp900-ap {
> };
>
> /* EC turns on w/ pp900_pmu_en */
> - pp900_pmu: pp900-ap {
> + pp900_pmu: regulator-pp900-ap {
> };
>
> /* EC turns on w/ pp1800_s0_en_l */
> - pp1800_ap_io: pp1800_emmc: pp1800_nfc: pp1800_s0: pp1800 {
> + pp1800_ap_io: pp1800_emmc: pp1800_nfc: pp1800_s0: regulator-pp1800 {
> };
>
> /* EC turns on w/ pp1800_avdd_en_l */
> - pp1800_avdd: pp1800 {
> + pp1800_avdd: regulator-pp1800 {
> };
>
> /* EC turns on w/ pp1800_lid_en_l */
> - pp1800_lid: pp1800_mic: pp1800 {
> + pp1800_lid: pp1800_mic: regulator-pp1800 {
> };
>
> /* EC turns on w/ lpddr_pwr_en */
> - pp1800_lpddr: pp1800 {
> + pp1800_lpddr: regulator-pp1800 {
> };
>
> /* EC turns on w/ pp1800_pmu_en_l */
> - pp1800_pmu: pp1800 {
> + pp1800_pmu: regulator-pp1800 {
> };
>
> /* EC turns on w/ pp1800_usb_en_l */
> - pp1800_usb: pp1800 {
> + pp1800_usb: regulator-pp1800 {
> };
>
> pp3000_sd_slot: regulator-pp3000-sd-slot {
> @@ -263,7 +263,7 @@ pp3300_trackpad: pp3300-trackpad {
> };
>
> /* EC turns on w/ usb_a_en */
> - pp5000_usb_a_vbus: pp5000 {
> + pp5000_usb_a_vbus: regulator-pp5000 {
> };
>
> ap_rtc_clk: ap-rtc-clk {
More information about the Linux-rockchip
mailing list