* [PATCH 1/1] dt-bindings: pinctrl: convert xp,lpc1850-scu.txt to yaml format
@ 2025-06-02 14:39 Frank Li
2025-06-06 2:01 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Frank Li @ 2025-06-02 14:39 UTC (permalink / raw)
To: Linus Walleij, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
open list:PIN CONTROL SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Cc: imx
Convert nxp,lpc1850-scu.txt to yaml format.
Additional changes:
- keep child name *_cfg to align legancy very old platform dts file.
- remove label in examples.
- just keep one examples.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
.../bindings/pinctrl/nxp,lpc1850-scu.txt | 71 ---------------
.../bindings/pinctrl/nxp,lpc1850-scu.yaml | 91 +++++++++++++++++++
2 files changed, 91 insertions(+), 71 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
create mode 100644 Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml
diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
deleted file mode 100644
index bd8b0c69fa447..0000000000000
--- a/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
+++ /dev/null
@@ -1,71 +0,0 @@
-NXP LPC18xx/43xx SCU pin controller Device Tree Bindings
---------------------------------------------------------
-
-Required properties:
-- compatible : Should be "nxp,lpc1850-scu"
-- reg : Address and length of the register set for the device
-- clocks : Clock specifier (see clock bindings for details)
-
-The lpc1850-scu driver uses the generic pin multiplexing and generic pin
-configuration documented in pinctrl-bindings.txt.
-
-The following generic nodes are supported:
- - function
- - pins
- - bias-disable
- - bias-pull-up
- - bias-pull-down
- - drive-strength
- - input-enable
- - input-disable
- - input-schmitt-enable
- - input-schmitt-disable
- - slew-rate
-
-NXP specific properties:
- - nxp,gpio-pin-interrupt : Assign pin to gpio pin interrupt controller
- irq number 0 to 7. See example below.
-
-Not all pins support all properties so either refer to the NXP 1850/4350
-user manual or the pin table in the pinctrl-lpc18xx driver for supported
-pin properties.
-
-Example:
-pinctrl: pinctrl@40086000 {
- compatible = "nxp,lpc1850-scu";
- reg = <0x40086000 0x1000>;
- clocks = <&ccu1 CLK_CPU_SCU>;
-
- i2c0_pins: i2c0-pins {
- i2c0_pins_cfg {
- pins = "i2c0_scl", "i2c0_sda";
- function = "i2c0";
- input-enable;
- };
- };
-
- uart0_pins: uart0-pins {
- uart0_rx_cfg {
- pins = "pf_11";
- function = "uart0";
- bias-disable;
- input-enable;
- };
-
- uart0_tx_cfg {
- pins = "pf_10";
- function = "uart0";
- bias-disable;
- };
- };
-
- gpio_joystick_pins: gpio-joystick-pins {
- gpio_joystick_1_cfg {
- pins = "p9_0";
- function = "gpio";
- nxp,gpio-pin-interrupt = <0>;
- input-enable;
- bias-disable;
- };
- };
-};
diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml
new file mode 100644
index 0000000000000..4df47fee3a228
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml
@@ -0,0 +1,91 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pinctrl/nxp,lpc1850-scu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP LPC18xx/43xx SCU pin controller
+
+description: |
+ The following generic nodes are supported:
+ - function
+ - pins
+ - bias-disable
+ - bias-pull-up
+ - bias-pull-down
+ - drive-strength
+ - input-enable
+ - input-disable
+ - input-schmitt-enable
+ - input-schmitt-disable
+ - slew-rat
+ Not all pins support all properties so either refer to the NXP 1850/4350
+ user manual or the pin table in the pinctrl-lpc18xx driver for supported
+ pin properties.
+
+maintainers:
+ - Frank Li <Frank.Li@nxp.com>
+
+properties:
+ compatible:
+ const: nxp,lpc1850-scu
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+patternProperties:
+ '-pins$':
+ type: object
+ additionalProperties: false
+
+ patternProperties:
+ '_cfg$':
+ type: object
+
+ allOf:
+ - $ref: pincfg-node.yaml#
+ - $ref: pinmux-node.yaml#
+
+ unevaluatedProperties: false
+
+ properties:
+ nxp,gpio-pin-interrupt:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 7
+ description:
+ Assign pin to gpio pin interrupt controller
+ irq number 0 to 7. See example below.
+
+required:
+ - compatible
+ - reg
+ - clocks
+
+allOf:
+ - $ref: pinctrl.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/lpc18xx-ccu.h>
+
+ pinctrl@40086000 {
+ compatible = "nxp,lpc1850-scu";
+ reg = <0x40086000 0x1000>;
+ clocks = <&ccu1 CLK_CPU_SCU>;
+
+ gpio-joystick-pins {
+ gpio-joystick-1_cfg {
+ pins = "p9_0";
+ function = "gpio";
+ nxp,gpio-pin-interrupt = <0>;
+ input-enable;
+ bias-disable;
+ };
+ };
+ };
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] dt-bindings: pinctrl: convert xp,lpc1850-scu.txt to yaml format
2025-06-02 14:39 [PATCH 1/1] dt-bindings: pinctrl: convert xp,lpc1850-scu.txt to yaml format Frank Li
@ 2025-06-06 2:01 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2025-06-06 2:01 UTC (permalink / raw)
To: Frank Li
Cc: Linus Walleij, Krzysztof Kozlowski, Conor Dooley,
open list:PIN CONTROL SUBSYSTEM,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list, imx
On Mon, Jun 02, 2025 at 10:39:29AM -0400, Frank Li wrote:
> Convert nxp,lpc1850-scu.txt to yaml format.
>
> Additional changes:
> - keep child name *_cfg to align legancy very old platform dts file.
> - remove label in examples.
> - just keep one examples.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> .../bindings/pinctrl/nxp,lpc1850-scu.txt | 71 ---------------
> .../bindings/pinctrl/nxp,lpc1850-scu.yaml | 91 +++++++++++++++++++
> 2 files changed, 91 insertions(+), 71 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
> create mode 100644 Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
> deleted file mode 100644
> index bd8b0c69fa447..0000000000000
> --- a/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt
> +++ /dev/null
> @@ -1,71 +0,0 @@
> -NXP LPC18xx/43xx SCU pin controller Device Tree Bindings
> ---------------------------------------------------------
> -
> -Required properties:
> -- compatible : Should be "nxp,lpc1850-scu"
> -- reg : Address and length of the register set for the device
> -- clocks : Clock specifier (see clock bindings for details)
> -
> -The lpc1850-scu driver uses the generic pin multiplexing and generic pin
> -configuration documented in pinctrl-bindings.txt.
> -
> -The following generic nodes are supported:
> - - function
> - - pins
> - - bias-disable
> - - bias-pull-up
> - - bias-pull-down
> - - drive-strength
> - - input-enable
> - - input-disable
> - - input-schmitt-enable
> - - input-schmitt-disable
> - - slew-rate
> -
> -NXP specific properties:
> - - nxp,gpio-pin-interrupt : Assign pin to gpio pin interrupt controller
> - irq number 0 to 7. See example below.
> -
> -Not all pins support all properties so either refer to the NXP 1850/4350
> -user manual or the pin table in the pinctrl-lpc18xx driver for supported
> -pin properties.
> -
> -Example:
> -pinctrl: pinctrl@40086000 {
> - compatible = "nxp,lpc1850-scu";
> - reg = <0x40086000 0x1000>;
> - clocks = <&ccu1 CLK_CPU_SCU>;
> -
> - i2c0_pins: i2c0-pins {
> - i2c0_pins_cfg {
> - pins = "i2c0_scl", "i2c0_sda";
> - function = "i2c0";
> - input-enable;
> - };
> - };
> -
> - uart0_pins: uart0-pins {
> - uart0_rx_cfg {
> - pins = "pf_11";
> - function = "uart0";
> - bias-disable;
> - input-enable;
> - };
> -
> - uart0_tx_cfg {
> - pins = "pf_10";
> - function = "uart0";
> - bias-disable;
> - };
> - };
> -
> - gpio_joystick_pins: gpio-joystick-pins {
> - gpio_joystick_1_cfg {
> - pins = "p9_0";
> - function = "gpio";
> - nxp,gpio-pin-interrupt = <0>;
> - input-enable;
> - bias-disable;
> - };
> - };
> -};
> diff --git a/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml
> new file mode 100644
> index 0000000000000..4df47fee3a228
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.yaml
> @@ -0,0 +1,91 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/nxp,lpc1850-scu.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP LPC18xx/43xx SCU pin controller
> +
> +description: |
> + The following generic nodes are supported:
> + - function
> + - pins
> + - bias-disable
> + - bias-pull-up
> + - bias-pull-down
> + - drive-strength
> + - input-enable
> + - input-disable
> + - input-schmitt-enable
> + - input-schmitt-disable
> + - slew-rat
Drop this list. Or list them in the schema if you want to keep it.
> + Not all pins support all properties so either refer to the NXP 1850/4350
> + user manual or the pin table in the pinctrl-lpc18xx driver for supported
> + pin properties.
> +
> +maintainers:
> + - Frank Li <Frank.Li@nxp.com>
> +
> +properties:
> + compatible:
> + const: nxp,lpc1850-scu
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> +patternProperties:
> + '-pins$':
> + type: object
> + additionalProperties: false
> +
> + patternProperties:
> + '_cfg$':
> + type: object
> +
> + allOf:
> + - $ref: pincfg-node.yaml#
> + - $ref: pinmux-node.yaml#
> +
> + unevaluatedProperties: false
> +
> + properties:
> + nxp,gpio-pin-interrupt:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 0
> + maximum: 7
> + description:
> + Assign pin to gpio pin interrupt controller
> + irq number 0 to 7. See example below.
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> +
> +allOf:
> + - $ref: pinctrl.yaml#
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/lpc18xx-ccu.h>
> +
> + pinctrl@40086000 {
> + compatible = "nxp,lpc1850-scu";
> + reg = <0x40086000 0x1000>;
> + clocks = <&ccu1 CLK_CPU_SCU>;
> +
> + gpio-joystick-pins {
> + gpio-joystick-1_cfg {
> + pins = "p9_0";
> + function = "gpio";
> + nxp,gpio-pin-interrupt = <0>;
> + input-enable;
> + bias-disable;
> + };
> + };
> + };
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-06 2:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-02 14:39 [PATCH 1/1] dt-bindings: pinctrl: convert xp,lpc1850-scu.txt to yaml format Frank Li
2025-06-06 2:01 ` Rob Herring
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).