devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel)
@ 2025-09-25  9:12 David Heidelberg via B4 Relay
  2025-09-25  9:12 ` [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
	David Heidelberg

This patchset enables display on the OnePlus 6T smartphone.

Minor adjust to the device-tree of OnePlus 6 had to be done
to properly document reset GPIO used. Also same adjustments
had been done to the sofef00 panel driver (used by OnePlus 6).

In the last step new DDIC driver is introduced together with AMS641RW
panel sequences.

Signed-off-by: David Heidelberg <david@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
      dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible
      arm64: dts: qcom: sdm845-oneplus-fajita: Reflect used panel in compatible
      arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity
      arm64: dts: qcom: sdm845-oneplus: Document TE gpio
      drm/panel: samsung-sofef00: Invert reset gpio polarity
      drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel

 .../bindings/display/panel/panel-simple-dsi.yaml   |   2 -
 .../bindings/display/panel/samsung,s6e3fc2x01.yaml |  77 ++++
 MAINTAINERS                                        |   6 +
 .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi |  31 +-
 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   | 404 +++++++++++++++++++++
 drivers/gpu/drm/panel/panel-samsung-sofef00.c      |  10 +-
 9 files changed, 536 insertions(+), 10 deletions(-)
---
base-commit: ce7f1a983b074f6cf8609068088ca3182c569ee4
change-id: 20250923-s6e3fc2x01-f9550b822fe5

Best regards,
-- 
David Heidelberg <david@ixit.cz>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-10-02  1:00   ` Rob Herring (Arm)
  2025-10-02  1:06   ` Rob Herring
  2025-09-25  9:12 ` [PATCH 2/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible David Heidelberg via B4 Relay
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  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.

Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../bindings/display/panel/samsung,s6e3fc2x01.yaml | 77 ++++++++++++++++++++++
 MAINTAINERS                                        |  5 ++
 2 files changed, 82 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 0000000000000000000000000000000000000000..489b6b52effe1e627ff5ef5891729c175ad71685
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml
@@ -0,0 +1,77 @@
+# 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:
+    const: samsung,s6e3fc2x01-ams641rw
+
+  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";
+            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-names = "default", "sleep";
+            pinctrl-0 = <&sde_dsi_active &sde_te_active_sleep>;
+            pinctrl-1 = <&sde_dsi_suspend &sde_te_active_sleep>;
+
+            port {
+                panel_in: endpoint {
+                    remote-endpoint = <&mdss_dsi0_out>;
+                };
+            };
+        };
+    };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 9955f2a87f292000fae6d5a71ae7744ceadfed05..961f472e52039932e3208f7c0eb9aa0412b7f44b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8054,6 +8054,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] 22+ messages in thread

