Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom board with RK3568: problem with PCI-E #320

Open
Pasha-From-Russia opened this issue Feb 15, 2024 · 0 comments
Open

Custom board with RK3568: problem with PCI-E #320

Pasha-From-Russia opened this issue Feb 15, 2024 · 0 comments

Comments

@Pasha-From-Russia
Copy link

Pasha-From-Russia commented Feb 15, 2024

Hello
I'm trying to run pci-e on my board with RK35368 CPU. I took rockchip-linux/kernel (branch develop-5.10), rockchip-linux/u-boot (branch next-dev )

my dts file is

// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
 * Minimal generic DT for RK3566/RK3568 with eMMC and SD-card enabled
 */

/dts-v1/;
#include "rk3568.dtsi"
#include "rk3568-u-boot.dtsi"

/ {
	model = "Generic RK3566/RK3568";
	compatible = "rockchip,rk3568";
	aliases {
		ethernet0 = &gmac1;
	};

	vcc3v3_pcie: vcc3v3-pcie-regulator {
		compatible = "regulator-fixed";
		regulator-name = "vcc3v3_pcie";
		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
		regulator-always-on;
		enable-active-high;
		status = "okay";
	};
};

&pcie30phy {
	data-lanes = <1 2>;
	status = "okay";
};

&pcie2x1 {
	status = "okay";
	vpcie3v3-supply = <&vcc3v3_pcie>;
};

&pcie3x1 {
	status = "okay";
	num-lanes = <1>;
	vpcie3v3-supply = <&vcc3v3_pcie>;
};

&pcie3x2 {
	status = "okay";
	num-lanes = <1>;
	vpcie3v3-supply = <&vcc3v3_pcie>;
};

i also added a u-boot patch from here
https://patchwork.ozlabs.org/project/uboot/patch/20230428182846.37414-2-inindev@gmail.com/

my kernel says the following errors:

