From: Xianwei Zhao via B4 Relay <devnull+xianwei.zhao.amlogic.com@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org,
Xianwei Zhao <xianwei.zhao@amlogic.com>
Subject: [PATCH RFC 3/3] arm64: dts: amlogic: a4: add pinctrl node
Date: Wed, 11 Dec 2024 14:47:51 +0800 [thread overview]
Message-ID: <20241211-amlogic-pinctrl-v1-3-410727335119@amlogic.com> (raw)
In-Reply-To: <20241211-amlogic-pinctrl-v1-0-410727335119@amlogic.com>
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
Add pinctrl device to support Amlogic A4 and add uart pinconf.
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi | 146 ++++++++++++++++++++++++++++
1 file changed, 146 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi
index de10e7aebf21..fccae7c9758a 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-a4.dtsi
@@ -5,6 +5,7 @@
#include "amlogic-a4-common.dtsi"
#include <dt-bindings/power/amlogic,a4-pwrc.h>
+#include <dt-bindings/pinctrl/amlogic,pinctrl.h>
/ {
cpus {
#address-cells = <2>;
@@ -48,3 +49,148 @@ pwrc: power-controller {
};
};
};
+
+&apb {
+ periphs_pinctrl: pinctrl@4000 {
+ compatible = "amlogic,pinctrl";
+ reg = <0x0 0x4000 0x0 0x0050>,
+ <0x0 0x40c0 0x0 0x0220>;
+ reg-names = "mux", "gpio";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ gpiob: gpiob {
+ gpio-controller;
+ #gpio-cells = <2>;
+ npins = <14>;
+ bank-index = <AMLOGIC_GPIO_B>;
+ reg-mux-offset = <0>;
+ reg-gpio-offset = <0x60>;
+ bank-name = "GPIOB";
+ };
+
+ gpiod: gpiod {
+ gpio-controller;
+ #gpio-cells = <2>;
+ npins = <16>;
+ bank-index = <AMLOGIC_GPIO_D>;
+ reg-mux-offset = <0x10>;
+ reg-gpio-offset = <0x30>;
+ bank-name = "GPIOD";
+ };
+
+ gpioe: gpioe {
+ gpio-controller;
+ #gpio-cells = <2>;
+ npins = <2>;
+ bank-index = <AMLOGIC_GPIO_E>;
+ reg-mux-offset = <0x12>;
+ reg-gpio-offset = <0x40>;
+ bank-name = "GPIOE";
+ };
+
+ gpiot: gpiot {
+ gpio-controller;
+ #gpio-cells = <2>;
+ npins = <23>;
+ bank-index = <AMLOGIC_GPIO_T>;
+ reg-mux-offset = <0xb>;
+ reg-gpio-offset = <0x20>;
+ bank-name = "GPIOT";
+ };
+
+ gpiox: gpiox {
+ gpio-controller;
+ #gpio-cells = <2>;
+ npins = <18>;
+ bank-index = <AMLOGIC_GPIO_X>;
+ reg-mux-offset = <0x3>;
+ reg-gpio-offset = <0x10>;
+ bank-name = "GPIOX";
+ };
+
+ func-uart-a {
+ uart_a_default: uart-a-pins1{
+ pinmux= <AML_PINMUX(AMLOGIC_GPIO_X, 11, AF1)>,
+ <AML_PINMUX(AMLOGIC_GPIO_X, 12, AF1)>,
+ <AML_PINMUX(AMLOGIC_GPIO_X, 13, AF1)>,
+ <AML_PINMUX(AMLOGIC_GPIO_X, 13, AF1)>;
+ };
+
+ uart-a-pins2{
+ pinmux= <AML_PINMUX(AMLOGIC_GPIO_D, 2, AF3)>,
+ <AML_PINMUX(AMLOGIC_GPIO_D, 3, AF3)>;
+ bias-pull-up;
+ drive-strength-microamp = <4000>;
+ };
+ };
+
+ func-uart-b {
+ uart_b_default: uart-b-default{
+ pinmux= <AML_PINMUX(AMLOGIC_GPIO_E, 0, AF3)>,
+ <AML_PINMUX(AMLOGIC_GPIO_E, 1, AF3)>;
+ bias-pull-up;
+ drive-strength-microamp = <4000>;
+ };
+ };
+
+ func-uart-d {
+ uart_d_default: uart-d-pins1{
+ pinmux= <AML_PINMUX(AMLOGIC_GPIO_T, 18, AF4)>,
+ <AML_PINMUX(AMLOGIC_GPIO_T, 19, AF4)>;
+ bias-pull-up;
+ drive-strength-microamp = <4000>;
+ };
+
+ uart-d-pins2{
+ pinmux= <AML_PINMUX(AMLOGIC_GPIO_T, 7, AF2)>,
+ <AML_PINMUX(AMLOGIC_GPIO_T, 8, AF2)>,
+ <AML_PINMUX(AMLOGIC_GPIO_T, 9, AF2)>,
+ <AML_PINMUX(AMLOGIC_GPIO_T, 10, AF2)>;
+ bias-pull-up;
+ drive-strength-microamp = <4000>;
+ };
+ };
+
+ func-uart-e {
+ uart_e_default: uart-e-pins{
+ pinmux= <AML_PINMUX(AMLOGIC_GPIO_T, 14, AF3)>,
+ <AML_PINMUX(AMLOGIC_GPIO_T, 15, AF3)>,
+ <AML_PINMUX(AMLOGIC_GPIO_T, 16, AF3)>,
+ <AML_PINMUX(AMLOGIC_GPIO_T, 17, AF3)>;
+ bias-pull-up;
+ drive-strength-microamp = <4000>;
+ };
+ };
+ };
+
+ aobus_pinctrl: pinctrl@8e700 {
+ compatible = "amlogic,pinctrl";
+ reg = <0x0 0x8e700 0x0 0x04>,
+ <0x0 0x8e704 0x0 0x60>;
+ reg-names = "mux", "gpio";
+ #address-cells = <2>;
+ #size-cells = <2>;
+
+ gpioao: gpioao {
+ gpio-controller;
+ #gpio-cells = <2>;
+ npins = <7>;
+ bank-index = <AMLOGIC_GPIO_AO>;
+ reg-mux-offset = <0>;
+ reg-gpio-offset = <0>;
+ bank-name = "GPIOAO";
+ };
+
+ test_n: gpiotestn {
+ gpio-controller;
+ #gpio-cells = <2>;
+ npins = <1>;
+ bank-index = <AMLOGIC_GPIO_TEST_N>;
+ reg-mux-offset = <0>;
+ bit-mux-offset = <28>;
+ reg-gpio-offset = <0x10>;
+ bank-name = "TEST_N";
+ };
+ };
+};
--
2.37.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2024-12-11 6:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 6:47 [PATCH RFC 0/3] Pinctrl: Add Amlogic pinctrl driver Xianwei Zhao via B4 Relay
2024-12-11 6:47 ` [PATCH RFC 1/3] dt-bindings: pinctrl: Add support for Amlogic SoCs Xianwei Zhao via B4 Relay
2024-12-17 14:20 ` Rob Herring
2024-12-18 8:47 ` Xianwei Zhao
2024-12-11 6:47 ` [PATCH RFC 2/3] pinctrl: Add driver " Xianwei Zhao via B4 Relay
2024-12-17 14:49 ` Linus Walleij
2024-12-17 14:53 ` Neil Armstrong
2024-12-18 9:37 ` Xianwei Zhao
2024-12-22 9:08 ` Linus Walleij
2024-12-26 7:49 ` Xianwei Zhao
2024-12-27 17:19 ` Linus Walleij
2024-12-27 21:01 ` Martin Blumenstingl
2024-12-31 8:26 ` Xianwei Zhao
2024-12-11 6:47 ` Xianwei Zhao via B4 Relay [this message]
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=20241211-amlogic-pinctrl-v1-3-410727335119@amlogic.com \
--to=devnull+xianwei.zhao.amlogic.com@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=xianwei.zhao@amlogic.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
all inboxes | Powered by JetHome®