~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/devicetree/bindings/mfd/mediatek,mt6370.yaml

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2 %YAML 1.2
  3 ---
  4 $id: http://devicetree.org/schemas/mfd/mediatek,mt6370.yaml#
  5 $schema: http://devicetree.org/meta-schemas/core.yaml#
  6 
  7 title: MediaTek MT6370 SubPMIC
  8 
  9 maintainers:
 10   - ChiYuan Huang <cy_huang@richtek.com>
 11 
 12 description: |
 13   MT6370 is a highly-integrated smart power management IC, which includes a
 14   single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C &
 15   Power Delivery (PD) controller, dual flash LED current sources, a RGB LED
 16   driver, a backlight WLED driver, a display bias driver and a general LDO for
 17   portable devices.
 18 
 19 properties:
 20   compatible:
 21     const: mediatek,mt6370
 22 
 23   reg:
 24     maxItems: 1
 25 
 26   wakeup-source: true
 27 
 28   interrupts:
 29     maxItems: 1
 30 
 31   interrupt-controller: true
 32 
 33   "#interrupt-cells":
 34     const: 1
 35 
 36   adc:
 37     type: object
 38     additionalProperties: false
 39     description: |
 40       Provides 9 channels for system monitoring, including VBUSDIV5 (lower
 41       accuracy, higher measure range), VBUSDIV2 (higher accuracy, lower
 42       measure range), VBAT, VSYS, CHG_VDDP, TS_BAT, IBUS, IBAT, and TEMP_JC.
 43 
 44     properties:
 45       compatible:
 46         const: mediatek,mt6370-adc
 47 
 48       "#io-channel-cells":
 49         const: 1
 50 
 51     required:
 52       - compatible
 53       - "#io-channel-cells"
 54 
 55   backlight:
 56     type: object
 57     $ref: /schemas/leds/backlight/mediatek,mt6370-backlight.yaml#
 58 
 59   charger:
 60     type: object
 61     $ref: /schemas/power/supply/mediatek,mt6370-charger.yaml#
 62 
 63   tcpc:
 64     type: object
 65     $ref: /schemas/usb/mediatek,mt6370-tcpc.yaml#
 66 
 67   indicator:
 68     type: object
 69     $ref: /schemas/leds/mediatek,mt6370-indicator.yaml#
 70 
 71   flashlight:
 72     type: object
 73     $ref: /schemas/leds/mediatek,mt6370-flashlight.yaml#
 74 
 75   regulators:
 76     type: object
 77     additionalProperties: false
 78     description: |
 79       List all supported regulators, which support the control for DisplayBias
 80       voltages and one general purpose LDO which commonly used to drive the
 81       vibrator.
 82 
 83     patternProperties:
 84       "^(dsvbst|vibldo)$":
 85         $ref: /schemas/regulator/regulator.yaml#
 86         type: object
 87         unevaluatedProperties: false
 88 
 89       "^(dsvpos|dsvneg)$":
 90         $ref: /schemas/regulator/regulator.yaml#
 91         type: object
 92         unevaluatedProperties: false
 93 
 94         properties:
 95           enable-gpios:
 96             maxItems: 1
 97 
 98 required:
 99   - compatible