mesg | grep -E "(pci|phy)"
[    0.721217][    T0] Booting Linux on physical CPU 0x0000000000 [0x412fd050]
[    1.239459][    T0] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[    1.380762][    T1] platform 3c0000000.pcie: Linked as a consumer to fdd90000.power-management:power-controller
[    1.383388][    T1] platform 3c0400000.pcie: Linked as a consumer to fdd90000.power-management:power-controller
[    1.385908][    T1] platform 3c0800000.pcie: Linked as a consumer to fdd90000.power-management:power-controller
[    1.396452][    T1] platform usbhost: Linked as a sync state only consumer to fe8a0000.usb2-phy
[    1.397446][    T1] platform usbdrd: Linked as a sync state only consumer to fe8a0000.usb2-phy
[    1.398896][    T1] platform 3c0800000.pcie: Linked as a consumer to fe8c0000.phy
[    1.399789][    T1] platform 3c0400000.pcie: Linked as a consumer to fe8c0000.phy
[    1.604083][    T1] rockchip-pinctrl pinctrl: parse function(94): pcie20
[    1.604757][    T1] rockchip-pinctrl pinctrl: group(0): pcie20m0-pins
[    1.605507][    T1] rockchip-pinctrl pinctrl: group(1): pcie20m1-pins
[    1.606243][    T1] rockchip-pinctrl pinctrl: group(2): pcie20m2-pins
[    1.606977][    T1] rockchip-pinctrl pinctrl: group(3): pcie20-buttonrstn
[    1.607724][    T1] rockchip-pinctrl pinctrl: parse function(95): pcie30x1
[    1.608416][    T1] rockchip-pinctrl pinctrl: group(0): pcie30x1m0-pins
[    1.609180][    T1] rockchip-pinctrl pinctrl: group(1): pcie30x1m1-pins
[    1.609932][    T1] rockchip-pinctrl pinctrl: group(2): pcie30x1m2-pins
[    1.610685][    T1] rockchip-pinctrl pinctrl: group(3): pcie30x1-buttonrstn
[    1.611450][    T1] rockchip-pinctrl pinctrl: parse function(96): pcie30x2
[    1.612144][    T1] rockchip-pinctrl pinctrl: group(0): pcie30x2m0-pins
[    1.612897][    T1] rockchip-pinctrl pinctrl: group(1): pcie30x2m1-pins
[    1.613649][    T1] rockchip-pinctrl pinctrl: group(2): pcie30x2m2-pins
[    1.614399][    T1] rockchip-pinctrl pinctrl: group(3): pcie30x2-buttonrstn
[    1.831045][    T1] platform 3c0800000.pcie: Linked as a consumer to vcc3v3-pcie-regulator
[    1.832027][    T1] platform 3c0400000.pcie: Linked as a consumer to vcc3v3-pcie-regulator
[    1.832995][    T1] platform 3c0000000.pcie: Linked as a consumer to vcc3v3-pcie-regulator
[    1.833999][    T1] platform vcc3v3-pcie-regulator: Linked as a consumer to fdd60000.gpio
[    2.777433][    T1] platform vcc3v3-pcie-regulator: really_probe::device_links_check_suppliers = 0
[    2.778322][    T1] platform vcc3v3-pcie-regulator: bus: 'platform': really_probe: probing driver reg-fixed-voltage with device vcc3v3-pcie-regulator
[    2.779685][    T1] reg-fixed-voltage vcc3v3-pcie-regulator: no pinctrl handle
[    2.780424][    T1] reg-fixed-voltage vcc3v3-pcie-regulator: device is not dma coherent
[    2.781219][    T1] reg-fixed-voltage vcc3v3-pcie-regulator: device is not behind an iommu
[    2.782143][    T1] reg-fixed-voltage vcc3v3-pcie-regulator: GPIO lookup for consumer (null)
[    2.782976][    T1] reg-fixed-voltage vcc3v3-pcie-regulator: using device tree for GPIO lookup
[    2.785887][    T1] reg-fixed-voltage vcc3v3-pcie-regulator: vcc3v3_pcie supplying 3300000uV
[    2.786790][    T1] platform 3c0800000.pcie: Added to deferred list
[    2.787418][    T1] platform 3c0400000.pcie: Added to deferred list
[    2.788039][    T1] platform 3c0000000.pcie: Added to deferred list
[    3.115142][    T1] platform fe8c0000.phy: really_probe::device_links_check_suppliers = 0
[    3.116031][    T1] platform fe8c0000.phy: bus: 'platform': really_probe: probing driver rockchip-snps-pcie3-phy with device fe8c0000.phy
[    3.117267][    T1] rockchip-snps-pcie3-phy fe8c0000.phy: no pinctrl handle
[    3.117982][    T1] rockchip-snps-pcie3-phy fe8c0000.phy: device is not dma coherent
[    3.118752][    T1] rockchip-snps-pcie3-phy fe8c0000.phy: device is not behind an iommu
[    3.119950][    T1] rockchip-snps-pcie3-phy fe8c0000.phy: failed to find rockchip,pipe_grf regmap
[    3.120869][    T1] phy phy-fe8c0000.phy.0: Looking up phy-supply from device tree
[    3.121638][    T1] phy phy-fe8c0000.phy.0: Looking up phy-supply property in node /phy@fe8c0000 failed
[    3.124958][    T1] platform 3c0000000.pcie: really_probe::device_links_check_suppliers = 0
[    3.125789][    T1] platform 3c0000000.pcie: bus: 'platform': really_probe: probing driver rk-pcie with device 3c0000000.pcie
[    3.126971][    T1] rk-pcie 3c0000000.pcie: no pinctrl handle
[    3.127569][    T1] rk-pcie 3c0000000.pcie: device is not dma coherent
[    3.128223][    T1] rk-pcie 3c0000000.pcie: device is not behind an iommu
[    3.128941][    T1] rk-pcie 3c0000000.pcie: adding to PM domain pipe
[    3.129613][    T1] rk-pcie 3c0000000.pcie: genpd_add_device()
[    3.130206][    T1] rk-pcie 3c0000000.pcie: attaching to power domain 'pipe'
[    3.130936][    T1] rk-pcie 3c0000000.pcie: adding clock 'aclk_pcie20_mst' to list of PM clocks
[    3.131802][    T1] rk-pcie 3c0000000.pcie: Clock aclk_pcie20_mst con_id (null) managed by runtime PM.
[    3.132771][    T1] rk-pcie 3c0000000.pcie: adding clock 'aclk_pcie20_slv' to list of PM clocks
[    3.133633][    T1] rk-pcie 3c0000000.pcie: Clock aclk_pcie20_slv con_id (null) managed by runtime PM.
[    3.134560][    T1] rk-pcie 3c0000000.pcie: adding clock 'aclk_pcie20_dbi' to list of PM clocks
[    3.135418][    T1] rk-pcie 3c0000000.pcie: Clock aclk_pcie20_dbi con_id (null) managed by runtime PM.
[    3.136385][    T1] rk-pcie 3c0000000.pcie: adding clock 'pclk_pcie20' to list of PM clocks
[    3.137214][    T1] rk-pcie 3c0000000.pcie: Clock pclk_pcie20 con_id (null) managed by runtime PM.
[    3.138117][    T1] rk_pcie_probe
[    3.138828][  T107] rk-pcie 3c0000000.pcie: rk_pcie_really_probe
[    3.138898][    T1] rk-pcie 3c0000000.pcie: Removed from deferred list
[    3.139587][  T107] rk-pcie 3c0000000.pcie: GPIO lookup for consumer reset
[    3.140237][    T1] platform 3c0400000.pcie: really_probe::device_links_check_suppliers = 0
[    3.140814][  T107] rk-pcie 3c0000000.pcie: using device tree for GPIO lookup
[    3.141625][    T1] platform 3c0400000.pcie: bus: 'platform': really_probe: probing driver rk-pcie with device 3c0400000.pcie
[    3.142374][  T107] rk-pcie 3c0000000.pcie: using lookup tables for GPIO lookup
[    3.143475][    T1] rk-pcie 3c0400000.pcie: no pinctrl handle
[    3.144185][  T107] rk-pcie 3c0000000.pcie: No GPIO consumer reset found
[    3.144761][    T1] rk-pcie 3c0400000.pcie: device is not dma coherent
[    3.145398][  T107] rk-pcie 3c0000000.pcie: GPIO lookup for consumer prsnt
[    3.146069][    T1] rk-pcie 3c0400000.pcie: device is not behind an iommu
[    3.146737][  T107] rk-pcie 3c0000000.pcie: using device tree for GPIO lookup
[    3.147440][    T1] rk-pcie 3c0400000.pcie: adding to PM domain pipe
[    3.148124][  T107] rk-pcie 3c0000000.pcie: using lookup tables for GPIO lookup
[    3.148707][    T1] rk-pcie 3c0400000.pcie: genpd_add_device()
[    3.149457][  T107] rk-pcie 3c0000000.pcie: No GPIO consumer prsnt found
[    3.150027][    T1] rk-pcie 3c0400000.pcie: attaching to power domain 'pipe'
[    3.150674][  T107] rk-pcie 3c0000000.pcie: invalid prsnt-gpios property in node
[    3.151375][    T1] rk-pcie 3c0400000.pcie: adding clock 'aclk_pcie30x1_mst' to list of PM clocks
[    3.152081][  T107] rk-pcie 3c0000000.pcie: Looking up vpcie3v3-supply from device tree
[    3.152975][    T1] rk-pcie 3c0400000.pcie: Clock aclk_pcie30x1_mst con_id (null) managed by runtime PM.
[    3.154039][  T107] rk-pcie 3c0000000.pcie: Linked as a consumer to regulator.1
[    3.154675][    T1] rk-pcie 3c0400000.pcie: adding clock 'aclk_pcie30x1_slv' to list of PM clocks
[    3.155404][  T107] rk-pcie 3c0000000.pcie: phy init failed
[    3.156266][    T1] rk-pcie 3c0400000.pcie: Clock aclk_pcie30x1_slv con_id (null) managed by runtime PM.
[    3.156297][    T1] rk-pcie 3c0400000.pcie: adding clock 'aclk_pcie30x1_dbi' to list of PM clocks
[    3.156868][  T107] rk-pcie 3c0000000.pcie: removing from PM domain pipe
[    3.157752][    T1] rk-pcie 3c0400000.pcie: Clock aclk_pcie30x1_dbi con_id (null) managed by runtime PM.
[    3.158609][  T107] rk-pcie 3c0000000.pcie: genpd_remove_device()
[    3.159307][    T1] rk-pcie 3c0400000.pcie: adding clock 'pclk_pcie30x1' to list of PM clocks
[    3.160222][  T107] rk-pcie 3c0000000.pcie: detaching from power domain 'pipe'
[    3.160772][    T1] rk-pcie 3c0400000.pcie: Clock pclk_pcie30x1 con_id (null) managed by runtime PM.
[    3.166116][    T1] rk_pcie_probe
[    3.166185][  T107] rk-pcie 3c0000000.pcie: Dropping the link to regulator.1
[    3.166829][  T108] rk-pcie 3c0400000.pcie: rk_pcie_really_probe
[    3.167492][    T1] rk-pcie 3c0400000.pcie: Removed from deferred list
[    3.167862][  T108] rk-pcie 3c0400000.pcie: GPIO lookup for consumer reset
[    3.168476][    T1] platform 3c0800000.pcie: really_probe::device_links_check_suppliers = 0
[    3.169054][  T108] rk-pcie 3c0400000.pcie: using device tree for GPIO lookup
[    3.169926][    T1] platform 3c0800000.pcie: bus: 'platform': really_probe: probing driver rk-pcie with device 3c0800000.pcie
[    3.170662][  T108] rk-pcie 3c0400000.pcie: using lookup tables for GPIO lookup
[    3.171724][    T1] rk-pcie 3c0800000.pcie: no pinctrl handle
[    3.172417][  T108] rk-pcie 3c0400000.pcie: No GPIO consumer reset found
[    3.173036][    T1] rk-pcie 3c0800000.pcie: device is not dma coherent
[    3.173670][  T108] rk-pcie 3c0400000.pcie: GPIO lookup for consumer prsnt
[    3.174299][    T1] rk-pcie 3c0800000.pcie: device is not behind an iommu
[    3.174965][  T108] rk-pcie 3c0400000.pcie: using device tree for GPIO lookup
[    3.175666][    T1] rk-pcie 3c0800000.pcie: adding to PM domain pipe
[    3.176389][  T108] rk-pcie 3c0400000.pcie: using lookup tables for GPIO lookup
[    3.176972][    T1] rk-pcie 3c0800000.pcie: genpd_add_device()
[    3.177679][  T108] rk-pcie 3c0400000.pcie: No GPIO consumer prsnt found
[    3.178248][    T1] rk-pcie 3c0800000.pcie: attaching to power domain 'pipe'
[    3.178896][  T108] rk-pcie 3c0400000.pcie: invalid prsnt-gpios property in node
[    3.179635][    T1] rk-pcie 3c0800000.pcie: adding clock 'aclk_pcie30x2_mst' to list of PM clocks
[    3.180344][  T108] rk-pcie 3c0400000.pcie: Looking up vpcie3v3-supply from device tree
[    3.181197][    T1] rk-pcie 3c0800000.pcie: Clock aclk_pcie30x2_mst con_id (null) managed by runtime PM.
[    3.182330][  T108] rk-pcie 3c0400000.pcie: Linked as a consumer to regulator.1
[    3.182938][    T1] rk-pcie 3c0800000.pcie: adding clock 'aclk_pcie30x2_slv' to list of PM clocks
[    3.183925][  T108] rk-pcie 3c0400000.pcie: Linked as a consumer to phy-fe8c0000.phy.0
[    3.184502][    T1] rk-pcie 3c0800000.pcie: Clock aclk_pcie30x2_slv con_id (null) managed by runtime PM.
[    3.185811][  T108] rockchip_p3phy_rk3568_init: lock failed 0x6890000, check input refclk and power supply, -110
[    3.186237][    T1] rk-pcie 3c0800000.pcie: adding clock 'aclk_pcie30x2_dbi' to list of PM clocks
[    3.187222][  T108] phy phy-fe8c0000.phy.0: phy init failed --> -110
[    3.188068][    T1] rk-pcie 3c0800000.pcie: Clock aclk_pcie30x2_dbi con_id (null) managed by runtime PM.
[    3.188684][  T108] rk-pcie 3c0400000.pcie: fail to init phy, err -110
[    3.189652][    T1] rk-pcie 3c0800000.pcie: adding clock 'pclk_pcie30x2' to list of PM clocks
[    3.190270][  T108] rk-pcie 3c0400000.pcie: phy init failed
[    3.191096][    T1] rk-pcie 3c0800000.pcie: Clock pclk_pcie30x2 con_id (null) managed by runtime PM.
[    3.191671][  T108] rk-pcie 3c0400000.pcie: removing from PM domain pipe
[    3.192535][    T1] rk_pcie_probe
[    3.193208][  T108] rk-pcie 3c0400000.pcie: genpd_remove_device()
[    3.193883][  T110] rk-pcie 3c0800000.pcie: rk_pcie_really_probe
[    3.193947][    T1] rk-pcie 3c0800000.pcie: Removed from deferred list
[    3.194136][  T108] rk-pcie 3c0400000.pcie: detaching from power domain 'pipe'
[    3.194815][  T110] rk-pcie 3c0800000.pcie: GPIO lookup for consumer reset
[    3.195465][  T108] rk-pcie 3c0400000.pcie: Dropping the link to phy-fe8c0000.phy.0
[    3.196111][  T110] rk-pcie 3c0800000.pcie: using device tree for GPIO lookup
[    3.196172][  T110] rk-pcie 3c0800000.pcie: using lookup tables for GPIO lookup
[    3.197243][  T108] rk-pcie 3c0400000.pcie: Dropping the link to regulator.1
[    3.197553][  T110] rk-pcie 3c0800000.pcie: No GPIO consumer reset found
[    3.198959][  T110] rk-pcie 3c0800000.pcie: GPIO lookup for consumer prsnt
[    3.200509][  T110] rk-pcie 3c0800000.pcie: using device tree for GPIO lookup
[    3.202224][  T110] rk-pcie 3c0800000.pcie: using lookup tables for GPIO lookup
[    3.203470][  T110] rk-pcie 3c0800000.pcie: No GPIO consumer prsnt found
[    3.208027][  T110] rk-pcie 3c0800000.pcie: invalid prsnt-gpios property in node
[    3.208769][  T110] rk-pcie 3c0800000.pcie: Looking up vpcie3v3-supply from device tree
[    3.210568][  T110] rk-pcie 3c0800000.pcie: Linked as a consumer to regulator.1
[    3.212748][  T110] rk-pcie 3c0800000.pcie: Linked as a consumer to phy-fe8c0000.phy.0
[    3.214083][  T110] rockchip_p3phy_rk3568_init: lock failed 0x6890000, check input refclk and power supply, -110
[    3.215328][  T110] phy phy-fe8c0000.phy.0: phy init failed --> -110
[    3.217004][  T110] rk-pcie 3c0800000.pcie: fail to init phy, err -110
[    3.218202][  T110] rk-pcie 3c0800000.pcie: phy init failed
[    3.219462][  T110] rk-pcie 3c0800000.pcie: removing from PM domain pipe
[    3.220746][  T110] rk-pcie 3c0800000.pcie: genpd_remove_device()
[    3.222500][  T110] rk-pcie 3c0800000.pcie: detaching from power domain 'pipe'
[    3.223491][  T110] rk-pcie 3c0800000.pcie: Dropping the link to phy-fe8c0000.phy.0
[    3.224702][  T110] rk-pcie 3c0800000.pcie: Dropping the link to regulator.1
[    3.371750][    T1] rk_gmac-dwmac fe010000.ethernet: Looking up phy-supply from device tree
[    3.372542][    T1] rk_gmac-dwmac fe010000.ethernet: Looking up phy-supply property in node /ethernet@fe010000 failed
[    3.373559][    T1] rk_gmac-dwmac fe010000.ethernet: supply phy not found, using dummy regulator
[    3.533493][    T1] mdio_bus stmmac-0: registered phy phy at address 0

What am I doing wrong? Please I need your help or a manual on how to configure devices for Rockchip CPUs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant