From 7d143b515abe3fd0945b53937c0e91c1aaee9182 Mon Sep 17 00:00:00 2001 From: DarekM <149845949+aninmucek@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:24:50 +0000 Subject: [PATCH 1/4] regulator: s2mps11: Let the S2MPG14 touch supplies set their voltage ABL can leave LDO4M at another voltage than the touch controller needs: on a Pixel 8a it leaves 3.3 V, read back through the driver's own get_voltage_sel, while the stock phone runs the Goodix GT9895 there at 3.0 V (its live device tree). With voltage selectors firmware-owned, a board that fixes 3.0 V fails to probe ("failed to apply 3000000-3000000uV constraint: -EINVAL"), and one without a constraint would power the controller at ABL's 3.3 V. Give LDO4M and LDO25M a set_voltage_sel through the regmap, which goes to the PMIC through ACPM as enable does. The selector tables are Google's: s2mpg14-regulator.c puts LDO4M in voltage group 5 (1.8 V minimum) and LDO25M in group 4 (0.7 V), each with 64 steps of 25 mV (s2mpg14-register.h), and writes the selector into the low six bits of the control register (0x2e and 0x43), as the descriptors here already read it. The other S2MPG14 outputs keep firmware-owned selectors. The core calls the setter only to bring a voltage into the board's constraints, so a board without voltage constraints (zumapro-tegu), or whose constraint already matches what ABL left (zuma-husky's fixed 3.3 V, which probes today without a setter), sees no write. Tested on a Pixel 8a from slot B (7.3.0-rc6), with LDO4M fixed at 3.0 V and LDO25M at 1.8 V in the board file and nothing consuming them: the core logs "touch-avdd: Bringing 3300000uV into 3000000-3000000uV"; both rails then read back 3000000 and 1800000 uV (the PMIC regmap has no cache, so that is the register through ACPM), disabled, with no users, and stay so past the unused-regulator cleanup. Nothing enabled them in that boot. Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/drivers/regulator/s2mpg14-regulator.c Link: https://android.googlesource.com/kernel/google-modules/soc/gs/+/204078758737776959ecc85c527a00fd2cabb62f/include/linux/mfd/samsung/s2mpg14-register.h Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com> --- drivers/regulator/s2mps11.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index 647b46c75a..2839998df0 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c @@ -2282,13 +2282,30 @@ static const struct regulator_ops s2mpg14_ldo_ops = { .disable = regulator_disable_regmap, }; +/* + * The touchscreen supplies can also be set: ABL may leave them at another + * voltage than the board's controller needs (3.3 V on LDO4M where the + * Pixel 8a's runs at 3.0 V). The selector tables are Google's + * (s2mpg14-regulator.c: LDO4M group 5, LDO25M group 4, 64 steps of 25 mV) + * and set the low six bits of the control register, as there. + */ +static const struct regulator_ops s2mpg14_ldo_vsel_ops = { + .list_voltage = regulator_list_voltage_linear, + .map_voltage = regulator_map_voltage_linear, + .get_voltage_sel = regulator_get_voltage_sel_regmap, + .set_voltage_sel = regulator_set_voltage_sel_regmap, + .is_enabled = regulator_is_enabled_regmap, + .enable = regulator_enable_regmap, + .disable = regulator_disable_regmap, +}; + static const struct regulator_desc s2mpg14_regulators[] = { { .name = "ldo4m", .id = 3, .of_match = of_match_ptr("ldo4m"), .regulators_node = of_match_ptr("regulators"), - .ops = &s2mpg14_ldo_ops, + .ops = &s2mpg14_ldo_vsel_ops, .type = REGULATOR_VOLTAGE, .owner = THIS_MODULE, .min_uV = 1800000, @@ -2352,7 +2369,7 @@ static const struct regulator_desc s2mpg14_regulators[] = { .id = 24, .of_match = of_match_ptr("ldo25m"), .regulators_node = of_match_ptr("regulators"), - .ops = &s2mpg14_ldo_ops, + .ops = &s2mpg14_ldo_vsel_ops, .type = REGULATOR_VOLTAGE, .owner = THIS_MODULE, .min_uV = 700000, From 51a4307dd259499738e5bb094830fefc42beb15c Mon Sep 17 00:00:00 2001 From: DarekM <149845949+aninmucek@users.noreply.github.com> Date: Tue, 10 Nov 2026 16:08:23 +0000 Subject: [PATCH 2/4] arm64: dts: exynos: google: zuma-akita: Add the touch supplies The Pixel 8a's touch controller takes vdd from the S2MPG14's LDO25M at 1.8 V and avdd from its LDO4M at 3.0 V (the stock phone's live device tree; Google's zuma-akita-touch.dtsi fixes both and drops always-on). Describe the main PMIC on ACPM with those two regulators, as zuma-husky does, but with akita's 3.0 V avdd rather than the Pixel 8 Pro's 3.3 V. Nothing uses them yet: the touchscreen node follows in its own commit. Tested on a Pixel 8a from slot B (7.3.0-rc6, with the S2MPG14 setter): the core logs "touch-avdd: Bringing 3300000uV into 3000000-3000000uV" and both rails read back 3000000 and 1800000 uV, disabled, with no users, in a boot with no consumer. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com> --- .../boot/dts/exynos/google/zuma-akita.dts | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-akita.dts b/arch/arm64/boot/dts/exynos/google/zuma-akita.dts index bd1822f005..c7c1b33580 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-akita.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-akita.dts @@ -120,6 +120,32 @@ }; }; +/* + * The main PMIC, behind the ACPM firmware. Its regulators are described + * with their consumers, which run them through the firmware. The touch + * controller's avdd is 3.0 V here (the stock phone's LDO4M), not the + * Pixel 8 Pro's 3.3 V. + */ +&acpm_ipc { + pmic-1 { + compatible = "samsung,s2mpg14-pmic"; + + regulators { + touch_avdd: ldo4m { + regulator-name = "touch-avdd"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + touch_vdd: ldo25m { + regulator-name = "touch-vdd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + }; + }; +}; + /* * Behind the init's storage guard (only slot B's boot images and userdata * writable), which sets every partition read-only before anything mounts From ecd62d606f7406c997a965c970fdd950363bbe2c Mon Sep 17 00:00:00 2001 From: DarekM <149845949+aninmucek@users.noreply.github.com> Date: Wed, 11 Nov 2026 00:42:50 +0000 Subject: [PATCH 3/4] arm64: dts: exynos: google: zuma-akita: Add the touchscreen The Pixel 8a's touchscreen is a Goodix GT9895 (Berlin) on USI2_HSI0's SPI, the bus, interrupt and reset lines of the Pixel 8 Pro's: 10 MHz, interrupt on gpn0-0 (falling edge, as stock's goodix,irq-flags = 2), reset on gpp21-2 (Google's zuma-akita-touch.dtsi; the stock phone's /proc/interrupts lists goodix_ts on gpn0 0 Edge). Both of stock's firmware files, goodix_firmware_ak3a.bin and goodix_firmware_ak3b.bin, carry "9895" in their Berlin header, so it takes the gt9895 match data (14-byte contact records), as the Pixel 7a does. The driver runs the firmware already on the chip and loads none. The supplies are the LDO4M and LDO25M described with the PMIC, at stock's 3.0 V and 1.8 V. Tested on a Pixel 8a from slot B (7.3.0-rc6), in a later boot than the one that first set the voltage: with the driver held back, the rails read 3.0 V and 1.8 V and off; loading goodix_berlin_spi enabled them and registered "Goodix Berlin Capacitive TouchScreen". Touches in the four corners came in at (110,121), (1004,118), (118,2311) and (971,2298), so no axis swap or inversion is needed, and 842 interrupts gave no checksum errors. In the next boots the driver loads by itself, and the PIN pad, the shell and the on-screen keyboard work by touch. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com> --- .../boot/dts/exynos/google/zuma-akita.dts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-akita.dts b/arch/arm64/boot/dts/exynos/google/zuma-akita.dts index c7c1b33580..77cd6a3504 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-akita.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-akita.dts @@ -7,6 +7,7 @@ #include #include +#include #include "zuma.dtsi" / { @@ -146,6 +147,32 @@ }; }; +&spi20 { + status = "okay"; + + /* + * Goodix GT9895 (Berlin), the Pixel 7a's controller: both of stock's + * firmware files (goodix_firmware_ak3a.bin and _ak3b.bin) say "9895". + * Wired as zuma-husky's touchscreen: 10 MHz, interrupt on gpn0-0 + * (falling edge, stock's goodix,irq-flags = 2), reset on gpp21-2. + * avdd is LDO4M at 3.0 V and vddio LDO25M at 1.8 V, as on stock. + */ + touchscreen@0 { + compatible = "goodix,gt9895"; + reg = <0>; + spi-max-frequency = <10000000>; + interrupt-parent = <&gpn0>; + interrupts = <0 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&gpp21 2 GPIO_ACTIVE_LOW>; + avdd-supply = <&touch_avdd>; + vddio-supply = <&touch_vdd>; + touchscreen-size-x = <1080>; + touchscreen-size-y = <2400>; + pinctrl-names = "default"; + pinctrl-0 = <&ts_irq &ts_reset>; + }; +}; + /* * Behind the init's storage guard (only slot B's boot images and userdata * writable), which sets every partition read-only before anything mounts @@ -171,3 +198,7 @@ &usbdrd_phy { status = "okay"; }; + +&usi2_hsi0 { + status = "okay"; +}; From 9613d7934b71db7340b2b8b130716a859782b526 Mon Sep 17 00:00:00 2001 From: DarekM <149845949+aninmucek@users.noreply.github.com> Date: Wed, 11 Nov 2026 01:09:26 +0000 Subject: [PATCH 4/4] arm64: dts: exynos: google: zuma-akita: Add the panel's physical size Without a panel node, simpledrm estimates the display's size from its pixels at 96 dpi, so the compositor sees a 285x635 mm screen and the on-screen keyboard comes out a fraction of its height. Add a disabled panel node with width-mm and height-mm and point the framebuffer at it, as zuma-husky does. 64x141 mm is the lit area, measured with a ruler on a Pixel 8a: what a 6.1-inch 20:9 panel gives (63.6x141.3 mm), and the height Google's touch node names (goodix,panel-height-mm = <141>). Stock's own figure is larger than the glass: Google's panel-google-ak3b.c gives the ak3b 70x149 mm, and the stock phone's DPI follows from it (dumpsys display: xDpi 391.885, yDpi 409.127 for 1080x2400), so stock sizes everything about 9 % small. The comment names both. Tested on a Pixel 8a from slot B (7.3.0-rc6): Hyprland reports the monitor as 64x141 mm (285x635 mm without the node), and the on-screen keyboard comes out at its normal height. An earlier boot with stock's 70x149 mm also worked, with everything about 9 % smaller. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com> --- .../boot/dts/exynos/google/zuma-akita.dts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/zuma-akita.dts b/arch/arm64/boot/dts/exynos/google/zuma-akita.dts index 77cd6a3504..3714d95021 100644 --- a/arch/arm64/boot/dts/exynos/google/zuma-akita.dts +++ b/arch/arm64/boot/dts/exynos/google/zuma-akita.dts @@ -79,6 +79,7 @@ height = <2400>; stride = <(1080 * 4)>; format = "a8r8g8b8"; + panel = <&panel0>; }; }; @@ -109,6 +110,25 @@ }; }; + /* + * Without a panel node simpledrm estimates the display's physical + * size from its pixels at 96 dpi: 285x635 mm instead of 64x141 mm, + * which sizes everything that works in millimetres (the on-screen + * keyboard) wrongly. simpledrm only reads width-mm and height-mm from + * this node. It stays disabled so that fw_devlink does not make the + * framebuffer wait for a driver this node will never have. 64x141 mm + * is the lit area, measured with a ruler on a Pixel 8a, as for a + * 6.1-inch 20:9 panel; Google's touch node has panel-height-mm = 141. + * Stock's figure is larger than the glass: Google's panel-google-ak3b.c + * gives the ak3b 70x149 mm, and the stock phone's DPI follows from it + * (xDpi 391.885, yDpi 409.127 for 1080x2400). + */ + panel0: panel { + status = "disabled"; + width-mm = <64>; + height-mm = <141>; + }; + reserved-memory { #address-cells = <2>; #size-cells = <1>;