Asus vivobook s15 improvements
v5 cover Asus vivobook s15 improvements
Improves several parts of the devicetree:
1. The eDP panel bindings
2. Add a lid switch
3. Add bluetooth and describe wlan (depends on [1])
[1]: https://lore.kernel.org/all/[email protected]/
---
I seem to get a warning that the pci17cb vendor is undocumented (wlan) I can find this compatible in Documentation/devicetree/bindings/net/wireless/qcom,ath12k.yaml But pci17cb doesn't really seem like a vendor name to me, I have ignored this warning for now.
Changes in v5:
- Fix the pinctrl-# definition in the wcn7850-pmu node in the
bluetooth/wifi patch
- Link to v4: https://lore.kernel.org/r/[email protected]
Changes in v4:
- Fixed the pin parameters for the backlight enable pin
- Fixed the wcn_sw_en drive-strength, this was not in the acpi table I
checked.
- Fixed the ordering of several nodes in the bluetooth/wifi patch
- Link to v3: https://lore.kernel.org/r/[email protected]
Changes in v3:
- Fixed commit message formatting (line wrapping)
- Fixed bad indentation (lid switch pinctrl)
- Fixed bluetooth addition and added wifi description
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Add missing gpiokeys include in the lid switch patch
- Add depends on for the bluetooth patch
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Maud Spierings (3):
arm64: dts: qcom: x1e80100-vivobook-s15: Use the samsung,atna33xc20 panel driver
arm64: dts: qcom: x1e80100-vivobook-s15: Add lid switch
arm64: dts: qcom: x1e80100-vivobook-s15: Add bluetooth.../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 202 ++++++++++++++++++++- 1 file changed, 201 insertions(+), 1 deletion(-)
---
base-commit: 5f48de798324665d18f539ee09a61de1a9221f33
change-id: 20241116-asus_qcom_display-ce5ff7293340
Best regards,
Signature · 1 line
Maud Spierings <[email protected]>
PATCH v5 1/3 arm64: dts: qcom: x1e80100-vivobook-s15: Use the samsung,atna33xc20 panel driver
The Asus vivobook s15 uses the ATNA56AC03 panel.
This panel is controlled by the atna33xc20 driver instead of the generic edp-panel driver
--- .../arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +17 -1
@@ -407,9 +407,13 @@ &mdss_dp3 { aux-bus { panel { - compatible = "edp-panel"; + compatible = "samsung,atna56ac03", "samsung,atna33xc20"; + enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>; power-supply = <&vreg_edp_3p3>; + pinctrl-0 = <&edp_bl_en>; + pinctrl-names = "default"; + port { edp_panel_in: endpoint { remote-endpoint = <&mdss_dp3_out>;
@@ -475,6 +479,18 @@ &pcie6a_phy { status = "okay"; }; +&pmc8380_3_gpios { + edp_bl_en: edp-bl-en-state { + pins = "gpio4"; + function = "normal"; + power-source = <1>; + qcom,drive-strength = <2>; + bias-pull-down; + input-disable; + output-enable; + }; +}; + &qupv3_0 { status = "okay"; };
Signature · 1 line
2.47.1
Re: [PATCH v5 1/3] arm64: dts: qcom: x1e80100-vivobook-s15: Use the samsung,atna33xc20 panel driver
Quoted 10 lines · On Mon, Dec 02, 2024 at 07:18:11PM +0100, Maud Spierings via B4 Relay wrote:
From: Maud Spierings <[email protected]>
The Asus vivobook s15 uses the ATNA56AC03 panel.
This panel is controlled by the atna33xc20 driver instead of the generic edp-panel driverReviewed-by Konrad Dybcio <[email protected]>Signed-off-by Maud Spierings <[email protected]>+&pmc8380_3_gpios {
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts &pcie6a_phy { · line 487
Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +5
-0+ edp_bl_en: edp-bl-en-state { + pins = "gpio4"; + function = "normal"; + power-source = <1>; + qcom,drive-strength = <2>;
Please use the Qualcomm drive strength defines from dt-bindings/pinctrl/qcom,pmic-gpio.h here (e.g. PMIC_GPIO_STRENGTH_MED).
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts &pcie6a_phy { · line 492
Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +5
-0+ bias-pull-down; + input-disable; + output-enable; + }; +};
Johan
PATCH v5 2/3 arm64: dts: qcom: x1e80100-vivobook-s15: Add lid switch
In reply to Maud SpieringsAdd the lid switch for the Asus vivobook s15
--- .../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +21 -0
@@ -7,6 +7,7 @@ /dts-v1/; #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/gpio-keys.h> #include <dt-bindings/regulator/qcom,rpmh-regulator.h> #include "x1e80100.dtsi"
@@ -17,6 +18,20 @@ / { compatible = "asus,vivobook-s15", "qcom,x1e80100"; chassis-type = "laptop"; + gpio-keys { + compatible = "gpio-keys"; + pinctrl-0 = <&hall_int_n_default>; + pinctrl-names = "default"; + + switch-lid { + gpios = <&tlmm 92 GPIO_ACTIVE_LOW>; + linux,input-type = <EV_SW>; + linux,code = <SW_LID>; + wakeup-source; + wakeup-event-action = <EV_ACT_DEASSERTED>; + }; + }; + pmic-glink { compatible = "qcom,x1e80100-pmic-glink", "qcom,sm8550-pmic-glink",
@@ -539,6 +554,12 @@ edp_reg_en: edp-reg-en-state { bias-disable; }; + hall_int_n_default: hall-int-n-state { + pins = "gpio92"; + function = "gpio"; + bias-disable; + }; + kybd_default: kybd-default-state { pins = "gpio67"; function = "gpio";
Signature · 1 line
2.47.1
PATCH v5 3/3 arm64: dts: qcom: x1e80100-vivobook-s15: Add bluetooth
In reply to Maud SpieringsAdd bluetooth for the asus vivobook s15
Describe wlan configuration
--- .../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 163 +++++++++++++++++++++ 1 file changed, 163 insertions(+)
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +163 -0
@@ -18,6 +18,11 @@ / { compatible = "asus,vivobook-s15", "qcom,x1e80100"; chassis-type = "laptop"; + aliases { + serial0 = &uart21; + serial1 = &uart14; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&hall_int_n_default>;
@@ -152,6 +157,101 @@ vph_pwr: regulator-vph-pwr { regulator-always-on; regulator-boot-on; }; + + vreg_wcn_0p95: regulator-wcn-0p95 { + compatible = "regulator-fixed"; + + regulator-name = "VREG_WCN_0P95"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <950000>; + + vin-supply = <&vreg_wcn_3p3>; + }; + + vreg_wcn_1p9: regulator-wcn-1p9 { + compatible = "regulator-fixed"; + + regulator-name = "VREG_WCN_1P9"; + regulator-min-microvolt = <1900000>; + regulator-max-microvolt = <1900000>; + + vin-supply = <&vreg_wcn_3p3>; + }; + + vreg_wcn_3p3: regulator-wcn-3p3 { + compatible = "regulator-fixed"; + + regulator-name = "VREG_WCN_3P3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + + gpio = <&tlmm 214 GPIO_ACTIVE_HIGH>; + enable-active-high; + + pinctrl-0 = <&wcn_sw_en>; + pinctrl-names = "default"; + + regulator-boot-on; + }; + + wcn7850-pmu { + compatible = "qcom,wcn7850-pmu"; + + vdd-supply = <&vreg_wcn_0p95>; + vddio-supply = <&vreg_l15b_1p8>; + vddaon-supply = <&vreg_wcn_0p95>; + vdddig-supply = <&vreg_wcn_0p95>; + vddrfa1p2-supply = <&vreg_wcn_1p9>; + vddrfa1p8-supply = <&vreg_wcn_1p9>; + + wlan-enable-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>; + bt-enable-gpios = <&tlmm 116 GPIO_ACTIVE_HIGH>; + + pinctrl-0 = <&wcn_wlan_en>, <&wcn_bt_en>; + pinctrl-names = "default"; + + regulators { + vreg_pmu_rfa_cmn: ldo0 { + regulator-name = "vreg_pmu_rfa_cmn"; + }; + + vreg_pmu_aon_0p59: ldo1 { + regulator-name = "vreg_pmu_aon_0p59"; + }; + + vreg_pmu_wlcx_0p8: ldo2 { + regulator-name = "vreg_pmu_wlcx_0p8"; + }; + + vreg_pmu_wlmx_0p85: ldo3 { + regulator-name = "vreg_pmu_wlmx_0p85"; + }; + + vreg_pmu_btcmx_0p85: ldo4 { + regulator-name = "vreg_pmu_btcmx_0p85"; + }; + + vreg_pmu_rfa_0p8: ldo5 { + regulator-name = "vreg_pmu_rfa_0p8"; + }; + + vreg_pmu_rfa_1p2: ldo6 { + regulator-name = "vreg_pmu_rfa_1p2"; + }; + + vreg_pmu_rfa_1p8: ldo7 { + regulator-name = "vreg_pmu_rfa_1p8"; + }; + + vreg_pmu_pcie_0p9: ldo8 { + regulator-name = "vreg_pmu_pcie_0p9"; + }; + + vreg_pmu_pcie_1p8: ldo9 { + regulator-name = "vreg_pmu_pcie_1p8"; + }; + }; + }; }; &apps_rsc {
@@ -197,6 +297,13 @@ vreg_l14b_3p0: ldo14 { regulator-max-microvolt = <3072000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; }; + + vreg_l15b_1p8: ldo15 { + regulator-name = "vreg_l15b_1p8"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; + }; }; regulators-1 {
@@ -475,6 +582,23 @@ &pcie4_phy { status = "okay"; }; +&pcie4_port0 { + wifi@0 { + compatible = "pci17cb,1107"; + reg = <0x10000 0x0 0x0 0x0 0x0>; + + vddaon-supply = <&vreg_pmu_aon_0p59>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; + vddrfacmn-supply = <&vreg_pmu_rfa_cmn>; + vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>; + vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>; + vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>; + vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>; + }; +}; + &pcie6a { perst-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>; wake-gpios = <&tlmm 154 GPIO_ACTIVE_LOW>;
@@ -624,6 +748,45 @@ tpad_default: tpad-default-state { function = "gpio"; bias-disable; }; + + wcn_bt_en: bt-en-state { + pins = "gpio116"; + function = "gpio"; + drive-strength = <16>; + output-low; + bias-pull-down; + }; + + wcn_sw_en: wcn-sw-en-state { + pins = "gpio214"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + }; + + wcn_wlan_en: wlan-en-state { + pins = "gpio117"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + }; +}; + +&uart14 { + status = "okay"; + + bluetooth { + compatible = "qcom,wcn7850-bt"; + max-speed = <3200000>; + + vddaon-supply = <&vreg_pmu_aon_0p59>; + vddwlcx-supply = <&vreg_pmu_wlcx_0p8>; + vddwlmx-supply = <&vreg_pmu_wlmx_0p85>; + vddrfacmn-supply = <&vreg_pmu_rfa_cmn>; + vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>; + vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>; + vddrfa1p8-supply = <&vreg_pmu_rfa_1p8>; + }; }; &usb_1_ss0_hsphy {
Signature · 1 line
2.47.1
Re: [PATCH v5 3/3] arm64: dts: qcom: x1e80100-vivobook-s15: Add bluetooth
Quoted 4 lines · On Mon, Dec 02, 2024 at 07:18:13PM +0100, Maud Spierings via B4 Relay wrote:
From: Maud Spierings <[email protected]>
Add bluetooth for the asus vivobook s15
Describe wlan configuration
I assume you copied most of these (effectively boilerplate) definitions from somewhere so perhaps you can mention that here (e.g. if it was copied from Stephan's patches [1]).
Quoted 11 lines
Reviewed-by Dmitry Baryshkov <[email protected]>Signed-off-by Maud Spierings <[email protected]>--- .../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 163 +++++++++++++++++++++ 1 file changed, 163 insertions(+)arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +0
-0
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts / { · line 22
Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +2
-0@@ -18,6 +18,11 @@ / { compatible = "asus,vivobook-s15", "qcom,x1e80100"; chassis-type = "laptop"; + aliases { + serial0 = &uart21;
No need to add an alias for the console port which is likely not accessible on this device (without some tinkering).
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts / {
Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +4
-0+ serial1 = &uart14; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&hall_int_n_default>; + wcn_bt_en: bt-en-state {
Looks like you want a "wcn-" prefix on the node name here too.
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 755
Quoted 3 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +3
-0+ pins = "gpio116"; + function = "gpio"; + drive-strength = <16>;
Is this the drive-strength the firmware uses? The default 2 should be enough, but you can leave it as-is if it matches the fw settings if you prefer.
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 756
Quoted 1 line
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +1
-0+ output-low;
I don't think you should be setting the pin state already in the pin configuration as this should be left up to the driver to control.
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 757
Quoted 1 line
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +1
-0+ bias-pull-down;
A pull-down should not be needed for this output either.
Quoted 5 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +5
-0+ }; + + wcn_sw_en: wcn-sw-en-state { + pins = "gpio214"; + function = "gpio";
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 772
Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +10
-0+ drive-strength = <16>; + bias-disable; + }; + + wcn_wlan_en: wlan-en-state { + pins = "gpio117"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + };
Same question about the drive strength applies to these two.
Quoted 1 line
+};
Johan
Re: [PATCH v5 3/3] arm64: dts: qcom: x1e80100-vivobook-s15: Add bluetooth
Quoted 8 lines · Johan Hovold
Quoted 4 lines · On Mon, Dec 02, 2024 at 07:18:13PM +0100, Maud Spierings via B4 Relay wrote:
From: Maud Spierings <[email protected]>
Add bluetooth for the asus vivobook s15
Describe wlan configurationI assume you copied most of these (effectively boilerplate) definitions from somewhere so perhaps you can mention that here (e.g. if it was copied from Stephan's patches [1]).
will do
Quoted 15 lines
Quoted 15 lines
Reviewed-by Dmitry Baryshkov <[email protected]>Signed-off-by Maud Spierings <[email protected]>--- .../boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 163 +++++++++++++++++++++ 1 file changed, 163 insertions(+)arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +0
-0@@ -18,6 +18,11 @@ / { compatible = "asus,vivobook-s15", "qcom,x1e80100"; chassis-type = "laptop";
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts / { · line 22
Quoted 2 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +2
-0+ aliases { + serial0 = &uart21;No need to add an alias for the console port which is likely not accessible on this device (without some tinkering).
Yeah I did find it, there are some labeled probe points on the pcb plus a weird unused connector near it, I will remove it
Quoted 9 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts / {
Quoted 8 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +4
-0+ serial1 = &uart14; + }; + gpio-keys { compatible = "gpio-keys"; pinctrl-0 = <&hall_int_n_default>; + wcn_bt_en: bt-en-state {Looks like you want a "wcn-" prefix on the node name here too.
will do
Quoted 7 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 755
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +3
-0+ pins = "gpio116"; + function = "gpio"; + drive-strength = <16>;Is this the drive-strength the firmware uses? The default 2 should be enough, but you can leave it as-is if it matches the fw settings if you prefer.
This one I do not know, it is not turned on by the firmware, I assumed the same value as the two later ones
Quoted 4 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 756
Quoted 2 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +1
-0+ output-low;I don't think you should be setting the pin state already in the pin configuration as this should be left up to the driver to control.
Will remove
Quoted 3 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 757
Quoted 2 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +1
-0+ bias-pull-down;A pull-down should not be needed for this output either.
I pulled this from the DSDT, it was defined with a pull down there
Quoted 17 lines
Quoted 6 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +5
-0+ }; + + wcn_sw_en: wcn-sw-en-state { + pins = "gpio214"; + function = "gpio";arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts tpad_default: tpad-default-state { · line 772
Quoted 10 lines
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts +10
-0+ drive-strength = <16>; + bias-disable; + }; + + wcn_wlan_en: wlan-en-state { + pins = "gpio117"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + };Same question about the drive strength applies to these two.
These two drive strengths were used by the device firmware, a lower one will probably work too but I thought it would be best to stick to those values
Quoted 6 lines
Quoted 2 lines
+};
Johan