arm64: dts: qcom: Introduce Huawei Matebook E Go
v2 cover arm64: dts: qcom: Introduce Huawei Matebook E Go
Add support for the SC8280XP-based Huawei Matebook E Go (sc8280xp)
---
Changes in v2:
- use Co-developed-by: tag (Konrad)
- follow this order (property-n property-names) (Konrad)
- add a label for tablet mode switch (Konrad)
- handle line breaks properly (Konrad)
- remove the wlan calibration variant (Konrad)
- drop the venus node, as upstream has not supported it now
- Link to v1: https://lore.kernel.org/linux-arm-msm/[email protected]
---
Pengyu Luo (3):
dt-bindings: arm: qcom: Document Huawei Matebook E Go (sc8280xp)
firmware: qcom: scm: Allow QSEECOM on Huawei Matebook E Go (sc8280xp)
arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
.../devicetree/bindings/arm/qcom.yaml | 1 + arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 1318 +++++++++++++++++ drivers/firmware/qcom/qcom_scm.c | 1 + 4 files changed, 1321 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
Signature · 1 line
2.47.1
PATCH v2 1/3 dt-bindings: arm: qcom: Document Huawei Matebook E Go (sc8280xp)
Add compatible for the SC8280XP-based Huawei Matebook E Go, using its codename, gaokun3, which means it is the 3rd gen gaokun.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
@@ -822,6 +822,7 @@ properties: - items: - enum: + - huawei,gaokun3 - lenovo,thinkpad-x13s - microsoft,arcata - qcom,sc8280xp-crd
Signature · 1 line
2.47.1
PATCH v2 2/3 firmware: qcom: scm: Allow QSEECOM on Huawei Matebook E Go (sc8280xp)
In reply to Pengyu LuoAdd the SC8280XP-based Huawei Matebook E Go (sc8280xp) to the allowlist.
--- drivers/firmware/qcom/qcom_scm.c | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/qcom/qcom_scm.c +1 -0
@@ -1769,6 +1769,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);*/ static const struct of_device_id qcom_scm_qseecom_allowlist[]__maybe_unused = { { .compatible ="dell,xps13-9345" }, + { .compatible ="huawei,gaokun3" }, { .compatible ="lenovo,flex-5g" }, { .compatible ="lenovo,thinkpad-t14s" }, { .compatible ="lenovo,thinkpad-x13s" , },
Signature · 1 line
2.47.1
PATCH v2 3/3 arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
In reply to Pengyu LuoAdd an initial devicetree for the Huawei Matebook E Go, which is based on sc8280xp.
There are 3 variants, Huawei released first 2 at the same time. Huawei Matebook E Go LTE(sc8180x), codename should be gaokun2. Huawei Matebook E Go([email protected]), codename is gaokun3. Huawei Matebook E Go 2023([email protected]).
We add support for the latter two variants.
This work started by Tianyu Gao and Xuecong Chen, they made the devicetree based on existing work(i.e. the Lenovo X13s and the Qualcomm CRD), it can boot with framebuffer.
Original work: https://github.com/matalama80td3l/matebook-e-go-boot-works/blob/main/dts/sc8280xp-huawei-matebook-e-go.dts
Later, I got my device, I continue their work.
Supported features:
- adsp
- bluetooth (connect issue)
- charge (with a lower power)
- framebuffer
- gpu
- keyboard (via internal USB)
- pcie devices (wifi and nvme, no modem)
- speakers and microphones
- tablet mode switch
- touchscreen
- usb
- volume key and power key
Some key features not supported yet:
- battery and charger information report (EC driver required)
- built-in display (cannot enable backlight yet)
- charging thresholds control (EC driver required)
- camera
- LID switch detection (EC driver required)
- USB Type-C altmode (EC driver required)
- USB Type-C PD (EC driver required)
I have finished the EC driver, once this series are upstreamed, I will submit a series of patches to enable EC support.
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 1318 +++++++++++++++++ 2 files changed, 1319 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -195,6 +195,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sc7280-crd-r3.dtb dtb-$(CONFIG_ARCH_QCOM) += sc8180x-lenovo-flex-5g.dtb dtb-$(CONFIG_ARCH_QCOM) += sc8180x-primus.dtb dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-crd.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-huawei-gaokun3.dtb dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-lenovo-thinkpad-x13s.dtb dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-microsoft-arcata.dtb dtb-$(CONFIG_ARCH_QCOM) += sda660-inforce-ifc6560.dtb
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +1318 -0
1,318 lines not on this page · raw message
Signature · 1 line
2.47.1
Re: [PATCH v2 3/3] arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
Quoted 8 lines · Pengyu Luo
Add an initial devicetree for the Huawei Matebook E Go, which is based on sc8280xp.
There are 3 variants, Huawei released first 2 at the same time. Huawei Matebook E Go LTE(sc8180x), codename should be gaokun2. Huawei Matebook E Go([email protected]), codename is gaokun3. Huawei Matebook E Go 2023([email protected]).
Quoted 6 lines
We add support for the latter two variants.
This work started by Tianyu Gao and Xuecong Chen, they made the devicetree based on existing work(i.e. the Lenovo X13s and the Qualcomm CRD), it can boot with framebuffer.
So this looks good now, but
[...]
Quoted 4 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +4
-0+ chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges;
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts line 47
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +10
-0+ + framebuffer0: framebuffer@c6200000 { + compatible = "simple-framebuffer"; + reg = <0x0 0xc6200000 0x0 0x02400000>; + width = <1600>; + height = <2560>; + stride = <(1600 * 4)>; + format = "a8r8g8b8"; + }; + };
I still don't understand why efifb doesn't work for you.
Could you share your .config file?
Konrad
Re: [PATCH v2 3/3] arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
Messing up, reply again to fix thread.
Quoted 2 lines · Konrad Dybcio
On 20.12.2024 5:05 PM, Pengyu Luo wrote:
[...]
Quoted 15 lines
Quoted 4 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +4
-0+ chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges;arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts line 47
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +10
-0+ + framebuffer0: framebuffer@c6200000 { + compatible = "simple-framebuffer"; + reg = <0x0 0xc6200000 0x0 0x02400000>; + width = <1600>; + height = <2560>; + stride = <(1600 * 4)>; + format = "a8r8g8b8"; + }; + };
Quoted 2 lines
I still don't understand why efifb doesn't work for you.
In v1, you asked me
Quoted 2 lines
Very very weird. Are you booting with
clk_ignore_unusedpd_ignore_unusedin kernel cmdline?
I said yes, as Johan suggested in here (see [1]). I am adding Johan.
Quoted 1 line
Could you share your .config file?
Here please, https://pastebin.com/UKew61ZC
Quoted 3 lines
Konrad
Best wishes,
Pengyu
[1] https://github.com/jhovold/linux/wiki/X13s#kernel-command-line
Re: [PATCH v2 3/3] arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
Quoted 23 lines · Pengyu Luo
Messing up, reply again to fix thread.
Quoted 2 lines · Konrad Dybcio
On 20.12.2024 5:05 PM, Pengyu Luo wrote:
[...]
Quoted 15 lines
Quoted 14 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +14
-0+ chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer0: framebuffer@c6200000 { + compatible = "simple-framebuffer"; + reg = <0x0 0xc6200000 0x0 0x02400000>; + width = <1600>; + height = <2560>; + stride = <(1600 * 4)>; + format = "a8r8g8b8"; + }; + };
Quoted 4 lines
Quoted 2 lines
I still don't understand why efifb doesn't work for you.
In v1, you asked me
Ahh sorry, I churn through a lot of emails and sometimes forget things.
Quoted 9 lines
Quoted 3 lines
Very very weird. Are you booting with
clk_ignore_unusedpd_ignore_unusedin kernel cmdline?I said yes, as Johan suggested in here (see [1]). I am adding Johan.
Quoted 1 line
Could you share your .config file?
Here please, https://pastebin.com/UKew61ZC
All the things one would expect for efifb to show up seem to be there.
Maybe try earlycon=efifb video=efifb?
Konrad
Re: [PATCH v2 3/3] arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
Quoted 37 lines · Konrad Dybcio
Quoted 23 lines · Pengyu Luo
Messing up, reply again to fix thread.
Quoted 2 lines · Konrad Dybcio
On 20.12.2024 5:05 PM, Pengyu Luo wrote:
[...]
Quoted 15 lines
Quoted 14 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +14
-0+ chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer0: framebuffer@c6200000 { + compatible = "simple-framebuffer"; + reg = <0x0 0xc6200000 0x0 0x02400000>; + width = <1600>; + height = <2560>; + stride = <(1600 * 4)>; + format = "a8r8g8b8"; + }; + };Quoted 4 lines
Quoted 2 lines
I still don't understand why efifb doesn't work for you.
In v1, you asked me
Ahh sorry, I churn through a lot of emails and sometimes forget things.
Quoted 6 lines
Quoted 3 lines
Very very weird. Are you booting with
clk_ignore_unusedpd_ignore_unusedin kernel cmdline?I said yes, as Johan suggested in here (see [1]). I am adding Johan.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
Could you share your .config file?
Here please, https://pastebin.com/UKew61ZC
All the things one would expect for efifb to show up seem to be there.
Maybe try earlycon=efifb video=efifb?
Not work, whether or not adding clk_ignore_unused pd_ignore_unused.
Quoted 2 lines
Konrad
Best wishes,
Pengyu
Re: [PATCH v2 3/3] arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
Quoted 40 lines · Pengyu Luo
Quoted 39 lines · Konrad Dybcio
Quoted 23 lines · Pengyu Luo
Messing up, reply again to fix thread.
Quoted 2 lines · Konrad Dybcio
On 20.12.2024 5:05 PM, Pengyu Luo wrote:
[...]
Quoted 15 lines
Quoted 14 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts new file +14
-0+ chosen { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + framebuffer0: framebuffer@c6200000 { + compatible = "simple-framebuffer"; + reg = <0x0 0xc6200000 0x0 0x02400000>; + width = <1600>; + height = <2560>; + stride = <(1600 * 4)>; + format = "a8r8g8b8"; + }; + };Quoted 4 lines
Quoted 2 lines
I still don't understand why efifb doesn't work for you.
In v1, you asked me
Ahh sorry, I churn through a lot of emails and sometimes forget things.
Quoted 8 lines
Quoted 3 lines
Very very weird. Are you booting with
clk_ignore_unusedpd_ignore_unusedin kernel cmdline?I said yes, as Johan suggested in here (see [1]). I am adding Johan.
Quoted 1 line
Could you share your .config file?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Here please, https://pastebin.com/UKew61ZC
All the things one would expect for efifb to show up seem to be there.
Maybe try earlycon=efifb video=efifb?
Not work, whether or not adding
clk_ignore_unusedpd_ignore_unused.
I am utterly confused then, maybe it's one of those devices where calling exit boot services kills the display.
Either way, let's not worry about it anymore
Konrad
Re: [PATCH 5/5] arm64: dts: qcom: gaokun3: Add Embedded Controller node
Quoted 90 lines · Konrad Dybcio
Quoted 26 lines · Pengyu Luo
The Embedded Controller in the Huawei Matebook E Go (s8280xp) is accessible on &i2c15 and provides battery and adapter status, port orientation status, as well as HPD event notifications for two USB Type-C port, etc.
Add the EC to the device tree and describe the relationship among the type-c ports, orientation switches and the QMP combo PHY.
Signed-off-by Pengyu Luo <[email protected]>--- .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 139 ++++++++++++++++++ 1 file changed, 139 insertions(+)arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +1
-0@@ -28,6 +28,7 @@ / { aliases { i2c4 = &i2c4; + i2c15 = &i2c15; serial1 = &uart2; };arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts map1 { · line 226
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +7
-0@@ -216,6 +217,40 @@ map1 { }; }; + usb0-sbu-mux { + compatible = "pericom,pi3usb102", "gpio-sbu-mux"; + + select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&usb0_sbu_default>;Please preserve this order:
property-n
property-namesarch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts map1 { · line 228
Quoted 2 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +2
-0+ + orientation-switch;This
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts map1 { · line 232
Quoted 4 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +4
-0+ + port { + usb0_sbu_mux: endpoint { + remote-endpoint = <&ucsi0_sbu>;And this section have incorrect whitespacing (one tab too many, make sure you set your tab width to 8 spaces)
Same for usb1-sbu-mux
[...]
Quoted 17 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +10
-0+ i2c15_default: i2c15-default-state { + pins = "gpio36", "gpio37"; + function = "qup15"; + drive-strength = <2>; + bias-pull-up; + }; + mode_pin_active: mode-pin-state { pins = "gpio26"; function = "gpio";@@ -1301,6 +1426,20 @@ tx-pins { }; }; + usb0_sbu_default: usb0-sbu-state { + pins = "gpio164"; + function = "gpio";arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts tx-pins { · line 1441
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +10
-0+ bias-disable; + drive-strength = <16>; + }; + + usb1_sbu_default: usb1-sbu-state { + pins = "gpio47"; + function = "gpio"; + bias-disable; + drive-strength = <16>; + };Similarly, please keep drive-strength above bias for consistency
Quoted 2 lines
lgtm otherwise
Totaly agree, I was in a hurry, I will fix it in v2.
Best wishes,
Pengyu
Re: (subset) [PATCH v2 0/3] arm64: dts: qcom: Introduce Huawei Matebook E Go
In reply to Pengyu LuoQuoted 3 lines · Pengyu Luo
Add support for the SC8280XP-based Huawei Matebook E Go (sc8280xp)
Applied, thanks!
[1/3] dt-bindings: arm: qcom: Document Huawei Matebook E Go (sc8280xp)
commit: f99c52954a82601d4d46677e9399e87c8b6c1bb3
[3/3] arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)
commit: 1401ae5c28a259f684ccba7b460884b88f863596Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>