[PATCH v3] dt-bindings: pinctrl: Convert Amlogic Meson pinctrl binding
Rob Herring
robh at kernel.org
Tue Jan 31 18:06:47 PST 2023
On Mon, Jan 30, 2023 at 10:00:24PM +0100, Heiner Kallweit wrote:
> Convert Amlogic Meson pinctrl binding to yaml.
>
> Signed-off-by: Heiner Kallweit <hkallweit1 at gmail.com>
> ---
> v2:
> - consider that more than one compatible can be set
> - remove bus part from example
> v3:
> - remove minItem/maxItem properties for compatible
> ---
> .../pinctrl/amlogic,meson-pinctrl.yaml | 122 ++++++++++++++++++
> .../bindings/pinctrl/meson,pinctrl.txt | 94 --------------
> 2 files changed, 122 insertions(+), 94 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl.yaml
> delete mode 100644 Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl.yaml
> new file mode 100644
> index 000000000..7aaae606b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/amlogic,meson-pinctrl.yaml
> @@ -0,0 +1,122 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/amlogic,meson-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Amlogic Meson pinmux controller
> +
> +maintainers:
> + - Neil Armstrong <neil.armstrong at linaro.org>
> +
> +allOf:
> + - $ref: pinctrl.yaml#
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - amlogic,meson8-cbus-pinctrl
> + - amlogic,meson8b-cbus-pinctrl
> + - amlogic,meson8m2-cbus-pinctrl
> + - amlogic,meson8-aobus-pinctrl
> + - amlogic,meson8b-aobus-pinctrl
> + - amlogic,meson8m2-aobus-pinctrl
> + - amlogic,meson-gxbb-periphs-pinctrl
> + - amlogic,meson-gxbb-aobus-pinctrl
> + - amlogic,meson-gxl-periphs-pinctrl
> + - amlogic,meson-gxl-aobus-pinctrl
> + - amlogic,meson-axg-periphs-pinctrl
> + - amlogic,meson-axg-aobus-pinctrl
> + - amlogic,meson-g12a-periphs-pinctrl
> + - amlogic,meson-g12a-aobus-pinctrl
> + - amlogic,meson-a1-periphs-pinctrl
> + - amlogic,meson-s4-periphs-pinctrl
> + - items:
> + - const: amlogic,meson8m2-aobus-pinctrl
> + - const: amlogic,meson8-aobus-pinctrl
> + - items:
> + - const: amlogic,meson8m2-cbus-pinctrl
> + - const: amlogic,meson8-cbus-pinctrl
Again, can't have both with and without the fallback allowed.
> +
> + ranges: true
> +
> + "#address-cells":
> + enum: [1, 2]
> +
> + "#size-cells":
> + enum: [1, 2]
> +
> +required:
> + - compatible
> + - ranges
> + - "#address-cells"
> + - "#size-cells"
> +
> +additionalProperties:
> + anyOf:
Don't need anyOf.
> + - type: object
> + allOf:
> + - $ref: pincfg-node.yaml#
> + - $ref: pinmux-node.yaml#
> +
> +patternProperties:
> + "^bank@[0-9]$":
Unit addresses are hex.
> + type: object
> + properties:
> + reg:
> + minItems: 5
> + maxItems: 5
> +
> + reg-names:
> + items:
> + - const: gpio
> + - const: pull
> + - const: pull-enable
> + - const: mux
> + - const: ds
> +
> + gpio-controller: true
> +
> + "#gpio-cells":
> + const: 2
> +
> + gpio-ranges:
> + $ref: /schemas/types.yaml#/definitions/phandle
Wrong type and gpio-ranges already has a type.
> +
> + required:
> + - reg
> + - reg-names
> + - gpio-controller
> + - "#gpio-cells"
> + - gpio-ranges
> +
> +examples:
> + - |
> + pinctrl {
> + compatible = "amlogic,meson-g12a-periphs-pinctrl";
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + bank at 40 {
> + reg = <0x0 0x40 0x0 0x4c>,
> + <0x0 0xe8 0x0 0x18>,
> + <0x0 0x120 0x0 0x18>,
> + <0x0 0x2c0 0x0 0x40>,
> + <0x0 0x340 0x0 0x1c>;
> + reg-names = "gpio", "pull", "pull-enable", "mux", "ds";
> + gpio-controller;
> + #gpio-cells = <2>;
> + gpio-ranges = <&periphs_pinctrl 0 0 86>;
> + };
> +
> + cec_ao_a_h_pins: cec_ao_a_h {
> + mux {
> + groups = "cec_ao_a_h";
> + function = "cec_ao_a_h";
> + bias-disable;
> + };
> + };
> + };
More information about the linux-amlogic
mailing list