From 8ff899d9fb6590d9f91d1659cc5e8aac00657aee Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 11:49:20 -0400 Subject: [PATCH 01/18] firmware: samsung: acpm: defer while the mailbox is missing The channel loop skips a channel that gets no mailbox, so that one bad channel doesn't fail the rest. -EPROBE_DEFER isn't such a channel: it only means the mailbox driver hasn't probed yet. When ACPM probes first, every channel is skipped, the probe succeeds with "16 channels, 0 usable" and never retries, and everything behind ACPM fails for the whole boot. On the Pixel 8 Pro the touchscreen then can't enable its supply ("error -ENODEV: enabling vdd"). This happens when a module load or `udevadm trigger` binds ACPM ahead of the mailbox, or with fw_devlink=permissive, which drops the supplier ordering. Return -EPROBE_DEFER from the probe instead, so it runs again once the mailbox is there. Keep skipping the channels for any other error, and the ones whose queues are outside the SRAM. The channels already requested are freed by the devm action, and the per-channel buffers are devm allocations. Fixes: c8e4c99a7852 ("firmware: samsung: acpm: skip channels the AP cannot use") Assisted-by: LLM Signed-off-by: Brett-Michael Green --- drivers/firmware/samsung/exynos-acpm.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/samsung/exynos-acpm.c b/drivers/firmware/samsung/exynos-acpm.c index 45f3a56168..cbe830b986 100644 --- a/drivers/firmware/samsung/exynos-acpm.c +++ b/drivers/firmware/samsung/exynos-acpm.c @@ -738,9 +738,15 @@ static int acpm_channels_init(struct acpm_info *acpm) achan->chan = mbox_request_channel(cl, 0); if (IS_ERR(achan->chan)) { - dev_warn(dev, "chan %d: no mailbox channel (%pe), skipped\n", - i, achan->chan); + ret = PTR_ERR(achan->chan); achan->chan = NULL; + /* The mailbox may simply not have probed yet. */ + if (ret == -EPROBE_DEFER) + return dev_err_probe(dev, ret, + "chan %d: no mailbox channel yet\n", + i); + dev_warn(dev, "chan %d: no mailbox channel (%pe), skipped\n", + i, ERR_PTR(ret)); continue; } From 758c3248af21e9cbb16ea4ca4f45dce9287f4557 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:19:47 -0400 Subject: [PATCH 02/18] dt-bindings: clock: google: Add the Tensor G3 TOP and HSI0 CMUs Document zuma's (Tensor G3) CMU_TOP and CMU_HSI0 as far as the touchscreen's SPI needs them: CMU_TOP's HSI0 NoC and peripheral clocks, and CMU_HSI0's USI2 clocks with the NoC path its bus clock comes from. HSI0 takes the board-level ALT clock as an input. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../bindings/clock/google,zuma-clock.yaml | 107 ++++++++++++++++++ MAINTAINERS | 2 + include/dt-bindings/clock/google,zuma.h | 50 ++++++++ 3 files changed, 159 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/google,zuma-clock.yaml create mode 100644 include/dt-bindings/clock/google,zuma.h diff --git a/Documentation/devicetree/bindings/clock/google,zuma-clock.yaml b/Documentation/devicetree/bindings/clock/google,zuma-clock.yaml new file mode 100644 index 0000000000..cd708ab082 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/google,zuma-clock.yaml @@ -0,0 +1,107 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/google,zuma-clock.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Google Tensor G3 clock controllers + +maintainers: + - Brett-Michael Green + +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_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 + paths. + Clock identifiers are defined in dt-bindings/clock/google,zuma.h. + +properties: + compatible: + enum: + - google,zuma-cmu-top + - google,zuma-cmu-apm + - google,zuma-cmu-hsi0 + + reg: + maxItems: 1 + + "#clock-cells": + const: 1 + + clocks: + minItems: 1 + maxItems: 4 + + clock-names: + minItems: 1 + maxItems: 4 + +required: + - compatible + - reg + - "#clock-cells" + - clocks + - clock-names + +allOf: + - if: + properties: + compatible: + enum: + - google,zuma-cmu-top + - google,zuma-cmu-apm + then: + properties: + clocks: + items: + - description: External oscillator reference clock + clock-names: + items: + - const: oscclk + - if: + properties: + compatible: + const: google,zuma-cmu-hsi0 + then: + properties: + clocks: + items: + - description: External oscillator reference clock + - description: HSI0 NoC clock from CMU_TOP + - description: HSI0 peripheral clock from CMU_TOP + - description: HSI0 ALT input clock + clock-names: + items: + - const: oscclk + - const: bus + - const: peri + - const: alt + +additionalProperties: false + +examples: + - | + #include + + cmu_top: clock-controller@26040000 { + compatible = "google,zuma-cmu-top"; + reg = <0x26040000 0x8000>; + #clock-cells = <1>; + clocks = <&oscclk>; + clock-names = "oscclk"; + }; + + clock-controller@11000000 { + compatible = "google,zuma-cmu-hsi0"; + reg = <0x11000000 0x8000>; + #clock-cells = <1>; + clocks = <&oscclk>, <&cmu_top CLK_DOUT_HSI0_NOC>, + <&cmu_top CLK_DOUT_HSI0_PERI>, <&hsi0_alt>; + clock-names = "oscclk", "bus", "peri", "alt"; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 4841af951f..06e037ea99 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11166,6 +11166,7 @@ P: Documentation/process/maintainer-soc-clean-dts.rst C: irc://irc.oftc.net/pixel6-kernel-dev F: Documentation/devicetree/bindings/clock/google,gs101-clock.yaml F: Documentation/devicetree/bindings/clock/google,gs201-clock.yaml +F: Documentation/devicetree/bindings/clock/google,zuma-clock.yaml F: Documentation/devicetree/bindings/clock/google,zumapro* F: Documentation/devicetree/bindings/phy/google,lga-usb-phy.yaml F: Documentation/devicetree/bindings/soc/google/google,gs101-dtzpc.yaml @@ -11184,6 +11185,7 @@ F: drivers/thermal/samsung/gs101_acpm_tmu.c F: drivers/usb/dwc3/dwc3-google.c F: include/dt-bindings/clock/google,gs101* F: include/dt-bindings/clock/google,gs201* +F: include/dt-bindings/clock/google,zuma.h F: include/dt-bindings/clock/google,zumapro* K: [gG]oogle.?[tT]ensor diff --git a/include/dt-bindings/clock/google,zuma.h b/include/dt-bindings/clock/google,zuma.h new file mode 100644 index 0000000000..45aef7817c --- /dev/null +++ b/include/dt-bindings/clock/google,zuma.h @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +#ifndef _DT_BINDINGS_CLOCK_GOOGLE_ZUMA_H +#define _DT_BINDINGS_CLOCK_GOOGLE_ZUMA_H + +/* CMU_TOP: the HSI0 NoC and peripheral clock paths. */ +#define CLK_FOUT_SHARED0 1 +#define CLK_FOUT_SHARED1 2 +#define CLK_FOUT_SHARED2 3 +#define CLK_FOUT_SHARED3 4 +#define CLK_FOUT_SPARE 5 +#define CLK_SHARED0_D4 6 +#define CLK_SHARED1_D4 7 +#define CLK_SHARED2_D2 8 +#define CLK_SHARED3_D2 9 +#define CLK_MOUT_HSI0_NOC 10 +#define CLK_GOUT_HSI0_NOC 11 +#define CLK_DOUT_HSI0_NOC 12 +#define CLK_MOUT_HSI0_PERI 13 +#define CLK_GOUT_HSI0_PERI 14 +#define CLK_DOUT_HSI0_PERI 15 + +/* CMU_HSI0: USI2, the touchscreen's SPI. */ +#define CLK_GOUT_HSI0_ALT 1 +#define CLK_MOUT_HSI0_NOC_USER 2 +#define CLK_MOUT_HSI0_ALT_USER 3 +#define CLK_MOUT_HSI0_NOC_LOCAL 4 +#define CLK_MOUT_HSI0_PERI_USER 5 +#define CLK_MOUT_HSI0_USI2 6 +#define CLK_GOUT_HSI0_USI2_SOURCE 7 +#define CLK_DOUT_HSI0_USI2 8 +#define CLK_GOUT_HSI0_USI2_IP 9 +#define CLK_GOUT_HSI0_USI2_PCLK 10 + +/* 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 +#define CLK_APM_PLL_ALV_DIV8 3 +#define CLK_APM_PLL_ALV_DIV16 4 +#define CLK_MOUT_APM_FUNCSRC 5 +#define CLK_MOUT_APM_FUNC 6 +#define CLK_GOUT_APM_FUNC 7 +#define CLK_DOUT_APM_NOC 8 +#define CLK_GOUT_APM_MAILBOX_AP 9 +#define CLK_GOUT_APM_INTMEM_ACLK 10 +#define CLK_GOUT_APM_INTMEM_PCLK 11 +#define CLK_GOUT_APM_GPIO_ALIVE 12 +#define CLK_GOUT_APM_GPIO_FAR_ALIVE 13 +#define CLK_GOUT_APM_GPIO_CUSTOM_ALIVE 14 + +#endif /* _DT_BINDINGS_CLOCK_GOOGLE_ZUMA_H */ From f66fd615e20e58738f2335ee1bee4f73b6d87010 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:19:47 -0400 Subject: [PATCH 03/18] clk: samsung: Add the Tensor G3 touchscreen SPI clocks zuma has no clock driver, and the bootloader leaves HSI0's USI2, the touchscreen's SPI, at 399.36 MHz (PLL_SHARED2 / 2). The SPI controller takes its rate from the CMU, so the bus would run at a quarter of that, far above the 10 MHz stock gives the touch controller. Describe the path from CMU_TOP's shared PLLs to USI2, with registers and parents from Google's GPL CMUCAL tables for zuma. Only USI2's divider and its three gates are written; the PLLs, muxes and the other dividers and gates are read-only and keep their firmware settings. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- MAINTAINERS | 1 + drivers/clk/samsung/Makefile | 1 + drivers/clk/samsung/clk-zuma.c | 253 +++++++++++++++++++++++++++++++++ 3 files changed, 255 insertions(+) create mode 100644 drivers/clk/samsung/clk-zuma.c diff --git a/MAINTAINERS b/MAINTAINERS index 06e037ea99..d5c748f6f6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11176,6 +11176,7 @@ F: Documentation/devicetree/bindings/usb/google,lga-dwc3.yaml F: arch/arm64/boot/dts/exynos/google/ F: drivers/clk/samsung/clk-gs101.c F: drivers/clk/samsung/clk-gs201.c +F: drivers/clk/samsung/clk-zuma.c F: drivers/clk/samsung/clk-zumapro.c F: drivers/phy/phy-google-usb.c F: drivers/soc/samsung/gs101-pmu.c diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile index c2df88230e..0b299f87f8 100644 --- a/drivers/clk/samsung/Makefile +++ b/drivers/clk/samsung/Makefile @@ -30,6 +30,7 @@ obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynosautov9.o obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynosautov920.o obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-gs101.o obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-gs201.o +obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-zuma.o obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-zumapro.o obj-$(CONFIG_EXYNOS_ACPM_CLK) += clk-acpm.o obj-$(CONFIG_S3C64XX_COMMON_CLK) += clk-s3c64xx.o diff --git a/drivers/clk/samsung/clk-zuma.c b/drivers/clk/samsung/clk-zuma.c new file mode 100644 index 0000000000..ccb80f62e4 --- /dev/null +++ b/drivers/clk/samsung/clk-zuma.c @@ -0,0 +1,253 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Google Tensor G3 (zuma) clocks for the touchscreen and its PMIC. + * + * 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, + * muxes and dividers keep their firmware settings, except USI2's own + * divider, which sets the SPI rate. No PLL rate table is supplied. + */ + +#include +#include +#include +#include +#include + +#include + +#include "clk.h" +#include "clk-exynos-arm64.h" +#include "clk-pll.h" + +/* CMU_TOP, 0x26040000. PLL CON3 is the read-only rate source. */ +static const struct samsung_pll_clock top_plls[] __initconst = { + PLL(pll_0517x, CLK_FOUT_SHARED0, "zuma_shared0", "oscclk", + 0x004, 0x14c, NULL), + PLL(pll_0517x, CLK_FOUT_SHARED1, "zuma_shared1", "oscclk", + 0x008, 0x18c, NULL), + PLL(pll_0518x, CLK_FOUT_SHARED2, "zuma_shared2", "oscclk", + 0x00c, 0x1cc, NULL), + PLL(pll_0518x, CLK_FOUT_SHARED3, "zuma_shared3", "oscclk", + 0x010, 0x20c, NULL), + PLL(pll_0518x, CLK_FOUT_SPARE, "zuma_spare", "oscclk", + 0x014, 0x24c, NULL), +}; + +static const struct samsung_fixed_factor_clock top_factors[] __initconst = { + FFACTOR(CLK_SHARED0_D4, "zuma_shared0_d4", "zuma_shared0", 1, 4, 0), + FFACTOR(CLK_SHARED1_D4, "zuma_shared1_d4", "zuma_shared1", 1, 4, 0), + FFACTOR(CLK_SHARED2_D2, "zuma_shared2_d2", "zuma_shared2", 1, 2, 0), + FFACTOR(CLK_SHARED3_D2, "zuma_shared3_d2", "zuma_shared3", 1, 2, 0), +}; + +PNAME(mout_hsi0_noc_parents) = { + "zuma_shared0_d4", "zuma_shared1_d4", "zuma_shared2_d2", + "zuma_shared3_d2", "zuma_spare", "oscclk", "oscclk", "oscclk", +}; + +PNAME(mout_hsi0_peri_parents) = { + "zuma_shared0_d4", "zuma_shared2_d2", "zuma_shared3_d2", "zuma_spare", +}; + +static const struct samsung_mux_clock top_muxes[] __initconst = { + MUX_F(CLK_MOUT_HSI0_NOC, "zuma_mout_hsi0_noc", mout_hsi0_noc_parents, + 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), +}; + +/* The hardware order is mux -> gate -> divider. HSI0 is 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), +}; + +static const struct samsung_div_clock top_dividers[] __initconst = { + DIV_F(CLK_DOUT_HSI0_NOC, "zuma_dout_hsi0_noc", "zuma_gout_hsi0_noc", + 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), +}; + +static const struct samsung_cmu_info top_cmu __initconst = { + .pll_clks = top_plls, + .nr_pll_clks = ARRAY_SIZE(top_plls), + .fixed_factor_clks = top_factors, + .nr_fixed_factor_clks = ARRAY_SIZE(top_factors), + .mux_clks = top_muxes, + .nr_mux_clks = ARRAY_SIZE(top_muxes), + .ro_gate_clks = top_ro_gates, + .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, +}; + +static void __init zuma_top_init(struct device_node *np) +{ + exynos_arm64_register_cmu(NULL, np, &top_cmu); +} + +CLK_OF_DECLARE(zuma_cmu_top, "google,zuma-cmu-top", zuma_top_init); + +/* + * CMU_APM, 0x15400000. The always-on domain is firmware-owned, so it is + * read-only. ALV runs at the oscillator times 32. + */ +static const struct samsung_fixed_rate_clock apm_fixed_clks[] __initconst = { + FRATE(CLK_APM_PLL_ALV_DIV2, "zuma_apm_pll_alv_div2", NULL, 0, 393216000), + FRATE(CLK_APM_PLL_ALV_DIV4, "zuma_apm_pll_alv_div4", NULL, 0, 196608000), + FRATE(CLK_APM_PLL_ALV_DIV8, "zuma_apm_pll_alv_div8", NULL, 0, 98304000), + FRATE(CLK_APM_PLL_ALV_DIV16, "zuma_apm_pll_alv_div16", NULL, 0, 49152000), +}; + +PNAME(mout_apm_funcsrc_parents) = { + "zuma_apm_pll_alv_div2", "zuma_apm_pll_alv_div4", + "zuma_apm_pll_alv_div16", "zuma_apm_pll_alv_div8", +}; + +PNAME(mout_apm_func_parents) = { + "oscclk", "zuma_mout_apm_funcsrc", "pad_clk_apm", "oscclk", +}; + +static const struct samsung_mux_clock apm_muxes[] __initconst = { + MUX_F(CLK_MOUT_APM_FUNCSRC, "zuma_mout_apm_funcsrc", + mout_apm_funcsrc_parents, 0x1004, 0, 2, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_APM_FUNC, "zuma_mout_apm_func", mout_apm_func_parents, + 0x1000, 0, 2, 0, CLK_MUX_READ_ONLY), +}; + +static const struct samsung_div_clock apm_dividers[] __initconst = { + DIV_F(CLK_DOUT_APM_NOC, "zuma_dout_apm_noc", "zuma_gout_apm_func", + 0x1808, 0, 3, 0, CLK_DIVIDER_READ_ONLY), +}; + +static const struct samsung_gate_clock apm_ro_gates[] __initconst = { + GATE(CLK_GOUT_APM_FUNC, "zuma_gout_apm_func", "zuma_mout_apm_func", + 0x20d4, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_APM_MAILBOX_AP, "zuma_gout_apm_mailbox_ap", + "zuma_dout_apm_noc", 0x211c, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_APM_INTMEM_ACLK, "zuma_gout_apm_intmem_aclk", + "zuma_dout_apm_noc", 0x2108, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_APM_INTMEM_PCLK, "zuma_gout_apm_intmem_pclk", + "zuma_dout_apm_noc", 0x210c, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_APM_GPIO_ALIVE, "zuma_gout_apm_gpio_alive", + "zuma_dout_apm_noc", 0x20d8, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_APM_GPIO_FAR_ALIVE, "zuma_gout_apm_gpio_far_alive", + "zuma_dout_apm_noc", 0x20dc, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_APM_GPIO_CUSTOM_ALIVE, "zuma_gout_apm_gpio_custom_alive", + "zuma_dout_apm_noc", 0x2000, 21, CLK_IGNORE_UNUSED, 0), +}; + +static const struct samsung_cmu_info apm_cmu __initconst = { + .fixed_clks = apm_fixed_clks, + .nr_fixed_clks = ARRAY_SIZE(apm_fixed_clks), + .mux_clks = apm_muxes, + .nr_mux_clks = ARRAY_SIZE(apm_muxes), + .div_clks = apm_dividers, + .nr_div_clks = ARRAY_SIZE(apm_dividers), + .ro_gate_clks = apm_ro_gates, + .nr_ro_gate_clks = ARRAY_SIZE(apm_ro_gates), + .nr_clk_ids = CLK_GOUT_APM_GPIO_CUSTOM_ALIVE + 1, +}; + +/* CMU_HSI0, 0x11000000. Firmware keeps the domain powered. */ +PNAME(mout_hsi0_noc_user_parents) = { "oscclk", "zuma_dout_hsi0_noc" }; + +PNAME(mout_hsi0_alt_user_parents) = { "oscclk", "zuma_gout_hsi0_alt" }; + +PNAME(mout_hsi0_noc_local_parents) = { + "zuma_mout_hsi0_noc_user", "zuma_mout_hsi0_alt_user", +}; + +PNAME(mout_hsi0_peri_user_parents) = { "oscclk", "zuma_dout_hsi0_peri" }; + +PNAME(mout_hsi0_usi2_parents) = { "zuma_mout_hsi0_peri_user", "oscclk" }; + +static const struct samsung_mux_clock hsi0_muxes[] __initconst = { + MUX_F(CLK_MOUT_HSI0_NOC_USER, "zuma_mout_hsi0_noc_user", + mout_hsi0_noc_user_parents, 0x620, 4, 1, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_HSI0_ALT_USER, "zuma_mout_hsi0_alt_user", + mout_hsi0_alt_user_parents, 0x600, 4, 1, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_HSI0_NOC_LOCAL, "zuma_mout_hsi0_noc_local", + mout_hsi0_noc_local_parents, 0x1000, 0, 1, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_HSI0_PERI_USER, "zuma_mout_hsi0_peri_user", + mout_hsi0_peri_user_parents, 0x680, 4, 1, 0, CLK_MUX_READ_ONLY), + MUX_F(CLK_MOUT_HSI0_USI2, "zuma_mout_hsi0_usi2", mout_hsi0_usi2_parents, + 0x101c, 0, 1, 0, CLK_MUX_READ_ONLY), +}; + +static const struct samsung_div_clock hsi0_dividers[] __initconst = { + DIV(CLK_DOUT_HSI0_USI2, "zuma_dout_hsi0_usi2", + "zuma_gout_hsi0_usi2_source", 0x181c, 0, 4), +}; + +static const struct samsung_gate_clock hsi0_gates[] __initconst = { + GATE(CLK_GOUT_HSI0_USI2_SOURCE, "zuma_gout_hsi0_usi2_source", + "zuma_mout_hsi0_usi2", 0x2120, 21, CLK_IGNORE_UNUSED, 0), + GATE(CLK_GOUT_HSI0_USI2_IP, "zuma_gout_hsi0_usi2_ip", + "zuma_dout_hsi0_usi2", 0x20fc, 21, + CLK_IGNORE_UNUSED | CLK_SET_RATE_PARENT, 0), + GATE(CLK_GOUT_HSI0_USI2_PCLK, "zuma_gout_hsi0_usi2_pclk", + "zuma_mout_hsi0_noc_local", 0x2100, 21, CLK_IGNORE_UNUSED, 0), +}; + +/* Firmware-owned gates are observed, never switched. */ +static const struct samsung_gate_clock hsi0_ro_gates[] __initconst = { + GATE(CLK_GOUT_HSI0_ALT, "zuma_gout_hsi0_alt", "hsi0-alt", + 0x204c, 21, CLK_IGNORE_UNUSED, 0), +}; + +/* USI2's gates run in manual mode; the rest of HSI0 is left alone. */ +static const unsigned long hsi0_regs[] __initconst = { + 0x2120, 0x20fc, 0x2100, +}; + +static const struct samsung_cmu_info hsi0_cmu __initconst = { + .mux_clks = hsi0_muxes, + .nr_mux_clks = ARRAY_SIZE(hsi0_muxes), + .div_clks = hsi0_dividers, + .nr_div_clks = ARRAY_SIZE(hsi0_dividers), + .gate_clks = hsi0_gates, + .nr_gate_clks = ARRAY_SIZE(hsi0_gates), + .ro_gate_clks = hsi0_ro_gates, + .nr_ro_gate_clks = ARRAY_SIZE(hsi0_ro_gates), + .nr_clk_ids = CLK_GOUT_HSI0_USI2_PCLK + 1, + .clk_regs = hsi0_regs, + .nr_clk_regs = ARRAY_SIZE(hsi0_regs), + .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); + + exynos_arm64_register_cmu(&pdev->dev, pdev->dev.of_node, cmu); + return 0; +} + +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 }, + { } +}; + +static struct platform_driver zuma_cmu_driver __refdata = { + .driver = { + .name = "zuma-cmu", + .of_match_table = zuma_cmu_match, + .suppress_bind_attrs = true, + }, + .probe = zuma_cmu_probe, +}; + +static int __init zuma_cmu_init(void) +{ + return platform_driver_register(&zuma_cmu_driver); +} +core_initcall(zuma_cmu_init); From 854bed5c3bf75e18584b5aaff35693d7dc852f26 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:19:47 -0400 Subject: [PATCH 04/18] arm64: dts: exynos: google: zuma: add CMU_TOP and CMU_HSI0 Add the 24.576 MHz oscillator, HSI0's ALT input at the CAL's nominal 213 MHz, and the TOP and HSI0 clock controllers. Nothing consumes them yet; the touchscreen's SPI will. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- arch/arm64/boot/dts/exynos/google/zuma.dtsi | 40 +++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index 92bef7f97d..f76de50ad2 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -5,11 +5,13 @@ * Addresses, interrupts and reservations are the ones a retail Pixel 8 Pro * (husky) runs with: its live device tree and Google's GPL zuma tree * (android-gs-shusky-6.1-android16). Nothing here is copied from gs101 or - * gs201. No clock, pinctrl or power-domain providers yet: the bootloader - * leaves what first light needs running, and the board's bootargs carry - * clk_ignore_unused and pd_ignore_unused. + * gs201. The clock providers describe only the touchscreen SPI's path, and + * there are no power-domain providers yet: the bootloader leaves what the + * rest needs running, and the board's bootargs carry clk_ignore_unused and + * pd_ignore_unused. */ +#include #include #include @@ -269,6 +271,21 @@ clock-output-names = "ufs_ref_stub"; }; + oscclk: clock-oscclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24576000>; + clock-output-names = "oscclk"; + }; + + /* The CAL's nominal I_CLK_HSI0_ALT rate. */ + hsi0_alt: clock-hsi0-alt { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <213000000>; + clock-output-names = "hsi0-alt"; + }; + soc: soc@0 { compatible = "simple-bus"; #address-cells = <1>; @@ -318,6 +335,15 @@ interrupts = ; }; + cmu_hsi0: clock-controller@11000000 { + compatible = "google,zuma-cmu-hsi0"; + reg = <0x11000000 0x8000>; + #clock-cells = <1>; + clocks = <&oscclk>, <&cmu_top CLK_DOUT_HSI0_NOC>, + <&cmu_top CLK_DOUT_HSI0_PERI>, <&hsi0_alt>; + clock-names = "oscclk", "bus", "peri", "alt"; + }; + /* * USB control block: Exynos 2200's link registers, with the * eUSB2 PHY below as its high-speed PHY. The USB3/DP combo PHY @@ -443,6 +469,14 @@ "google,zumapro-wakeup-eint"; }; }; + + cmu_top: clock-controller@26040000 { + compatible = "google,zuma-cmu-top"; + reg = <0x26040000 0x8000>; + #clock-cells = <1>; + clocks = <&oscclk>; + clock-names = "oscclk"; + }; }; }; From 7d071ca3af21d84d4844a239bbf021e974d087e8 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:23:41 -0400 Subject: [PATCH 05/18] dt-bindings: mailbox: google,gs101-mbox: Add the Tensor G3 mailbox zuma's (Tensor G3) AP-to-APM mailbox is gs101's, as on gs201 and Tensor G4: same registers, one interrupt and one bus clock. Document it with gs101's compatible as the fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml b/Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml index d1a6c6eda1..559da23935 100644 --- a/Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml +++ b/Documentation/devicetree/bindings/mailbox/google,gs101-mbox.yaml @@ -27,6 +27,7 @@ properties: - items: - enum: - google,gs201-mbox + - google,zuma-mbox - google,zumapro-mbox - const: google,gs101-mbox From 44b4edb997aefa4fc35f1e7b08e12bd1720c2978 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:23:41 -0400 Subject: [PATCH 06/18] dt-bindings: firmware: google,gs101-acpm-ipc: Add the Tensor G3 zuma's (Tensor G3) ACPM firmware speaks the same protocol, from the same shared memory layout, as Tensor G4's, and its main PMIC is the same S2MPG14. Document its compatible, with the S2MPG14 as its main PMIC. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml index 58a0301f09..9163560a19 100644 --- a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml +++ b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml @@ -25,6 +25,7 @@ properties: enum: - google,gs101-acpm-ipc - google,gs201-acpm-ipc + - google,zuma-acpm-ipc - google,zumapro-acpm-ipc "#clock-cells": @@ -111,7 +112,9 @@ allOf: - if: properties: compatible: - const: google,zumapro-acpm-ipc + enum: + - google,zuma-acpm-ipc + - google,zumapro-acpm-ipc then: properties: pmic: false From 4bb3b99881765ad649ba9da1348f30dcda57d7b2 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:23:41 -0400 Subject: [PATCH 07/18] dt-bindings: mfd: samsung,s2mpg14-pmic: Tensor G3 uses it too The Pixel 8 Pro's (Tensor G3) main PMIC is the S2MPG14, at the same ACPM channel and with the same touchscreen rails on LDO4M and LDO25M. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../devicetree/bindings/mfd/samsung,s2mpg14-pmic.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mpg14-pmic.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mpg14-pmic.yaml index 5419f15224..5a94a65452 100644 --- a/Documentation/devicetree/bindings/mfd/samsung,s2mpg14-pmic.yaml +++ b/Documentation/devicetree/bindings/mfd/samsung,s2mpg14-pmic.yaml @@ -10,8 +10,9 @@ maintainers: - W4HO <87742609+W4HO-ham@users.noreply.github.com> description: | - S2MPG14 is the main PMIC paired with Google's Tensor G4. Its LDO4M and - LDO25M outputs supply the analog and digital touchscreen power rails. + S2MPG14 is the main PMIC paired with Google's Tensor G3 and Tensor G4. + Its LDO4M and LDO25M outputs supply the analog and digital touchscreen + power rails. properties: compatible: From 007666e4605bfc9312e4b10b5afd5978b04f4c02 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:23:42 -0400 Subject: [PATCH 08/18] firmware: samsung: acpm: Add the Tensor G3 zuma's ACPM firmware keeps its channel table at 0xa000 in the APM SRAM, as stock's device tree gives it (initdata-base). Add zuma's match data. No driver binds its clocks device yet. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- drivers/firmware/samsung/exynos-acpm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/firmware/samsung/exynos-acpm.c b/drivers/firmware/samsung/exynos-acpm.c index cbe830b986..dfac2a004c 100644 --- a/drivers/firmware/samsung/exynos-acpm.c +++ b/drivers/firmware/samsung/exynos-acpm.c @@ -42,6 +42,7 @@ #define ACPM_GS101_INITDATA_BASE 0xa000 #define ACPM_GS201_INITDATA_BASE 0xa000 +#define ACPM_ZUMA_INITDATA_BASE 0xa000 #define ACPM_ZUMAPRO_INITDATA_BASE 0xa000 /* Sanity limit for the channel count read from SRAM. */ @@ -981,6 +982,11 @@ static const struct acpm_match_data acpm_gs201 = { .acpm_clk_dev_name = "gs201-acpm-clk", }; +static const struct acpm_match_data acpm_zuma = { + .initdata_base = ACPM_ZUMA_INITDATA_BASE, + .acpm_clk_dev_name = "zuma-acpm-clk", +}; + static const struct acpm_match_data acpm_zumapro = { .initdata_base = ACPM_ZUMAPRO_INITDATA_BASE, .acpm_clk_dev_name = "zumapro-acpm-clk", @@ -993,6 +999,9 @@ static const struct of_device_id acpm_match[] = { }, { .compatible = "google,gs201-acpm-ipc", .data = &acpm_gs201, + }, { + .compatible = "google,zuma-acpm-ipc", + .data = &acpm_zuma, }, { .compatible = "google,zumapro-acpm-ipc", .data = &acpm_zumapro, From 0e0bb4e123859dd4deb1f9188fe2cac48f13ac3f Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:23:47 -0400 Subject: [PATCH 09/18] arm64: dts: exynos: google: zuma: add ACPM and its mailbox Add CMU_APM, the AP-to-APM mailbox (SPI 80), the APM SRAM and the ACPM firmware node, at the addresses stock's acpm_ipc node gives them. CMU_APM is read-only: it only names the mailbox's and the SRAM's clocks, which the always-on domain keeps running. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- arch/arm64/boot/dts/exynos/google/zuma.dtsi | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index f76de50ad2..d5d71ee26b 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -148,6 +148,15 @@ }; }; + firmware { + acpm_ipc: power-management { + compatible = "google,zuma-acpm-ipc"; + #clock-cells = <1>; + mboxes = <&ap2apm_mailbox>; + shmem = <&apm_sram>; + }; + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; @@ -439,6 +448,23 @@ status = "disabled"; }; + ap2apm_mailbox: mailbox@15110000 { + compatible = "google,zuma-mbox", "google,gs101-mbox"; + reg = <0x15110000 0x1000>; + clocks = <&cmu_apm CLK_GOUT_APM_MAILBOX_AP>; + clock-names = "pclk"; + interrupts = ; + #mbox-cells = <0>; + }; + + cmu_apm: clock-controller@15400000 { + compatible = "google,zuma-cmu-apm"; + reg = <0x15400000 0x8000>; + #clock-cells = <1>; + clocks = <&oscclk>; + clock-names = "oscclk"; + }; + /* Writes go through EL3 (SMC), as on gs101. */ pmu_system_controller: system-controller@15460000 { compatible = "google,zuma-pmu"; @@ -470,6 +496,21 @@ }; }; + apm_sram: sram@15700000 { + compatible = "mmio-sram"; + reg = <0x15700000 0x58000>; + clocks = <&cmu_apm CLK_GOUT_APM_INTMEM_ACLK>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x15700000 0x58000>; + no-memory-wc; + + /* The APM firmware's window, as one block. */ + firmware-sram@0 { + reg = <0x0 0x58000>; + }; + }; + cmu_top: clock-controller@26040000 { compatible = "google,zuma-cmu-top"; reg = <0x26040000 0x8000>; From 432721d869bd80e58a0e430ceef77a665388a09f Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:23:48 -0400 Subject: [PATCH 10/18] arm64: dts: exynos: google: zuma-husky: add the main PMIC Describe the S2MPG14 behind ACPM. No regulators yet: each will come with its consumer, starting with the touchscreen's. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- arch/arm64/boot/dts/exynos/google/zuma-husky.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts index 074eee930f..283481bb0a 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts @@ -117,6 +117,19 @@ }; }; +/* + * The main PMIC, behind the ACPM firmware. Its regulators are described + * with their consumers, which run them through the firmware. + */ +&acpm_ipc { + pmic-1 { + compatible = "samsung,s2mpg14-pmic"; + + regulators { + }; + }; +}; + &usb_dwc3 { status = "okay"; }; From f3c18eb19b5697addbd5f2d5b5fe49d4f4642aa6 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:34:26 -0400 Subject: [PATCH 11/18] dt-bindings: soc: samsung: exynos-usi: Add the Tensor G3 USI zuma's (Tensor G3) USI blocks are Exynos850-style, like Tensor G4's: the mode lives in a system register, and the block's own control sits at offset 0xc0. Document zuma's compatible with the Exynos850 fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml index 9a2a8867b6..870ad437ff 100644 --- a/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml @@ -37,6 +37,7 @@ properties: - enum: - google,gs101-usi - google,gs201-usi + - google,zuma-usi - google,zumapro-usi - samsung,exynos2200-usi - samsung,exynosautov9-usi From 2e8ef92624f1e82d94f4d0fafd7726b541ca563c Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:34:26 -0400 Subject: [PATCH 12/18] dt-bindings: soc: samsung: exynos-sysreg: Add the Tensor G3 HSI0 sysreg HSI0's system registers hold the USI mode of the touchscreen's USI2. Like zuma's UFS sysreg, it takes no clock: HSI0 is firmware-owned. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml index 5acd0e0efb..2a181df90c 100644 --- a/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml +++ b/Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml @@ -27,6 +27,7 @@ properties: - google,gs201-peric0-sysreg - google,gs201-peric1-sysreg - google,gs201-vgpio2ap-sysreg + - google,zuma-hsi0-sysreg - google,zuma-ufs-sysreg - google,zumapro-apm-sysreg - google,zumapro-hsi0-sysreg From 00691ba4d118e38c5882d451d083cb9e5a9b8262 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:34:34 -0400 Subject: [PATCH 13/18] spi: dt-bindings: samsung: Add the Tensor G3 SPI zuma's (Tensor G3) SPI controllers are gs101-style, as on Tensor G4. Document zuma's compatible with gs101's as the fallback. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- Documentation/devicetree/bindings/spi/samsung,spi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/spi/samsung,spi.yaml b/Documentation/devicetree/bindings/spi/samsung,spi.yaml index 2cc3ba1341..7feee66b25 100644 --- a/Documentation/devicetree/bindings/spi/samsung,spi.yaml +++ b/Documentation/devicetree/bindings/spi/samsung,spi.yaml @@ -33,6 +33,7 @@ properties: - items: - enum: - google,gs201-spi + - google,zuma-spi - google,zumapro-spi - const: google,gs101-spi - const: samsung,exynos7-spi From 5bbb7384be201f232f88bb1fdae50c489dafc329 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:34:34 -0400 Subject: [PATCH 14/18] spi: s3c64xx: Add the Tensor G3 zuma's (Tensor G3) SPI controllers match Tensor G4's: rate from the CMU, 64-byte FIFOs, 32-bit access. Stock drives the Pixel 8 Pro's touchscreen with manual chip select (samsung,spi-chip-select-mode = <0>), as the Pixel 9a's, so use Tensor G4's port configuration, which holds native chip select for a whole message. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- drivers/spi/spi-s3c64xx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 870aae6592..4edda4cc02 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c @@ -1676,6 +1676,9 @@ static const struct platform_device_id s3c64xx_spi_driver_ids[] = { MODULE_DEVICE_TABLE(platform, s3c64xx_spi_driver_ids); static const struct of_device_id s3c64xx_spi_dt_match[] = { + { .compatible = "google,zuma-spi", + .data = &zumapro_spi_port_config, + }, { .compatible = "google,zumapro-spi", .data = &zumapro_spi_port_config, }, From 8872c6ac3e7b985de4795a8a5b3f568ffb252a6e Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:36:41 -0400 Subject: [PATCH 15/18] arm64: dts: exynos: google: zuma: add the CUSTOM_ALIVE and PERIC1 pin controllers Add the CUSTOM_ALIVE controller at 0x15060000 (gpn0-gpn9, one wake-up interrupt each, SPI 0 to 9) and PERIC1 at 0x10c40000 (gpp19-gpp24, SPI 649), with the banks and interrupts of stock's live device tree, as controllers 1 and 12 of the driver's zuma data. CUSTOM_ALIVE's bus clock comes from CMU_APM; PERIC1 takes the bus-clock stand-in, as PERIC0 does. The touchscreen's attention line is on gpn0 and its reset on gpp21. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../boot/dts/exynos/google/zuma-pinctrl.dtsi | 136 ++++++++++++++++++ arch/arm64/boot/dts/exynos/google/zuma.dtsi | 22 +++ 2 files changed, 158 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi index 724ef95913..508c1171d2 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi @@ -160,6 +160,98 @@ }; }; +&pinctrl_custom_alive { + gpn0: gpn0-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn1: gpn1-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn2: gpn2-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn3: gpn3-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn4: gpn4-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn5: gpn5-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn6: gpn6-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn7: gpn7-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn8: gpn8-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; + + gpn9: gpn9-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gic>; + interrupts = ; + }; +}; + &pinctrl_peric0 { gpp0: gpp0-gpio-bank { gpio-controller; @@ -288,6 +380,50 @@ }; }; +&pinctrl_peric1 { + gpp19: gpp19-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpp20: gpp20-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpp21: gpp21-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpp24: gpp24-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpp22: gpp22-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpp23: gpp23-gpio-bank { + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; +}; + &pinctrl_hsi2ufs { gph5: gph5-gpio-bank { gpio-controller; diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index d5d71ee26b..043ce2c917 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -24,8 +24,10 @@ /* The pin controllers are numbered as in Tensor G4's driver data. */ aliases { pinctrl0 = &pinctrl_gpio_alive; + pinctrl1 = &pinctrl_custom_alive; pinctrl10 = &pinctrl_hsi2ufs; pinctrl11 = &pinctrl_peric0; + pinctrl12 = &pinctrl_peric1; }; /* @@ -344,6 +346,14 @@ interrupts = ; }; + pinctrl_peric1: pinctrl@10c40000 { + compatible = "google,zuma-pinctrl"; + reg = <0x10c40000 0x1000>; + clocks = <&clk_gpio_stub>; + clock-names = "pclk"; + interrupts = ; + }; + cmu_hsi0: clock-controller@11000000 { compatible = "google,zuma-cmu-hsi0"; reg = <0x11000000 0x8000>; @@ -448,6 +458,18 @@ status = "disabled"; }; + pinctrl_custom_alive: pinctrl@15060000 { + compatible = "google,zuma-pinctrl"; + reg = <0x15060000 0x1000>; + clocks = <&cmu_apm CLK_GOUT_APM_GPIO_CUSTOM_ALIVE>; + clock-names = "pclk"; + + wakeup-interrupt-controller { + compatible = "google,zuma-wakeup-eint", + "google,zumapro-wakeup-eint"; + }; + }; + ap2apm_mailbox: mailbox@15110000 { compatible = "google,zuma-mbox", "google,gs101-mbox"; reg = <0x15110000 0x1000>; From 52acfb34b6003f56f685896574eef31d5913d20c Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:36:41 -0400 Subject: [PATCH 16/18] arm64: dts: exynos: google: zuma: add HSI0's USI2 and its SPI Add HSI0's system registers and USI2 at 0x111d00c0 with its SPI controller (SPI 408), clocked from CMU_HSI0, as stock's spi@111D0000 (usi-offset 0x101c). This is the touchscreen's bus. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- arch/arm64/boot/dts/exynos/google/zuma.dtsi | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma.dtsi b/arch/arm64/boot/dts/exynos/google/zuma.dtsi index 043ce2c917..2e76d03326 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma.dtsi @@ -14,6 +14,7 @@ #include #include #include +#include / { compatible = "google,zuma"; @@ -363,6 +364,11 @@ clock-names = "oscclk", "bus", "peri", "alt"; }; + sysreg_hsi0: syscon@11020000 { + compatible = "google,zuma-hsi0-sysreg", "syscon"; + reg = <0x11020000 0x10000>; + }; + /* * USB control block: Exynos 2200's link registers, with the * eUSB2 PHY below as its high-speed PHY. The USB3/DP combo PHY @@ -391,6 +397,33 @@ status = "disabled"; }; + usi2_hsi0: usi@111d00c0 { + compatible = "google,zuma-usi", "samsung,exynos850-usi"; + reg = <0x111d00c0 0x20>; + clocks = <&cmu_hsi0 CLK_GOUT_HSI0_USI2_PCLK>, + <&cmu_hsi0 CLK_GOUT_HSI0_USI2_IP>; + clock-names = "pclk", "ipclk"; + samsung,sysreg = <&sysreg_hsi0 0x101c>; + samsung,mode = ; + #address-cells = <1>; + #size-cells = <1>; + ranges; + status = "disabled"; + + spi20: spi@111d0000 { + compatible = "google,zuma-spi", "google,gs101-spi"; + /* USI control starts at 0xc0; do not claim it twice. */ + reg = <0x111d0000 0xc0>; + interrupts = ; + clocks = <&cmu_hsi0 CLK_GOUT_HSI0_USI2_PCLK>, + <&cmu_hsi0 CLK_GOUT_HSI0_USI2_IP>; + clock-names = "spi", "spi_busclk0"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + }; + /* * The DWC3 controller, in peripheral mode as on stock (which * wraps it in Google's exynos9-dwusb glue). On a normal boot From d95d58e530d9f33f4f2c08b4c577e5b633d3ae0f Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Sat, 31 Oct 2026 07:50:09 -0400 Subject: [PATCH 17/18] Input: salixp: stop at the scan echo, and wait up to stock's 2.5 s The Pixel 8 Pro's FTM5 firmware first reports a forced calibration (status 43 05 01) after the scan command, then echoes the command about 60 ms after it was sent, past the 50 ms window. Probe then failed with "turning sensing on". Wait up to 2.5 s, as stock's checkEcho does (TIEMOUT_ECHO), and stop polling once the echo arrives, so the longer window costs nothing when the firmware answers promptly. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- drivers/input/touchscreen/salixp.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/salixp.c b/drivers/input/touchscreen/salixp.c index c1752a8583..f7c665d96c 100644 --- a/drivers/input/touchscreen/salixp.c +++ b/drivers/input/touchscreen/salixp.c @@ -97,7 +97,7 @@ #define SALIXP_SCAN_ALL 0xff #define SALIXP_EVT_STATUS 0x43 #define SALIXP_ECHO_TYPE 0x01 -#define SALIXP_ECHO_MS 50 +#define SALIXP_ECHO_MS 2500 #define SALIXP_TOUCH_POLL_MS 10 #define SALIXP_TOUCH_LOG_MAX 8 #define SALIXP_CS_DELAY_US 10 @@ -431,9 +431,11 @@ static int salixp_poll_cx(struct salixp *ts) * and address 0x20000000, the same prefix as the flash commands, so * this does not send it. The echo is 0x43 0x01 followed by the * command. Stock treats a missing echo as failure after retries - * (ftsIO.c:523-547). This sends the scan command once and fails - * probe if the echo does not arrive. It does not send it again. - * No interrupt is requested. + * (ftsIO.c:523-547), waiting up to 2.5 s for it (TIEMOUT_ECHO in + * ftsCore.c:330). Husky's firmware reports a forced calibration + * first and echoes about 60 ms after the command. This sends the + * scan command once, stops at the echo and fails probe if it does + * not arrive. It does not send it again. No interrupt is requested. */ static int salixp_sense_on(struct salixp *ts) { @@ -460,7 +462,8 @@ static int salixp_sense_on(struct salixp *ts) return ret; deadline = ktime_add_ms(ktime_get(), SALIXP_ECHO_MS); - while (ktime_before(ktime_get(), deadline) && n < SALIXP_POLL_MAX_EVT) { + while (!echo && ktime_before(ktime_get(), deadline) && + n < SALIXP_POLL_MAX_EVT) { ret = salixp_read_fifo(ts, event); if (ret) return ret; From 10c6a39cfdcb58689a0fb786a58d41094a9ca5d0 Mon Sep 17 00:00:00 2001 From: Brett-Michael Green Date: Fri, 30 Oct 2026 16:36:42 -0400 Subject: [PATCH 18/18] arm64: dts: exynos: google: zuma-husky: add the touchscreen The Pixel 8 Pro's touchscreen is an ST FTM5 (SALIXP, chip id 36 40) on USI2's SPI, as in stock's fts node: 10 MHz, attention on gpn0-0, reset on gpp21-2, 1344 x 2992. Its rails are the main PMIC's LDO25M (1.8 V digital) and LDO4M (3.3 V analog), which the firmware leaves off and at those voltages. Pin them there, as stock does. Stock's node inverts both axes, but salixp already reports in the panel's orientation: with stock's inversion, a tap at the top-left came in at the bottom-right. Assisted-by: LLM Signed-off-by: Brett-Michael Green --- .../boot/dts/exynos/google/zuma-husky.dts | 39 +++++++++++++++++++ .../boot/dts/exynos/google/zuma-pinctrl.dtsi | 14 +++++++ 2 files changed, 53 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts index 283481bb0a..29b9a11b98 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-husky.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-husky.dts @@ -126,10 +126,45 @@ compatible = "samsung,s2mpg14-pmic"; regulators { + touch_avdd: ldo4m { + regulator-name = "touch-avdd"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + touch_vdd: ldo25m { + regulator-name = "touch-vdd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; }; }; }; +&spi20 { + status = "okay"; + + /* + * ST FTM5 (SALIXP, chip id 36 40), as stock's fts node: 10 MHz, + * manual chip select. Not stock's axis inversion: salixp already + * reports in the panel's orientation. + */ + touchscreen@0 { + compatible = "st,salixp"; + reg = <0>; + spi-max-frequency = <10000000>; + interrupt-parent = <&gpn0>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + vdd-supply = <&touch_vdd>; + avdd-supply = <&touch_avdd>; + reset-gpios = <&gpp21 2 GPIO_ACTIVE_LOW>; + touchscreen-size-x = <1344>; + touchscreen-size-y = <2992>; + pinctrl-names = "default"; + pinctrl-0 = <&ts_irq &ts_reset>; + }; +}; + &usb_dwc3 { status = "okay"; }; @@ -154,3 +189,7 @@ &ufs_0_phy { status = "okay"; }; + +&usi2_hsi0 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi index 508c1171d2..a88e0eaa20 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi +++ b/arch/arm64/boot/dts/exynos/google/zuma-pinctrl.dtsi @@ -250,6 +250,13 @@ interrupt-parent = <&gic>; interrupts = ; }; + + ts_irq: ts-irq-pins { + samsung,pins = "gpn0-0"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_peric0 { @@ -422,6 +429,13 @@ interrupt-controller; #interrupt-cells = <2>; }; + + ts_reset: ts-reset-pins { + samsung,pins = "gpp21-2"; + samsung,pin-function = ; + samsung,pin-pud = ; + samsung,pin-drv = ; + }; }; &pinctrl_hsi2ufs {