Skip to contentSkip to conversation

Add support for Pixel 3 and Pixel 3 XL

PATCH Superseded David Heidelberg 6 participants 23 messages Nov 18, 2025 – Nov 20, 2025

Subsystems (7)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v3 cover Add support for Pixel 3 and Pixel 3 XL

This adds initial device tree support for the following phones:

- Google Pixel 3 (blueline)
- Google Pixel 3 XL (crosshatch)

Both phone boards use the same identifiers and differ only slightly in their connected peripherals.

This is mainly focused to get the base functionality of the board and being able to use the upstream DTS within Linux and u-boot.

Booting
-------
For older Pixel 3 bootloaders, bootloader-compatible board and MSM IDs are required for the kernel to boot, so these have been added.

For recent Pixel 3 bootloaders,
a) you want chainloaded proper bootloader (f.e. u-boot),
b) you can also boot kernel when adding back TEXT_OFFSET (partial revert of 120dc60d).

This series is a beggining of cleaning up and transitioning support from sdm845 close to mainline tree to the mainline.

Until merged, available at:
https://gitlab.com/sdm845/sdm845-next/-/commits/b4/pixel-3

Depends on:
- "[PATCH 0/7] arm64: dts: qcom: cleanup GPU's zap-shader node" series.

---
Changes in v3:
- dropped Documentaion: prefix from 1st commit (Krzysztof)
- extended the compatible for panel driver
- Document reserved GPIOs.
- Drop some useless statuses, sort pinctrl. (Konrad)
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- rebased on next-20251030
- generalize chosen to -common (Dmitry)
- demystify rmtfs_mem qcom,vmid
- use qcom,use-guard-pages instead of lower/upper guard block
- merge port@1 endpoint into label mdss_dsi0_out
- sort pinctrl
- sorted the nodes inside root
- put status as a last property into mdss_dsi0 block
- rename volume-keys to gpio-keys
- removed LS-UART1 label
- removed gmu block, already enabled
- removed accidentally introduced WIP crosshatch panel support
- removed useless panel_pmgpio_pins (Dmitry)
- removed usb_2 as it's unused on production units (only devkit)
- move mdss node into the -common and disable in crosshatch (Dmitry)
- move battery node into the -commonm
- move framebuffer into the -common (Dmitry)
- add all firmwares (Dmitry)
- add Wi-Fi support
- add Bluetooth support
- add missing gpi_dma1 node
- renamed regulators to follow regulator-foo-bar BCP (Dmitry)
- adapt to recent cleanup GPU's zap-shader node
- Link to v1: https://lore.kernel.org/r/[email protected]

---
David Heidelberg (8):
dt-bindings: arm: qcom: Add Pixel 3 and 3 XL
dt-bindings: panel: sw43408: adjust to reflect the DDIC and panel used drm/panel: sw43408: Introduce LH546WF1-ED01 panel compatible drm/panel: sw43408: Introduce disable/enable functions drm/panel: sw43408: Remove manual invocation of unprepare at remove drm/panel: sw43408: Switch to devm_regulator_bulk_get_const drm/panel: sw43408: Improve wording when reset-gpios aren't available
arm64: dts: qcom: Add support for Pixel 3 and Pixel 3 XL

 Documentation/devicetree/bindings/arm/qcom.yaml    |   2 +
 .../bindings/display/panel/lg,sw43408.yaml         |  11 +-
 arch/arm64/boot/dts/qcom/Makefile                  |   2 +
 .../arm64/boot/dts/qcom/sdm845-google-blueline.dts |  88 ++++
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 515 +++++++++++++++++++++
 .../boot/dts/qcom/sdm845-google-crosshatch.dts     |  33 ++
 drivers/gpu/drm/panel/panel-lg-sw43408.c           | 123 +++--
 7 files changed, 721 insertions(+), 53 deletions(-)

---
base-commit: ace0e2ec8bedd82f153e51c5d8d36ed3cb181e69
change-id: 20250419-pixel-3-511edc2a4607

Best regards,

Signature · 1 line
David Heidelberg <[email protected]>
#1 lore raw

PATCH v3 1/8 dt-bindings: arm: qcom: Add Pixel 3 and 3 XL

Document the bindings for the Pixel 3 and 3 XL.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +2 -0
index d84bd3bca2010..760b6633b7a55 100644
@@ -900,6 +900,8 @@ properties:
 
       - items:
           - enum:
+              - google,blueline
+              - google,crosshatch
               - huawei,planck
               - lenovo,yoga-c630
               - lg,judyln
Signature · 1 line
2.51.0
#3 lore raw

PATCH v3 2/8 dt-bindings: panel: sw43408: adjust to reflect the DDIC and panel used

In reply to David Heidelberg

Add compatible for used LG panel.
SW43408 is not panel, but DDIC. The panel itself is the LG LH546WF1-ED01, so introduce combined compatible for it.

---
 .../devicetree/bindings/display/panel/lg,sw43408.yaml         | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/display/panel/lg,sw43408.yaml +8 -3
index 2219d3d4ac43b..bcf5efac6902c 100644
@@ -4,14 +4,16 @@
 $id: http://devicetree.org/schemas/display/panel/lg,sw43408.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: LG SW43408 1080x2160 DSI panel
+title: LG SW43408 AMOLED DDIC
 
 maintainers:
   - Casey Connolly <[email protected]>
 
 description:
-  This panel is used on the Pixel 3, it is a 60hz OLED panel which
-  required DSC (Display Stream Compression) and has rounded corners.
+  The SW43408 is display driver IC with connected panel.
+
+  LG LH546WF1-ED01 panel is used on the Pixel 3, it is a 60hz OLED panel
+  which required DSC (Display Stream Compression) and has rounded corners.
 
 allOf:
   - $ref: panel-common.yaml#
@@ -19,6 +21,9 @@ allOf:
 properties:
   compatible:
     items:
+      - enum:
+            # LG 5.46 inch, 1080x2160 pixels, 18:9 ratio
+          - lg,sw43408-lh546wf1-ed01
       - const: lg,sw43408
 
   reg:
Signature · 1 line
2.51.0
#4 lore raw

Re: [PATCH v3 2/8] dt-bindings: panel: sw43408: adjust to reflect the DDIC and panel used

Quoted 9 lines · David Heidelberg

Add compatible for used LG panel.
SW43408 is not panel, but DDIC. The panel itself is the LG LH546WF1-ED01, so introduce combined compatible for it.

---
 .../devicetree/bindings/display/panel/lg,sw43408.yaml         | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/panel/lg,sw43408.example.dtb: panel@0 (lg,sw43408): compatible:0: 'lg,sw43408' is not one of ['lg,sw43408-lh546wf1-ed01']
from schema $id: http://devicetree.org/schemas/display/panel/lg,sw43408.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/panel/lg,sw43408.example.dtb: panel@0 (lg,sw43408): compatible: ['lg,sw43408'] is too short
from schema $id: http://devicetree.org/schemas/display/panel/lg,sw43408.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

#5 lore raw

Re: [PATCH v3 2/8] dt-bindings: panel: sw43408: adjust to reflect the DDIC and panel used

Quoted 12 lines · Rob Herring (Arm)
Quoted 9 lines · David Heidelberg

Add compatible for used LG panel.
SW43408 is not panel, but DDIC. The panel itself is the LG LH546WF1-ED01, so introduce combined compatible for it.

---
 .../devicetree/bindings/display/panel/lg,sw43408.yaml         | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Quoted 8 lines

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/panel/lg,sw43408.example.dtb: panel@0 (lg,sw43408): compatible:0: 'lg,sw43408' is not one of ['lg,sw43408-lh546wf1-ed01']
from schema $id: http://devicetree.org/schemas/display/panel/lg,sw43408.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/panel/lg,sw43408.example.dtb: panel@0 (lg,sw43408): compatible: ['lg,sw43408'] is too short

You got this error because you didn't fix the example DT (which would be validated with make dt_binding_check

Konrad

#6 lore raw

Re: [PATCH v3 2/8] dt-bindings: panel: sw43408: adjust to reflect the DDIC and panel used

yup, saw, consider it solved in next version! :)

Also hopefully I'll fire ut the dt_bindings_check and dtbs_check in our CI.

David

Quoted 26 lines · Konrad Dybcio
Quoted 12 lines · Rob Herring (Arm)
Quoted 9 lines · David Heidelberg

Add compatible for used LG panel.
SW43408 is not panel, but DDIC. The panel itself is the LG LH546WF1-ED01, so introduce combined compatible for it.

---
  .../devicetree/bindings/display/panel/lg,sw43408.yaml         | 11 ++++++++---
  1 file changed, 8 insertions(+), 3 deletions(-)
Quoted 8 lines

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/panel/lg,sw43408.example.dtb: panel@0 (lg,sw43408): compatible:0: 'lg,sw43408' is not one of ['lg,sw43408-lh546wf1-ed01']
from schema $id: http://devicetree.org/schemas/display/panel/lg,sw43408.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/display/panel/lg,sw43408.example.dtb: panel@0 (lg,sw43408): compatible: ['lg,sw43408'] is too short

You got this error because you didn't fix the example DT (which would be validated with make dt_binding_check

Konrad

Signature · 1 line
David Heidelberg
#7 lore raw

PATCH v3 3/8 drm/panel: sw43408: Introduce LH546WF1-ED01 panel compatible

In reply to David Heidelberg

The supported panel is LH546WF1-ED01, add compatible and adjust the struct name to reflect that.

The standalone compatible lg,sw43408 will continue to work, even thou there are no users yet.

---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-lg-sw43408.c +4 -2
index 46a56ea92ad9f..bd55f6d8f2771 100644
@@ -149,7 +149,7 @@ static int sw43408_prepare(struct drm_panel *panel)
 	return ret;
 }
 
