Hi,
In our custom board, we are able to check the status of all the GPIO in u-boot except the one GPIO i.e, clkreq (H20) using gpio input 24 command.
The pin status was always 0. And when we checked the datasheet regarding clkeq , this pin is clkreq (MODE0) after reset.
I u-boot dts, I have configured this pin as input and MODE7 to work as GPIO. Please find the below dts configuration in u-boot.
gpio0_pins: gpio0_pins {
pinctrl-single,pins = <
0x108 (PIN_INPUT | MUX_MODE7) /* (D16) mii1_col.gpio0[0] */
0x158 (PIN_OUTPUT | MUX_MODE7) /* (T21) spi0_d1.gpio0[4] */
0x15c (PIN_OUTPUT | MUX_MODE7) /* (T20) spi0_cs0.gpio0[5] */
0x160 (PIN_OUTPUT | MUX_MODE7) /* (R25) spi0_cs1.gpio0[6] */
0x2c0 (PIN_INPUT | MUX_MODE7) /* (g21) USB0DRVBUS.gpio0[18] */
0x264 (PIN_OUTPUT | MUX_MODE7) /* (P22) spi2_d0.gpio0[20] */
0x268 (PIN_OUTPUT | MUX_MODE7) /* (P20) spi2_d1.gpio0[21] */
0x260 (PIN_OUTPUT | MUX_MODE7) /* (N20) spi2_sclk.gpio0[22] */
0x26c (PIN_OUTPUT | MUX_MODE7) /* (T23) spi2_cs0.gpio0[23] */
0x278 (PIN_INPUT | MUX_MODE7) /* (H20) clkreq.gpio0[24] */
0x2c4 (PIN_OUTPUT | MUX_MODE7) /* (F25) USB1_DRVVBUS.gpio0[25] */
0x144 (PIN_OUTPUT | MUX_MODE7) /* (A16) rmii1_ref_clk.gpio0[29] */
>;
};
Is there any other changes need to do in u-boot dts or mux.c to get the status of the pin correctly.