Skip to content

Commit

Permalink
arm64: dts: qcom: sc8280xp-sp9-5G: Enable external display
Browse files Browse the repository at this point in the history
Like on the CRD and Thinkpad X13s, add the necessary nodes to
enable USB Type-C altmode-based external display on the Microsoft
Surface Pro 9 5G.

Only the bottom USB Type-C port is working so far, corresponding
to the usb1 / dp1 entries.

Signed-off-by: Jérôme de Bretagne <jerome.debretagne@gmail.com>
  • Loading branch information
JeromeDeBretagne committed Mar 4, 2024
1 parent c2c0f14 commit 0be6a8e
Show file tree
Hide file tree
Showing 2 changed files with 239 additions and 0 deletions.
Binary file modified arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dtb
Binary file not shown.
239 changes: 239 additions & 0 deletions arch/arm64/boot/dts/qcom/sc8280xp-microsoft-surface-pro-9-5G.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,84 @@
model = "Microsoft Surface Pro 9 5G";
compatible = "microsoft,surface-pro-9-5G", "qcom,sc8280xp";

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_role_switch>;
};
};

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>;
};
};
};
};

connector@1 {
compatible = "usb-c-connector";
reg = <1>;
power-role = "dual";
data-role = "dual";

ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;

pmic_glink_con1_hs: endpoint {
remote-endpoint = <&usb_1_role_switch>;
};
};

port@1 {
reg = <1>;

pmic_glink_con1_ss: endpoint {
remote-endpoint = <&usb_1_qmpphy_out>;
};
};

port@2 {
reg = <2>;

pmic_glink_con1_sbu: endpoint {
remote-endpoint = <&usb1_sbu_mux>;
};
};
};
};
};

vreg_nvme: regulator-nvme {
compatible = "regulator-fixed";

Expand Down Expand Up @@ -46,6 +124,62 @@

regulator-boot-on;
};

reserved-memory {
gpu_mem: gpu-mem@8bf00000 {
reg = <0 0x8bf00000 0 0x2000>;
no-map;
};

linux,cma {
compatible = "shared-dma-pool";
size = <0x0 0x8000000>;
reusable;
linux,cma-default;
};
};

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>;

mode-switch;
orientation-switch;

port {
usb0_sbu_mux: endpoint {
remote-endpoint = <&pmic_glink_con0_sbu>;
};
};
};

usb1-sbu-mux {
compatible = "pericom,pi3usb102", "gpio-sbu-mux";

enable-gpios = <&tlmm 48 GPIO_ACTIVE_LOW>;
select-gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;

pinctrl-names = "default";
pinctrl-0 = <&usb1_sbu_default>;

mode-switch;
orientation-switch;

port {
usb1_sbu_mux: endpoint {
remote-endpoint = <&pmic_glink_con1_sbu>;
};
};
};
};

&gpu_smmu {
status = "okay";
};

&apps_rsc {
Expand Down Expand Up @@ -166,6 +300,53 @@
};
};

&dispcc0 {
status = "okay";
};

&dispcc1 {
status = "okay";
};

&gmu {
status = "okay";
};

&gpu {
status = "okay";

zap-shader {
memory-region = <&gpu_mem>;
firmware-name = "qcom/sc8280xp/MICROSOFT/SurfacePro9/qcdxkmsuc8280.mbn";
};
};

&gpucc {
status = "okay";
};

&mdss0 {
status = "okay";
};

&mdss0_dp0 {
status = "okay";
};

&mdss0_dp0_out {
data-lanes = <0 1>;
remote-endpoint = <&usb_0_qmpphy_dp_in>;
};

&mdss0_dp1 {
status = "okay";
};

&mdss0_dp1_out {
data-lanes = <0 1>;
remote-endpoint = <&usb_1_qmpphy_dp_in>;
};

&pmk8280_pon_pwrkey {
status = "okay";
};
Expand Down Expand Up @@ -289,6 +470,18 @@
status = "okay";
};

&usb_0_qmpphy_dp_in {
remote-endpoint = <&mdss0_dp0_out>;
};

&usb_0_qmpphy_out {
remote-endpoint = <&pmic_glink_con0_ss>;
};

&usb_0_role_switch {
remote-endpoint = <&pmic_glink_con0_hs>;
};

&usb_1 {
status = "okay";
};
Expand All @@ -314,6 +507,18 @@
status = "okay";
};

&usb_1_qmpphy_dp_in {
remote-endpoint = <&mdss0_dp1_out>;
};

&usb_1_qmpphy_out {
remote-endpoint = <&pmic_glink_con1_ss>;
};

&usb_1_role_switch {
remote-endpoint = <&pmic_glink_con1_hs>;
};

&xo_board_clk {
clock-frequency = <38400000>;
};
Expand Down Expand Up @@ -382,4 +587,38 @@
bias-pull-up;
};
};

usb0_sbu_default: usb0-sbu-state {
oe-n-pins {
pins = "gpio101";
function = "gpio";
bias-disable;
drive-strength = <16>;
output-high;
};

sel-pins {
pins = "gpio164";
function = "gpio";
bias-disable;
drive-strength = <16>;
};
};

usb1_sbu_default: usb1-sbu-state {
oe-n-pins {
pins = "gpio48";
function = "gpio";
bias-disable;
drive-strength = <16>;
output-high;
};

sel-pins {
pins = "gpio47";
function = "gpio";
bias-disable;
drive-strength = <16>;
};
};
};

0 comments on commit 0be6a8e

Please sign in to comment.