diff --git a/arch/arm64/boot/dts/exynos/google/zuma-akita.dts b/arch/arm64/boot/dts/exynos/google/zuma-akita.dts index bd1822f005..3714d95021 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" / { @@ -78,6 +79,7 @@ height = <2400>; stride = <(1080 * 4)>; format = "a8r8g8b8"; + panel = <&panel0>; }; }; @@ -108,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>; @@ -120,6 +141,58 @@ }; }; +/* + * 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>; + }; + }; + }; +}; + +&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 @@ -145,3 +218,7 @@ &usbdrd_phy { status = "okay"; }; + +&usi2_hsi0 { + status = "okay"; +}; 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,