e4c6343e3f17b23eaa22b86f3df5d1dcf03c97a9
[openwrt/staging/chunkeey.git] / target / linux / bmips / patches-5.10 / 402-Documentation-add-BCM6358-pincontroller-binding-docu.patch
1 From 9fbcbe08479bcb3609952b66627e2d612173229a 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:36:00 +0200
4 Subject: [PATCH 03/12] Documentation: add BCM6358 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 BCM6358 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,bcm6358-pinctrl.yaml | 131 ++++++++++++++++++
16 1 file changed, 131 insertions(+)
17 create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml
18
19 --- /dev/null
20 +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm6358-pinctrl.yaml
21 @@ -0,0 +1,131 @@
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,bcm6358-pinctrl.yaml#
26 +$schema: http://devicetree.org/meta-schemas/core.yaml#
27 +
28 +title: Broadcom BCM6358 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,bcm6358-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 4 GPIO ports supported by the controller,
55 + sorted by port number ascending order.
56 + minItems: 6
57 + maxItems: 6
58 +
59 +patternProperties:
60 + '^.*$':
61 + if:
62 + type: object
63 + then:
64 + properties:
65 + function:
66 + $ref: "/schemas/types.yaml#/definitions/string"
67 + enum: [ ebi_cs, uart1, serial_led, legacy_led, led, spi_cs, utopia,
68 + pwm_syn_clk, sys_irq ]
69 +
70 + pins:
71 + $ref: "/schemas/types.yaml#/definitions/string"
72 + enum: [ ebi_cs_grp, uart1_grp, serial_led_grp, legacy_led_grp,
73 + led_grp, spi_cs_grp, utopia_grp, pwm_syn_clk, sys_irq_grp ]
74 +
75 +required:
76 + - compatible
77 + - gpio-controller
78 + - '#gpio-cells'
79 +
80 +additionalProperties: false
81 +
82 +examples:
83 + - |
84 + gpio@fffe0080 {
85 + compatible = "syscon", "simple-mfd";
86 + reg = <0xfffe0080 0x80>;
87 +
88 + pinctrl: pinctrl {
89 + compatible = "brcm,bcm6358-pinctrl";
90 +
91 + gpio-controller;
92 + #gpio-cells = <2>;
93 +
94 + interrupts-extended = <&ext_intc1 0 0>,
95 + <&ext_intc1 1 0>,
96 + <&ext_intc0 0 0>,
97 + <&ext_intc0 1 0>,
98 + <&ext_intc0 2 0>,
99 + <&ext_intc0 3 0>;
100 + interrupt-names = "gpio32",
101 + "gpio33",
102 + "gpio34",
103 + "gpio35",
104 + "gpio36",
105 + "gpio37";
106 +
107 + pinctrl_ebi_cs: ebi_cs {
108 + function = "ebi_cs";
109 + groups = "ebi_cs_grp";
110 + };
111 +
112 + pinctrl_uart1: uart1 {
113 + function = "uart1";
114 + groups = "uart1_grp";
115 + };
116 +
117 + pinctrl_serial_led: serial_led {
118 + function = "serial_led";
119 + groups = "serial_led_grp";
120 + };
121 +
122 + pinctrl_legacy_led: legacy_led {
123 + function = "legacy_led";
124 + groups = "legacy_led_grp";
125 + };
126 +
127 + pinctrl_led: led {
128 + function = "led";
129 + groups = "led_grp";
130 + };
131 +
132 + pinctrl_spi_cs_23: spi_cs {
133 + function = "spi_cs";
134 + groups = "spi_cs_grp";
135 + };
136 +
137 + pinctrl_utopia: utopia {
138 + function = "utopia";
139 + groups = "utopia_grp";
140 + };
141 +
142 + pinctrl_pwm_syn_clk: pwm_syn_clk {
143 + function = "pwm_syn_clk";
144 + groups = "pwm_syn_clk_grp";
145 + };
146 +
147 + pinctrl_sys_irq: sys_irq {
148 + function = "sys_irq";
149 + groups = "sys_irq_grp";
150 + };
151 + };
152 + };