Skip to contentSkip to conversation

Introduce HONOR MagicBook Art 14 Snapdragon device tree

PATCH Applied Konstantin Shabanov 4 participants 9 messages Jun 29 – Jul 11

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v6 cover Introduce HONOR MagicBook Art 14 Snapdragon device tree

Introduce support for the HONOR MagicBook Art 14 Snapdragon laptop. This version is based on the initial work by Kirill A. Korinsky [1] and Valentin Manea [2].

I'm using it with two external displays connected to the HDMI port and DP<->USB-C (over external hub) as a daily driver.

eDP support is disabled and hopefully will be addressed in the follow-up [1]. I can confirm that the RFC patch by the link fixes output corruption (thanks Valentin!). Though, I have a suspicion that the issue can be resolved w/o introducing the panel driver as the very same panel seems to work out of the box in x86 version of the laptop [7].

Another caveat is USB-C orientation as I could boot from an external SSD only with specific cable orientation. I've tried the patch [8] but got some instabilities (last checked before v4 submission) , so put it out of scope for the initial submission.

Supported:

- Sound (with alsa-ucm-conf config [5])
- Speakers
- Headphone jack
- Bluetooth
- Battery
- HDMI
- DP over USB-C
- Touchpad
- Keyboard (with backlight)
- Touchscreen
- WiFi
- USB-C ports
- USB-A port
- UFS
- H/W accel

Untested:

- Camera
- Fingerprint reader
- Sleep/Suspend

Disabled:

- eDP

ACPI dumps are available in aarch64-laptops repo [3]. HWids in dtbloader repo [4].

