From patchwork Wed Sep 11 14:27:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ayush Singh X-Patchwork-Id: 13800701 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E4BDBEE49BD for ; Wed, 11 Sep 2024 14:38:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A/s/yZ/fu2RctQDsUCSBTBJSbx0ktmemPNhPcRZ3o84=; b=3Yc90CcvvGaaSXcjXip8qwErZM Yb858jtG+03frzBTipqE9agmMoz0Sg0K4y7aNU3cgqoodt3/6S5/SZJNO0vem+3U5Lf7jhUNWIDYB +00asVu9XKxPeaJtUYXgdwd33EcvZiPLHEhEQ8HYwqQXLToVVF39GZDkTLpruqzG/lvNBWi/qZLEX 4IBgnMcXH5n1lz8zSgGzTtEu/bru1dRLkMCUKsHAyxkf9t30Zf5gr5J6oFYfAoim/p5IOgvDmdsR/ yjwPuZE777Jtt0CtREmqmvI3JTut8yEMmtAesnLhgXFQOZvILsJ7XoZbgEVx9/sc7mTrjnxHighfm yR7fR4wA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOTy-00000009xm8-0joC; Wed, 11 Sep 2024 14:38:10 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1soOKW-00000009u2w-4B2b for linux-arm-kernel@lists.infradead.org; Wed, 11 Sep 2024 14:28:27 +0000 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-7d4fa972cbeso5570023a12.2 for ; Wed, 11 Sep 2024 07:28:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beagleboard-org.20230601.gappssmtp.com; s=20230601; t=1726064904; x=1726669704; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=A/s/yZ/fu2RctQDsUCSBTBJSbx0ktmemPNhPcRZ3o84=; b=WpZ7vUbkA1/hwXeKA5IFt3QOpoxqLJNDvGsahkQoSL2bUUcVTpLFIJ66VsEbwh4KvO jlyyx3C8geurVwBVFZSJGHis5+UD7AgVOhaJq9NTDBv/aswoRcq7yB/yzWz52xJjAbGz TGSAet3DhPxUk1/p/jcaWFH3HKxVOHmmdoCmt2kqBxU0J7ZC1skFZdSpN5+N0VFmvNIk kImRkh4jhPrc22rHvuOv9P5REmVBdzbsIZYJbXlIjnKTC5jvhfVqFIgpeRmgz3Y47sue JWlTRniS4N5h+zpshZc2KdMv5DyKn3rm4UiWO0bHcz2nyyyh+K0uifuTxWgNBePa4ZUX sj7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726064904; x=1726669704; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A/s/yZ/fu2RctQDsUCSBTBJSbx0ktmemPNhPcRZ3o84=; b=NYrWZDDQRo/1AwIUIKj17JHF4R5Vgw17AD6pcoifmsKVSCiZOaRq5NUJP8i8OI/Bap 5xr/Zg/1Egw90zgRFsfSLPioXoWwcpkH7+qsaCpx+exAe+0It0cR92OopeeOOXLkFAp4 ZO4y5cHgkJLlF4zBToIOqa3tSRZhz8EoMVVH6sO9tLPKlH19SQaAPuOf1Cs/z5/Rf2jA bhLpzXe1sA+aySAZfcusYTaqrEkZywQmzwQH2UINQHJpRi1Zh8JOa/jowHGvhZCfgaGg r7+hZzb1Pate1UtVzWN8FBOQ69SdchVj4DXTDjtDHwMadTmBYaGVVaeuGO5I44AasSuo IDHQ== X-Forwarded-Encrypted: i=1; AJvYcCW8pdvTPNKXxac2YNSSz+LlEgWPHBZ1PwtuPVmoG24fkc1Z2cdLHIHPDCh+SRZ429iA/jNv1BXj4cnilzYP5h0h@lists.infradead.org X-Gm-Message-State: AOJu0Yy05vB/IgPv9lwx11hoid+oQZ2yhdc/NFLdj6WeEojOnYJZJbMq 0dJWxdvsII9vfSrugxCtG7Rz7dSXsgxCcTVc6v5uIqFZQynatmDr5ZCmH/+MEw== X-Google-Smtp-Source: AGHT+IHqbcVmiVTlA06ObWdR+F5XvbTWf7muQ3N8Ww5HkEnHAHU/xiG/nzHYw5l3NU9MDeCyRLMFog== X-Received: by 2002:a05:6a21:392:b0:1cf:5b31:313a with SMTP id adf61e73a8af0-1cf5e0307abmr6964576637.1.1726064903886; Wed, 11 Sep 2024 07:28:23 -0700 (PDT) Received: from [172.16.118.100] ([103.15.228.94]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2dadbfe46c9sm10639116a91.11.2024.09.11.07.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 07:28:23 -0700 (PDT) From: Ayush Singh Date: Wed, 11 Sep 2024 19:57:21 +0530 Subject: [PATCH 4/8] dts: ti: k3-am625-beagleplay: Enable mikroBUS connector MIME-Version: 1.0 Message-Id: <20240911-mikrobus-dt-v1-4-3ded4dc879e7@beagleboard.org> References: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> In-Reply-To: <20240911-mikrobus-dt-v1-0-3ded4dc879e7@beagleboard.org> To: fabien.parent@linaro.org, d-gole@ti.com, lorforlinux@beagleboard.org, jkridner@beagleboard.org, robertcnelson@beagleboard.org, Andrew Davis , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Derek Kiernan , Dragan Cvetic , Arnd Bergmann , Greg Kroah-Hartman , Nishanth Menon , Vignesh Raghavendra , Tero Kristo Cc: linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Ayush Singh X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=3276; i=ayush@beagleboard.org; h=from:subject:message-id; bh=HWiHF2WJQe2aKVEi4bYz2zUblPTZngMcMUJTSZsaE0Q=; b=owEBbQKS/ZANAwAIAQXO9ceJ5Vp0AcsmYgBm4ajWkpgjyK7LlSpg2LopLy7iLx8obVKJNlLKZ dqK5lpf5bCJAjMEAAEIAB0WIQTfzBMe8k8tZW+lBNYFzvXHieVadAUCZuGo1gAKCRAFzvXHieVa dArQD/0cse1NKul+tL5kOruOFAWZtNGBnbuu+u6HIMhf3idPcHz4n+624u4dth5lMwH+LVbonM9 MKxD0IofozpkpcwyrQc4DZmNfBChTUC+jZnLLX/x2o7exEzKztzjdRQjsgZ4IyRcQWjQgPs2NSY zCKDpadPvWuglY0yebGCXcbnKOw7K8wA2wdYRkCW+NpD9CVakgLJM/NUg05GEpf7or5Ib7iUyf5 KCO+F68jDmUydpfuHgBV1+KfQFWITIHGIXjZcFTGvbA9jUDZ5A7m+kGian3NjLe26nydRlEVz1t pRwNNiS2ntjL5KkUsEYixV0njFr+Fw//KUifbsahi+pqTd4lekZUgJd9P9zep1oWJuDJwERr+zJ 5iSMCIPd0JE/eW95LMlv3FFxuKae+ve4E2yvNQnV9i0MJNWCzrZ8fmXjRxDyImBN8xPo2SvUNzi bIEhmNg45+aepELQJlpPFV91NebGxPhRDmJLyYL/OqtqHySSIC7RWuToNfwQgr51YtwIyooPi8e 4ZLXaoTyc6OLH0qExlcQtKV4i7CdchkszcBpe2vLSHksT80h+kqYQFNoEvbMFzL1WMcK5Q52XQs uM/dUEsgIojcEUmRYvxV2xDd43+qrG3coLEITTl8zM3Xrcx5lMqijI5WU/God4DqY4Oy6t7mfkw fZS+H0hdlS2SjJg== X-Developer-Key: i=ayush@beagleboard.org; a=openpgp; fpr=DFCC131EF24F2D656FA504D605CEF5C789E55A74 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240911_072825_313992_05C7C8FD X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 --- 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"; +};