-static const struct drm_display_mode sw43408_mode = {
+static const struct drm_display_mode lh546wf1_ed01_mode = {
 	.clock = (1080 + 20 + 32 + 20) * (2160 + 20 + 4 + 20) * 60 / 1000,
 
 	.hdisplay = 1080,
@@ -171,7 +171,7 @@ static const struct drm_display_mode sw43408_mode = {
 static int sw43408_get_modes(struct drm_panel *panel,
 			     struct drm_connector *connector)
 {
-	return drm_connector_helper_get_modes_fixed(connector, &sw43408_mode);
+	return drm_connector_helper_get_modes_fixed(connector, &lh546wf1_ed01_mode);
 }
 
 static int sw43408_backlight_update_status(struct backlight_device *bl)
@@ -214,7 +214,9 @@ static const struct drm_panel_funcs sw43408_funcs = {
 };
 
 static const struct of_device_id sw43408_of_match[] = {
+	/* legacy */
 	{ .compatible = "lg,sw43408", },
+	{ .compatible = "lg,sw43408-lh546wf1-ed01", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sw43408_of_match);
Signature · 1 line
2.51.0
#8 lore raw

Re: [PATCH v3 3/8] drm/panel: sw43408: Introduce LH546WF1-ED01 panel compatible

Quoted 7 lines · On Tue, Nov 18, 2025 at 12:30:38PM +0100, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

The supported panel is LH546WF1-ED01, add compatible and adjust the struct name to reflect that.

The standalone compatible lg,sw43408 will continue to work, even thou there are no users yet.

.. no users _left_ ?

Quoted 29 lines
---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-lg-sw43408.c +2 -2
index 46a56ea92ad9f..bd55f6d8f2771 100644
@@ -149,7 +149,7 @@ static int sw43408_prepare(struct drm_panel *panel)
 	return ret;
 }
 
-static const struct drm_display_mode sw43408_mode = {
+static const struct drm_display_mode lh546wf1_ed01_mode = {
 	.clock = (1080 + 20 + 32 + 20) * (2160 + 20 + 4 + 20) * 60 / 1000,
 
 	.hdisplay = 1080,
@@ -171,7 +171,7 @@ static const struct drm_display_mode sw43408_mode = {
 static int sw43408_get_modes(struct drm_panel *panel,
 			     struct drm_connector *connector)
 {
-	return drm_connector_helper_get_modes_fixed(connector, &sw43408_mode);
+	return drm_connector_helper_get_modes_fixed(connector, &lh546wf1_ed01_mode);
 }
 
 static int sw43408_backlight_update_status(struct backlight_device *bl)

drivers/gpu/drm/panel/panel-lg-sw43408.c static const struct drm_panel_funcs sw43408_funcs = { · line 217

Quoted 4 lines
drivers/gpu/drm/panel/panel-lg-sw43408.c +1 -0
@@ -214,7 +214,9 @@ static const struct drm_panel_funcs sw43408_funcs = {
 };
 
 static const struct of_device_id sw43408_of_match[] = {
+	/* legacy */

Nit: I'd read this comment in a way that both entries are legacy. Would it be possible to adjust this somehow (e.g. put legacy on the same line or extend it, explaining that only lg,sw43408 is legacy).

Quoted 11 lines
drivers/gpu/drm/panel/panel-lg-sw43408.c +1 -0
 	{ .compatible = "lg,sw43408", },
+	{ .compatible = "lg,sw43408-lh546wf1-ed01", },
 
 	{ /* sentinel */ }
 };

MODULE_DEVICE_TABLE(of, sw43408_of_match);

Signature · 1 line
2.51.0
Signature · 2 lines
With best wishes
Dmitry
#9 lore raw

Re: [PATCH v3 3/8] drm/panel: sw43408: Introduce LH546WF1-ED01 panel compatible

Quoted 10 lines · Dmitry Baryshkov
Quoted 7 lines · On Tue, Nov 18, 2025 at 12:30:38PM +0100, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

The supported panel is LH546WF1-ED01, add compatible and adjust the struct name to reflect that.

The standalone compatible lg,sw43408 will continue to work, even thou there are no users yet.

.. no users _left_ ?

The compatible users wasn't introduced in the first place (the driver is written for Pixel 3, but the device-tree didn't got in back then).

[...]

Quoted 10 lines

drivers/gpu/drm/panel/panel-lg-sw43408.c static const struct drm_panel_funcs sw43408_funcs = { · line 217

Quoted 6 lines

static int sw43408_backlight_update_status(struct backlight_device *bl)

drivers/gpu/drm/panel/panel-lg-sw43408.c +1 -0
@@ -214,7 +214,9 @@ static const struct drm_panel_funcs sw43408_funcs = {
  };
 
  static const struct of_device_id sw43408_of_match[] = {
+	/* legacy */

Nit: I'd read this comment in a way that both entries are legacy. Would it be possible to adjust this somehow (e.g. put legacy on the same line or extend it, explaining that only lg,sw43408 is legacy).

Sure, I'll inline it.

Thanks
David

Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/panel/panel-lg-sw43408.c +1 -0
  	{ .compatible = "lg,sw43408", },
+	{ .compatible = "lg,sw43408-lh546wf1-ed01", },
 
  	{ /* sentinel */ }
  };
  MODULE_DEVICE_TABLE(of, sw43408_of_match);
#10 lore raw

PATCH v3 4/8 drm/panel: sw43408: Introduce disable/enable functions

In reply to David Heidelberg

Mostly cleanup, introduced disable, enable, and reset function, which takeover parts of prepare and unprepare suitable for splitting.

---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 83 ++++++++++++++++++++------------
 1 file changed, 53 insertions(+), 30 deletions(-)
drivers/gpu/drm/panel/panel-lg-sw43408.c +53 -30
index bd55f6d8f2771..e5a8a9bb8d15c 100644
@@ -38,11 +38,10 @@ static inline struct sw43408_panel *to_panel_info(struct drm_panel *panel)
 	return container_of(panel, struct sw43408_panel, base);
 }
 
-static int sw43408_unprepare(struct drm_panel *panel)
+static int sw43408_disable(struct drm_panel *panel)
 {
 	struct sw43408_panel *sw43408 = to_panel_info(panel);
 	struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link };
-	int ret;
 
 	mipi_dsi_dcs_set_display_off_multi(&ctx);
 
@@ -50,19 +49,55 @@ static int sw43408_unprepare(struct drm_panel *panel)
 
 	mipi_dsi_msleep(&ctx, 100);
 
+	return ctx.accum_err;
+}
+
+static int sw43408_unprepare(struct drm_panel *panel)
+{
+	struct sw43408_panel *sw43408 = to_panel_info(panel);
+	int ret;
+
 	gpiod_set_value(sw43408->reset_gpio, 1);
 
 	ret = regulator_bulk_disable(ARRAY_SIZE(sw43408->supplies), sw43408->supplies);
 
-	return ret ? : ctx.accum_err;
+	return ret;
 }
 
-static int sw43408_program(struct drm_panel *panel)
+static int sw43408_enable(struct drm_panel *panel)
 {
 	struct sw43408_panel *sw43408 = to_panel_info(panel);
 	struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link };
 	struct drm_dsc_picture_parameter_set pps;
 
+	mipi_dsi_dcs_set_display_on_multi(&ctx);
+
+	mipi_dsi_msleep(&ctx, 50);
+
+	sw43408->link->mode_flags &= ~MIPI_DSI_MODE_LPM;
+
+	drm_dsc_pps_payload_pack(&pps, sw43408->link->dsc);
+
+	mipi_dsi_picture_parameter_set_multi(&ctx, &pps);
+
+	sw43408->link->mode_flags |= MIPI_DSI_MODE_LPM;
+
+	/*
+	 * This panel uses PPS selectors with offset:
+	 * PPS 1 if pps_identifier is 0
+	 * PPS 2 if pps_identifier is 1
+	 */
+	mipi_dsi_compression_mode_ext_multi(&ctx, true,
+					    MIPI_DSI_COMPRESSION_DSC, 1);
+
+	return ctx.accum_err;
+}
+
+static int sw43408_program(struct drm_panel *panel)
+{
+	struct sw43408_panel *sw43408 = to_panel_info(panel);
+	struct mipi_dsi_multi_context ctx = { .dsi = sw43408->link };
+
 	mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_SET_GAMMA_CURVE, 0x02);
 
 	mipi_dsi_dcs_set_tear_on_multi(&ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
@@ -97,26 +132,19 @@ static int sw43408_program(struct drm_panel *panel)
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0x55, 0x04, 0x61, 0xdb, 0x04, 0x70, 0xdb);
 	mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0xca);
 
-	mipi_dsi_dcs_set_display_on_multi(&ctx);
-
-	mipi_dsi_msleep(&ctx, 50);
-
-	sw43408->link->mode_flags &= ~MIPI_DSI_MODE_LPM;
-
-	drm_dsc_pps_payload_pack(&pps, sw43408->link->dsc);
-
-	mipi_dsi_picture_parameter_set_multi(&ctx, &pps);
+	return ctx.accum_err;
+}
 
-	sw43408->link->mode_flags |= MIPI_DSI_MODE_LPM;
+static void sw43408_reset(struct sw43408_panel *ctx)
+{
+	usleep_range(5000, 6000);
 
-	/*
-	 * This panel uses PPS selectors with offset:
-	 * PPS 1 if pps_identifier is 0
-	 * PPS 2 if pps_identifier is 1
-	 */
-	mipi_dsi_compression_mode_ext_multi(&ctx, true,
-					    MIPI_DSI_COMPRESSION_DSC, 1);
-	return ctx.accum_err;
+	gpiod_set_value(ctx->reset_gpio, 0);
+	usleep_range(9000, 10000);
+	gpiod_set_value(ctx->reset_gpio, 1);
+	usleep_range(1000, 2000);
+	gpiod_set_value(ctx->reset_gpio, 0);
+	usleep_range(9000, 10000);
 }
 
 static int sw43408_prepare(struct drm_panel *panel)
@@ -128,14 +156,7 @@ static int sw43408_prepare(struct drm_panel *panel)
 	if (ret < 0)
 		return ret;
 
-	usleep_range(5000, 6000);
-
-	gpiod_set_value(ctx->reset_gpio, 0);
-	usleep_range(9000, 10000);
-	gpiod_set_value(ctx->reset_gpio, 1);
-	usleep_range(1000, 2000);
-	gpiod_set_value(ctx->reset_gpio, 0);
-	usleep_range(9000, 10000);
+	sw43408_reset(ctx);
 
 	ret = sw43408_program(panel);
 	if (ret)
@@ -208,6 +229,8 @@ static int sw43408_backlight_init(struct sw43408_panel *ctx)
 }
 
 static const struct drm_panel_funcs sw43408_funcs = {
+	.disable = sw43408_disable,
+	.enable = sw43408_enable,
 	.unprepare = sw43408_unprepare,
 	.prepare = sw43408_prepare,
 	.get_modes = sw43408_get_modes,
Signature · 1 line
2.51.0
#11 lore raw

Re: [PATCH v3 4/8] drm/panel: sw43408: Introduce disable/enable functions

Quoted 4 lines · On Tue, Nov 18, 2025 at 12:30:39PM +0100, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

Mostly cleanup, introduced disable, enable, and reset function, which takeover parts of prepare and unprepare suitable for splitting.

Why?

Quoted 6 lines
---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 83 ++++++++++++++++++++------------
 1 file changed, 53 insertions(+), 30 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#12 lore raw

PATCH v3 5/8 drm/panel: sw43408: Remove manual invocation of unprepare at remove

In reply to David Heidelberg

The drm_panel_remove should take care of disable/unprepare. Remove the manual call from the sw43408_remove function.

---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/panel/panel-lg-sw43408.c +0 -4
index e5a8a9bb8d15c..d8481bdafd6dd 100644
@@ -319,10 +319,6 @@ static void sw43408_remove(struct mipi_dsi_device *dsi)
 	struct sw43408_panel *ctx = mipi_dsi_get_drvdata(dsi);
 	int ret;
 
-	ret = sw43408_unprepare(&ctx->base);
-	if (ret < 0)
-		dev_err(&dsi->dev, "failed to unprepare panel: %d\n", ret);
-
 	ret = mipi_dsi_detach(dsi);
 	if (ret < 0)
 		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
Signature · 1 line
2.51.0
#13 lore raw

Re: [PATCH v3 5/8] drm/panel: sw43408: Remove manual invocation of unprepare at remove

Quoted 6 lines · On Tue, Nov 18, 2025 at 12:30:40PM +0100, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

The drm_panel_remove should take care of disable/unprepare. Remove the manual call from the sw43408_remove function.

Missing Fixes: tag

Quoted 24 lines
---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/panel/panel-lg-sw43408.c +0 -4
index e5a8a9bb8d15c..d8481bdafd6dd 100644
@@ -319,10 +319,6 @@ static void sw43408_remove(struct mipi_dsi_device *dsi)
 	struct sw43408_panel *ctx = mipi_dsi_get_drvdata(dsi);
 	int ret;
 
-	ret = sw43408_unprepare(&ctx->base);
-	if (ret < 0)
-		dev_err(&dsi->dev, "failed to unprepare panel: %d\n", ret);
-
 	ret = mipi_dsi_detach(dsi);
 	if (ret < 0)
 		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret);
Signature · 2 lines
-- 
2.51.0
Signature · 2 lines
With best wishes
Dmitry
#14 lore raw

PATCH v3 6/8 drm/panel: sw43408: Switch to devm_regulator_bulk_get_const

In reply to David Heidelberg

Switch to devm_regulator_bulk_get_const() to stop setting the supplies list in probe(), and move the regulator_bulk_data struct in static const.

---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
drivers/gpu/drm/panel/panel-lg-sw43408.c +14 -12
index d8481bdafd6dd..0a902470e03fa 100644
@@ -20,13 +20,18 @@
 #include <drm/display/drm_dsc.h>
 #include <drm/display/drm_dsc_helper.h>
 
-#define NUM_SUPPLIES 2
+static const struct regulator_bulk_data sw43408_supplies[] = {
+	{ .supply = "vddi", /* 1.88V */
+	  .init_load_uA = 62000 },
+	{ .supply = "vpnl", /* 3.0 V */
+	  .init_load_uA = 857000 },
+};
 
 struct sw43408_panel {
 	struct drm_panel base;
 	struct mipi_dsi_device *link;
 
-	struct regulator_bulk_data supplies[NUM_SUPPLIES];
+	struct regulator_bulk_data *supplies;
 
 	struct gpio_desc *reset_gpio;
 
@@ -59,7 +64,7 @@ static int sw43408_unprepare(struct drm_panel *panel)
 
 	gpiod_set_value(sw43408->reset_gpio, 1);
 
-	ret = regulator_bulk_disable(ARRAY_SIZE(sw43408->supplies), sw43408->supplies);
+	ret = regulator_bulk_disable(ARRAY_SIZE(sw43408_supplies), sw43408->supplies);
 
 	return ret;
 }
@@ -152,7 +157,7 @@ static int sw43408_prepare(struct drm_panel *panel)
 	struct sw43408_panel *ctx = to_panel_info(panel);
 	int ret;
 
-	ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
+	ret = regulator_bulk_enable(ARRAY_SIZE(sw43408_supplies), ctx->supplies);
 	if (ret < 0)
 		return ret;
 
@@ -166,7 +171,7 @@ static int sw43408_prepare(struct drm_panel *panel)
 
 poweroff:
 	gpiod_set_value(ctx->reset_gpio, 1);
-	regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
+	regulator_bulk_disable(ARRAY_SIZE(sw43408_supplies), ctx->supplies);
 	return ret;
 }
 
@@ -249,13 +254,10 @@ static int sw43408_add(struct sw43408_panel *ctx)
 	struct device *dev = &ctx->link->dev;
 	int ret;
 
-	ctx->supplies[0].supply = "vddi"; /* 1.88 V */
-	ctx->supplies[0].init_load_uA = 62000;
-	ctx->supplies[1].supply = "vpnl"; /* 3.0 V */
-	ctx->supplies[1].init_load_uA = 857000;
-
-	ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies),
-				      ctx->supplies);
+	ret = devm_regulator_bulk_get_const(dev,
+					    ARRAY_SIZE(sw43408_supplies),
+					    sw43408_supplies,
+					    &ctx->supplies);
 	if (ret < 0)
 		return ret;
 
Signature · 1 line
2.51.0
Reviewed-by on v3 6/8
#15 lore raw

Re: [PATCH v3 6/8] drm/panel: sw43408: Switch to devm_regulator_bulk_get_const

Quoted 10 lines · On Tue, Nov 18, 2025 at 12:30:41PM +0100, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

Switch to devm_regulator_bulk_get_const() to stop setting the supplies list in probe(), and move the regulator_bulk_data struct in static const.

---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#16 lore raw

PATCH v3 7/8 drm/panel: sw43408: Improve wording when reset-gpios aren't available

