The SM8150 HDK can be fitted with a display card carrying a Truly
NT36850 WQHD dual-DSI panel. It uses the PM8150L WLED for the backlight
and LCDB for the bias rails, and it is mutually exclusive with the
on-board LT9611 HDMI bridge.

Only two of the three WLED strings are connected on the card: the
backlight stays dark and the boost runs into the overvoltage limit if
only the third string is driven.

Assisted-by: LLM
Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 arch/arm64/boot/dts/qcom/Makefile                  |   4 +
 .../boot/dts/qcom/sm8150-hdk-display-card.dtso     | 103 +++++++++++++++++++++
 2 files changed, 107 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile 
b/arch/arm64/boot/dts/qcom/Makefile
index 85d06a950b4a..571bda210d63 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -409,6 +409,10 @@ dtb-$(CONFIG_ARCH_QCOM)    += sm7325-nothing-spacewar.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += sm7325-xiaomi-lisa.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += sm7325-xiaomi-taoyao.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += sm8150-hdk.dtb
+
+sm8150-hdk-display-card-dtbs   := sm8150-hdk.dtb sm8150-hdk-display-card.dtbo
+
+dtb-$(CONFIG_ARCH_QCOM)        += sm8150-hdk-display-card.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += sm8150-microsoft-surface-duo.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += sm8150-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)        += sm8150-sony-xperia-kumano-bahamut.dtb
diff --git a/arch/arm64/boot/dts/qcom/sm8150-hdk-display-card.dtso 
b/arch/arm64/boot/dts/qcom/sm8150-hdk-display-card.dtso
new file mode 100644
index 000000000000..205cd6d2cd71
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm8150-hdk-display-card.dtso
@@ -0,0 +1,103 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
+ */
+
+/*
+ * Display Card kit overlay.
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/dts-v1/;
+/plugin/;
+
+/* Disable HDMI bridge related nodes (mutually exclusive with the display 
card) */
+&lt9611_codec {
+       status = "disabled";
+};
+
+&mdss_dsi0 {
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       panel@0 {
+               compatible = "truly,wqhd60-nt36850";
+               reg = <0>;
+
+               reset-gpios = <&tlmm 6 GPIO_ACTIVE_LOW>;
+
+               vddio-supply = <&vreg_l14a_1p8>;
+               avdd-supply = <&pm8150l_lcdb_ldo>;
+               avee-supply = <&pm8150l_lcdb_ncp>;
+
+               backlight = <&pm8150l_wled>;
+
+               pinctrl-0 = <&disp0_reset_n_active>, <&mdp_vsync>;
+               pinctrl-1 = <&disp0_reset_n_suspend>, <&mdp_vsync>;
+               pinctrl-names = "default", "sleep";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+
+                               panel0_in: endpoint {
+                                       remote-endpoint = <&mdss_dsi0_out>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+
+                               panel1_in: endpoint {
+                                       remote-endpoint = <&mdss_dsi1_out>;
+                               };
+                       };
+               };
+       };
+};
+
+&mdss_dsi0_out {
+       remote-endpoint = <&panel0_in>;
+};
+
+&mdss_dsi1_out {
+       remote-endpoint = <&panel1_in>;
+};
+
+&pm8150l_lcdb {
+       status = "okay";
+};
+
+&pm8150l_wled {
+       qcom,num-strings = <2>;
+
+       status = "okay";
+};
+
+&tlmm {
+       disp0_reset_n_active: disp0-reset-n-active-state {
+               pins = "gpio6";
+               function = "gpio";
+               drive-strength = <8>;
+               bias-disable;
+       };
+
+       disp0_reset_n_suspend: disp0-reset-n-suspend-state {
+               pins = "gpio6";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-pull-down;
+       };
+
+       mdp_vsync: mdp-vsync-state {
+               pins = "gpio8";
+               function = "mdp_vsync";
+               drive-strength = <2>;
+               bias-pull-down;
+       };
+};

-- 
2.47.3

Reply via email to