* [PATCH 2/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
  2025-09-25  9:12 ` [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-09-25 20:51   ` Dmitry Baryshkov
  2025-09-25  9:12 ` [PATCH 3/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
	David Heidelberg

From: David Heidelberg <david@ixit.cz>

Follow up commit introduce the proper device tree definition for the DDIC.

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 9b92a05791ccf99061ab7a1e01937bb832a96fe6..6c1249a224c8a170b33fd3f331f985f16914cb2c 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] 22+ messages in thread

* [PATCH 3/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
  2025-09-25  9:12 ` [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
  2025-09-25  9:12 ` [PATCH 2/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-09-25  9:20   ` Konrad Dybcio
  2025-09-25  9:12 ` [PATCH 4/8] arm64: dts: qcom: sdm845-oneplus-fajita: Reflect used panel in compatible David Heidelberg via B4 Relay
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  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>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
 .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 28 +++++++++++++++++++++-
 1 file changed, 27 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 dcfffb271fcf3146aeabda8fc19e61b456b76887..aff5e80c1eba43e830991c2afd53b6322893cd27 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -162,6 +162,30 @@ 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;
+		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;
+		regulator-boot-on;
+	};
 };
 
 &adsp_pas {
@@ -429,6 +453,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>;
 
@@ -818,7 +844,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] 22+ messages in thread

* [PATCH 4/8] arm64: dts: qcom: sdm845-oneplus-fajita: Reflect used panel in compatible
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
                   ` (2 preceding siblings ...)
  2025-09-25  9:12 ` [PATCH 3/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-09-25  9:12 ` [PATCH 5/8] arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity David Heidelberg via B4 Relay
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
	David Heidelberg

From: David Heidelberg <david@ixit.cz>

Currently compatible was only reflecting DDIC used, but now it also
describe the panel itself.

Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
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 7e75decfda052b9639f2c0ecdac5a71196fc702f..55b3e94dd97262c765165b01b07bf7052e9ffcfb 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";
 };
 
 &i2c4 {

-- 
2.51.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 5/8] arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
                   ` (3 preceding siblings ...)
  2025-09-25  9:12 ` [PATCH 4/8] arm64: dts: qcom: sdm845-oneplus-fajita: Reflect used panel in compatible David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-09-25 19:34   ` Jens Reidel
  2025-09-25  9:12 ` [PATCH 6/8] arm64: dts: qcom: sdm845-oneplus: Document TE gpio David Heidelberg via B4 Relay
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
	David Heidelberg

From: David Heidelberg <david@ixit.cz>

Reset GPIO should be active in high state as usually the board doesn't
invert the polarity.

Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
Signed-off-by: David Heidelberg <david@ixit.cz>
---
 arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 2 +-
 1 file changed, 1 insertion(+), 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 aff5e80c1eba43e830991c2afd53b6322893cd27..7f968f90a83b869395bedd5de510ba96de3c4e94 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -456,7 +456,7 @@ display_panel: panel@0 {
 		vci-supply = <&panel_vci_3v3>;
 		poc-supply = <&panel_vddi_poc_1p8>;
 
-		reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
 
 		pinctrl-names = "default";
 		pinctrl-0 = <&panel_reset_pins &panel_te_pin &panel_esd_pin>;

-- 
2.51.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 6/8] arm64: dts: qcom: sdm845-oneplus: Document TE gpio
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
                   ` (4 preceding siblings ...)
  2025-09-25  9:12 ` [PATCH 5/8] arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-09-25  9:21   ` Konrad Dybcio
  2025-09-25  9:12 ` [PATCH 7/8] drm/panel: samsung-sofef00: Invert reset gpio polarity David Heidelberg via B4 Relay
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
	David Heidelberg

From: David Heidelberg <david@ixit.cz>

Document panel Tearing Effect (TE) GPIO line.

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 7f968f90a83b869395bedd5de510ba96de3c4e94..857702919084778e93da7c49afcfa6a0489d709e 100644
--- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
@@ -456,6 +456,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_HIGH>;
 
 		pinctrl-names = "default";

-- 
2.51.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 7/8] drm/panel: samsung-sofef00: Invert reset gpio polarity
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
                   ` (5 preceding siblings ...)
  2025-09-25  9:12 ` [PATCH 6/8] arm64: dts: qcom: sdm845-oneplus: Document TE gpio David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-09-25 21:00   ` Dmitry Baryshkov
  2025-09-25  9:12 ` [PATCH 8/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel,
	David Heidelberg

From: David Heidelberg <david@ixit.cz>

Follow the device-tree change for OnePlus 6/6T and invert the reset
polarity in the driver.

Fixes: 5933baa36e26 ("drm/panel/samsung-sofef00: Add panel for OnePlus 6/T devices")
Signed-off-by: David Heidelberg <david@ixit.cz>
---
 drivers/gpu/drm/panel/panel-samsung-sofef00.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-samsung-sofef00.c b/drivers/gpu/drm/panel/panel-samsung-sofef00.c
index 064258217d50ad6f02d27a97f8aff2e298260d4b..e29badbdb6b9ee0c63167d452d62ecb96e9caef8 100644
--- a/drivers/gpu/drm/panel/panel-samsung-sofef00.c
+++ b/drivers/gpu/drm/panel/panel-samsung-sofef00.c
@@ -32,11 +32,11 @@ struct sofef00_panel *to_sofef00_panel(struct drm_panel *panel)
 
 static void sofef00_panel_reset(struct sofef00_panel *ctx)
 {
-	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
-	usleep_range(5000, 6000);
 	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
-	usleep_range(2000, 3000);
+	usleep_range(5000, 6000);
 	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
+	usleep_range(2000, 3000);
+	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
 	usleep_range(12000, 13000);
 }
 
@@ -99,7 +99,7 @@ static int sofef00_panel_prepare(struct drm_panel *panel)
 
 	ret = sofef00_panel_on(ctx);
 	if (ret < 0) {
-		gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+		gpiod_set_value_cansleep(ctx->reset_gpio, 0);
 		return ret;
 	}
 
@@ -202,7 +202,7 @@ static int sofef00_panel_probe(struct mipi_dsi_device *dsi)
 		return dev_err_probe(dev, PTR_ERR(ctx->supply),
 				     "Failed to get vddio regulator\n");
 
-	ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
+	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");

-- 
2.51.0



^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 8/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
                   ` (6 preceding siblings ...)
  2025-09-25  9:12 ` [PATCH 7/8] drm/panel: samsung-sofef00: Invert reset gpio polarity David Heidelberg via B4 Relay
@ 2025-09-25  9:12 ` David Heidelberg via B4 Relay
  2025-09-27 19:37   ` kernel test robot
  2025-09-25  9:37 ` [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) Konrad Dybcio
  2025-09-25 14:12 ` Rob Herring (Arm)
  9 siblings, 1 reply; 22+ messages in thread
From: David Heidelberg via B4 Relay @ 2025-09-25  9:12 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, 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
  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.

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 | 404 +++++++++++++++++++++++
 4 files changed, 419 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 961f472e52039932e3208f7c0eb9aa0412b7f44b..58c65eff92633eb0765c80d2fc82406900634995 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8058,6 +8058,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 407c5f6a268b2ec66e5d0eddae26b3368e4cb2cb..39e9777640efd0db89db527cf6aebd4349b2e078 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 3615a761b44f9de0b4a653be157d8e0bcbc8f6b7..a2587c724331dccc2b8807ea194f5d86f73b1d8a 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 0000000000000000000000000000000000000000..46dd278a687dd591fc773e61f6515c27cbbdeb7b
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c
@@ -0,0 +1,404 @@
+// 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, 0);
+	usleep_range(5000, 6000);
+	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+	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);
+	struct device *dev = &ctx->dsi->dev;
+	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, 0);
+		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, 0);
+	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 samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
+	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;
+
+	/*  This panel needs the high and low bytes swapped
+	 *  for the brightness value
+	 */
+	brightness = __swab16(brightness);
+
+	err = mipi_dsi_dcs_set_display_brightness(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_HIGH);
+	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[] = {
+	{ .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] 22+ messages in thread

* Re: [PATCH 3/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies
  2025-09-25  9:12 ` [PATCH 3/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
@ 2025-09-25  9:20   ` Konrad Dybcio
  0 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2025-09-25  9:20 UTC (permalink / raw)
  To: david, Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel

On 9/25/25 11:12 AM, 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>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---

You may want to add a pinctrl config for them, to ensure the
GPIOs are not in a funky state

Konrad

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 6/8] arm64: dts: qcom: sdm845-oneplus: Document TE gpio
  2025-09-25  9:12 ` [PATCH 6/8] arm64: dts: qcom: sdm845-oneplus: Document TE gpio David Heidelberg via B4 Relay
@ 2025-09-25  9:21   ` Konrad Dybcio
  0 siblings, 0 replies; 22+ messages in thread
From: Konrad Dybcio @ 2025-09-25  9:21 UTC (permalink / raw)
  To: david, Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel

On 9/25/25 11:12 AM, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> Document panel Tearing Effect (TE) GPIO line.

"document" is a keyword in DT context, perhaps "describe" is what
you're looking for

with that changed:

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel)
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
                   ` (7 preceding siblings ...)
  2025-09-25  9:12 ` [PATCH 8/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
@ 2025-09-25  9:37 ` Konrad Dybcio
  2025-09-25 13:41   ` David Heidelberg
  2025-09-25 14:12 ` Rob Herring (Arm)
  9 siblings, 1 reply; 22+ messages in thread
From: Konrad Dybcio @ 2025-09-25  9:37 UTC (permalink / raw)
  To: david, Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel

On 9/25/25 11:12 AM, David Heidelberg via B4 Relay wrote:
> This patchset enables display on the OnePlus 6T smartphone.
> 
> Minor adjust to the device-tree of OnePlus 6 had to be done
> to properly document reset GPIO used. Also same adjustments
> had been done to the sofef00 panel driver (used by OnePlus 6).
> 
> In the last step new DDIC driver is introduced together with AMS641RW
> panel sequences.

I think you skipped the elephant in the room - some of these patches
break panel for the phone intermittently..

Konrad

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel)
  2025-09-25  9:37 ` [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) Konrad Dybcio
@ 2025-09-25 13:41   ` David Heidelberg
  0 siblings, 0 replies; 22+ messages in thread
From: David Heidelberg @ 2025-09-25 13:41 UTC (permalink / raw)
  To: Konrad Dybcio, Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel

On 25/09/2025 11:37, Konrad Dybcio wrote:
> On 9/25/25 11:12 AM, David Heidelberg via B4 Relay wrote:
>> This patchset enables display on the OnePlus 6T smartphone.
>>
>> Minor adjust to the device-tree of OnePlus 6 had to be done
>> to properly document reset GPIO used. Also same adjustments
>> had been done to the sofef00 panel driver (used by OnePlus 6).
>>
>> In the last step new DDIC driver is introduced together with AMS641RW
>> panel sequences.
> 
> I think you skipped the elephant in the room - some of these patches
> break panel for the phone intermittently..

Thank you for the review Konrad. I plan to incorporate all your 
suggested changes in the next revision.

To clarify, while sofef00 has been introduced as supporting OnePlus 6T 
too, but it never did (and the compatible was removed later).

All the changes CAN'T BREAK anything for OnePlus 6T display as it's not 
supported yet by mainline.

All the changes SHOULDN'T CHANGE anything for the OnePlus 6, as both 
sides (device-tree and the driver) is changed at once to correct reset 
polarity.

David

> 
> Konrad

-- 
David Heidelberg


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel)
  2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
                   ` (8 preceding siblings ...)
  2025-09-25  9:37 ` [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) Konrad Dybcio
@ 2025-09-25 14:12 ` Rob Herring (Arm)
  9 siblings, 0 replies; 22+ messages in thread
From: Rob Herring (Arm) @ 2025-09-25 14:12 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Casey Connolly, Sam Ravnborg, Simona Vetter, devicetree,
	Maarten Lankhorst, linux-arm-msm, phone-devel, Thomas Zimmermann,
	Krzysztof Kozlowski, Bjorn Andersson, Maxime Ripard,
	Jessica Zhang, David Airlie, Konrad Dybcio, Thierry Reding,
	dri-devel, Conor Dooley, Neil Armstrong, linux-kernel


On Thu, 25 Sep 2025 11:12:46 +0200, David Heidelberg wrote:
> This patchset enables display on the OnePlus 6T smartphone.
> 
> Minor adjust to the device-tree of OnePlus 6 had to be done
> to properly document reset GPIO used. Also same adjustments
> had been done to the sofef00 panel driver (used by OnePlus 6).
> 
> In the last step new DDIC driver is introduced together with AMS641RW
> panel sequences.
> 
> Signed-off-by: David Heidelberg <david@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
>       dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible
>       arm64: dts: qcom: sdm845-oneplus-fajita: Reflect used panel in compatible
>       arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity
>       arm64: dts: qcom: sdm845-oneplus: Document TE gpio
>       drm/panel: samsung-sofef00: Invert reset gpio polarity
>       drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
> 
>  .../bindings/display/panel/panel-simple-dsi.yaml   |   2 -
>  .../bindings/display/panel/samsung,s6e3fc2x01.yaml |  77 ++++
>  MAINTAINERS                                        |   6 +
>  .../arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi |  31 +-
>  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   | 404 +++++++++++++++++++++
>  drivers/gpu/drm/panel/panel-samsung-sofef00.c      |  10 +-
>  9 files changed, 536 insertions(+), 10 deletions(-)
> ---
> base-commit: ce7f1a983b074f6cf8609068088ca3182c569ee4
> change-id: 20250923-s6e3fc2x01-f9550b822fe5
> 
> Best regards,
> --
> David Heidelberg <david@ixit.cz>
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


This patch series was applied (using b4) to base:
 Base: using specified base-commit ce7f1a983b074f6cf8609068088ca3182c569ee4

If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/qcom/' for 20250925-s6e3fc2x01-v1-0-9293016768f7@ixit.cz:

arch/arm64/boot/dts/qcom/sdm845-oneplus-enchilada.dtb: panel@0 (samsung,sofef00): 'poc-supply', 'te-gpios', 'vci-supply' do not match any of the regexes: '^pinctrl-[0-9]+$'
	from schema $id: http://devicetree.org/schemas/display/panel/panel-simple-dsi.yaml#






^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 5/8] arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity
  2025-09-25  9:12 ` [PATCH 5/8] arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity David Heidelberg via B4 Relay
@ 2025-09-25 19:34   ` Jens Reidel
  0 siblings, 0 replies; 22+ messages in thread
