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>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
Xianwei Zhao <xianwei.zhao@amlogic.com>
Subject: [PATCH v2 1/3] dt-bindings: pinctrl: Add support for Amlogic A4 SoCs
Date: Mon, 14 Oct 2024 17:05:51 +0800 [thread overview]
Message-ID: <20241014-a4_pinctrl-v2-1-3e74a65c285e@amlogic.com> (raw)
In-Reply-To: <20241014-a4_pinctrl-v2-0-3e74a65c285e@amlogic.com>
From: Xianwei Zhao <xianwei.zhao@amlogic.com>
Add the new compatible name for Amlogic A4 pin controller, and add
a new dt-binding header file which document the detail pin names.
Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
---
.../bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml | 2 ++
include/dt-bindings/gpio/amlogic-a4-gpio.h | 38 ++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml b/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml
index d9e0b2c48e84..f5eefa0fab5b 100644
--- a/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl-a1.yaml
@@ -15,6 +15,8 @@ allOf:
properties:
compatible:
enum:
+ - amlogic,a4-aobus-pinctrl
+ - amlogic,a4-periphs-pinctrl
- amlogic,c3-periphs-pinctrl
- amlogic,t7-periphs-pinctrl
- amlogic,meson-a1-periphs-pinctrl
diff --git a/include/dt-bindings/gpio/amlogic-a4-gpio.h b/include/dt-bindings/gpio/amlogic-a4-gpio.h
new file mode 100644
index 000000000000..e39f5e041875
--- /dev/null
+++ b/include/dt-bindings/gpio/amlogic-a4-gpio.h
@@ -0,0 +1,38 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */
+/*
+ * Copyright (c) 2024 Amlogic, Inc. All rights reserved.
+ * Author: Xianwei Zhao <xianwei.zhao@amlogic.com>
+ */
+
+#ifndef _DT_BINDINGS_AMLOGIC_A4_GPIO_H
+#define _DT_BINDINGS_AMLOGIC_A4_GPIO_H
+
+/* Standard port */
+#define GPIOB_START 0
+#define GPIOB_NUM 14
+
+#define GPIOD_START (GPIOB_START + GPIOB_NUM)
+#define GPIOD_NUM 16
+
+#define GPIOE_START (GPIOD_START + GPIOD_NUM)
+#define GPIOE_NUM 2
+
+#define GPIOT_START (GPIOE_START + GPIOE_NUM)
+#define GPIOT_NUM 23
+
+#define GPIOX_START (GPIOT_START + GPIOT_NUM)
+#define GPIOX_NUM 18
+
+#define PERIPHS_PIN_NUM (GPIOX_START + GPIOX_NUM)
+
+/* Aobus port */
+#define GPIOAO_START 0
+#define GPIOAO_NUM 7
+
+/* It's a special definition, put at the end, just 1 num */
+#define GPIO_TEST_N (GPIOAO_START + GPIOAO_NUM)
+#define AOBUS_PIN_NUM (GPIO_TEST_N + 1)
+
+#define AMLOGIC_GPIO(port, offset) (port##_START + (offset))
+
+#endif /* _DT_BINDINGS_AMLOGIC_A4_GPIO_H */
--
2.37.1
next prev parent reply other threads:[~2024-10-14 9:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 9:05 [PATCH v2 0/3] Pinctrl: A4: Add pinctrl driver Xianwei Zhao via B4 Relay
2024-10-14 9:05 ` Xianwei Zhao via B4 Relay [this message]
2024-10-15 5:59 ` [PATCH v2 1/3] dt-bindings: pinctrl: Add support for Amlogic A4 SoCs Krzysztof Kozlowski
2024-10-14 9:05 ` [PATCH v2 2/3] pinctrl: meson: Add driver " Xianwei Zhao via B4 Relay
2024-10-15 6:01 ` Krzysztof Kozlowski
2024-10-15 7:54 ` Xianwei Zhao
2024-10-15 7:59 ` Krzysztof Kozlowski
2024-10-15 8:08 ` Xianwei Zhao
2024-10-15 8:11 ` Krzysztof Kozlowski
2024-10-15 8:37 ` Xianwei Zhao
2024-10-14 9:05 ` [PATCH v2 3/3] arm64: dts: amlogic: a4: add pinctrl node Xianwei Zhao via B4 Relay
2024-10-15 6:00 ` Krzysztof Kozlowski
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=20241014-a4_pinctrl-v2-1-3e74a65c285e@amlogic.com \
--to=devnull+xianwei.zhao.amlogic.com@kernel.org \
--cc=brgl@bgdev.pl \
--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;
as well as URLs for NNTP newsgroup(s).