Add mikroBUS connector support for Beagleplay. Acts as a nexus node for
gpios. Allows defining GPIOS relative to the connector. The pin
numbering is as follows:
0: PWM
1: INT
2: RX
3: TX
4: SCL
5: SDA
6: MOSI
7: MISO
8: SCK
9: CS
10: RST
11: AN
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
---
arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts | 53 +++++++++++++++++++++++---
1 file changed, 47 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
index 70de288d728e..628bcfcc4651 100644
--- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
+++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
@@ -227,6 +227,21 @@ simple-audio-card,codec {
};
};
+ mikrobus_connector0: mikrobus-connector0 {
+ status = "disabled";
+ compatible = "mikrobus-connector";
+
+ #gpio-cells = <2>;
+ gpio-map =
+ <0 0 &main_gpio1 11 0>, <1 0 &main_gpio1 9 0>,
+ <2 0 &main_gpio1 24 0>, <3 0 &main_gpio1 25 0>,
+ <4 0 &main_gpio1 22 0>, <5 0 &main_gpio1 23 0>,
+ <6 0 &main_gpio1 7 0>, <7 0 &main_gpio1 8 0>,
+ <8 0 &main_gpio1 14 0>, <9 0 &main_gpio1 13 0>,
+ <10 0 &main_gpio1 12 0>, <11 0 &main_gpio1 10 0>;
+ gpio-map-mask = <0xf 0x0>;
+ gpio-map-pass-thru = <0x0 0x1>;
+ };
};
&main_pmx0 {
@@ -394,6 +409,25 @@ AM62X_IOPAD(0x01d4, PIN_INPUT_PULLUP, 2) /* (B15) UART0_RTSn.I2C3_SDA */
>;
};
+ mikrobus_i2c_pins_gpio: mikrobus-i2c-gpio-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x01d0, PIN_INPUT, 7) /* (A15) UART0_CTSn.GPIO1_22 */
+ AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */
+ >;
+ };
+
+ mikrobus_pwm_pins_default: mikrobus-pwm-default-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x01a4, PIN_INPUT, 2) /* (B20) MCASP0_ACLKX.ECAP2_IN_APWM_OUT */
+ >;
+ };
+
+ mikrobus_pwm_pins_gpio: mikrobus-pwm-gpio-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x01a4, PIN_INPUT, 7) /* (B20) MCASP0_ACLKX.GPIO1_11 */
+ >;
+ };
+
mikrobus_uart_pins_default: mikrobus-uart-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x01d8, PIN_INPUT, 1) /* (C15) MCAN0_TX.UART5_RXD */
@@ -401,6 +435,13 @@ AM62X_IOPAD(0x01dc, PIN_OUTPUT, 1) /* (E15) MCAN0_RX.UART5_TXD */
>;
};
+ mikrobus_uart_pins_gpio: mikrobus-uart-gpio-pins {
+ pinctrl-single,pins = <
+ AM62X_IOPAD(0x01d8, PIN_INPUT, 7) /* (C15) MCAN0_TX.GPIO1_24 */
+ AM62X_IOPAD(0x01dc, PIN_INPUT, 7) /* (E15) MCAN0_RX.GPIO1_25 */
+ >;
+ };
+
mikrobus_spi_pins_default: mikrobus-spi-default-pins {
pinctrl-single,pins = <
AM62X_IOPAD(0x01b0, PIN_INPUT, 1) /* (A20) MCASP0_ACLKR.SPI2_CLK */
@@ -804,10 +845,8 @@ it66121_out: endpoint {
};
&main_i2c3 {
- pinctrl-names = "default";
- pinctrl-0 = <&mikrobus_i2c_pins_default>;
clock-frequency = <400000>;
- status = "okay";
+ status = "disabled";
};
&main_spi2 {
@@ -876,9 +915,7 @@ &main_uart1 {
};
&main_uart5 {
- pinctrl-names = "default";
- pinctrl-0 = <&mikrobus_uart_pins_default>;
- status = "okay";
+ status = "disabled";
};
&main_uart6 {
@@ -925,3 +962,7 @@ &mcasp1 {
0 0 0 0
>;
};
+
+&ecap2 {
+ status = "okay";
+};
--
2.46.0