Message ID | 20240912-test-v1-14-458fa57c8ccf@analog.com |
---|---|
State | Changes Requested |
Headers | show |
Series | Adding support of ADI ARMv8 ADSP-SC598 SoC. | expand |
Context | Check | Description |
---|---|---|
robh/checkpatch | warning | total: 0 errors, 1 warnings, 102 lines checked |
robh/patch-applied | success | |
robh/dtbs-check | warning | build log |
robh/dt-meta-schema | success |
On Thu, Sep 12, 2024 at 07:24:59PM +0100, Arturs Artamonovs wrote: > Add PINCTRL driver bindings. > > Signed-off-by: Arturs Artamonovs <Arturs.Artamonovs@analog.com> > Co-developed-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> > Signed-off-by: Nathan Barrett-Morrison <nathan.morrison@timesys.com> > Co-developed-by: Greg Malysa <greg.malysa@timesys.com> > Signed-off-by: Greg Malysa <greg.malysa@timesys.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@analog.com> > + - Utsav Agarwal <Utsav.Agarwal@analog.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": Don't need quotes. > + $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 No constraints on the entries? > + > + "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@31004600 { > + 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*/ Missing space ^ New bindings should be dual licensed. > +/* > + * 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 >
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@analog.com> + - Utsav Agarwal <Utsav.Agarwal@analog.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@31004600 { + 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