In reply to David Heidelberg

Choose better wording.

Cosmetic: also inline PTR_ERR.

---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/panel/panel-lg-sw43408.c +2 -2
index 0a902470e03fa..5f5f013a4da75 100644
@@ -263,8 +263,8 @@ static int sw43408_add(struct sw43408_panel *ctx)
 
 	ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
 	if (IS_ERR(ctx->reset_gpio)) {
-		ret = PTR_ERR(ctx->reset_gpio);
-		return dev_err_probe(dev, ret, "cannot get reset gpio\n");
+		return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
+				     "Failed to get reset-gpios\n");
 	}
 
 	ret = sw43408_backlight_init(ctx);
Signature · 1 line
2.51.0
Reviewed-by on v3 7/8
#17 lore raw

Re: [PATCH v3 7/8] drm/panel: sw43408: Improve wording when reset-gpios aren't available

Quoted 11 lines · On Tue, Nov 18, 2025 at 12:30:42PM +0100, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

Choose better wording.

Cosmetic: also inline PTR_ERR.

---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#18 lore raw

PATCH v3 8/8 arm64: dts: qcom: Add support for Pixel 3 and Pixel 3 XL

In reply to David Heidelberg

This adds initial device tree support for the following phones:

- Google Pixel 3 (blueline)
- Google Pixel 3 XL (crosshatch)

