Skip to content
Merged
Show file tree
Hide file tree
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
77 changes: 77 additions & 0 deletions arch/arm64/boot/dts/exynos/google/zuma-akita.dts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include "zuma.dtsi"

/ {
Expand Down Expand Up @@ -78,6 +79,7 @@
height = <2400>;
stride = <(1080 * 4)>;
format = "a8r8g8b8";
panel = <&panel0>;
};
};

Expand Down Expand Up @@ -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>;
Expand All @@ -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
Expand All @@ -145,3 +218,7 @@
&usbdrd_phy {
status = "okay";
};

&usi2_hsi0 {
status = "okay";
};
21 changes: 19 additions & 2 deletions drivers/regulator/s2mps11.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down