arm64: dts: qcom: sc8280xp-huawei-gaokun3: Add dsi panel DT node
PATCH 1/1 arm64: dts: qcom: sc8280xp-huawei-gaokun3: Add dsi panel DT node
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi, dsi_phy are blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.
--- .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 165 ++++++++++++++++++ 1 file changed, 165 insertions(+)
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +165 -0
@@ -11,6 +11,7 @@ /dts-v1/; +#include <dt-bindings/clock/qcom,dsi-phy-28nm.h> #include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/gpio-keys.h>
@@ -98,6 +99,52 @@ switch-mode { }; }; + vreg_avdd_5p5: regulator-avdd-5p5 { + compatible = "regulator-fixed"; + + regulator-name = "vreg_avdd_5p5"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + + gpio = <&tlmm 53 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&avdd_reg_en>; + pinctrl-names = "default"; + + regulator-boot-on; + }; + + vreg_avee_5p5: regulator-avee-5p5 { + compatible = "regulator-fixed"; + + regulator-name = "vreg_avee_5p5"; + regulator-min-microvolt = <5500000>; + regulator-max-microvolt = <5500000>; + + gpio = <&tlmm 52 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&avee_reg_en>; + pinctrl-names = "default"; + + regulator-boot-on; + }; + + vreg_vddi_1p8: regulator-vddi-1p8 { + compatible = "regulator-fixed"; + + regulator-name = "vreg_vddi_1p8"; + + gpio = <&tlmm 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&vddi_reg_en>; + pinctrl-names = "default"; + + regulator-boot-on; + }; + vreg_misc_3p3: regulator-misc-3p3 { compatible = "regulator-fixed";
@@ -616,6 +663,9 @@ touchscreen@4f { hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; + /* TODO: set post-reset-deassert-delay-ms */ + panel = <&panel>; + vdd-supply = <&vreg_misc_3p3>; vddl-supply = <&vreg_s10b>;
@@ -738,6 +788,86 @@ &mdss0_dp1_out { remote-endpoint = <&usb_1_qmpphy_dp_in>; }; +&mdss0_dsi0 { + /* real vdda is unknown */ + + qcom,dual-dsi-mode; + qcom,master-dsi; + qcom,sync-dual-dsi; + + status = "okay"; + + panel: panel@0 { + compatible = "csot,ppc357db1-4", "himax,hx83121a"; + reg = <0>; + + pinctrl-0 = <&disp_reset_n>, <&mdp_vsync_default>; + pinctrl-names = "default"; + + reset-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; + + vddi-supply = <&vreg_vddi_1p8>; + avdd-supply = <&vreg_avdd_5p5>; + avee-supply = <&vreg_avee_5p5>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + panel_in_0: endpoint { + remote-endpoint = <&mdss0_dsi0_out>; + }; + }; + + port@1 { + reg = <1>; + + panel_in_1: endpoint { + remote-endpoint = <&mdss0_dsi1_out>; + }; + }; + }; + }; +}; + +&mdss0_dsi0_out { + data-lanes = <0 1 2 3>; + remote-endpoint = <&panel_in_0>; +}; + +&mdss0_dsi0_phy { + /* real vdds is unknown */ + + status = "okay"; +}; + +&mdss0_dsi1 { + /* real vdda is unknown */ + + qcom,dual-dsi-mode; + qcom,sync-dual-dsi; + + status = "okay"; + + /* DSI1 is slave, so use DSI0 clocks */ + assigned-clock-parents = <&mdss0_dsi0_phy DSI_BYTE_PLL_CLK>, + <&mdss0_dsi0_phy DSI_PIXEL_PLL_CLK>; +}; + +&mdss0_dsi1_out { + data-lanes = <0 1 2 3>; + remote-endpoint = <&panel_in_1>; +}; + +&mdss0_dsi1_phy { + /* real vdds is unknown */ + + status = "okay"; +}; + &pcie2a { perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>;
@@ -1303,6 +1433,20 @@ &tlmm { gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 4>; + avdd_reg_en: avdd-reg-en-state { + pins = "gpio53"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + avee_reg_en: avee-reg-en-state { + pins = "gpio52"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + bt_default: bt-default-state { hstp-bt-en-pins { pins = "gpio133";
@@ -1318,6 +1462,20 @@ hstp-sw-ctrl-pins { }; }; + disp_reset_n: disp-reset-n-state { + pins = "gpio38"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + + mdp_vsync_default: mdp-vsync-default-state { + pins = "gpio8"; + function = "mdp_vsync"; + drive-strength = <2>; + bias-disable; + }; + i2c4_default: i2c4-default-state { pins = "gpio171", "gpio172"; function = "qup4";
@@ -1470,6 +1628,13 @@ usb1_sbu_default: usb1-sbu-state { bias-disable; }; + vddi_reg_en: vddi-reg-en-state { + pins = "gpio0"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + wcd_default: wcd-default-state { reset-pins { pins = "gpio106";
Signature · 1 line
2.54.0
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Review
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +
L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 V
Konrad
Quoted 10 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
Quoted 9 lines
[...]
Review
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 V
Yes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
Best wishes,
Pengyu
Quoted 1 line
Konrad
Quoted 18 lines · Pengyu Luo
Quoted 16 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +
Quoted 7 lines
Quoted 3 lines
L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 VYes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
L3B additionally powers CSIPHY2/3, EDP0/1, REFGEN (probably why it ends up being on), UFSPHY and USB1_PHY
L6B additionally powers the same components, minus refgen and USB
Konrad
Quoted 24 lines · Konrad Dybcio
Quoted 22 lines · Pengyu Luo
Quoted 19 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Review
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 V
Quoted 9 lines
Quoted 3 lines
Yes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
L3B additionally powers CSIPHY2/3, EDP0/1, REFGEN (probably why it ends up being on), UFSPHY and
USB1_PHYL6B additionally powers the same components, minus refgen and USB
No, I confirmed they are totally disabled, since there is a way to check it now.
https://lore.kernel.org/linux-arm-msm/[email protected]/
Best wishes,
Pengyu
Quoted 1 line
Konrad
Quoted 30 lines · Pengyu Luo
Quoted 28 lines · Konrad Dybcio
Quoted 25 lines · Pengyu Luo
Quoted 10 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
Quoted 9 lines
[...]
Review
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 VYes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
Quoted 8 lines
Quoted 5 lines
L3B additionally powers CSIPHY2/3, EDP0/1, REFGEN (probably why it ends up being on), UFSPHY and
USB1_PHYL6B additionally powers the same components, minus refgen and USB
No, I confirmed they are totally disabled, since there is a way to check it now.
https://lore.kernel.org/linux-arm-msm/[email protected]/
This presents you with the status of the votes casted by HLOS, not the actual hardware state
To get the latter, you'd have to dump the SPMI registers
Konrad
Quoted 35 lines · Konrad Dybcio
Quoted 33 lines · Pengyu Luo
Quoted 31 lines · Konrad Dybcio
Quoted 18 lines · Pengyu Luo
Quoted 16 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +Quoted 7 lines
Quoted 3 lines
L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 VYes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
L3B additionally powers CSIPHY2/3, EDP0/1, REFGEN (probably why it ends up being on), UFSPHY and
USB1_PHY
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
L6B additionally powers the same components, minus refgen and USB
No, I confirmed they are totally disabled, since there is a way to check it now.
https://lore.kernel.org/linux-arm-msm/[email protected]/This presents you with the status of the votes casted by HLOS, not the actual hardware state
If so, non-HLOS will vote on some critical regulators to keep them on, IIRC, once I disabled L9D, system reseted immediately.
Quoted 2 lines
To get the latter, you'd have to dump the SPMI registers
I will appreciate it if you provide more information.
Best wishes,
Pengyu
Quoted 1 line
Konrad
Quoted 43 lines · Pengyu Luo
Quoted 41 lines · Konrad Dybcio
Quoted 38 lines · Pengyu Luo
Quoted 24 lines · Konrad Dybcio
Quoted 22 lines · Pengyu Luo
Quoted 19 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Review
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 VQuoted 9 lines
Quoted 3 lines
Yes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
L3B additionally powers CSIPHY2/3, EDP0/1, REFGEN (probably why it ends up being on), UFSPHY and
USB1_PHYL6B additionally powers the same components, minus refgen and USB
No, I confirmed they are totally disabled, since there is a way to check it now.
https://lore.kernel.org/linux-arm-msm/[email protected]/
Quoted 6 lines
Quoted 3 lines
This presents you with the status of the votes casted by HLOS, not the actual hardware state
If so, non-HLOS will vote on some critical regulators to keep them on, IIRC, once I disabled L9D, system reseted immediately.
NHLOS will generally ensure that the hardware that it needs is powered. This does not extend to hardware that *you* may want to access in Linux (or which was left online by UEFI), which I suspect was the case here
Quoted 3 lines
Quoted 2 lines
To get the latter, you'd have to dump the SPMI registers
I will appreciate it if you provide more information.
Take a look at drivers/regulator/qcom_spmi-regulator.c, you can get the actual live value of the enable register and the voltage selector for each regulator
Konrad
Quoted 57 lines · Konrad Dybcio
Quoted 43 lines · Pengyu Luo
Quoted 41 lines · Konrad Dybcio
Quoted 38 lines · Pengyu Luo
Quoted 24 lines · Konrad Dybcio
Quoted 22 lines · Pengyu Luo
Quoted 19 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Review
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 VQuoted 9 lines
Quoted 3 lines
Yes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
L3B additionally powers CSIPHY2/3, EDP0/1, REFGEN (probably why it ends up being on), UFSPHY and
USB1_PHYL6B additionally powers the same components, minus refgen and USB
No, I confirmed they are totally disabled, since there is a way to check it now.
https://lore.kernel.org/linux-arm-msm/[email protected]/Quoted 6 lines
Quoted 3 lines
This presents you with the status of the votes casted by HLOS, not the actual hardware state
If so, non-HLOS will vote on some critical regulators to keep them on, IIRC, once I disabled L9D, system reseted immediately.
NHLOS will generally ensure that the hardware that it needs is powered. This does not extend to hardware that *you* may want to access in Linux (or which was left online by UEFI), which I suspect was the case here
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
To get the latter, you'd have to dump the SPMI registers
I will appreciate it if you provide more information.
Take a look at
drivers/regulator/qcom_spmi-regulator.c, you can get the actual live value of the enable register and the voltage selector for each regulator
Thanks! I will look into this later.
Best wishes,
Pengyu
Quoted 1 line
Konrad
Quoted 57 lines · Konrad Dybcio
Quoted 43 lines · Pengyu Luo
Quoted 41 lines · Konrad Dybcio
Quoted 38 lines · Pengyu Luo
Quoted 24 lines · Konrad Dybcio
Quoted 22 lines · Pengyu Luo
Quoted 19 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Review
Quoted 3 lines
+&mdss0_dsi0 {
(quoted diff) +2
-0+ /* real vdda is unknown */ +L3B: DSI core 1.2 V (both?)
L6B: DSI0/1 PLL and core 0.9 VQuoted 9 lines
Quoted 3 lines
Yes, that is what I saw in the DSDT, however, I can disable them safely (hack the regulator driver to add a sysfs to handle these regulators), the panel works well.
L3B additionally powers CSIPHY2/3, EDP0/1, REFGEN (probably why it ends up being on), UFSPHY and
USB1_PHYL6B additionally powers the same components, minus refgen and USB
No, I confirmed they are totally disabled, since there is a way to check it now.
https://lore.kernel.org/linux-arm-msm/[email protected]/Quoted 6 lines
Quoted 3 lines
This presents you with the status of the votes casted by HLOS, not the actual hardware state
If so, non-HLOS will vote on some critical regulators to keep them on, IIRC, once I disabled L9D, system reseted immediately.
NHLOS will generally ensure that the hardware that it needs is powered. This does not extend to hardware that *you* may want to access in Linux (or which was left online by UEFI), which I suspect was the case here
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
To get the latter, you'd have to dump the SPMI registers
I will appreciate it if you provide more information.
Take a look at
drivers/regulator/qcom_spmi-regulator.c, you can get the actual live value of the enable register and the voltage selector for each regulator
Hi, Konrad. The real case seems to be as you said. After disabling l3b and l6b via rpmh,
# cat /sys/kernel/debug/regmap/0-01/registers | grep -E 'c[1-9a]46:' c146: 80 c246: 00 c346: 80 # l3b en c446: 80 c546: 00 c646: 80 # l6b en c746: 00 c846: 80 c946: 00 ca46: 80
Could you please have a check if this node is available for sc8280xp?(I want to write 0 to 0xc346 and 0x0646 to ensure the ldo disabling will turn off the display.) This is copied from sm8350, if the fuse register is 0x7820a8 for sc8280xp as well, then it is fused as disabled.
spmi_debug_bus: qcom,spmi-debug@6b12000 {
compatible = "qcom,spmi-pmic-arb-debug";
reg = <0 0x06b12000 0 0x60>, <0 0x7820a8 0 0x4>;
reg-names = "core", "fuse";
clocks = <&aoss_qmp>;
clock-names = "core_clk";
qcom,fuse-disable-bit = <24>;
#address-cells = <2>;
#size-cells = <0>;
status = "okay";
}Best wishes,
Pengyu
Quoted 1 line
Konrad
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts touchscreen@4f { · line 667
Quoted 6 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +2
-0@@ -616,6 +663,9 @@ touchscreen@4f { hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; + /* TODO: set post-reset-deassert-delay-ms */ + panel = <&panel>;
So.. are you going to add it?
Konrad
Quoted 13 lines · Konrad Dybcio
Quoted 7 lines · Pengyu Luo
DSI panel driver have been added for a while, so add the DT node to enable it. vdd{a,s}-supply for dsi,
dsi_phyare blank since the DSDT describes the wrong, no impact after manual disabling these wrong supplies.Signed-off-by Pengyu Luo <[email protected]>---
[...]
Quoted 9 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts touchscreen@4f { · line 667
Quoted 6 lines
arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts +2
-0@@ -616,6 +663,9 @@ touchscreen@4f { hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>; + /* TODO: set post-reset-deassert-delay-ms */ + panel = <&panel>;So.. are you going to add it?
Yes, this is a TDDI, so the timing(ts after display) is required, panel_follower will handle this.
Best wishes,
Pengyu
Quoted 1 line
Konrad