Support for the Pixel 3a XL with the Tianma panel
Subsystems (6)
cover Support for the Pixel 3a XL with the Tianma panel
This expands Pixel 3a support to the Pixel 3a XL, starting with one of the panel variants. The Pixel 3a XL has two variants with panels from Samsung or from Tianma/Novatek.
This series depends on the IMX355 front camera devicetree patches.
Richard Acayan (6):
dt-bindings: arm: qcom: document google,bonito-tianma board
dt-bindings: panel-simple-dsi: add nt37700f compatible drm/panel: Add Novatek/Tianma NT37700F panel
arm64: dts: qcom: sdm670-google-sargo: add touchscreen and display
labels
arm64: dts: qcom: sdm670-google: add common device tree include
arm64: dts: qcom: add support for pixel 3a xl with the tianma panel
.../devicetree/bindings/arm/qcom.yaml | 6 +
.../display/panel/panel-simple-dsi.yaml | 2 +
arch/arm64/boot/dts/qcom/Makefile | 1 +
.../dts/qcom/sdm670-google-bonito-tianma.dts | 38 +
...le-sargo.dts => sdm670-google-common.dtsi} | 23 +-
.../boot/dts/qcom/sdm670-google-sargo.dts | 710 +-----------------
drivers/gpu/drm/panel/Kconfig | 9 +
drivers/gpu/drm/panel/Makefile | 1 +
.../gpu/drm/panel/panel-novatek-nt37700f.c | 294 ++++++++
9 files changed, 374 insertions(+), 710 deletions(-)
create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-bonito-tianma.dts
copy arch/arm64/boot/dts/qcom/{sdm670-google-sargo.dts => sdm670-google-common.dtsi} (97%)
create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt37700f.cSignature · 1 line
2.53.0
PATCH 1/6 dt-bindings: arm: qcom: document google, bonito-tianma board
The google,bonito-sdc board compatible represents the Google Pixel 3a XL with a Tianma/Novatek NT37700F panel. Document it in the bindings.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/arm/qcom.yaml +6 -0
@@ -831,6 +831,12 @@ properties: - google,sargo - const: qcom,sdm670 + - items: + - enum: + - google,bonito-tianma + - const: google,bonito + - const: qcom,sdm670 + - items: - enum: - qcom,sdx55-mtp
Signature · 1 line
2.53.0
Re: [PATCH 1/6] dt-bindings: arm: qcom: document google, bonito-tianma board
Quoted 1 line · Richard Acayan
The google,bonito-sdc board compatible represents the Google Pixel 3a XL
I do not see sdc anywhere in the diff.
Quoted 1 line
with a Tianma/Novatek NT37700F panel. Document it in the bindings.
What is bonito? Why bonito is compatible with sdm670?
Best regards,
Krzysztof
Re: [PATCH 1/6] dt-bindings: arm: qcom: document google, bonito-tianma board
Quoted 8 lines · Krzysztof Kozlowski
Quoted 1 line · Richard Acayan
The google,bonito-sdc board compatible represents the Google Pixel 3a XL
I do not see sdc anywhere in the diff.
Quoted 1 line
with a Tianma/Novatek NT37700F panel. Document it in the bindings.
What is bonito? Why bonito is compatible with sdm670?
bonito is a name for the Pixel 3a XL devices (like sorgo and other google names).
Quoted 3 lines
Best regards,
Krzysztof
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 1/6] dt-bindings: arm: qcom: document google, bonito-tianma board
Quoted 4 lines · Dmitry Baryshkov
Quoted 3 lines · Krzysztof Kozlowski
Quoted 1 line · Richard Acayan
The google,bonito-sdc board compatible represents the Google Pixel 3a XL
Quoted 8 lines
Quoted 5 lines
I do not see sdc anywhere in the diff.
Quoted 1 line
with a Tianma/Novatek NT37700F panel. Document it in the bindings.
What is bonito? Why bonito is compatible with sdm670?
bonito is a name for the Pixel 3a XL devices (like sorgo and other google names).
git grep bonito gives me something quite different, so commit msg must explain the name (except correcting other mistakes).
Best regards,
Krzysztof
PATCH 2/6 dt-bindings: panel-simple-dsi: add nt37700f compatible
In reply to Richard AcayanAdd the compatible for the NT37700F panel found on the Pixel 3a XL.
--- .../devicetree/bindings/display/panel/panel-simple-dsi.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml +2 -0
@@ -49,6 +49,8 @@ properties: - lg,lh500wx1-sd03 # Lincoln LCD197 5" 1080x1920 LCD panel - lincolntech,lcd197 + # Novatek NT37700F 1080x2160 AMOLED panel + - novatek,nt37700f # One Stop Displays OSD101T2587-53TS 10.1" 1920x1200 panel - osddisplays,osd101t2587-53ts # Panasonic 10" WUXGA TFT LCD panel
Signature · 1 line
2.53.0
Re: [PATCH 2/6] dt-bindings: panel-simple-dsi: add nt37700f compatible
Quoted 7 lines · Richard Acayan
Add the compatible for the NT37700F panel found on the Pixel 3a XL.
Signed-off-by Richard Acayan <[email protected]>--- .../devicetree/bindings/display/panel/panel-simple-dsi.yaml | 2 ++ 1 file changed, 2 insertions(+)
Best regards,
Krzysztof
PATCH 3/6 drm/panel: Add Novatek/Tianma NT37700F panel
In reply to Richard AcayanSome Pixel 3a XL devices have a Tianma panel. Add support for it, with the aid of linux-mdss-dsi-panel-driver-generator.
--- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-novatek-nt37700f.c | 294 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt37700f.c
drivers/gpu/drm/panel/Kconfig +9 -0
@@ -553,6 +553,15 @@ config DRM_PANEL_NOVATEK_NT36672E LCD panel module. The panel has a resolution of 1080x2408 and uses 24 bit RGB per pixel. +config DRM_PANEL_NOVATEK_NT37700F + tristate "Novatek NT37700F DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Novatek NT37700F DSI + panel module. The panel has a resolution of 1080x2160. + config DRM_PANEL_NOVATEK_NT37801 tristate "Novatek NT37801/NT37810 AMOLED DSI panel" depends on OF
drivers/gpu/drm/panel/Makefile +1 -0
@@ -54,6 +54,7 @@ obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35950) += panel-novatek-nt35950.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36523) += panel-novatek-nt36523.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672A) += panel-novatek-nt36672a.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672E) += panel-novatek-nt36672e.o +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37700F) += panel-novatek-nt37700f.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37801) += panel-novatek-nt37801.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) += panel-novatek-nt39016.o obj-$(CONFIG_DRM_PANEL_MANTIX_MLAF057WE51) += panel-mantix-mlaf057we51.o
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +294 -0
294 lines not on this page · raw message
Signature · 1 line
2.53.0
Re: [PATCH 3/6] drm/panel: Add Novatek/Tianma NT37700F panel
Quoted 107 lines · Richard Acayan
Some Pixel 3a XL devices have a Tianma panel. Add support for it, with the aid of linux-mdss-dsi-panel-driver-generator.
Signed-off-by Richard Acayan <[email protected]>--- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-novatek-nt37700f.c | 294 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt37700f.cdrivers/gpu/drm/panel/Kconfig +9
-0@@ -553,6 +553,15 @@ config DRM_PANEL_NOVATEK_NT36672E LCD panel module. The panel has a resolution of 1080x2408 and uses 24 bit RGB per pixel. +config DRM_PANEL_NOVATEK_NT37700F + tristate "Novatek NT37700F DSI panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Novatek NT37700F DSI + panel module. The panel has a resolution of 1080x2160. + config DRM_PANEL_NOVATEK_NT37801 tristate "Novatek NT37801/NT37810 AMOLED DSI panel" depends on OFdrivers/gpu/drm/panel/Makefile +1
-0@@ -54,6 +54,7 @@ obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35950) += panel-novatek-nt35950.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36523) += panel-novatek-nt36523.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672A) += panel-novatek-nt36672a.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672E) += panel-novatek-nt36672e.o +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37700F) += panel-novatek-nt37700f.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37801) += panel-novatek-nt37801.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) += panel-novatek-nt39016.o obj-$(CONFIG_DRM_PANEL_MANTIX_MLAF057WE51) += panel-mantix-mlaf057we51.odrivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +57
-0@@ -0,0 +1,294 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* +* Copyright (c) 2024, The Linux Foundation. All rights reserved. +* Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree: +* Copyright (c) 2013, The Linux Foundation. All rights reserved. +*/ + +#include <linux/backlight.h> +#include <linux/delay.h> +#include <linux/gpio/consumer.h> +#include <linux/module.h> +#include <linux/of.h> + +#include <video/mipi_display.h> + +#include <drm/drm_mipi_dsi.h> +#include <drm/drm_modes.h> +#include <drm/drm_panel.h> +#include <drm/drm_probe_helper.h> + +struct nt37700f_tianma { +struct drm_panel panel; +struct mipi_dsi_device *dsi; +struct gpio_desc *reset_gpio; +}; + +static inline +struct nt37700f_tianma *to_nt37700f_tianma (struct drm_panel *panel) +{ + return container_of(panel, struct nt37700f_tianma, panel); +} + +static void nt37700f_tianma_reset (struct nt37700f_tianma *ctx) +{ +gpiod_set_value_cansleep (ctx->reset_gpio,1 ); +usleep_range (1000 ,2000 ); +gpiod_set_value_cansleep (ctx->reset_gpio,0 ); +usleep_range (10000 ,11000 ); +} + +static int nt37700f_tianma_on (struct nt37700f_tianma *ctx) +{ +struct mipi_dsi_device *dsi = ctx->dsi; +struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi }; + +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf0 ,0x55 ,0xaa ,0x52 ,0x08 ,0x00 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xc0 ,0x56 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xca ,0x52 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0x6f ,0x06 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xb5 ,0x2b ,0x1a ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf0 ,0x55 ,0xaa ,0x52 ,0x08 ,0x01 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xcd ,0x04 ,0x82 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf0 ,0x55 ,0xaa ,0x52 ,0x08 ,0x02 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xcc ,0x00 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xff ,0xaa ,0x55 ,0xa5 ,0x80 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0x6f ,0x55 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf6 ,0x00 );
drivers/gpu/drm/panel/panel-novatek-nt37700f.c line 67
Quoted 10 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +10
-0+mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0x6f ,0x56 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf6 ,0x00 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xff ,0xaa ,0x55 ,0xa5 ,0x81 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0x6f ,0x07 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf3 ,0x07 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0x6f ,0x05 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf3 ,0x25 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0x90 ,0x01 ); + +mipi_dsi_dcs_set_column_address_multi (&dsi_ctx,0x0000 ,0x0437 );
1080 - 1
drivers/gpu/drm/panel/panel-novatek-nt37700f.c line 68
Quoted 1 line
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +1
-0+mipi_dsi_dcs_set_page_address_multi (&dsi_ctx,0x0000 ,0x086f );
2160 - 1
Quoted 17 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +17
-0+mipi_dsi_dcs_write_seq_multi (&dsi_ctx,MIPI_DCS_WRITE_CONTROL_DISPLAY ,0x20 ); +mipi_dsi_dcs_set_tear_on_multi (&dsi_ctx,MIPI_DSI_DCS_TEAR_MODE_VBLANK ); + +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf0 ,0x55 ,0xaa ,0x52 ,0x08 ,0x00 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xc0 ,0x56 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf0 ,0x55 ,0xaa ,0x52 ,0x08 ,0x02 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xcd ,0x00 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xf0 ,0x55 ,0xaa ,0x52 ,0x08 ,0x04 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xd0 ,0x11 ,0x64 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0x6f ,0x09 ); +mipi_dsi_dcs_write_seq_multi (&dsi_ctx,0xb1 ,0x20 ); + +mipi_dsi_dcs_exit_sleep_mode_multi (&dsi_ctx); +mipi_dsi_msleep (&dsi_ctx,120 ); +mipi_dsi_dcs_set_display_on_multi (&dsi_ctx); + +return dsi_ctx.accum_err;
drivers/gpu/drm/panel/panel-novatek-nt37700f.c line 95
Quoted 10 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +10
-0+} + +static int nt37700f_tianma_disable (struct drm_panel *panel) +{ +struct nt37700f_tianma *ctx =to_nt37700f_tianma (panel); +struct mipi_dsi_device *dsi = ctx->dsi; +struct device *dev = &dsi->dev; +int ret; + + ret =mipi_dsi_dcs_set_display_off (dsi);
Please use _multi helpers here too.
Quoted 80 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +80
-0+if (ret <0 ) { +dev_err (dev,"Failed to set display off: %d\n" , ret); +return ret; + } +msleep (50 ); + + ret =mipi_dsi_dcs_enter_sleep_mode (dsi); +if (ret <0 ) { +dev_err (dev,"Failed to enter sleep mode: %d\n" , ret); +return ret; + } +msleep (100 ); + +return 0 ; +} + +static int nt37700f_tianma_prepare (struct drm_panel *panel) +{ +struct nt37700f_tianma *ctx =to_nt37700f_tianma (panel); +struct device *dev = &ctx->dsi->dev; +int ret; + +nt37700f_tianma_reset (ctx); + + ret =nt37700f_tianma_on (ctx); +if (ret <0 ) { +dev_err (dev,"Failed to initialize panel: %d\n" , ret); +gpiod_set_value_cansleep (ctx->reset_gpio,1 ); +return ret; + } + +return 0 ; +} + +static int nt37700f_tianma_unprepare (struct drm_panel *panel) +{ +struct nt37700f_tianma *ctx =to_nt37700f_tianma (panel); + +gpiod_set_value_cansleep (ctx->reset_gpio,1 ); + +return 0 ; +} + +static const struct drm_display_mode nt37700f_tianma_mode = { + .clock = (1080 +32 +32 +98 ) * (2160 +32 +4 +98 ) *60 /1000 , + .hdisplay =1080 , + .hsync_start =1080 +32 , + .hsync_end =1080 +32 +32 , + .htotal =1080 +32 +32 +98 , + .vdisplay =2160 , + .vsync_start =2160 +32 , + .vsync_end =2160 +32 +4 , + .vtotal =2160 +32 +4 +98 , + .width_mm =69 , + .height_mm =137 , + .type =DRM_MODE_TYPE_DRIVER , +}; + +static int nt37700f_tianma_get_modes (struct drm_panel *panel, +struct drm_connector *connector) +{ +return drm_connector_helper_get_modes_fixed (connector, &nt37700f_tianma_mode); +} + +static const struct drm_panel_funcs nt37700f_tianma_panel_funcs = { + .prepare = nt37700f_tianma_prepare, + .unprepare = nt37700f_tianma_unprepare, + .disable = nt37700f_tianma_disable, + .get_modes = nt37700f_tianma_get_modes, +}; + +static int nt37700f_tianma_bl_update_status (struct backlight_device *bl) +{ +struct mipi_dsi_device *dsi =bl_get_data (bl); +u16 brightness =backlight_get_brightness (bl); +int ret; + + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM ; + + ret =mipi_dsi_dcs_set_display_brightness_large (dsi, brightness);
drivers/gpu/drm/panel/panel-novatek-nt37700f.c line 185
Quoted 10 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +10
-0+if (ret <0 ) +return ret; + + dsi->mode_flags |=MIPI_DSI_MODE_LPM ; + +return 0 ; +} + +// TODO: Check if /sys/class/backlight/.../actual_brightness actually returns +// correct values. If not, remove this function.
Any chance of checking it?
Quoted 17 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +17
-0+static int nt37700f_tianma_bl_get_brightness (struct backlight_device *bl) +{ +struct mipi_dsi_device *dsi =bl_get_data (bl); +u16 brightness; +int ret; + + dsi->mode_flags &= ~MIPI_DSI_MODE_LPM ; + + ret =mipi_dsi_dcs_get_display_brightness_large (dsi, &brightness); +if (ret <0 ) +return ret; + + dsi->mode_flags |=MIPI_DSI_MODE_LPM ; + +return brightness; +} +
Signature · 2 lines
With best wishes Dmitry
Yifei Zhan
Tested-byRe: [PATCH 3/6] drm/panel: Add Novatek/Tianma NT37700F panel
Quoted 4 lines · Dmitry Baryshkov
Quoted 3 lines · Richard Acayan
Some Pixel 3a XL devices have a Tianma panel. Add support for it, with the aid of linux-mdss-dsi-panel-driver-generator.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Richard Acayan <[email protected]>--- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-novatek-nt37700f.c | 294 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt37700f.c
<--cut-->
Quoted 5 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c line 185
Quoted 3 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +2
-0+// TODO: Check if /sys/class/backlight/.../actual_brightness actually returns +// correct values. If not, remove this function. Any chance of checking it?
I tested this with my Pixel3A XL with tianma panel, it worked correctly. /sys/class/backlight/.../actual_brightness returns same value as /sys/class/backlight/.../brightness and I'm able to change brightness level.
Quoted 1 line
Re: [PATCH 3/6] drm/panel: Add Novatek/Tianma NT37700F panel
Quoted 23 lines · Yifei Zhan
Quoted 4 lines · Dmitry Baryshkov
Quoted 3 lines · Richard Acayan
Some Pixel 3a XL devices have a Tianma panel. Add support for it, with the aid of linux-mdss-dsi-panel-driver-generator.
Quoted 8 lines
Quoted 8 lines
Signed-off-by Richard Acayan <[email protected]>--- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-novatek-nt37700f.c | 294 ++++++++++++++++++ 3 files changed, 304 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt37700f.c<--cut-->
Quoted 5 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c line 185
Quoted 3 lines
drivers/gpu/drm/panel/panel-novatek-nt37700f.c new file +2
-0+// TODO: Check if /sys/class/backlight/.../actual_brightness actually returns +// correct values. If not, remove this function. Any chance of checking it?
Quoted 5 lines
I tested this with my Pixel3A XL with tianma panel, it worked correctly.
/sys/class/backlight/.../actual_brightnessreturns same value as/sys/class/backlight/.../brightnessand I'm able to change brightness level.
Then TODO needs to be dropped.
Quoted 2 lines
Tested-by Yifei Zhan <[email protected]>Quoted 1 line
Signature · 2 lines
With best wishes Dmitry
PATCH 4/6 arm64: dts: qcom: sdm670-google-sargo: add touchscreen and display labels
In reply to Richard AcayanThe touchscreen and framebuffer can have different resolutions on the Pixel 3a and 3a XL. Label them so the resolutions can be modified, in anticipation of the addition of the Pixel 3a XL.
--- arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts +3 -3
@@ -48,7 +48,7 @@ chosen { #size-cells = <2>; ranges; - framebuffer@9c000000 { + framebuffer: framebuffer@9c000000 { compatible = "simple-framebuffer"; reg = <0 0x9c000000 0 (1080 * 2220 * 4)>; width = <1080>;
@@ -516,7 +516,7 @@ rmi4-f01@1 { syna,nosleep-mode = <1>; }; - rmi4-f12@12 { + rmi4_f12: rmi4-f12@12 { reg = <0x12>; touchscreen-x-mm = <62>; touchscreen-y-mm = <127>;
@@ -533,7 +533,7 @@ &mdss_dsi0 { vdda-supply = <&vreg_l1a_1p225>; status = "okay"; - panel@0 { + panel: panel@0 { compatible = "samsung,s6e3fa7-ams559nk06"; reg = <0>;
Signature · 1 line
2.53.0
PATCH 5/6 arm64: dts: qcom: sdm670-google: add common device tree include
In reply to Richard AcayanThe Pixel 3a XL can be supported by reusing most of the device tree from the Pixel 3a. Move the common elements to a common device tree include like with other devices.
---
...le-sargo.dts => sdm670-google-common.dtsi} | 17 +-
.../boot/dts/qcom/sdm670-google-sargo.dts | 710 +-----------------
2 files changed, 20 insertions(+), 707 deletions(-)
copy arch/arm64/boot/dts/qcom/{sdm670-google-sargo.dts => sdm670-google-common.dtsi} (97%)arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi renamed from arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts +4 -13
@@ -6,8 +6,6 @@ * Copyright (c) 2022, Richard Acayan. All rights reserved. */ -/dts-v1/; - #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/leds/common.h>
@@ -28,9 +26,6 @@ /delete-node/ &gpu_mem; / { - model = "Google Pixel 3a"; - compatible = "google,sargo", "qcom,sdm670"; - aliases { }; battery: battery {
@@ -38,7 +33,6 @@ battery: battery { voltage-min-design-microvolt = <3312000>; voltage-max-design-microvolt = <4400000>; - charge-full-design-microamp-hours = <3000000>; }; chosen {
@@ -50,11 +44,8 @@ chosen { framebuffer: framebuffer@9c000000 { compatible = "simple-framebuffer"; - reg = <0 0x9c000000 0 (1080 * 2220 * 4)>; - width = <1080>; - height = <2220>; - stride = <(1080 * 4)>; format = "a8r8g8b8"; + status = "disabled"; }; };
@@ -518,8 +509,6 @@ rmi4-f01@1 { rmi4_f12: rmi4-f12@12 { reg = <0x12>; - touchscreen-x-mm = <62>; - touchscreen-y-mm = <127>; syna,sensor-type = <1>; }; };
@@ -534,7 +523,7 @@ &mdss_dsi0 { status = "okay"; panel: panel@0 { - compatible = "samsung,s6e3fa7-ams559nk06"; + // compatible is provided in specific device trees reg = <0>; reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
@@ -544,6 +533,8 @@ panel: panel@0 { power-supply = <&vreg_l6b_3p3>; + status = "disabled"; + port { panel_in: endpoint { remote-endpoint = <&mdss_dsi0_out>;
arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts +16 -694
731 lines not on this page · raw message
Signature · 1 line
2.53.0
Re: [PATCH 5/6] arm64: dts: qcom: sdm670-google: add common device tree include
Quoted 6 lines · Richard Acayan
The Pixel 3a XL can be supported by reusing most of the device tree from the Pixel 3a. Move the common elements to a common device tree include like with other devices.
Signed-off-by Richard Acayan <[email protected]>---
[...]
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi chosen { · line 48
Quoted 9 lines
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi renamed from arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts +1
-4framebuffer: framebuffer@9c000000 { compatible = "simple-framebuffer"; - reg = <0 0x9c000000 0 (1080 * 2220 * 4)>; - width = <1080>; - height = <2220>; - stride = <(1080 * 4)>; format = "a8r8g8b8"; + status = "disabled";
why?
[...]
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi &mdss_dsi0 { · line 526
Quoted 3 lines
arch/arm64/boot/dts/qcom/sdm670-google-common.dtsi renamed from arch/arm64/boot/dts/qcom/sdm670-google-sargo.dts +1
-1panel: panel@0 { - compatible = "samsung,s6e3fa7-ams559nk06"; + // compatible is provided in specific device trees
/* C-style comment, please */
lg otherwise
Konrad
Re: [PATCH 5/6] arm64: dts: qcom: sdm670-google: add common device tree include
In reply to Richard AcayanQuoted 11 lines · Richard Acayan
The Pixel 3a XL can be supported by reusing most of the device tree from the Pixel 3a. Move the common elements to a common device tree include like with other devices.
Signed-off-by Richard Acayan <[email protected]>--- ...le-sargo.dts => sdm670-google-common.dtsi} | 17 +- .../boot/dts/qcom/sdm670-google-sargo.dts | 710 +----------------- 2 files changed, 20 insertions(+), 707 deletions(-) copy arch/arm64/boot/dts/qcom/{sdm670-google-sargo.dts => sdm670-google-common.dtsi} (97%)
Signature · 2 lines
With best wishes Dmitry
PATCH 6/6 arm64: dts: qcom: add support for pixel 3a xl with the tianma panel
In reply to Richard AcayanSome Pixel 3a XL devices have a Tianma panel. Add the separate device tree for this to support these other devices.
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../dts/qcom/sdm670-google-bonito-tianma.dts | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sdm670-google-bonito-tianma.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -245,6 +245,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm632-motorola-ocean.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm636-sony-xperia-ganges-mermaid.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm660-xiaomi-lavender.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm670-google-sargo.dtb +dtb-$(CONFIG_ARCH_QCOM) += sdm670-google-bonito-tianma.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c.dtb sdm845-db845c-navigation-mezzanine-dtbs := sdm845-db845c.dtb sdm845-db845c-navigation-mezzanine.dtbo
arch/arm64/boot/dts/qcom/sdm670-google-bonito-tianma.dts new file +38 -0
@@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Device tree for Google Pixel 3a XL with the panel connected to the Samsung + * Display Controller. + * + * Copyright (c) 2023-2024, Richard Acayan. All rights reserved. + */ + +/dts-v1/; + +#include "sdm670-google-common.dtsi" + +/ { + model = "Google Pixel 3a XL (with Tianma panel)"; + compatible = "google,bonito-tianma", "google,bonito", "qcom,sdm670"; +}; + +&battery { + charge-full-design-microamp-hours = <3700000>; +}; + +&framebuffer { + reg = <0 0x9c000000 0 (1080 * 2160 * 4)>; + width = <1080>; + height = <2160>; + stride = <(1080 * 4)>; + status = "okay"; +}; + +&panel { + compatible = "novatek,nt37700f"; + status = "okay"; +}; + +&rmi4_f12 { + touchscreen-x-mm = <69>; + touchscreen-y-mm = <137>; +};
Signature · 1 line
2.53.0
Re: [PATCH 6/6] arm64: dts: qcom: add support for pixel 3a xl with the tianma panel
Quoted 2 lines · Richard Acayan
Some Pixel 3a XL devices have a Tianma panel. Add the separate device tree for this to support these other devices.
There's not a device upstream for any kind of Pixel 3a XL - should we anticipate a non-Tianma-panel one too (i.e. are you sure those are out in the wild)?
Konrad
Re: [PATCH 6/6] arm64: dts: qcom: add support for pixel 3a xl with the tianma panel
Quoted 7 lines · Konrad Dybcio
Quoted 2 lines · Richard Acayan
Some Pixel 3a XL devices have a Tianma panel. Add the separate device tree for this to support these other devices.
There's not a device upstream for any kind of Pixel 3a XL - should we anticipate a non-Tianma-panel one too (i.e. are you sure those are out in the wild)?
Yes, some postmarketOS community members self-declared as owning the variant with the SDC (Samsung) panel[1].
Re: [PATCH 6/6] arm64: dts: qcom: add support for pixel 3a xl with the tianma panel
Quoted 5 lines · Richard Acayan
Quoted 4 lines · Konrad Dybcio
Quoted 2 lines · Richard Acayan
Some Pixel 3a XL devices have a Tianma panel. Add the separate device tree for this to support these other devices.
Quoted 9 lines
Quoted 3 lines
There's not a device upstream for any kind of Pixel 3a XL - should we anticipate a non-Tianma-panel one too (i.e. are you sure those are out in the wild)?
Yes, some postmarketOS community members self-declared as owning the variant with the SDC (Samsung) panel[1].
Ok, please mention in the commit message that the panel is dual-sourced and the other variant has a samsung display then
Konrad