From f90b926ad8f7f2139eedcc40b20341b37f7497a7 Mon Sep 17 00:00:00 2001 From: Lef Date: Sun, 1 Nov 2026 13:14:36 +0200 Subject: [PATCH 1/6] dt-bindings: i2c: exynos5: add google,zuma-hsi2c The Pixel 8 Pro's USI11 bus (hsi2c_11, at 0x10cb0000, as in Google's devicetree) is the same Samsung HSI2C controller as the other Google SoCs in this list. Add the zuma compatible, which the zuma devicetree uses for it. Signed-off-by: Lef Assisted-by: LLM --- Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml index b4ed5cd251..e15efb553b 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.yaml @@ -41,6 +41,7 @@ properties: - enum: - google,gs101-hsi2c - google,gs201-hsi2c + - google,zuma-hsi2c - google,zumapro-hsi2c - samsung,exynos2200-hsi2c - samsung,exynos850-hsi2c From ee3eb81eda9950db378ab2acaf8d82622f4ace8e Mon Sep 17 00:00:00 2001 From: Lef Date: Sun, 1 Nov 2026 13:14:36 +0200 Subject: [PATCH 2/6] dt-bindings: soc: samsung: exynos-sysreg: add google,zuma-peric1-sysreg USI11 is at 0x10cb00c0 and its SW_CONF is at offset 0xc of the PERIC1 sysreg (0x10c21000), as in Google's devicetree. Add the zuma compatible to the list of sysregs and to the condition that groups the PERIC sysregs of the other Google SoCs. Signed-off-by: Lef Assisted-by: LLM --- .../devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml index 2a181df90c..8cb6ce85da 100644 --- a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml @@ -28,6 +28,7 @@ properties: - google,gs201-peric1-sysreg - google,gs201-vgpio2ap-sysreg - google,zuma-hsi0-sysreg + - google,zuma-peric1-sysreg - google,zuma-ufs-sysreg - google,zumapro-apm-sysreg - google,zumapro-hsi0-sysreg @@ -116,6 +117,7 @@ allOf: - google,gs201-hsi2-sysreg - google,gs201-peric0-sysreg - google,gs201-peric1-sysreg + - google,zuma-peric1-sysreg - google,zumapro-apm-sysreg - google,zumapro-hsi0-sysreg - google,zumapro-peric0-sysreg From ffbc20b899bc966ec27d36b8f4408d81fed823d6 Mon Sep 17 00:00:00 2001 From: Lef Date: Sun, 1 Nov 2026 13:14:36 +0200 Subject: [PATCH 3/6] dt-bindings: clock: google,zuma-clock: add CMU_PERIC1 CMU_PERIC1 supplies USI11, the I2C bus of the Pixel 8 Pro's MAX77759 fuel gauge, charger, Type-C controller and PMIC. Its NoC and USI input clocks come from CMU_TOP. Register layout and parents are from Google's GPL cal-if/zuma tables (android-gs-shusky-6.1-android16). Signed-off-by: Lef Assisted-by: LLM --- .../bindings/clock/google,zuma-clock.yaml | 28 +++++++++++++++++++ include/dt-bindings/clock/google,zuma.h | 18 +++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/clock/google,zuma-clock.yaml b/Documentation/devicetree/bindings/clock/google,zuma-clock.yaml index cd708ab082..11d78ddd41 100644 --- a/Documentation/devicetree/bindings/clock/google,zuma-clock.yaml +++ b/Documentation/devicetree/bindings/clock/google,zuma-clock.yaml @@ -13,6 +13,8 @@ description: | CMU_TOP supplies the HSI0 NoC and peripheral clocks to CMU_HSI0 from its shared PLLs. CMU_HSI0 supplies USI2, the touchscreen's SPI, from the HSI0 peripheral clock; its NoC path also takes the board-level HSI0 ALT clock. + CMU_TOP also supplies the PERIC1 NoC and USI input clocks to CMU_PERIC1, + which supplies USI11, the I2C bus of the battery, charger and USB-C chips. CMU_APM supplies the APM mailbox, its internal memory and the always-on GPIO banks from the always-on ALV PLL and the oscillator. The external oscillator supplies the PLL reference and the oscillator mux @@ -25,6 +27,7 @@ properties: - google,zuma-cmu-top - google,zuma-cmu-apm - google,zuma-cmu-hsi0 + - google,zuma-cmu-peric1 reg: maxItems: 1 @@ -80,6 +83,22 @@ allOf: - const: bus - const: peri - const: alt + - if: + properties: + compatible: + const: google,zuma-cmu-peric1 + then: + properties: + clocks: + items: + - description: External oscillator reference clock + - description: PERIC1 NoC clock from CMU_TOP + - description: PERIC1 USI input clock from CMU_TOP + clock-names: + items: + - const: oscclk + - const: bus + - const: ip additionalProperties: false @@ -104,4 +123,13 @@ examples: clock-names = "oscclk", "bus", "peri", "alt"; }; + clock-controller@10c00000 { + compatible = "google,zuma-cmu-peric1"; + reg = <0x10c00000 0x8000>; + #clock-cells = <1>; + clocks = <&oscclk>, <&cmu_top CLK_DOUT_PERIC1_NOC>, + <&cmu_top CLK_DOUT_PERIC1_IP>; + clock-names = "oscclk", "bus", "ip"; + }; + ... diff --git a/include/dt-bindings/clock/google,zuma.h b/include/dt-bindings/clock/google,zuma.h index 45aef7817c..fbbae0762b 100644 --- a/include/dt-bindings/clock/google,zuma.h +++ b/include/dt-bindings/clock/google,zuma.h @@ -2,7 +2,7 @@ #ifndef _DT_BINDINGS_CLOCK_GOOGLE_ZUMA_H #define _DT_BINDINGS_CLOCK_GOOGLE_ZUMA_H -/* CMU_TOP: the HSI0 NoC and peripheral clock paths. */ +/* CMU_TOP: the HSI0 and PERIC1 NoC and peripheral clock paths. */ #define CLK_FOUT_SHARED0 1 #define CLK_FOUT_SHARED1 2 #define CLK_FOUT_SHARED2 3 @@ -18,6 +18,12 @@ #define CLK_MOUT_HSI0_PERI 13 #define CLK_GOUT_HSI0_PERI 14 #define CLK_DOUT_HSI0_PERI 15 +#define CLK_MOUT_PERIC1_NOC 16 +#define CLK_MOUT_PERIC1_IP 17 +#define CLK_GOUT_PERIC1_NOC 18 +#define CLK_GOUT_PERIC1_IP 19 +#define CLK_DOUT_PERIC1_NOC 20 +#define CLK_DOUT_PERIC1_IP 21 /* CMU_HSI0: USI2, the touchscreen's SPI. */ #define CLK_GOUT_HSI0_ALT 1 @@ -31,6 +37,16 @@ #define CLK_GOUT_HSI0_USI2_IP 9 #define CLK_GOUT_HSI0_USI2_PCLK 10 +/* CMU_PERIC1: USI11, the I2C bus of the battery, charger and USB-C chips. */ +#define CLK_MOUT_PERIC1_NOC_USER 1 +#define CLK_GOUT_GPIO_PERIC1 2 +#define CLK_GOUT_PERIC1_SYSREG 3 +#define CLK_MOUT_PERIC1_USI11_USER 4 +#define CLK_DOUT_PERIC1_USI11 5 +#define CLK_GOUT_PERIC1_USI11_IPCLK 6 +#define CLK_GOUT_PERIC1_USI11_PCLK 7 +#define CLK_GOUT_PERIC1_USI11_RSTNSYNC 8 + /* CMU_APM: the APM mailbox, its SRAM and the always-on GPIO banks. */ #define CLK_APM_PLL_ALV_DIV2 1 #define CLK_APM_PLL_ALV_DIV4 2 From d0d9673b74d59f5c546c89981590e5c166fe7679 Mon Sep 17 00:00:00 2001 From: Lef Date: Sat, 31 Oct 2026 16:39:51 +0200 Subject: [PATCH 4/6] clk: samsung: clk-zuma: add the PERIC1 path to USI11 Add the CMU_TOP PERIC1 NoC and IP clocks (firmware-owned, read-only) and CMU_PERIC1 with USI11's user mux, divider and gates, for the I2C bus of the battery, charger and Type-C chips. The layout follows the Pixel 9a's PERIC1 code, which comes from the same cal-if/zuma tables; USI11 is the next slot after USI10 there (mux 0x640, divider 0x1810, gates 0x2048/0x204c/0x2094). The USI11 gates keep the mode firmware set. Signed-off-by: Lef Assisted-by: LLM --- drivers/clk/samsung/clk-zuma.c | 79 ++++++++++++++++++++++++++++++++-- 1 file changed, 75 insertions(+), 4 deletions(-) diff --git a/drivers/clk/samsung/clk-zuma.c b/drivers/clk/samsung/clk-zuma.c index ccb80f62e4..962f2ae8e3 100644 --- a/drivers/clk/samsung/clk-zuma.c +++ b/drivers/clk/samsung/clk-zuma.c @@ -1,11 +1,14 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Google Tensor G3 (zuma) clocks for the touchscreen and its PMIC. + * Google Tensor G3 (zuma) clocks for the touchscreen, its PMIC and the + * battery bus. * * Register layout and parents derived from Google's GPL CMUCAL tables in * cal-if/zuma/cmucal-{sfr,node}.c, Copyright 2022 Samsung Electronics Co., Ltd. * Only the path from CMU_TOP to HSI0's USI2 is described, with CMU_APM's - * clocks for the APM mailbox, its SRAM and the always-on GPIO banks. PLLs, + * clocks for the APM mailbox, its SRAM and the always-on GPIO banks, and + * the path from CMU_TOP to PERIC1's USI11 (the battery, charger and USB-C + * I2C bus). PLLs, * muxes and dividers keep their firmware settings, except USI2's own * divider, which sets the SPI rate. No PLL rate table is supplied. */ @@ -43,6 +46,9 @@ static const struct samsung_fixed_factor_clock top_factors[] __initconst = { FFACTOR(CLK_SHARED3_D2, "zuma_shared3_d2", "zuma_shared3", 1, 2, 0), }; +PNAME(mout_peric1_parents) = { + "zuma_shared0_d4", "zuma_shared2_d2", "zuma_shared3_d2", "zuma_spare", +}; PNAME(mout_hsi0_noc_parents) = { "zuma_shared0_d4", "zuma_shared1_d4", "zuma_shared2_d2", "zuma_shared3_d2", "zuma_spare", "oscclk", "oscclk", "oscclk", @@ -57,14 +63,22 @@ static const struct samsung_mux_clock top_muxes[] __initconst = { 0x1094, 0, 3, 0, CLK_MUX_READ_ONLY), MUX_F(CLK_MOUT_HSI0_PERI, "zuma_mout_hsi0_peri", mout_hsi0_peri_parents, 0x1098, 0, 2, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_PERIC1_NOC, "zuma_mout_peric1_noc", mout_peric1_parents, + 0x10f8, 0, 2, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_PERIC1_IP, "zuma_mout_peric1_ip", mout_peric1_parents, + 0x10f4, 0, 2, 0, CLK_MUX_READ_ONLY), }; -/* The hardware order is mux -> gate -> divider. HSI0 is firmware-owned. */ +/* The hardware order is mux -> gate -> divider. HSI0 and PERIC1 are firmware-owned. */ static const struct samsung_gate_clock top_ro_gates[] __initconst = { GATE(CLK_GOUT_HSI0_NOC, "zuma_gout_hsi0_noc", "zuma_mout_hsi0_noc", 0x20bc, 21, CLK_IGNORE_UNUSED, 0), GATE(CLK_GOUT_HSI0_PERI, "zuma_gout_hsi0_peri", "zuma_mout_hsi0_peri", 0x20c0, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_PERIC1_NOC, "zuma_gout_peric1_noc", "zuma_mout_peric1_noc", + 0x211c, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_PERIC1_IP, "zuma_gout_peric1_ip", "zuma_mout_peric1_ip", + 0x2118, 21, CLK_IGNORE_UNUSED, 0), }; static const struct samsung_div_clock top_dividers[] __initconst = { @@ -72,6 +86,10 @@ static const struct samsung_div_clock top_dividers[] __initconst = { 0x188c, 0, 4, 0, CLK_DIVIDER_READ_ONLY), DIV_F(CLK_DOUT_HSI0_PERI, "zuma_dout_hsi0_peri", "zuma_gout_hsi0_peri", 0x1890, 0, 4, 0, CLK_DIVIDER_READ_ONLY), + DIV_F(CLK_DOUT_PERIC1_NOC, "zuma_dout_peric1_noc", "zuma_gout_peric1_noc", + 0x18f0, 0, 4, 0, CLK_DIVIDER_READ_ONLY), + DIV_F(CLK_DOUT_PERIC1_IP, "zuma_dout_peric1_ip", "zuma_gout_peric1_ip", + 0x18ec, 0, 4, 0, CLK_DIVIDER_READ_ONLY), }; static const struct samsung_cmu_info top_cmu __initconst = { @@ -85,7 +103,7 @@ static const struct samsung_cmu_info top_cmu __initconst = { .nr_ro_gate_clks = ARRAY_SIZE(top_ro_gates), .div_clks = top_dividers, .nr_div_clks = ARRAY_SIZE(top_dividers), - .nr_clk_ids = CLK_DOUT_HSI0_PERI + 1, + .nr_clk_ids = CLK_DOUT_PERIC1_IP + 1, }; static void __init zuma_top_init(struct device_node *np) @@ -223,6 +241,58 @@ static const struct samsung_cmu_info hsi0_cmu __initconst = { .clk_name = "bus", }; +/* + * CMU_PERIC1, 0x10c00000. Firmware sets it up: the user muxes and the USI11 + * divider are read-only, and the GPIO and sysreg gates are read-only gates. + * USI11 is the I2C bus of the MAX77759 gauge, charger and Type-C controller + * and the MAX77729 PMIC. Its gates are the ones Linux turns on, as for the + * Pixel 9a's USI10; their auto/manual mode is left as firmware set it. + */ +PNAME(mout_peric1_noc_user_parents) = { "oscclk", "zuma_dout_peric1_noc" }; +PNAME(mout_peric1_usi11_user_parents) = { "oscclk", "zuma_dout_peric1_ip" }; + +static const struct samsung_mux_clock peric1_muxes[] __initconst = { + MUX_F(CLK_MOUT_PERIC1_NOC_USER, "zuma_mout_peric1_noc_user", + mout_peric1_noc_user_parents, 0x610, 4, 1, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_PERIC1_USI11_USER, "zuma_mout_peric1_usi11_user", + mout_peric1_usi11_user_parents, 0x640, 4, 1, 0, CLK_MUX_READ_ONLY), +}; + +static const struct samsung_div_clock peric1_dividers[] __initconst = { + DIV_F(CLK_DOUT_PERIC1_USI11, "zuma_dout_peric1_usi11", + "zuma_mout_peric1_usi11_user", 0x1810, 0, 4, 0, + CLK_DIVIDER_READ_ONLY), +}; + +static const struct samsung_gate_clock peric1_ro_gates[] __initconst = { + GATE(CLK_GOUT_GPIO_PERIC1, "zuma_gout_gpio_peric1", + "zuma_mout_peric1_noc_user", 0x2080, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_PERIC1_SYSREG, "zuma_gout_peric1_sysreg", + "zuma_mout_peric1_noc_user", 0x20a4, 21, CLK_IGNORE_UNUSED, 0), +}; + +static const struct samsung_gate_clock peric1_gates[] __initconst = { + GATE(CLK_GOUT_PERIC1_USI11_IPCLK, "zuma_gout_peric1_usi11_ipclk", + "zuma_dout_peric1_usi11", 0x2048, 21, 0, 0), + GATE(CLK_GOUT_PERIC1_USI11_PCLK, "zuma_gout_peric1_usi11_pclk", + "zuma_mout_peric1_noc_user", 0x204c, 21, 0, 0), + GATE(CLK_GOUT_PERIC1_USI11_RSTNSYNC, "zuma_gout_peric1_usi11_rstnsync", + "zuma_dout_peric1_usi11", 0x2094, 21, 0, 0), +}; + +static const struct samsung_cmu_info peric1_cmu __initconst = { + .mux_clks = peric1_muxes, + .nr_mux_clks = ARRAY_SIZE(peric1_muxes), + .div_clks = peric1_dividers, + .nr_div_clks = ARRAY_SIZE(peric1_dividers), + .ro_gate_clks = peric1_ro_gates, + .nr_ro_gate_clks = ARRAY_SIZE(peric1_ro_gates), + .gate_clks = peric1_gates, + .nr_gate_clks = ARRAY_SIZE(peric1_gates), + .nr_clk_ids = CLK_GOUT_PERIC1_USI11_RSTNSYNC + 1, + .clk_name = "bus", +}; + static int __init zuma_cmu_probe(struct platform_device *pdev) { const struct samsung_cmu_info *cmu = device_get_match_data(&pdev->dev); @@ -234,6 +304,7 @@ static int __init zuma_cmu_probe(struct platform_device *pdev) static const struct of_device_id zuma_cmu_match[] = { { .compatible = "google,zuma-cmu-apm", .data = &apm_cmu }, { .compatible = "google,zuma-cmu-hsi0", .data = &hsi0_cmu }, + { .compatible = "google,zuma-cmu-peric1", .data = &peric1_cmu }, { } }; From 8ee0317f8b52bb4d59cd263f0f1d6e879d8e0a4f Mon Sep 17 00:00:00 2001 From: Lef Date: Sat, 31 Oct 2026 16:39:51 +0200 Subject: [PATCH 5/6] arm64: dts: exynos: google: zuma: add CMU_PERIC1, USI11 and hsi2c_11 All disabled. USI11 is at 0x10cb00c0 with its SW_CONF at offset 0xc of the PERIC1 sysreg, and the bus is hsi2c_11 at 0x10cb0000 on GIC SPI 659, as in Google's device tree. Add its pins (gpp21-0/1, the board's pair) and the MAX77759 interrupt pins on the ALIVE banks gpa7 and gpa8. The bus pins get a pull-up. Stock's board file sets no pull (pud 0) on hsi2c11_bus, but its Type-C file, applied after it, sets pud 3, which is the final value. Signed-off-by: Lef Assisted-by: LLM --- .../boot/dts/exynos/google/zuma-pinctrl.dtsi | 34 ++++++++++++ arch/arm64/boot/dts/exynos/google/zuma.dtsi | 52 +++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi index a88e0eaa20..dd84a0f1dc 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi @@ -158,6 +158,28 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + /* MAX77759 interrupt lines, active low with pull-ups (stock: pud 3). */ + if_pmic_int: if-pmic-int-pins { + samsung,pins = "gpa8-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + if_pmic_fg_int: if-pmic-fg-int-pins { + samsung,pins = "gpa7-7"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; + + typec_int: typec-int-pins { + samsung,pins = "gpa8-3"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_custom_alive { @@ -436,6 +458,18 @@ samsung,pin-pud = ; samsung,pin-drv = ; }; + + /* + * USI11, the battery bus: stock's board file moves it to gpp21-0/1 and + * sets no pull, then zuma-typec.dtsi, applied after it, sets the + * pull-up (pud 3), which is what the pins end up with. + */ + hsi2c11_bus: hsi2c11-bus-pins { + samsung,pins = "gpp21-0", "gpp21-1"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_hsi2ufs { diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index 2e76d03326..05f407446d 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -355,6 +355,58 @@ interrupts = ; }; + /* + * CMU_PERIC1 and USI11, the I2C bus of the MAX77759 gauge, + * charger and Type-C controller. Firmware leaves them running; + * board files enable them. + */ + cmu_peric1: clock-controller@10c00000 { + compatible = "google,zuma-cmu-peric1"; + reg = <0x10c00000 0x8000>; + #clock-cells = <1>; + clocks = <&oscclk>, <&cmu_top CLK_DOUT_PERIC1_NOC>, + <&cmu_top CLK_DOUT_PERIC1_IP>; + clock-names = "oscclk", "bus", "ip"; + status = "disabled"; + }; + + sysreg_peric1: syscon@10c21000 { + compatible = "google,zuma-peric1-sysreg", "syscon"; + reg = <0x10c21000 0x1000>; + clocks = <&cmu_peric1 CLK_GOUT_PERIC1_SYSREG>; + status = "disabled"; + }; + + usi11: usi@10cb00c0 { + compatible = "google,zuma-usi", "samsung,exynos850-usi"; + reg = <0x10cb00c0 0x20>; + clocks = <&cmu_peric1 CLK_GOUT_PERIC1_USI11_PCLK>, + <&cmu_peric1 CLK_GOUT_PERIC1_USI11_IPCLK>; + clock-names = "pclk", "ipclk"; + samsung,sysreg = <&sysreg_peric1 0xc>; + samsung,mode = ; + #address-cells = <1>; + #size-cells = <1>; + ranges; + status = "disabled"; + + hsi2c_11: i2c@10cb0000 { + compatible = "google,zuma-hsi2c", + "samsung,exynosautov9-hsi2c"; + /* USI control starts at 0xc0; do not claim it twice. */ + reg = <0x10cb0000 0xc0>; + interrupts = ; + clocks = <&cmu_peric1 CLK_GOUT_PERIC1_USI11_IPCLK>, + <&cmu_peric1 CLK_GOUT_PERIC1_USI11_PCLK>; + clock-names = "hsi2c", "hsi2c_pclk"; + pinctrl-0 = <&hsi2c11_bus>; + pinctrl-names = "default"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + }; + cmu_hsi0: clock-controller@11000000 { compatible = "google,zuma-cmu-hsi0"; reg = <0x11000000 0x8000>; From 7b80e83694f4054097bd11da4b01ca48967a091f Mon Sep 17 00:00:00 2001 From: Lef Date: Sat, 31 Oct 2026 16:45:06 +0200 Subject: [PATCH 6/6] arm64: dts: exynos: google: zuma-husky: describe the MAX77759 on hsi2c_11 Add the battery, and the fuel gauge (0x36), PMIC (0x66) and Type-C controller (0x25) on hsi2c_11, as on the Pixel 7 Pro. The bus stays disabled here and bring-up overlays enable it. No gauge model yet: the pack is not known and a wrong model would be written on power-on reset. The Type-C controller stays disabled. The charge limits are conservative (4.2 V, 0.3 C) until stock's step charging is described. The MFD driver binds only if PMIC_ID reads 59 (0x3b), and it does on the Pixel 8 Pro: PMIC_ID 0x3b, PMIC_REVISION 0x02, OTP_REVISION 0x31 (i2cget on 0x66). So the chip at 0x66 is a MAX77759, and not the MAX77729 that Google's devicetree names on the same interrupt. Binding the PMIC creates its charger cell, which programs charge limits from the battery node, so in the boots for this series a modprobe.d file on the phone kept max77759_charger, gpio_max77759, nvmem_max77759 and tcpci_maxim from loading, and lsmod shows the charger was not loaded. Signed-off-by: Lef Assisted-by: LLM --- .../boot/dts/exynos/google/zuma-husky.dts | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts index 29b9a11b98..cbfaefbc66 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts @@ -7,6 +7,8 @@ #include #include +#include +#include #include "zuma.dtsi" / { @@ -105,6 +107,21 @@ }; }; + /* + * The 4950 mAh pack (Google's husky battery data). The charger and + * gauge limits are deliberately conservative: stock charges to 4.48 V + * in steps (4.20/4.30/4.35/4.48 V by temperature), which is not + * described here yet. 0.3 C is 1485 mA. + */ + battery: battery { + compatible = "simple-battery"; + charge-full-design-microamp-hours = <4950000>; + voltage-max-design-microvolt = <4480000>; + voltage-min-design-microvolt = <3300000>; + constant-charge-voltage-max-microvolt = <4200000>; + constant-charge-current-max-microamp = <1485000>; + }; + reserved-memory { #address-cells = <2>; #size-cells = <1>; @@ -193,3 +210,87 @@ &usi2_hsi0 { status = "okay"; }; + +/* + * MAX77759 (charger, Type-C port controller, fuel gauge, PMIC) on USI11 / + * hsi2c_11. Like the Pixel 7 Pro's, but the interrupt lines are on gpa7 and + * gpa8. The bus and CMU_PERIC1 stay disabled here, and a bring-up overlay + * enables them. Binding the PMIC at 0x66 also creates its charger cell, + * and the charger driver then programs charge limits from the battery + * node, so max77759_charger, gpio_max77759, nvmem_max77759 and tcpci_maxim + * have to be kept from loading until each step is tested. The husky device + * package does not block them yet (cheetah's omamobile-max77759.conf + * does), and has to before an overlay that enables this bus ships. + * + * The fuel gauge has no battery model yet: the pack (ATL or COS, stock + * reads its ID resistor) is not known, and a wrong model would be written + * if the gauge reports power-on reset. The Type-C controller stays disabled, + * as on the Pixel 7 Pro: USB is the only way into the phone. + */ +&hsi2c_11 { + clock-frequency = <400000>; + + usb-typec@25 { + compatible = "maxim,max77759-tcpci", "maxim,max33359"; + reg = <0x25>; + interrupts-extended = <&gpa8 3 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&typec_int>; + pinctrl-names = "default"; + status = "disabled"; + + /* + * Sink only: VBUS for host mode comes from an external boost + * (stock: max77759,ext-otg-only, MAX77759 GPIO5 "bst-on" and + * the TCPC's EXTBST_CTRL), which has no driver yet. MAX77759 + * GPIO6 is the VBUS input switch (stock in-switch-gpio): leave + * it alone. + */ + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + data-role = "dual"; + power-role = "sink"; + self-powered; + op-sink-microwatt = <2600000>; + sink-pdos = ; + pd-disable; + typec-power-opmode = "default"; + }; + }; + + fuel-gauge@36 { + compatible = "maxim,max77759-fg"; + reg = <0x36>; + interrupts-extended = <&gpa7 7 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&if_pmic_fg_int>; + pinctrl-names = "default"; + shunt-resistor-micro-ohms = <5000>; + monitored-battery = <&battery>; + }; + + pmic@66 { + compatible = "maxim,max77759"; + reg = <0x66>; + interrupts-extended = <&gpa8 0 IRQ_TYPE_LEVEL_LOW>; + pinctrl-0 = <&if_pmic_int>; + pinctrl-names = "default"; + interrupt-controller; + #interrupt-cells = <2>; + /* for the charger cell */ + monitored-battery = <&battery>; + + gpio { + compatible = "maxim,max77759-gpio"; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + }; +};