Both phone boards use the same identifiers and differ only slightly in their connected peripherals.

Supported functionality includes:
- Debug UART
- UFS
- USB-C (peripheral mode)
- Display (Pixel 3 only, and the driver needs improvements)
- GPU
- Bluetooth
- Wi-Fi

The rmtfs region is allocated using UIO, making it technically "dynamic."

Its address and size can be read from sysfs:

$ cat /sys/class/uio/uio0/name
/sys/class/uio/uio0/maps/map0/addr
0x00000000f2701000
$ cat /sys/class/uio/uio0/maps/map0/size
0x0000000000200000

Like the OnePlus 6, the Pixel 3 requires 1 kB of reserved memory on either side of the rmtfs region to work around an XPU bug that would otherwise cause erroneous violations when accessing the rmtfs_mem region.

---
 arch/arm64/boot/dts/qcom/Makefile                  |   2 +
 .../arm64/boot/dts/qcom/sdm845-google-blueline.dts |  88 ++++
 arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi | 515 +++++++++++++++++++++
 .../boot/dts/qcom/sdm845-google-crosshatch.dts     |  33 ++
 4 files changed, 638 insertions(+)
arch/arm64/boot/dts/qcom/Makefile +2 -0
index 6f34d5ed331c4..c853b28b3b198 100644
@@ -250,6 +250,8 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c.dtb
 sdm845-db845c-navigation-mezzanine-dtbs	:= sdm845-db845c.dtb sdm845-db845c-navigation-mezzanine.dtbo
 
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-db845c-navigation-mezzanine.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-google-crosshatch.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-google-blueline.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyln.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-lg-judyp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sdm845-mtp.dtb
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts new file +88 -0

88 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +515 -0

515 lines not on this page · raw message

