[BPI-R4] Failed attempt: add NVMe support on uboot

As i said driver works for mt7986,but main difference is that mt7988 has 4 pcie controllers with 1 phy which is mapped to first (pcie2 0x11280000). It is unclear for me if all 4 controllers use this phy and how (splitting phy into x lanes and controller takes lane y fitself).

Also clock driver may miss anything or anything is wrong (as 3rd controller crashes on 24m clock)

Here is my interpretation:

1L_P0 means 1 lane port 0, so it should be 112800 with that usb phy

image

And the m.2 is isolated from the phy?

how do you read uboot devicetree with fdt? or have you loaded separate fdt and displayed this?

afaik fdt command is only for showing kernel devicetree and i get this in uboot when trying to show uboot devicetree (no external loaded):

BPI-R4> fdt list
No FDT memory address configured. Please configure
the FDT address via "fdt addr <address>" command.
Aborting!
BPI-R4>

btw. your reg-flags debug breaks continue because you miss curly brackets for the if statement

Added pinctrl as daniel told me that pinctrl is needed and phy not for the 0x11290000 (only for 0x11280000)

I use bdinfo to get the fdt address. Not sure if that one is correct but that is the only way for me to get the fdt.

1 Like

Sounds correct,sorry for missing this detail.

Added pinctrl ,but iā€™m not sure it is read because driver does currently nothing with itā€¦maybe uclass do because i found no driver using pinctrl in its probe yet.

Maybe you can try current codebase? I ordered an nvme to do tests myself (my others are used in other devices),should arrive on wednesday and then block i2c pins like you.

Maybe adding cmd_clk (for clk dump) and cmd_pinmux and try to find out if all is right so far?

1 Like

Here is the output for cmd_clk and cmd_pinmux

BPI-R4> clk dump
 Rate               Usecnt      Name
------------------------------------------
 40000000             0        |-- dummy40m
 208000000            0        |-- dummy208m
 12000000             0        |-- dummy12m
BPI-R4> pinmux list
| Device                        | Driver                        | Parent
| pinctrl@1001f000              | mt7988_pinctrl                | root_driver
BPI-R4> pinmux status -a
--------------------------
pinctrl@1001f000:
UART2_RXD : Aux Func.1
UART2_TXD : Aux Func.1
UART2_CTS : Aux Func.1
UART2_RTS : Aux Func.1
GPIO_A    : Aux Func.0
SMI_0_MDC : Aux Func.1
SMI_0_MDI : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PCIE30_1L : Aux Func.1
GPIO_P    : Aux Func.1
WATCHDOG  : Aux Func.1
GPIO_RESE : Aux Func.0
GPIO_WPS  : Aux Func.0
PMIC_I2C_ : Aux Func.0
PMIC_I2C_ : Aux Func.0
I2C_1_SCL : Aux Func.1
I2C_1_SDA : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PWMD1     : Aux Func.5
SPI0_WP   : Aux Func.1
SPI0_HOLD : Aux Func.1
SPI0_CSB  : Aux Func.1
SPI0_MISO : Aux Func.1
SPI0_MOSI : Aux Func.1
SPI0_CLK  : Aux Func.1
SPI1_CSB  : Aux Func.5
SPI1_MISO : Aux Func.5
SPI1_MOSI : Aux Func.5
SPI1_CLK  : Aux Func.5
SPI2_CLK  : Aux Func.5
SPI2_MOSI : Aux Func.5
SPI2_MISO : Aux Func.5
SPI2_CSB  : Aux Func.5
SPI2_HOLD : Aux Func.5
SPI2_WP   : Aux Func.5
EMMC_RSTB : Aux Func.1
EMMC_DSL  : Aux Func.1
EMMC_CK   : Aux Func.1
EMMC_CMD  : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
PCM_FS_I2 : Aux Func.1
PCM_CLK_I : Aux Func.1
PCM_DRX_I : Aux Func.1
PCM_DTX_I : Aux Func.1
PCM_MCK_I : Aux Func.1
UART0_RXD : Aux Func.1
UART0_TXD : Aux Func.1
PWMD0     : Aux Func.1
JTAG_JTDI : Aux Func.0
JTAG_JTDO : Aux Func.0
JTAG_JTMS : Aux Func.0
JTAG_JTCL : Aux Func.0
JTAG_JTRS : Aux Func.0
USB_DRV_V : Aux Func.1
LED_A     : Aux Func.0
LED_B     : Aux Func.0
LED_C     : Aux Func.0
LED_D     : Aux Func.0
LED_E     : Aux Func.0
GPIO_B    : Aux Func.1
GPIO_C    : Aux Func.1
I2C_2_SCL : Aux Func.1
I2C_2_SDA : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PCIE30_1L : Aux Func.1
USB_DRV_V : Aux Func.1
UART1_RXD : Aux Func.1
UART1_TXD : Aux Func.1
UART1_CTS : Aux Func.1
UART1_RTS : Aux Func.1
BPI-R4>

Not really sus to me. FYI, I remove the i2c pin blocker and the ssd does show up on OpenWRT.

BTW, I found a possible typo on the mediatek pinctrl drive (offical u-boot source)

pcie_p3_phy_i2 should be pcie_p3_phy_i2c? But fixing that ā€œerrorā€ does not make the ssd work.

Update: I was reading mt7988aā€™s datasheet and I notice there is a phy device address for every pcie port

so Iā€™m wondering: can we add a device such as

// not sure if the address below is correct
pcie3phy: pcie-phy@11e70000 {
	compatible = "mediatek,mt7988",
		 "mediatek,mt8195-pcie-phy";
	// not sure if the address below is correct
	reg = <0 0x11e70000 0 0x10000>;
	clocks = <&dummy_clk>;
	clock-names = "ref";
	#phy-cells = <1>;
	status = "okay";
};

not sure if this direction is correct, as Iā€™m not an expert on linux kernel and driver development and have minimum experience with embedded system.

Update: I think add some debugger to drivers/phy/phy-mtk-tphy.c would be a good idea?

as far as daniel told me phy is only needed for 11280000 pcie controller, not for the 11290000 one

so we should stay at pcie driver and look if pinctrl and clock are rightā€¦have you made above dumps after pci enum (which starts pcie driver and so enabling the clocks/pinctrl)?

As far as i understand pinmux should be right. Imho we have pcie n3/1L_1

All have func 1

1 Like

BTW, is adding debugger to pinctrl driver a good idea? Imho, using an oscilloscope to see the actual signal will be much better, or there is a better medium for debugging? Iā€™m running out of ideas currently. The only thing I can do now is comparing Linux mainlineā€™s driver with ubootā€™s

Iā€™m not sure if this gives more information than the pinmux command above except that it definitely run for the pcie pins.

Maybe we compare pinmux with linux,but it is not clear which pins are right in uboot as we have multiple pcie30_1L entries in uboot (no differences like in pinctrl driver). I received my nvme i ordered for testing on r4 but i need time for installing it and secure for i2c issueā€¦how did you found out the pins for i2c in hardware? M-key does not have i2c based on pindefine iā€™ve foundā€¦pins 56+58 are ā€œManufacturing pin. Use determined by vendor.ā€ I guess these are the pins you taped.

nvme works in the normal build, you all are just trying to get it working in u-boot though right? Iā€™m assuming to make Openwrt bootable via nvme?

Here is the source for the i2c issue. According to simonā€™s response and I test the setup without the tap, I guess the i2c wouldnā€™t be an issue?

The goal is to install uboot into SPI-NAND and from there to boot up OpenWRT in nvme. May be for extra: add nvme support on uboot and add ā€œInstall OpenWRT to nvmeā€ option to sdcard img

This requires pcie driver working with r4 what is what we trying here :slight_smile: before this point such option makes users think it is already working.

Ok you have this information from other user. Though you searched for these 2 pins location with datasheets. Already taped my ssd (not tried without because i will prevent harm to it)

edit: have inserted it now, booted up it is recognized and i1c is not down (i see my sfp) with precautionary taped pins :slight_smile:

it is a 500gb adata legend 740, a cheap one for testing such things :stuck_out_tongue:

cat /sys/kernel/debug/pinctrl/pinctrl-handles
Requested pin control handlers their pinmux maps:
device: 11000000.serial current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: uart0 (65) function: uart (12)
device: 11007000.spi current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: spi0 (43) function: spi (10)
    type: MUX_GROUP controller pinctrl_moore group: spi0_wp_hold (42) function: spi (10)
