1*f126890aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*f126890aSEmmanuel Vadot%YAML 1.2 3*f126890aSEmmanuel Vadot--- 4*f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/richtek,rt5033.yaml# 5*f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*f126890aSEmmanuel Vadot 7*f126890aSEmmanuel Vadottitle: Richtek RT5033 Power Management Integrated Circuit 8*f126890aSEmmanuel Vadot 9*f126890aSEmmanuel Vadotmaintainers: 10*f126890aSEmmanuel Vadot - Jakob Hauser <jahau@rocketmail.com> 11*f126890aSEmmanuel Vadot 12*f126890aSEmmanuel Vadotdescription: 13*f126890aSEmmanuel Vadot RT5033 is a multifunction device which includes battery charger, fuel gauge, 14*f126890aSEmmanuel Vadot flash LED current source, LDO and synchronous Buck converter for portable 15*f126890aSEmmanuel Vadot applications. It is interfaced to host controller using I2C interface. The 16*f126890aSEmmanuel Vadot battery fuel gauge uses a separate I2C bus. 17*f126890aSEmmanuel Vadot 18*f126890aSEmmanuel Vadotproperties: 19*f126890aSEmmanuel Vadot compatible: 20*f126890aSEmmanuel Vadot const: richtek,rt5033 21*f126890aSEmmanuel Vadot 22*f126890aSEmmanuel Vadot reg: 23*f126890aSEmmanuel Vadot maxItems: 1 24*f126890aSEmmanuel Vadot 25*f126890aSEmmanuel Vadot interrupts: 26*f126890aSEmmanuel Vadot maxItems: 1 27*f126890aSEmmanuel Vadot 28*f126890aSEmmanuel Vadot regulators: 29*f126890aSEmmanuel Vadot description: 30*f126890aSEmmanuel Vadot The regulators of RT5033 have to be instantiated under a sub-node named 31*f126890aSEmmanuel Vadot "regulators". For SAFE_LDO voltage there is only one value of 4.9 V. LDO 32*f126890aSEmmanuel Vadot voltage ranges from 1.2 V to 3.0 V in 0.1 V steps. BUCK voltage ranges 33*f126890aSEmmanuel Vadot from 1.0 V to 3.0 V in 0.1 V steps. 34*f126890aSEmmanuel Vadot type: object 35*f126890aSEmmanuel Vadot patternProperties: 36*f126890aSEmmanuel Vadot "^(SAFE_LDO|LDO|BUCK)$": 37*f126890aSEmmanuel Vadot type: object 38*f126890aSEmmanuel Vadot $ref: /schemas/regulator/regulator.yaml# 39*f126890aSEmmanuel Vadot unevaluatedProperties: false 40*f126890aSEmmanuel Vadot additionalProperties: false 41*f126890aSEmmanuel Vadot 42*f126890aSEmmanuel Vadot charger: 43*f126890aSEmmanuel Vadot type: object 44*f126890aSEmmanuel Vadot $ref: /schemas/power/supply/richtek,rt5033-charger.yaml# 45*f126890aSEmmanuel Vadot 46*f126890aSEmmanuel Vadotrequired: 47*f126890aSEmmanuel Vadot - compatible 48*f126890aSEmmanuel Vadot - reg 49*f126890aSEmmanuel Vadot - interrupts 50*f126890aSEmmanuel Vadot 51*f126890aSEmmanuel VadotadditionalProperties: false 52*f126890aSEmmanuel Vadot 53*f126890aSEmmanuel Vadotexamples: 54*f126890aSEmmanuel Vadot - | 55*f126890aSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 56*f126890aSEmmanuel Vadot 57*f126890aSEmmanuel Vadot battery: battery { 58*f126890aSEmmanuel Vadot compatible = "simple-battery"; 59*f126890aSEmmanuel Vadot precharge-current-microamp = <450000>; 60*f126890aSEmmanuel Vadot constant-charge-current-max-microamp = <1000000>; 61*f126890aSEmmanuel Vadot charge-term-current-microamp = <150000>; 62*f126890aSEmmanuel Vadot precharge-upper-limit-microvolt = <3500000>; 63*f126890aSEmmanuel Vadot constant-charge-voltage-max-microvolt = <4350000>; 64*f126890aSEmmanuel Vadot }; 65*f126890aSEmmanuel Vadot 66*f126890aSEmmanuel Vadot extcon { 67*f126890aSEmmanuel Vadot usb_con: connector { 68*f126890aSEmmanuel Vadot compatible = "usb-b-connector"; 69*f126890aSEmmanuel Vadot label = "micro-USB"; 70*f126890aSEmmanuel Vadot type = "micro"; 71*f126890aSEmmanuel Vadot }; 72*f126890aSEmmanuel Vadot }; 73*f126890aSEmmanuel Vadot 74*f126890aSEmmanuel Vadot i2c { 75*f126890aSEmmanuel Vadot #address-cells = <1>; 76*f126890aSEmmanuel Vadot #size-cells = <0>; 77*f126890aSEmmanuel Vadot 78*f126890aSEmmanuel Vadot i2c@0 { 79*f126890aSEmmanuel Vadot #address-cells = <1>; 80*f126890aSEmmanuel Vadot #size-cells = <0>; 81*f126890aSEmmanuel Vadot reg = <0>; 82*f126890aSEmmanuel Vadot 83*f126890aSEmmanuel Vadot fuel-gauge@35 { 84*f126890aSEmmanuel Vadot compatible = "richtek,rt5033-battery"; 85*f126890aSEmmanuel Vadot reg = <0x35>; 86*f126890aSEmmanuel Vadot 87*f126890aSEmmanuel Vadot interrupt-parent = <&msmgpio>; 88*f126890aSEmmanuel Vadot interrupts = <121 IRQ_TYPE_EDGE_FALLING>; 89*f126890aSEmmanuel Vadot 90*f126890aSEmmanuel Vadot pinctrl-names = "default"; 91*f126890aSEmmanuel Vadot pinctrl-0 = <&fg_alert_default>; 92*f126890aSEmmanuel Vadot 93*f126890aSEmmanuel Vadot power-supplies = <&rt5033_charger>; 94*f126890aSEmmanuel Vadot }; 95*f126890aSEmmanuel Vadot }; 96*f126890aSEmmanuel Vadot 97*f126890aSEmmanuel Vadot i2c@1 { 98*f126890aSEmmanuel Vadot #address-cells = <1>; 99*f126890aSEmmanuel Vadot #size-cells = <0>; 100*f126890aSEmmanuel Vadot reg = <1>; 101*f126890aSEmmanuel Vadot 102*f126890aSEmmanuel Vadot pmic@34 { 103*f126890aSEmmanuel Vadot compatible = "richtek,rt5033"; 104*f126890aSEmmanuel Vadot reg = <0x34>; 105*f126890aSEmmanuel Vadot 106*f126890aSEmmanuel Vadot interrupt-parent = <&msmgpio>; 107*f126890aSEmmanuel Vadot interrupts = <62 IRQ_TYPE_EDGE_FALLING>; 108*f126890aSEmmanuel Vadot 109*f126890aSEmmanuel Vadot pinctrl-names = "default"; 110*f126890aSEmmanuel Vadot pinctrl-0 = <&pmic_int_default>; 111*f126890aSEmmanuel Vadot 112*f126890aSEmmanuel Vadot regulators { 113*f126890aSEmmanuel Vadot safe_ldo_reg: SAFE_LDO { 114*f126890aSEmmanuel Vadot regulator-name = "SAFE_LDO"; 115*f126890aSEmmanuel Vadot regulator-min-microvolt = <4900000>; 116*f126890aSEmmanuel Vadot regulator-max-microvolt = <4900000>; 117*f126890aSEmmanuel Vadot regulator-always-on; 118*f126890aSEmmanuel Vadot }; 119*f126890aSEmmanuel Vadot ldo_reg: LDO { 120*f126890aSEmmanuel Vadot regulator-name = "LDO"; 121*f126890aSEmmanuel Vadot regulator-min-microvolt = <2800000>; 122*f126890aSEmmanuel Vadot regulator-max-microvolt = <2800000>; 123*f126890aSEmmanuel Vadot }; 124*f126890aSEmmanuel Vadot buck_reg: BUCK { 125*f126890aSEmmanuel Vadot regulator-name = "BUCK"; 126*f126890aSEmmanuel Vadot regulator-min-microvolt = <1200000>; 127*f126890aSEmmanuel Vadot regulator-max-microvolt = <1200000>; 128*f126890aSEmmanuel Vadot }; 129*f126890aSEmmanuel Vadot }; 130*f126890aSEmmanuel Vadot 131*f126890aSEmmanuel Vadot rt5033_charger: charger { 132*f126890aSEmmanuel Vadot compatible = "richtek,rt5033-charger"; 133*f126890aSEmmanuel Vadot monitored-battery = <&battery>; 134*f126890aSEmmanuel Vadot richtek,usb-connector = <&usb_con>; 135*f126890aSEmmanuel Vadot }; 136*f126890aSEmmanuel Vadot }; 137*f126890aSEmmanuel Vadot }; 138*f126890aSEmmanuel Vadot }; 139