arch/arm64/boot/dts/qcom/sdm845-google-crosshatch.dts new file +33 -0
new file mode 100644
index 0000000000000..ca534f0950a19
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+/dts-v1/;
+
+#include "sdm845-google-common.dtsi"
+
+/ {
+	model = "Google Pixel 3 XL";
+	compatible = "google,crosshatch", "qcom,sdm845";
+};
+
+&battery {
+	charge-full-design-microamp-hours = <3480000>;
+	voltage-min-design-microvolt = <3600000>;
+	voltage-max-design-microvolt = <4400000>;
+};
+
+&cont_splash_mem {
+	reg = <0 0x9d400000 0 0x02400000>;
+};
+
+&framebuffer0 {
+	width = <1440>;
+	height = <2960>;
+	stride = <(1440 * 4)>;
+	format = "a8r8g8b8";
+};
+
+&mdss {
+	/* until the panel is prepared */
+	status = "disabled";
+};
+
Signature · 1 line
2.51.0
#19 lore raw

Re: [PATCH v3 8/8] arm64: dts: qcom: Add support for Pixel 3 and Pixel 3 XL

Quoted 9 lines · On 11/18/25 12:30 PM, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

This adds initial device tree support for the following phones:

- Google Pixel 3 (blueline)
- Google Pixel 3 XL (crosshatch)

Both phone boards use the same identifiers and differ only slightly in their connected peripherals.

[...]

Review

Quoted 3 lines

+&cont_splash_mem {

(quoted diff) +2 -0
+	reg = <0 0x9d400000 0 0x02400000>;
+};

You override it to the same value on both devices, keep it in common

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts line 26