[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://github.com/vamanea/linux-magicbook/blob/qcom-x1e-7.0/arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts
[3]: https://github.com/aarch64-laptops/build/tree/master/misc/honor-magicbook-art-14/acpi
[4]: https://github.com/TravMurav/dtbloader/blob/main/src/devices/honor_magicbook_art_14.c
[5]: https://github.com/alsa-project/alsa-ucm-conf/pull/755
[6]: https://lore.kernel.org/linux-arm-msm/[email protected]/
[7]: https://linux-hardware.org/?id=eisa:edo-edo4179
[8]: https://github.com/vamanea/linux-magicbook/commit/b855efb02268677d84dac4b9e27b1c5c9425d81d.patch
---
Changes in v6:
- Reordered some more nodes
- Fixed indentation
- Declared missing phys to usb_mp
- Link to v5: https://lore.kernel.org/linux-arm-msm/[email protected]

Changes in v5:
- Added hdmi-bridge definition compatible with simple-bridge
- Link to v4: https://lore.kernel.org/linux-arm-msm/[email protected]

Changes in v4:
- Dropped output-foo properties from TLMM pins
- Sorted pins by their index
- Dropped data-lanes from mdss_dpX to use the default (4-lane)
- Added a space before the opening bracket in the comment
- Link to v3: https://lore.kernel.org/linux-arm-msm/[email protected]

Changes in v3:
- Update sound model to the board's name
- Dropped unnecessary output-foo properties as they are controlled by the driver
- Reordered properties alphabetically where needed
- Updated mdss_dp0_out from 2 to 4 data lanes
- Dropped extraneous USB related comments
- Link to v2: https://lore.kernel.org/linux-arm-msm/[email protected]

Changes in v2:
- Disabled eDP;
- Dropped displayport dai links (they weren't tested);
- Dropped SBU MUXes as they make DP over USB-C unreliable;
- Link to v1: https://lore.kernel.org/linux-arm-msm/[email protected]
---
Konstantin Shabanov (4):
dt-bindings: vendor-prefixes: Add HONOR
dt-bindings: arm: qcom: Add HONOR MagicBook Art 14
arm64: dts: qcom: Add HONOR MagicBook Art 14 device tree
firmware: qcom: scm: Allow QSEECOM on Honor Magicbook Art 14

 .../devicetree/bindings/arm/qcom.yaml         |    1 +
 .../devicetree/bindings/vendor-prefixes.yaml  |    2 +
 arch/arm64/boot/dts/qcom/Makefile             |    2 +
 .../qcom/x1e80100-honor-magicbook-art-14.dts  | 1341 +++++++++++++++++
 drivers/firmware/qcom/qcom_scm.c              |    1 +
 5 files changed, 1347 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts

base-commit: 4edcdefd4083ae04b1a5656f4be6cd83ae919ef4 --
2.54.0

#1 lore raw

PATCH v6 1/4 dt-bindings: vendor-prefixes: Add HONOR

Add vendor prefix for Honor Device Co., Ltd.

---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/vendor-prefixes.yaml +2 -0
index 396044f368e7..9ca2508f531f 100644
@@ -735,6 +735,8 @@ patternProperties:
     description: Honestar Technologies Co., Ltd.
   "^honeywell,.*":
     description: Honeywell
+  "^honor,.*":
+    description: Honor Device Co., Ltd.
   "^hoperf,.*":
     description: Shenzhen Hope Microelectronics Co., Ltd.
   "^hoperun,.*":
Signature · 1 line
2.54.0
#2 lore raw

PATCH v6 2/4 dt-bindings: arm: qcom: Add HONOR MagicBook Art 14

In reply to Konstantin Shabanov

Document the X1E-80-100 variant of the HONOR MagicBook Art 14.

---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
index 50cc18a6ec5e..fd985f8adb0e 100644
@@ -1160,6 +1160,7 @@ properties:
               - dell,inspiron-14-plus-7441
               - dell,latitude-7455
               - dell,xps13-9345
+              - honor,magicbook-art-14-snapdragon
               - hp,elitebook-ultra-g1q
               - hp,omnibook-x14
               - lenovo,ideacentre-mini-01q8x10
Signature · 1 line
2.54.0
#3 lore raw

PATCH v6 3/4 arm64: dts: qcom: Add HONOR MagicBook Art 14 device tree

In reply to Konstantin Shabanov

Introduce support for the HONOR MagicBook Art 14 laptop. This version is based on the initial work by Kirill A. Korinsky [1] and Valentin Manea [2].

Supported:

- Sound (with alsa-ucm-conf config [3])
- Speakers
- Headphone jack
- Bluetooth
- Battery
- HDMI
- Touchpad
- Keyboard (with backlight)
- Touchscreen
- WiFi
- USB-C ports
- USB-A port
- UFS
- H/W accel
- DP over USB-C

Untested:

- Camera
- Fingerprint reader
- Sleep/Suspend

Broken:

- eDP

[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://github.com/vamanea/linux-magicbook/blob/x1e80100-magicbook-6.19/arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts
[3]: https://github.com/alsa-project/alsa-ucm-conf/pull/755

---
 arch/arm64/boot/dts/qcom/Makefile             |    2 +
 .../qcom/x1e80100-honor-magicbook-art-14.dts  | 1341 +++++++++++++++++
 2 files changed, 1343 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts
arch/arm64/boot/dts/qcom/Makefile +2 -0
index 6f33c4e2f09c..26d568ac5e8f 100644
@@ -457,3 +457,5 @@ x1p42100-lenovo-thinkbook-16-el2-dtbs	:= x1p42100-lenovo-thinkbook-16.dtb x1-el2
 dtb-$(CONFIG_ARCH_QCOM)	+= x1p42100-lenovo-thinkbook-16.dtb x1p42100-lenovo-thinkbook-16-el2.dtb
 x1p64100-microsoft-denali-el2-dtbs	:= x1p64100-microsoft-denali.dtb x1-el2.dtbo
 dtb-$(CONFIG_ARCH_QCOM)	+= x1p64100-microsoft-denali.dtb x1p64100-microsoft-denali-el2.dtb
+x1e80100-honor-magicbook-art-14-el2-dtbs := x1e80100-honor-magicbook-art-14.dtb x1-el2.dtbo
+dtb-$(CONFIG_ARCH_QCOM) += x1e80100-honor-magicbook-art-14.dtb x1e80100-honor-magicbook-art-14-el2.dtb
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +1341 -0

1,341 lines not on this page · raw message

Signature · 1 line
2.54.0
#4 lore raw

Re: [PATCH v6 3/4] arm64: dts: qcom: Add HONOR MagicBook Art 14 device tree

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [High] DisplayPort over USB-C and HDMI are fundamentally broken due to invalid graph topology and missing…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] DisplayPort over USB-C and HDMI are fundamentally broken due to invalid graph topology and missing SBU routing.
- [High] The touchpad interrupt pinmux configuration targets the wrong GPIO, breaking touchpad input.
- [High] The touchscreen reset pin lacks the output-high directive, leaving the device stuck in reset. --

commit 3e10552e6c3c61e8d8f91d2bc36dc84459dad1e7
Author: Konstantin Shabanov <[email protected]>

arm64: dts: qcom: Add HONOR MagicBook Art 14 device tree

Introduce support for the HONOR MagicBook Art 14 laptop. This version is based on the initial work by Kirill A. Korinsky and Valentin Manea.

Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +0 -0
new file mode 100644

[ ... ]

Quoted 2 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +2 -0
+	pmic-glink {
+		compatible = "qcom,x1e80100-pmic-glink",

[ ... ]

Quoted 2 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +2 -0
+		connector@0 {
+			compatible = "usb-c-connector";

[ ... ]

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts line 120

Quoted 9 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +9 -0
+				port@1 {
+					reg = <1>;
+
+					pmic_glink_ss0_ss_in: endpoint {
+						remote-endpoint = <&usb_1_ss0_qmpphy_out>;
+					};
+				};
+			};
+		};

[Severity: High]
Are the port@2 definitions for routing SBU signals missing from both connector@0 and connector@1? Without routing SBU lines to the hardware, Type-C DisplayPort alternate mode negotiation might be unable to establish the DP AUX channel.

[ ... ]

Quoted 11 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +11 -0
+	i2c1 {
+		clock-frequency = <400000>;
+
+		status = "okay";
+
+		touchpad@5d {
+			compatible = "hid-over-i2c";
+			reg = <0x5d>;
+
+			hid-descr-addr = <0x1>;
+			interrupts-extended = <&tlmm 24 IRQ_TYPE_LEVEL_LOW>;

[ ... ]

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts line 1077

Quoted 9 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +9 -0
+	tlmm {
+		gpio-reserved-ranges = <34 2>, /* Unused */
+				       <44 4>; /* SPI (TPM) */
+
+		tpad_default: tpad-default-state {
+			pins = "gpio3";
+			function = "gpio";
+			bias-disable;
+		};

[Severity: High]
Is there a mismatch in the GPIO configuration for the touchpad? The node declares the hardware interrupt on GPIO 24, but the tpad_default pinctrl state configures GPIO 3. Will this prevent the system from receiving touchpad events?

[ ... ]

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts line 1093

Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +8 -0
+	ts0_default: ts0-default-state {
+		reset-n-pins {
+			pins = "gpio48";
+			function = "gpio";
+			drive-strength = <16>;
+		};
+
+		int-n-pins {

[Severity: High]
Does the touchscreen reset pin configuration need an output-high directive? Since the hid-over-i2c driver does not actively manage a reset-gpios property, omitting output-high here might leave the touchscreen stuck in hardware reset.

[ ... ]

Quoted 3 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +3 -0
+	usb_1_ss2_qmpphy {
+		vdda-phy-supply = <&vreg_l2j_1p2>;
+		vdda-pll-supply = <&vreg_l2d_0p9>;

[ ... ]

Quoted 6 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +6 -0
+		ports {
+			port@0 {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				/delete-node/ endpoint;

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts line 1291

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +10 -0
+
+				usb_1_ss2_qmpphy_out_dp: endpoint@0 {
+					reg = <0>;
+
+					data-lanes = <3 2 1 0>;
+					remote-endpoint = <&hdmi_bridge_dp_in>;
+				};
+			};
+		};
+	};

[Severity: High]
Does replacing the QMP PHY's DP input endpoint with a connection to the HDMI bridge's input sever the required connection from the GPU DP controller (mdss_dp2_out)? Pointing port@0 away from the GPU might leave the HDMI bridge without a valid signal source and break the GPU DP controller.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Reviewed-by on v6 3/4
#5 lore raw

Re: [PATCH v6 3/4] arm64: dts: qcom: Add HONOR MagicBook Art 14 device tree

In reply to Konstantin Shabanov
Quoted 30 lines · Konstantin Shabanov

Introduce support for the HONOR MagicBook Art 14 laptop. This version is based on the initial work by Kirill A. Korinsky [1] and Valentin Manea [2].

Supported:

- Sound (with alsa-ucm-conf config [3])
- Speakers
- Headphone jack
- Bluetooth
- Battery
- HDMI
- Touchpad
- Keyboard (with backlight)
- Touchscreen
- WiFi
- USB-C ports
- USB-A port
- UFS
- H/W accel
- DP over USB-C

Untested:

- Camera
- Fingerprint reader
- Sleep/Suspend

Broken:

Quoted 8 lines

- eDP

[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://github.com/vamanea/linux-magicbook/blob/x1e80100-magicbook-6.19/arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts
[3]: https://github.com/alsa-project/alsa-ucm-conf/pull/755

---

Konrad

#6 lore raw

PATCH v6 4/4 firmware: qcom: scm: Allow QSEECOM on Honor Magicbook Art 14

In reply to Konstantin Shabanov

Allow particular machine accessing eg. efivars.

---
 drivers/firmware/qcom/qcom_scm.c | 1 +
 1 file changed, 1 insertion(+)
drivers/firmware/qcom/qcom_scm.c +1 -0
index 6b601a4b89db..b6f7c567d4a8 100644
@@ -2295,6 +2295,7 @@ static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
 	{ .compatible = "dell,latitude-7455" },
 	{ .compatible = "dell,xps13-9345" },
 	{ .compatible = "ecs,liva-qc710" },
+	{ .compatible = "honor,magicbook-art-14-snapdragon" },
 	{ .compatible = "hp,elitebook-ultra-g1q" },
 	{ .compatible = "hp,omnibook-x14" },
 	{ .compatible = "huawei,gaokun3" },
Signature · 1 line
2.54.0
maintainer Applied
#7 lore raw

Re: (subset) [PATCH v6 0/4] Introduce HONOR MagicBook Art 14 Snapdragon device tree

In reply to Konstantin Shabanov
Quoted 8 lines · Konstantin Shabanov

Introduce support for the HONOR MagicBook Art 14 Snapdragon laptop. This version is based on the initial work by Kirill A. Korinsky [1] and Valentin Manea [2].

I'm using it with two external displays connected to the HDMI port and DP<->USB-C (over external hub) as a daily driver.

[...]

Applied, thanks!

[1/4] dt-bindings: vendor-prefixes: Add HONOR

      commit: ad469274acb9f44674e8c5890dc155d02403f661
[2/4] dt-bindings: arm: qcom: Add HONOR MagicBook Art 14
      commit: c7d79e2e1400102e7921a60669d5e53da5f1e03d
[3/4] arm64: dts: qcom: Add HONOR MagicBook Art 14 device tree
      commit: 745b08ebe1fcb120c66cfb8fd1a89d93e24828e8

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>
maintainer Applied
#8 lore raw

Re: (subset) [PATCH v6 0/4] Introduce HONOR MagicBook Art 14 Snapdragon device tree

In reply to Konstantin Shabanov
Quoted 8 lines · Konstantin Shabanov

Introduce support for the HONOR MagicBook Art 14 Snapdragon laptop. This version is based on the initial work by Kirill A. Korinsky [1] and Valentin Manea [2].

I'm using it with two external displays connected to the HDMI port and DP<->USB-C (over external hub) as a daily driver.

[...]

Applied, thanks!

[4/4] firmware: qcom: scm: Allow QSEECOM on Honor Magicbook Art 14

      commit: cfe9b47ef18bdb737be480f3e539e9561ef74078

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>