Microsoft Surface Pro 9 5G support
cover Microsoft Surface Pro 9 5G support
This series brings support for the SC8280XP-based Microsoft Surface Pro 9 5G.
Jérôme de Bretagne (4):
dt-bindings: arm: qcom: Document Microsoft Surface Pro 9 5G
firmware: qcom: scm: Allow QSEECOM on Microsoft Surface Pro 9 5G
arm64: dts: qcom: sc8280xp: Add uart18
arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
.../devicetree/bindings/arm/qcom.yaml | 1 + arch/arm64/boot/dts/qcom/Makefile | 1 + .../sc8280xp-microsoft-surface-pro-9-5G.dts | 1099 +++++++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 14 + drivers/firmware/qcom/qcom_scm.c | 1 + 5 files changed, 1116 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts
Signature · 1 line
2.45.2
PATCH 1/4 dt-bindings: arm: qcom: Document Microsoft Surface Pro 9 5G
Add compatible for the SC8280XP-based Microsoft Surface Pro 9 5G, using its Arcata codename.
--- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/qcom.yaml +1 -0
@@ -810,6 +810,7 @@ properties: - items: - enum: - lenovo,thinkpad-x13s + - microsoft,arcata - qcom,sc8280xp-crd - qcom,sc8280xp-qrd - const: qcom,sc8280xp
Signature · 1 line
2.45.2
Re: [PATCH 1/4] dt-bindings: arm: qcom: Document Microsoft Surface Pro 9 5G
Quoted 7 lines · Jérôme de Bretagne
Add compatible for the SC8280XP-based Microsoft Surface Pro 9 5G, using its Arcata codename.
Signed-off-by Jérôme de Bretagne <[email protected]>--- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+)
Best regards,
Krzysztof
PATCH 2/4 firmware: qcom: scm: Allow QSEECOM on Microsoft Surface Pro 9 5G
In reply to Jérôme de BretagneAdd the SC8280XP-based Microsoft Surface Pro 9 5G to the allowlist.
--- drivers/firmware/qcom/qcom_scm.c | 1 + 1 file changed, 1 insertion(+)
drivers/firmware/qcom/qcom_scm.c +1 -0
@@ -1725,6 +1725,7 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);static const struct of_device_id qcom_scm_qseecom_allowlist[]__maybe_unused = { { .compatible ="lenovo,flex-5g" }, { .compatible ="lenovo,thinkpad-x13s" , }, + { .compatible ="microsoft,arcata" , }, { .compatible ="qcom,sc8180x-primus" }, { .compatible ="qcom,x1e80100-crd" }, { .compatible ="qcom,x1e80100-qcp" },
Signature · 1 line
2.45.2
Re: [PATCH 2/4] firmware: qcom: scm: Allow QSEECOM on Microsoft Surface Pro 9 5G
Quoted 4 lines · Jérôme de Bretagne
Add the SC8280XP-based Microsoft Surface Pro 9 5G to the allowlist.
Signed-off-by Jérôme de Bretagne <[email protected]>---
Konrad
PATCH 3/4 arm64: dts: qcom: sc8280xp: Add uart18
In reply to Jérôme de BretagneAdd the node describing uart18 for sc8280xp devices.
--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +14 -0
@@ -1013,6 +1013,20 @@ spi18: spi@888000 { status = "disabled"; }; + uart18: serial@888000 { + compatible = "qcom,geni-uart"; + reg = <0 0x00888000 0 0x4000>; + clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>; + clock-names = "se"; + interrupts = <GIC_SPI 584 IRQ_TYPE_LEVEL_HIGH>; + operating-points-v2 = <&qup_opp_table_100mhz>; + power-domains = <&rpmhpd SC8280XP_CX>; + interconnects = <&clk_virt MASTER_QUP_CORE_2 0 &clk_virt SLAVE_QUP_CORE_2 0>, + <&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_QUP_2 0>; + interconnect-names = "qup-core", "qup-config"; + status = "disabled"; + }; + i2c19: i2c@88c000 { compatible = "qcom,geni-i2c"; reg = <0 0x0088c000 0 0x4000>;
Signature · 1 line
2.45.2
Konrad Dybcio
maintainerRe: [PATCH 3/4] arm64: dts: qcom: sc8280xp: Add uart18
Quoted 12 lines · Jérôme de Bretagne
Add the node describing uart18 for sc8280xp devices.
Signed-off-by Jérôme de Bretagne <[email protected]>--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)arch/arm64/boot/dts/qcom/sc8280xp.dtsi +0
-0
arch/arm64/boot/dts/qcom/sc8280xp.dtsi spi18: spi@888000 { · line 1019
Quoted 7 lines
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +4
-0@@ -1013,6 +1013,20 @@ spi18: spi@888000 { status = "disabled"; }; + uart18: serial@888000 { + compatible = "qcom,geni-uart"; + reg = <0 0x00888000 0 0x4000>; + clocks = <&gcc GCC_QUPV3_WRAP2_S1_CLK>;
This should be the _S2 clock
Konrad
PATCH 4/4 arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
In reply to Jérôme de BretagneAdd an initial devicetree for the Microsoft Surface Pro 9 5G, based on SC8280XP.
It enables the support for Wi-Fi, NVMe, the two USB Type-C ports, Bluetooth, 5G cellular modem, audio output (via Bluetooth headsets), external display via DisplayPort over Type-C (only the bottom USB Type-C port is working so far, corresponding to the usb1 / dp1 nodes), charging, the Surface Aggregator Module (SAM) to get keyboard and touchpad working with the Surface Type Cover accessories.
Some key features not supported yet:
- built-in display (but software fallback is working with efifb when blacklisting the msm module)
- built-in display touchscreen
- external display with the top USB Type-C port
- speakers and microphones
- physical volume up and down keys
- LID switch detection
This devicetree is based on the other SC8280XP ones, for the Lenovo ThinkPad X13s and the Qualcomm CRD.
--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../sc8280xp-microsoft-surface-pro-9-5G.dts | 1099 +++++++++++++++++ 2 files changed, 1100 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts
arch/arm64/boot/dts/qcom/Makefile +1 -0
@@ -184,6 +184,7 @@ 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-lenovo-thinkpad-x13s.dtb +dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-microsoft-surface-pro-9-5G.dtb dtb-$(CONFIG_ARCH_QCOM) += sda660-inforce-ifc6560.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm450-lenovo-tbx605f.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm450-motorola-ali.dtb
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +1099 -0
1,099 lines not on this page · raw message
Signature · 1 line
2.45.2
Re: [PATCH 4/4] arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
Quoted 22 lines · Jérôme de Bretagne
Add an initial devicetree for the Microsoft Surface Pro 9 5G, based on SC8280XP.
It enables the support for Wi-Fi, NVMe, the two USB Type-C ports, Bluetooth, 5G cellular modem, audio output (via Bluetooth headsets), external display via DisplayPort over Type-C (only the bottom USB Type-C port is working so far, corresponding to the usb1 / dp1 nodes), charging, the Surface Aggregator Module (SAM) to get keyboard and touchpad working with the Surface Type Cover accessories.
Some key features not supported yet:
- built-in display (but software fallback is working with efifb when blacklisting the msm module)
- built-in display touchscreen
- external display with the top USB Type-C port
- speakers and microphones
- physical volume up and down keys
- LID switch detectionThis devicetree is based on the other SC8280XP ones, for the Lenovo ThinkPad X13s and the Qualcomm CRD.
...
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 683
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +9
-0+ +&swr0 { + status = "okay"; +}; + +&swr1 { + status = "okay"; + + wcd_rx: wcd9380-rx@0,4 {
codec@
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 693
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +10
-0+ compatible = "sdw20217010d00"; + reg = <0 4>; + qcom,rx-port-mapping = <1 2 3 4 5>; + }; +}; + +&swr2 { + status = "okay"; + + wcd_tx: wcd9380-tx@0,3 {
codec@
Rest looks good, except ordering of nodes/overrides/phandles. They should go alphabetically, AFAIR, so your &tlmm is placed in wrong spot.
Best regards,
Krzysztof
Re: [PATCH 4/4] arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines · Jérôme de Bretagne
Add an initial devicetree for the Microsoft Surface Pro 9 5G, based on SC8280XP.
Rest looks good, except ordering of nodes/overrides/phandles. They should go alphabetically, AFAIR, so your &tlmm is placed in wrong spot.
For the other sc8280xp machines (and I believe at least some other SoCs), we placed the pinctrl section, which tends to be quite long, last on purpose with a separating header (e.g. so that it is easy to find):
/* PINCTRL */
&pmr735a_gpios {
...
&tlmm {Looks like the header comment is missing here if you want to follow that style, though.
Johan
Re: [PATCH 4/4] arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
Quoted 20 lines · Johan Hovold
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines · Jérôme de Bretagne
Add an initial devicetree for the Microsoft Surface Pro 9 5G, based on SC8280XP.
Rest looks good, except ordering of nodes/overrides/phandles. They should go alphabetically, AFAIR, so your &tlmm is placed in wrong spot.
For the other sc8280xp machines (and I believe at least some other SoCs), we placed the pinctrl section, which tends to be quite long, last on purpose with a separating header (e.g. so that it is easy to find):
/* PINCTRL */ &pmr735a_gpios { ... &tlmm {
Quoted 2 lines
Looks like the header comment is missing here if you want to follow that style, though.
No, the header is already there, sorry.
Johan
Krzysztof Kozlowski
Reviewed-byRe: [PATCH 4/4] arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
In reply to Johan HovoldQuoted 20 lines · Johan Hovold
Quoted 6 lines · Krzysztof Kozlowski
Quoted 2 lines · Jérôme de Bretagne
Add an initial devicetree for the Microsoft Surface Pro 9 5G, based on SC8280XP.
Rest looks good, except ordering of nodes/overrides/phandles. They should go alphabetically, AFAIR, so your &tlmm is placed in wrong spot.
For the other sc8280xp machines (and I believe at least some other SoCs), we placed the pinctrl section, which tends to be quite long, last on purpose with a separating header (e.g. so that it is easy to find):
/* PINCTRL */ &pmr735a_gpios { ... &tlmm {
Quoted 2 lines
Looks like the header comment is missing here if you want to follow that style, though.
If that is the style here, no problem for me. With two node name fixes:
Best regards,
Krzysztof
Konrad Dybcio
maintainerRe: [PATCH 4/4] arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
In reply to Jérôme de BretagneQuoted 24 lines · Jérôme de Bretagne
Add an initial devicetree for the Microsoft Surface Pro 9 5G, based on SC8280XP.
It enables the support for Wi-Fi, NVMe, the two USB Type-C ports, Bluetooth, 5G cellular modem, audio output (via Bluetooth headsets), external display via DisplayPort over Type-C (only the bottom USB Type-C port is working so far, corresponding to the usb1 / dp1 nodes), charging, the Surface Aggregator Module (SAM) to get keyboard and touchpad working with the Surface Type Cover accessories.
Some key features not supported yet:
- built-in display (but software fallback is working with efifb when blacklisting the msm module)
- built-in display touchscreen
- external display with the top USB Type-C port
- speakers and microphones
- physical volume up and down keys
- LID switch detectionThis devicetree is based on the other SC8280XP ones, for the Lenovo ThinkPad X13s and the Qualcomm CRD.
Signed-off-by Jérôme de Bretagne <[email protected]>---
[...]
Quoted 43 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +43
-0+ + pmic-glink { + compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink"; + + #address-cells = <1>; + #size-cells = <0>; + + connector@0 { + compatible = "usb-c-connector"; + reg = <0>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + pmic_glink_con0_hs: endpoint { + remote-endpoint = <&usb_0_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + pmic_glink_con0_ss: endpoint { + remote-endpoint = <&usb_0_qmpphy_out>; + }; + }; + + port@2 { + reg = <2>; + + pmic_glink_con0_sbu: endpoint { + remote-endpoint = <&usb0_sbu_mux>; + }; + }; + }; + }; +
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 100
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +10
-0+ connector@1 { + compatible = "usb-c-connector"; + reg = <1>; + power-role = "dual"; + data-role = "dual"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + port@0 {
Missing newline above
Could you add a comment explaining which port is which (physically)? See x1e device trees for an example
[...]
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 252
Quoted 8 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +8
-0+ usb0-sbu-mux { + compatible = "pericom,pi3usb102", "gpio-sbu-mux"; + + enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>; + select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&usb0_sbu_default>;
property-n
property-names
please, all throughout the file
[...]
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 536
Quoted 6 lines
+&pcie4_port0 {
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +5
-0+ wifi@0 { + compatible = "pci17cb,1103"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + + qcom,ath11k-calibration-variant = "LE_X13S";
This is most likely not a x13s, please add a new calibration variant
[...]
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 602
Quoted 5 lines
+&sound {
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +4
-0+ compatible = "qcom,sc8280xp-sndcard"; + model = "SC8280XP-MICROSOFT-SURFACE-PRO-9-5G"; + audio-routing = + "SpkrLeft IN", "WSA_SPK1 OUT",
Drop the newline after =
Quoted 5 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +5
-0+ "SpkrRight IN", "WSA_SPK2 OUT", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC2", "MIC BIAS2", + "VA DMIC0", "MIC BIAS1",
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 617
Quoted 10 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +10
-0+ "VA DMIC1", "MIC BIAS1", + "VA DMIC2", "MIC BIAS3", + "VA DMIC0", "VA MIC BIAS1", + "VA DMIC1", "VA MIC BIAS1", + "VA DMIC2", "VA MIC BIAS3", + "TX SWR_ADC1", "ADC2_OUTPUT"; + + wcd-playback-dai-link { + link-name = "WCD Playback"; + cpu {
Add a newline between the last property and subnodes
[...]
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 737
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +9
-0+ +&uart18 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&uart18_state>; + + surface-aggregator { + compatible = "surface,aggregator";
This wasn't tested against the upstream driver (see Documentation/devicetree/bindings/platform/microsoft,surface-sam.yaml)
[...]
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts line 907
Quoted 3 lines
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts new file +3
-0+ +&tlmm { + gpio-reserved-ranges = <70 2>, <74 6>, <125 2>, <128 2>, <154 4>;
Please check that all of these entries are necessary (if they aren't, removing them will break booting)
Konrad
Konrad Dybcio
maintainerRe: [PATCH 4/4] arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G
In reply to Jérôme de BretagneQuoted 22 lines · Jérôme de Bretagne
Add an initial devicetree for the Microsoft Surface Pro 9 5G, based on SC8280XP.
It enables the support for Wi-Fi, NVMe, the two USB Type-C ports, Bluetooth, 5G cellular modem, audio output (via Bluetooth headsets), external display via DisplayPort over Type-C (only the bottom USB Type-C port is working so far, corresponding to the usb1 / dp1 nodes), charging, the Surface Aggregator Module (SAM) to get keyboard and touchpad working with the Surface Type Cover accessories.
Some key features not supported yet:
- built-in display (but software fallback is working with efifb when blacklisting the msm module)
- built-in display touchscreen
- external display with the top USB Type-C port
- speakers and microphones
- physical volume up and down keys
- LID switch detectionThis devicetree is based on the other SC8280XP ones, for the Lenovo ThinkPad X13s and the Qualcomm CRD.
Quoted 6 lines
Signed-off-by Jérôme de Bretagne <[email protected]>--- arch/arm64/boot/dts/qcom/Makefile | 1 + .../sc8280xp-microsoft-surface-pro-9-5G.dts | 1099 +++++++++++++++++ 2 files changed, 1100 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts
Please match the filename to the compatible (i.e. sc8280xp-microsoft-arcata)
Konrad
Rob Herring (Arm)
maintainerQuoted 17 lines · Jérôme de Bretagne
This series brings support for the SC8280XP-based Microsoft Surface Pro 9 5G.
Jérôme de Bretagne (4):
dt-bindings: arm: qcom: Document Microsoft Surface Pro 9 5G
firmware: qcom: scm: Allow QSEECOM on Microsoft Surface Pro 9 5G
arm64: dts: qcom: sc8280xp: Add uart18
arm64: dts: qcom: sc8280xp: Add Microsoft Surface Pro 9 5G.../devicetree/bindings/arm/qcom.yaml | 1 + arch/arm64/boot/dts/qcom/Makefile | 1 + .../sc8280xp-microsoft-surface-pro-9-5G.dts | 1099 +++++++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 14 + drivers/firmware/qcom/qcom_scm.c | 1 + 5 files changed, 1116 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts
Quoted 4 lines
--
2.45.2
My bot found new DTB warnings on the .dts files added or changed in this series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings are fixed by another series. Ultimately, it is up to the platform maintainer whether these warnings are acceptable or not. No need to reply unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then make sure dt-schema is up to date:
pip3 install dtschema --upgrade
New warnings running 'make CHECK_DTBS=y qcom/sc8280xp-microsoft-surface-pro-9-5G.dtb' for [email protected]:
arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dtb: geniqup@8c0000: serial@888000: Unevaluated properties are not allowed ('surface-aggregator' was unexpected)
from schema $id: http://devicetree.org/schemas/soc/qcom/qcom,geni-se.yaml#arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dtb: serial@888000: Unevaluated properties are not allowed ('surface-aggregator' was unexpected)
from schema $id: http://devicetree.org/schemas/serial/qcom,serial-geni-qcom.yaml#arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dtb: /soc@0/geniqup@8c0000/serial@888000/surface-aggregator: failed to match any schema with compatible: ['surface,aggregator'] arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dtb: pinctrl@f100000: ssam-state: 'oneOf' conditional failed, one must be fixed:
'function' is a required property
Unevaluated properties are not allowed ('wake-int' was unexpected)
'pins' is a required property
'wake-int' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/pinctrl/qcom,sc8280xp-tlmm.yaml#arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dtb: pinctrl@f100000: uart18-state: 'oneOf' conditional failed, one must be fixed:
'function' is a required property
Unevaluated properties are not allowed ('cts', 'rts-tx', 'rx' were unexpected)
'pins' is a required property
'cts', 'rts-tx', 'rx' do not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/pinctrl/qcom,sc8280xp-tlmm.yaml#