xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/amlogic,pinctrl-a4.yaml (revision 833e5d42ab135b0238e61c5b3c19b8619677cbfa)
18ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28ccc0d23SEmmanuel Vadot%YAML 1.2
38ccc0d23SEmmanuel Vadot---
48ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/amlogic,pinctrl-a4.yaml#
58ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
68ccc0d23SEmmanuel Vadot
78ccc0d23SEmmanuel Vadottitle: Amlogic pinmux controller
88ccc0d23SEmmanuel Vadot
98ccc0d23SEmmanuel Vadotmaintainers:
108ccc0d23SEmmanuel Vadot  - Xianwei Zhao <xianwei.zhao@amlogic.com>
118ccc0d23SEmmanuel Vadot
128ccc0d23SEmmanuel VadotallOf:
138ccc0d23SEmmanuel Vadot  - $ref: pinctrl.yaml#
148ccc0d23SEmmanuel Vadot
158ccc0d23SEmmanuel Vadotproperties:
168ccc0d23SEmmanuel Vadot  compatible:
17ae5de77eSEmmanuel Vadot    oneOf:
18*833e5d42SEmmanuel Vadot      - enum:
19*833e5d42SEmmanuel Vadot          - amlogic,pinctrl-a4
20*833e5d42SEmmanuel Vadot          - amlogic,pinctrl-s6
21*833e5d42SEmmanuel Vadot          - amlogic,pinctrl-s7
22ae5de77eSEmmanuel Vadot      - items:
23ae5de77eSEmmanuel Vadot          - enum:
24ae5de77eSEmmanuel Vadot              - amlogic,pinctrl-a5
25ae5de77eSEmmanuel Vadot          - const: amlogic,pinctrl-a4
26*833e5d42SEmmanuel Vadot      - items:
27*833e5d42SEmmanuel Vadot          - enum:
28*833e5d42SEmmanuel Vadot              - amlogic,pinctrl-s7d
29*833e5d42SEmmanuel Vadot          - const: amlogic,pinctrl-s7
308ccc0d23SEmmanuel Vadot
318ccc0d23SEmmanuel Vadot  "#address-cells":
328ccc0d23SEmmanuel Vadot    const: 2
338ccc0d23SEmmanuel Vadot
348ccc0d23SEmmanuel Vadot  "#size-cells":
358ccc0d23SEmmanuel Vadot    const: 2
368ccc0d23SEmmanuel Vadot
378ccc0d23SEmmanuel Vadot  ranges: true
388ccc0d23SEmmanuel Vadot
398ccc0d23SEmmanuel VadotpatternProperties:
408ccc0d23SEmmanuel Vadot  "^gpio@[0-9a-f]+$":
418ccc0d23SEmmanuel Vadot    type: object
428ccc0d23SEmmanuel Vadot
438ccc0d23SEmmanuel Vadot    additionalProperties: false
448ccc0d23SEmmanuel Vadot    properties:
458ccc0d23SEmmanuel Vadot      reg:
468ccc0d23SEmmanuel Vadot        minItems: 1
478ccc0d23SEmmanuel Vadot        items:
488ccc0d23SEmmanuel Vadot          - description: pin config register
498ccc0d23SEmmanuel Vadot          - description: pin mux setting register (some special pin fixed function)
508ccc0d23SEmmanuel Vadot          - description: pin drive strength register (optional)
518ccc0d23SEmmanuel Vadot
528ccc0d23SEmmanuel Vadot      reg-names:
538ccc0d23SEmmanuel Vadot        minItems: 1
548ccc0d23SEmmanuel Vadot        items:
558ccc0d23SEmmanuel Vadot          - const: gpio
568ccc0d23SEmmanuel Vadot          - const: mux
578ccc0d23SEmmanuel Vadot          - const: ds
588ccc0d23SEmmanuel Vadot
598ccc0d23SEmmanuel Vadot      gpio-controller: true
608ccc0d23SEmmanuel Vadot
618ccc0d23SEmmanuel Vadot      "#gpio-cells":
628ccc0d23SEmmanuel Vadot        const: 2
638ccc0d23SEmmanuel Vadot
648ccc0d23SEmmanuel Vadot      gpio-ranges:
658ccc0d23SEmmanuel Vadot        maxItems: 1
668ccc0d23SEmmanuel Vadot
678ccc0d23SEmmanuel Vadot    required:
688ccc0d23SEmmanuel Vadot      - reg
698ccc0d23SEmmanuel Vadot      - reg-names
708ccc0d23SEmmanuel Vadot      - gpio-controller
718ccc0d23SEmmanuel Vadot      - "#gpio-cells"
728ccc0d23SEmmanuel Vadot      - gpio-ranges
738ccc0d23SEmmanuel Vadot
748ccc0d23SEmmanuel Vadot  "^func-[0-9a-z-]+$":
758ccc0d23SEmmanuel Vadot    type: object
768ccc0d23SEmmanuel Vadot    additionalProperties: false
778ccc0d23SEmmanuel Vadot    patternProperties:
788ccc0d23SEmmanuel Vadot      "^group-[0-9a-z-]+$":
798ccc0d23SEmmanuel Vadot        type: object
80ae5de77eSEmmanuel Vadot        unevaluatedProperties: false
818ccc0d23SEmmanuel Vadot        allOf:
828ccc0d23SEmmanuel Vadot          - $ref: /schemas/pinctrl/pincfg-node.yaml
838ccc0d23SEmmanuel Vadot          - $ref: /schemas/pinctrl/pinmux-node.yaml
848ccc0d23SEmmanuel Vadot
858ccc0d23SEmmanuel Vadot        required:
868ccc0d23SEmmanuel Vadot          - pinmux
878ccc0d23SEmmanuel Vadot
888ccc0d23SEmmanuel Vadotrequired:
898ccc0d23SEmmanuel Vadot  - compatible
908ccc0d23SEmmanuel Vadot  - "#address-cells"
918ccc0d23SEmmanuel Vadot  - "#size-cells"
928ccc0d23SEmmanuel Vadot  - ranges
938ccc0d23SEmmanuel Vadot
948ccc0d23SEmmanuel VadotadditionalProperties: false
958ccc0d23SEmmanuel Vadot
968ccc0d23SEmmanuel Vadotexamples:
978ccc0d23SEmmanuel Vadot  - |
988ccc0d23SEmmanuel Vadot    #include <dt-bindings/pinctrl/amlogic,pinctrl.h>
998ccc0d23SEmmanuel Vadot    apb {
1008ccc0d23SEmmanuel Vadot      #address-cells = <2>;
1018ccc0d23SEmmanuel Vadot      #size-cells = <2>;
1028ccc0d23SEmmanuel Vadot      periphs_pinctrl: pinctrl {
1038ccc0d23SEmmanuel Vadot        compatible = "amlogic,pinctrl-a4";
1048ccc0d23SEmmanuel Vadot        #address-cells = <2>;
1058ccc0d23SEmmanuel Vadot        #size-cells = <2>;
1068ccc0d23SEmmanuel Vadot        ranges;
1078ccc0d23SEmmanuel Vadot
1088ccc0d23SEmmanuel Vadot        gpio@4240 {
1098ccc0d23SEmmanuel Vadot          reg = <0 0x4240 0 0x40>, <0 0x4000 0 0x8>;
1108ccc0d23SEmmanuel Vadot          reg-names = "gpio", "mux";
1118ccc0d23SEmmanuel Vadot          gpio-controller;
1128ccc0d23SEmmanuel Vadot          #gpio-cells = <2>;
1138ccc0d23SEmmanuel Vadot          gpio-ranges = <&periphs_pinctrl 0 8 10>;
1148ccc0d23SEmmanuel Vadot        };
1158ccc0d23SEmmanuel Vadot
1168ccc0d23SEmmanuel Vadot        func-uart-b {
1178ccc0d23SEmmanuel Vadot          group-default {
1188ccc0d23SEmmanuel Vadot            pinmux = <AML_PINMUX(AMLOGIC_GPIO_B, 1, 4)>;
1198ccc0d23SEmmanuel Vadot            bias-pull-up;
1208ccc0d23SEmmanuel Vadot            drive-strength-microamp = <4000>;
1218ccc0d23SEmmanuel Vadot          };
1228ccc0d23SEmmanuel Vadot
1238ccc0d23SEmmanuel Vadot          group-pins1 {
1248ccc0d23SEmmanuel Vadot            pinmux = <AML_PINMUX(AMLOGIC_GPIO_B, 5, 2)>;
1258ccc0d23SEmmanuel Vadot            bias-pull-up;
1268ccc0d23SEmmanuel Vadot            drive-strength-microamp = <4000>;
1278ccc0d23SEmmanuel Vadot          };
1288ccc0d23SEmmanuel Vadot        };
1298ccc0d23SEmmanuel Vadot
1308ccc0d23SEmmanuel Vadot        func-uart-c {
1318ccc0d23SEmmanuel Vadot          group-default {
1328ccc0d23SEmmanuel Vadot            pinmux = <AML_PINMUX(AMLOGIC_GPIO_B, 3, 1)>,
1338ccc0d23SEmmanuel Vadot                     <AML_PINMUX(AMLOGIC_GPIO_B, 2, 1)>;
1348ccc0d23SEmmanuel Vadot            bias-pull-up;
1358ccc0d23SEmmanuel Vadot            drive-strength-microamp = <4000>;
1368ccc0d23SEmmanuel Vadot          };
1378ccc0d23SEmmanuel Vadot        };
1388ccc0d23SEmmanuel Vadot      };
1398ccc0d23SEmmanuel Vadot    };
140