From: Jens Reidel @ 2025-09-25 19:34 UTC (permalink / raw)
  To: david, Neil Armstrong, Jessica Zhang, 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
  Cc: dri-devel, devicetree, linux-kernel, linux-arm-msm, phone-devel

On 9/25/25 11:12, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> Reset GPIO should be active in high state as usually the board doesn't
> invert the polarity.
> 
> Fixes: 288ef8a42612 ("arm64: dts: sdm845: add oneplus6/6t devices")
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>   arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi | 2 +-
>   1 file changed, 1 insertion(+), 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 aff5e80c1eba43e830991c2afd53b6322893cd27..7f968f90a83b869395bedd5de510ba96de3c4e94 100644
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> @@ -456,7 +456,7 @@ display_panel: panel@0 {
>   		vci-supply = <&panel_vci_3v3>;
>   		poc-supply = <&panel_vddi_poc_1p8>;
>   
> -		reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
> +		reset-gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>;
>   
>   		pinctrl-names = "default";
>   		pinctrl-0 = <&panel_reset_pins &panel_te_pin &panel_esd_pin>;
> 

Hi David,

according to the schematics available to me, this GPIO is active low (as 
on most other Qualcomm phones). I'd suggest dropping this and the driver 
change.

Best regards,
Jens

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible
  2025-09-25  9:12 ` [PATCH 2/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible David Heidelberg via B4 Relay
@ 2025-09-25 20:51   ` Dmitry Baryshkov
  2025-10-02  1:05     ` Rob Herring
  0 siblings, 1 reply; 22+ messages in thread
From: Dmitry Baryshkov @ 2025-09-25 20:51 UTC (permalink / raw)
  To: david
  Cc: Neil Armstrong, Jessica Zhang, 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, dri-devel,
	devicetree, linux-kernel, linux-arm-msm, phone-devel

On Thu, Sep 25, 2025 at 11:12:48AM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> Follow up commit introduce the proper device tree definition for the DDIC.

And the reason being?

> 
> 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 9b92a05791ccf99061ab7a1e01937bb832a96fe6..6c1249a224c8a170b33fd3f331f985f16914cb2c 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
> 
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 7/8] drm/panel: samsung-sofef00: Invert reset gpio polarity
  2025-09-25  9:12 ` [PATCH 7/8] drm/panel: samsung-sofef00: Invert reset gpio polarity David Heidelberg via B4 Relay
@ 2025-09-25 21:00   ` Dmitry Baryshkov
  2025-09-26 11:45     ` David Heidelberg
  0 siblings, 1 reply; 22+ messages in thread
From: Dmitry Baryshkov @ 2025-09-25 21:00 UTC (permalink / raw)
  To: david
  Cc: Neil Armstrong, Jessica Zhang, 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, dri-devel,
	devicetree, linux-kernel, linux-arm-msm, phone-devel

On Thu, Sep 25, 2025 at 11:12:53AM +0200, David Heidelberg via B4 Relay wrote:
> From: David Heidelberg <david@ixit.cz>
> 
> Follow the device-tree change for OnePlus 6/6T and invert the reset
> polarity in the driver.

Reset is usually active-low. On most of the boards it is described as
RESET#.

> 
> Fixes: 5933baa36e26 ("drm/panel/samsung-sofef00: Add panel for OnePlus 6/T devices")
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  drivers/gpu/drm/panel/panel-samsung-sofef00.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 

-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 7/8] drm/panel: samsung-sofef00: Invert reset gpio polarity
  2025-09-25 21:00   ` Dmitry Baryshkov
@ 2025-09-26 11:45     ` David Heidelberg
  0 siblings, 0 replies; 22+ messages in thread