Quoted 6 lines
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts new file +6 -0
+
+&framebuffer0 {
+	width = <1080>;
+	height = <2160>;
+	stride = <(1080 * 4)>;
+	format = "a8r8g8b8";

The format is mandated by the UEFI specification and won't change too

[...]

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts line 75

Quoted 10 lines

+&tlmm {

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts new file +9 -0
+	panel_te_pin: panel-te-state {
+		pins = "gpio12";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	panel_reset_pins: panel-active-state {
+		pins = "gpio6";

Pin entries would be best sorted by the GPIO index:

https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-nodes

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts line 88

Quoted 13 lines
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts new file +13 -0
+		function = "gpio";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	panel_suspend: panel-suspend-state {
+		pins = "gpio6";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+};

Stray \n above

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 134

Quoted 2 lines

+&adsp_pas {

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +1 -0
+	firmware-name = "qcom/sdm845/Google/blueline/adsp.mbn";

Sorry if I asked this before, but are the binaries identical for both devices?

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 228

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +10 -0
+		vreg_l14a_1p88: ldo14 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-boot-on;
+			/*
+			 * We can't properly bring the panel back if it gets turned off
+			 * so keep it's regulators always on for now.
+			 */
+			regulator-always-on;

Is that still the case with your fixes to the panel driver?

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 290

Quoted 11 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +11 -0
+
+		vreg_l28a_3p0: ldo28 {
+			regulator-min-microvolt = <2856000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+			regulator-boot-on;
+			/*
+			 * We can't properly bring the panel back if it gets turned off
+			 * so keep it's regulators always on for now.
+			 */
+			regulator-always-on;

ditto

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 302

Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +9 -0
+	regulators-1 {
+		compatible = "qcom,pmi8998-rpmh-regulators";
+		qcom,pmic-id = "b";
+
+		vdd-bob-supply = <&vph_pwr>;
+
+		vreg_bob: bob {
+			regulator-min-microvolt = <3312000>;
+			regulator-max-microvolt = <3600000>;

This is a very broad range, what voltage does it need to be?

[...]

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 411

Quoted 2 lines

+&tlmm {

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +1 -0
+	gpio-reserved-ranges = < 0 4>, /* SPI (Intel MNH Pixel Visual Core) */

stray space before '0'

Konrad

#20 lore raw

Re: [PATCH v3 8/8] arm64: dts: qcom: Add support for Pixel 3 and Pixel 3 XL

Quoted 11 lines · Konrad Dybcio
Quoted 9 lines · On 11/18/25 12:30 PM, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

This adds initial device tree support for the following phones:

- Google Pixel 3 (blueline)
- Google Pixel 3 XL (crosshatch)

Both phone boards use the same identifiers and differ only slightly in their connected peripherals.

Quoted 7 lines

[...]

Review

Quoted 3 lines

+&cont_splash_mem {

(quoted diff) +2 -0
+	reg = <0 0x9d400000 0 0x02400000>;
+};

You override it to the same value on both devices, keep it in common

Done.

Quoted 10 lines

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts line 26

Quoted 7 lines
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts new file +6 -0
+
+&framebuffer0 {
+	width = <1080>;
+	height = <2160>;
+	stride = <(1080 * 4)>;
+	format = "a8r8g8b8";

The format is mandated by the UEFI specification and won't change too

Done.

Quoted 15 lines

[...]

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts line 75

Quoted 10 lines

+&tlmm {

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts new file +9 -0
+	panel_te_pin: panel-te-state {
+		pins = "gpio12";
+		function = "mdp_vsync";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+	panel_reset_pins: panel-active-state {
+		pins = "gpio6";

Pin entries would be best sorted by the GPIO index:

Quoted 3 lines

https://docs.kernel.org/devicetree/bindings/dts-coding-style.html#order-of-nodes

Done.

Quoted 16 lines

arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts line 88

Quoted 13 lines
arch/arm64/boot/dts/qcom/sdm845-google-blueline.dts new file +13 -0
+		function = "gpio";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	panel_suspend: panel-suspend-state {
+		pins = "gpio6";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
+};

Stray \n above

Quoted 7 lines

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 134

Quoted 2 lines

+&adsp_pas {

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +1 -0
+	firmware-name = "qcom/sdm845/Google/blueline/adsp.mbn";

Sorry if I asked this before, but are the binaries identical for both devices?

Yes, there is only one firmware, which crosshatch has different, but all listed in the initial bringup are used for both.

To add, crosshatch was somehow not that popular device, so as I've been suggested in u-boot discussion, I would love to keep blueline everywhere.

One exception is LineageOS kernels, where they go by name crosshatch, but again for the both phones.

Quoted 17 lines

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 228

Quoted 10 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +10 -0
+		vreg_l14a_1p88: ldo14 {
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-boot-on;
+			/*
+			 * We can't properly bring the panel back if it gets turned off
+			 * so keep it's regulators always on for now.
+			 */
+			regulator-always-on;

Is that still the case with your fixes to the panel driver?

Quoted 1 line

[...]

Sadly yes, but I think Petr Hodina has idea what needs to be addressed, so likely before 6.19 this will get addressed.

Quoted 17 lines

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 290

Quoted 12 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +11 -0
+
+		vreg_l28a_3p0: ldo28 {
+			regulator-min-microvolt = <2856000>;
+			regulator-max-microvolt = <3008000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_LPM>;
+			regulator-boot-on;
+			/*
+			 * We can't properly bring the panel back if it gets turned off
+			 * so keep it's regulators always on for now.
+			 */
+			regulator-always-on;

ditto

[...]

Quoted 11 lines

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 302

Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +9 -0
+	regulators-1 {
+		compatible = "qcom,pmi8998-rpmh-regulators";
+		qcom,pmic-id = "b";
+
+		vdd-bob-supply = <&vph_pwr>;
+
+		vreg_bob: bob {
+			regulator-min-microvolt = <3312000>;
+			regulator-max-microvolt = <3600000>;

This is a very broad range, what voltage does it need to be?

I think it's possible, I just randomly picked bob regs, and f.e. qcs6490-radxa-dragon-q6a.dts has even greater range.

Downstream set it also this way on blueline/crosshatch.

Quoted 9 lines

[...]

[...]

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi line 411

Quoted 2 lines

+&tlmm {

arch/arm64/boot/dts/qcom/sdm845-google-common.dtsi new file +1 -0
+	gpio-reserved-ranges = < 0 4>, /* SPI (Intel MNH Pixel Visual Core) */

stray space before '0'

done

Quoted 2 lines

Konrad

Signature · 1 line
David Heidelberg
#21 lore raw

Re: [PATCH v3 8/8] arm64: dts: qcom: Add support for Pixel 3 and Pixel 3 XL

Quoted 8 lines · David Heidelberg
Quoted 7 lines · Konrad Dybcio
Quoted 6 lines · On 11/18/25 12:30 PM, David Heidelberg via B4 Relay wrote:

From: David Heidelberg <[email protected]>

This adds initial device tree support for the following phones:

  - Google Pixel 3 (blueline)
  - Google Pixel 3 XL (crosshatch)

[...]

Quoted 11 lines
Quoted 5 lines
Quoted 2 lines

+&adsp_pas {
+    firmware-name = "qcom/sdm845/Google/blueline/adsp.mbn";

Sorry if I asked this before, but are the binaries identical for both devices?

Yes, there is only one firmware, which crosshatch has different, but all listed in the initial bringup are used for both.

To add, crosshatch was somehow not that popular device, so as I've been suggested in u-boot discussion, I would love to keep blueline everywhere.

One exception is LineageOS kernels, where they go by name crosshatch, but again for the both phones.

Google seems to suggest crosshatch is the 'base'

https://android.googlesource.com/device/google/crosshatch/+/refs/heads/main

Ultimately if none of the Googlers (hello +Doug) care that much, it's up to you to choose

Konrad

#22 lore raw

Re: [PATCH v3 8/8] arm64: dts: qcom: Add support for Pixel 3 and Pixel 3 XL

Hi,

Quoted 5 lines · Konrad Dybcio
Quoted 5 lines

Yes, there is only one firmware, which crosshatch has different, but all listed in the initial bringup are used for both.

To add, crosshatch was somehow not that popular device, so as I've been suggested in u-boot discussion, I would love to keep blueline everywhere.

Quoted 8 lines
Quoted 1 line

One exception is LineageOS kernels, where they go by name crosshatch, but again for the both phones.

Google seems to suggest crosshatch is the 'base'

https://android.googlesource.com/device/google/crosshatch/+/refs/heads/main

Ultimately if none of the Googlers (hello +Doug) care that much, it's up to you to choose

I haven't dug into this patch series and don't personally know a lot of the history of older Pixel code names before ~Pixel 6, but in general I wouldn't expect Google to have much of an opinion about Pixel 3 support upstream. I'd say leaving it up to the people doing the work sounds good to me. :-)

-Doug