Skip to contentSkip to conversation

Introduce HONOR MagicBook Art 14 Snapdragon device tree

PATCH Superseded Konstantin Shabanov 3 participants 7 messages Jun 28 – Jun 29

Subsystems (3)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 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 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  | 1330 +++++++++++++++++
 drivers/firmware/qcom/qcom_scm.c              |    1 +
 5 files changed, 1336 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 v5 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 v5 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 v5 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  | 1330 +++++++++++++++++
 2 files changed, 1332 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 +1330 -0

1,330 lines not on this page · raw message

Signature · 1 line
2.54.0
#4 lore raw

Re: [PATCH v5 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: - [Medium] DP Alt Mode over USB-C is claimed as supported but lacks SBU mux, pmic-glink SBU endpoints, and…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] DP Alt Mode over USB-C is claimed as supported but lacks SBU mux, pmic-glink SBU endpoints, and DP PHY connections.
- [Medium] The touchscreen reset line is configured in pinctrl but lacks an active drive level, potentially leaving the device stuck in reset.
- [Medium] The pinctrl configuration for the touchpad interrupt incorrectly targets gpio3 instead of the interrupt's actual GPIO (gpio24). --

commit 6ee378ed5847ae927be3c89dca68d6810e9c3f3e
Author: Konstantin Shabanov <[email protected]>

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

Introduce support for the HONOR MagicBook Art 14 laptop based on the initial work by Kirill A. Korinsky and Valentin Manea. The commit adds device tree configurations for hardware components including display, audio, and USB.

Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +0 -0
new file mode 100644
index 0000000000000..79e49ba55e4b8

[ ... ]

Quoted 17 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +17 -0
+	pmic-glink {
+		compatible = "qcom,x1e80100-pmic-glink",
+			     "qcom,sm8550-pmic-glink",
+			     "qcom,pmic-glink";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		orientation-gpios = <&tlmm 121 GPIO_ACTIVE_HIGH>,
+				    <&tlmm 123 GPIO_ACTIVE_HIGH>;
+
+		/* Left-side port, closer to the screen */
+		connector@0 {
+			compatible = "usb-c-connector";
+			reg = <0>;
+			power-role = "dual";
+			data-role = "dual";
+
+			ports {

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

Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +10 -0
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+
+					pmic_glink_ss0_hs_in: endpoint {
+						remote-endpoint = <&usb_1_ss0_dwc3_hs>;
+					};
+				};

[Severity: Medium]
The commit message indicates DP over USB-C is supported, but does this pmic-glink connector configuration omit the SBU endpoints needed for the DisplayPort AUX channel?

A standard DP over USB-C implementation typically requires a port@2 mapping to an SBU mux to handle link training.

Without the SBU routing, will DisplayPort Alt Mode fail to negotiate?

[ ... ]

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

Quoted 11 lines

+&i2c1 {

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +10 -0
+	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>;

[Severity: Medium]
This sets the touchpad interrupt to GPIO 24, but the tpad_default pinctrl state configured below targets GPIO 3 instead.

Is there a mismatch here that will leave GPIO 24 unconfigured and potentially cause missing or spurious touchpad interrupts?

[ ... ]

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

Quoted 7 lines

+&mdss_dp0 {

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +6 -0
+	status = "okay";
+};
+
+&mdss_dp0_out {
+	link-frequencies = /bits/ 64 <1620000000 2700000000 5400000000 8100000000>;
+};

[Severity: Medium]
The mdss_dp0 and mdss_dp1 outputs appear to be isolated here.

Should they include endpoint connections linking them to the QMP PHYs (such as usb_1_ss0_qmpphy)? Without these remote-endpoint links, it seems the DisplayPort outputs are structurally disconnected.

[ ... ]

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

Quoted 9 lines

+&tlmm {

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

[Severity: Medium]
Does this pinctrl state incorrectly target GPIO 3 instead of the touchpad's actual interrupt line, which is declared as GPIO 24 in the touchpad@5d node above?

[ ... ]

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

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

[Severity: Medium]
Should this reset pin configuration include an output-high; or bias-pull-up; property?

Since hid-over-i2c does not natively manage reset-gpios, relying entirely on this pinctrl state without actively driving the line high might leave the touchscreen stuck in reset.

[ ... ]

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

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

In reply to Konstantin Shabanov
Quoted 3 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].

[...]

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

Quoted 13 lines

+&iris {

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +12 -0
+	firmware-name = "qcom/x1e80100/HONOR/MRO-XXX/qcvss8380.mbn";
+
+	status = "okay";
+};
+
+&gpu {
+	status = "okay";
+
+	zap-shader {
+		firmware-name = "qcom/x1e80100/HONOR/MRO-XXX/qcdxkmsuc8380.mbn";
+	};
+};

'gp'u < 'i2'c < 'ir'is

[...]

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

Quoted 9 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +9 -0
+
+	eusb6_reset_n: eusb6-reset-n-state {
+		pins = "gpio184";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+  wcd_default: wcd-reset-n-active-state {

Seems like your editor played a trick on you here!

[...]

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

Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +4 -0
+/* MP0 goes to the USB-A port (USB3) and FPC */
+&usb_mp {
+	phys = <&usb_mp_hsphy0>, <&usb_mp_qmpphy0>;
+	phy-names = "usb2-0", "usb3-0";

https://lore.kernel.org/linux-arm-msm/[email protected]/

I would assume that UEFI powers up all the PHYs - then, Linux (effectively) doesn't know they exist, so they keep hogging power.

You can copy-paste the supplies from another laptop, as they are dedicated to that usecase anyway

Konrad

#6 lore raw

PATCH v5 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