summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixelBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2022-11-13 18:32:53 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2022-11-13 18:32:53 -0800
commitd7f3140cc846d71cb0285f1ad26b7c4bdc6854d9 (patch)
treebb109ac2e2d2fe05ce71e0d6e25a589e0be99ec0
parentd398f69d3215794aa994686bdeee1b51951641f3 (diff)
parent68cbe185380690d64e8e3804ec8ccc4b1a50755e (diff)
downloadlynx-d7f3140cc846d71cb0285f1ad26b7c4bdc6854d9.tar.gz
Merge android13-gs-pixel-5.10-tm-qpr2 into android13-gs-pixel-5.10-tm-qpr3
SBMerger: 478053055 Change-Id: Ie593f957b6df0e8e5c297cd1799070ba5aa84d28 Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r--display/panel-samsung-s6e3fc5.c54
-rw-r--r--dts/Makefile6
-rw-r--r--dts/gs201-lynx-charging.dtsi1
-rw-r--r--dts/gs201-lynx-mp1_0.dts28
-rw-r--r--dts/gs201-lynx-pvt1_0.dts28
-rw-r--r--dts/gs201-lynx-thermal.dtsi12
6 files changed, 103 insertions, 26 deletions
diff --git a/display/panel-samsung-s6e3fc5.c b/display/panel-samsung-s6e3fc5.c
index d9e32b6..80866cc 100644
--- a/display/panel-samsung-s6e3fc5.c
+++ b/display/panel-samsung-s6e3fc5.c
@@ -54,6 +54,8 @@ static const u32 lhbm_1300_1100_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {922974324, 910
static const u32 lhbm_990_1300_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {1089563019, 1063348416, 1099934254};
static const u32 lhbm_1208_1300_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {1029306415, 1018581722, 1029205963};
static const u32 lhbm_1280_1300_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {1005012531, 1005714286, 1003953871};
+static const u32 lhbm_1250_1300_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {1013985465, 1011108127, 1012870314};
+static const u32 lhbm_1270_1300_rgb_ratio[LHBM_RGB_RATIO_SIZE] = {1005722353, 1004545049, 1005266073};
static const struct exynos_dsi_cmd s6e3fc5_off_cmds[] = {
EXYNOS_DSI_CMD(display_off, 0),
@@ -191,33 +193,37 @@ static void s6e3fc5_update_lhbm_gamma(struct exynos_panel *ctx)
rgb_ratio = lhbm_1208_1300_rgb_ratio;
else if (ctx->panel_rev == PANEL_REV_EVT1_1)
rgb_ratio = lhbm_1280_1300_rgb_ratio;
+ else if (ctx->panel_rev == PANEL_REV_DVT1)
+ rgb_ratio = lhbm_1250_1300_rgb_ratio;
+ else if (ctx->panel_rev >= PANEL_REV_DVT1_1)
+ rgb_ratio = lhbm_1270_1300_rgb_ratio;
- if (rgb_ratio) {
- dev_info(ctx->dev, "%s: gamma_cmd(%02x %02x %02x %02x %02x)\n", __func__,
- gamma_cmd[1], gamma_cmd[2], gamma_cmd[3], gamma_cmd[4], gamma_cmd[5]);
- for (i = 0; i < LHBM_RGB_RATIO_SIZE ; i++) {
- if (i % 2) {
- mask = 0xf0;
- shift = 4;
- } else {
- mask = 0x0f;
- shift = 0;
- }
- tmp = ((gamma_cmd[rgb_offset[i][0]] & mask) >> shift) << 8 | gamma_cmd[rgb_offset[i][1]];
- dev_dbg(ctx->dev, "%s: lhbm_gamma[%d] = %llu\n", __func__, i, tmp);
- /* Round off and revert to original gamma value */
- tmp = (tmp * rgb_ratio[i] + 500000000)/1000000000;
- dev_dbg(ctx->dev, "%s: new lhbm_gamma[%d] = %llu\n", __func__, i, tmp);
- new_gamma_cmd[rgb_offset[i][0]] |= ((tmp & 0xff00) >> 8) << shift;
- new_gamma_cmd[rgb_offset[i][1]] |= tmp & 0xff;
+ if (!rgb_ratio)
+ return;
+
+ dev_info(ctx->dev, "%s: gamma_cmd(%02x %02x %02x %02x %02x)\n", __func__,
+ gamma_cmd[1], gamma_cmd[2], gamma_cmd[3], gamma_cmd[4], gamma_cmd[5]);
+ for (i = 0; i < LHBM_RGB_RATIO_SIZE ; i++) {
+ if (i % 2) {
+ mask = 0xf0;
+ shift = 4;
+ } else {
+ mask = 0x0f;
+ shift = 0;
}
- memcpy(&gamma_cmd[1], &new_gamma_cmd[1], LHBM_GAMMA_CMD_SIZE - 1);
- dev_info(ctx->dev, "%s: new_gamma_cmd(%02x %02x %02x %02x %02x)\n", __func__,
- gamma_cmd[1], gamma_cmd[2], gamma_cmd[3], gamma_cmd[4], gamma_cmd[5]);
- dev_info(ctx->dev, "%s: rgb_ratio(%u %u %u)\n", __func__,
- rgb_ratio[0], rgb_ratio[1], rgb_ratio[2]);
+ tmp = ((gamma_cmd[rgb_offset[i][0]] & mask) >> shift) << 8 | gamma_cmd[rgb_offset[i][1]];
+ dev_dbg(ctx->dev, "%s: lhbm_gamma[%d] = %llu\n", __func__, i, tmp);
+ /* Round off and revert to original gamma value */
+ tmp = (tmp * rgb_ratio[i] + 500000000)/1000000000;
+ dev_dbg(ctx->dev, "%s: new lhbm_gamma[%d] = %llu\n", __func__, i, tmp);
+ new_gamma_cmd[rgb_offset[i][0]] |= ((tmp & 0xff00) >> 8) << shift;
+ new_gamma_cmd[rgb_offset[i][1]] |= tmp & 0xff;
}
-
+ memcpy(&gamma_cmd[1], &new_gamma_cmd[1], LHBM_GAMMA_CMD_SIZE - 1);
+ dev_info(ctx->dev, "%s: new_gamma_cmd(%02x %02x %02x %02x %02x)\n", __func__,
+ gamma_cmd[1], gamma_cmd[2], gamma_cmd[3], gamma_cmd[4], gamma_cmd[5]);
+ dev_info(ctx->dev, "%s: rgb_ratio(%u %u %u)\n", __func__,
+ rgb_ratio[0], rgb_ratio[1], rgb_ratio[2]);
}
static void s6e3fc5_lhbm_gamma_read(struct exynos_panel *ctx)
diff --git a/dts/Makefile b/dts/Makefile
index d15415e..60a3a8d 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -11,7 +11,9 @@ dtbo-y += \
gs201-lynx-evt1_0-wingboard.dtbo \
gs201-lynx-evt1_1.dtbo \
gs201-lynx-dvt1_0.dtbo \
- gs201-lynx-dvt1_0-gain1.dtbo
+ gs201-lynx-dvt1_0-gain1.dtbo \
+ gs201-lynx-pvt1_0.dtbo \
+ gs201-lynx-mp1_0.dtbo
gs201-lynx-dev1_0.dtbo-base := google-base/gs201-a0.dtb
gs201-lynx-proto1_0.dtbo-base := google-base/gs201-a0.dtb
@@ -21,5 +23,7 @@ gs201-lynx-evt1_0-wingboard.dtbo-base := google-base/gs201-b0_v2-ipop.dtb
gs201-lynx-evt1_1.dtbo-base := google-base/gs201-b0_v2-ipop.dtb
gs201-lynx-dvt1_0.dtbo-base := google-base/gs201-b0_v2-ipop.dtb
gs201-lynx-dvt1_0-gain1.dtbo-base := google-base/gs201-b0_v2-ipop.dtb
+gs201-lynx-pvt1_0.dtbo-base := google-base/gs201-b0_v2-ipop.dtb
+gs201-lynx-mp1_0.dtbo-base := google-base/gs201-b0_v2-ipop.dtb
MKDTIMG_FLAGS += --page_size=4096 --id=/:board_id --rev=/:board_rev
diff --git a/dts/gs201-lynx-charging.dtsi b/dts/gs201-lynx-charging.dtsi
index 7b47470..bd912e3 100644
--- a/dts/gs201-lynx-charging.dtsi
+++ b/dts/gs201-lynx-charging.dtsi
@@ -33,6 +33,7 @@
<4599000 4340000 4040000 3676000 2795000 2340000 2053000 1686000 1441000 957000 597000 352000>;
google,wlc-thermal-mitigation-budgets =
<4599000 4040000 3676000 3153000 2795000 2340000 2053000 1686000 1441000 957000 597000 352000>;
+ google,thermal-stats-lvl-map = <0 3 5 8>;
google,wlc-thermal-dc-fan-alarm = <2>;
diff --git a/dts/gs201-lynx-mp1_0.dts b/dts/gs201-lynx-mp1_0.dts
new file mode 100644
index 0000000..ec94ddc
--- /dev/null
+++ b/dts/gs201-lynx-mp1_0.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Lynx device tree source
+ *
+ * Copyright 2022 Google,LLC
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include "gs201-lynx-common.dtsi"
+#include "gs201-lynx-touch.dtsi"
+
+/ {
+ board_id = <0x30506>;
+ board_rev = <0x10000>;
+ fragment@boardbase {
+ target-path="/";
+ __overlay__ {
+ model = "GS201 LYNX MP 1.0 based on GS201";
+ compatible = "google,GS201 LYNX", "google,GS201";
+ };
+ };
+};
+
+&serial_0 {
+ status = "okay";
+};
diff --git a/dts/gs201-lynx-pvt1_0.dts b/dts/gs201-lynx-pvt1_0.dts
new file mode 100644
index 0000000..120c9db
--- /dev/null
+++ b/dts/gs201-lynx-pvt1_0.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Lynx device tree source
+ *
+ * Copyright 2022 Google,LLC
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include "gs201-lynx-common.dtsi"
+#include "gs201-lynx-touch.dtsi"
+
+/ {
+ board_id = <0x30505>;
+ board_rev = <0x10000>;
+ fragment@boardbase {
+ target-path="/";
+ __overlay__ {
+ model = "GS201 LYNX PVT 1.0 based on GS201";
+ compatible = "google,GS201 LYNX", "google,GS201";
+ };
+ };
+};
+
+&serial_0 {
+ status = "okay";
+};
diff --git a/dts/gs201-lynx-thermal.dtsi b/dts/gs201-lynx-thermal.dtsi
index 44cad8d..a0fa826 100644
--- a/dts/gs201-lynx-thermal.dtsi
+++ b/dts/gs201-lynx-thermal.dtsi
@@ -105,10 +105,20 @@
thermal-sensors = <&gs201_tm1 6>;
trips {
trip_config6: trip-config6 {
- temperature = <125000>;
+ temperature = <56000>;
hysteresis = <1000>;
type = "passive";
};
+ backup_shutdown_sw: backup-shutdown-sw {
+ temperature = <57000>;
+ hysteresis = <1000>;
+ type = "critical";
+ };
+ backup_shutdown_hw: backup-shutdown-hw {
+ temperature = <59000>;
+ hysteresis = <1000>;
+ type = "hot";
+ };
};
};
gnss_tcxo_therm {