config-pin: migrate to gpio-aggregator (beagley-ai guinea pig)
(all node names are up for discussion, would like to mirror mainline usage as much as possible)
node name syntax: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/ti/omap/am335x-pocketbeagle.dts?h=v6.9-rc6#n221
P2_03_gpio: P2-03-gpio-pins {
Thus i propose: exp_08_gpio: exp-08-gpio-pins {
gpio-aggregator: https://docs.kernel.org/admin-guide/gpio/gpio-aggregator.html driver: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpio/gpio-aggregator.c?h=v6.9-rc6
Default boot up array: (assume all 40 pins)
hat-array {
compatible = "gpio-array";
pinctrl-names = "default";
pinctrl-0 = <&exp_03_gpio>, <&exp_05_gpio>, <&exp_08_gpio>, <&exp_10_gpio>;
gpios = <&mcu_gpio0 2 GPIO_ACTIVE_HIGH>,
<&mcu_gpio0 3 GPIO_ACTIVE_HIGH>,
<&main_gpio1 14 GPIO_ACTIVE_HIGH>,
<&main_gpio1 15 GPIO_ACTIVE_HIGH>;
gpio-line-names = "ID_SDA", "ID_SCL", "GPIO2", "GPIO3";
};
hat peripheral
hat-uart-ttyAMA0 {
compatible = "gpio-peripheral";
pinctrl-names = "default";
pinctrl-0 = <&exp_08_uart>, <&exp_10_uart>;
gpios = <&main_gpio1 14 GPIO_ACTIVE_HIGH>,
<&main_gpio1 15 GPIO_ACTIVE_HIGH>;
gpio-line-names = "UART1_TXD", "UART1_RXD";
};
Single Pin...
hat-08-gpio {
compatible = "gpio-single";
pinctrl-names = "default";
pinctrl-0 = <&exp_08_gpio>;
gpios = <&main_gpio1 14 GPIO_ACTIVE_HIGH>;
gpio-line-names = "UART1_TXD";
};
hat-08-uart-txd0 {
compatible = "gpio-single";
pinctrl-names = "default";
pinctrl-0 = <&exp_08_uart>;
gpios = <&main_gpio1 14 GPIO_ACTIVE_HIGH>;
gpio-line-names = "UART1_TXD";
};
hat-10-gpio {
compatible = "gpio-single";
pinctrl-names = "default";
pinctrl-0 = <&exp_10_gpio>;
gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>;
gpio-line-names = "UART1_TXD";
};
hat-10-uart1-rxd {
compatible = "gpio-single";
pinctrl-names = "default";
pinctrl-0 = <&exp_10_uart>;
gpios = <&main_gpio1 15 GPIO_ACTIVE_HIGH>;
gpio-line-names = "UART1_RXD";
};
pin mux defines:
exp_08_gpio: exp-08-gpio-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x01b0, PIN_INPUT, 7) /* (F24) MCASP0_ACLKR.GPIO1_14 */
>;
};
exp_08_uart: exp-08-uart-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x01b0, PIN_OUTPUT, 2) /* (F24) MCASP0_ACLKR.UART1_TXD */
>;
};
exp_10_gpio: exp-10-gpio-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x01ac, PIN_INPUT, 7) /* (C27) MCASP0_AFSR.GPIO1_13 */
>;
};
exp_10_uart: exp-10-uart-pins {
pinctrl-single,pins = <
J722S_IOPAD(0x01ac, PIN_INPUT, 2) /* (C27) MCASP0_AFSR.UART1_RXD */
>;
};
exp_03_gpio: exp-03-gpio-pins {
pinctrl-single,pins = <
J722S_MCU_IOPAD(0x0048, PIN_INPUT, 7) /* (E11) MCU_I2C0_SDA.MCU_GPIO0_18 */
>;
};
exp_05_gpio: exp-05-gpio-pins {
pinctrl-single,pins = <
J722S_MCU_IOPAD(0x0044, PIN_INPUT, 7) /* (B13) MCU_I2C0_SCL.MCU_GPIO0_17 */
>;
};
Planned peripheral
- gpio
- usart
- i2c
- spi
- pruin
- pruout
- can
- pwm
- i2s (dt might have other config options)
Not Planned
- video
Comparsions
Some RPI comparsions: https://github.com/bobrathbone/GPIOconverter