From: Greg Malysa <malysagreg@gmail.com>
To: u-boot@lists.denx.de
Cc: adsp-linux@analog.com, Greg Malysa <malysagreg@gmail.com>,
Vasileios Bimpikas <vasileios.bimpikas@analog.com>,
Utsav Agarwal <utsav.agarwal@analog.com>,
Arturs Artamonovs <arturs.artamonovs@analog.com>,
Caleb Connolly <caleb.connolly@linaro.org>,
Greg Malysa <greg.malysa@timesys.com>,
Ian Roberts <ian.roberts@timesys.com>,
Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Nathan Barrett-Morrison <nathan.morrison@timesys.com>,
Oliver Gaskell <Oliver.Gaskell@analog.com>,
Robert Marko <robert.marko@sartura.hr>,
Sam Protsenko <semen.protsenko@linaro.org>,
Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>
Subject: [PATCH v3 02/12] doc: Add dt-bindings and descriptions for ADI SC5xx-family pinctrl
Date: Wed, 26 Feb 2025 12:30:24 -0500 [thread overview]
Message-ID: <20250226173150.13198-3-malysagreg@gmail.com> (raw)
In-Reply-To: <20250226173150.13198-1-malysagreg@gmail.com>
This adds the necessary dt-bindings and documentation to use the ADI
SC5xx pinctrl driver in a device tree. It is not yet available upstream
in the Linux kernel. Eventually, it will be moved there.
Signed-off-by: Vasileios Bimpikas <vasileios.bimpikas@analog.com>
Signed-off-by: Utsav Agarwal <utsav.agarwal@analog.com>
Signed-off-by: Arturs Artamonovs <arturs.artamonovs@analog.com>
Signed-off-by: Greg Malysa <malysagreg@gmail.com>
---
(no changes since v1)
MAINTAINERS | 2 +
.../pinctrl/adi,adsp-pinctrl.yaml | 73 +++++++++++++++++++
include/dt-bindings/pinctrl/adi-adsp.h | 21 ++++++
3 files changed, 96 insertions(+)
create mode 100644 doc/device-tree-bindings/pinctrl/adi,adsp-pinctrl.yaml
create mode 100644 include/dt-bindings/pinctrl/adi-adsp.h
diff --git a/MAINTAINERS b/MAINTAINERS
index af8d0b7d5e9..abdb418b599 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -629,12 +629,14 @@ F: arch/arm/mach-sc5xx/
F: board/adi/
F: doc/device-tree-bindings/arm/adi/adi,sc5xx.yaml
F: doc/device-tree-bindings/clock/adi,sc5xx-clocks.yaml
+F: doc/device-tree-bindings/pinctrl/adi,adsp-pinctrl.yaml
F: doc/device-tree-bindings/timer/adi,sc5xx-gptimer.yaml
F: drivers/clk/adi/
F: drivers/pinctrl/pinctrl-adi-adsp.c
F: drivers/serial/serial_adi_uart4.c
F: drivers/timer/adi_sc5xx_timer.c
F: include/configs/sc5*
+F: include/dt-bindings/pinctrl/adi-adsp.h
F: include/env/adi/
ARM SNAPDRAGON
diff --git a/doc/device-tree-bindings/pinctrl/adi,adsp-pinctrl.yaml b/doc/device-tree-bindings/pinctrl/adi,adsp-pinctrl.yaml
new file mode 100644
index 00000000000..418ebd5ce41
--- /dev/null
+++ b/doc/device-tree-bindings/pinctrl/adi,adsp-pinctrl.yaml
@@ -0,0 +1,73 @@
+# SPDX-License-Identifier: (GPL-2.0+ 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: Pinctrl Driver for Analog Devices SC5xx Processors
+
+maintainers:
+ - Vasileios Bimpikas <vasileios.bimpikas@analog.com>
+ - Utsav Agarwal <utsav.agarwal@analog.com>
+ - Arturs Artamonovs <arturs.artamonovs@analog.com>
+
+description: |
+ This driver provides an interface for performing pin configuration
+ Analog Devices SoCs using the ADSP PORT hardware for pin
+ configuration according to the HRM. Currently this is only the
+ SC5xx series.
+
+properties:
+ compatible:
+ const: adi,adsp-pinctrl
+
+ reg:
+ maxItems: 1
+
+ adi,npins:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Total number of pins available to this SoC's pin controller,
+ found in the HRM.
+
+patternProperties:
+ '_pins$':
+ type: object
+
+ properties:
+ adi,pins:
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+ description:
+ For n pins, 2n values must be provided as a sequence of pin
+ name as identified with the ADI_ADSP_PIN() macro and a pin
+ function constant, both defined in
+ include/dt-bindings/pinctrl/adi-adsp.h.
+
+ required:
+ - adi,pins
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - adi,npins
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/pinctrl/adi-adsp.h>
+
+ soc {
+ pinctrl0: pinctrl@0x31004000 {
+ compatible = "adi,adsp-pinctrl";
+ reg = <0x31004000 0x500>;
+ adi,npins = <135>;
+ uart0_default: uart0_pins {
+ adi,pins = <ADI_ADSP_PIN('A', 6) ADI_ADSP_PINFUNC_ALT1>,
+ <ADI_ADSP_PIN('A', 7) ADI_ADSP_PINFUNC_ALT1>;
+ };
+ };
+
+ };
diff --git a/include/dt-bindings/pinctrl/adi-adsp.h b/include/dt-bindings/pinctrl/adi-adsp.h
new file mode 100644
index 00000000000..7dc8a1ef5c4
--- /dev/null
+++ b/include/dt-bindings/pinctrl/adi-adsp.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * (C) Copyright 2022 - Analog Devices, Inc.
+ *
+ * Written and/or maintained by Timesys Corporation
+ *
+ * Contact: Nathan Barrett-Morrison <nathan.morrison@timesys.com>
+ * Contact: Greg Malysa <greg.malysa@timesys.com>
+ *
+ */
+
+#ifndef DT_BINDINGS_PINCTRL_ADI_ADSP
+#define DT_BINDINGS_PINCTRL_ADI_ADSP
+
+#define ADI_ADSP_PIN(port, pin) (16 * ((port) - 'A') + (pin))
+#define ADI_ADSP_PINFUNC_ALT0 0
+#define ADI_ADSP_PINFUNC_ALT1 1
+#define ADI_ADSP_PINFUNC_ALT2 2
+#define ADI_ADSP_PINFUNC_ALT3 3
+
+#endif
--
2.45.2
next prev parent reply other threads:[~2025-02-26 17:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-26 17:30 [PATCH v3 00/12] drivers: Driver support for ADI SC5xx SoCs Greg Malysa
2025-02-26 17:30 ` [PATCH v3 01/12] pinctrl: Add support for ADI SC5XX-family pinctrl Greg Malysa
2025-02-26 17:30 ` Greg Malysa [this message]
2025-02-26 17:30 ` [PATCH v3 03/12] gpio: Add support for SC5XX-family processor GPIO driver Greg Malysa
2025-02-26 17:30 ` [PATCH v3 04/12] gpio: Add support for ADI ADP5588 GPIO expander chips Greg Malysa
2025-02-26 17:30 ` [PATCH v3 05/12] usb: musb-new: Add support for Analog Devices SC5xx SoCs Greg Malysa
2025-02-26 17:30 ` [PATCH v3 06/12] i2c: Add support for ADI SC5XX-family I2C peripheral Greg Malysa
2025-03-06 5:56 ` Heiko Schocher
2025-02-26 17:30 ` [PATCH v3 07/12] net: Add support for ADI SC5xx SoCs with DWC QoS ethernet Greg Malysa
2025-02-26 17:30 ` [PATCH v3 08/12] watchdog: Add support for ADI SC5XX-family watchdog peripheral Greg Malysa
2025-02-27 8:44 ` Stefan Roese
2025-02-26 17:30 ` [PATCH v3 09/12] dma: Add driver for ADI SC5xx-family SoC MDMA functionality Greg Malysa
2025-02-26 17:30 ` [PATCH v3 10/12] remoteproc: Add in SHARC loading for ADI SC5XX-family processors Greg Malysa
2025-02-26 17:30 ` [PATCH v3 11/12] spi: Add support for ADI SC5XX-family processor SPI peripherals Greg Malysa
2025-02-26 17:30 ` [PATCH v3 12/12] mmc: Add support for ADI SC5XX-family processor SDHCI peripherals Greg Malysa
2025-03-12 19:43 ` [PATCH v3 00/12] drivers: Driver support for ADI SC5xx SoCs Tom Rini
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=20250226173150.13198-3-malysagreg@gmail.com \
--to=malysagreg@gmail.com \
--cc=Oliver.Gaskell@analog.com \
--cc=adsp-linux@analog.com \
--cc=arturs.artamonovs@analog.com \
--cc=caleb.connolly@linaro.org \
--cc=greg.malysa@timesys.com \
--cc=ian.roberts@timesys.com \
--cc=mkorpershoek@baylibre.com \
--cc=nathan.morrison@timesys.com \
--cc=robert.marko@sartura.hr \
--cc=semen.protsenko@linaro.org \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=utsav.agarwal@analog.com \
--cc=vasileios.bimpikas@analog.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