rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ayush Singh <ayush@beagleboard.org>
To: fabien.parent@linaro.org, d-gole@ti.com,
	lorforlinux@beagleboard.org, jkridner@beagleboard.org,
	robertcnelson@beagleboard.org, "Andrew Davis" <afd@ti.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Derek Kiernan" <derek.kiernan@amd.com>,
	"Dragan Cvetic" <dragan.cvetic@amd.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Nishanth Menon" <nm@ti.com>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	"Tero Kristo" <kristo@kernel.org>
Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	 devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 Ayush Singh <ayush@beagleboard.org>
Subject: [PATCH 4/8] dts: ti: k3-am625-beagleplay: Enable mikroBUS connector
Date: Wed, 11 Sep 2024 19:57:21 +0530	[thread overview]
Message-ID: <20240911-mikrobus-dt-v1-4-3ded4dc879e7@beagleboard.org> (raw)
In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org>

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


  parent reply	other threads:[~2024-09-11 14:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 14:27 [PATCH 0/8] Add generic overlay for MikroBUS addon boards Ayush Singh
2024-09-11 14:27 ` [PATCH 1/8] rust: kernel: Add Platform device and driver abstractions Ayush Singh
2024-09-11 14:56   ` Greg Kroah-Hartman
2024-09-11 15:52     ` Ayush Singh
2024-09-11 17:39       ` Danilo Krummrich
2024-09-11 18:05         ` Ayush Singh
2024-09-11 21:52           ` Danilo Krummrich
2024-09-11 17:35     ` Danilo Krummrich
2024-09-11 20:07       ` Greg Kroah-Hartman
2024-09-14 10:11       ` Janne Grunau
2024-09-11 14:27 ` [PATCH 2/8] dt-bindings: connector: Add MikorBUS connector Ayush Singh
2024-09-11 15:26   ` Rob Herring (Arm)
2024-09-11 17:26   ` Rob Herring
2024-09-11 18:00     ` Ayush Singh
2024-09-11 14:27 ` [PATCH 3/8] mikrobus: Add mikrobus driver Ayush Singh
2024-09-11 14:57   ` Greg Kroah-Hartman
2024-09-11 16:02     ` Ayush Singh
2024-09-11 20:03       ` Greg Kroah-Hartman
2024-09-12 13:32         ` Ayush Singh
2024-09-11 15:48   ` Andrew Lunn
2024-09-11 14:27 ` Ayush Singh [this message]
2024-09-11 14:27 ` [PATCH 5/8] dts: ti: beagleplay: Add mikrobus connector symbols Ayush Singh
2024-09-11 14:27 ` [PATCH 6/8] addon_boards: Add addon_boards plumbing Ayush Singh
2024-09-11 15:00   ` Greg Kroah-Hartman
2024-09-11 16:09     ` Ayush Singh
2024-09-11 14:27 ` [PATCH 7/8] addon_boards: mikrobus: Add Weather Click Ayush Singh
2024-09-11 14:27 ` [PATCH 8/8] addon_boards: mikrobus: Add GPS3 Click Ayush Singh
2024-09-11 14:58   ` Greg Kroah-Hartman
2024-09-11 15:56     ` Ayush Singh
2024-09-11 20:04       ` Greg Kroah-Hartman
2024-09-12  7:16         ` Ayush Singh
2024-09-12  7:29           ` Dirk Behme
2024-09-12  7:39             ` Greg Kroah-Hartman
2024-09-12  8:17               ` Ayush Singh
2024-09-12  8:50                 ` Geert Stappers
2024-09-11 17:02 ` [PATCH 0/8] Add generic overlay for MikroBUS addon boards Rob Herring
2024-09-20 16:51   ` Ayush Singh
2024-09-13 10:05 ` Alexander Stein
2024-09-13 10:23   ` Ayush Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240911-mikrobus-dt-v1-4-3ded4dc879e7@beagleboard.org \
    --to=ayush@beagleboard.org \
    --cc=a.hindborg@kernel.org \
    --cc=afd@ti.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=arnd@arndb.de \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=d-gole@ti.com \
    --cc=derek.kiernan@amd.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@amd.com \
    --cc=fabien.parent@linaro.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jkridner@beagleboard.org \
    --cc=kristo@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorforlinux@beagleboard.org \
    --cc=nm@ti.com \
    --cc=ojeda@kernel.org \
    --cc=robertcnelson@beagleboard.org \
    --cc=robh@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).