device: 11003000.i2c current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: i2c0_1 (27) function: i2c (5)
device: 11005000.i2c current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: i2c2_1 (93) function: i2c (5)
device: 11230000.mmc current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: sdcard (59) function: flash (11)
  state: state_uhs
    type: MUX_GROUP controller pinctrl_moore group: sdcard (59) function: flash (11)
device: 11290000.pcie current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: pcie_1l_1_pereset (40) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_clk_req_n3 (16) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_wake_n3_0 (15) function: pcie (7)
device: 11300000.pcie current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: pcie_2l_0_pereset (39) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_clk_req_n0_0 (14) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_wake_n0_0 (13) function: pcie (7)
device: 11310000.pcie current state: default
  state: default
    type: MUX_GROUP controller pinctrl_moore group: pcie_2l_1_pereset (94) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_clk_req_n1 (97) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_wake_n1_0 (96) function: pcie (7)
device: mt7530-0:00 current state: gbe-led
  state: gbe-led
    type: MUX_GROUP controller pinctrl_moore group: gbe0_led0 (81) function: led (15)
device: mt7530-0:01 current state: gbe-led
  state: gbe-led
    type: MUX_GROUP controller pinctrl_moore group: gbe1_led0 (82) function: led (15)
device: mt7530-0:02 current state: gbe-led
  state: gbe-led
    type: MUX_GROUP controller pinctrl_moore group: gbe2_led0 (83) function: led (15)
device: mt7530-0:03 current state: gbe-led
  state: gbe-led
    type: MUX_GROUP controller pinctrl_moore group: gbe3_led0 (84) function: led (15)
