1ef13407c8d068c351a2ccd2fc82e86e60fb20c8
[openwrt/staging/stintel.git] /
1 From b6d46b9454742a25f9d923be072869e40b2ecebb Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
3 Date: Wed, 24 Mar 2021 09:19:22 +0100
4 Subject: [PATCH 21/22] dt-bindings: add BCM6318 GPIO sysctl binding
5 documentation
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Add binding documentation for the GPIO sysctl found in BCM6318 SoCs.
11
12 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
13 Reviewed-by: Rob Herring <robh@kernel.org>
14 Link: https://lore.kernel.org/r/20210324081923.20379-22-noltari@gmail.com
15 Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
16 ---
17 .../mfd/brcm,bcm6318-gpio-sysctl.yaml | 177 ++++++++++++++++++
18 1 file changed, 177 insertions(+)
19 create mode 100644 Documentation/devicetree/bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml
20
21 --- /dev/null
22 +++ b/Documentation/devicetree/bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml
23 @@ -0,0 +1,177 @@
24 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
25 +%YAML 1.2
26 +---
27 +$id: http://devicetree.org/schemas/mfd/brcm,bcm6318-gpio-sysctl.yaml#
28 +$schema: http://devicetree.org/meta-schemas/core.yaml#
29 +
30 +title: Broadcom BCM6318 GPIO System Controller Device Tree Bindings
31 +
32 +maintainers:
33 + - Álvaro Fernández Rojas <noltari@gmail.com>
34 + - Jonas Gorski <jonas.gorski@gmail.com>
35 +
36 +description:
37 + Broadcom BCM6318 SoC GPIO system controller which provides a register map
38 + for controlling the GPIO and pins of the SoC.
39 +
40 +properties:
41 + "#address-cells": true
42 +
43 + "#size-cells": true
44 +
45 + compatible:
46 + items:
47 + - const: brcm,bcm6318-gpio-sysctl
48 + - const: syscon
49 + - const: simple-mfd
50 +
51 + ranges:
52 + maxItems: 1
53 +
54 + reg:
55 + maxItems: 1
56 +
57 +patternProperties:
58 + "^gpio@[0-9a-f]+$":
59 + # Child node
60 + type: object
61 + $ref: "../gpio/brcm,bcm6345-gpio.yaml"
62 + description:
63 + GPIO controller for the SoC GPIOs. This child node definition
64 + should follow the bindings specified in
65 + Documentation/devicetree/bindings/gpio/brcm,bcm6345-gpio.yaml.
66 +
67 + "^pinctrl@[0-9a-f]+$":
68 + # Child node
69 + type: object
70 + $ref: "../pinctrl/brcm,bcm6318-pinctrl.yaml"
71 + description:
72 + Pin controller for the SoC pins. This child node definition
73 + should follow the bindings specified in
74 + Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml.
75 +
76 +required:
77 + - "#address-cells"
78 + - compatible
79 + - ranges
80 + - reg
81 + - "#size-cells"
82 +
83 +additionalProperties: false
84 +
85 +examples:
86 + - |
87 + syscon@10000080 {
88 + #address-cells = <1>;
89 + #size-cells = <1>;
90 + compatible = "brcm,bcm6318-gpio-sysctl", "syscon", "simple-mfd";
91 + reg = <0x10000080 0x80>;
92 + ranges = <0 0x10000080 0x80>;
93 +
94 + gpio@0 {
95 + compatible = "brcm,bcm6318-gpio";
96 + reg-names = "dirout", "dat";
97 + reg = <0x0 0x8>, <0x8 0x8>;
98 +
99 + gpio-controller;
100 + gpio-ranges = <&pinctrl 0 0 50>;
101 + #gpio-cells = <2>;
102 + };
103 +
104 + pinctrl: pinctrl@10 {
105 + compatible = "brcm,bcm6318-pinctrl";
106 + reg = <0x18 0x10>, <0x54 0x18>;
107 +
108 + pinctrl_ephy0_spd_led: ephy0_spd_led-pins {
109 + function = "ephy0_spd_led";
110 + pins = "gpio0";
111 + };
112 +
113 + pinctrl_ephy1_spd_led: ephy1_spd_led-pins {
114 + function = "ephy1_spd_led";
115 + pins = "gpio1";
116 + };
117 +
118 + pinctrl_ephy2_spd_led: ephy2_spd_led-pins {
119 + function = "ephy2_spd_led";
120 + pins = "gpio2";
121 + };
122 +
123 + pinctrl_ephy3_spd_led: ephy3_spd_led-pins {
124 + function = "ephy3_spd_led";
125 + pins = "gpio3";
126 + };
127 +
128 + pinctrl_ephy0_act_led: ephy0_act_led-pins {
129 + function = "ephy0_act_led";
130 + pins = "gpio4";
131 + };
132 +
133 + pinctrl_ephy1_act_led: ephy1_act_led-pins {
134 + function = "ephy1_act_led";
135 + pins = "gpio5";
136 + };
137 +
138 + pinctrl_ephy2_act_led: ephy2_act_led-pins {
139 + function = "ephy2_act_led";
140 + pins = "gpio6";
141 + };
142 +
143 + pinctrl_ephy3_act_led: ephy3_act_led-pins {
144 + function = "ephy3_act_led";
145 + pins = "gpio7";
146 + };
147 +
148 + pinctrl_serial_led: serial_led-pins {
149 + pinctrl_serial_led_data: serial_led_data-pins {
150 + function = "serial_led_data";
151 + pins = "gpio6";
152 + };
153 +
154 + pinctrl_serial_led_clk: serial_led_clk-pins {
155 + function = "serial_led_clk";
156 + pins = "gpio7";
157 + };
158 + };
159 +
160 + pinctrl_inet_act_led: inet_act_led-pins {
161 + function = "inet_act_led";
162 + pins = "gpio8";
163 + };
164 +
165 + pinctrl_inet_fail_led: inet_fail_led-pins {
166 + function = "inet_fail_led";
167 + pins = "gpio9";
168 + };
169 +
170 + pinctrl_dsl_led: dsl_led-pins {
171 + function = "dsl_led";
172 + pins = "gpio10";
173 + };
174 +
175 + pinctrl_post_fail_led: post_fail_led-pins {
176 + function = "post_fail_led";
177 + pins = "gpio11";
178 + };
179 +
180 + pinctrl_wlan_wps_led: wlan_wps_led-pins {
181 + function = "wlan_wps_led";
182 + pins = "gpio12";
183 + };
184 +
185 + pinctrl_usb_pwron: usb_pwron-pins {
186 + function = "usb_pwron";
187 + pins = "gpio13";
188 + };
189 +
190 + pinctrl_usb_device_led: usb_device_led-pins {
191 + function = "usb_device_led";
192 + pins = "gpio13";
193 + };
194 +
195 + pinctrl_usb_active: usb_active-pins {
196 + function = "usb_active";
197 + pins = "gpio40";
198 + };
199 + };
200 + };