Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 79 additions & 2 deletions arch/arm64/boot/dts/exynos/google/gs201-panther.dts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* USB (NCM + ACM), the cluster watchdogs from gs201.dtsi, a
* simple-framebuffer on the buffer ABL leaves DPP0 scanning out, UFS, the
* three keys, the touchscreen with its rails on the main PMIC, the GPU, the
* haptics and the MAX77759's I2C bus. The panel driver stays disabled.
* haptics and the MAX77759's I2C bus with its fuel gauge. The panel driver
* stays disabled.
*/

/dts-v1/;
Expand Down Expand Up @@ -48,6 +49,15 @@
};
};

battery: battery {
compatible = "simple-battery";
/* google,chg-battery-capacity in the live tree */
charge-full-design-microamp-hours = <4277000>;
/* google,fv-max-uv; VEmpty of the live tree's gauge models */
voltage-max-design-microvolt = <4450000>;
voltage-min-design-microvolt = <3300000>;
};

/* The same pins as cheetah's (Google's gs201-common.dtsi). */
gpio-keys {
compatible = "gpio-keys";
Expand Down Expand Up @@ -176,7 +186,7 @@
/*
* MAX77759 (charger, Type-C port controller, fuel gauge) on USI13, as on
* the Pixel 7 Pro: TCPC 0x25, PMIC 0x66, fuel gauge 0x36, charger 0x69,
* bus pins gpp25-0/1. Its devices are not described yet: the Type-C port
* bus pins gpp25-0/1. Only the fuel gauge is described: the Type-C port
* controller would take over VBUS and the data role from the forced-VBUS
* setup the USB PHY uses, and the USB link is our only way into the phone.
*/
Expand All @@ -188,6 +198,64 @@
&hsi2c_13 {
clock-frequency = <400000>;
status = "okay";

fuel-gauge@36 {
compatible = "maxim,max77759-fg";
reg = <0x36>;
interrupts-extended = <&gpa9 3 IRQ_TYPE_LEVEL_LOW>;
pinctrl-0 = <&if_pmic_fg_int>;
pinctrl-names = "default";
/* maxim,rsense-default = <500> (10 uOhm units) in the live tree */
shunt-resistor-micro-ohms = <5000>;
monitored-battery = <&battery>;

/*
* Battery model for the pack with a 1 kOhm ID resistor, the one
* this phone has (the gauge's TempCo read 0x1a02 under stock's
* driver, which is this model's). From Google's
* gs201-panther-battery-data.dtsi (cos-a1-1k, model version 2),
* except RelaxCfg 0x143b, the value stock writes over the
* model's at boot (r_regval_1720x). TaskPeriod 0x2d00 makes one
* capacity LSB 2 mAh with 5 mOhm: DesignCap 0x0873 = 4326 mAh.
*/
maxim,fg-model = /bits/ 16 <
0x8c80 0xb770 0xb8f0 0xba50 0xbb40 0xbc30 0xbe00 0xbfd0
0xc1b0 0xc3a0 0xc6b0 0xc9c0 0xd020 0xd300 0xd5e0 0xdc30
0x0080 0x1070 0x1020 0x0ed0 0x0f00 0x1700 0x1530 0x0c20
0x0c40 0x07f0 0x07f0 0x06f0 0x0710 0x06d0 0x06f0 0x06f0
0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200
0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200
>;
maxim,fg-params = /bits/ 16 <
0xf060 /* IAvgEmpty */
0x143b /* RelaxCfg */
0x260e /* LearnCfg */
0x4217 /* Config: external thermistor, TEx clear */
0x0090 /* Config2 */
0x5f00 /* FullSOCThr */
0x0873 /* FullCapRep */
0x0873 /* DesignCap */
0x3200 /* dPAcc */
0x021c /* dQAcc */
0x0873 /* FullCapNom */
0xa561 /* VEmpty */
0x1f00 /* QRTable00 */
0x0d80 /* QRTable10 */
0x0480 /* QRTable20 */
0x0400 /* QRTable30 */
0x0740 /* RComp0 */
0x1a02 /* TempCo */
0x0557 /* IChgTerm */
0xed51 /* TGain */
0x1eba /* TOff */
0x0014 /* Curve */
0x3870 /* MiscCfg */
0x1900 /* AtRate */
0x2241 /* ConvgCfg */
0xc613 /* FilterCfg */
0x2d00 /* TaskPeriod */
>;
};
};

/*
Expand All @@ -206,6 +274,15 @@
};
};

&pinctrl_gpio_alive {
if_pmic_fg_int: if-pmic-fg-int-pins {
samsung,pins = "gpa9-3";
samsung,pin-function = <GS101_PIN_FUNC_EINT>;
samsung,pin-pud = <GS101_PIN_PULL_UP>;
samsung,pin-drv = <GS101_PIN_DRV_2_5_MA>;
};
};

&pinctrl_peric0 {
status = "okay";
};
Expand Down