Skip to contentSkip to conversation

Introduce Lenovo Legion Y700 Gen4

PATCH In review Pengyu Luo 4 participants 7 messages Jul 26 – Sep 2

Subsystems (3)
lore
Share & tools
lore

Pengyu Luo

author
#0 lore raw

v2 cover Introduce Lenovo Legion Y700 Gen4

Add an initial devicetree for the Lenovo Legion Y700 Gen4, which is based on sm8750-qrd.

---
Changes in v2:
- Collect tag.
- Add the dsi panel node, since the panel driver is upstreamed.
- Use consistent name for fixed regulators. (Krzysztof)
- Link to v1: https://lore.kernel.org/linux-devicetree/[email protected]

Pengyu Luo (2):
dt-bindings: arm: qcom: Document Lenovo Legion Y700 Gen4
arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4

 .../devicetree/bindings/arm/qcom.yaml         |    1 +
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sm8750-lenovo-elden.dts     | 1170 +++++++++++++++++
 3 files changed, 1172 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts
Signature · 1 line
2.54.0
author
#1 lore raw

PATCH v2 1/2 dt-bindings: arm: qcom: Document Lenovo Legion Y700 Gen4

Add compatible for the SM8750-based Lenovo Legion Y700 Gen4, using its codename, elden.

---
Changes in v2:
- Collect tag.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index c7c9a9279684..e1ade271e712 100644
@@ -1160,6 +1160,7 @@ properties:
 
       - items:
           - enum:
+              - lenovo,elden
               - qcom,sm8750-mtp
               - qcom,sm8750-qrd
           - const: qcom,sm8750
Signature · 1 line
2.54.0
author
#2 lore raw

PATCH v2 2/2 arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4

In reply to Pengyu Luo

Add an initial devicetree for the Lenovo Legion Y700 Gen4, which is based on sm8750-qrd.

Supported features:
- Altmode
- Backlight
- Battery & Charge (Full speed)
- Buttons
- Framebuffer (Require mdss and dispcc to be disabled)
- USB (Two ports)

Downstream supported features:
- Display (8/10 bits) (Nowadays DPU driver is broken for dual dsi panel)
- GPU
- Touchscreen

Unsupported features:
- BT & WIFI
- Cameras & Flash
- Microphones & Speakers (Downstream available, pending test [1])
- Sensors (Downstream available, pending test [2])
- Vibrators (Downstream available, pending test [1])

[1]: https://github.com/GUF296/linux/commits/codex/tb321fu-full-remediation-20260715
[2]: https://github.com/linux-msm/hexagonrpc

---
Changes in v2:
- Add the dsi panel node, since the panel driver is upstreamed.
- Use consistent name for fixed regulators. (Krzysztof)

---
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sm8750-lenovo-elden.dts     | 1170 +++++++++++++++++
 2 files changed, 1171 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index e05414290d8e..cb93708e0415 100644
@@ -405,6 +405,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-hdk-rear-camera-card.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-qrd.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8750-lenovo-elden.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8750-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8750-qrd.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= talos-evk.dtb
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +1170 -0

1,170 lines not on this page · raw message

Signature · 1 line
2.54.0
#3 lore raw

Re: [PATCH v2 2/2] arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider: - [Medium] Framebuffer broken by mdss overriding and incorrect splash-region node name. - [Medium] SD card…

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider:
- [Medium] Framebuffer broken by mdss overriding and incorrect splash-region node name.
- [Medium] SD card detect GPIO has inverted polarity in the Devicetree.
- [Medium] The aw99706 backlight node uses the property 'enable-gpio' instead of 'enable-gpios'.
- [Medium] Missing 'vdd-s4-supply' for populated smps4 regulator in regulators-3.
- [Low] DWC3 port@2 mapping is invalid and unsupported by the role switch framework.
- [Low] Invalid 'data-lanes' configuration for CPHY mode in mdss_dsi endpoints. --

--- Patch [2]: [PATCH v2 2/2] arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4 --- commit 0b24150b2f36abd3f0b1e0dcdac6cf1e84f0c2fb
Author: Pengyu Luo <[email protected]>
arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4

This commit adds the initial devicetree for the Lenovo Legion Y700 Gen4 tablet, which is based on the sm8750-qrd platform. It supports basic functionality including USB, framebuffer, buttons, and battery charging.

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +0 -0
new file mode 100644
index 0000000000000..6e4f8e9015fee