From: David Heidelberg @ 2025-09-26 11:45 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Neil Armstrong, Jessica Zhang, 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, dri-devel,
	devicetree, linux-kernel, linux-arm-msm, phone-devel

Thank you, in v2 I'll drop the invert and revert polarity in the 
S6E3FC2X01. Jens confirmed that GPIO should stay as is.

David

On 25/09/2025 23:00, Dmitry Baryshkov wrote:
> On Thu, Sep 25, 2025 at 11:12:53AM +0200, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@ixit.cz>
>>
>> Follow the device-tree change for OnePlus 6/6T and invert the reset
>> polarity in the driver.
> 
> Reset is usually active-low. On most of the boards it is described as
> RESET#.
> 
>>
>> Fixes: 5933baa36e26 ("drm/panel/samsung-sofef00: Add panel for OnePlus 6/T devices")
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>>   drivers/gpu/drm/panel/panel-samsung-sofef00.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>>
> 

-- 
David Heidelberg


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 8/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
  2025-09-25  9:12 ` [PATCH 8/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
@ 2025-09-27 19:37   ` kernel test robot
  0 siblings, 0 replies; 22+ messages in thread
From: kernel test robot @ 2025-09-27 19:37 UTC (permalink / raw)
  To: David Heidelberg via B4 Relay, Neil Armstrong, Jessica Zhang,
	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
  Cc: llvm, oe-kbuild-all, dri-devel, devicetree, linux-kernel,
	linux-arm-msm, phone-devel, David Heidelberg