root@bpi-r4-v11:~# dmesg | grep pcie
[    1.652724] mtk-pcie-gen3 11280000.pcie: host bridge /soc/pcie@11280000 ranges:
[    1.660040] mtk-pcie-gen3 11280000.pcie: Parsing ranges property...
[    1.666304] mtk-pcie-gen3 11280000.pcie:       IO 0x0020000000..0x00201fffff -> 0x0020000000
[    1.674733] mtk-pcie-gen3 11280000.pcie:      MEM 0x0020200000..0x0027ffffff -> 0x0020200000
[    1.894888] mtk-pcie-gen3 11280000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x0)
[    1.903687] mtk-pcie-gen3: probe of 11280000.pcie failed with error -110
[    1.910905] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    1.918224] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    1.924487] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    1.932922] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x002fffffff -> 0x0028200000
[    2.088072] mtk-pcie-gen3 11290000.pcie: set IO trans window[0]: cpu_addr = 0x28000000, pci_addr = 0x28000000, size = 0x200000
[    2.099455] mtk-pcie-gen3 11290000.pcie: set MEM trans window[1]: cpu_addr = 0x28200000, pci_addr = 0x28200000, size = 0x200000
[    2.110918] mtk-pcie-gen3 11290000.pcie: set MEM trans window[2]: cpu_addr = 0x28400000, pci_addr = 0x28400000, size = 0x400000
[    2.122380] mtk-pcie-gen3 11290000.pcie: set MEM trans window[3]: cpu_addr = 0x28800000, pci_addr = 0x28800000, size = 0x800000
[    2.133842] mtk-pcie-gen3 11290000.pcie: set MEM trans window[4]: cpu_addr = 0x29000000, pci_addr = 0x29000000, size = 0x1000000
[    2.145389] mtk-pcie-gen3 11290000.pcie: set MEM trans window[5]: cpu_addr = 0x2a000000, pci_addr = 0x2a000000, size = 0x2000000
[    2.156937] mtk-pcie-gen3 11290000.pcie: set MEM trans window[6]: cpu_addr = 0x2c000000, pci_addr = 0x2c000000, size = 0x4000000
[    2.168735] mtk-pcie-gen3 11290000.pcie: PCI host bridge to bus 0002:00
[    2.417452] pcieport 0002:00:00.0: vgaarb: pci_notify
[    2.422535] pcieport 0002:00:00.0: assign IRQ: got 116
[    2.427669] pcieport 0002:00:00.0: enabling device (0000 -> 0002)
[    2.433758] pcieport 0002:00:00.0: enabling bus mastering
[    2.439529] mtk-pcie-gen3 11290000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11290c00 data 0
[    2.447963] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    2.456389] mtk-pcie-gen3 11290000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11290c00 data 2
[    2.464812] mtk-pcie-gen3 11290000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11290c00 data 3
[    2.473237] mtk-pcie-gen3 11290000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11290c00 data 4
[    2.481665] mtk-pcie-gen3 11290000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11290c00 data 5
[    2.490089] mtk-pcie-gen3 11290000.pcie: msi#0x6 address_hi 0x0 address_lo 0x11290c00 data 6
[    2.498514] mtk-pcie-gen3 11290000.pcie: msi#0x7 address_hi 0x0 address_lo 0x11290c00 data 7
[    2.506938] mtk-pcie-gen3 11290000.pcie: msi#0x8 address_hi 0x0 address_lo 0x11290c00 data 8
[    2.515363] mtk-pcie-gen3 11290000.pcie: msi#0x9 address_hi 0x0 address_lo 0x11290c00 data 9
[    2.523785] mtk-pcie-gen3 11290000.pcie: msi#0xa address_hi 0x0 address_lo 0x11290c00 data 10
[    2.532295] mtk-pcie-gen3 11290000.pcie: msi#0xb address_hi 0x0 address_lo 0x11290c00 data 11
[    2.540806] mtk-pcie-gen3 11290000.pcie: msi#0xc address_hi 0x0 address_lo 0x11290c00 data 12
[    2.549317] mtk-pcie-gen3 11290000.pcie: msi#0xd address_hi 0x0 address_lo 0x11290c00 data 13
[    2.557828] mtk-pcie-gen3 11290000.pcie: msi#0xe address_hi 0x0 address_lo 0x11290c00 data 14
[    2.566339] mtk-pcie-gen3 11290000.pcie: msi#0xf address_hi 0x0 address_lo 0x11290c00 data 15
[    2.574847] mtk-pcie-gen3 11290000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11290c00 data 16
[    2.583445] mtk-pcie-gen3 11290000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11290c00 data 17
[    2.592044] mtk-pcie-gen3 11290000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11290c00 data 18
[    2.600644] mtk-pcie-gen3 11290000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11290c00 data 19
[    2.609241] mtk-pcie-gen3 11290000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11290c00 data 20
[    2.617839] mtk-pcie-gen3 11290000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11290c00 data 21
[    2.626436] mtk-pcie-gen3 11290000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11290c00 data 22
[    2.635034] mtk-pcie-gen3 11290000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11290c00 data 23
[    2.643629] mtk-pcie-gen3 11290000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11290c00 data 24
[    2.652226] mtk-pcie-gen3 11290000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11290c00 data 25
[    2.660825] mtk-pcie-gen3 11290000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11290c00 data 26
[    2.669423] mtk-pcie-gen3 11290000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11290c00 data 27
[    2.678021] mtk-pcie-gen3 11290000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11290c00 data 28
[    2.686618] mtk-pcie-gen3 11290000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11290c00 data 29
[    2.695216] mtk-pcie-gen3 11290000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11290c00 data 30
[    2.703811] mtk-pcie-gen3 11290000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11290c00 data 31
[    2.712836] mtk-pcie-gen3 11290000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11290c00 data 0
[    2.721335] pcieport 0002:00:00.0: PME: Signaling with IRQ 117
[    2.727289] pcieport 0002:00:00.0: AER: enabled with IRQ 117
[    2.732971] pcieport 0002:00:00.0: save config 0x00: 0x798814c3
[    2.738888] pcieport 0002:00:00.0: save config 0x04: 0x00100406
[    2.744795] pcieport 0002:00:00.0: save config 0x08: 0x06040001
[    2.750706] pcieport 0002:00:00.0: save config 0x0c: 0x00010000
[    2.756615] pcieport 0002:00:00.0: save config 0x10: 0x28300004
[    2.762522] pcieport 0002:00:00.0: save config 0x14: 0x00000000
[    2.768430] pcieport 0002:00:00.0: save config 0x18: 0x00010100
[    2.774336] pcieport 0002:00:00.0: save config 0x1c: 0x000001f1
[    2.780245] pcieport 0002:00:00.0: save config 0x20: 0x28202820
[    2.786154] pcieport 0002:00:00.0: save config 0x24: 0x0001fff1
[    2.792060] pcieport 0002:00:00.0: save config 0x28: 0x00000000
[    2.797968] pcieport 0002:00:00.0: save config 0x2c: 0x00000000
[    2.803874] pcieport 0002:00:00.0: save config 0x30: 0x00000000
[    2.809782] pcieport 0002:00:00.0: save config 0x34: 0x00000080
[    2.815691] pcieport 0002:00:00.0: save config 0x38: 0x00000000
[    2.821597] pcieport 0002:00:00.0: save config 0x3c: 0x00020174
[    2.827534] pcieport 0002:00:00.0: vgaarb: pci_notify
[    2.857843] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    3.398406] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    3.406859] mtk-pcie-gen3 11290000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11290c00 data 2
[    3.415317] mtk-pcie-gen3 11290000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11290c00 data 3
[    3.423757] mtk-pcie-gen3 11290000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11290c00 data 4
[    3.432201] mtk-pcie-gen3 11290000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11290c00 data 5
[    3.460014] mtk-pcie-gen3 11300000.pcie: host bridge /soc/pcie@11300000 ranges:
[    3.467328] mtk-pcie-gen3 11300000.pcie: Parsing ranges property...
[    3.473592] mtk-pcie-gen3 11300000.pcie:       IO 0x0030000000..0x00301fffff -> 0x0030000000
[    3.482038] mtk-pcie-gen3 11300000.pcie:      MEM 0x0030200000..0x0037ffffff -> 0x0030200000
[    3.619772] mtk-pcie-gen3 11300000.pcie: set IO trans window[0]: cpu_addr = 0x30000000, pci_addr = 0x30000000, size = 0x200000
[    3.631153] mtk-pcie-gen3 11300000.pcie: set MEM trans window[1]: cpu_addr = 0x30200000, pci_addr = 0x30200000, size = 0x200000
[    3.642617] mtk-pcie-gen3 11300000.pcie: set MEM trans window[2]: cpu_addr = 0x30400000, pci_addr = 0x30400000, size = 0x400000
[    3.654079] mtk-pcie-gen3 11300000.pcie: set MEM trans window[3]: cpu_addr = 0x30800000, pci_addr = 0x30800000, size = 0x800000
[    3.665541] mtk-pcie-gen3 11300000.pcie: set MEM trans window[4]: cpu_addr = 0x31000000, pci_addr = 0x31000000, size = 0x1000000
[    3.677089] mtk-pcie-gen3 11300000.pcie: set MEM trans window[5]: cpu_addr = 0x32000000, pci_addr = 0x32000000, size = 0x2000000
[    3.688638] mtk-pcie-gen3 11300000.pcie: set MEM trans window[6]: cpu_addr = 0x34000000, pci_addr = 0x34000000, size = 0x4000000
[    3.700323] mtk-pcie-gen3 11300000.pcie: PCI host bridge to bus 0000:00
[    3.954553] pcieport 0000:00:00.0: vgaarb: pci_notify
[    3.959637] pcieport 0000:00:00.0: assign IRQ: got 124
[    3.964767] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    3.970860] pcieport 0000:00:00.0: enabling bus mastering
[    3.976605] mtk-pcie-gen3 11300000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11300c00 data 0
[    3.985039] mtk-pcie-gen3 11300000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11300c00 data 1
[    3.993463] mtk-pcie-gen3 11300000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11300c00 data 2
[    4.001892] mtk-pcie-gen3 11300000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11300c00 data 3
[    4.010317] mtk-pcie-gen3 11300000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11300c00 data 4
[    4.018743] mtk-pcie-gen3 11300000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11300c00 data 5
[    4.027168] mtk-pcie-gen3 11300000.pcie: msi#0x6 address_hi 0x0 address_lo 0x11300c00 data 6
[    4.035592] mtk-pcie-gen3 11300000.pcie: msi#0x7 address_hi 0x0 address_lo 0x11300c00 data 7
[    4.044014] mtk-pcie-gen3 11300000.pcie: msi#0x8 address_hi 0x0 address_lo 0x11300c00 data 8
[    4.052438] mtk-pcie-gen3 11300000.pcie: msi#0x9 address_hi 0x0 address_lo 0x11300c00 data 9
[    4.060862] mtk-pcie-gen3 11300000.pcie: msi#0xa address_hi 0x0 address_lo 0x11300c00 data 10
[    4.069373] mtk-pcie-gen3 11300000.pcie: msi#0xb address_hi 0x0 address_lo 0x11300c00 data 11
[    4.077884] mtk-pcie-gen3 11300000.pcie: msi#0xc address_hi 0x0 address_lo 0x11300c00 data 12
[    4.086395] mtk-pcie-gen3 11300000.pcie: msi#0xd address_hi 0x0 address_lo 0x11300c00 data 13
[    4.094906] mtk-pcie-gen3 11300000.pcie: msi#0xe address_hi 0x0 address_lo 0x11300c00 data 14
[    4.103414] mtk-pcie-gen3 11300000.pcie: msi#0xf address_hi 0x0 address_lo 0x11300c00 data 15
[    4.111925] mtk-pcie-gen3 11300000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11300c00 data 16
[    4.120525] mtk-pcie-gen3 11300000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11300c00 data 17
[    4.129124] mtk-pcie-gen3 11300000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11300c00 data 18
[    4.137722] mtk-pcie-gen3 11300000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11300c00 data 19
[    4.146320] mtk-pcie-gen3 11300000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11300c00 data 20
[    4.154918] mtk-pcie-gen3 11300000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11300c00 data 21
[    4.163513] mtk-pcie-gen3 11300000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11300c00 data 22
[    4.172111] mtk-pcie-gen3 11300000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11300c00 data 23
[    4.180709] mtk-pcie-gen3 11300000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11300c00 data 24
[    4.189307] mtk-pcie-gen3 11300000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11300c00 data 25
[    4.197904] mtk-pcie-gen3 11300000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11300c00 data 26
[    4.206503] mtk-pcie-gen3 11300000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11300c00 data 27
[    4.215100] mtk-pcie-gen3 11300000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11300c00 data 28
[    4.223695] mtk-pcie-gen3 11300000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11300c00 data 29
[    4.232293] mtk-pcie-gen3 11300000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11300c00 data 30
[    4.240893] mtk-pcie-gen3 11300000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11300c00 data 31
[    4.249892] mtk-pcie-gen3 11300000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11300c00 data 0
[    4.258392] pcieport 0000:00:00.0: PME: Signaling with IRQ 125
[    4.264322] pcieport 0000:00:00.0: AER: enabled with IRQ 125
[    4.270016] pcieport 0000:00:00.0: save config 0x00: 0x798814c3
[    4.275930] pcieport 0000:00:00.0: save config 0x04: 0x00100406
[    4.281836] pcieport 0000:00:00.0: save config 0x08: 0x06040001
[    4.287745] pcieport 0000:00:00.0: save config 0x0c: 0x00010000
[    4.293652] pcieport 0000:00:00.0: save config 0x10: 0x30500004
[    4.299563] pcieport 0000:00:00.0: save config 0x14: 0x00000000
[    4.305472] pcieport 0000:00:00.0: save config 0x18: 0x00010100
[    4.311378] pcieport 0000:00:00.0: save config 0x1c: 0x000001f1
[    4.317286] pcieport 0000:00:00.0: save config 0x20: 0x30403040
[    4.323191] pcieport 0000:00:00.0: save config 0x24: 0x30313021
[    4.329099] pcieport 0000:00:00.0: save config 0x28: 0x00000000
[    4.335007] pcieport 0000:00:00.0: save config 0x2c: 0x00000000
[    4.340913] pcieport 0000:00:00.0: save config 0x30: 0x00000000
[    4.346821] pcieport 0000:00:00.0: save config 0x34: 0x00000080
[    4.352727] pcieport 0000:00:00.0: save config 0x38: 0x00000000
[    4.358635] pcieport 0000:00:00.0: save config 0x3c: 0x0002017c
[    4.364572] pcieport 0000:00:00.0: vgaarb: pci_notify
[    4.369852] mtk-pcie-gen3 11310000.pcie: host bridge /soc/pcie@11310000 ranges:
[    4.377159] mtk-pcie-gen3 11310000.pcie: Parsing ranges property...
[    4.383422] mtk-pcie-gen3 11310000.pcie:       IO 0x0038000000..0x00381fffff -> 0x0038000000
[    4.391854] mtk-pcie-gen3 11310000.pcie:      MEM 0x0038200000..0x003fffffff -> 0x0038200000
[    4.530107] mtk-pcie-gen3 11310000.pcie: set IO trans window[0]: cpu_addr = 0x38000000, pci_addr = 0x38000000, size = 0x200000
[    4.541489] mtk-pcie-gen3 11310000.pcie: set MEM trans window[1]: cpu_addr = 0x38200000, pci_addr = 0x38200000, size = 0x200000
[    4.552952] mtk-pcie-gen3 11310000.pcie: set MEM trans window[2]: cpu_addr = 0x38400000, pci_addr = 0x38400000, size = 0x400000
[    4.564413] mtk-pcie-gen3 11310000.pcie: set MEM trans window[3]: cpu_addr = 0x38800000, pci_addr = 0x38800000, size = 0x800000
[    4.575874] mtk-pcie-gen3 11310000.pcie: set MEM trans window[4]: cpu_addr = 0x39000000, pci_addr = 0x39000000, size = 0x1000000
[    4.587422] mtk-pcie-gen3 11310000.pcie: set MEM trans window[5]: cpu_addr = 0x3a000000, pci_addr = 0x3a000000, size = 0x2000000
[    4.598969] mtk-pcie-gen3 11310000.pcie: set MEM trans window[6]: cpu_addr = 0x3c000000, pci_addr = 0x3c000000, size = 0x4000000
[    4.610636] mtk-pcie-gen3 11310000.pcie: PCI host bridge to bus 0001:00
[    4.864551] pcieport 0001:00:00.0: vgaarb: pci_notify
[    4.869633] pcieport 0001:00:00.0: assign IRQ: got 127
[    4.874763] pcieport 0001:00:00.0: enabling device (0000 -> 0002)
[    4.880855] pcieport 0001:00:00.0: enabling bus mastering
[    4.886594] mtk-pcie-gen3 11310000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11310c00 data 0
[    4.895028] mtk-pcie-gen3 11310000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11310c00 data 1
[    4.903452] mtk-pcie-gen3 11310000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11310c00 data 2
[    4.911880] mtk-pcie-gen3 11310000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11310c00 data 3
[    4.920305] mtk-pcie-gen3 11310000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11310c00 data 4
[    4.928730] mtk-pcie-gen3 11310000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11310c00 data 5
[    4.937154] mtk-pcie-gen3 11310000.pcie: msi#0x6 address_hi 0x0 address_lo 0x11310c00 data 6
[    4.945578] mtk-pcie-gen3 11310000.pcie: msi#0x7 address_hi 0x0 address_lo 0x11310c00 data 7
[    4.953999] mtk-pcie-gen3 11310000.pcie: msi#0x8 address_hi 0x0 address_lo 0x11310c00 data 8
[    4.962423] mtk-pcie-gen3 11310000.pcie: msi#0x9 address_hi 0x0 address_lo 0x11310c00 data 9
[    4.970848] mtk-pcie-gen3 11310000.pcie: msi#0xa address_hi 0x0 address_lo 0x11310c00 data 10
[    4.979358] mtk-pcie-gen3 11310000.pcie: msi#0xb address_hi 0x0 address_lo 0x11310c00 data 11
[    4.987870] mtk-pcie-gen3 11310000.pcie: msi#0xc address_hi 0x0 address_lo 0x11310c00 data 12
[    4.996381] mtk-pcie-gen3 11310000.pcie: msi#0xd address_hi 0x0 address_lo 0x11310c00 data 13
[    5.004892] mtk-pcie-gen3 11310000.pcie: msi#0xe address_hi 0x0 address_lo 0x11310c00 data 14
[    5.013400] mtk-pcie-gen3 11310000.pcie: msi#0xf address_hi 0x0 address_lo 0x11310c00 data 15
[    5.021911] mtk-pcie-gen3 11310000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11310c00 data 16
[    5.030511] mtk-pcie-gen3 11310000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11310c00 data 17
[    5.039109] mtk-pcie-gen3 11310000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11310c00 data 18
[    5.047708] mtk-pcie-gen3 11310000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11310c00 data 19
[    5.056306] mtk-pcie-gen3 11310000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11310c00 data 20
[    5.064903] mtk-pcie-gen3 11310000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11310c00 data 21
[    5.073498] mtk-pcie-gen3 11310000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11310c00 data 22
[    5.082095] mtk-pcie-gen3 11310000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11310c00 data 23
[    5.090698] mtk-pcie-gen3 11310000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11310c00 data 24
[    5.099297] mtk-pcie-gen3 11310000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11310c00 data 25
[    5.107897] mtk-pcie-gen3 11310000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11310c00 data 26
[    5.116495] mtk-pcie-gen3 11310000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11310c00 data 27
[    5.125094] mtk-pcie-gen3 11310000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11310c00 data 28
[    5.133689] mtk-pcie-gen3 11310000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11310c00 data 29
[    5.142288] mtk-pcie-gen3 11310000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11310c00 data 30
[    5.150888] mtk-pcie-gen3 11310000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11310c00 data 31
[    5.159907] mtk-pcie-gen3 11310000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11310c00 data 0
[    5.168401] pcieport 0001:00:00.0: PME: Signaling with IRQ 128
[    5.174335] pcieport 0001:00:00.0: AER: enabled with IRQ 128
[    5.180028] pcieport 0001:00:00.0: save config 0x00: 0x798814c3
[    5.185941] pcieport 0001:00:00.0: save config 0x04: 0x00100406
[    5.191848] pcieport 0001:00:00.0: save config 0x08: 0x06040001
[    5.197757] pcieport 0001:00:00.0: save config 0x0c: 0x00010000
[    5.203663] pcieport 0001:00:00.0: save config 0x10: 0x38500004
[    5.209573] pcieport 0001:00:00.0: save config 0x14: 0x00000000
[    5.215482] pcieport 0001:00:00.0: save config 0x18: 0x00010100
[    5.221387] pcieport 0001:00:00.0: save config 0x1c: 0x000001f1
[    5.227296] pcieport 0001:00:00.0: save config 0x20: 0x38403840
[    5.233202] pcieport 0001:00:00.0: save config 0x24: 0x38313821
[    5.239110] pcieport 0001:00:00.0: save config 0x28: 0x00000000
[    5.245019] pcieport 0001:00:00.0: save config 0x2c: 0x00000000
[    5.250925] pcieport 0001:00:00.0: save config 0x30: 0x00000000
[    5.256833] pcieport 0001:00:00.0: save config 0x34: 0x00000080
[    5.262739] pcieport 0001:00:00.0: save config 0x38: 0x00000000
[    5.268650] pcieport 0001:00:00.0: save config 0x3c: 0x0002017f
[    5.274586] pcieport 0001:00:00.0: vgaarb: pci_notify
[   15.705036] mtk-pcie-gen3 11300000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11300c00 data 1
[   15.713629] mtk-pcie-gen3 11310000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11310c00 data 1
root@bpi-r4-v11:~# cat /sys/kernel/debug/pinctrl/pinctrl-maps
Pinctrl maps:
device 11000000.serial
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group uart0
function uart
device 11007000.spi
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group spi0
function spi
device 11007000.spi
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group spi0_wp_hold
function spi
device 11003000.i2c
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group i2c0_1
function i2c
device 11005000.i2c
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group i2c2_1
function i2c
device 11230000.mmc
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group sdcard
function flash
device 11230000.mmc
state state_uhs
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group sdcard
function flash
device 11290000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_1l_1_pereset
function pcie
device 11290000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_clk_req_n3
function pcie
device 11290000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_wake_n3_0
function pcie
device 11300000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_2l_0_pereset
function pcie
device 11300000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_clk_req_n0_0
function pcie
device 11300000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_wake_n0_0
function pcie
device 11310000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_2l_1_pereset
function pcie
device 11310000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_clk_req_n1
function pcie
device 11310000.pcie
state default
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group pcie_wake_n1_0
function pcie
device mt7530-0:00
state gbe-led
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group gbe0_led0
function led
device mt7530-0:01
state gbe-led
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group gbe1_led0
function led
device mt7530-0:02
state gbe-led
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group gbe2_led0
function led
device mt7530-0:03
state gbe-led
type MUX_GROUP (2)
controlling device 1001f000.pinctrl
group gbe3_led0
function led
     cat /sys/kernel/debug/clk/clk_summary
                                 enable  prepare  protect                                duty  hardware                            connection
   clock                          count    count    count        rate   accuracy phase  cycle    enable   consumer                         id
