xref: /freebsd/sys/contrib/device-tree/Bindings/pinctrl/renesas,rzv2m-pinctrl.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
1b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2b97ee269SEmmanuel Vadot%YAML 1.2
3b97ee269SEmmanuel Vadot---
4b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/pinctrl/renesas,rzv2m-pinctrl.yaml#
5b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6b97ee269SEmmanuel Vadot
7b97ee269SEmmanuel Vadottitle: Renesas RZ/V2M combined Pin and GPIO controller
8b97ee269SEmmanuel Vadot
9b97ee269SEmmanuel Vadotmaintainers:
10fac71e4eSEmmanuel Vadot  - Fabrizio Castro <fabrizio.castro.jz@renesas.com>
11b97ee269SEmmanuel Vadot  - Geert Uytterhoeven <geert+renesas@glider.be>
12b97ee269SEmmanuel Vadot
13b97ee269SEmmanuel Vadotdescription:
14b97ee269SEmmanuel Vadot  The Renesas RZ/V2M SoC features a combined Pin and GPIO controller.
15b97ee269SEmmanuel Vadot  Pin multiplexing and GPIO configuration is performed on a per-pin basis.
16b97ee269SEmmanuel Vadot  Each port features up to 16 pins, each of them configurable for GPIO function
17b97ee269SEmmanuel Vadot  (port mode) or in alternate function mode.
18b97ee269SEmmanuel Vadot  Up to 8 different alternate function modes exist for each single pin.
19b97ee269SEmmanuel Vadot
20b97ee269SEmmanuel Vadotproperties:
21b97ee269SEmmanuel Vadot  compatible:
22b97ee269SEmmanuel Vadot    const: renesas,r9a09g011-pinctrl # RZ/V2M
23b97ee269SEmmanuel Vadot
24b97ee269SEmmanuel Vadot  reg:
25b97ee269SEmmanuel Vadot    maxItems: 1
26b97ee269SEmmanuel Vadot
27b97ee269SEmmanuel Vadot  gpio-controller: true
28b97ee269SEmmanuel Vadot
29b97ee269SEmmanuel Vadot  '#gpio-cells':
30b97ee269SEmmanuel Vadot    const: 2
31b97ee269SEmmanuel Vadot    description:
32b97ee269SEmmanuel Vadot      The first cell contains the global GPIO port index, constructed using the
33b97ee269SEmmanuel Vadot      RZV2M_GPIO() helper macro in <dt-bindings/pinctrl/rzv2m-pinctrl.h> and the
34b97ee269SEmmanuel Vadot      second cell represents consumer flag as mentioned in ../gpio/gpio.txt
35b97ee269SEmmanuel Vadot      E.g. "RZV2M_GPIO(8, 1)" for P8_1.
36b97ee269SEmmanuel Vadot
37b97ee269SEmmanuel Vadot  gpio-ranges:
38b97ee269SEmmanuel Vadot    maxItems: 1
39b97ee269SEmmanuel Vadot
40b97ee269SEmmanuel Vadot  interrupts:
41b97ee269SEmmanuel Vadot    description: INEXINT[0..38] corresponding to individual pin inputs.
42b97ee269SEmmanuel Vadot    maxItems: 39
43b97ee269SEmmanuel Vadot
44b97ee269SEmmanuel Vadot  clocks:
45b97ee269SEmmanuel Vadot    maxItems: 1
46b97ee269SEmmanuel Vadot
47b97ee269SEmmanuel Vadot  power-domains:
48b97ee269SEmmanuel Vadot    maxItems: 1
49b97ee269SEmmanuel Vadot
50b97ee269SEmmanuel Vadot  resets:
51b97ee269SEmmanuel Vadot    maxItems: 1
52b97ee269SEmmanuel Vadot
53b97ee269SEmmanuel VadotadditionalProperties:
54b97ee269SEmmanuel Vadot  anyOf:
55b97ee269SEmmanuel Vadot    - type: object
56*84943d6fSEmmanuel Vadot      additionalProperties: false
57b97ee269SEmmanuel Vadot      allOf:
58b97ee269SEmmanuel Vadot        - $ref: pincfg-node.yaml#
59b97ee269SEmmanuel Vadot        - $ref: pinmux-node.yaml#
60b97ee269SEmmanuel Vadot
61b97ee269SEmmanuel Vadot      description:
62b97ee269SEmmanuel Vadot        Pin controller client devices use pin configuration subnodes (children
63b97ee269SEmmanuel Vadot        and grandchildren) for desired pin configuration.
64b97ee269SEmmanuel Vadot        Client device subnodes use below standard properties.
65b97ee269SEmmanuel Vadot
66b97ee269SEmmanuel Vadot      properties:
67b97ee269SEmmanuel Vadot        pinmux:
68b97ee269SEmmanuel Vadot          description:
69b97ee269SEmmanuel Vadot            Values are constructed from GPIO port number, pin number, and
70b97ee269SEmmanuel Vadot            alternate function configuration number using the RZV2M_PORT_PINMUX()
71b97ee269SEmmanuel Vadot            helper macro in <dt-bindings/pinctrl/rzv2m-pinctrl.h>.
72b97ee269SEmmanuel Vadot        pins: true
73b97ee269SEmmanuel Vadot        bias-disable: true
74b97ee269SEmmanuel Vadot        bias-pull-down: true
75b97ee269SEmmanuel Vadot        bias-pull-up: true
76b97ee269SEmmanuel Vadot        drive-strength-microamp:
77b97ee269SEmmanuel Vadot          # Superset of supported values
78b97ee269SEmmanuel Vadot          enum: [ 1600, 1800, 2000, 3200, 3800, 4000, 6400, 7800, 8000,
79b97ee269SEmmanuel Vadot                  9000, 9600, 11000, 12000, 13000, 18000 ]
80b97ee269SEmmanuel Vadot        slew-rate:
81b97ee269SEmmanuel Vadot          description: 0 is slow slew rate, 1 is fast slew rate
82b97ee269SEmmanuel Vadot          enum: [ 0, 1 ]
83b97ee269SEmmanuel Vadot        gpio-hog: true
84b97ee269SEmmanuel Vadot        gpios: true
85b97ee269SEmmanuel Vadot        output-high: true
86b97ee269SEmmanuel Vadot        output-low: true
87b97ee269SEmmanuel Vadot        line-name: true
88b97ee269SEmmanuel Vadot
89b97ee269SEmmanuel Vadot    - type: object
90b97ee269SEmmanuel Vadot      additionalProperties:
91b97ee269SEmmanuel Vadot        $ref: "#/additionalProperties/anyOf/0"
92b97ee269SEmmanuel Vadot
93b97ee269SEmmanuel VadotallOf:
94fac71e4eSEmmanuel Vadot  - $ref: pinctrl.yaml#
95b97ee269SEmmanuel Vadot
96b97ee269SEmmanuel Vadotrequired:
97b97ee269SEmmanuel Vadot  - compatible
98b97ee269SEmmanuel Vadot  - reg
99b97ee269SEmmanuel Vadot  - gpio-controller
100b97ee269SEmmanuel Vadot  - '#gpio-cells'
101b97ee269SEmmanuel Vadot  - gpio-ranges
102b97ee269SEmmanuel Vadot  - interrupts
103b97ee269SEmmanuel Vadot  - clocks
104b97ee269SEmmanuel Vadot  - power-domains
105b97ee269SEmmanuel Vadot  - resets
106b97ee269SEmmanuel Vadot
107b97ee269SEmmanuel Vadotexamples:
108b97ee269SEmmanuel Vadot  - |
109b97ee269SEmmanuel Vadot    #include <dt-bindings/pinctrl/rzv2m-pinctrl.h>
110b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/r9a09g011-cpg.h>
111b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
112b97ee269SEmmanuel Vadot
113b97ee269SEmmanuel Vadot    pinctrl: pinctrl@b6250000 {
114b97ee269SEmmanuel Vadot            compatible = "renesas,r9a09g011-pinctrl";
115b97ee269SEmmanuel Vadot            reg = <0xb6250000 0x800>;
116b97ee269SEmmanuel Vadot
117b97ee269SEmmanuel Vadot            gpio-controller;
118b97ee269SEmmanuel Vadot            #gpio-cells = <2>;
119b97ee269SEmmanuel Vadot            gpio-ranges = <&pinctrl 0 0 352>;
120b97ee269SEmmanuel Vadot            interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
121b97ee269SEmmanuel Vadot                         <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
122b97ee269SEmmanuel Vadot                         <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
123b97ee269SEmmanuel Vadot                         <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
124b97ee269SEmmanuel Vadot                         <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>,
125b97ee269SEmmanuel Vadot                         <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
126b97ee269SEmmanuel Vadot                         <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>,
127b97ee269SEmmanuel Vadot                         <GIC_SPI 75 IRQ_TYPE_LEVEL_HIGH>,
128b97ee269SEmmanuel Vadot                         <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
129b97ee269SEmmanuel Vadot                         <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>,
130b97ee269SEmmanuel Vadot                         <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>,
131b97ee269SEmmanuel Vadot                         <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>,
132b97ee269SEmmanuel Vadot                         <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>,
133b97ee269SEmmanuel Vadot                         <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>,
134b97ee269SEmmanuel Vadot                         <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>,
135b97ee269SEmmanuel Vadot                         <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>,
136b97ee269SEmmanuel Vadot                         <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>,
137b97ee269SEmmanuel Vadot                         <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>,
138b97ee269SEmmanuel Vadot                         <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>,
139b97ee269SEmmanuel Vadot                         <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>,
140b97ee269SEmmanuel Vadot                         <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
141b97ee269SEmmanuel Vadot                         <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
142b97ee269SEmmanuel Vadot                         <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
143b97ee269SEmmanuel Vadot                         <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
144b97ee269SEmmanuel Vadot                         <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
145b97ee269SEmmanuel Vadot                         <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
146b97ee269SEmmanuel Vadot                         <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>,
147b97ee269SEmmanuel Vadot                         <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>,
148b97ee269SEmmanuel Vadot                         <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
149b97ee269SEmmanuel Vadot                         <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
150b97ee269SEmmanuel Vadot                         <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
151b97ee269SEmmanuel Vadot                         <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
152b97ee269SEmmanuel Vadot                         <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
153b97ee269SEmmanuel Vadot                         <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>,
154b97ee269SEmmanuel Vadot                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
155b97ee269SEmmanuel Vadot                         <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
156b97ee269SEmmanuel Vadot                         <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>,
157b97ee269SEmmanuel Vadot                         <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
158b97ee269SEmmanuel Vadot                         <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
159b97ee269SEmmanuel Vadot            clocks = <&cpg CPG_MOD R9A09G011_PFC_PCLK>;
160b97ee269SEmmanuel Vadot            resets = <&cpg R9A09G011_PFC_PRESETN>;
161b97ee269SEmmanuel Vadot            power-domains = <&cpg>;
162b97ee269SEmmanuel Vadot
163b97ee269SEmmanuel Vadot            i2c2_pins: i2c2 {
164b97ee269SEmmanuel Vadot                    pinmux = <RZV2M_PORT_PINMUX(3, 8, 2)>, /* SDA */
165b97ee269SEmmanuel Vadot                             <RZV2M_PORT_PINMUX(3, 9, 2)>; /* SCL */
166b97ee269SEmmanuel Vadot            };
167b97ee269SEmmanuel Vadot    };
168