Skip to contentSkip to conversation

Introduce HONOR MagicBook Art 14 Snapdragon device tree

PATCH Superseded Konstantin Shabanov 3 participants 10 messages Jun 20 – Jun 29

Subsystems (3)

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v3 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 an external display connected to the HDMI port as a daily driver for some time now.

eDP support is broken (screen is eigher grey or grey with noise), thus, keeping it disabled for now.

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

Broken:

- 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/x1e80100-magicbook-6.19/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
---
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  | 1309 +++++++++++++++++
 drivers/firmware/qcom/qcom_scm.c              |    1 +
 5 files changed, 1315 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts

base-commit: 9ecfb2f7287a967b418ba69f10d45ead0d360593 --
2.54.0

#1 lore raw

PATCH v3 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 6b9fb6a6bf0b..293cbc26deac 100644
@@ -733,6 +733,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 v3 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 v3 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  | 1309 +++++++++++++++++
 2 files changed, 1311 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 +1309 -0

1,309 lines not on this page · raw message

Signature · 1 line
2.54.0
#4 lore raw

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

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider: - [High] Missing SBU routing and multiplexers for DisplayPort Alternate Mode over USB-C. - [High] Missing…

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider:
- [High] Missing SBU routing and multiplexers for DisplayPort Alternate Mode over USB-C.
- [High] Missing DisplayPort and HDMI audio routing in the sound card.
- [High] Duplicate audio routing for Right Woofer and Right Tweeter breaks channel separation.
- [Medium] QMP DP PHY output directly connected to hdmi-connector without an HDMI bridge.
- [Low] Invalid vddl-supply property in generic hid-over-i2c nodes.
- [Low] Invalid property placement: dr_mode = "host" placed on DWC3 wrapper instead of core. --

commit c44972cad74464a55d079d27d560d3a648a72db6
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 initial work by Kirill A. Korinsky and Valentin Manea.

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

[ ... ]

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

Quoted 13 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +13 -0
+	hdmi-connector {
+		compatible = "hdmi-connector";
+		type = "a";
+
+		pinctrl-0 = <&hdmi_hpd_default>;
+		pinctrl-names = "default";
+
+		port {
+			hdmi_con: endpoint {
+				remote-endpoint = <&usb_1_ss2_qmpphy_out_dp>;
+			};
+		};
+	};

[Severity: Medium]
The QMP combo PHY natively outputs DisplayPort signaling, but this hdmi-connector node strictly expects TMDS signaling.

Since the X1E80100 DP blocks lack DP++ support, does this direct connection violate DRM DT graph bindings by omitting the active DP-to-HDMI bridge needed to convert the signal?

[ ... ]

