mediatek: enable multi-core scheduling
[openwrt/staging/mkresin.git] / target / linux / mediatek / patches-5.10 / 171-dt-bindings-usb-convert-mediatek-musb.txt-to-YAML-sc.patch
1 From f9924caf5d952594b2d912e2ec318189ce64cf04 Mon Sep 17 00:00:00 2001
2 From: Chunfeng Yun <chunfeng.yun@mediatek.com>
3 Date: Fri, 25 Dec 2020 15:52:55 +0800
4 Subject: [PATCH] dt-bindings: usb: convert mediatek, musb.txt to YAML schema
5
6 Convert mediatek,musb.txt to YAML schema mediatek,musb.yaml
7
8 Cc: Min Guo <min.guo@mediatek.com>
9 Reviewed-by: Rob Herring <robh@kernel.org>
10 Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
11 Link: https://lore.kernel.org/r/20201225075258.33352-8-chunfeng.yun@mediatek.com
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 .../devicetree/bindings/usb/mediatek,musb.txt | 57 ---------
15 .../bindings/usb/mediatek,musb.yaml | 113 ++++++++++++++++++
16 2 files changed, 113 insertions(+), 57 deletions(-)
17 delete mode 100644 Documentation/devicetree/bindings/usb/mediatek,musb.txt
18 create mode 100644 Documentation/devicetree/bindings/usb/mediatek,musb.yaml
19
20 --- a/Documentation/devicetree/bindings/usb/mediatek,musb.txt
21 +++ /dev/null
22 @@ -1,57 +0,0 @@
23 -MediaTek musb DRD/OTG controller
24 --------------------------------------------
25 -
26 -Required properties:
27 - - compatible : should be one of:
28 - "mediatek,mt2701-musb"
29 - ...
30 - followed by "mediatek,mtk-musb"
31 - - reg : specifies physical base address and size of
32 - the registers
33 - - interrupts : interrupt used by musb controller
34 - - interrupt-names : must be "mc"
35 - - phys : PHY specifier for the OTG phy
36 - - dr_mode : should be one of "host", "peripheral" or "otg",
37 - refer to usb/generic.txt
38 - - clocks : a list of phandle + clock-specifier pairs, one for
39 - each entry in clock-names
40 - - clock-names : must contain "main", "mcu", "univpll"
41 - for clocks of controller
42 -
43 -Optional properties:
44 - - power-domains : a phandle to USB power domain node to control USB's
45 - MTCMOS
46 -
47 -Required child nodes:
48 - usb connector node as defined in bindings/connector/usb-connector.yaml
49 -Optional properties:
50 - - id-gpios : input GPIO for USB ID pin.
51 - - vbus-gpios : input GPIO for USB VBUS pin.
52 - - vbus-supply : reference to the VBUS regulator, needed when supports
53 - dual-role mode
54 - - usb-role-switch : use USB Role Switch to support dual-role switch, see
55 - usb/generic.txt.
56 -
57 -Example:
58 -
59 -usb2: usb@11200000 {
60 - compatible = "mediatek,mt2701-musb",
61 - "mediatek,mtk-musb";
62 - reg = <0 0x11200000 0 0x1000>;
63 - interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
64 - interrupt-names = "mc";
65 - phys = <&u2port2 PHY_TYPE_USB2>;
66 - dr_mode = "otg";
67 - clocks = <&pericfg CLK_PERI_USB0>,
68 - <&pericfg CLK_PERI_USB0_MCU>,
69 - <&pericfg CLK_PERI_USB_SLV>;
70 - clock-names = "main","mcu","univpll";
71 - power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
72 - usb-role-switch;
73 - connector{
74 - compatible = "gpio-usb-b-connector", "usb-b-connector";
75 - type = "micro";
76 - id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
77 - vbus-supply = <&usb_vbus>;
78 - };
79 -};
80 --- /dev/null
81 +++ b/Documentation/devicetree/bindings/usb/mediatek,musb.yaml
82 @@ -0,0 +1,113 @@
83 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
84 +# Copyright (c) 2020 MediaTek
85 +%YAML 1.2
86 +---
87 +$id: http://devicetree.org/schemas/usb/mediatek,musb.yaml#
88 +$schema: http://devicetree.org/meta-schemas/core.yaml#
89 +
90 +title: MediaTek MUSB DRD/OTG Controller Device Tree Bindings
91 +
92 +maintainers:
93 + - Min Guo <min.guo@mediatek.com>
94 +
95 +properties:
96 + $nodename:
97 + pattern: '^usb@[0-9a-f]+$'
98 +
99 + compatible:
100 + items:
101 + - enum:
102 + - mediatek,mt2701-musb
103 + - const: mediatek,mtk-musb
104 +
105 + reg:
106 + maxItems: 1
107 +
108 + interrupts:
109 + maxItems: 1
110 +
111 + interrupt-names:
112 + items:
113 + - const: mc
114 +
115 + clocks:
116 + items:
117 + - description: The main/core clock
118 + - description: The system bus clock
119 + - description: The 48Mhz clock
120 +
121 + clock-names:
122 + items:
123 + - const: main
124 + - const: mcu
125 + - const: univpll
126 +
127 + phys:
128 + maxItems: 1
129 +
130 + usb-role-switch:
131 + $ref: /schemas/types.yaml#/definitions/flag
132 + description: Support role switch. See usb/generic.txt
133 + type: boolean
134 +
135 + dr_mode:
136 + enum:
137 + - host
138 + - otg
139 + - peripheral
140 +
141 + power-domains:
142 + description: A phandle to USB power domain node to control USB's MTCMOS
143 + maxItems: 1
144 +
145 + connector:
146 + $ref: /connector/usb-connector.yaml#
147 + description: Connector for dual role switch
148 + type: object
149 +
150 +dependencies:
151 + usb-role-switch: [ 'connector' ]
152 + connector: [ 'usb-role-switch' ]
153 +
154 +required:
155 + - compatible
156 + - reg
157 + - interrupts
158 + - interrupt-names
159 + - phys
160 + - clocks
161 + - clock-names
162 +
163 +additionalProperties: false
164 +
165 +examples:
166 + - |
167 + #include <dt-bindings/clock/mt2701-clk.h>
168 + #include <dt-bindings/gpio/gpio.h>
169 + #include <dt-bindings/interrupt-controller/arm-gic.h>
170 + #include <dt-bindings/interrupt-controller/irq.h>
171 + #include <dt-bindings/phy/phy.h>
172 + #include <dt-bindings/power/mt2701-power.h>
173 +
174 + usb@11200000 {
175 + compatible = "mediatek,mt2701-musb", "mediatek,mtk-musb";
176 + reg = <0x11200000 0x1000>;
177 + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
178 + interrupt-names = "mc";
179 + phys = <&u2port2 PHY_TYPE_USB2>;
180 + dr_mode = "otg";
181 + clocks = <&pericfg CLK_PERI_USB0>,
182 + <&pericfg CLK_PERI_USB0_MCU>,
183 + <&pericfg CLK_PERI_USB_SLV>;
184 + clock-names = "main","mcu","univpll";
185 + power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
186 + usb-role-switch;
187 +
188 + connector {
189 + compatible = "gpio-usb-b-connector", "usb-b-connector";
190 + type = "micro";
191 + id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
192 + vbus-supply = <&usb_vbus>;
193 + };
194 + };
195 +...