* [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel)
@ 2025-10-16 16:16 David Heidelberg via B4 Relay
2025-10-16 16:16 ` [PATCH v3 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
` (7 more replies)
0 siblings, 8 replies; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:16 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg, Konrad Dybcio
First, proper bindings for the DDIC and panel are added.
Next, the VCI and POC supplies are introduced for the OnePlus 6 and 6T
phones, and the OnePlus 6T device tree is extended with more precise
compatible string.
Finally, a new DDIC driver is introduced along with the AMS641RW panel
initialization sequences.
This patchset enables the display on the OnePlus 6T smartphone.
Since the display node is shared between the OnePlus 6 and 6T,
the following warning appears:
..sdm845-oneplus-enchilada.dtb: panel@0 (samsung,sofef00): 'poc-supply', 'te-gpios', 'vci-supply' do not match any of the regexes: '^pinctrl-[0-9]+$'
This will be addressed in a follow-up patch, as the SOFEF00 DDIC also
requires additional overhaul to properly initialize and function in mainline.
Last two patches are not needed for panel to work, it's up to maintainer
decision to merge them with the series or not.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Changes in v3:
- Use mipi_dsi_dcs_set_display_brightness_large (Konrad)
- added legacy compatible samsung,s6e3fc2x01 into the driver (Dmitry)
- extended compatible string to
"samsung,s6e3fc2x01-ams641rw", "samsung,s6e3fc2x01" (Dmitry)
- Brought back
"dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible"
- Link to v2: https://lore.kernel.org/r/20251008-s6e3fc2x01-v2-0-21eca1d5c289@ixit.cz
Changes in v2:
- Dropped the gpio reset polarity change as suggested (Jens and Dmitry).
- Fixed unused warnings (kernel test robot).
- Added a pinctrl config for the VCI and POC supply.
- Removed patch "dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible"
while the compatible is used in device-tree, but without any driver
serving it, do not touch it (Rob)
- Added more details into the device-tree about the OnePlus 6T panel properties
- Put display gpio -pins into one -state block.
- Link to v1: https://lore.kernel.org/r/20250925-s6e3fc2x01-v1-0-9293016768f7@ixit.cz
---
Casey Connolly (1):
arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies
David Heidelberg (7):
dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel
arm64: dts: qcom: sdm845-oneplus-fajita: Compatible describing both DDIC and panel
drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
arm64: dts: qcom: sdm845-oneplus: Group panel pinctrl
arm64: dts: qcom: sdm845-oneplus: Implement panel sleep pinctrl
arm64: dts: qcom: sdm845-oneplus: Describe TE gpio
dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible
.../bindings/display/panel/panel-simple-dsi.yaml | 2 -
.../bindings/display/panel/samsung,s6e3fc2x01.yaml | 81 +++++
MAINTAINERS | 6 +
.../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 113 ++++--
arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts | 2 +-
drivers/gpu/drm/panel/Kconfig | 13 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 399 +++++++++++++++++++++
8 files changed, 593 insertions(+), 24 deletions(-)
---
base-commit: 2433b84761658ef123ae683508bc461b07c5b0f0
change-id: 20250923-s6e3fc2x01-f9550b822fe5
Best regards,
--
David Heidelberg <david@ixit.cz>
^ permalink raw reply [flat|nested] 20+ messages in thread
* [PATCH v3 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
@ 2025-10-16 16:16 ` David Heidelberg via B4 Relay
2025-10-16 16:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
` (6 subsequent siblings)
7 siblings, 0 replies; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:16 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
Basic description for S6E3FC2X01 DDIC with attached panel AMS641RW.
Samsung AMS641RW is 6.41 inch, 1080x2340 pixels, 19.5:9 ratio panel
panel-simple-dsi cannot be used because it's limited to one
power-supply, while we use three.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
.../bindings/display/panel/samsung,s6e3fc2x01.yaml | 81 ++++++++++++++++++++++
MAINTAINERS | 5 ++
2 files changed, 86 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml b/Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml
new file mode 100644
index 0000000000000..d48354fb52ea0
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/samsung,s6e3fc2x01.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S6E3FC2X01 AMOLED DDIC
+
+description: The S6E3FC2X01 is display driver IC with connected panel.
+
+maintainers:
+ - David Heidelberg <david@ixit.cz>
+
+allOf:
+ - $ref: panel-common.yaml#
+
+properties:
+ compatible:
+ items:
+ - enum:
+ # Samsung 6.41 inch, 1080x2340 pixels, 19.5:9 ratio
+ - samsung,s6e3fc2x01-ams641rw
+ - const: samsung,s6e3fc2x01
+
+ reg:
+ maxItems: 1
+
+ reset-gpios: true
+
+ port: true
+
+ vddio-supply:
+ description: VDD regulator
+
+ vci-supply:
+ description: VCI regulator
+
+ poc-supply:
+ description: POC regulator
+
+required:
+ - compatible
+ - reset-gpios
+ - vddio-supply
+ - vci-supply
+ - poc-supply
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "samsung,s6e3fc2x01-ams641rw", "samsung,s6e3fc2x01";
+ reg = <0>;
+
+ vddio-supply = <&vreg_l14a_1p88>;
+ vci-supply = <&s2dos05_buck1>;
+ poc-supply = <&s2dos05_ldo1>;
+
+ te-gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
+ reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
+
+ pinctrl-0 = <&sde_dsi_active &sde_te_active_sleep>;
+ pinctrl-1 = <&sde_dsi_suspend &sde_te_active_sleep>;
+ pinctrl-names = "default", "sleep";
+
+ port {
+ panel_in: endpoint {
+ remote-endpoint = <&mdss_dsi0_out>;
+ };
+ };
+ };
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 4250ceabf6ff4..d11dd6c7a6b27 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8056,6 +8056,11 @@ S: Maintained
F: Documentation/devicetree/bindings/display/panel/samsung,s6d7aa0.yaml
F: drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
+DRM DRIVER FOR SAMSUNG S6E3FC2X01 DDIC
+M: David Heidelberg <david@ixit.cz>
+S: Maintained
+F: Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml
+
DRM DRIVER FOR SAMSUNG S6E3HA8 PANELS
M: Dzmitry Sankouski <dsankouski@gmail.com>
S: Maintained
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
2025-10-16 16:16 ` [PATCH v3 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
@ 2025-10-16 16:16 ` David Heidelberg via B4 Relay
2025-10-16 20:08 ` Dmitry Baryshkov
2025-10-20 13:45 ` Casey Connolly
2025-10-16 16:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm845-oneplus-fajita: Compatible describing both DDIC and panel David Heidelberg via B4 Relay
` (5 subsequent siblings)
7 siblings, 2 replies; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:16 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg
From: Casey Connolly <casey.connolly@linaro.org>
There are two additional supplies used by the panel, both are GPIO
controlled and are left enabled by the bootloader for continuous splash.
Previously these were (incorrectly) modelled as pinctrl. Describe them
properly so that the panel can control them.
Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Co-developed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
.../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 46 +++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index dcfffb271fcf3..1cf03047dd7ae 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -162,6 +162,34 @@ ts_1p8_supply: ts-1p8-regulator {
enable-active-high;
regulator-boot-on;
};
+
+ panel_vci_3v3: panel-vci-3v3-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "LCD_VCI_3V";
+
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-0 = <&panel_vci_default>;
+ pinctrl-names = "default";
+ regulator-boot-on;
+ };
+
+ panel_vddi_poc_1p8: panel-vddi-poc-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDI_POC";
+
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+
+ gpio = <&tlmm 25 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ pinctrl-0 = <&panel_poc_default>;
+ pinctrl-names = "default";
+ regulator-boot-on;
+ };
};
&adsp_pas {
@@ -429,6 +457,8 @@ display_panel: panel@0 {
reg = <0>;
vddio-supply = <&vreg_l14a_1p88>;
+ vci-supply = <&panel_vci_3v3>;
+ poc-supply = <&panel_vddi_poc_1p8>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
@@ -803,6 +833,20 @@ hall_sensor_default: hall-sensor-default-state {
bias-disable;
};
+ panel_vci_default: vci-state {
+ pins = "gpio26";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ panel_poc_default: poc-state {
+ pins = "gpio25";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
tri_state_key_default: tri-state-key-default-state {
pins = "gpio40", "gpio42", "gpio26";
function = "gpio";
@@ -818,7 +862,7 @@ ts_default_pins: ts-int-state {
};
panel_reset_pins: panel-reset-state {
- pins = "gpio6", "gpio25", "gpio26";
+ pins = "gpio6";
function = "gpio";
drive-strength = <8>;
bias-disable;
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v3 3/8] arm64: dts: qcom: sdm845-oneplus-fajita: Compatible describing both DDIC and panel
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
2025-10-16 16:16 ` [PATCH v3 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
2025-10-16 16:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
@ 2025-10-16 16:16 ` David Heidelberg via B4 Relay
2025-10-16 20:09 ` Dmitry Baryshkov
2025-10-16 16:16 ` [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
` (4 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:16 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
Compatible should precisely describe the hardware used.
Original compatible describing only the DDIC used, but omit describing
the panel used (Samsung AMS641RW), which we have no way to detect.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts b/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts
index 7e75decfda052..d6cd873aef0de 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts
@@ -32,7 +32,7 @@ battery: battery {
&display_panel {
status = "okay";
- compatible = "samsung,s6e3fc2x01";
+ compatible = "samsung,s6e3fc2x01-ams641rw", "samsung,s6e3fc2x01";
};
&i2c4 {
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
` (2 preceding siblings ...)
2025-10-16 16:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm845-oneplus-fajita: Compatible describing both DDIC and panel David Heidelberg via B4 Relay
@ 2025-10-16 16:16 ` David Heidelberg via B4 Relay
2025-10-16 20:12 ` Dmitry Baryshkov
2025-10-16 16:17 ` [PATCH v3 5/8] arm64: dts: qcom: sdm845-oneplus: Group panel pinctrl David Heidelberg via B4 Relay
` (3 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:16 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
Add panel driver used in the OnePlus 6T.
No datasheet, based mostly on EDK2 init sequence and the downstream driver.
Note: This driver doesn't use previously mentioned "samsung,s6e3fc2x01"
by OnePlus 6T device-tree.
The reason is because DDIC itself without knowing the panel type used
with it will not give the driver enough information about the panel used,
as the panel cannot be autodetected.
While would be more practical to support the original compatible,
I would like to avoid it, to prevent confusing devs upstreaming DDICs.
Based on work of:
Casey Connolly <casey@connolly.tech>
Joel Selvaraj <foss@joelselvaraj.com>
Nia Espera <a5b6@riseup.net>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
MAINTAINERS | 1 +
drivers/gpu/drm/panel/Kconfig | 13 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 399 +++++++++++++++++++++++
4 files changed, 414 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index d11dd6c7a6b27..ee715864e1f97 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8060,6 +8060,7 @@ DRM DRIVER FOR SAMSUNG S6E3FC2X01 DDIC
M: David Heidelberg <david@ixit.cz>
S: Maintained
F: Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml
+F: drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c
DRM DRIVER FOR SAMSUNG S6E3HA8 PANELS
M: Dzmitry Sankouski <dsankouski@gmail.com>
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index 045ffb2ccd0f0..fadb7f397837e 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -801,6 +801,19 @@ config DRM_PANEL_SAMSUNG_S6D7AA0
select DRM_MIPI_DSI
select VIDEOMODE_HELPERS
+config DRM_PANEL_SAMSUNG_S6E3FC2X01
+ tristate "Samsung S6E3FC2X01 DSI panel controller"
+ depends on OF
+ depends on DRM_MIPI_DSI
+ depends on BACKLIGHT_CLASS_DEVICE
+ select VIDEOMODE_HELPERS
+ help
+ Say Y or M here if you want to enable support for the
+ Samsung S6E3FC2 DDIC and connected MIPI DSI panel.
+ Currently supported panels:
+
+ Samsung AMS641RW (found in the OnePlus 6T smartphone)
+
config DRM_PANEL_SAMSUNG_S6E3HA2
tristate "Samsung S6E3HA2 DSI video mode panel"
depends on OF
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index 0356775a443ad..ae56f64982cfb 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -79,6 +79,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0) += panel-samsung-s6d7aa0.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FA7) += panel-samsung-s6e3fa7.o
+obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FC2X01) += panel-samsung-s6e3fc2x01.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA8) += panel-samsung-s6e3ha8.o
obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o
diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c
new file mode 100644
index 0000000000000..36e7cf1a3654a
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c
@@ -0,0 +1,399 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2022 Nia Espera <a5b6@riseup.net>
+ * Copyright (c) 2025 David Heidelberg <david@ixit.cz>
+ */
+
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/regulator/consumer.h>
+#include <linux/swab.h>
+#include <linux/backlight.h>
+
+#include <video/mipi_display.h>
+
+#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_modes.h>
+#include <drm/drm_panel.h>
+
+#define MCS_ELVSS_ON 0xb1
+
+struct samsung_s6e3fc2x01 {
+ struct drm_panel panel;
+ struct mipi_dsi_device *dsi;
+ struct regulator_bulk_data *supplies;
+ struct gpio_desc *reset_gpio;
+};
+
+static const struct regulator_bulk_data s6e3fc2x01_supplies[] = {
+ { .supply = "vddio" },
+ { .supply = "vci" },
+ { .supply = "poc" },
+};
+
+static inline
+struct samsung_s6e3fc2x01 *to_samsung_s6e3fc2x01(struct drm_panel *panel)
+{
+ return container_of(panel, struct samsung_s6e3fc2x01, panel);
+}
+
+#define s6e3fc2x01_test_key_on_lvl1(ctx) \
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9f, 0xa5, 0xa5)
+#define s6e3fc2x01_test_key_off_lvl1(ctx) \
+ mipi_dsi_dcs_write_seq_multi(ctx, 0x9f, 0x5a, 0x5a)
+#define s6e3fc2x01_test_key_on_lvl2(ctx) \
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0x5a, 0x5a)
+#define s6e3fc2x01_test_key_off_lvl2(ctx) \
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0xa5, 0xa5)
+#define s6e3fc2x01_test_key_on_lvl3(ctx) \
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfc, 0x5a, 0x5a)
+#define s6e3fc2x01_test_key_off_lvl3(ctx) \
+ mipi_dsi_dcs_write_seq_multi(ctx, 0xfc, 0xa5, 0xa5)
+
+static void s6e3fc2x01_reset(struct samsung_s6e3fc2x01 *ctx)
+{
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ usleep_range(5000, 6000);
+ gpiod_set_value_cansleep(ctx->reset_gpio, 0);
+ usleep_range(5000, 6000);
+}
+
+static int s6e3fc2x01_on(struct samsung_s6e3fc2x01 *ctx)
+{
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ s6e3fc2x01_test_key_on_lvl1(&dsi_ctx);
+
+ mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
+
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x0a);
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
+
+ s6e3fc2x01_test_key_off_lvl1(&dsi_ctx);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xcd, 0x01);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+
+ mipi_dsi_usleep_range(&dsi_ctx, 15000, 16000);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x0f);
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
+
+ s6e3fc2x01_test_key_on_lvl1(&dsi_ctx);
+ mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
+ s6e3fc2x01_test_key_off_lvl1(&dsi_ctx);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xeb, 0x17,
+ 0x41, 0x92,
+ 0x0e, 0x10,
+ 0x82, 0x5a);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+
+ /* Column & Page Address Setting */
+ mipi_dsi_dcs_set_column_address_multi(&dsi_ctx, 0x0000, 0x0437);
+ mipi_dsi_dcs_set_page_address_multi(&dsi_ctx, 0x0000, 0x0923);
+
+ /* Horizontal & Vertical sync Setting */
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x09);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe8, 0x10, 0x30);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+
+ s6e3fc2x01_test_key_on_lvl3(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe3, 0x88);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xed, 0x67);
+ s6e3fc2x01_test_key_off_lvl3(&dsi_ctx);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x07);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb7, 0x01);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x08);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb7, 0x12);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x20);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
+ mipi_dsi_usleep_range(&dsi_ctx, 1000, 2000);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MCS_ELVSS_ON, 0x00, 0x01);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb3, 0x00, 0xc1);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xff, 0x78);
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
+
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0x81, 0x90);
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x02);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MCS_ELVSS_ON, 0xc6, 0x00, 0x00,
+ 0x21, 0xed, 0x02, 0x08, 0x06, 0xc1, 0x27,
+ 0xfc, 0xdc, 0xe4, 0x00, 0xd9, 0xe6, 0xe7,
+ 0x00, 0xfc, 0xff, 0xea);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MCS_ELVSS_ON, 0x00, 0x00);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
+
+ return dsi_ctx.accum_err;
+}
+
+static int s6e3fc2x01_enable(struct drm_panel *panel)
+{
+ struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ s6e3fc2x01_test_key_on_lvl1(&dsi_ctx);
+ mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
+ s6e3fc2x01_test_key_off_lvl1(&dsi_ctx);
+
+ return dsi_ctx.accum_err;
+}
+
+static int s6e3fc2x01_off(struct samsung_s6e3fc2x01 *ctx)
+{
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
+
+ s6e3fc2x01_test_key_on_lvl1(&dsi_ctx);
+
+ mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
+
+ mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_usleep_range(&dsi_ctx, 16000, 17000);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x50);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb9, 0x82);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+ mipi_dsi_usleep_range(&dsi_ctx, 16000, 17000);
+
+ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+
+ s6e3fc2x01_test_key_off_lvl1(&dsi_ctx);
+
+ s6e3fc2x01_test_key_on_lvl2(&dsi_ctx);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x05);
+ mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf4, 0x01);
+ s6e3fc2x01_test_key_off_lvl2(&dsi_ctx);
+ mipi_dsi_msleep(&dsi_ctx, 160);
+
+ return dsi_ctx.accum_err;
+}
+
+static int s6e3fc2x01_disable(struct drm_panel *panel)
+{
+ struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
+
+ s6e3fc2x01_off(ctx);
+
+ return 0;
+}
+
+static int s6e3fc2x01_prepare(struct drm_panel *panel)
+{
+ struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
+ int ret;
+
+ ret = regulator_bulk_enable(ARRAY_SIZE(s6e3fc2x01_supplies), ctx->supplies);
+ if (ret < 0)
+ return ret;
+
+ s6e3fc2x01_reset(ctx);
+
+ ret = s6e3fc2x01_on(ctx);
+ if (ret < 0) {
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ regulator_bulk_disable(ARRAY_SIZE(s6e3fc2x01_supplies), ctx->supplies);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int s6e3fc2x01_unprepare(struct drm_panel *panel)
+{
+ struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
+
+ gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ regulator_bulk_disable(ARRAY_SIZE(s6e3fc2x01_supplies), ctx->supplies);
+
+ return 0;
+}
+
+static const struct drm_display_mode ams641rw_mode = {
+ .clock = (1080 + 72 + 16 + 36) * (2340 + 32 + 4 + 18) * 60 / 1000,
+ .hdisplay = 1080,
+ .hsync_start = 1080 + 72,
+ .hsync_end = 1080 + 72 + 16,
+ .htotal = 1080 + 72 + 16 + 36,
+ .vdisplay = 2340,
+ .vsync_start = 2340 + 32,
+ .vsync_end = 2340 + 32 + 4,
+ .vtotal = 2340 + 32 + 4 + 18,
+ .width_mm = 68,
+ .height_mm = 145,
+};
+
+static int s6e3fc2x01_get_modes(struct drm_panel *panel,
+ struct drm_connector *connector)
+{
+ struct drm_display_mode *mode;
+
+ mode = drm_mode_duplicate(connector->dev, &ams641rw_mode);
+ if (!mode)
+ return -ENOMEM;
+
+ drm_mode_set_name(mode);
+
+ mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
+ connector->display_info.width_mm = mode->width_mm;
+ connector->display_info.height_mm = mode->height_mm;
+ drm_mode_probed_add(connector, mode);
+
+ return 1;
+}
+
+static const struct drm_panel_funcs samsung_s6e3fc2x01_panel_funcs = {
+ .prepare = s6e3fc2x01_prepare,
+ .enable = s6e3fc2x01_enable,
+ .disable = s6e3fc2x01_disable,
+ .unprepare = s6e3fc2x01_unprepare,
+ .get_modes = s6e3fc2x01_get_modes,
+};
+
+static int s6e3fc2x01_panel_bl_update_status(struct backlight_device *bl)
+{
+ struct mipi_dsi_device *dsi = bl_get_data(bl);
+ u16 brightness = backlight_get_brightness(bl);
+ int err;
+
+ dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+
+ err = mipi_dsi_dcs_set_display_brightness_large(dsi, brightness);
+ if (err < 0)
+ return err;
+
+ dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
+ return 0;
+}
+
+static const struct backlight_ops s6e3fc2x01_panel_bl_ops = {
+ .update_status = s6e3fc2x01_panel_bl_update_status,
+};
+
+static struct backlight_device *
+s6e3fc2x01_create_backlight(struct mipi_dsi_device *dsi)
+{
+ struct device *dev = &dsi->dev;
+ const struct backlight_properties props = {
+ .type = BACKLIGHT_PLATFORM,
+ .brightness = 512,
+ .max_brightness = 1023,
+ };
+
+ return devm_backlight_device_register(dev, dev_name(dev), dev, dsi,
+ &s6e3fc2x01_panel_bl_ops, &props);
+}
+
+static int s6e3fc2x01_probe(struct mipi_dsi_device *dsi)
+{
+ struct device *dev = &dsi->dev;
+ struct samsung_s6e3fc2x01 *ctx;
+ int ret;
+
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
+ return -ENOMEM;
+
+ ret = devm_regulator_bulk_get_const(dev,
+ ARRAY_SIZE(s6e3fc2x01_supplies),
+ s6e3fc2x01_supplies,
+ &ctx->supplies);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to get regulators\n");
+
+
+ /* keep the display on for flicker-free experience */
+ ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(ctx->reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
+ "Failed to get reset-gpios\n");
+
+ ctx->dsi = dsi;
+ mipi_dsi_set_drvdata(dsi, ctx);
+
+ dsi->lanes = 4;
+ dsi->format = MIPI_DSI_FMT_RGB888;
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST |
+ MIPI_DSI_CLOCK_NON_CONTINUOUS | MIPI_DSI_MODE_LPM;
+
+ drm_panel_init(&ctx->panel, dev, &samsung_s6e3fc2x01_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ ctx->panel.prepare_prev_first = true;
+
+ ctx->panel.backlight = s6e3fc2x01_create_backlight(dsi);
+ if (IS_ERR(ctx->panel.backlight))
+ return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),
+ "Failed to create backlight\n");
+
+ drm_panel_add(&ctx->panel);
+
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0) {
+ dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
+ drm_panel_remove(&ctx->panel);
+ return ret;
+ }
+
+ return 0;
+}
+
+static void s6e3fc2x01_remove(struct mipi_dsi_device *dsi)
+{
+ struct samsung_s6e3fc2x01 *ctx = mipi_dsi_get_drvdata(dsi);
+ int ret;
+
+ ret = mipi_dsi_detach(dsi);
+ if (ret < 0)
+ dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
+
+ drm_panel_remove(&ctx->panel);
+}
+
+static const struct of_device_id s6e3fc2x01_of_match[] = {
+ /* samsung,s6e3fc2x01 will default to the AMS641RW mode (legacy) */
+ { .compatible = "samsung,s6e3fc2x01", .data = &ams641rw_mode },
+ { .compatible = "samsung,s6e3fc2x01-ams641rw", .data = &ams641rw_mode },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, s6e3fc2x01_of_match);
+
+static struct mipi_dsi_driver s6e3fc2x01_driver = {
+ .probe = s6e3fc2x01_probe,
+ .remove = s6e3fc2x01_remove,
+ .driver = {
+ .name = "panel-samsung-s6e3fc2x01",
+ .of_match_table = s6e3fc2x01_of_match,
+ },
+};
+module_mipi_dsi_driver(s6e3fc2x01_driver);
+
+MODULE_AUTHOR("David Heidelberg <david@ixit.cz>");
+MODULE_DESCRIPTION("DRM driver for Samsung S6E3FC2X01 DDIC");
+MODULE_LICENSE("GPL");
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v3 5/8] arm64: dts: qcom: sdm845-oneplus: Group panel pinctrl
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
` (3 preceding siblings ...)
2025-10-16 16:16 ` [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
@ 2025-10-16 16:17 ` David Heidelberg via B4 Relay
2025-10-16 20:12 ` Dmitry Baryshkov
2025-10-16 16:17 ` [PATCH v3 6/8] arm64: dts: qcom: sdm845-oneplus: Implement panel sleep pinctrl David Heidelberg via B4 Relay
` (2 subsequent siblings)
7 siblings, 1 reply; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:17 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
As these pins won't be used outside the group, let's group them.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
.../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 46 +++++++++++-----------
1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 1cf03047dd7ae..9b571fab9c80c 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -463,7 +463,7 @@ display_panel: panel@0 {
reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
- pinctrl-0 = <&panel_reset_pins &panel_te_pin &panel_esd_pin>;
+ pinctrl-0 = <&panel_default>;
port {
panel_in: endpoint {
@@ -847,6 +847,29 @@ panel_poc_default: poc-state {
bias-disable;
};
+ panel_default: panel-default-state {
+ esd-pins {
+ pins = "gpio30";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ reset-pins {
+ pins = "gpio6";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-disable;
+ };
+
+ te-pins {
+ pins = "gpio10";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
tri_state_key_default: tri-state-key-default-state {
pins = "gpio40", "gpio42", "gpio26";
function = "gpio";
@@ -861,27 +884,6 @@ ts_default_pins: ts-int-state {
bias-pull-up;
};
- panel_reset_pins: panel-reset-state {
- pins = "gpio6";
- function = "gpio";
- drive-strength = <8>;
- bias-disable;
- };
-
- panel_te_pin: panel-te-state {
- pins = "gpio10";
- function = "mdp_vsync";
- drive-strength = <2>;
- bias-disable;
- };
-
- panel_esd_pin: panel-esd-state {
- pins = "gpio30";
- function = "gpio";
- drive-strength = <2>;
- bias-pull-down;
- };
-
speaker_default: speaker-default-state {
pins = "gpio69";
function = "gpio";
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v3 6/8] arm64: dts: qcom: sdm845-oneplus: Implement panel sleep pinctrl
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
` (4 preceding siblings ...)
2025-10-16 16:17 ` [PATCH v3 5/8] arm64: dts: qcom: sdm845-oneplus: Group panel pinctrl David Heidelberg via B4 Relay
@ 2025-10-16 16:17 ` David Heidelberg via B4 Relay
2025-10-16 20:13 ` Dmitry Baryshkov
2025-10-16 16:17 ` [PATCH v3 7/8] arm64: dts: qcom: sdm845-oneplus: Describe TE gpio David Heidelberg via B4 Relay
2025-10-16 16:17 ` [PATCH v3 8/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible David Heidelberg via B4 Relay
7 siblings, 1 reply; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:17 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
We can DSI pin from 8mA to 2mA while suspend, do it.
In theory, should give us extra 2 hours of idle battery life.
cosmetic: sort pinctrl properties.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
.../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 26 +++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index 9b571fab9c80c..a8e87507d667b 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -462,8 +462,9 @@ display_panel: panel@0 {
reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default";
pinctrl-0 = <&panel_default>;
+ pinctrl-1 = <&panel_sleep>;
+ pinctrl-names = "default", "sleep";
port {
panel_in: endpoint {
@@ -870,6 +871,29 @@ te-pins {
};
};
+ panel_sleep: panel-sleep-state {
+ esd-pins {
+ pins = "gpio30";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ reset-pins {
+ pins = "gpio6";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-down;
+ };
+
+ te-pins {
+ pins = "gpio10";
+ function = "mdp_vsync";
+ drive-strength = <2>;
+ bias-disable;
+ };
+ };
+
tri_state_key_default: tri-state-key-default-state {
pins = "gpio40", "gpio42", "gpio26";
function = "gpio";
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v3 7/8] arm64: dts: qcom: sdm845-oneplus: Describe TE gpio
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
` (5 preceding siblings ...)
2025-10-16 16:17 ` [PATCH v3 6/8] arm64: dts: qcom: sdm845-oneplus: Implement panel sleep pinctrl David Heidelberg via B4 Relay
@ 2025-10-16 16:17 ` David Heidelberg via B4 Relay
2025-10-16 20:15 ` Dmitry Baryshkov
2025-10-16 16:17 ` [PATCH v3 8/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible David Heidelberg via B4 Relay
7 siblings, 1 reply; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:17 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg, Konrad Dybcio
From: David Heidelberg <david@ixit.cz>
Describe panel Tearing Effect (TE) GPIO line.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
index a8e87507d667b..b663345de0214 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -460,6 +460,7 @@ display_panel: panel@0 {
vci-supply = <&panel_vci_3v3>;
poc-supply = <&panel_vddi_poc_1p8>;
+ te-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
pinctrl-0 = <&panel_default>;
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [PATCH v3 8/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
` (6 preceding siblings ...)
2025-10-16 16:17 ` [PATCH v3 7/8] arm64: dts: qcom: sdm845-oneplus: Describe TE gpio David Heidelberg via B4 Relay
@ 2025-10-16 16:17 ` David Heidelberg via B4 Relay
7 siblings, 0 replies; 20+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-10-16 16:17 UTC (permalink / raw)
To: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
Samsung S6E3FC2X01 DDIC isn't Simple DSI panel.
This panel has three supplies, while panel-simple-dsi is limited to one.
There is no user of this compatible, nor the compatible make sense.
Remove it.
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml | 2 --
1 file changed, 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
index 9b92a05791ccf..6c1249a224c8a 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-simple-dsi.yaml
@@ -56,8 +56,6 @@ properties:
- panasonic,vvx10f034n00
# Samsung s6e3fa7 1080x2220 based AMS559NK06 AMOLED panel
- samsung,s6e3fa7-ams559nk06
- # Samsung s6e3fc2x01 1080x2340 AMOLED panel
- - samsung,s6e3fc2x01
# Samsung sofef00 1080x2280 AMOLED panel
- samsung,sofef00
# Shangai Top Display Optoelectronics 7" TL070WSH30 1024x600 TFT LCD panel
--
2.51.0
^ permalink raw reply related [flat|nested] 20+ messages in thread
* Re: [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies
2025-10-16 16:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
@ 2025-10-16 20:08 ` Dmitry Baryshkov
2025-10-20 13:45 ` Casey Connolly
1 sibling, 0 replies; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-10-16 20:08 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On Thu, Oct 16, 2025 at 06:16:57PM +0200, David Heidelberg via B4 Relay wrote:
> From: Casey Connolly <casey.connolly@linaro.org>
>
> There are two additional supplies used by the panel, both are GPIO
> controlled and are left enabled by the bootloader for continuous splash.
>
> Previously these were (incorrectly) modelled as pinctrl. Describe them
> properly so that the panel can control them.
>
> Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
> Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
> Co-developed-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 46 +++++++++++++++++++++-
> 1 file changed, 45 insertions(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 3/8] arm64: dts: qcom: sdm845-oneplus-fajita: Compatible describing both DDIC and panel
2025-10-16 16:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm845-oneplus-fajita: Compatible describing both DDIC and panel David Heidelberg via B4 Relay
@ 2025-10-16 20:09 ` Dmitry Baryshkov
0 siblings, 0 replies; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-10-16 20:09 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On Thu, Oct 16, 2025 at 06:16:58PM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Compatible should precisely describe the hardware used.
> Original compatible describing only the DDIC used, but omit describing
> the panel used (Samsung AMS641RW), which we have no way to detect.
I think this should be squashed into the previous commit.
>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts b/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts
> index 7e75decfda052..d6cd873aef0de 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dts
> @@ -32,7 +32,7 @@ battery: battery {
> &display_panel {
> status = "okay";
>
> - compatible = "samsung,s6e3fc2x01";
> + compatible = "samsung,s6e3fc2x01-ams641rw", "samsung,s6e3fc2x01";
> };
>
> &i2c4 {
>
> --
> 2.51.0
>
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
2025-10-16 16:16 ` [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
@ 2025-10-16 20:12 ` Dmitry Baryshkov
2025-10-16 20:46 ` David Heidelberg
0 siblings, 1 reply; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-10-16 20:12 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On Thu, Oct 16, 2025 at 06:16:59PM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Add panel driver used in the OnePlus 6T.
>
> No datasheet, based mostly on EDK2 init sequence and the downstream driver.
>
> Note: This driver doesn't use previously mentioned "samsung,s6e3fc2x01"
> by OnePlus 6T device-tree.
> The reason is because DDIC itself without knowing the panel type used
> with it will not give the driver enough information about the panel used,
> as the panel cannot be autodetected.
> While would be more practical to support the original compatible,
> I would like to avoid it, to prevent confusing devs upstreaming DDICs.
>
> Based on work of:
> Casey Connolly <casey@connolly.tech>
> Joel Selvaraj <foss@joelselvaraj.com>
> Nia Espera <a5b6@riseup.net>
>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> MAINTAINERS | 1 +
> drivers/gpu/drm/panel/Kconfig | 13 +
> drivers/gpu/drm/panel/Makefile | 1 +
> drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 399 +++++++++++++++++++++++
> 4 files changed, 414 insertions(+)
>
> +
> +static const struct drm_display_mode ams641rw_mode = {
> + .clock = (1080 + 72 + 16 + 36) * (2340 + 32 + 4 + 18) * 60 / 1000,
> + .hdisplay = 1080,
> + .hsync_start = 1080 + 72,
> + .hsync_end = 1080 + 72 + 16,
> + .htotal = 1080 + 72 + 16 + 36,
> + .vdisplay = 2340,
> + .vsync_start = 2340 + 32,
> + .vsync_end = 2340 + 32 + 4,
> + .vtotal = 2340 + 32 + 4 + 18,
> + .width_mm = 68,
> + .height_mm = 145,
> +};
> +
> +static int s6e3fc2x01_get_modes(struct drm_panel *panel,
> + struct drm_connector *connector)
> +{
> + struct drm_display_mode *mode;
> +
> + mode = drm_mode_duplicate(connector->dev, &ams641rw_mode);
> + if (!mode)
> + return -ENOMEM;
> +
> + drm_mode_set_name(mode);
> +
> + mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> + connector->display_info.width_mm = mode->width_mm;
> + connector->display_info.height_mm = mode->height_mm;
> + drm_mode_probed_add(connector, mode);
drm_connector_helper_get_modes_fixed()
> +
> + return 1;
> +}
> +
> +
> +static const struct of_device_id s6e3fc2x01_of_match[] = {
> + /* samsung,s6e3fc2x01 will default to the AMS641RW mode (legacy) */
> + { .compatible = "samsung,s6e3fc2x01", .data = &ams641rw_mode },
Is there a need to probide this kind of legacy?
> + { .compatible = "samsung,s6e3fc2x01-ams641rw", .data = &ams641rw_mode },
> + { /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, s6e3fc2x01_of_match);
> +
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 5/8] arm64: dts: qcom: sdm845-oneplus: Group panel pinctrl
2025-10-16 16:17 ` [PATCH v3 5/8] arm64: dts: qcom: sdm845-oneplus: Group panel pinctrl David Heidelberg via B4 Relay
@ 2025-10-16 20:12 ` Dmitry Baryshkov
0 siblings, 0 replies; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-10-16 20:12 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On Thu, Oct 16, 2025 at 06:17:00PM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> As these pins won't be used outside the group, let's group them.
>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 46 +++++++++++-----------
> 1 file changed, 24 insertions(+), 22 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 6/8] arm64: dts: qcom: sdm845-oneplus: Implement panel sleep pinctrl
2025-10-16 16:17 ` [PATCH v3 6/8] arm64: dts: qcom: sdm845-oneplus: Implement panel sleep pinctrl David Heidelberg via B4 Relay
@ 2025-10-16 20:13 ` Dmitry Baryshkov
0 siblings, 0 replies; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-10-16 20:13 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On Thu, Oct 16, 2025 at 06:17:01PM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> We can DSI pin from 8mA to 2mA while suspend, do it.
>
> In theory, should give us extra 2 hours of idle battery life.
>
> cosmetic: sort pinctrl properties.
>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 26 +++++++++++++++++++++-
> 1 file changed, 25 insertions(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 7/8] arm64: dts: qcom: sdm845-oneplus: Describe TE gpio
2025-10-16 16:17 ` [PATCH v3 7/8] arm64: dts: qcom: sdm845-oneplus: Describe TE gpio David Heidelberg via B4 Relay
@ 2025-10-16 20:15 ` Dmitry Baryshkov
2025-10-16 21:00 ` David Heidelberg
0 siblings, 1 reply; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-10-16 20:15 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
Konrad Dybcio
On Thu, Oct 16, 2025 at 06:17:02PM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
>
> Describe panel Tearing Effect (TE) GPIO line.
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> index a8e87507d667b..b663345de0214 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -460,6 +460,7 @@ display_panel: panel@0 {
> vci-supply = <&panel_vci_3v3>;
> poc-supply = <&panel_vddi_poc_1p8>;
>
> + te-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
Isn't it GPIO 10?
> reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
>
> pinctrl-0 = <&panel_default>;
>
> --
> 2.51.0
>
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
2025-10-16 20:12 ` Dmitry Baryshkov
@ 2025-10-16 20:46 ` David Heidelberg
2025-10-19 12:11 ` Dmitry Baryshkov
0 siblings, 1 reply; 20+ messages in thread
From: David Heidelberg @ 2025-10-16 20:46 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On 16/10/2025 22:12, Dmitry Baryshkov wrote:
> On Thu, Oct 16, 2025 at 06:16:59PM +0200, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> Add panel driver used in the OnePlus 6T.
>>
>> No datasheet, based mostly on EDK2 init sequence and the downstream driver.
>>
>> Note: This driver doesn't use previously mentioned "samsung,s6e3fc2x01"
>> by OnePlus 6T device-tree.
>> The reason is because DDIC itself without knowing the panel type used
>> with it will not give the driver enough information about the panel used,
>> as the panel cannot be autodetected.
>> While would be more practical to support the original compatible,
>> I would like to avoid it, to prevent confusing devs upstreaming DDICs.
>>
>> Based on work of:
>> Casey Connolly <casey@connolly.tech>
>> Joel Selvaraj <foss@joelselvaraj.com>
>> Nia Espera <a5b6@riseup.net>
>>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>> MAINTAINERS | 1 +
>> drivers/gpu/drm/panel/Kconfig | 13 +
>> drivers/gpu/drm/panel/Makefile | 1 +
>> drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 399 +++++++++++++++++++++++
>> 4 files changed, 414 insertions(+)
>>
>> +
>> +static const struct drm_display_mode ams641rw_mode = {
>> + .clock = (1080 + 72 + 16 + 36) * (2340 + 32 + 4 + 18) * 60 / 1000,
>> + .hdisplay = 1080,
>> + .hsync_start = 1080 + 72,
>> + .hsync_end = 1080 + 72 + 16,
>> + .htotal = 1080 + 72 + 16 + 36,
>> + .vdisplay = 2340,
>> + .vsync_start = 2340 + 32,
>> + .vsync_end = 2340 + 32 + 4,
>> + .vtotal = 2340 + 32 + 4 + 18,
>> + .width_mm = 68,
>> + .height_mm = 145,
>> +};
>> +
>> +static int s6e3fc2x01_get_modes(struct drm_panel *panel,
>> + struct drm_connector *connector)
>> +{
>> + struct drm_display_mode *mode;
>> +
>> + mode = drm_mode_duplicate(connector->dev, &ams641rw_mode);
>> + if (!mode)
>> + return -ENOMEM;
>> +
>> + drm_mode_set_name(mode);
>> +
>> + mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
>> + connector->display_info.width_mm = mode->width_mm;
>> + connector->display_info.height_mm = mode->height_mm;
>> + drm_mode_probed_add(connector, mode);
>
> drm_connector_helper_get_modes_fixed()
Thanks, next version will have it.>
>> +
>> + return 1;
>> +}
>> +
>> +
>> +static const struct of_device_id s6e3fc2x01_of_match[] = {
>> + /* samsung,s6e3fc2x01 will default to the AMS641RW mode (legacy) */
>> + { .compatible = "samsung,s6e3fc2x01", .data = &ams641rw_mode },
>
> Is there a need to probide this kind of legacy?
I don't know. I don't see the need to provide it, but I understood you
may want to have it. If not, please tell me and I'll happily remove it
from next version.
David
>
>> + { .compatible = "samsung,s6e3fc2x01-ams641rw", .data = &ams641rw_mode },
>> + { /* sentinel */ }
>> +};
>> +MODULE_DEVICE_TABLE(of, s6e3fc2x01_of_match);
>> +
>
--
David Heidelberg
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 7/8] arm64: dts: qcom: sdm845-oneplus: Describe TE gpio
2025-10-16 20:15 ` Dmitry Baryshkov
@ 2025-10-16 21:00 ` David Heidelberg
0 siblings, 0 replies; 20+ messages in thread
From: David Heidelberg @ 2025-10-16 21:00 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
Konrad Dybcio
On 16/10/2025 22:15, Dmitry Baryshkov wrote:
> On Thu, Oct 16, 2025 at 06:17:02PM +0200, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> Describe panel Tearing Effect (TE) GPIO line.
>>
>> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>> arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
>> index a8e87507d667b..b663345de0214 100644
>> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
>> @@ -460,6 +460,7 @@ display_panel: panel@0 {
>> vci-supply = <&panel_vci_3v3>;
>> poc-supply = <&panel_vddi_poc_1p8>;
>>
>> + te-gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
>
> Isn't it GPIO 10?
The datasheet says that both 10 and 30 are TE GPIOs.
The downstream and mainline code describes gpio 30 as ESD check and as
you write. So generally it seems to be confirmed that 10 is TE (same as
for other sdm845 devices as Samsung S9).
Will be fixed in the next patchset version.
Thank you
>
>> reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
>>
>> pinctrl-0 = <&panel_default>;
>>
>> --
>> 2.51.0
>>
>>
>
--
David Heidelberg
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
2025-10-16 20:46 ` David Heidelberg
@ 2025-10-19 12:11 ` Dmitry Baryshkov
0 siblings, 0 replies; 20+ messages in thread
From: Dmitry Baryshkov @ 2025-10-19 12:11 UTC (permalink / raw)
To: David Heidelberg
Cc: Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Casey Connolly, Jessica Zhang,
dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On Thu, Oct 16, 2025 at 10:46:56PM +0200, David Heidelberg wrote:
> On 16/10/2025 22:12, Dmitry Baryshkov wrote:
> > On Thu, Oct 16, 2025 at 06:16:59PM +0200, David Heidelberg via B4 Relay wrote:
> > > From: David Heidelberg <david@ixit.cz>
> > >
> > > Add panel driver used in the OnePlus 6T.
> > >
> > > No datasheet, based mostly on EDK2 init sequence and the downstream driver.
> > >
> > > Note: This driver doesn't use previously mentioned "samsung,s6e3fc2x01"
> > > by OnePlus 6T device-tree.
> > > The reason is because DDIC itself without knowing the panel type used
> > > with it will not give the driver enough information about the panel used,
> > > as the panel cannot be autodetected.
> > > While would be more practical to support the original compatible,
> > > I would like to avoid it, to prevent confusing devs upstreaming DDICs.
> > >
> > > Based on work of:
> > > Casey Connolly <casey@connolly.tech>
> > > Joel Selvaraj <foss@joelselvaraj.com>
> > > Nia Espera <a5b6@riseup.net>
> > >
> > > Signed-off-by: David Heidelberg <david@ixit.cz>
> > > ---
> > > MAINTAINERS | 1 +
> > > drivers/gpu/drm/panel/Kconfig | 13 +
> > > drivers/gpu/drm/panel/Makefile | 1 +
> > > drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 399 +++++++++++++++++++++++
> > > 4 files changed, 414 insertions(+)
> > >
> > > +static const struct of_device_id s6e3fc2x01_of_match[] = {
> > > + /* samsung,s6e3fc2x01 will default to the AMS641RW mode (legacy) */
> > > + { .compatible = "samsung,s6e3fc2x01", .data = &ams641rw_mode },
> >
> > Is there a need to probide this kind of legacy?
>
> I don't know. I don't see the need to provide it, but I understood you may
> want to have it. If not, please tell me and I'll happily remove it from next
> version.
Since this never worked as expected and there were no DTs in upstream
that used this compat string, I think it can be dropped.
>
> David
>
> >
> > > + { .compatible = "samsung,s6e3fc2x01-ams641rw", .data = &ams641rw_mode },
> > > + { /* sentinel */ }
> > > +};
> > > +MODULE_DEVICE_TABLE(of, s6e3fc2x01_of_match);
> > > +
> >
>
> --
> David Heidelberg
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies
2025-10-16 16:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
2025-10-16 20:08 ` Dmitry Baryshkov
@ 2025-10-20 13:45 ` Casey Connolly
2025-10-20 14:03 ` David Heidelberg
1 sibling, 1 reply; 20+ messages in thread
From: Casey Connolly @ 2025-10-20 13:45 UTC (permalink / raw)
To: david, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On 16/10/2025 18:16, David Heidelberg via B4 Relay wrote:
> From: Casey Connolly <casey.connolly@linaro.org>
>
> There are two additional supplies used by the panel, both are GPIO
> controlled and are left enabled by the bootloader for continuous splash.
>
> Previously these were (incorrectly) modelled as pinctrl. Describe them
> properly so that the panel can control them.
>
> Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
This Fixes: is not correct, it should be the commit that first added the
panel to the DT since it was added after the initial DT.
The driver changes also need to be backported and may not apply properly
to stable kernels, so we should be careful with this.
> Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
> Co-developed-by: David Heidelberg <david@ixit.cz>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 46 +++++++++++++++++++++-
> 1 file changed, 45 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> index dcfffb271fcf3..1cf03047dd7ae 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -162,6 +162,34 @@ ts_1p8_supply: ts-1p8-regulator {
> enable-active-high;
> regulator-boot-on;
> };
> +
> + panel_vci_3v3: panel-vci-3v3-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "LCD_VCI_3V";
> +
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> +
> + gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + pinctrl-0 = <&panel_vci_default>;
> + pinctrl-names = "default";
> + regulator-boot-on;
> + };
> +
> + panel_vddi_poc_1p8: panel-vddi-poc-regulator {
> + compatible = "regulator-fixed";
> + regulator-name = "VDDI_POC";
> +
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> +
> + gpio = <&tlmm 25 GPIO_ACTIVE_HIGH>;
> + enable-active-high;
> + pinctrl-0 = <&panel_poc_default>;
> + pinctrl-names = "default";
> + regulator-boot-on;
> + };
> };
>
> &adsp_pas {
> @@ -429,6 +457,8 @@ display_panel: panel@0 {
> reg = <0>;
>
> vddio-supply = <&vreg_l14a_1p88>;
> + vci-supply = <&panel_vci_3v3>;
> + poc-supply = <&panel_vddi_poc_1p8>;
>
> reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
>
> @@ -803,6 +833,20 @@ hall_sensor_default: hall-sensor-default-state {
> bias-disable;
> };
>
> + panel_vci_default: vci-state {
> + pins = "gpio26";
> + function = "gpio";
> + drive-strength = <8>;
> + bias-disable;
> + };
> +
> + panel_poc_default: poc-state {
> + pins = "gpio25";
> + function = "gpio";
> + drive-strength = <8>;
> + bias-disable;
> + };
> +
> tri_state_key_default: tri-state-key-default-state {
> pins = "gpio40", "gpio42", "gpio26";
> function = "gpio";
> @@ -818,7 +862,7 @@ ts_default_pins: ts-int-state {
> };
>
> panel_reset_pins: panel-reset-state {
> - pins = "gpio6", "gpio25", "gpio26";
> + pins = "gpio6";
> function = "gpio";
> drive-strength = <8>;
> bias-disable;
>
--
// Casey (she/her)
^ permalink raw reply [flat|nested] 20+ messages in thread
* Re: [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies
2025-10-20 13:45 ` Casey Connolly
@ 2025-10-20 14:03 ` David Heidelberg
0 siblings, 0 replies; 20+ messages in thread
From: David Heidelberg @ 2025-10-20 14:03 UTC (permalink / raw)
To: Casey Connolly, Neil Armstrong, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
Bjorn Andersson, Konrad Dybcio, Jessica Zhang
Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel
On 20/10/2025 15:45, Casey Connolly wrote:
>
>
> On 16/10/2025 18:16, David Heidelberg via B4 Relay wrote:
>> From: Casey Connolly <casey.connolly@linaro.org>
>>
>> There are two additional supplies used by the panel, both are GPIO
>> controlled and are left enabled by the bootloader for continuous splash.
>>
>> Previously these were (incorrectly) modelled as pinctrl. Describe them
>> properly so that the panel can control them.
>>
>> Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
>
> This Fixes: is not correct, it should be the commit that first added the
> panel to the DT since it was added after the initial DT.
I double checked, it's the right commit, the panel node was added in the
initial commit (it's also mentioned in the commit itself)
...
* Display
...
>
> The driver changes also need to be backported and may not apply properly
> to stable kernels, so we should be careful with this.
But the OnePlus 6T driver never worked before, that's why I assume the
backport here play very small role.
If no other objection, I'll keep the Fixes tag in next version, but if
maintainers decides to remove it, I'm fine with it too.
David
>> Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
>> Co-developed-by: David Heidelberg <david@ixit.cz>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>> .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 46 +++++++++++++++++++++-
>> 1 file changed, 45 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
>> index dcfffb271fcf3..1cf03047dd7ae 100644
>> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
>> @@ -162,6 +162,34 @@ ts_1p8_supply: ts-1p8-regulator {
>> enable-active-high;
>> regulator-boot-on;
>> };
>> +
>> + panel_vci_3v3: panel-vci-3v3-regulator {
>> + compatible = "regulator-fixed";
>> + regulator-name = "LCD_VCI_3V";
>> +
>> + regulator-min-microvolt = <3300000>;
>> + regulator-max-microvolt = <3300000>;
>> +
>> + gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>;
>> + enable-active-high;
>> + pinctrl-0 = <&panel_vci_default>;
>> + pinctrl-names = "default";
>> + regulator-boot-on;
>> + };
>> +
>> + panel_vddi_poc_1p8: panel-vddi-poc-regulator {
>> + compatible = "regulator-fixed";
>> + regulator-name = "VDDI_POC";
>> +
>> + regulator-min-microvolt = <1800000>;
>> + regulator-max-microvolt = <1800000>;
>> +
>> + gpio = <&tlmm 25 GPIO_ACTIVE_HIGH>;
>> + enable-active-high;
>> + pinctrl-0 = <&panel_poc_default>;
>> + pinctrl-names = "default";
>> + regulator-boot-on;
>> + };
>> };
>>
>> &adsp_pas {
>> @@ -429,6 +457,8 @@ display_panel: panel@0 {
>> reg = <0>;
>>
>> vddio-supply = <&vreg_l14a_1p88>;
>> + vci-supply = <&panel_vci_3v3>;
>> + poc-supply = <&panel_vddi_poc_1p8>;
>>
>> reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
>>
>> @@ -803,6 +833,20 @@ hall_sensor_default: hall-sensor-default-state {
>> bias-disable;
>> };
>>
>> + panel_vci_default: vci-state {
>> + pins = "gpio26";
>> + function = "gpio";
>> + drive-strength = <8>;
>> + bias-disable;
>> + };
>> +
>> + panel_poc_default: poc-state {
>> + pins = "gpio25";
>> + function = "gpio";
>> + drive-strength = <8>;
>> + bias-disable;
>> + };
>> +
>> tri_state_key_default: tri-state-key-default-state {
>> pins = "gpio40", "gpio42", "gpio26";
>> function = "gpio";
>> @@ -818,7 +862,7 @@ ts_default_pins: ts-int-state {
>> };
>>
>> panel_reset_pins: panel-reset-state {
>> - pins = "gpio6", "gpio25", "gpio26";
>> + pins = "gpio6";
>> function = "gpio";
>> drive-strength = <8>;
>> bias-disable;
>>
>
--
David Heidelberg
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2025-10-20 14:03 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 16:16 [PATCH v3 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
2025-10-16 16:16 ` [PATCH v3 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
2025-10-16 16:16 ` [PATCH v3 2/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
2025-10-16 20:08 ` Dmitry Baryshkov
2025-10-20 13:45 ` Casey Connolly
2025-10-20 14:03 ` David Heidelberg
2025-10-16 16:16 ` [PATCH v3 3/8] arm64: dts: qcom: sdm845-oneplus-fajita: Compatible describing both DDIC and panel David Heidelberg via B4 Relay
2025-10-16 20:09 ` Dmitry Baryshkov
2025-10-16 16:16 ` [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
2025-10-16 20:12 ` Dmitry Baryshkov
2025-10-16 20:46 ` David Heidelberg
2025-10-19 12:11 ` Dmitry Baryshkov
2025-10-16 16:17 ` [PATCH v3 5/8] arm64: dts: qcom: sdm845-oneplus: Group panel pinctrl David Heidelberg via B4 Relay
2025-10-16 20:12 ` Dmitry Baryshkov
2025-10-16 16:17 ` [PATCH v3 6/8] arm64: dts: qcom: sdm845-oneplus: Implement panel sleep pinctrl David Heidelberg via B4 Relay
2025-10-16 20:13 ` Dmitry Baryshkov
2025-10-16 16:17 ` [PATCH v3 7/8] arm64: dts: qcom: sdm845-oneplus: Describe TE gpio David Heidelberg via B4 Relay
2025-10-16 20:15 ` Dmitry Baryshkov
2025-10-16 21:00 ` David Heidelberg
2025-10-16 16:17 ` [PATCH v3 8/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible David Heidelberg via B4 Relay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).