Setting SoC gpio in dts and driver

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting SoC gpio in dts and driver

747 Views
balaji1
Contributor II

Hi,

I am trying to configure a SoC gpio  which is connected to the USB select switch, high or low depending on the usage. I tried configuring the gpio in dts, but it didn't work. Any suggestion or lead would be helpful.

Tags (1)
0 Kudos
2 Replies

744 Views
igorpadykov
NXP Employee
NXP Employee

Hi Balaji

 

one can look at gpio-hog tutorial below

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-gpio-hog-demo/ta-p/1317709

 

Best regards
igor

730 Views
balaji1
Contributor II

Hi Igor,

 Thanks for the suggestion. However, when configuring a pin in iomuxc node, there are many pin names with their mux config names in pinctrl directories. I am confused on to which one to use. For example: I want to configure LSIO_GPIO1_IO07 to output. But when I grep for this GPIO definition, I get these many MACRO definitions, 

 

include/dt-bindings/pinctrl/pads-imx8qxp.h:119:#define SC_P_SPI0_CS1 96 /* ADMA.SPI0.CS1, ADMA.SAI0.RXC, ADMA.SAI1.TXD, ADMA.LCD_PWM0.OUT, LSIO.GPIO1.IO07 */
include/dt-bindings/pinctrl/pads-imx8qxp.h:529:#define SC_P_SPI0_CS1_ADMA_SPI0_CS1 SC_P_SPI0_CS1 0
include/dt-bindings/pinctrl/pads-imx8qxp.h:530:#define SC_P_SPI0_CS1_ADMA_SAI0_RXC SC_P_SPI0_CS1 1
include/dt-bindings/pinctrl/pads-imx8qxp.h:531:#define SC_P_SPI0_CS1_ADMA_SAI1_TXD SC_P_SPI0_CS1 2
include/dt-bindings/pinctrl/pads-imx8qxp.h:532:#define SC_P_SPI0_CS1_ADMA_LCD_PWM0_OUT SC_P_SPI0_CS1 3
include/dt-bindings/pinctrl/pads-imx8qxp.h:533:#define SC_P_SPI0_CS1_LSIO_GPIO1_IO07 SC_P_SPI0_CS1 4

 

 

which one to configure?

0 Kudos