devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6
@ 2025-03-27 16:56 Christopher Obbard
  2025-03-27 16:56 ` [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel Christopher Obbard
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Christopher Obbard @ 2025-03-27 16:56 UTC (permalink / raw)
  To: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov
  Cc: dri-devel, linux-kernel, linux-arm-msm, Johan Hovold,
	Rui Miguel Silva, Abel Vesa, devicetree, Christopher Obbard,
	Bryan O'Donoghue

The Snapdragon Lenovo T14s Gen6 can be bought with a number of different
panels. This patch series adds support for the OLED model which has a
Samsung ATNA40YK20 panel.

With this patch series, the backlight of the OLED eDP panel does not
illuminate since the brightness is incorrectly read from the eDP panel
as 0 (to be clear this is not a regression). This will be fixed in a
follow-up patch series as it does not block the device tree patches.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
---
Changes in v3:
- Added review trailers from v2.
- Dropped dt-binding documentation patch (applied by Douglas Anderson into
  drm-misc-next).
- Dropped eDP maximum brightness patch (will be sent in separate
  series).
- Removed duplicate nodes in T14s OLED device tree.
- Reworked WIP comments from commit messages.
- Link to v2: https://lore.kernel.org/r/20250325-wip-obbardc-qcom-t14s-oled-panel-v2-0-e9bc7c9d30cc@linaro.org

Changes in v2:
- Use the existing atna33xc20 driver rather than panel-edp.
- Add eDP panel into OLED devicetree.
- Add patch to read the correct maximum brightness from the eDP panel.
- Link to v1: https://lore.kernel.org/r/20250320-wip-obbardc-qcom-t14s-oled-panel-v1-1-05bc4bdcd82a@linaro.org

---
Christopher Obbard (2):
      arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
      arm64: dts: qcom: x1e78100-t14s-oled: add eDP panel

 .../boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts      |  8 ++++++++
 arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi   | 11 +++++++++++
 2 files changed, 19 insertions(+)
---
base-commit: b6ae34803e82511009e2b78dc4fd154330ecdc2d
change-id: 20250320-wip-obbardc-qcom-t14s-oled-panel-b74fed21d600

Best regards,
-- 
Christopher Obbard <christopher.obbard@linaro.org>


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

* [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
  2025-03-27 16:56 [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 Christopher Obbard
@ 2025-03-27 16:56 ` Christopher Obbard
  2025-03-27 18:18   ` Dmitry Baryshkov
  2025-03-31  7:50   ` Johan Hovold
  2025-03-27 16:56 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s-oled: add " Christopher Obbard
  2025-03-30  0:27 ` [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 Rob Herring (Arm)
  2 siblings, 2 replies; 11+ messages in thread
From: Christopher Obbard @ 2025-03-27 16:56 UTC (permalink / raw)
  To: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov
  Cc: dri-devel, linux-kernel, linux-arm-msm, Johan Hovold,
	Rui Miguel Silva, Abel Vesa, devicetree, Christopher Obbard,
	Bryan O'Donoghue

The eDP panel has an HPD GPIO. Describe it in the device tree
for the generic T14s model, as the HPD GPIO property is used in
both the OLED and LCD models which inherit this device tree.

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
index 962fb050c55c4fd33f480a21a8c47a484d0c82b8..46c73f5c039ed982b553636cf8c4237a20ba7687 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
@@ -980,8 +980,12 @@ &mdss_dp3 {
 	aux-bus {
 		panel: panel {
 			compatible = "edp-panel";
+			hpd-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
 			power-supply = <&vreg_edp_3p3>;
 
+			pinctrl-0 = <&edp_hpd_n_default>;
+			pinctrl-names = "default";
+
 			port {
 				edp_panel_in: endpoint {
 					remote-endpoint = <&mdss_dp3_out>;
@@ -1286,6 +1290,13 @@ hall_int_n_default: hall-int-n-state {
 		bias-disable;
 	};
 
+	edp_hpd_n_default: edp-hpd-n-state {
+		pins = "gpio119";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
+
 	pcie4_default: pcie4-default-state {
 		clkreq-n-pins {
 			pins = "gpio147";

-- 
2.49.0


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

* [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s-oled: add eDP panel
  2025-03-27 16:56 [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 Christopher Obbard
  2025-03-27 16:56 ` [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel Christopher Obbard
@ 2025-03-27 16:56 ` Christopher Obbard
  2025-03-27 18:19   ` Dmitry Baryshkov
  2025-03-30  0:27 ` [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 Rob Herring (Arm)
  2 siblings, 1 reply; 11+ messages in thread
From: Christopher Obbard @ 2025-03-27 16:56 UTC (permalink / raw)
  To: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov
  Cc: dri-devel, linux-kernel, linux-arm-msm, Johan Hovold,
	Rui Miguel Silva, Abel Vesa, devicetree, Christopher Obbard

Add the Samsung ATNA40YK20 eDP panel to the device tree for the
Snapdragon T14s OLED model.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
---
 arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
index be65fafafa736a0401a5872c40f69cb20cfbbd90..9a5197dcb2651c22f89e98cf523682bff17e22c3 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts
@@ -10,3 +10,11 @@ / {
 	compatible = "lenovo,thinkpad-t14s-oled", "lenovo,thinkpad-t14s",
 		     "qcom,x1e78100", "qcom,x1e80100";
 };
+
+&panel {
+	compatible = "samsung,atna40yk20", "samsung,atna33xc20";
+	enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
+
+	pinctrl-0 = <&edp_bl_en>, <&edp_hpd_n_default>;
+	pinctrl-names = "default";
+};

-- 
2.49.0


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

* Re: [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
  2025-03-27 16:56 ` [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel Christopher Obbard
@ 2025-03-27 18:18   ` Dmitry Baryshkov
  2025-03-31  7:50   ` Johan Hovold
  1 sibling, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2025-03-27 18:18 UTC (permalink / raw)
  To: Christopher Obbard
  Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, dri-devel, linux-kernel,
	linux-arm-msm, Johan Hovold, Rui Miguel Silva, Abel Vesa,
	devicetree, Bryan O'Donoghue

On Thu, Mar 27, 2025 at 04:56:53PM +0000, Christopher Obbard wrote:
> The eDP panel has an HPD GPIO. Describe it in the device tree
> for the generic T14s model, as the HPD GPIO property is used in
> both the OLED and LCD models which inherit this device tree.
> 
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

-- 
With best wishes
Dmitry

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

* Re: [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s-oled: add eDP panel
  2025-03-27 16:56 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s-oled: add " Christopher Obbard
@ 2025-03-27 18:19   ` Dmitry Baryshkov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2025-03-27 18:19 UTC (permalink / raw)
  To: Christopher Obbard
  Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, dri-devel, linux-kernel,
	linux-arm-msm, Johan Hovold, Rui Miguel Silva, Abel Vesa,
	devicetree

On Thu, Mar 27, 2025 at 04:56:54PM +0000, Christopher Obbard wrote:
> Add the Samsung ATNA40YK20 eDP panel to the device tree for the
> Snapdragon T14s OLED model.
> 
> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts | 8 ++++++++
>  1 file changed, 8 insertions(+)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

-- 
With best wishes
Dmitry

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

* Re: [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6
  2025-03-27 16:56 [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 Christopher Obbard
  2025-03-27 16:56 ` [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel Christopher Obbard
  2025-03-27 16:56 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s-oled: add " Christopher Obbard
@ 2025-03-30  0:27 ` Rob Herring (Arm)
  2 siblings, 0 replies; 11+ messages in thread
From: Rob Herring (Arm) @ 2025-03-30  0:27 UTC (permalink / raw)
  To: Christopher Obbard
  Cc: Konrad Dybcio, Krzysztof Kozlowski, Bryan O'Donoghue,
	Douglas Anderson, Conor Dooley, Bjorn Andersson, Abel Vesa,
	Rui Miguel Silva, Thomas Zimmermann, Maxime Ripard, Simona Vetter,
	Dmitry Baryshkov, linux-arm-msm, David Airlie, Neil Armstrong,
	devicetree, linux-kernel, Jessica Zhang, Maarten Lankhorst,
	Johan Hovold, dri-devel


On Thu, 27 Mar 2025 16:56:52 +0000, Christopher Obbard wrote:
> The Snapdragon Lenovo T14s Gen6 can be bought with a number of different
> panels. This patch series adds support for the OLED model which has a
> Samsung ATNA40YK20 panel.
> 
> With this patch series, the backlight of the OLED eDP panel does not
> illuminate since the brightness is incorrectly read from the eDP panel
> as 0 (to be clear this is not a regression). This will be fixed in a
> follow-up patch series as it does not block the device tree patches.
> 
> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> ---
> Changes in v3:
> - Added review trailers from v2.
> - Dropped dt-binding documentation patch (applied by Douglas Anderson into
>   drm-misc-next).
> - Dropped eDP maximum brightness patch (will be sent in separate
>   series).
> - Removed duplicate nodes in T14s OLED device tree.
> - Reworked WIP comments from commit messages.
> - Link to v2: https://lore.kernel.org/r/20250325-wip-obbardc-qcom-t14s-oled-panel-v2-0-e9bc7c9d30cc@linaro.org
> 
> Changes in v2:
> - Use the existing atna33xc20 driver rather than panel-edp.
> - Add eDP panel into OLED devicetree.
> - Add patch to read the correct maximum brightness from the eDP panel.
> - Link to v1: https://lore.kernel.org/r/20250320-wip-obbardc-qcom-t14s-oled-panel-v1-1-05bc4bdcd82a@linaro.org
> 
> ---
> Christopher Obbard (2):
>       arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
>       arm64: dts: qcom: x1e78100-t14s-oled: add eDP panel
> 
>  .../boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dts      |  8 ++++++++
>  arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi   | 11 +++++++++++
>  2 files changed, 19 insertions(+)
> ---
> base-commit: b6ae34803e82511009e2b78dc4fd154330ecdc2d
> change-id: 20250320-wip-obbardc-qcom-t14s-oled-panel-b74fed21d600
> 
> Best regards,
> --
> Christopher Obbard <christopher.obbard@linaro.org>
> 
> 
> 


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 b6ae34803e82511009e2b78dc4fd154330ecdc2d

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 20250327-wip-obbardc-qcom-t14s-oled-panel-v3-0-45d5f2747398@linaro.org:

arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dtb: panel: compatible: 'oneOf' conditional failed, one must be fixed:
	['samsung,atna40yk20', 'samsung,atna33xc20'] is too long
	'samsung,atna33xc20' was expected
	'samsung,atna40yk20' is not one of ['samsung,atna45af01', 'samsung,atna45dc02', 'samsung,atna56ac03']
	from schema $id: http://devicetree.org/schemas/display/panel/samsung,atna33xc20.yaml#
arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s-oled.dtb: /soc@0/display-subsystem@ae00000/displayport-controller@aea0000/aux-bus/panel: failed to match any schema with compatible: ['samsung,atna40yk20', 'samsung,atna33xc20']






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

* Re: [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
  2025-03-27 16:56 ` [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel Christopher Obbard
  2025-03-27 18:18   ` Dmitry Baryshkov
@ 2025-03-31  7:50   ` Johan Hovold
  2025-03-31 15:39     ` Christopher Obbard
  1 sibling, 1 reply; 11+ messages in thread
From: Johan Hovold @ 2025-03-31  7:50 UTC (permalink / raw)
  To: Christopher Obbard
  Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov, dri-devel,
	linux-kernel, linux-arm-msm, Rui Miguel Silva, Abel Vesa,
	devicetree, Bryan O'Donoghue

On Thu, Mar 27, 2025 at 04:56:53PM +0000, Christopher Obbard wrote:
> The eDP panel has an HPD GPIO. Describe it in the device tree
> for the generic T14s model, as the HPD GPIO property is used in
> both the OLED and LCD models which inherit this device tree.

AFAICT, this patch is not correct as the hotplug detect signal is
connected directly to the display controller on (these) Qualcomm SoCs
and is already handled by its driver.

Describing it as you do here leads to less accurate delays, see commits:
	
	2327b13d6c47 ("drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux").
	3b5765df375c ("drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux")

Perhaps you lose some other functionality too.
 
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> ---
>  arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> index 962fb050c55c4fd33f480a21a8c47a484d0c82b8..46c73f5c039ed982b553636cf8c4237a20ba7687 100644
> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> @@ -980,8 +980,12 @@ &mdss_dp3 {
>  	aux-bus {
>  		panel: panel {
>  			compatible = "edp-panel";
> +			hpd-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
>  			power-supply = <&vreg_edp_3p3>;
>  
> +			pinctrl-0 = <&edp_hpd_n_default>;
> +			pinctrl-names = "default";
> +
>  			port {
>  				edp_panel_in: endpoint {
>  					remote-endpoint = <&mdss_dp3_out>;
> @@ -1286,6 +1290,13 @@ hall_int_n_default: hall-int-n-state {
>  		bias-disable;
>  	};
>  
> +	edp_hpd_n_default: edp-hpd-n-state {
> +		pins = "gpio119";
> +		function = "gpio";
> +		drive-strength = <2>;
> +		bias-pull-up;
> +	};

I checked the firmware configuration for this pin on my T14s, which
does not match what you have here. Instead the function is set to
"edp0_hot" which forwards the signal to the display controller which
already handles the signal on panel power on. (And there is also no
internal pull up enabled).

We may want to describe this pin configuration somewhere, but that's a
separate issue.

Johan

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

* Re: [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
  2025-03-31  7:50   ` Johan Hovold
@ 2025-03-31 15:39     ` Christopher Obbard
  2025-03-31 15:49       ` Dmitry Baryshkov
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher Obbard @ 2025-03-31 15:39 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov, dri-devel,
	linux-kernel, linux-arm-msm, Rui Miguel Silva, Abel Vesa,
	devicetree, Bryan O'Donoghue

Hi Johan,

On Mon, 31 Mar 2025 at 09:50, Johan Hovold <johan@kernel.org> wrote:
>
> On Thu, Mar 27, 2025 at 04:56:53PM +0000, Christopher Obbard wrote:
> > The eDP panel has an HPD GPIO. Describe it in the device tree
> > for the generic T14s model, as the HPD GPIO property is used in
> > both the OLED and LCD models which inherit this device tree.
>
> AFAICT, this patch is not correct as the hotplug detect signal is
> connected directly to the display controller on (these) Qualcomm SoCs
> and is already handled by its driver.
>
> Describing it as you do here leads to less accurate delays, see commits:
>
>         2327b13d6c47 ("drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux").
>         3b5765df375c ("drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux")
>
> Perhaps you lose some other functionality too.
>
> > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> > ---
> >  arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> > index 962fb050c55c4fd33f480a21a8c47a484d0c82b8..46c73f5c039ed982b553636cf8c4237a20ba7687 100644
> > --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> > @@ -980,8 +980,12 @@ &mdss_dp3 {
> >       aux-bus {
> >               panel: panel {
> >                       compatible = "edp-panel";
> > +                     hpd-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
> >                       power-supply = <&vreg_edp_3p3>;
> >
> > +                     pinctrl-0 = <&edp_hpd_n_default>;
> > +                     pinctrl-names = "default";
> > +
> >                       port {
> >                               edp_panel_in: endpoint {
> >                                       remote-endpoint = <&mdss_dp3_out>;
> > @@ -1286,6 +1290,13 @@ hall_int_n_default: hall-int-n-state {
> >               bias-disable;
> >       };
> >
> > +     edp_hpd_n_default: edp-hpd-n-state {
> > +             pins = "gpio119";
> > +             function = "gpio";
> > +             drive-strength = <2>;
> > +             bias-pull-up;
> > +     };
>
> I checked the firmware configuration for this pin on my T14s, which
> does not match what you have here. Instead the function is set to
> "edp0_hot" which forwards the signal to the display controller which
> already handles the signal on panel power on. (And there is also no
> internal pull up enabled).
>
> We may want to describe this pin configuration somewhere, but that's a
> separate issue.

Thanks for your review, I will send another version in coming days and
drop this first patch (adding hpd to the T14s DTSI).

As a consequence I will need to add no-hpd property to the panel node.
I will add a short comment about how the hpd signal is handled by the
driver already.

Thanks!

Chris

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

* Re: [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
  2025-03-31 15:39     ` Christopher Obbard
@ 2025-03-31 15:49       ` Dmitry Baryshkov
  2025-03-31 21:38         ` Christopher Obbard
  0 siblings, 1 reply; 11+ messages in thread
From: Dmitry Baryshkov @ 2025-03-31 15:49 UTC (permalink / raw)
  To: Christopher Obbard, Johan Hovold
  Cc: Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, dri-devel, linux-kernel,
	linux-arm-msm, Rui Miguel Silva, Abel Vesa, devicetree,
	Bryan O'Donoghue

On 31/03/2025 18:39, Christopher Obbard wrote:
> Hi Johan,
> 
> On Mon, 31 Mar 2025 at 09:50, Johan Hovold <johan@kernel.org> wrote:
>>
>> On Thu, Mar 27, 2025 at 04:56:53PM +0000, Christopher Obbard wrote:
>>> The eDP panel has an HPD GPIO. Describe it in the device tree
>>> for the generic T14s model, as the HPD GPIO property is used in
>>> both the OLED and LCD models which inherit this device tree.
>>
>> AFAICT, this patch is not correct as the hotplug detect signal is
>> connected directly to the display controller on (these) Qualcomm SoCs
>> and is already handled by its driver.
>>
>> Describing it as you do here leads to less accurate delays, see commits:
>>
>>          2327b13d6c47 ("drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux").
>>          3b5765df375c ("drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux")
>>
>> Perhaps you lose some other functionality too.
>>
>>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
>>> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
>>> ---
>>>   arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 11 +++++++++++
>>>   1 file changed, 11 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
>>> index 962fb050c55c4fd33f480a21a8c47a484d0c82b8..46c73f5c039ed982b553636cf8c4237a20ba7687 100644
>>> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
>>> @@ -980,8 +980,12 @@ &mdss_dp3 {
>>>        aux-bus {
>>>                panel: panel {
>>>                        compatible = "edp-panel";
>>> +                     hpd-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
>>>                        power-supply = <&vreg_edp_3p3>;
>>>
>>> +                     pinctrl-0 = <&edp_hpd_n_default>;
>>> +                     pinctrl-names = "default";
>>> +
>>>                        port {
>>>                                edp_panel_in: endpoint {
>>>                                        remote-endpoint = <&mdss_dp3_out>;
>>> @@ -1286,6 +1290,13 @@ hall_int_n_default: hall-int-n-state {
>>>                bias-disable;
>>>        };
>>>
>>> +     edp_hpd_n_default: edp-hpd-n-state {
>>> +             pins = "gpio119";
>>> +             function = "gpio";
>>> +             drive-strength = <2>;
>>> +             bias-pull-up;
>>> +     };
>>
>> I checked the firmware configuration for this pin on my T14s, which
>> does not match what you have here. Instead the function is set to
>> "edp0_hot" which forwards the signal to the display controller which
>> already handles the signal on panel power on. (And there is also no
>> internal pull up enabled).
>>
>> We may want to describe this pin configuration somewhere, but that's a
>> separate issue.
> 
> Thanks for your review, I will send another version in coming days and
> drop this first patch (adding hpd to the T14s DTSI).
> 
> As a consequence I will need to add no-hpd property to the panel node.

No, you won't. There is a HPD line and it is routed to the DP controller.

> I will add a short comment about how the hpd signal is handled by the
> driver already.

-- 
With best wishes
Dmitry

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

* Re: [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
  2025-03-31 15:49       ` Dmitry Baryshkov
@ 2025-03-31 21:38         ` Christopher Obbard
  2025-03-31 22:00           ` Dmitry Baryshkov
  0 siblings, 1 reply; 11+ messages in thread
From: Christopher Obbard @ 2025-03-31 21:38 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Johan Hovold, Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, dri-devel, linux-kernel,
	linux-arm-msm, Rui Miguel Silva, Abel Vesa, devicetree,
	Bryan O'Donoghue

Hi Dmitry,

On Mon, 31 Mar 2025 at 17:49, Dmitry Baryshkov
<dmitry.baryshkov@oss.qualcomm.com> wrote:
>
> On 31/03/2025 18:39, Christopher Obbard wrote:
> > Hi Johan,
> >
> > On Mon, 31 Mar 2025 at 09:50, Johan Hovold <johan@kernel.org> wrote:
> >>
> >> On Thu, Mar 27, 2025 at 04:56:53PM +0000, Christopher Obbard wrote:
> >>> The eDP panel has an HPD GPIO. Describe it in the device tree
> >>> for the generic T14s model, as the HPD GPIO property is used in
> >>> both the OLED and LCD models which inherit this device tree.
> >>
> >> AFAICT, this patch is not correct as the hotplug detect signal is
> >> connected directly to the display controller on (these) Qualcomm SoCs
> >> and is already handled by its driver.
> >>
> >> Describing it as you do here leads to less accurate delays, see commits:
> >>
> >>          2327b13d6c47 ("drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux").
> >>          3b5765df375c ("drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux")
> >>
> >> Perhaps you lose some other functionality too.
> >>
> >>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> >>> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> >>> ---
> >>>   arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 11 +++++++++++
> >>>   1 file changed, 11 insertions(+)
> >>>
> >>> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> >>> index 962fb050c55c4fd33f480a21a8c47a484d0c82b8..46c73f5c039ed982b553636cf8c4237a20ba7687 100644
> >>> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> >>> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> >>> @@ -980,8 +980,12 @@ &mdss_dp3 {
> >>>        aux-bus {
> >>>                panel: panel {
> >>>                        compatible = "edp-panel";
> >>> +                     hpd-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
> >>>                        power-supply = <&vreg_edp_3p3>;
> >>>
> >>> +                     pinctrl-0 = <&edp_hpd_n_default>;
> >>> +                     pinctrl-names = "default";
> >>> +
> >>>                        port {
> >>>                                edp_panel_in: endpoint {
> >>>                                        remote-endpoint = <&mdss_dp3_out>;
> >>> @@ -1286,6 +1290,13 @@ hall_int_n_default: hall-int-n-state {
> >>>                bias-disable;
> >>>        };
> >>>
> >>> +     edp_hpd_n_default: edp-hpd-n-state {
> >>> +             pins = "gpio119";
> >>> +             function = "gpio";
> >>> +             drive-strength = <2>;
> >>> +             bias-pull-up;
> >>> +     };
> >>
> >> I checked the firmware configuration for this pin on my T14s, which
> >> does not match what you have here. Instead the function is set to
> >> "edp0_hot" which forwards the signal to the display controller which
> >> already handles the signal on panel power on. (And there is also no
> >> internal pull up enabled).
> >>
> >> We may want to describe this pin configuration somewhere, but that's a
> >> separate issue.
> >
> > Thanks for your review, I will send another version in coming days and
> > drop this first patch (adding hpd to the T14s DTSI).
> >
> > As a consequence I will need to add no-hpd property to the panel node.
> No, you won't. There is a HPD line and it is routed to the DP controller.

OK, I think I misunderstand what Johan said. After taking some time to
think about it in more detail:
- The first commit will be changed so that the hpd GPIO will be added
to the X1E DP controller instead of the panel. grepping the source for
dp_hot_plug_det shows me how to do that. This part is clear.

- The panel node in the generic T14s DTSI should not have the
hpd-gpios property / pinctrl set.

- The panel node should not have the hpd-gpios property / pinctrl set.

I hope I understand that correctly. I will send a new series in the
morning unless there is any objection.

Thanks

Chris

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

* Re: [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel
  2025-03-31 21:38         ` Christopher Obbard
@ 2025-03-31 22:00           ` Dmitry Baryshkov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2025-03-31 22:00 UTC (permalink / raw)
  To: Christopher Obbard
  Cc: Johan Hovold, Douglas Anderson, Neil Armstrong, Jessica Zhang,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bjorn Andersson, Konrad Dybcio, dri-devel, linux-kernel,
	linux-arm-msm, Rui Miguel Silva, Abel Vesa, devicetree,
	Bryan O'Donoghue

On Tue, 1 Apr 2025 at 00:38, Christopher Obbard
<christopher.obbard@linaro.org> wrote:
>
> Hi Dmitry,
>
> On Mon, 31 Mar 2025 at 17:49, Dmitry Baryshkov
> <dmitry.baryshkov@oss.qualcomm.com> wrote:
> >
> > On 31/03/2025 18:39, Christopher Obbard wrote:
> > > Hi Johan,
> > >
> > > On Mon, 31 Mar 2025 at 09:50, Johan Hovold <johan@kernel.org> wrote:
> > >>
> > >> On Thu, Mar 27, 2025 at 04:56:53PM +0000, Christopher Obbard wrote:
> > >>> The eDP panel has an HPD GPIO. Describe it in the device tree
> > >>> for the generic T14s model, as the HPD GPIO property is used in
> > >>> both the OLED and LCD models which inherit this device tree.
> > >>
> > >> AFAICT, this patch is not correct as the hotplug detect signal is
> > >> connected directly to the display controller on (these) Qualcomm SoCs
> > >> and is already handled by its driver.
> > >>
> > >> Describing it as you do here leads to less accurate delays, see commits:
> > >>
> > >>          2327b13d6c47 ("drm/panel-edp: Take advantage of wait_hpd_asserted() in struct drm_dp_aux").
> > >>          3b5765df375c ("drm/panel: atna33xc20: Take advantage of wait_hpd_asserted() in struct drm_dp_aux")
> > >>
> > >> Perhaps you lose some other functionality too.
> > >>
> > >>> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> > >>> Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
> > >>> ---
> > >>>   arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi | 11 +++++++++++
> > >>>   1 file changed, 11 insertions(+)
> > >>>
> > >>> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> > >>> index 962fb050c55c4fd33f480a21a8c47a484d0c82b8..46c73f5c039ed982b553636cf8c4237a20ba7687 100644
> > >>> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> > >>> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
> > >>> @@ -980,8 +980,12 @@ &mdss_dp3 {
> > >>>        aux-bus {
> > >>>                panel: panel {
> > >>>                        compatible = "edp-panel";
> > >>> +                     hpd-gpios = <&tlmm 119 GPIO_ACTIVE_HIGH>;
> > >>>                        power-supply = <&vreg_edp_3p3>;
> > >>>
> > >>> +                     pinctrl-0 = <&edp_hpd_n_default>;
> > >>> +                     pinctrl-names = "default";
> > >>> +
> > >>>                        port {
> > >>>                                edp_panel_in: endpoint {
> > >>>                                        remote-endpoint = <&mdss_dp3_out>;
> > >>> @@ -1286,6 +1290,13 @@ hall_int_n_default: hall-int-n-state {
> > >>>                bias-disable;
> > >>>        };
> > >>>
> > >>> +     edp_hpd_n_default: edp-hpd-n-state {
> > >>> +             pins = "gpio119";
> > >>> +             function = "gpio";
> > >>> +             drive-strength = <2>;
> > >>> +             bias-pull-up;
> > >>> +     };
> > >>
> > >> I checked the firmware configuration for this pin on my T14s, which
> > >> does not match what you have here. Instead the function is set to
> > >> "edp0_hot" which forwards the signal to the display controller which
> > >> already handles the signal on panel power on. (And there is also no
> > >> internal pull up enabled).
> > >>
> > >> We may want to describe this pin configuration somewhere, but that's a
> > >> separate issue.
> > >
> > > Thanks for your review, I will send another version in coming days and
> > > drop this first patch (adding hpd to the T14s DTSI).
> > >
> > > As a consequence I will need to add no-hpd property to the panel node.
> > No, you won't. There is a HPD line and it is routed to the DP controller.
>
> OK, I think I misunderstand what Johan said. After taking some time to
> think about it in more detail:
> - The first commit will be changed so that the hpd GPIO will be added
> to the X1E DP controller instead of the panel. grepping the source for
> dp_hot_plug_det shows me how to do that. This part is clear.
>
> - The panel node in the generic T14s DTSI should not have the
> hpd-gpios property / pinctrl set.
>
> - The panel node should not have the hpd-gpios property / pinctrl set.

LGTM. Use sc8180x-primus as an example

>
> I hope I understand that correctly. I will send a new series in the
> morning unless there is any objection.


-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2025-03-31 22:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27 16:56 [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 Christopher Obbard
2025-03-27 16:56 ` [PATCH v3 1/2] arm64: dts: qcom: x1e78100-t14s: add hpd gpio to eDP panel Christopher Obbard
2025-03-27 18:18   ` Dmitry Baryshkov
2025-03-31  7:50   ` Johan Hovold
2025-03-31 15:39     ` Christopher Obbard
2025-03-31 15:49       ` Dmitry Baryshkov
2025-03-31 21:38         ` Christopher Obbard
2025-03-31 22:00           ` Dmitry Baryshkov
2025-03-27 16:56 ` [PATCH v3 2/2] arm64: dts: qcom: x1e78100-t14s-oled: add " Christopher Obbard
2025-03-27 18:19   ` Dmitry Baryshkov
2025-03-30  0:27 ` [PATCH v3 0/2] Add support for OLED panel used on Snapdragon Lenovo T14s Gen6 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).