blob: 22f38a9b03bc4701e0eb20d05a54f609dba93d6b [file] [log] [blame] [edit]
// SPDX-License-Identifier: GPL-2.0-only
/*
* Battery device tree entries specific to felix
*
* Copyright 2022 Google,LLC
*
*/
&max77759_fg {
/delete-property/ maxim,force-batt-id;
maxim,dual-battery = "maxfg_base";
maxim,rc-enable;
maxim,rc-soc = <20>;
maxim,rc-temp = <50>;
maxim,filtercfg-temp = <100>;
maxim,filtercfg-temp-hysteresis = <30>;
maxim,filtercfg-default = /bits/ 16 <0xc624>;
maxim,filtercfg-adjust = /bits/ 16 <0xc617>;
maxim,fg-data {
#include "gs201-felix-battery-data.dtsi"
};
};
/ {
fragment@battery {
target-path = "/";
__overlay__ {
google_battery: google,battery {
google,fg-psy-name = "dualbatt";
google,chg-battery-capacity = <4727>;
/* charge table */
google,chg-temp-limits = <0 100 200 420 460 480 550>;
google,chg-cv-limits = <4100000 4200000 4250000 4300000 4480000>;
google,chg-cc-limits = <
30 30 10 10 0
50 50 30 30 30
100 100 100 70 50
80 80 50 50 50
50 50 50 0 0
30 0 0 0 0
>;
google,chg-topoff-limits = <250 250 250 500 250 250>;
google,ttf-temp-idx= <2>;
google,ttf-adapter = <3000>;
google,ttf-soc-table = <49 71 88 91 93 100>;
google,ttf-elap-table = <41 55 79 106 147 178>;
google,ttf-tier-table = <0 50 74>;
google,fan-bt-limits = <280 290 300 320>;
google,batt-id-1-atl {
google,batt-id = <1>;
google,aacr-ref-cycles = <300 400 500 600 700 800>;
google,aacr-ref-fade10 = < 3 10 27 37 46 55>;
};
google,batt-id-2-cos {
google,batt-id = <2>;
google,aacr-ref-cycles = <200 300 400 500 600 700 800>;
google,aacr-ref-fade10 = < 8 16 17 33 38 44 50>;
};
};
google_dual_batt_gauge: google,dual_batt_gauge {
status = "okay";
compatible = "google,dual_batt_gauge";
google,first-fg-psy-name = "maxfg_base";
google,second-fg-psy-name = "maxfg_secondary";
google,vfloat-offset-max-idx = <1>;
google,cc-balance-ratio = <80>; /* 80% */
google,psy-type-unknown;
google,chg-base-battery-capacity = <1460>;
google,chg-sec-battery-capacity = <3267>;
google,chg-pack-cc-limits = <
30 30 10 10 0
50 50 30 30 30
100 100 100 70 50
80 80 50 50 50
50 50 50 0 0
30 0 0 0 0
>;
};
};
};
};
&pinctrl_1 {
/* [MAX17201 : INTB] > ALRT_GAUGE_M > [XEINT_11] */
alrt_gauge_m_irq: alrt-gauge-m-irq {
samsung,pins = "gpa7-3"; /* XEINT_11 */
samsung,pin-function = <EXYNOS_PIN_FUNC_EINT>;
samsung,pin-pud = <EXYNOS_PIN_PULL_UP>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};
};
&hsi2c_13 {
clock-frequency = <370000>;
};
&hsi2c_15 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&hsi2c15_bus>;
max1720x_fg: max1720x@36 {
status = "okay";
compatible = "maxim,max1720x";
reg-names = "m5db", "nvram";
reg = <0x36 0x0b>;
pinctrl-names = "default";
pinctrl-0 = <&alrt_gauge_m_irq>;
maxim,irq-gpio = <&gpa7 3 GPIO_ACTIVE_LOW>;
maxim,irqf-shared;
maxim,rsense-default = <300>;
/* no needed for EEPROM */
maxim,batt-id-range-pct = <0>;
maxim,psy-type-unknown;
maxim,dual-battery = "maxfg_secondary";
maxim,read-batt-sn = <1>;
maxim,filtercfg-temp = <100>;
maxim,filtercfg-temp-hysteresis = <30>;
maxim,filtercfg-default = /bits/ 16 <0xeb5>;
maxim,filtercfg-adjust = /bits/ 16 <0xea7>;
};
};