Quoted 19 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +19 -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 {
+				#address-cells = <1>;
+				#size-cells = <0>;

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

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

[Severity: High]
Is it possible that the SBU routing is missing here?

The commit claims support for DisplayPort over USB-C, but this configuration omits port@2 for the SBU endpoints, and there are no SBU multiplexers or retimers defined.

Will this prevent the UCSI Alt Mode driver from routing SBU and break DisplayPort Alternate Mode?

[ ... ]

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

Quoted 3 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +3 -0
+	sound {
+		compatible = "qcom,x1e80100-sndcard";
+		model = "X1E80100-HONOR-MagicBook-Art-14-Snapdragon";

[Severity: High]
The commit mentions support for HDMI and DP over USB-C, but this sound node omits the displayport-X-dai-link blocks.

Without these DAI links, won't audio routing to external monitors over DisplayPort and HDMI fail?

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

Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +4 -0
+		audio-routing = "WooferLeft IN", "WSA WSA_SPK1 OUT",
+				"TweeterLeft IN", "WSA WSA_SPK2 OUT",
+				"WooferRight IN", "WSA2 WSA_SPK2 OUT",
+				"TweeterRight IN", "WSA2 WSA_SPK2 OUT",

[Severity: High]
Does mapping both WooferRight and TweeterRight to WSA2 WSA_SPK2 OUT accidentally leave the WSA2 WSA_SPK1 OUT widget unused?

If the first channel of the WSA2 macro is never powered on, could this break channel separation or cause the right woofer to fail?

[ ... ]

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

Quoted 9 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +9 -0
+	touchpad@5d {
+		compatible = "hid-over-i2c";
+		reg = <0x5d>;
+
+		hid-descr-addr = <0x1>;
+		interrupts-extended = <&tlmm 24 IRQ_TYPE_LEVEL_LOW>;
+
+		vdd-supply = <&vreg_misc_3p3>;
+		vddl-supply = <&vreg_l12b_1p2>;

[Severity: Low]
According to the hid-over-i2c dt-bindings, the driver parses vddio-supply rather than vddl-supply.

Will this trigger dtbs_check errors and cause the upstream i2c-hid-of driver to ignore the supply? Should this be renamed to vddio-supply?

[ ... ]

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

Quoted 9 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +9 -0
+	keyboard@3a {
+		compatible = "hid-over-i2c";
+		reg = <0x3a>;
+
+		hid-descr-addr = <0x1>;
+		interrupts-extended = <&tlmm 67 IRQ_TYPE_LEVEL_LOW>;
+
+		vdd-supply = <&vreg_misc_3p3>;
+		vddl-supply = <&vreg_l12b_1p2>;

[Severity: Low]
Similarly, should vddl-supply be renamed to vddio-supply here for the keyboard to conform to the hid-over-i2c dt-bindings?

[ ... ]

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

Quoted 5 lines

+&usb_1_ss0 {

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +4 -0
+	dr_mode = "host";
+
+	status = "okay";
+};

[Severity: Low]
The dr_mode property is placed on the DWC3 wrapper node rather than the core node (e.g., usb_1_ss0_dwc3).

Since the core DWC3 driver parses dr_mode exclusively from its own node, won't this be ignored and cause the core to fall back to OTG mode?

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

Re: [PATCH v3 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 1293

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

It's fine to keep the other one enabled, if only to make sure that it's powered off sanely

Konrad

#6 lore raw

Re: [PATCH v3 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 723

Quoted 2 lines

+&iris {

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +1 -0
+	firmware-name = "qcom/x1e80100/HONOR/MRO-XXX/qcvss8380.mbn";

Is that a model name, or a placeholder?

[...]

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

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) */
+
+	hall_int_n_default: hall-int-n-state {
+		pins = "gpio92";
+		function = "gpio";
+		bias-disable;
+	};

nit: pins would be best sorted by their pin index

[...]

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

Quoted 11 lines
arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +11 -0
+	ts0_default: ts0-default-state {
+		int-n-pins {
+			pins = "gpio51";
+			function = "gpio";
+			bias-disable;
+		};
+
+		reset-n-pins {
+			pins = "gpio48";
+			function = "gpio";
+			output-high;

not a nit: drop output-foo properties from TLMM pins, the driver that consumes them should take care of setting their state

[...]

Quoted 1 line

+/* MP0 goes to the USB-A port(USB3) and FPC */

ultra nit: add a space before '(', please

Konrad

#7 lore raw
Quoted 4 lines · Konrad Dybcio

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

Quoted 2 lines

+&iris {

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +1 -0
+	firmware-name = "qcom/x1e80100/HONOR/MRO-XXX/qcvss8380.mbn";

Is that a model name, or a placeholder?

Yes, this is a model name (Intel variant of this laptop has MRA-XXX [1]).

[1]: https://linux-hardware.org/?view=computers&type=notebook&vendor=HONOR&model=MRA-XXX

#8 lore raw
Quoted 6 lines · Konstantin Shabanov
Quoted 4 lines · Konrad Dybcio

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

Quoted 2 lines

+&iris {

arch/arm64/boot/dts/qcom/x1e80100-honor-magicbook-art-14.dts new file +1 -0
+	firmware-name = "qcom/x1e80100/HONOR/MRO-XXX/qcvss8380.mbn";

Is that a model name, or a placeholder?

Yes, this is a model name (Intel variant of this laptop has MRA-XXX [1]).

I'm a little surprised, but okay!

Konrad

#9 lore raw

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