Yes, this GPIO G4 seems quite odd. It appears that only when the GPIO is used as an “GPIO” function , reading devmem 0x02214080 returns 0x03. For example, if I swap G4 and G5 in the marked “1” section of the screenshot below, then both devmem 0x022140a0 and devmem 0x02214080 return 0x03. Otherwise, devmem 0x02214080 returns 0x0, even if the following two lines are commented out:
//interrupt-parent = <&gpio>;
//interrupts = <TEGRA234_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
In other words, even if G4 is not used, devmem 0x02214080 still reads 0x0.
Additionally, I have another question. In the marked “2” section of the screenshot, I replaced &tegra_main_gpio with &gpio because tegra_main_gpio is not defined in my SDK’s device tree. Is this an acceptable approach?
You need to check what is “gpio” defined in your device tree. “tegra_main_gpio” has its own definition and you should confirm your “gpio” alias is same as it.
Also, I am not sure why your comment is “comment out” GPIO G,4 here. They should be in use and your hardware should have it connected. You should put it in “gpio-input” list in the MB1 gpio dtsi file too.
I don’t know the definition of tegra_main_gpio, and I couldn’t find any references to it in my code.
I comment out the G,4 is just for demostration , that, if I use G,4 as a generic purpose IO , devmem 0x02214080 will read out as 0x03 , otherwise it 's 0x0;
I rechecked the file bootloader/tegra234-mb1-bct-gpio-p3701-0000-a04.dtsi and confirmed that G,4 was missing from the input list—it might have been removed during earlier debugging. After adding G,4 back to the input list, reading 0x02214080 now returns 0x01.(show below) Is this the expected value?
As for the network card issue, it still persists. Where exactly is this interrupt being used in the driver? What is the registered interrupt name after initialization? I don’t see any part of the driver actually utilizing this interrupt.