[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240912-test-v1-14-458fa57c8ccf@analog.com>
Date: Thu, 12 Sep 2024 19:24:59 +0100
From: Arturs Artamonovs via B4 Relay <devnull+arturs.artamonovs.analog.com@...nel.org>
To: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Greg Malysa <greg.malysa@...esys.com>,
Philipp Zabel <p.zabel@...gutronix.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Utsav Agarwal <Utsav.Agarwal@...log.com>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Thomas Gleixner <tglx@...utronix.de>,
Andi Shyti <andi.shyti@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, Arnd Bergmann <arnd@...db.de>,
Olof Johansson <olof@...om.net>, soc@...nel.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-i2c@...r.kernel.org,
linux-serial@...r.kernel.org,
Arturs Artamonovs <arturs.artamonovs@...log.com>, adsp-linux@...log.com,
Arturs Artamonovs <Arturs.Artamonovs@...log.com>,
Nathan Barrett-Morrison <nathan.morrison@...esys.com>
Subject: [PATCH 14/21] dt-bindings: pinctrl: adi,adsp-pinctrl: add bindings
From: Arturs Artamonovs <arturs.artamonovs@...log.com>
Add PINCTRL driver bindings.
Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@...log.com>
Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@...esys.com>
Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@...esys.com>
Co-developed-by: Greg Malysa <greg.malysa@...esys.com>
Signed-off-by: Greg Malysa <greg.malysa@...esys.com>
---
.../bindings/pinctrl/adi,adsp-pinctrl.yaml | 83 ++++++++++++++++++++++
include/dt-bindings/pinctrl/adi-adsp.h | 19 +++++
2 files changed, 102 insertions(+)
diff --git a/Documentation/devicetree/bindings/pinctrl/adi,adsp-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/adi,adsp-pinctrl.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..073442b4f680bf536f631b4c17a1d3195c2233d6
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/adi,adsp-pinctrl.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/adi,adsp-pinctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices Pinmuxing Control for SC5XX Processor Family
+
+maintainers:
+ - Arturs Artamonovs <arturs.artamonovs@...log.com>
+ - Utsav Agarwal <Utsav.Agarwal@...log.com>
+
+description: |
+ Pinmuxing Control Driver for Configuring Processor Pins/Pads
+
+properties:
+ compatible:
+ enum:
+ - adi,adsp-pinctrl
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 1
+
+ reg:
+ maxItems: 1
+
+ "adi,port-sizes":
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ maxItems: 9
+ description: Space delimited integer list denoting number of pins per port
+ Ports A-I exist, so this is up to 9 items long
+
+ "adi,no-drive-strength":
+ type: boolean
+ description: Indicate missing drive strength registers
+
+ "adi,no-pull-up-down":
+ type: boolean
+ description: Indicate missing pull up/down enable registers
+
+patternProperties:
+ '-pins$':
+ type: object
+ additionalProperties: false
+
+ properties:
+ pins:
+ type: object
+ description: |
+ A pinctrl node should contain a pin property, specifying the actual
+ pins to use.
+
+ properties:
+ pinmux:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description: |
+ pinmux is used to specify which of the available functionalities
+ for a given pin are actually used.
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - "#address-cells"
+ - "#size-cells"
+ - reg
+ - "adi,port-sizes"
+
+additionalProperties: false
+
+examples:
+ - |
+ pinctrl0: pinctrl@...04600 {
+ compatible = "adi,adsp-pinctrl";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0x31004600 0x400>;
+ adi,port-sizes = <16 16 16 16 16 16 16 16 7>;
+ };
+
diff --git a/include/dt-bindings/pinctrl/adi-adsp.h b/include/dt-bindings/pinctrl/adi-adsp.h
new file mode 100644
index 0000000000000000000000000000000000000000..dc5b86a0d9190acdd242a6ba4972c3aac7a61821
--- /dev/null
+++ b/include/dt-bindings/pinctrl/adi-adsp.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0*/
+/*
+ * Macros for populating pinmux properties on the pincontroller
+ *
+ * Copyright 2022-2024 - Analog Devices Inc.
+ */
+
+#ifndef DT_BINDINGS_PINCTRL_ADI_ADSP_H
+#define DT_BINDINGS_PINCTRL_ADI_ADSP_H
+
+#define ADI_ADSP_PINFUNC_GPIO 0
+#define ADI_ADSP_PINFUNC_ALT0 1
+#define ADI_ADSP_PINFUNC_ALT1 2
+#define ADI_ADSP_PINFUNC_ALT2 3
+#define ADI_ADSP_PINFUNC_ALT3 4
+
+#define ADI_ADSP_PINMUX(port, pin, func) ((((port - 'A')*16 + pin) << 8) + func)
+
+#endif
--
2.25.1
Powered by blists - more mailing lists