---------------------------------------------------------------------------------------------------------------------------------------------
 clkxtal                             9       9        0        40000000    0          0     50000      Y   deviceless                      no_connection_id
    top_xtal                         14      14       0        40000000    0          0     50000      Y      cpu0                            intermediate
                                                                                                              deviceless                      no_connection_id
       xfipll_pll                    0       0        0        156250000   0          0     50000      Y         deviceless                      no_connection_id
          xfipll_pll_en              0       0        0        156250000   0          0     50000      N            11f30000.phy                    xfipll
                                                                                                                    11f20000.phy                    xfipll
                                                                                                                    deviceless                      no_connection_id
       sgm1_rx_en                    0       0        0        40000000    0          0     50000      N         10070000.syscon:pcs             sgmii_rx
                                                                                                                 deviceless                      no_connection_id
       sgm1_tx_en                    0       0        0        40000000    0          0     50000      N         10070000.syscon:pcs             sgmii_tx
                                                                                                                 deviceless                      no_connection_id
       sgm0_rx_en                    0       0        0        40000000    0          0     50000      N         10060000.syscon:pcs             sgmii_rx
                                                                                                                 deviceless                      no_connection_id
       sgm0_tx_en                    0       0        0        40000000    0          0     50000      N         10060000.syscon:pcs             sgmii_tx
                                                                                                                 deviceless                      no_connection_id
       ethdma_gp3_en                 1       1        0        40000000    0          0     50000      Y         15100000.ethernet               gp3
                                                                                                                 deviceless                      no_connection_id
       ethdma_gp1_en                 1       1        0        40000000    0          0     50000      Y         15100000.ethernet               gp1
                                                                                                                 deviceless                      no_connection_id
       ethdma_gp2_en                 1       1        0        40000000    0          0     50000      Y         15100000.ethernet               gp2
                                                                                                                 deviceless                      no_connection_id
       ethdma_xgp3_en                1       1        0        40000000    0          0     50000      Y         15100000.ethernet               xgp3
                                                                                                                 deviceless                      no_connection_id
       ethdma_xgp2_en                1       1        0        40000000    0          0     50000      Y         15100000.ethernet               xgp2
                                                                                                                 deviceless                      no_connection_id
       ethdma_xgp1_en                1       1        0        40000000    0          0     50000      Y         15100000.ethernet               xgp1
                                                                                                                 deviceless                      no_connection_id
       infra_pcie_pipe_ck_p3         1       1        0        40000000    0          0     50000      Y         pcie@11290000                   no_connection_id
                                                                                                                 deviceless                      no_connection_id
       infra_pcie_pipe_ck_p2         0       0        0        40000000    0          0     50000      N         deviceless                      no_connection_id
       infra_pcie_pipe_ck_p1         1       1        0        40000000    0          0     50000      Y         pcie@11310000                   no_connection_id
                                                                                                                 deviceless                      no_connection_id
       infra_pcie_pipe_ck_p0         1       1        0        40000000    0          0     50000      Y         pcie@11300000                   no_connection_id
                                                                                                                 deviceless                      no_connection_id
       infra_usb_utmi_ck_p1          1       1        0        40000000    0          0     50000      Y         phy-soc:[email protected]         ref
                                                                                                                 deviceless                      no_connection_id
       infra_usb_utmi                0       0        0        40000000    0          0     50000      N         phy-soc:[email protected]         ref
                                                                                                                 deviceless                      no_connection_id
       infra_usb_ck_p1               1       1        0        40000000    0          0     50000      Y         11200000.usb                    ref_ck
                                                                                                                 deviceless                      no_connection_id
       infra_usb_ref                 0       0        0        40000000    0          0     50000      N         deviceless                      no_connection_id
       uart_sel                      1       1        0        40000000    0          0     50000      Y         11000000.serial                 baud
                                                                                                                 deviceless                      no_connection_id
          infra_mux_uart2_sel        0       0        0        40000000    0          0     50000      Y            deviceless                      no_connection_id
             infra_f_52m_uart2       0       0        0        40000000    0          0     50000      N               deviceless                      no_connection_id
          infra_mux_uart1_sel        0       0        0        40000000    0          0     50000      Y            deviceless                      no_connection_id
             infra_f_52m_uart1       0       0        0        40000000    0          0     50000      N               deviceless                      no_connection_id
          infra_mux_uart0_sel        1       1        0        40000000    0          0     50000      Y            deviceless                      no_connection_id
             infra_f_52m_uart0       1       1        0        40000000    0          0     50000      Y               11000000.serial                 bus
                                                                                                                       deviceless                      no_connection_id
       top_rtc_32p7k                 0       0        0        32786       0          0     50000      Y         deviceless                      no_connection_id
       top_rtc_32k                   1       1        0        32000       0          0     50000      Y         deviceless                      no_connection_id
          infra_f_frtc               1       1        0        32000       0          0     50000      Y            deviceless                      no_connection_id
       top_xtal_d2                   0       0        0        20000000    0          0     50000      Y         deviceless                      no_connection_id
          pextp_sel                  0       0        0        20000000    0          0     50000      N            deviceless                      no_connection_id
          da_sel                     0       0        0        20000000    0          0     50000      N            deviceless                      no_connection_id
          ckm_sel                    0       0        0        20000000    0          0     50000      N            deviceless                      no_connection_id
    msdcpll                          0       0        0        400000000   0          0     50000      Y      deviceless                      no_connection_id
       emmc_400m_sel                 0       0        0        400000000   0          0     50000      N         deviceless                      no_connection_id
          infra_f_fmsdc400           0       0        0        400000000   0          0     50000      N            11230000.mmc                    source
                                                                                                                    deviceless                      no_connection_id
    usxgmiipll                       0       0        0        644531250   0          0     50000      Y      deviceless                      no_connection_id
    ccipll2_b                        1       1        0        900000000   0          0     50000      Y      deviceless                      no_connection_id
       mcu_bus_div_sel               1       1        0        900000000   0          0     50000      Y         deviceless                      no_connection_id
    arm_b                            2       2        0        1500000000  0          0     50000      Y      deviceless                      no_connection_id
       mcu_arm_div_sel               2       2        0        1500000000  0          0     50000      Y         cpu0                            no_connection_id
                                                                                                                 cpu0                            cpu
                                                                                                                 deviceless                      no_connection_id
    sgmpll                           2       2        0        325000000   0          0     50000      Y      deviceless                      no_connection_id
       macsec_sel                    0       0        0        325000000   0          0     50000      N         deviceless                      no_connection_id
       sgm_1_sel                     1       1        0        325000000   0          0     50000      Y         10070000.syscon:pcs             sgmii_sel
                                                                                                                 deviceless                      no_connection_id
       sgm_0_sel                     1       1        0        325000000   0          0     50000      Y         10060000.syscon:pcs             sgmii_sel
                                                                                                                 deviceless                      no_connection_id
    wedmcupll                        0       0        0        208000000   0          0     50000      Y      deviceless                      no_connection_id
    net2pll                          8       8        0        800000000   0          0     50000      Y      deviceless                      no_connection_id
       ck_npu_sel                    0       0        0        800000000   0          0     50000      N         deviceless                      no_connection_id
       npu_tops_sel                  0       0        0        800000000   0          0     50000      N         deviceless                      no_connection_id
       netsys_mcu_sel                3       3        0        800000000   0          0     50000      Y         deviceless                      no_connection_id
          ethwarp_wocpu0_en          1       1        0        800000000   0          0     50000      Y            15100000.ethernet               ethwarp_wocpu0
                                                                                                                    deviceless                      no_connection_id
          ethwarp_wocpu1_en          1       1        0        800000000   0          0     50000      Y            15100000.ethernet               ethwarp_wocpu1
                                                                                                                    deviceless                      no_connection_id
          ethwarp_wocpu2_en          1       1        0        800000000   0          0     50000      Y            15100000.ethernet               ethwarp_wocpu2
                                                                                                                    deviceless                      no_connection_id
       netsys_2x_sel                 1       1        0        800000000   0          0     50000      Y         deviceless                      no_connection_id
          ethdma_fe_en               1       1        0        800000000   0          0     50000      Y            15100000.ethernet               fe
                                                                                                                    deviceless                      no_connection_id
       net2pll_d8                    0       0        0        100000000   0          0     50000      Y         deviceless                      no_connection_id
          da_xtp_glb_p3_sel          0       0        0        100000000   0          0     50000      N            deviceless                      no_connection_id
          da_xtp_glb_p2_sel          0       0        0        100000000   0          0     50000      N            deviceless                      no_connection_id
          da_xtp_glb_p1_sel          0       0        0        100000000   0          0     50000      N            deviceless                      no_connection_id
          da_xtp_glb_p0_sel          0       0        0        100000000   0          0     50000      N            deviceless                      no_connection_id
       net2pll_d6                    3       3        0        133333333   0          0     50000      Y         deviceless                      no_connection_id
          pextp_tl_p3_sel            1       1        0        133333333   0          0     50000      Y            deviceless                      no_connection_id
             infra_pcie_gfmux_tl_o_p3_sel 1       1        0        133333333   0          0     50000      Y               deviceless                      no_connection_id
                infra_pcie_gfmux_tl_ck_p3 1       1        0        133333333   0          0     50000      Y                  pcie@11290000                   no_connection_id
                                                                                                                          deviceless                      no_connection_id
          pextp_tl_p2_sel            0       0        0        133333333   0          0     50000      N            deviceless                      no_connection_id
             infra_pcie_gfmux_tl_o_p2_sel 0       0        0        133333333   0          0     50000      Y               deviceless                      no_connection_id
                infra_pcie_gfmux_tl_ck_p2 0       0        0        133333333   0          0     50000      N                  deviceless                      no_connection_id
          pextp_tl_p1_sel            1       1        0        133333333   0          0     50000      Y            deviceless                      no_connection_id
             infra_pcie_gfmux_tl_o_p1_sel 1       1        0        133333333   0          0     50000      Y               deviceless                      no_connection_id
                infra_pcie_gfmux_tl_ck_p1 1       1        0        133333333   0          0     50000      Y                  pcie@11310000                   no_connection_id
                                                                                                                          deviceless                      no_connection_id
          pextp_tl_sel               1       1        0        133333333   0          0     50000      Y            deviceless                      no_connection_id
             infra_pcie_gfmux_tl_o_p0_sel 1       1        0        133333333   0          0     50000      Y               deviceless                      no_connection_id
                infra_pcie_gfmux_tl_ck_p0 1       1        0        133333333   0          0     50000      Y                  pcie@11300000                   no_connection_id
                                                                                                                          deviceless                      no_connection_id
       net2pll_d4_d8                 1       1        0        25000000    0          0     50000      Y         deviceless                      no_connection_id
          eth_mii_sel                1       1        0        25000000    0          0     50000      Y            15100000.ethernet               top_eth_mii_sel
                                                                                                                    deviceless                      no_connection_id
       net2pll_d4_d4                 1       1        0        50000000    0          0     50000      Y         deviceless                      no_connection_id
          eth_refck_50m_sel          1       1        0        50000000    0          0     50000      Y            15100000.ethernet               top_eth_refck_50m_sel
                                                                                                                    deviceless                      no_connection_id
       net2pll_d4                    1       1        0        200000000   0          0     50000      Y         deviceless                      no_connection_id
          eth_sys_200m_sel           1       1        0        200000000   0          0     50000      Y            15100000.ethernet               top_eth_sys_200m_sel
                                                                                                                    deviceless                      no_connection_id
       net2pll_d2                    2       2        0        400000000   0          0     50000      Y         deviceless                      no_connection_id
          netsys_warp_sel            1       1        0        400000000   0          0     50000      Y            15100000.ethernet               top_netsys_warp_sel
                                                                                                                    deviceless                      no_connection_id
          netsys_tops_400m_sel       0       0        0        400000000   0          0     50000      N            deviceless                      no_connection_id
          netsys_sel                 1       1        0        400000000   0          0     50000      Y            15100000.ethernet               top_netsys_sel
                                                                                                                    deviceless                      no_connection_id
    net1pll                          7       7        0        2500000000  0          0     50000      Y      deviceless                      no_connection_id
       net1pll_d8_d16                0       0        0        19531250    0          0     50000      Y         deviceless                      no_connection_id
       net1pll_d8_d8                 1       1        0        39062500    0          0     50000      Y         deviceless                      no_connection_id
          eth_xgmii_sel              1       1        0        39062500    0          0     50000      Y            15100000.ethernet               top_eth_xgmii_sel
                                                                                                                    deviceless                      no_connection_id
       net1pll_d8_d4                 4       4        0        78125000    0          0     50000      Y         deviceless                      no_connection_id
          sgm_sbus_1_sel             1       1        0        78125000    0          0     50000      Y            deviceless                      no_connection_id
          sgm_sbus_0_sel             1       1        0        78125000    0          0     50000      Y            deviceless                      no_connection_id
          usxgmii_sbus_1_sel         1       1        0        78125000    0          0     50000      Y            10081000.pcs                    no_connection_id
                                                                                                                    deviceless                      no_connection_id
          usxgmii_sbus_0_sel         1       1        0        78125000    0          0     50000      Y            10080000.pcs                    no_connection_id
                                                                                                                    deviceless                      no_connection_id
       net1pll_d8_d2                 2       2        0        156250000   0          0     50000      Y         deviceless                      no_connection_id
          sysaxi_sel                 9       10       0        156250000   0          0     50000      Y            deviceless                      no_connection_id
             infra_133m_pcie_ck_p3   1       1        0        156250000   0          0     50000      Y               pcie@11290000                   no_connection_id
                                                                                                                       deviceless                      no_connection_id
             infra_133m_pcie_ck_p2   0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_133m_pcie_ck_p1   1       1        0        156250000   0          0     50000      Y               pcie@11310000                   no_connection_id
                                                                                                                       deviceless                      no_connection_id
             infra_133m_pcie_ck_p0   1       1        0        156250000   0          0     50000      Y               pcie@11300000                   no_connection_id
                                                                                                                       deviceless                      no_connection_id
             infra_66m_usb_hck_ck_p1 1       1        0        156250000   0          0     50000      Y               11200000.usb                    mcu_ck
                                                                                                                       deviceless                      no_connection_id
             infra_66m_usb_hck       0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_133m_usb_hck_ck_p1 1       1        0        156250000   0          0     50000      Y               11200000.usb                    dma_ck
                                                                                                                       deviceless                      no_connection_id
             infra_133m_usb_hck      0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_i2c_x16w_pck_ck_p1 0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_i2c_x16w_mck_ck_p1 0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_133m_cpum_bck  0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_66m_msdc_0_hck    0       0        0        156250000   0          0     50000      N               11230000.mmc                    axi_cg
                                                                                                                       deviceless                      no_connection_id
             infra_hf_133m_msdc_0_hck 0       0        0        156250000   0          0     50000      N               11230000.mmc                    ahb_cg
                                                                                                                       deviceless                      no_connection_id
             infra_hf_66m_flashif_axi 0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_66m_spi2_hck   0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_66m_spi1_hck   0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_66m_spi0_hck   1       1        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
             infra_hf_66m_nfi_hck    1       1        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
             infra_hf_66m_sej_bck    0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_66m_ap_dma_bck    0       2        0        156250000   0          0     50000      N               11005000.i2c                    dma
                                                                                                                       11003000.i2c                    dma
                                                                                                                       deviceless                      no_connection_id
             infra_hf_133m_dbg_ackm  1       1        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
             infra_66m_aud_slv_bck   0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_133m_cqdma_bck 0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_66m_pwm_hck    0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
             infra_hf_66m_gpt_bck    0       0        0        156250000   0          0     50000      N               deviceless                      no_connection_id
          pwm_sel                    0       0        0        156250000   0          0     50000      N            deviceless                      no_connection_id
             infra_pwm_ck8_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck8 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_ck7_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck7 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_ck6_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck6 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_ck5_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck5 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_ck4_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck4 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_ck3_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck3 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_ck2_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck2 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_ck1_sel       0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_ck1 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
             infra_pwm_sel           0       0        0        156250000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_66m_pwm_bck 0       0        0        156250000   0          0     50000      N                  deviceless                      no_connection_id
          axi_infra_sel              1       1        0        156250000   0          0     50000      Y            deviceless                      no_connection_id
       net1pll_d8                    0       0        0        312500000   0          0     50000      Y         deviceless                      no_connection_id
       net1pll_d5_d4                 3       4        0        125000000   0          0     50000      Y         deviceless                      no_connection_id
          usb_xhci_p1_sel            1       1        0        125000000   0          0     50000      Y            deviceless                      no_connection_id
             infra_usb_xhci_ck_p1    1       1        0        125000000   0          0     50000      Y               11200000.usb                    xhci_ck
                                                                                                                       deviceless                      no_connection_id
          usb_xhci_sel               0       0        0        125000000   0          0     50000      N            deviceless                      no_connection_id
             infra_usb_xhci          0       0        0        125000000   0          0     50000      N               deviceless                      no_connection_id
          usb_sys_p1_sel             1       1        0        125000000   0          0     50000      Y            deviceless                      no_connection_id
             infra_usb_sys_ck_p1     1       1        0        125000000   0          0     50000      Y               11200000.usb                    sys_ck
                                                                                                                       deviceless                      no_connection_id
          usb_sys_sel                0       0        0        125000000   0          0     50000      N            deviceless                      no_connection_id
             infra_usb_sys           0       0        0        125000000   0          0     50000      N               deviceless                      no_connection_id
          i2c_sel                    0       1        0        125000000   0          0     50000      N            deviceless                      no_connection_id
             infra_i2c_bck           0       2        0        125000000   0          0     50000      N               11005000.i2c                    main
                                                                                                                       11003000.i2c                    main
                                                                                                                       deviceless                      no_connection_id
          spinfi_sel                 0       0        0        125000000   0          0     50000      N            deviceless                      no_connection_id
             infra_f_fspinfi         0       0        0        125000000   0          0     50000      N               deviceless                      no_connection_id
          eth_gmii_sel               1       1        0        125000000   0          0     50000      Y            15100000.ethernet               top_eth_gmii_sel
                                                                                                                    deviceless                      no_connection_id
       net1pll_d5_d2                 3       3        0        250000000   0          0     50000      Y         deviceless                      no_connection_id
          netsys_ppefb_250m_sel      1       1        0        250000000   0          0     50000      Y            15100000.ethernet               top_netsys_ppefb_250m_sel
                                                                                                                    deviceless                      no_connection_id
          netsys_sync_250m_sel       1       1        0        250000000   0          0     50000      Y            15100000.ethernet               top_netsys_sync_250m_sel
                                                                                                                    deviceless                      no_connection_id
          eth_sys_sel                1       1        0        250000000   0          0     50000      Y            15100000.ethernet               top_eth_sys_sel
                                                                                                                    deviceless                      no_connection_id
          pcie_mbist_250m_sel        0       0        0        250000000   0          0     50000      N            deviceless                      no_connection_id
          emmc_250m_sel              0       0        0        250000000   0          0     50000      N            deviceless                      no_connection_id
             infra_f_fmsdc2_hck      0       0        0        250000000   0          0     50000      N               11230000.mmc                    hclk
                                                                                                                       deviceless                      no_connection_id
       net1pll_d5                    1       1        0        500000000   0          0     50000      Y         deviceless                      no_connection_id
          bus_tops_sel               0       0        0        500000000   0          0     50000      N            deviceless                      no_connection_id
          netsys_500m_sel            1       1        0        500000000   0          0     50000      Y            15100000.ethernet               top_netsys_500m_sel
                                                                                                                    deviceless                      no_connection_id
       net1pll_d4                    1       1        0        625000000   0          0     50000      Y         deviceless                      no_connection_id
          mcusys_backup_625m_sel     0       0        0        625000000   0          0     50000      N            deviceless                      no_connection_id
          netsys_gsw_sel             1       1        0        625000000   0          0     50000      Y            deviceless                      no_connection_id
             ethdma_esw_en           1       1        0        625000000   0          0     50000      Y               15100000.ethernet               esw
                                                                                                                       deviceless                      no_connection_id
    apll2                            0       0        0        196608000   0          0     50000      Y      deviceless                      no_connection_id
       aud_l_sel                     0       0        0        196608000   0          0     50000      N         deviceless                      no_connection_id
          infra_f_faud_l             0       0        0        196608000   0          0     50000      N            deviceless                      no_connection_id
       aud_sel                       0       0        0        196608000   0          0     50000      N         deviceless                      no_connection_id
          aud_i2s_m                  0       0        0        24576000    0          0     50000      N            deviceless                      no_connection_id
       apll2_d4                      0       0        0        49152000    0          0     50000      Y         deviceless                      no_connection_id
          a_tuner_sel                0       0        0        49152000    0          0     50000      N            deviceless                      no_connection_id
             infra_f_faud_eg2        0       0        0        49152000    0          0     50000      N               deviceless                      no_connection_id
          a1sys_sel                  0       0        0        49152000    0          0     50000      N            deviceless                      no_connection_id
             infra_f_aud_aud         0       0        0        49152000    0          0     50000      N               deviceless                      no_connection_id
    mmpll                            2       2        0        720000000   0          0     50000      Y      deviceless                      no_connection_id
       netsys_pao_2x_sel             1       1        0        720000000   0          0     50000      Y         15100000.ethernet               top_netsys_pao_2x_sel
                                                                                                                 deviceless                      no_connection_id
       mmpll_d8                      0       0        0        90000000    0          0     50000      Y         deviceless                      no_connection_id
       mmpll_d6_d2                   0       0        0        60000000    0          0     50000      Y         deviceless                      no_connection_id
       mmpll_d4                      0       0        0        180000000   0          0     50000      Y         deviceless                      no_connection_id
          nfi1x_sel                  0       0        0        180000000   0          0     50000      N            deviceless                      no_connection_id
             infra_hf_fbist2fpc      0       0        0        180000000   0          0     50000      N               deviceless                      no_connection_id
             infra_f_fnfi            0       0        0        180000000   0          0     50000      N               deviceless                      no_connection_id
       mmpll_d3_d5                   2       2        0        48000000    0          0     50000      Y         deviceless                      no_connection_id
          usb_frmcnt_p1_sel          1       1        0        48000000    0          0     50000      Y            deviceless                      no_connection_id
             infra_usb_frmcnt_ck_p1  1       1        0        48000000    0          0     50000      Y               deviceless                      no_connection_id
          usb_frmcnt_sel             1       1        0        48000000    0          0     50000      Y            deviceless                      no_connection_id
             infra_usb_frmcnt        1       1        0        48000000    0          0     50000      Y               deviceless                      no_connection_id
       mmpll_d2                      0       0        0        360000000   0          0     50000      Y         deviceless                      no_connection_id
    mpll                             3       3        0        416000000   0          0     50000      Y      deviceless                      no_connection_id
       mpll_d8_d2                    3       3        0        26000000    0          0     50000      Y         deviceless                      no_connection_id
          tops_p2_26m_sel            0       0        0        26000000    0          0     50000      N            deviceless                      no_connection_id
          pextp_p3_sel               0       0        0        26000000    0          0     50000      N            deviceless                      no_connection_id
          pextp_p2_sel               0       0        0        26000000    0          0     50000      N            deviceless                      no_connection_id
          pextp_p1_sel               0       0        0        26000000    0          0     50000      N            deviceless                      no_connection_id
          pextp_p0_sel               0       0        0        26000000    0          0     50000      N            deviceless                      no_connection_id
          csw_infra_f26m_sel         6       6        0        26000000    0          0     50000      Y            deviceless                      no_connection_id
             infra_f_26m_adc_bck     0       0        0        26000000    0          0     50000      N               deviceless                      no_connection_id
                infra_f_frc_adc      0       0        0        26000000    0          0     50000      N                  deviceless                      no_connection_id
             infra_hf_26m_therm_system 1       1        0        26000000    0          0     50000      Y               1100a000.lvts                   no_connection_id
                                                                                                                       deviceless                      no_connection_id
             infra_pre_ck_sej_f13m   0       0        0        26000000    0          0     50000      N               deviceless                      no_connection_id
             infra_dramc_f26m        1       1        0        26000000    0          0     50000      Y               deviceless                      no_connection_id
             infra_f_faud_26m        0       0        0        26000000    0          0     50000      N               deviceless                      no_connection_id
             infra_pcie_peri_ck_26m_ck_p3 1       1        0        26000000    0          0     50000      Y               pcie@11290000                   no_connection_id
                                                                                                                       deviceless                      no_connection_id
             infra_pcie_peri_ck_26m_ck_p2 0       0        0        26000000    0          0     50000      N               deviceless                      no_connection_id
             infra_pcie_peri_ck_26m_ck_p1 1       1        0        26000000    0          0     50000      Y               pcie@11310000                   no_connection_id
                                                                                                                       deviceless                      no_connection_id
             infra_pcie_peri_ck_26m_ck_p0 1       1        0        26000000    0          0     50000      Y               pcie@11300000                   no_connection_id
                                                                                                                       deviceless                      no_connection_id
          dramc_sel                  1       1        0        26000000    0          0     50000      Y            deviceless                      no_connection_id
          xfi_phy_1_xtal_sel         0       0        0        26000000    0          0     50000      N            11f30000.phy                    topxtal
                                                                                                                    deviceless                      no_connection_id
          xfi_phy_0_xtal_sel         0       0        0        26000000    0          0     50000      N            11f20000.phy                    topxtal
                                                                                                                    deviceless                      no_connection_id
          usb_phy_sel                1       1        0        26000000    0          0     50000      Y            deviceless                      no_connection_id
             infra_usb_pipe_ck_p1    1       1        0        26000000    0          0     50000      Y               phy-soc:[email protected]         ref
                                                                                                                       deviceless                      no_connection_id
          sspxtp_sel                 0       0        0        26000000    0          0     50000      N            deviceless                      no_connection_id
             infra_usb_pipe          0       0        0        26000000    0          0     50000      N               phy-soc:[email protected]         ref
                                                                                                                       deviceless                      no_connection_id
       mpll_d8                       0       0        0        52000000    0          0     50000      Y         deviceless                      no_connection_id
       mpll_d4                       0       0        0        104000000   0          0     50000      Y         deviceless                      no_connection_id
       mpll_d3_d2                    1       1        0        208000000   0          0     50000      Y         deviceless                      no_connection_id
          sysapb_sel                 1       1        0        208000000   0          0     50000      Y            deviceless                      no_connection_id
       mpll_d2                       2       2        0        208000000   0          0     50000      Y         11007000.spi                    parent-clk
                                                                                                                 deviceless                      no_connection_id
          dramc_md32_sel             1       1        0        208000000   0          0     50000      Y            deviceless                      no_connection_id
          spim_mst_sel               0       0        0        208000000   0          0     50000      N            deviceless                      no_connection_id
             infra_mux_spi1_sel      0       0        0        208000000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_104m_spi1   0       0        0        208000000   0          0     50000      N                  deviceless                      no_connection_id
          spi_sel                    1       1        0        208000000   0          0     50000      Y            11007000.spi                    sel-clk
                                                                                                                    deviceless                      no_connection_id
             infra_mux_spi2_sel      0       0        0        208000000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_104m_spi2_bck 0       0        0        208000000   0          0     50000      N                  deviceless                      no_connection_id
             infra_mux_spi0_sel      1       1        0        208000000   0          0     50000      Y               deviceless                      no_connection_id
                infra_hf_104m_spi0   1       1        0        208000000   0          0     50000      Y                  11007000.spi                    spi-clk
                                                                                                                          deviceless                      no_connection_id
    netsyspll                        1       1        0        850000000   0          0     50000      Y      deviceless                      no_connection_id
       eip197_sel                    1       1        0        850000000   0          0     50000      Y         deviceless                      no_connection_id
          ethdma_crypt0_en           1       1        0        850000000   0          0     50000      Y            15100000.ethernet               crypto
                                                                                                                    deviceless                      no_connection_id
