summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/rt5033.dtsi
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
committerYuval Adam <_@yuv.al>2017-08-30 08:25:59 +0000
commit8e4bff4cab0ddac6060645b0715210484d02ff40 (patch)
tree3a5c3024371a04692a3a6d9974d001cdff8ebf84 /arch/arm/boot/dts/rt5033.dtsi
Initial file dump from open source releaseHEADmaster
Diffstat (limited to 'arch/arm/boot/dts/rt5033.dtsi')
-rw-r--r--arch/arm/boot/dts/rt5033.dtsi226
1 files changed, 226 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/rt5033.dtsi b/arch/arm/boot/dts/rt5033.dtsi
new file mode 100644
index 00000000..584183ba
--- /dev/null
+++ b/arch/arm/boot/dts/rt5033.dtsi
@@ -0,0 +1,226 @@
+/* example for RT5033
+ * Copyright (C) 2013 Richtek Technology Corp.
+ * Author: Patrick Chang <patrick_chang@richtek.com>
+ */
+
+/{
+ sec-battery {
+ status = "okay";
+ compatible = "samsung,sec-battery";
+ battery,vendor = "SDI SDI";
+ battery,charger_name = "sec-charger";
+ battery,fuelgauge_name = "sec-fuelgauge";
+ battery,technology = <2>; /* POWER_SUPPLY_TECHNOLOGY_LION */
+ battery,bat_irq_attr = <3>; /* IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING */
+ /* battery,ta_int = <&d_gpio_gpio 62 0x1>;
+ battery,ta_irq_attr = <0x3>; */
+
+ battery,chip_vendor = "QCOM";
+ battery,temp_adc_type = <1>; /* SEC_BATTERY_ADC_TYPE_AP */
+
+ battery,polling_time = <10 30 30 30 3600>;
+
+ battery,adc_check_count = <5>;
+
+ battery,cable_check_type = <5>; /* SEC_BATTERY_CABLE_CHECK_PSY */
+ battery,cable_source_type = <3>; /* SEC_BATTERY_CABLE_SOURCE_EXTERNAL */
+ battery,event_check;
+ battery,event_waiting_time = <600>;
+ battery,polling_type = <1>; /* SEC_BATTERY_MONITOR_ALARM */
+ battery,monitor_initial_count = <3>;
+
+ battery,battery_check_type = <0>; /* SEC_BATTERY_CHECK_NONE */
+ battery,check_count = <0>;
+ battery,check_adc_max = <1440>;
+ battery,check_adc_min = <0>;
+
+ battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */
+
+ battery,thermal_source = <2>; /* SEC_BATTERY_THERMAL_SOURCE_ADC */
+
+ battery,temp_table_adc = <27281 27669 28178 28724 29342 30101 30912 31807 32823 33858 34950 36049 37054
+ 38025 38219 38448 38626 38795 38989 39229 39540 39687 39822 40523 41123 41619>;
+ battery,temp_table_data = <700 650 600 550 500 450 400 350 300 250 200 150 100
+ 50 40 30 20 10 0 (-10) (-30) (-40) (-50) (-100) (-150) (-200)>;
+ battery,temp_check_type = <0>; /* SEC_BATTERY_TEMP_CHECK_NONE */
+ battery,temp_check_count = <1>;
+ battery,temp_high_threshold_event = <600>;
+ battery,temp_high_recovery_event = <450>;
+ battery,temp_low_threshold_event = <(-50)>;
+ battery,temp_low_recovery_event = <0>;
+ battery,temp_high_threshold_normal = <600>;
+ battery,temp_high_recovery_normal = <450>;
+ battery,temp_low_threshold_normal = <(-50)>;
+ battery,temp_low_recovery_normal = <0>;
+ battery,temp_high_threshold_lpm = <600>;
+ battery,temp_high_recovery_lpm = <450>;
+ battery,temp_low_threshold_lpm = <(-50)>;
+ battery,temp_low_recovery_lpm = <0>;
+ battery,full_check_type = <7>; /* SEC_BATTERY_FULLCHARGED_CHGPSY */
+ battery,full_check_type_2nd = <3>; /* SEC_BATTERY_FULLCHARGED_TIME */
+ battery,full_check_count = <1>;
+ battery,chg_gpio_full_check = <0>;
+ battery,chg_polarity_full_check = <1>;
+
+ /* SEC_BATTERY_FULL_CONDITION_SOC |
+ SEC_BATTERY_FULL_CONDITION_NOTIMEFULL |
+ SEC_BATTERY_FULL_CONDITION_VCELL */
+ battery,full_condition_type = <13>;
+ battery,full_condition_soc = <95>;
+ battery,full_condition_vcell = <4300>;
+
+ battery,recharge_check_count = <1>;
+ battery,recharge_condition_type = <2>; /* SEC_BATTERY_RECHARGE_CONDITION_VCELL */
+ battery,recharge_condition_soc = <98>;
+ battery,recharge_condition_vcell = <4300>;
+
+ battery,charging_total_time = <36000>;
+ battery,recharging_total_time = <5400>;
+ battery,charging_reset_time = <0>;
+
+ charger{
+ status = "disable";
+ /* Charger */
+ battery,charger_name = "sec-charger";
+ #battery,vbus_ctrl_gpio = <&d_gpio_gpio 64 0x00>;
+ battery,chg_gpio_en = <0>;
+ battery,chg_polarity_en = <0>;
+ battery,chg_gpio_status = <0>;
+ battery,chg_polarity_status = <0>;
+ battery,chg_float_voltage = <4350>;
+ battery,ovp_uvlo_check_type = <3>; /* SEC_BATTERY_OVP_UVLO_CHGPOLLING */
+ battery,full_check_type = <2>; /* SEC_BATTERY_FULLCHARGED_FG_CURRENT */
+
+ battery,input_current_limit = <1800 460 460 1800 460 900 1000 460 460 1000 650 1800 1800 460 1300 300 700 1300 300 1000 1800 460 460>;
+ battery,fast_charging_current = <2100 0 460 2100 460 1200 1000 460 0 1200 750 2100 2100 (-1) 1300 300 700 1300 300 1000 2100 0 0>;
+ battery,full_check_current_1st = <300 0 300 300 300 300 300 300 0 300 300 300 300 0 300 300 300 300 300 300 300 0 0>;
+ battery,full_check_current_2nd = <2400 0 2400 2400 2400 2400 2400 2400 0 2400 2400 2400 2400 0 2400 2400 2400 2400 2400 2400 2400 0 0>;
+ };
+ };
+
+ i2c_gpio6: i2c_gpio@0 {
+ compatible = "i2c-gpio";
+ gpios = <&d_gpio_gpio 66 0 /* sda */
+ &d_gpio_gpio 65 0 >; /* scl */
+ /*i2c-gpio,sda-open-drain;*/
+ /*i2c-gpio,scl-open-drain;*/
+ i2c-gpio,delay-us = <10>; /* ~100 kHz */
+ i2c-gpio,timeout-ms = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+ sec-fuelgauge@35 {
+ compatible = "samsung,sec-fuelgauge";
+ fuelgauge,fuelgauge_name = "sec-fuelgauge";
+ reg = <0x35>;
+ interrupt-parent = <&d_gpio_gpio>;
+ fuelgauge,irqf = "IRQF_TRIGGER_FALLING + IRQF_ONESHOT + IRQF_NO_SUSPEND";
+ fuelgauge,fuel_int = <&d_gpio_gpio 153 0x1>;
+ fuelgauge,capacity_max = <1000>;
+ fuelgauge,capacity_max_margin = <30>;
+ fuelgauge,capacity_min = <0>;
+ fuelgauge,capacity_calculation_type = <0x17>; /* not easy to understand ... */
+ fuelgauge,fuel_alert_soc = <1>;
+
+ battery_params {
+ battery,id = <0>; /* -1 means auto, detected by F/G */
+ battery0,battery_type = <4350>; /* 4200 4350 4400 */
+ battery0,vg_comp_interpolation_order = <2 2>; /* necessary */
+ battery0,vg_comp_idle_size = <1 4>; /* necessary */
+ battery0,vg_comp_idle_data = <3300 (-200) 0x32 0x32 0x32 0x32
+ 3300 50 0x32 0x32 0x32 0x32
+ 3300 250 0x32 0x32 0x32 0x32
+ 3300 450 0x32 0x32 0x32 0x32>;
+ battery0,vg_comp_normal_size = <1 4>; /* necessary */
+ battery0,vg_comp_normal_data = <3300 (-200) 0x32 0x32 0x32 0x32
+ 3300 50 0x32 0x32 0x32 0x32
+ 3300 250 0x32 0x32 0x32 0x32
+ 3300 450 0x32 0x32 0x32 0x32>;
+ battery0,special_case = <0>;
+ battery0,offset_interpolation_order = <2 2>; /* necessary */
+ battery0,offset_charging_size = <0 0>; /* m x n, m: volt or soc, n : temp */
+ battery0,offset_charging_data = <0 0 0>;
+ battery0,offset_discharging_size = <0 0>;
+ battery0,offset_discharging_data = <0 0 0>;
+ battery0,offset_special_size = <0 0>;
+ battery0,offset_special_data = <0 0 0>;
+ battery0,offset_low_power_size = <3 1>;
+ battery0,offset_low_power_data = <0 300 (-12)
+ 100 300 0
+ 1000 300 0>;
+ battery0,crate_idle_thres = <256>;
+ };
+ };
+ };
+ i2c_gpio8: i2c_gpio@1 {
+ compatible = "i2c-gpio";
+ gpios = <&d_gpio_gpio 159 0 /* sda */
+ &d_gpio_gpio 160 0 >; /* scl */
+ /*i2c-gpio,sda-open-drain;*/
+ /*i2c-gpio,scl-open-drain;*/
+ i2c-gpio,delay-us = <3>; /* ~100 kHz */
+ i2c-gpio,timeout-ms = <100>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ rt5033-mfd@34{
+ compatible = "richtek,rt5033mfd";
+ reg = <0x34>;
+ interrupt-parent = <&d_gpio_gpio>;
+ rt5033,irq-gpio = <&d_gpio_gpio 161 0x00>;
+ rt5033,mrstb-gpio = <&d_gpio_gpio 78 0x00>; //?for what?
+
+ rt5033_charger {
+ compatible = "richtek,rt5033-charger";
+ /* is_750kHz_switching = "yes"; optional, exist = enabled */
+ /* is_fixed_switching = "yes"; optional, exist = enabled */
+ };
+ rt5033_fled {
+ compatible = "richtek,rt5033-fled";
+ enable = <1 1>;
+ mid_track_alive = <0>;
+ mid_auto_track_en = <0>;
+ timeout_current_level = <50>;
+ strobe_current = <500>;
+ strobe_timeout = <544>;
+ torch_current = <38>;
+ lv_protection = <3300>;
+ mid_level = <4400>;
+ };
+
+ rt5033_safe_ldo {
+ compatible = "richtek,rt5033-safeldo";
+ regulator-name = "RT5033SafeLDO"; /* constraints->name, change name by yourself*/
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <4950000>; /* if max == min then apply_uV = 1 */
+ /* regulator-microvolt-offset = <0>; optional*/
+ /* regulator-boot-on = "yes"; optional, exist = enabled */
+ regulator-always-on = "yes";
+ /* regulator-ramp-delay = <100>; optional*/
+ };
+
+ rt5033_ldo1 {
+ compatible = "richtek,rt5033-ldo1";
+ regulator-name = "RT5033LDO1"; /* change name by yourself */
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3000000>; /* max == min then apply_uV = 1 */
+ /* regulator-microvolt-offset = < >; optional*/
+ /* regulator-boot-on = "yes"; optional, exist = enabled */
+ /* regulator-always-on = "yes"; optional, exist = enabled */
+ /* regulator-ramp-delay = <100>; optional*/
+
+ };
+
+
+ rt5033_buck1 {
+ compatible = "richtek,rt5033-dcdc1";
+ regulator-name = "RT5033BUCK"; /* change name by yourself */
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <3300000>; /* max == min then apply_uV = 1 */
+ /* regulator-microvolt-offset = < >; optional*/
+ /* regulator-boot-on = "yes"; optional, exist = enabled */
+ /* regulator-always-on = "yes"; optional, exist = enabled */
+ /* regulator-ramp-delay = <100>; optional*/
+ };
+ };
+ };
+};