100   - reg
101   - interrupts
102   - interrupt-controller
103   - "#interrupt-cells"
104   - regulators
105   - adc
106   - backlight
107   - indicator
108   - tcpc
109   - charger
110   - flashlight
111 
112 additionalProperties: false
113 
114 examples:
115   - |
116     #include <dt-bindings/interrupt-controller/irq.h>
117     #include <dt-bindings/leds/common.h>
118     #include <dt-bindings/iio/adc/mediatek,mt6370_adc.h>
119     #include <dt-bindings/usb/pd.h>
120     i2c {
121       #address-cells = <1>;
122       #size-cells = <0>;
123 
124       pmic@34 {
125         compatible = "mediatek,mt6370";
126         reg = <0x34>;
127         wakeup-source;
128         interrupts-extended = <&gpio26 3 IRQ_TYPE_LEVEL_LOW>;
129         interrupt-controller;
130         #interrupt-cells = <1>;
131 
132         mt6370_adc: adc {
133           compatible = "mediatek,mt6370-adc";
134           #io-channel-cells = <1>;
135         };
136 
137         backlight {
138           compatible = "mediatek,mt6370-backlight";
139           mediatek,bled-channel-use = /bits/ 8 <15>;
140         };
141 
142         charger {
143           compatible = "mediatek,mt6370-charger";
144           interrupts = <68>, <48>, <6>;
145           interrupt-names = "uvp_d_evt", "attach_i", "mivr";
146           io-channels = <&mt6370_adc MT6370_CHAN_IBUS>;
147 
148           mt6370_otg_vbus: usb-otg-vbus-regulator {
149             regulator-name = "mt6370-usb-otg-vbus";
150             regulator-min-microvolt = <4350000>;
151             regulator-max-microvolt = <5800000>;
152             regulator-min-microamp = <500000>;
153             regulator-max-microamp = <3000000>;
154           };
155         };
156 
157         indicator {
158           compatible = "mediatek,mt6370-indicator";
159           #address-cells = <1>;
160           #size-cells = <0>;
161 
162           multi-led@0 {
163             reg = <0>;
164             function = LED_FUNCTION_INDICATOR;
165             color = <LED_COLOR_ID_RGB>;
166             led-max-microamp = <24000>;
167             #address-cells = <1>;
168             #size-cells = <0>;
169             led@0 {
170               reg = <0>;
171               color = <LED_COLOR_ID_RED>;
172             };
173             led@1 {
174               reg = <1>;
175               color = <LED_COLOR_ID_GREEN>;
176             };
177             led@2 {
178               reg = <2>;
179               color = <LED_COLOR_ID_BLUE>;
180             };
181           };
182           led@3 {
183             reg = <3>;
184             function = LED_FUNCTION_INDICATOR;
185             color = <LED_COLOR_ID_WHITE>;
186             led-max-microamp = <6000>;
187           };
188         };
189 
190         flashlight {
191           compatible = "mediatek,mt6370-flashlight";
192           #address-cells = <1>;
193           #size-cells = <0>;
194           led@0 {
195             reg = <0>;
196             led-sources = <0>;
197             function = LED_FUNCTION_FLASH;
198             color = <LED_COLOR_ID_WHITE>;
199             function-enumerator = <1>;
200             led-max-microamp = <200000>;
201             flash-max-microamp = <500000>;
202             flash-max-timeout-us = <1248000>;
203           };
204           led@1 {
205             reg = <1>;
206             led-sources = <1>;
207             function = LED_FUNCTION_FLASH;
208             color = <LED_COLOR_ID_WHITE>;
209             function-enumerator = <2>;
210             led-max-microamp = <200000>;
211             flash-max-microamp = <500000>;
212             flash-max-timeout-us = <1248000>;
213           };
214         };
215 
216         tcpc {
217           compatible = "mediatek,mt6370-tcpc";
218           interrupts-extended = <&gpio26 4 IRQ_TYPE_LEVEL_LOW>;
219 
220           connector {
221             compatible = "usb-c-connector";
222             label = "USB-C";
223             vbus-supply = <&mt6370_otg_vbus>;
224             data-role = "dual";
225             power-role = "dual";
226             try-power-role = "sink";
227             source-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
228             sink-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP)>;
229             op-sink-microwatt = <10000000>;
230 
231             ports {
232               #address-cells = <1>;
233               #size-cells = <0>;
234 
235               port@0 {
236                 reg = <0>;
237                 endpoint {
238                   remote-endpoint = <&usb_hs>;
239                 };
240               };
241               port@1 {
242                 reg = <1>;
243                 endpoint {
244                   remote-endpoint = <&usb_ss>;
245                 };
246               };
247               port@2 {
248                 reg = <2>;
249                 endpoint {
250                   remote-endpoint = <&dp_aux>;
251                 };
252               };
253             };
254           };
255         };
256 
257         regulators {
258           dsvbst {
259             regulator-name = "mt6370-dsv-vbst";
260             regulator-min-microvolt = <4000000>;
261             regulator-max-microvolt = <6200000>;
262           };
263           dsvpos {
264             regulator-name = "mt6370-dsv-vpos";
265             regulator-min-microvolt = <4000000>;
266             regulator-max-microvolt = <6000000>;
267             regulator-boot-on;
268           };
269           dsvneg {
270             regulator-name = "mt6370-dsv-vneg";
271             regulator-min-microvolt = <4000000>;
272             regulator-max-microvolt = <6000000>;
273             regulator-boot-on;
274           };
275           vibldo {
276             regulator-name = "mt6370-vib-ldo";
277             regulator-min-microvolt = <1600000>;
278             regulator-max-microvolt = <4000000>;
279           };
280         };
281       };
282     };

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php