[ ... ]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 179

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +6 -0
+	reserved-memory {
+		/*
+		 * Use this to tell the BL to initialize the display related
+		 * resources, so we can use efifb. Please 's/-/_/'
+		 */
+		splash-region@fc800000 {

[Severity: Medium]
Does the hyphen in this node name prevent the ABL bootloader from matching the splash region memory node? Should this be renamed to splash_region@fc800000?

[ ... ]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 534

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +10 -0
+	regulators-3 {
+		compatible = "qcom,pm8550ve-rpmh-regulators";
+
+		vdd-l1-supply = <&vreg_s1d_0p97>;
+		vdd-l2-supply = <&vreg_s3g_1p8>;
+		vdd-l3-supply = <&vreg_s7i_1p2>;
+		vdd-s1-supply = <&vph_pwr>;
+		vdd-s3-supply = <&vph_pwr>;
+
+		qcom,pmic-id = "g";

[Severity: Medium]
Since vreg_s4g_0p75 is defined further down in regulators-3, is a vdd-s4-supply mapping missing here alongside vdd-s1-supply and vdd-s3-supply?

[ ... ]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 787

Quoted 5 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +5 -0
+	backlight: backlight@76 {
+		compatible = "awinic,aw99706";
+		reg = <0x76>;
+
+		enable-gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>;

[Severity: Medium]
Should this property be named enable-gpios instead of enable-gpio?

[ ... ]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts

Quoted 3 lines

+&mdss {

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +2 -0
+	status = "okay";
+};

[Severity: Medium]
The commit message states "- Framebuffer (Require mdss and dispcc to be disabled)". Does enabling the mdss node here override and break the simple-framebuffer fallback intended by the splash_region setup?

[ ... ]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 871

Quoted 8 lines

+&mdss_dsi0_out {

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +7 -0
+	remote-endpoint = <&panel_in_0>;
+	data-lanes = <0 1 2 3>;
+};
+
+&mdss_dsi0_phy {
+	vdds-supply = <&vreg_l3i_0p88>;
+	phy-type = <PHY_TYPE_CPHY>;

[Severity: Low]
Is it correct to specify 4 data lanes for mdss_dsi0_out when the PHY type is set to PHY_TYPE_CPHY, which natively supports up to 3 trios? Should data-lanes be updated to <0 1 2>?

[ ... ]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 999

Quoted 2 lines

+&sdhc_2 {

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +1 -0
+	cd-gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;

[Severity: Medium]
Looking at sdc2_card_det_n, gpio55 is configured with bias-pull-up. Shouldn't cd-gpios use GPIO_ACTIVE_LOW instead of GPIO_ACTIVE_HIGH to correctly handle the physical pull-down upon SD card insertion?

[ ... ]

Quoted 19 lines

+&usb {

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +18 -0
+	dr_mode = "otg";
+	maximum-speed = "super-speed-plus-gen2x1";
+
+	status = "okay";
+
+	ports {
+		/*
+		 * USB2.0 is shared for two ports, set pinctrl eusb_mux_default
+		 * to select the repeter. Plugging out one of them will reset
+		 * the DWC3, which causes both of them to be disconnected.
+		 */
+		port@0 {
+			reg = <0>;
+
+			usb_dwc3_hs: endpoint {
+				remote-endpoint = <&pmic_glink_hs_in>;
+			};
+		};

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 1143

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +10 -0
+
+		port@2 {
+			reg = <2>;
+
+			usb_dwc3_hs2: endpoint {
+				remote-endpoint = <&pmic_glink_hs_c2_in>;
+			};
+		};
+	};
+};

[Severity: Low]
Is port@2 mapping valid for the dwc3 node? The role switch framework does not typically support port 2, which could cause issues with Type-C connector multiplexing. Should port@2 be removed?

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
#4 lore raw

Re: [PATCH v2 2/2] arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4

In reply to Pengyu Luo
Quoted 9 lines · Pengyu Luo

Add an initial devicetree for the Lenovo Legion Y700 Gen4, which is based on sm8750-qrd.

Supported features:
- Altmode
- Backlight
- Battery & Charge (Full speed)
- Buttons
- Framebuffer (Require mdss and dispcc to be disabled)

And yet you enable mdss below, while dispcc is already enabled.

Quoted 65 lines

- USB (Two ports)

Downstream supported features:
- Display (8/10 bits) (Nowadays DPU driver is broken for dual dsi panel)
- GPU
- Touchscreen

Unsupported features:
- BT & WIFI
- Cameras & Flash
- Microphones & Speakers (Downstream available, pending test [1])
- Sensors (Downstream available, pending test [2])
- Vibrators (Downstream available, pending test [1])

[1]: https://github.com/GUF296/linux/commits/codex/tb321fu-full-remediation-20260715
[2]: https://github.com/linux-msm/hexagonrpc

---
Changes in v2:
- Add the dsi panel node, since the panel driver is upstreamed.
- Use consistent name for fixed regulators. (Krzysztof)

---
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sm8750-lenovo-elden.dts     | 1170 +++++++++++++++++
 2 files changed, 1171 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index e05414290d8e..cb93708e0415 100644
@@ -405,6 +405,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-hdk-rear-camera-card.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8650-qrd.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm8750-lenovo-elden.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8750-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8750-qrd.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= talos-evk.dtb
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +19 -0
new file mode 100644
index 000000000000..c64a1d8c65c1
@@ -0,0 +1,1170 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2025-2026 Pengyu Luo <[email protected]>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8750.dtsi"
+#include "pm8550.dtsi"
+#define PMK8550VE_SID 8
+#include "pm8550ve.dtsi"
+#include "pmih0108.dtsi"
+#include "pmk8550.dtsi"
+#include "sm8750-pmics.dtsi"
+

[...]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 787

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +6 -0
+
+	backlight: backlight@76 {
+		compatible = "awinic,aw99706";
+		reg = <0x76>;
+
+		enable-gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>;

I wonder if this actually passes dtb_check. I think you meant enable-gpios here.

Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +8 -0
+
+		pinctrl-0 = <&aw99706_bl_active>;
+		pinctrl-names = "default";
+
+		default-brightness = <511>;
+		max-brightness = <4095>;
+
+		awinic,dim-mode = <1>;

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 805

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +10 -0
+		awinic,sw-freq-hz = <750000>;
+		awinic,sw-ilmt-microamp = <3000000>;
+		awinic,uvlo-thres-microvolt = <2200000>;
+		awinic,iled-max-microamp = <30000>;
+		awinic,ramp-ctl = <3>;
+	};
+};
+
+&mdss {
+	status = "okay";

Commit message disagrees.

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +10 -0
+};
+
+&mdss_dp0 {
+	status = "okay";
+};
+
+&mdss_dp0_out {
+	remote-endpoint = <&usb_dp_qmpphy_dp_in>;
+};
+
author
#5 lore raw

Re: [PATCH v2 2/2] arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4

Quoted 5 lines · Abel Vesa
Quoted 3 lines · Pengyu Luo

Add an initial devicetree for the Lenovo Legion Y700 Gen4, which is based on sm8750-qrd.

Quoted 9 lines
Quoted 6 lines

Supported features:
- Altmode
- Backlight
- Battery & Charge (Full speed)
- Buttons
- Framebuffer (Require mdss and dispcc to be disabled)

And yet you enable mdss below, while dispcc is already enabled.

If one user wants to use the fb, then please disable them manually, besides, that requires splash-region to be renamed to splash_region too, the latter naming style is inappropriate for upstream. So disabling the nodes would not make fb work, in that case, I kept them as enabled, then we can use altmode.

Quoted 68 lines
Quoted 65 lines

- USB (Two ports)

Downstream supported features:
- Display (8/10 bits) (Nowadays DPU driver is broken for dual dsi panel)
- GPU
- Touchscreen

Unsupported features:
- BT & WIFI
- Cameras & Flash
- Microphones & Speakers (Downstream available, pending test [1])
- Sensors (Downstream available, pending test [2])
- Vibrators (Downstream available, pending test [1])

[1]: https://github.com/GUF296/linux/commits/codex/tb321fu-full-remediation-20260715
[2]: https://github.com/linux-msm/hexagonrpc

---
Changes in v2:
- Add the dsi panel node, since the panel driver is upstreamed.
- Use consistent name for fixed regulators. (Krzysztof)

---
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sm8750-lenovo-elden.dts     | 1170 +++++++++++++++++
 2 files changed, 1171 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
index e05414290d8e..cb93708e0415 100644
@@ -405,6 +405,7 @@ dtb-$(CONFIG_ARCH_QCOM)   += sm8650-hdk-rear-camera-card.dtb
 dtb-$(CONFIG_ARCH_QCOM)      += sm8650-hdk.dtb
 dtb-$(CONFIG_ARCH_QCOM)      += sm8650-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)      += sm8650-qrd.dtb
+dtb-$(CONFIG_ARCH_QCOM)      += sm8750-lenovo-elden.dtb
 dtb-$(CONFIG_ARCH_QCOM)      += sm8750-mtp.dtb
 dtb-$(CONFIG_ARCH_QCOM)      += sm8750-qrd.dtb
 dtb-$(CONFIG_ARCH_QCOM)      += talos-evk.dtb
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +19 -0
new file mode 100644
index 000000000000..c64a1d8c65c1
@@ -0,0 +1,1170 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2025-2026 Pengyu Luo <[email protected]>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/phy/phy.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include "sm8750.dtsi"
+#include "pm8550.dtsi"
+#define PMK8550VE_SID 8
+#include "pm8550ve.dtsi"
+#include "pmih0108.dtsi"
+#include "pmk8550.dtsi"
+#include "sm8750-pmics.dtsi"
+

[...]

Quoted 10 lines

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 787

Quoted 6 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +6 -0
+
+     backlight: backlight@76 {
+             compatible = "awinic,aw99706";
+             reg = <0x76>;
+
+             enable-gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>;

I wonder if this actually passes dtb_check. I think you meant enable-gpios here.

TBH, no. Thanks for mentioning. I did the compilation test, bringup test, and the format checking that I can recall. I also followed submitting-patches.rst, but I did not read writing-schema.rst in which dtbs_check is mentioned there.

I will do this in the next version.

Best wishes,
Pengyu

Quoted 31 lines
Quoted 8 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +8 -0
+
+             pinctrl-0 = <&aw99706_bl_active>;
+             pinctrl-names = "default";
+
+             default-brightness = <511>;
+             max-brightness = <4095>;
+
+             awinic,dim-mode = <1>;

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 805

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +10 -0
+             awinic,sw-freq-hz = <750000>;
+             awinic,sw-ilmt-microamp = <3000000>;
+             awinic,uvlo-thres-microvolt = <2200000>;
+             awinic,iled-max-microamp = <30000>;
+             awinic,ramp-ctl = <3>;
+     };
+};
+
+&mdss {
+     status = "okay";

Commit message disagrees.

Quoted 10 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +10 -0
+};
+
+&mdss_dp0 {
+     status = "okay";
+};
+
+&mdss_dp0_out {
+     remote-endpoint = <&usb_dp_qmpphy_dp_in>;
+};
+
#6 lore raw

Re: [PATCH v2 2/2] arm64: dts: qcom: sm8750: Add Lenovo Legion Y700 Gen4

In reply to Pengyu Luo
Quoted 11 lines · Pengyu Luo

Add an initial devicetree for the Lenovo Legion Y700 Gen4, which is based on sm8750-qrd.

Supported features:
- Altmode
- Backlight
- Battery & Charge (Full speed)
- Buttons
- Framebuffer (Require mdss and dispcc to be disabled)
- USB (Two ports)

Quoted 4 lines

Downstream supported features:
- Display (8/10 bits) (Nowadays DPU driver is broken for dual dsi panel)
- GPU
- Touchscreen

This paragraph is wholly irrelevant given the tree this is targetting

[...]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 1015

Quoted 2 lines

+&tlmm {

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +1 -0
+	/* For CDT: <32 3> <37 2> <77 1>; */

What's CDT in this context?

[...]

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 1117

Quoted 3 lines

+&usb {

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +2 -0
+	dr_mode = "otg";
+	maximum-speed = "super-speed-plus-gen2x1";

Neither property should be necessary

arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts line 1126

Quoted 9 lines
arch/arm64/boot/dts/qcom/sm8750-lenovo-elden.dts new file +9 -0
+
+	status = "okay";
+
+	ports {
+		/*
+		 * USB2.0 is shared for two ports, set pinctrl eusb_mux_default
+		 * to select the repeter. Plugging out one of them will reset
+		 * the DWC3, which causes both of them to be disconnected.
+		 */

Is there a hub inbetween? Or can you only use one port at once for data?

Konrad