Hi David,

kernel test robot noticed the following build warnings:

[auto build test WARNING on ce7f1a983b074f6cf8609068088ca3182c569ee4]

url:    https://github.com/intel-lab-lkp/linux/commits/David-Heidelberg-via-B4-Relay/dt-bindings-panel-Add-Samsung-S6E3FC2X01-DDIC-with-panel/20250925-171444
base:   ce7f1a983b074f6cf8609068088ca3182c569ee4
patch link:    https://lore.kernel.org/r/20250925-s6e3fc2x01-v1-8-9293016768f7%40ixit.cz
patch subject: [PATCH 8/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20250928/202509280303.sWeQi4ks-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250928/202509280303.sWeQi4ks-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202509280303.sWeQi4ks-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c:210:17: warning: unused variable 'dev' [-Wunused-variable]
     210 |         struct device *dev = &ctx->dsi->dev;
         |                        ^~~
>> drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c:256:29: warning: unused variable 'ctx' [-Wunused-variable]
     256 |         struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
         |                                    ^~~
   2 warnings generated.


vim +/dev +210 drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c

   206	
   207	static int s6e3fc2x01_prepare(struct drm_panel *panel)
   208	{
   209		struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
 > 210		struct device *dev = &ctx->dsi->dev;
   211		int ret;
   212	
   213		ret = regulator_bulk_enable(ARRAY_SIZE(s6e3fc2x01_supplies), ctx->supplies);
   214		if (ret < 0)
   215			return ret;
   216	
   217		s6e3fc2x01_reset(ctx);
   218	
   219		ret = s6e3fc2x01_on(ctx);
   220		if (ret < 0) {
   221			gpiod_set_value_cansleep(ctx->reset_gpio, 0);
   222			regulator_bulk_disable(ARRAY_SIZE(s6e3fc2x01_supplies), ctx->supplies);
   223			return ret;
   224		}
   225	
   226		return 0;
   227	}
   228	
   229	static int s6e3fc2x01_unprepare(struct drm_panel *panel)
   230	{
   231		struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
   232	
   233		gpiod_set_value_cansleep(ctx->reset_gpio, 0);
   234		regulator_bulk_disable(ARRAY_SIZE(s6e3fc2x01_supplies), ctx->supplies);
   235	
   236		return 0;
   237	}
   238	
   239	static const struct drm_display_mode ams641rw_mode = {
   240		.clock = (1080 + 72 + 16 + 36) * (2340 + 32 + 4 + 18) * 60 / 1000,
   241		.hdisplay = 1080,
   242		.hsync_start = 1080 + 72,
   243		.hsync_end = 1080 + 72 + 16,
   244		.htotal = 1080 + 72 + 16 + 36,
   245		.vdisplay = 2340,
   246		.vsync_start = 2340 + 32,
   247		.vsync_end = 2340 + 32 + 4,
   248		.vtotal = 2340 + 32 + 4 + 18,
   249		.width_mm = 68,
   250		.height_mm = 145,
   251	};
   252	
   253	static int s6e3fc2x01_get_modes(struct drm_panel *panel,
   254						struct drm_connector *connector)
   255	{
 > 256		struct samsung_s6e3fc2x01 *ctx = to_samsung_s6e3fc2x01(panel);
   257		struct drm_display_mode *mode;
   258	
   259		mode = drm_mode_duplicate(connector->dev, &ams641rw_mode);
   260		if (!mode)
   261			return -ENOMEM;
   262	
   263		drm_mode_set_name(mode);
   264	
   265		mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
   266		connector->display_info.width_mm = mode->width_mm;
   267		connector->display_info.height_mm = mode->height_mm;
   268		drm_mode_probed_add(connector, mode);
   269	
   270		return 1;
   271	}
   272	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel
  2025-09-25  9:12 ` [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
@ 2025-10-02  1:00   ` Rob Herring (Arm)
  2025-10-02  1:06   ` Rob Herring
  1 sibling, 0 replies; 22+ messages in thread
From: Rob Herring (Arm) @ 2025-10-02  1:00 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Konrad Dybcio, Maxime Ripard, linux-arm-msm, Thomas Zimmermann,
	Simona Vetter, Thierry Reding, Krzysztof Kozlowski,
	Bjorn Andersson, devicetree, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Casey Connolly, David Airlie, linux-kernel,
	dri-devel, Conor Dooley, phone-devel, Sam Ravnborg


On Thu, 25 Sep 2025 11:12:47 +0200, David Heidelberg wrote:
> Basic description for S6E3FC2X01 DDIC with attached panel AMS641RW.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  .../bindings/display/panel/samsung,s6e3fc2x01.yaml | 77 ++++++++++++++++++++++
>  MAINTAINERS                                        |  5 ++
>  2 files changed, 82 insertions(+)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible
  2025-09-25 20:51   ` Dmitry Baryshkov
@ 2025-10-02  1:05     ` Rob Herring
  0 siblings, 0 replies; 22+ messages in thread
From: Rob Herring @ 2025-10-02  1:05 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: david, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
	Bjorn Andersson, Konrad Dybcio, Casey Connolly, dri-devel,
	devicetree, linux-kernel, linux-arm-msm, phone-devel

On Thu, Sep 25, 2025 at 11:51:47PM +0300, Dmitry Baryshkov wrote:
> On Thu, Sep 25, 2025 at 11:12:48AM +0200, David Heidelberg via B4 Relay wrote:
> > From: David Heidelberg <david@ixit.cz>
> > 
> > Follow up commit introduce the proper device tree definition for the DDIC.
> 
> And the reason being?
> 
> > 
> > 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 9b92a05791ccf99061ab7a1e01937bb832a96fe6..6c1249a224c8a170b33fd3f331f985f16914cb2c 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

If this is already in use, you can't just remove it. In the end, 
compatible is just a unique id. So if this referred to a specific panel 
used, then we are stuck with it even if the naming is not ideal.

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel
  2025-09-25  9:12 ` [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
  2025-10-02  1:00   ` Rob Herring (Arm)
@ 2025-10-02  1:06   ` Rob Herring
  1 sibling, 0 replies; 22+ messages in thread
From: Rob Herring @ 2025-10-02  1:06 UTC (permalink / raw)
  To: David Heidelberg
  Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter,
	Krzysztof Kozlowski, Conor Dooley, Thierry Reding, Sam Ravnborg,
	Bjorn Andersson, Konrad Dybcio, Casey Connolly, dri-devel,
	devicetree, linux-kernel, linux-arm-msm, phone-devel

On Thu, Sep 25, 2025 at 11:12:47AM +0200, David Heidelberg wrote:
> Basic description for S6E3FC2X01 DDIC with attached panel AMS641RW.
> 
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
>  .../bindings/display/panel/samsung,s6e3fc2x01.yaml | 77 ++++++++++++++++++++++
>  MAINTAINERS                                        |  5 ++
>  2 files changed, 82 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 0000000000000000000000000000000000000000..489b6b52effe1e627ff5ef5891729c175ad71685
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml
> @@ -0,0 +1,77 @@
> +# 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:
> +    const: samsung,s6e3fc2x01-ams641rw

On second thought, this doesn't even tell me the resolution of the 
panel. The existing compatible you remove at least did that.

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-10-02  1:06 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-25  9:12 [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) David Heidelberg via B4 Relay
2025-09-25  9:12 ` [PATCH 1/8] dt-bindings: panel: Add Samsung S6E3FC2X01 DDIC with panel David Heidelberg via B4 Relay
2025-10-02  1:00   ` Rob Herring (Arm)
2025-10-02  1:06   ` Rob Herring
2025-09-25  9:12 ` [PATCH 2/8] dt-bindings: display: panel-simple-dsi: Remove Samsung S6E3FC2 compatible David Heidelberg via B4 Relay
2025-09-25 20:51   ` Dmitry Baryshkov
2025-10-02  1:05     ` Rob Herring
2025-09-25  9:12 ` [PATCH 3/8] arm64: dts: qcom: sdm845-oneplus: Describe panel vci and poc supplies David Heidelberg via B4 Relay
2025-09-25  9:20   ` Konrad Dybcio
2025-09-25  9:12 ` [PATCH 4/8] arm64: dts: qcom: sdm845-oneplus-fajita: Reflect used panel in compatible David Heidelberg via B4 Relay
2025-09-25  9:12 ` [PATCH 5/8] arm64: dts: qcom: sdm845-oneplus: Correct panel reset gpio polarity David Heidelberg via B4 Relay
2025-09-25 19:34   ` Jens Reidel
2025-09-25  9:12 ` [PATCH 6/8] arm64: dts: qcom: sdm845-oneplus: Document TE gpio David Heidelberg via B4 Relay
2025-09-25  9:21   ` Konrad Dybcio
2025-09-25  9:12 ` [PATCH 7/8] drm/panel: samsung-sofef00: Invert reset gpio polarity David Heidelberg via B4 Relay
2025-09-25 21:00   ` Dmitry Baryshkov
2025-09-26 11:45     ` David Heidelberg
2025-09-25  9:12 ` [PATCH 8/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel David Heidelberg via B4 Relay
2025-09-27 19:37   ` kernel test robot
2025-09-25  9:37 ` [PATCH 0/8] Add OnePlus 6T display (Samsung S6E3FC2X01 DDIC with AMS641RW panel) Konrad Dybcio
2025-09-25 13:41   ` David Heidelberg
2025-09-25 14:12 ` Rob Herring (Arm)

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).