From: Christian Marangi <ansuelsmth@gmail.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Sean Wang <sean.wang@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Benjamin Larsson <benjamin.larsson@genexis.eu>,
linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Cc: Christian Marangi <ansuelsmth@gmail.com>
Subject: [PATCH 5/6] dt-bindings: pinctrl: airoha: Document AN7583 Pin Controller
Date: Wed, 28 May 2025 00:20:37 +0200 [thread overview]
Message-ID: <20250527222040.32000-6-ansuelsmth@gmail.com> (raw)
In-Reply-To: <20250527222040.32000-1-ansuelsmth@gmail.com>
Document Airoha AN7583 Pin Controller based on Airoha EN7581 with some
minor difference on some function group.
Make the PHY LEDs, pcie_reset and PCM SPI function dependent of the
compatible and define the different group for AN7583.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
.../pinctrl/airoha,en7581-pinctrl.yaml | 297 ++++++++++++------
1 file changed, 207 insertions(+), 90 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/airoha,en7581-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/airoha,en7581-pinctrl.yaml
index 21fd4f1ba78b..38511ad2f9e6 100644
--- a/Documentation/devicetree/bindings/pinctrl/airoha,en7581-pinctrl.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/airoha,en7581-pinctrl.yaml
@@ -4,17 +4,19 @@
$id: http://devicetree.org/schemas/pinctrl/airoha,en7581-pinctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
-title: Airoha EN7581 Pin Controller
+title: Airoha EN7581/AN7583 Pin Controller
maintainers:
- Lorenzo Bianconi <lorenzo@kernel.org>
description:
- The Airoha's EN7581 Pin controller is used to control SoC pins.
+ The Airoha's EN7581/AN7583 Pin controller is used to control SoC pins.
properties:
compatible:
- const: airoha,en7581-pinctrl
+ enum:
+ - airoha,en7581-pinctrl
+ - airoha,an7583-pinctrl
interrupts:
maxItems: 1
@@ -32,9 +34,6 @@ properties:
'#interrupt-cells':
const: 2
-allOf:
- - $ref: pinctrl.yaml#
-
required:
- compatible
- interrupts
@@ -151,18 +150,6 @@ patternProperties:
items:
enum: [spi_quad, spi_cs1]
maxItems: 2
- - if:
- properties:
- function:
- const: pcm_spi
- then:
- properties:
- groups:
- items:
- enum: [pcm_spi, pcm_spi_int, pcm_spi_rst, pcm_spi_cs1,
- pcm_spi_cs2_p156, pcm_spi_cs2_p128, pcm_spi_cs3,
- pcm_spi_cs4]
- maxItems: 7
- if:
properties:
function:
@@ -187,14 +174,6 @@ patternProperties:
properties:
groups:
enum: [pnand]
- - if:
- properties:
- function:
- const: pcie_reset
- then:
- properties:
- groups:
- enum: [pcie_reset0, pcie_reset1, pcie_reset2]
- if:
properties:
function:
@@ -209,70 +188,6 @@ patternProperties:
gpio26, gpio27, gpio28, gpio29, gpio30, gpio31,
gpio36, gpio37, gpio38, gpio39, gpio40, gpio41,
gpio42, gpio43, gpio44, gpio45, gpio46, gpio47]
- - if:
- properties:
- function:
- const: phy1_led0
- then:
- properties:
- groups:
- enum: [gpio33, gpio34, gpio35, gpio42]
- - if:
- properties:
- function:
- const: phy2_led0
- then:
- properties:
- groups:
- enum: [gpio33, gpio34, gpio35, gpio42]
- - if:
- properties:
- function:
- const: phy3_led0
- then:
- properties:
- groups:
- enum: [gpio33, gpio34, gpio35, gpio42]
- - if:
- properties:
- function:
- const: phy4_led0
- then:
- properties:
- groups:
- enum: [gpio33, gpio34, gpio35, gpio42]
- - if:
- properties:
- function:
- const: phy1_led1
- then:
- properties:
- groups:
- enum: [gpio43, gpio44, gpio45, gpio46]
- - if:
- properties:
- function:
- const: phy2_led1
- then:
- properties:
- groups:
- enum: [gpio43, gpio44, gpio45, gpio46]
- - if:
- properties:
- function:
- const: phy3_led1
- then:
- properties:
- groups:
- enum: [gpio43, gpio44, gpio45, gpio46]
- - if:
- properties:
- function:
- const: phy4_led1
- then:
- properties:
- groups:
- enum: [gpio43, gpio44, gpio45, gpio46]
additionalProperties: false
@@ -331,6 +246,208 @@ patternProperties:
additionalProperties: false
+allOf:
+ - $ref: pinctrl.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: airoha,en7581-pinctrl
+ then:
+ patternProperties:
+ '-pins$':
+ type: object
+
+ patternProperties:
+ '^mux(-|$)':
+ type: object
+
+ allOf:
+ - if:
+ properties:
+ function:
+ const: pcm_spi
+ then:
+ properties:
+ groups:
+ items:
+ enum: [pcm_spi, pcm_spi_int, pcm_spi_rst, pcm_spi_cs1,
+ pcm_spi_cs2_p156, pcm_spi_cs2_p128, pcm_spi_cs3,
+ pcm_spi_cs4]
+ maxItems: 7
+ - if:
+ properties:
+ function:
+ const: pcie_reset
+ then:
+ properties:
+ groups:
+ enum: [pcie_reset0, pcie_reset1, pcie_reset2]
+ - if:
+ properties:
+ function:
+ const: phy1_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio33, gpio34, gpio35, gpio42]
+ - if:
+ properties:
+ function:
+ const: phy2_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio33, gpio34, gpio35, gpio42]
+ - if:
+ properties:
+ function:
+ const: phy3_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio33, gpio34, gpio35, gpio42]
+ - if:
+ properties:
+ function:
+ const: phy4_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio33, gpio34, gpio35, gpio42]
+ - if:
+ properties:
+ function:
+ const: phy1_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio43, gpio44, gpio45, gpio46]
+ - if:
+ properties:
+ function:
+ const: phy2_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio43, gpio44, gpio45, gpio46]
+ - if:
+ properties:
+ function:
+ const: phy3_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio43, gpio44, gpio45, gpio46]
+ - if:
+ properties:
+ function:
+ const: phy4_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio43, gpio44, gpio45, gpio46]
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: airoha,an7583-pinctrl
+ then:
+ patternProperties:
+ '-pins$':
+ type: object
+
+ patternProperties:
+ '^mux(-|$)':
+ type: object
+
+ allOf:
+ - if:
+ properties:
+ function:
+ const: pcm_spi
+ then:
+ properties:
+ groups:
+ items:
+ enum: [pcm_spi, pcm_spi_int, pcm_spi_rst, pcm_spi_cs1,
+ pcm_spi_cs2, pcm_spi_cs3, pcm_spi_cs4]
+ maxItems: 7
+ - if:
+ properties:
+ function:
+ const: pcie_reset
+ then:
+ properties:
+ groups:
+ enum: [pcie_reset0, pcie_reset1]
+ - if:
+ properties:
+ function:
+ const: phy1_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio1, gpio2, gpio3, gpio4]
+ - if:
+ properties:
+ function:
+ const: phy2_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio1, gpio2, gpio3, gpio4]
+ - if:
+ properties:
+ function:
+ const: phy3_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio1, gpio2, gpio3, gpio4]
+ - if:
+ properties:
+ function:
+ const: phy4_led0
+ then:
+ properties:
+ groups:
+ enum: [gpio1, gpio2, gpio3, gpio4]
+ - if:
+ properties:
+ function:
+ const: phy1_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio8, gpio9, gpio10, gpio11]
+ - if:
+ properties:
+ function:
+ const: phy2_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio8, gpio9, gpio10, gpio11]
+ - if:
+ properties:
+ function:
+ const: phy3_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio8, gpio9, gpio10, gpio11]
+ - if:
+ properties:
+ function:
+ const: phy4_led1
+ then:
+ properties:
+ groups:
+ enum: [gpio8, gpio9, gpio10, gpio11]
+
examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>
--
2.48.1
next prev parent reply other threads:[~2025-05-27 22:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-27 22:20 [PATCH 0/6] pinctrl: Add Airoha AN7583 support Christian Marangi
2025-05-27 22:20 ` [PATCH 1/6] pinctrl: airoha: fix wrong PHY LED mux value for LED1 GPIO46 Christian Marangi
2025-05-28 7:16 ` Lorenzo Bianconi
2025-05-27 22:20 ` [PATCH 2/6] pinctrl: mediatek: airoha: generalize pins/group/function/confs handling Christian Marangi
2025-05-28 8:07 ` Lorenzo Bianconi
2025-05-31 13:29 ` Christian Marangi
2025-05-27 22:20 ` [PATCH 3/6] pinctrl: airoha: convert PHY LED GPIO to macro Christian Marangi
2025-05-28 8:21 ` Lorenzo Bianconi
2025-05-27 22:20 ` [PATCH 4/6] pinctrl: airoha: convert PWM " Christian Marangi
2025-05-28 8:22 ` Lorenzo Bianconi
2025-05-27 22:20 ` Christian Marangi [this message]
2025-06-05 19:55 ` [PATCH 5/6] dt-bindings: pinctrl: airoha: Document AN7583 Pin Controller Rob Herring
2025-05-27 22:20 ` [PATCH 6/6] pinctrl: airoha: add support for Airoha AN7583 PINs Christian Marangi
2025-05-28 9:20 ` Benjamin Larsson
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=20250527222040.32000-6-ansuelsmth@gmail.com \
--to=ansuelsmth@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=benjamin.larsson@genexis.eu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=robh@kernel.org \
--cc=sean.wang@kernel.org \
/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®