root@bpi-r4-v11:~#
1 Like

i wonder about the function 7 hereā€¦looks like pinctrl driver in uboot is wrong here

So we should change pinctrl like this:

image image
Unfortunately, still
I start wonder what function 7 is. So I add some debugger inside drivers/pinctrl/mediatek/pinctrl-mtk-common.c But nothing is printed.

May you confirm that changing function from 1 to 7 has no effect? :slightly_smiling_face:

iā€™m not at home this weekend so cannot test, but pin numbers also differ, but not same offsetā€¦

have you checked with pinmux dump if the pinmux is applied?

we have defined these pins in dts

pcie3_pins: pcie3-pins {
	mux {
		function = "pcie";
		groups = "pcie_1l_1_pereset", "pcie_clk_req_n3",
			 "pcie_wake_n3_0";
	};
};

referring these pins/functions in pinctrl-driver (drivers/pinctrl/mediatek/pinctrl-mt7988.c)

static const int mt7988_pcie_1l_1_pereset_pins[] = { 20 };
static const int mt7988_pcie_1l_1_pereset_funcs[] = { 1 };

static const int mt7988_pcie_clk_req_n3_pins[] = { 10 };
static const int mt7988_pcie_clk_req_n3_funcs[] = { 1 };

static const int mt7988_pcie_wake_n3_0_pins[] = { 9 };
static const int mt7988_pcie_wake_n3_0_funcs[] = { 1 };

