[PATCH 5/8] dts: ti: beagleplay: Add mikrobus connector symbols
From: Ayush Singh
Date: Wed Sep 11 2024 - 10:29:41 EST
- I2C, UART, PWM symbols
- MIKROBUS_GPIO defines a gpio-controller that defines the pins in the
following order:
0: PWM
1: INT
2: RX
3: TX
4: SCL
5: SDA
6: MOSI
7: MISO
8: SCK
9: CS
10: RST
11: AN
- PWM should always use channel 0. Use nexus node for routing
Signed-off-by: Ayush Singh <ayush@xxxxxxxxxxxxxxx>
---
MAINTAINERS | 1 +
arch/arm64/boot/dts/ti/Makefile | 1 +
.../k3-am625-beagleplay-mikrobus-connector0.dtso | 49 ++++++++++++++++++++++
3 files changed, 51 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index d0c18bd7b558..95f228c85a40 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15432,6 +15432,7 @@ F: drivers/usb/image/microtek.*
MIKROBUS CONNECTOR
M: Ayush Singh <ayush@xxxxxxxxxxxxxxx>
S: Maintained
+F: arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso
F: Documentation/devicetree/bindings/connector/mikrobus-connector.yaml
F: drivers/misc/mikrobus.rs
diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile
index bcd392c3206e..c628954a357b 100644
--- a/arch/arm64/boot/dts/ti/Makefile
+++ b/arch/arm64/boot/dts/ti/Makefile
@@ -12,6 +12,7 @@
dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-ov5640.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-tevi-ov5640.dtbo
+dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-mikrobus-connector0.dtbo
dtb-$(CONFIG_ARCH_K3) += k3-am625-phyboard-lyra-rdk.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb
dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-dahlia.dtb
diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso
new file mode 100644
index 000000000000..81d370249f64
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-mikrobus-connector0.dtso
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/**
+ * MikroBUS Overlay for BeaglePlay MikroBUS Connector 0
+ *
+ * Copyright (C) 2024 Ayush Singh <ayush@xxxxxxxxxxxxxxx>
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+ __symbols__ {
+ MIKROBUS_CONNECTOR = "/mikrobus-connector0";
+
+ /* GPIO controller for all pins */
+ MIKROBUS_ALL_GPIO = "/mikrobus-connector0";
+
+ /* MikroBUS connector 0 SCL Pin options */
+ MIKROBUS_SCL_MUX_I2C_SCL = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-default-pins";
+ MIKROBUS_SCL_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-gpio-pins";
+
+ /* MikroBUS connector 0 SDA Pin options */
+ MIKROBUS_SDA_MUX_I2C_SDA = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-default-pins";
+ MIKROBUS_SDA_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-i2c-gpio-pins";
+
+ /* MikroBUS connector 0 UART_TX Pin options */
+ MIKROBUS_TX_MUX_UART_TX = "/bus@f0000/pinctrl@f4000/mikrobus-uart-default-pins";
+ MIKROBUS_TX_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-uart-gpio-pins";
+
+ /* MikroBUS connector 0 UART_RX Pin options */
+ MIKROBUS_RX_MUX_UART_RX = "/bus@f0000/pinctrl@f4000/mikrobus-uart-default-pins";
+ MIKROBUS_RX_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-uart-gpio-pins";
+
+ /* MikroBUS connector 0 PWM Pin options */
+ MIKROBUS_PWM_MUX_PWM = "/bus@f0000/pinctrl@f4000/mikrobus-pwm-default-pins";
+ MIKROBUS_PWM_MUX_DIGITAL = "/bus@f0000/pinctrl@f4000/mikrobus-pwm-gpio-pins";
+
+ /* MikroBUS connector 0 uses main_i2c3 for I2C on BeaglePlay */
+ MIKROBUS_SCL_I2C = "/bus@f0000/i2c@20030000";
+ MIKROBUS_SDA_I2C = "/bus@f0000/i2c@20030000";
+
+ /* MikroBUS connector 0 uses main_uart5 for UART on BeaglePlay */
+ MIKROBUS_TX_UART = "/bus@f0000/serial@2850000";
+ MIKROBUS_RX_UART = "/bus@f0000/serial@2850000";
+
+ /* MikroBUS connector 0 uses ecap2 for PWM on BeaglePlay */
+ MIKROBUS_PWM_PWM = "/bus@f0000/pwm@23120000";
+ };
+};
--
2.46.0