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

Only one of two PCIe host controllers are recognized #47

Open
X547 opened this issue Apr 29, 2023 · 0 comments
Open

Only one of two PCIe host controllers are recognized #47

X547 opened this issue Apr 29, 2023 · 0 comments

Comments

@X547
Copy link

X547 commented Apr 29, 2023

There are two PCIe host controllers (pcie0: pcie@2B000000, pcie1: pcie@2C000000), but only second one is intialized by U-Boot. First PCIe host controller contains XHCI (USB 3) that is required for booting from USB mass storage devices. It is also needed for operating systems that assume that PCI is already initialized by boot loader.

pcie0 seems disabled in FDT config (status = "disabled"), but attempting to enable it manually cause only first PCIe host controller to be properly initalized.

dm tree output:

 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 clk           0  [ + ]   fixed_clock           |-- osc
 clk          20  [ + ]   ccf_clk_fixed_factor  |   |-- pll0_out
 clk          23  [ + ]   ccf_clk_mux           |   |   |-- cpu_root
 clk          24  [ + ]   ccf_clk_divider       |   |   |   `-- cpu_core
 clk          25  [   ]   ccf_clk_divider       |   |   |       `-- cpu_bus
 clk          27  [ + ]   ccf_clk_fixed_factor  |   |   `-- gmacusb_root
 clk          44  [ + ]   ccf_clk_divider       |   |       |-- u0_cdns_qspi_ref_src
 clk          45  [   ]   clk_composite         |   |       |   `-- u0_cdns_qspi_clk_ref
 clk          50  [ + ]   ccf_clk_divider       |   |       |-- usb_125m
 clk          82  [   ]   clk_gate              |   |       |   `-- u0_cdn_usb_clk_app_125
 clk          54  [ + ]   ccf_clk_divider       |   |       |-- gmac_src
 clk          58  [   ]   clk_composite         |   |       |   |-- u1_dw_gmac5_axi64_clk_ptp
 clk          62  [ + ]   clk_composite         |   |       |   `-- gmac0_ptp
 clk          87  [   ]   ccf_clk_fixed_factor  |   |       |       `-- u0_dw_gmac5_axi64_clk_ptp
 clk          55  [ + ]   ccf_clk_divider       |   |       |-- gmac1_gtxclk
 clk          56  [   ]   clk_gate              |   |       |   |-- gmac1_gtxc
 clk          59  [   ]   clk_composite         |   |       |   `-- u1_dw_gmac5_axi64_clk_tx
 clk          61  [ + ]   clk_composite         |   |       `-- gmac0_gtxclk
 clk          63  [   ]   clk_gate              |   |           |-- gmac0_gtxc
 clk          88  [   ]   clk_composite         |   |           `-- u0_dw_gmac5_axi64_clk_tx
 clk          21  [ + ]   ccf_clk_fixed_factor  |   |-- pll1_out
 clk          26  [   ]   ccf_clk_fixed_factor  |   |   `-- ddr_root
 clk          22  [ + ]   ccf_clk_fixed_factor  |   |-- pll2_out
 clk          28  [ + ]   clk_composite         |   |   |-- perh_root
 clk          71  [   ]   clk_composite         |   |   |   |-- u3_dw_uart_clk_core
 clk          73  [   ]   clk_composite         |   |   |   |-- u4_dw_uart_clk_core
 clk          75  [   ]   clk_composite         |   |   |   `-- u5_dw_uart_clk_core
 clk          29  [ + ]   ccf_clk_mux           |   |   |-- bus_root
 clk          30  [ + ]   ccf_clk_divider       |   |   |   |-- axi_cfg0
 clk          31  [ + ]   ccf_clk_divider       |   |   |   |   |-- stg_axiahb
 clk          32  [ + ]   clk_gate              |   |   |   |   |   |-- ahb0
 clk          46  [   ]   clk_gate              |   |   |   |   |   |   |-- u0_dw_sdio_clk_ahb
 clk          47  [   ]   clk_gate              |   |   |   |   |   |   |-- u1_dw_sdio_clk_ahb
 clk          52  [   ]   clk_gate              |   |   |   |   |   |   `-- u1_dw_gmac5_axi64_clk_ahb
 clk          33  [ + ]   clk_gate              |   |   |   |   |   |-- ahb1
 clk          42  [   ]   clk_gate              |   |   |   |   |   |   |-- u0_cdns_qspi_clk_ahb
 clk          96  [ + ]   clk_gate              |   |   |   |   |   |   `-- u0_dom_vout_top_clk_vout_ahb
 clk         116  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |       `-- disp_ahb
 clk         119  [ + ]   ccf_clk_divider       |   |   |   |   |   |           |-- apb
 clk         120  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |           |   `-- u0_pclk_mux_func_pclk
 clk         121  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |           |       `-- disp_apb
 clk         138  [   ]   clk_gate              |   |   |   |   |   |           |           `-- u0_hdmi_tx_clk_sys
 clk         122  [ + ]   ccf_clk_divider       |   |   |   |   |   |           |-- tx_esc
 clk         133  [   ]   clk_gate              |   |   |   |   |   |           |   |-- u0_mipitx_dphy_clk_txesc
 clk         136  [   ]   clk_gate              |   |   |   |   |   |           |   `-- u0_cdns_dsiTx_clk_txesc
 clk         129  [   ]   clk_gate              |   |   |   |   |   |           `-- u0_dc8200_clk_ahb
 clk          34  [ + ]   ccf_clk_divider       |   |   |   |   |   |-- apb_bus_func
 clk          35  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |   |-- u2_pclk_mux_func_pclk
 clk          36  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |   |   `-- u2_pclk_mux_pclk
 clk          37  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |   |       `-- apb_bus
 clk          38  [ + ]   clk_gate              |   |   |   |   |   |   |           |-- apb0
 clk          64  [   ]   clk_gate              |   |   |   |   |   |   |           |   |-- u0_dw_uart_clk_apb
 clk          66  [   ]   clk_gate              |   |   |   |   |   |   |           |   |-- u1_dw_uart_clk_apb
 clk          68  [   ]   clk_gate              |   |   |   |   |   |   |           |   |-- u2_dw_uart_clk_apb
 clk          70  [   ]   clk_gate              |   |   |   |   |   |   |           |   |-- u3_dw_uart_clk_apb
 clk          72  [   ]   clk_gate              |   |   |   |   |   |   |           |   |-- u4_dw_uart_clk_apb
 clk          74  [   ]   clk_gate              |   |   |   |   |   |   |           |   |-- u5_dw_uart_clk_apb
 clk         104  [   ]   clk_gate              |   |   |   |   |   |   |           |   |-- u5_dw_i2c_clk_apb
 clk         106  [ + ]   clk_gate              |   |   |   |   |   |   |           |   `-- u2_dw_i2c_clk_apb
 clk         107  [   ]   ccf_clk_fixed_factor  |   |   |   |   |   |   |           |       `-- u2_dw_i2c_clk_core
 clk          39  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |   |           |-- apb12
 clk          43  [   ]   clk_gate              |   |   |   |   |   |   |           |   `-- u0_cdns_qspi_clk_apb
 clk          76  [   ]   ccf_clk_fixed_factor  |   |   |   |   |   |   |           `-- stg_apb
 clk          40  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |   `-- aon_apb
 clk          89  [   ]   clk_gate              |   |   |   |   |   |       `-- u0_otpc_clk_apb
 clk          53  [   ]   clk_gate              |   |   |   |   |   |-- u1_dw_gmac5_axi64_clk_axi
 clk          60  [ + ]   ccf_clk_fixed_factor  |   |   |   |   |   |-- aon_ahb
 clk          84  [   ]   clk_gate              |   |   |   |   |   |   |-- u0_dw_gmac5_axi64_clk_ahb
 clk          85  [   ]   clk_gate              |   |   |   |   |   |   `-- u0_dw_gmac5_axi64_clk_axi
 clk          79  [   ]   clk_gate              |   |   |   |   |   |-- u0_cdn_usb_clk_axi
 clk         108  [   ]   clk_gate              |   |   |   |   |   |-- u0_plda_pcie_clk_tl
 clk         109  [   ]   clk_gate              |   |   |   |   |   |-- u0_plda_pcie_clk_axi_mst0
 clk         111  [   ]   clk_gate              |   |   |   |   |   |-- u1_plda_pcie_clk_tl
 clk         112  [   ]   clk_gate              |   |   |   |   |   `-- u1_plda_pcie_clk_axi_mst0
 clk          48  [   ]   clk_composite         |   |   |   |   |-- u0_dw_sdio_clk_sdcard
 clk          49  [   ]   clk_composite         |   |   |   |   `-- u1_dw_sdio_clk_sdcard
 clk          41  [ + ]   ccf_clk_divider       |   |   |   `-- nocstg_bus
 clk          51  [   ]   clk_gate              |   |   |       `-- u0_sft7110_noc_bus_clk_stg_axi
 clk          90  [ + ]   ccf_clk_fixed_factor  |   |   |-- vout_root
 clk          92  [ + ]   clk_gate              |   |   |   |-- u0_dom_vout_top_clk_vout_src
 clk         114  [ + ]   ccf_clk_fixed_factor  |   |   |   |   `-- disp_root
 clk         123  [ + ]   ccf_clk_divider       |   |   |   |       |-- dc8200_pix0
 clk         126  [ + ]   clk_composite         |   |   |   |       |   |-- u0_dc8200_clk_pix1
 clk         131  [   ]   ccf_clk_fixed_factor  |   |   |   |       |   |   `-- u0_dc8200_clk_pix1_out
 clk         137  [   ]   clk_composite         |   |   |   |       |   |-- u0_cdns_dsitx_clk_api
 clk         125  [ + ]   clk_composite         |   |   |   |       |   `-- u0_dc8200_clk_pix0
 clk         130  [ + ]   ccf_clk_fixed_factor  |   |   |   |       |       `-- u0_dc8200_clk_pix0_out
 clk         132  [   ]   clk_composite         |   |   |   |       |           `-- dom_vout_top_lcd_clk
 clk         124  [ + ]   ccf_clk_divider       |   |   |   |       `-- dsi_sys
 clk         134  [   ]   clk_gate              |   |   |   |           |-- u0_cdns_dsiTx_clk_sys
 clk         135  [   ]   clk_gate              |   |   |   |           `-- u0_cdns_dsiTx_clk_apb
 clk          93  [ + ]   ccf_clk_divider       |   |   |   `-- vout_axi
 clk          94  [ + ]   clk_gate              |   |   |       |-- u0_dom_vout_top_vout_axi
 clk         115  [ + ]   ccf_clk_fixed_factor  |   |   |       |   `-- disp_axi
 clk         127  [   ]   clk_gate              |   |   |       |       |-- u0_dc8200_clk_axi
 clk         128  [   ]   clk_gate              |   |   |       |       `-- u0_dc8200_clk_core
 clk          95  [   ]   clk_gate              |   |   |       `-- u0_sft7110_noc_bus_clk_disp_axi
 clk          91  [ + ]   ccf_clk_divider       |   |   `-- audio_root
 clk          97  [ + ]   ccf_clk_divider       |   |       `-- mclk_inner
 clk          98  [ + ]   ccf_clk_mux           |   |           `-- mclk
 clk          99  [ + ]   clk_composite         |   |               |-- i2stx_4ch0_bclk_mst
 clk         100  [ + ]   ccf_clk_mux           |   |               |   `-- u0_i2stx_4ch_bclk
 clk         101  [ + ]   ccf_clk_fixed_factor  |   |               |       `-- u0_dom_vout_top_clk_hdmitx0_bclk
 clk         118  [ + ]   ccf_clk_fixed_factor  |   |               |           `-- hdmitx0_sck
 clk         140  [   ]   clk_gate              |   |               |               `-- u0_hdmi_tx_clk_bclk
 clk         102  [ + ]   clk_gate              |   |               `-- u0_dom_vout_top_clk_hdmitx0_mclk
 clk         117  [ + ]   ccf_clk_fixed_factor  |   |                   `-- hdmitx0_mclk
 clk         139  [   ]   clk_gate              |   |                       `-- u0_hdmi_tx_clk_mclk
 clk          65  [   ]   clk_gate              |   |-- u0_dw_uart_clk_core
 clk          67  [   ]   clk_gate              |   |-- u1_dw_uart_clk_core
 clk          69  [   ]   clk_gate              |   |-- u2_dw_uart_clk_core
 clk          80  [   ]   clk_composite         |   |-- u0_cdn_usb_clk_lpm
 clk          81  [   ]   clk_composite         |   |-- u0_cdn_usb_clk_stb
 clk          83  [   ]   ccf_clk_divider       |   |-- u0_cdn_usb_refclk
 clk         103  [   ]   ccf_clk_divider       |   |-- u0_dom_vout_top_clk_mipiphy_ref
 clk         105  [   ]   clk_gate              |   `-- u5_dw_i2c_clk_core
 clk           1  [ + ]   fixed_clock           |-- gmac1_rmii_refin
 clk          57  [   ]   ccf_clk_divider       |   `-- gmac1_rmii_rtx
 clk           2  [   ]   fixed_clock           |-- gmac1_rgmii_rxin
 clk           3  [   ]   fixed_clock           |-- i2stx_bclk_ext
 clk           4  [   ]   fixed_clock           |-- i2stx_lrck_ext
 clk           5  [   ]   fixed_clock           |-- i2srx_bclk_ext
 clk           6  [   ]   fixed_clock           |-- i2srx_lrck_ext
 clk           7  [   ]   fixed_clock           |-- tdm_ext
 clk           8  [   ]   fixed_clock           |-- mclk_ext
 clk           9  [   ]   fixed_clock           |-- jtag_tck_inner
 clk          10  [   ]   fixed_clock           |-- bist_apb
 clk          11  [ + ]   fixed_clock           |-- stg_apb
 clk          77  [   ]   clk_gate              |   |-- u0_cdn_usb_clk_usb_apb
 clk          78  [   ]   clk_gate              |   |-- u0_cdn_usb_clk_utmi_apb
 clk         110  [   ]   clk_gate              |   |-- u0_plda_pcie_clk_apb
 clk         113  [   ]   clk_gate              |   `-- u1_plda_pcie_clk_apb
 clk          12  [ + ]   fixed_clock           |-- gmac0_rmii_refin
 clk          86  [   ]   ccf_clk_divider       |   `-- gmac0_rmii_rtx
 clk          13  [   ]   fixed_clock           |-- gmac0_rgmii_rxin
 clk          14  [   ]   fixed_clock           |-- clk_rtc
 clk          15  [ + ]   fixed_clock           |-- hdmitx0_pixelclk
 clk          16  [   ]   fixed_clock           |-- mipitx_dphy_rxesc
 clk          17  [   ]   fixed_clock           |-- mipitx_dphy_txbytehs
 simple_bus    0  [ + ]   simple_bus            |-- soc
 cache         0  [ + ]   sifive_ccache         |   |-- cache-controller@2010000
 syscon        0  [   ]   syscon                |   |-- aon_syscon@17010000
 syscon        1  [ + ]   syscon                |   |-- stg_syscon@10240000
 syscon        2  [   ]   syscon                |   |-- sys_syscon@13030000
 clk          18  [ + ]   jh7110_clk            |   |-- clock-controller
 spi           0  [ + ]   cadence_spi           |   |-- spi@13010000
 spi_flash     0  [ + ]   jedec_spi_nor         |   |   `-- nor-flash@0
 misc          0  [ + ]   starfive_otp          |   |-- otp@17050000
 nop           0  [   ]   cdns-starfive         |   |-- usbdrd
 usb           0  [   ]   cdns-usb3-host        |   |   `-- usb@10100000
 power_doma    0  [ + ]   sf_power_domain       |   |-- pmu@17030000
 serial        0  [ + ]   ns16550_serial        |   |-- serial@10000000
 pinctrl       0  [ + ]   jh7110-sys-pinctrl    |   |-- gpio@13040000
 pinconfig     0  [ + ]   pinconfig             |   |   |-- uart0-0
 pinconfig     1  [   ]   pinconfig             |   |   |   |-- tx-pins
 pinconfig     2  [   ]   pinconfig             |   |   |   `-- rx-pins
 pinconfig     3  [ + ]   pinconfig             |   |   |-- mmc0-pins
 pinconfig     4  [   ]   pinconfig             |   |   |   `-- mmc0-pins-rest
 pinconfig     5  [ + ]   pinconfig             |   |   |-- sdcard1-pins
 pinconfig     6  [   ]   pinconfig             |   |   |   |-- sdcard1-pins0
 pinconfig     7  [   ]   pinconfig             |   |   |   |-- sdcard1-pins1
 pinconfig     8  [   ]   pinconfig             |   |   |   |-- sdcard1-pins2
 pinconfig     9  [   ]   pinconfig             |   |   |   |-- sdcard1-pins3
 pinconfig    10  [   ]   pinconfig             |   |   |   |-- sdcard1-pins4
 pinconfig    11  [   ]   pinconfig             |   |   |   `-- sdcard1-pins5
 pinconfig    12  [   ]   pinconfig             |   |   |-- pcie0_perst_default
 pinconfig    13  [   ]   pinconfig             |   |   |   `-- perst-pins
 pinconfig    14  [   ]   pinconfig             |   |   |-- pcie0_perst_active
 pinconfig    15  [   ]   pinconfig             |   |   |   `-- perst-pins
 pinconfig    16  [   ]   pinconfig             |   |   |-- pcie0_wake_default
 pinconfig    17  [   ]   pinconfig             |   |   |   `-- wake-pins
 pinconfig    18  [   ]   pinconfig             |   |   |-- pcie0_clkreq_default
 pinconfig    19  [   ]   pinconfig             |   |   |   `-- clkreq-pins
 pinconfig    20  [ + ]   pinconfig             |   |   |-- pcie1_perst_default
 pinconfig    21  [   ]   pinconfig             |   |   |   `-- perst-pins
 pinconfig    22  [ + ]   pinconfig             |   |   |-- pcie1_perst_active
 pinconfig    23  [   ]   pinconfig             |   |   |   `-- perst-pins
 pinconfig    24  [   ]   pinconfig             |   |   |-- pcie1_wake_default
 pinconfig    25  [   ]   pinconfig             |   |   |   `-- wake-pins
 pinconfig    26  [   ]   pinconfig             |   |   |-- pcie1_clkreq_default
 pinconfig    27  [   ]   pinconfig             |   |   |   `-- clkreq-pins
 pinconfig    28  [ + ]   pinconfig             |   |   |-- i2c2-0
 pinconfig    29  [   ]   pinconfig             |   |   |   `-- i2c-pins
 pinconfig    30  [   ]   pinconfig             |   |   |-- i2c5-0
 pinconfig    31  [   ]   pinconfig             |   |   |   `-- i2c-pins
 pinconfig    32  [ + ]   pinconfig             |   |   |-- hdmi-0
 pinconfig    33  [   ]   pinconfig             |   |   |   |-- cec-pins
 pinconfig    34  [   ]   pinconfig             |   |   |   `-- hpd-pins
 gpio          0  [   ]   starfive_gpio         |   |   `-- starfive_gpio
 i2c           0  [ + ]   i2c_designware        |   |-- i2c@10050000
 panel         0  [   ]   rm68200_panel         |   |   `-- rm68200_panel@45
 i2c           1  [ + ]   i2c_designware        |   |-- i2c5@12050000
 i2c_eeprom    0  [ + ]   i2c_eeprom            |   |   `-- eeprom@50
 mmc           0  [ + ]   snps_dw_mmc           |   |-- sdio0@16010000
 blk           0  [   ]   mmc_blk               |   |   `-- [email protected]
 mmc           1  [ + ]   snps_dw_mmc           |   |-- sdio1@16020000
 blk           1  [   ]   mmc_blk               |   |   `-- [email protected]
 reset         0  [ + ]   jh7110-reset          |   |-- reset-controller
 ethernet      0  [ + ]   eth_eqos              |   |-- ethernet@16030000
 ethernet      1  [ + ]   eth_eqos              |   |-- ethernet@16040000
 pci           0  [ + ]   starfive_pcie         |   |-- pcie@2C000000
 pci           1  [ + ]   pci_bridge_drv        |   |   `-- pci_0:0.0
 nvme          0  [   ]   nvme                  |   |       `-- nvme#0
 syscon        3  [   ]   syscon                |   |-- dssctrl@295B0000
 video         0  [ + ]   starfive_dc8200       |   |-- dc8200@29400000
 vidconsole    0  [ + ]   vidconsole0           |   |   `-- [email protected]
 display       0  [ + ]   inno_hdmi_starfive    |   |-- hdmi@29590000
 video_brid    0  [ + ]   starfive_mipi_dsi     |   |-- mipi@295d0000
 dsi_host      0  [   ]   mipi_dsi_host         |   `-- dsi-host
 simple_bus    1  [ + ]   cpu_bus               |-- cpus
 cpu           0  [ + ]   riscv_cpu             |   |-- cpu@0
 cpu           1  [ + ]   riscv_cpu             |   |-- cpu@1
 timer         0  [ + ]   riscv_timer           |   |   `-- riscv_timer
 cpu           2  [ + ]   riscv_cpu             |   |-- cpu@2
 cpu           3  [ + ]   riscv_cpu             |   |-- cpu@3
 cpu           4  [ + ]   riscv_cpu             |   `-- cpu@4
 sysreset      0  [   ]   sbi-sysreset          `-- sbi-sysreset
@X547 X547 changed the title Only one of two of PCIe host controllers are recognized Only one of two PCIe host controllers are recognized Apr 29, 2023
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