static const struct mtk_function_desc mt7988_functions[] = {
...
	{"pcie", mt7988_pcie_groups, ARRAY_SIZE(mt7988_pcie_groups)},
...
static const char *const mt7988_pcie_groups[] = { "pcie_wake_n0_0",
	"pcie_clk_req_n0_0", "pcie_wake_n3_0", "pcie_clk_req_n3",
	"pcie_p0_phy_i2c", "pcie_p1_phy_i2c", "pcie_p3_phy_i2",
	"pcie_p2_phy_i2c", "ckm_phy_i2c", "pcie_wake_n0_1", "pcie_wake_n3_1",
	"pcie_2l_0_pereset", "pcie_1l_1_pereset", "pcie_clk_req_n2_1",
	"pcie_2l_1_perese", "pcie_1l_0_pereset", "pcie_wake_n1_0",
	"cie_clk_req_n1", "pcie_wake_n2_0", "pcie_wake_n2_1", };

cie_clk_req_n1 misses ā€œpā€, but unrelated to our controller :slight_smile:

linux prints these

    type: MUX_GROUP controller pinctrl_moore group: pcie_1l_1_pereset (40) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_clk_req_n3 (16) function: pcie (7)
    type: MUX_GROUP controller pinctrl_moore group: pcie_wake_n3_0 (15) function: pcie (7)

in linux pinmux definitions are same, but strange that displayed function is different

maybe you can set debugs in mtk_pinconf_group_set and mtk_pinconf_set in pinctrl-mtk-common.c

also wonder why such few clocks are shown in clk dump in ubootā€¦

@moore have you an idea whats wrong here or is it right and the output is confusing us?

1 Like

Adding debugger to mtk_pinconf_group_set and mtk_pinconf_set has no output, so I add some debugger to its mux version (mtk_pinmux_group_set and mtk_pinmux_group_set)

Here is the output when booting:

Here is the output for pci enum:

I believe the groups are pcie_1l_1_pereset, pcie_clk_req_n3, and pcie_wake_n3_0 and they all have only one pin.
Notice I edit pinctrl-mt7988.c which make the pin# and function id the same with Linux.

To be clear, in the output for loop with pin#=1, the pin#=1 actually means pin count in the group is 1.

Here is the pinmux dump:

pinctrl@1001f000:
UART2_RXD : Aux Func.1
UART2_TXD : Aux Func.1
UART2_CTS : Aux Func.1
UART2_RTS : Aux Func.1
GPIO_A    : Aux Func.0
SMI_0_MDC : Aux Func.1
SMI_0_MDI : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PCIE30_1L : Aux Func.1
GPIO_P    : Aux Func.1
WATCHDOG  : Aux Func.1
GPIO_RESE : Aux Func.0
GPIO_WPS  : Aux Func.0
PMIC_I2C_ : Aux Func.7
PMIC_I2C_ : Aux Func.7
I2C_1_SCL : Aux Func.1
I2C_1_SDA : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PWMD1     : Aux Func.5
SPI0_WP   : Aux Func.1
SPI0_HOLD : Aux Func.1
SPI0_CSB  : Aux Func.1
SPI0_MISO : Aux Func.1
SPI0_MOSI : Aux Func.1
SPI0_CLK  : Aux Func.1
SPI1_CSB  : Aux Func.5
SPI1_MISO : Aux Func.5
SPI1_MOSI : Aux Func.5
SPI1_CLK  : Aux Func.5
SPI2_CLK  : Aux Func.5
SPI2_MOSI : Aux Func.5
SPI2_MISO : Aux Func.5
SPI2_CSB  : Aux Func.5
SPI2_HOLD : Aux Func.5
SPI2_WP   : Aux Func.5
EMMC_RSTB : Aux Func.1
EMMC_DSL  : Aux Func.1
EMMC_CK   : Aux Func.7
EMMC_CMD  : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
EMMC_DATA : Aux Func.1
PCM_FS_I2 : Aux Func.1
PCM_CLK_I : Aux Func.1
PCM_DRX_I : Aux Func.1
PCM_DTX_I : Aux Func.1
PCM_MCK_I : Aux Func.1
UART0_RXD : Aux Func.1
UART0_TXD : Aux Func.1
PWMD0     : Aux Func.1
JTAG_JTDI : Aux Func.0
JTAG_JTDO : Aux Func.0
JTAG_JTMS : Aux Func.0
JTAG_JTCL : Aux Func.0
JTAG_JTRS : Aux Func.0
USB_DRV_V : Aux Func.1
LED_A     : Aux Func.0
LED_B     : Aux Func.0
LED_C     : Aux Func.0
LED_D     : Aux Func.0
LED_E     : Aux Func.0
GPIO_B    : Aux Func.1
GPIO_C    : Aux Func.1
I2C_2_SCL : Aux Func.1
I2C_2_SDA : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_2L : Aux Func.1
PCIE30_1L : Aux Func.1
PCIE30_1L : Aux Func.1
USB_DRV_V : Aux Func.1
UART1_RXD : Aux Func.1
UART1_TXD : Aux Func.1
UART1_CTS : Aux Func.1
UART1_RTS : Aux Func.1

This thread is about uboot,not linux/openwrt pls do not hijack this thread with non-uboot posts

Both of the problems seem to share a common issue: the device tree. I found this thread discussing the M-key PCIe issues while researching the B-key PCIe slot.