Other Parts Discussed in Thread: AM62A7
Tool/software:
Hello Team
I have one SK AM62LP evm board with ID ASSY PROC124E2A
where I want to use one of the expansion pin as GPIO , where I can connect LED and test .
Here I am trying to use GPIO0_38 as general purpose pin .
As per the schemetic mention in this file PROC124E2A_SCH_With_Design_Updates..Notes_V1.0 USER EXPANSION CONNECTOR ( image1 attach file)
Also mention is the pdf am62a7 pdf (page 25) (Image2 attach file )
For that I am doing changes in the file dts k3-am62x-sk-common.dtsi
user_gpio {
pinctrl-names = "default";
pinctrl-0 = <&usr_gpio_pins_default>;
gpio0_38 {
label = "am62-sk:JYO_TEST";
gpios = <&main_gpio0 38 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
usr_gpio_pins_default: usr-gpio-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x09C, PIN_OUTPUT, 7)
>;
};
But I its not taking effect .
cat /sys/kernel/debug/gpio is shwoing below output
gpiochip3: GPIOs 320-343, parent: i2c/1-0022, 1-0022, can sleep:
gpio-320 (GPIO_CPSW2_RST )
gpio-321 (GPIO_CPSW1_RST )
gpio-322 (PRU_DETECT )
gpio-323 (MMC1_SD_EN |regulator-3 ) out hi
gpio-324 (VPP_LDO_EN )
gpio-325 (EXP_PS_3V3_En )
gpio-326 (EXP_PS_5V0_En )
gpio-327 (EXP_HAT_DETECT )
gpio-328 (GPIO_AUD_RSTn )
gpio-329 (GPIO_eMMC_RSTn )
gpio-330 (UART1_FET_BUF_EN )
gpio-331 (BT_UART_WAKE_SOC )
gpio-332 (GPIO_HDMI_RSTn )
gpio-333 (CSI_GPIO0 )
gpio-334 (CSI_GPIO1 )
gpio-335 (GPIO_OLDI_INT )
gpio-336 (HDMI_INTn )
gpio-337 (TEST_GPIO2 )
gpio-338 (MCASP1_FET_EN )
gpio-339 (MCASP1_BUF_BT_EN )
gpio-340 (MCASP1_FET_SEL )
gpio-341 (UART1_FET_SEL )
gpio-343 (IO_EXP_TEST_LED )
gpiochip2: GPIOs 344-395, parent: platform/601000.gpio, 601000.gpio:
gpio-358 ( |sysfs ) out lo
gpio-362 ( |sysfs ) out lo
gpio-393 ( |am62-sk:green:heartb) out lo
gpiochip1: GPIOs 396-487, parent: platform/600000.gpio, 600000.gpio:
gpio-427 ( |vddshv_sdio ) out lo
gpiochip0: GPIOs 488-511, parent: i2c/1-0023, 1-0023, can sleep:
gpio-496 (WL_LT_EN )
gpio-497 (CSI_RSTz )
gpio-504 (SPI0_FET_SEL )
gpio-505 (SPI0_FET_OE )
gpio-506 (GPIO_OLDI_RSTn )
gpio-507 (PRU_3V3_EN )
gpio-510 (CSI_VLDO_SEL )
gpio-511 (SOC_WLAN_SDIO_RST )
Based on the GPIO ranges provided in /sys/kernel/debug/gpio
, the available GPIOs are as follows:
- gpiochip3: GPIOs 320-343
- gpiochip2: GPIOs 344-395
- gpiochip1: GPIOs 396-487
- gpiochip0: GPIOs 488-511
How to know GPIO0_38 is come under which gpiochip .
And How to calculate gpio number if I want to use sysfs to export the GPIO pin ,
Could you please guide me with this .
Please find the attach for more details .
Thanks
Jyo 8358.PROC124E2A_SCH_With_Design_Updates..Notes_V1.0.pdfam62a7-q1 1.pdf