Hello Sir/Madam,
We need some GPIO (Input/ output) for one of our User applications run on AM3354 processor running a Linux Host. Currently we have only 9 free GPIOs to use for I/O purpose. We want to have more GPIOs but all other pins are already assigned for other peripherals in DTB.
Is there any way to override DTB settings from Userspace ?
Ex : Is there any way to use the pins assigned for UART1 in DTB (0x178 ,0x17C ) as GPIOs without changing the Hardware tree.
ie If User application uses serial port, these pins should behave as configured in DTB and if not using UART1 and need these pins as I/O for other application, these could configure as GPIO without modifying DTB.
uart1_pins: pinmux_uart1_pins {
pinctrl-single,pins = <
0x178 (PIN_INPUT | MUX_MODE0) /* uart1_ctsn.uart1_ctsn */
0x17C (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_rtsn.uart1_rtsn */
0x180 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rxd.uart1_rxd */
0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */
0xFC (PIN_INPUT | MUX_MODE4) /* mmc0_dat0.uart1_ri */
0xF8 (PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* mmc0_dat0.uart1_dtr */
0xF4 (PIN_INPUT | MUX_MODE4) /* mmc0_dat0.uart1_dsr */
0xF0 (PIN_INPUT | MUX_MODE4) /* mmc0_dat0.uart1_dcd */
>;
};
Regards,
Smrithy TR