6577038756f486186bd6bfa98c915909c6dfaae1
[openwrt/staging/chunkeey.git] / target / linux / bmips / patches-5.10 / 410-Documentation-add-BCM6318-pincontroller-binding-docu.patch
1 From f909bf5d5cf3db6b35c082f27f7982dfcb1447c2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
3 Date: Wed, 27 Jul 2016 11:38:05 +0200
4 Subject: [PATCH 11/12] Documentation: add BCM6318 pincontroller 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 pincontrol core found in BCM6318 SoCs.
11
12 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
13 Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
14 ---
15 .../pinctrl/brcm,bcm6318-pinctrl.yaml | 173 ++++++++++++++++++
16 1 file changed, 173 insertions(+)
17 create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml
18
19 --- /dev/null
20 +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6318-pinctrl.yaml
21 @@ -0,0 +1,173 @@
22 +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
23 +%YAML 1.2
24 +---
25 +$id: http://devicetree.org/schemas/pinctrl/brcm,bcm6318-pinctrl.yaml#
26 +$schema: http://devicetree.org/meta-schemas/core.yaml#
27 +
28 +title: Broadcom BCM6318 pin controller
29 +
30 +maintainers:
31 + - Álvaro Fernández Rojas <noltari@gmail.com>
32 + - Jonas Gorski <jonas.gorski@gmail.com>
33 +
34 +description: |+
35 + The pin controller node should be the child of a syscon node.
36 +
37 + Refer to the the bindings described in
38 + Documentation/devicetree/bindings/mfd/syscon.yaml
39 +
40 +properties:
41 + compatible:
42 + const: brcm,bcm6318-pinctrl
43 +
44 + gpio-controller: true
45 +
46 + '#gpio-cells':
47 + description:
48 + Specifies the pin number and flags, as defined in
49 + include/dt-bindings/gpio/gpio.h
50 + const: 2
51 +
52 + interrupts-extended:
53 + description:
54 + One interrupt per each of the 2 GPIO ports supported by the controller,
55 + sorted by port number ascending order.
56 + minItems: 2
57 + maxItems: 2
58 +
59 +patternProperties:
60 + '^.*$':
61 + if:
62 + type: object
63 + then:
64 + properties:
65 + function:
66 + $ref: "/schemas/types.yaml#/definitions/string"
67 + enum: [ ephy0_spd_led, ephy1_spd_led, ephy2_spd_led, ephy3_spd_led,
68 + ephy0_act_led, ephy1_act_led, ephy2_act_led, ephy3_act_led,
69 + serial_led_data, serial_led_clk, inet_act_led, inet_fail_led,
70 + dsl_led, post_fail_led, wlan_wps_led, usb_pwron,
71 + usb_device_led, usb_active ]
72 +
73 + pins:
74 + $ref: "/schemas/types.yaml#/definitions/string"
75 + enum: [ gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6, gpio7,
76 + gpio8, gpio9, gpio10, gpio11, gpio12, gpio13, gpio40 ]
77 +
78 +required:
79 + - compatible
80 + - gpio-controller
81 + - '#gpio-cells'
82 +
83 +additionalProperties: false
84 +
85 +examples:
86 + - |
87 + gpio@10000080 {
88 + compatible = "syscon", "simple-mfd";
89 + reg = <0x10000080 0x80>;
90 +
91 + pinctrl: pinctrl {
92 + compatible = "brcm,bcm6318-pinctrl";
93 +
94 + gpio-controller;
95 + #gpio-cells = <2>;
96 +
97 + interrupts-extended = <&ext_intc 0 0>,
98 + <&ext_intc 1 0>;
99 + interrupt-names = "gpio33",
100 + "gpio34";
101 +
102 + pinctrl_ephy0_spd_led: ephy0_spd_led {
103 + function = "ephy0_spd_led";
104 + pins = "gpio0";
105 + };
106 +
107 + pinctrl_ephy1_spd_led: ephy1_spd_led {
108 + function = "ephy1_spd_led";
109 + pins = "gpio1";
110 + };
111 +
112 + pinctrl_ephy2_spd_led: ephy2_spd_led {
113 + function = "ephy2_spd_led";
114 + pins = "gpio2";
115 + };
116 +
117 + pinctrl_ephy3_spd_led: ephy3_spd_led {
118 + function = "ephy3_spd_led";
119 + pins = "gpio3";
120 + };
121 +
122 + pinctrl_ephy0_act_led: ephy0_act_led {
123 + function = "ephy0_act_led";
124 + pins = "gpio4";
125 + };
126 +
127 + pinctrl_ephy1_act_led: ephy1_act_led {
128 + function = "ephy1_act_led";
129 + pins = "gpio5";
130 + };
131 +
132 + pinctrl_ephy2_act_led: ephy2_act_led {
133 + function = "ephy2_act_led";
134 + pins = "gpio6";
135 + };
136 +
137 + pinctrl_ephy3_act_led: ephy3_act_led {
138 + function = "ephy3_act_led";
139 + pins = "gpio7";
140 + };
141 +
142 + pinctrl_serial_led: serial_led {
143 + pinctrl_serial_led_data: serial_led_data {
144 + function = "serial_led_data";
145 + pins = "gpio6";
146 + };
147 +
148 + pinctrl_serial_led_clk: serial_led_clk {
149 + function = "serial_led_clk";
150 + pins = "gpio7";
151 + };
152 + };
153 +
154 + pinctrl_inet_act_led: inet_act_led {
155 + function = "inet_act_led";
156 + pins = "gpio8";
157 + };
158 +
159 + pinctrl_inet_fail_led: inet_fail_led {
160 + function = "inet_fail_led";
161 + pins = "gpio9";
162 + };
163 +
164 + pinctrl_dsl_led: dsl_led {
165 + function = "dsl_led";
166 + pins = "gpio10";
167 + };
168 +
169 + pinctrl_post_fail_led: post_fail_led {
170 + function = "post_fail_led";
171 + pins = "gpio11";
172 + };
173 +
174 + pinctrl_wlan_wps_led: wlan_wps_led {
175 + function = "wlan_wps_led";
176 + pins = "gpio12";
177 + };
178 +
179 + pinctrl_usb_pwron: usb_pwron {
180 + function = "usb_pwron";
181 + pins = "gpio13";
182 + };
183 +
184 + pinctrl_usb_device_led: usb_device_led {
185 + function = "usb_device_led";
186 + pins = "gpio13";
187 + };
188 +
189 + pinctrl_usb_active: usb_active {
190 + function = "usb_active";
191 + pins = "gpio40";
192 + };
193 + };
194 + };