diff mbox series

[3/3] arm64: dts: qcom: sc8280xp: Add Huawei Matebook E Go (sc8280xp)

Message ID 20241211153754.356476-4-mitltlatltl@gmail.com
State New
Headers show
Series arm64: dts: qcom: Introduce Huawei Matebook E Go | expand

Commit Message

Pengyu Luo Dec. 11, 2024, 3:37 p.m. UTC
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(sc8280xp@3.0GHz), codename is gaokun3.
Huawei Matebook E Go 2023(sc8280xp@2.69GHz).

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.

Signed-off-by: Tianyu Gao <gty0622@gmail.com>
Signed-off-by: Xuecong Chen <chenxuecong2009@outlook.com>
Signed-off-by: Pengyu Luo <mitltlatltl@gmail.com>
---
 arch/arm64/boot/dts/qcom/Makefile             |    1 +
 .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 1332 +++++++++++++++++
 2 files changed, 1333 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts

Comments

Konrad Dybcio Dec. 12, 2024, 5:13 p.m. UTC | #1
On 11.12.2024 4:37 PM, Pengyu Luo wrote:
> 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(sc8280xp@3.0GHz), codename is gaokun3.
> Huawei Matebook E Go 2023(sc8280xp@2.69GHz).
> 
> 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)

Does qcom_battmgr / pmic_glink not work?
> 
> I have finished the EC driver, once this series are upstreamed,
> I will submit a series of patches to enable EC support.
> 
> Signed-off-by: Tianyu Gao <gty0622@gmail.com>
> Signed-off-by: Xuecong Chen <chenxuecong2009@outlook.com>

Your commit message suggests Co-developed-by: tags would also be
fitting here

[...]

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

This should be redundant, as you should have efifb

[...]

> +
> +	wcd938x: audio-codec {
> +		compatible = "qcom,wcd9380-codec";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&wcd_default>;

Please follow this order throughout the file:

property-n
property-names

[...]

> +
> +		reset-gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
> +
> +		vdd-buck-supply = <&vreg_s10b>;
> +		vdd-rxtx-supply = <&vreg_s10b>;
> +		vdd-io-supply = <&vreg_s10b>;
> +		vdd-mic-bias-supply = <&vreg_bob>;
> +
> +		qcom,micbias1-microvolt = <1800000>;
> +		qcom,micbias2-microvolt = <1800000>;
> +		qcom,micbias3-microvolt = <1800000>;
> +		qcom,micbias4-microvolt = <1800000>;
> +		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
> +		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
> +		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
> +		qcom,rx-device = <&wcd_rx>;
> +		qcom,tx-device = <&wcd_tx>;
> +
> +		#sound-dai-cells = <1>;
> +	};
> +
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&mode_pin_active>, <&vol_up_n>;
> +
> +		switch-mode {
> +			gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;

This could use a label too - "Tablet Mode Switch", perhaps?

> +			linux,input-type = <EV_SW>;
> +			linux,code = <SW_TABLET_MODE>;
> +			debounce-interval = <10>;
> +			wakeup-source;
> +		};
> +
> +		key-vol-up {

Please place this node above the switch-mode one to preserve alphabetical
ordering (see [1])
> +			label = "Volume Up";
> +			gpios = <&pmc8280_1_gpios 6 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_VOLUMEUP>;
> +			debounce-interval = <15>;
> +			linux,can-disable;
> +			wakeup-source;
> +		};
> +

Stray newline

[...]

> +
> +		/* s2c, s3c */

Please remove such comments

[...]

> +
> +		/* /lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
> +		 * there is no calibrate data for huawei,
> +		 * but they have the same subsystem-device id
> +		 */
> +		qcom,ath11k-calibration-variant = "LE_X13S";

Oh, this can be taken care of! See [2], [3].

[...]
> +
> +&sound {
> +	compatible = "qcom,sc8280xp-sndcard";
> +	model = "SC8280XP-HUAWEI-MATEBOOKEGO";
> +	audio-routing =
> +		"SpkrLeft IN", "WSA_SPK1 OUT",

Please remove the line break and

> +		"SpkrRight IN", "WSA_SPK2 OUT",
> +		"IN1_HPHL", "HPHL_OUT",
> +		"IN2_HPHR", "HPHR_OUT",
> +		"AMIC2", "MIC BIAS2",
> +		"VA DMIC0", "MIC BIAS1",
> +		"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 {

Please insert a newline between the last property and subnodes.

Otherwise looks fairly good!

Konrad

[1] https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
[2] https://lore.kernel.org/ath11k/ZwR1hu-B0bGe4zG7@localhost.localdomain/
[3] https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware
Pengyu Luo Dec. 13, 2024, 8:50 a.m. UTC | #2
Oh, I sent it by gamil wrongly(forgot cc to), I resend it by git send-email again

On Fri, Dec 13, 2024 at 1:13 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> On 11.12.2024 4:37 PM, Pengyu Luo wrote:
> > 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(sc8280xp@3.0GHz), codename is gaokun3.
> > Huawei Matebook E Go 2023(sc8280xp@2.69GHz).
> >
> > 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)
>
> Does qcom_battmgr / pmic_glink not work?
>

Unfortunately, different from many sc8280xp devices, device(PMGK) _STA is
Zero,
this device is quiet strange, also, it has no PM8008,
nor PMIC Battery Miniclass(PMBM), etc.

[...]

>
> > I have finished the EC driver, once this series are upstreamed,
> > I will submit a series of patches to enable EC support.
> >
> > Signed-off-by: Tianyu Gao <gty0622@gmail.com>
> > Signed-off-by: Xuecong Chen <chenxuecong2009@outlook.com>
>
> Your commit message suggests Co-developed-by: tags would also be
> fitting here
>

Agree

[...]

> [...]
>
> > +     chosen {
> > +             #address-cells =3D <2>;
> > +             #size-cells =3D <2>;
> > +             ranges;
> > +
> > +             framebuffer0: framebuffer@c6200000 {
> > +                     compatible =3D "simple-framebuffer";
> > +                     reg =3D <0x0 0xC6200000 0x0 0x02400000>;
> > +                     width =3D <1600>;
> > +                     height =3D <2560>;
> > +                     stride =3D <(1600 * 4)>;
> > +                     format =3D "a8r8g8b8";
> > +             };
> > +     };
>
> This should be redundant, as you should have efifb
>

I think no, it won't boot up without it(stuck at EFI stub: Booting Linux
Kernel)

[...]

>
> > +
> > +     wcd938x: audio-codec {
> > +             compatible =3D "qcom,wcd9380-codec";
> > +
> > +             pinctrl-names =3D "default";
> > +             pinctrl-0 =3D <&wcd_default>;
>
> Please follow this order throughout the file:
>
> property-n
> property-names
>

Do you mean I should arragne as following? If so, I actually keep
reference devicetree untouched. x13s and crd are written like this.

pinctrl-0 =3D <&wcd_default>>;
pinctrl-names =3D "default";

[...]

> [...]
>
> > +
> > +             reset-gpios =3D <&tlmm 106 GPIO_ACTIVE_LOW>;
> > +
> > +             vdd-buck-supply =3D <&vreg_s10b>;
> > +             vdd-rxtx-supply =3D <&vreg_s10b>;
> > +             vdd-io-supply =3D <&vreg_s10b>;
> > +             vdd-mic-bias-supply =3D <&vreg_bob>;
> > +
> > +             qcom,micbias1-microvolt =3D <1800000>;
> > +             qcom,micbias2-microvolt =3D <1800000>;
> > +             qcom,micbias3-microvolt =3D <1800000>;
> > +             qcom,micbias4-microvolt =3D <1800000>;
> > +             qcom,mbhc-buttons-vthreshold-microvolt =3D <75000 150000
> 237000 500000 500000 500000 500000 500000>;
> > +             qcom,mbhc-headset-vthreshold-microvolt =3D <1700000>;
> > +             qcom,mbhc-headphone-vthreshold-microvolt =3D <50000>;
> > +             qcom,rx-device =3D <&wcd_rx>;
> > +             qcom,tx-device =3D <&wcd_tx>;
> > +
> > +             #sound-dai-cells =3D <1>;
> > +     };
> > +
> > +     gpio-keys {
> > +             compatible =3D "gpio-keys";
> > +
> > +             pinctrl-names =3D "default";
> > +             pinctrl-0 =3D <&mode_pin_active>, <&vol_up_n>;
> > +
> > +             switch-mode {
> > +                     gpios =3D <&tlmm 26 GPIO_ACTIVE_HIGH>;
>
> This could use a label too - "Tablet Mode Switch", perhaps?
>

This part I follow Lenovo Yoga C630 one (see [1]), it doesn't use it,
and this node is not referenced.

> > +                     linux,input-type =3D <EV_SW>;
> > +                     linux,code =3D <SW_TABLET_MODE>;
> > +                     debounce-interval =3D <10>;
> > +                     wakeup-source;
> > +             };
> > +
> > +             key-vol-up {
>
> Please place this node above the switch-mode one to preserve alphabetical
> ordering (see [1])
> > +                     label =3D "Volume Up";
> > +                     gpios =3D <&pmc8280_1_gpios 6 GPIO_ACTIVE_LOW>;
> > +                     linux,code =3D <KEY_VOLUMEUP>;
> > +                     debounce-interval =3D <15>;
> > +                     linux,can-disable;
> > +                     wakeup-source;
> > +             };
> > +
>
> Stray newline
>
> [...]
>
> > +
> > +             /* s2c, s3c */
>
> Please remove such comments
>
>
Agree

[...]

>
> > +
> > +             /* /lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
> > +              * there is no calibrate data for huawei,
> > +              * but they have the same subsystem-device id
> > +              */
> > +             qcom,ath11k-calibration-variant =3D "LE_X13S";
>
> Oh, this can be taken care of! See [2], [3].
>

I have a glance, now I know we should extract something or it won't be
there.
Question is how can I extract them? I have a quick search, got no luck.
As for windows drivers, in the folder

bdwlan.e02
bdwlan.e07
bdwlan.e1d
bdwlan.e1e
bdwlan.e23
bdwlan.e26
bdwlan.e32
bdwlan.e47
bdwlan.e81
bdwlan.e84
bdwlan.e85
bdwlan.e8c
bdwlan.e8e
bdwlan.e9f
bdwlan.ea3
bdwlan.eb8
bdwlan.elf
bdwlan.elf.g
bdwlang.e8b
bdwlang.e9f
bdwlang.ea3
bdwlang.eb8
bdwlang.elf
Data20.msc
Data.msc
m320.bin
m3.bin
qcwlan8280.cat
qcwlan8280.inf
qcwlan8280.sys
regdb.bin
wlanfw20.mbn
wlanfw.mbn

[...]

> [...]
> > +
> > +&sound {
> > +     compatible =3D "qcom,sc8280xp-sndcard";
> > +     model =3D "SC8280XP-HUAWEI-MATEBOOKEGO";
> > +     audio-routing =3D
> > +             "SpkrLeft IN", "WSA_SPK1 OUT",
>
> Please remove the line break and
>
> > +             "SpkrRight IN", "WSA_SPK2 OUT",
> > +             "IN1_HPHL", "HPHL_OUT",
> > +             "IN2_HPHR", "HPHR_OUT",
> > +             "AMIC2", "MIC BIAS2",
> > +             "VA DMIC0", "MIC BIAS1",
> > +             "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 =3D "WCD Playback";
> > +             cpu {
>
> Please insert a newline between the last property and subnodes.
>

Agree, but I didn't touch them, they are from x13s and crd (see [2])

> Otherwise looks fairly good!
>
> Konrad
>
> [1] https://docs.kernel.org/devicetree/bindings/dts-coding-style.html
> [2] https://lore.kernel.org/ath11k/ZwR1hu-B0bGe4zG7@localhost.localdomain/
> [3] https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware

Thanks,
Pengyu

[1] https://elixir.bootlin.com/linux/v6.12.4/source/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts#L54
[2] https://elixir.bootlin.com/linux/v6.12.4/source/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts#L1125
Konrad Dybcio Dec. 13, 2024, 11:04 a.m. UTC | #3
On 13.12.2024 9:50 AM, Pengyu Luo wrote:
> Oh, I sent it by gamil wrongly(forgot cc to), I resend it by git send-email again
> 
> On Fri, Dec 13, 2024 at 1:13 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 11.12.2024 4:37 PM, Pengyu Luo wrote:
>>> 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(sc8280xp@3.0GHz), codename is gaokun3.
>>> Huawei Matebook E Go 2023(sc8280xp@2.69GHz).
>>>
>>> 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)
>>
>> Does qcom_battmgr / pmic_glink not work?
>>
> 
> Unfortunately, different from many sc8280xp devices, device(PMGK) _STA is
> Zero,
> this device is quiet strange, also, it has no PM8008,
> nor PMIC Battery Miniclass(PMBM), etc.

So it's not used on windows.. but have you tried checking if it's
still provided by the firwmare?

[...]

>>
>>> +     chosen {
>>> +             #address-cells =3D <2>;
>>> +             #size-cells =3D <2>;
>>> +             ranges;
>>> +
>>> +             framebuffer0: framebuffer@c6200000 {
>>> +                     compatible =3D "simple-framebuffer";
>>> +                     reg =3D <0x0 0xC6200000 0x0 0x02400000>;
>>> +                     width =3D <1600>;
>>> +                     height =3D <2560>;
>>> +                     stride =3D <(1600 * 4)>;
>>> +                     format =3D "a8r8g8b8";
>>> +             };
>>> +     };
>>
>> This should be redundant, as you should have efifb
>>
> 
> I think no, it won't boot up without it(stuck at EFI stub: Booting Linux
> Kernel)

Do you have CONFIG_EFI and CONFIG_FB_EFI enabled?

(also, your email client does something funny and posts 0x3d, which
is ASCII for '=' after that symbol)


> 
> [...]
> 
>>
>>> +
>>> +     wcd938x: audio-codec {
>>> +             compatible =3D "qcom,wcd9380-codec";
>>> +
>>> +             pinctrl-names =3D "default";
>>> +             pinctrl-0 =3D <&wcd_default>;
>>
>> Please follow this order throughout the file:
>>
>> property-n
>> property-names
>>
> 
> Do you mean I should arragne as following? If so, I actually keep
> reference devicetree untouched. x13s and crd are written like this.

Yeah, we try to unify the style as we progress and we still haven't
gotten around to cleaning up files that have been in the tree for
years..

> 
> pinctrl-0 =3D <&wcd_default>>;
> pinctrl-names =3D "default";

Yes please

[...]

>>> +     gpio-keys {
>>> +             compatible =3D "gpio-keys";
>>> +
>>> +             pinctrl-names =3D "default";
>>> +             pinctrl-0 =3D <&mode_pin_active>, <&vol_up_n>;
>>> +
>>> +             switch-mode {
>>> +                     gpios =3D <&tlmm 26 GPIO_ACTIVE_HIGH>;
>>
>> This could use a label too - "Tablet Mode Switch", perhaps?
>>
> 
> This part I follow Lenovo Yoga C630 one (see [1]), it doesn't use it,
> and this node is not referenced.

So "label" could mean

label: node-name@unit-address {
	property = "value";
};

when talking about DT nodes, but here I'm speaking of the
"label" property (which you set to "Volume Up" in the node below).
That is read by Linux and provides a nice human-readable name to
the userspace.

>>
>>> +
>>> +             /* /lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
>>> +              * there is no calibrate data for huawei,
>>> +              * but they have the same subsystem-device id
>>> +              */
>>> +             qcom,ath11k-calibration-variant =3D "LE_X13S";
>>
>> Oh, this can be taken care of! See [2], [3].
>>
> 
> I have a glance, now I know we should extract something or it won't be
> there.
> Question is how can I extract them? I have a quick search, got no luck.
> As for windows drivers, in the folder
> 
> bdwlan.e02
> bdwlan.e07
> bdwlan.e1d
> bdwlan.e1e
> bdwlan.e23
> bdwlan.e26
> bdwlan.e32
> bdwlan.e47
> bdwlan.e81
> bdwlan.e84
> bdwlan.e85
> bdwlan.e8c
> bdwlan.e8e
> bdwlan.e9f
> bdwlan.ea3
> bdwlan.eb8
> bdwlan.elf
> bdwlan.elf.g
> bdwlang.e8b
> bdwlang.e9f
> bdwlang.ea3
> bdwlang.eb8
> bdwlang.elf
> Data20.msc
> Data.msc
> m320.bin
> m3.bin
> qcwlan8280.cat
> qcwlan8280.inf
> qcwlan8280.sys
> regdb.bin
> wlanfw20.mbn
> wlanfw.mbn

Adding Dmitry who has gone through this multiple times and may be
able to help

Konrad
Dmitry Baryshkov Dec. 14, 2024, 1:39 p.m. UTC | #4
On Sat, Dec 14, 2024 at 08:23:00PM +0800, Pengyu Luo wrote:
> On Fri, Dec 13, 2024 at 1:13 AM Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
> 
> [...]
> 
> >> +
> >> +		/* /lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
> >> +		 * there is no calibrate data for huawei,
> >> +		 * but they have the same subsystem-device id
> >> +		 */
> >> +		qcom,ath11k-calibration-variant = "LE_X13S";
> > 
> > Oh, this can be taken care of! See [2], [3].
> 
> [...]
> 
> Hi, Konrad
> 
> I want to distrub you again.
> 
> Finally, I found something, after I enabled ath11k boot dbg, I got my
> id_string='bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=255`
> 
> With qca-swiss-army-knife (see [1])
> 
> $ ./ath11k-bdencoder -e board-2.bin | grep -i "$id_string"
> bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=255.bin created size: 60048
> 
> It have already been here. So that means I don't need to extract from
> Windows. I just extract it from linux-firmware then give it a variant
> name and send patches to ath11k, right?

No. Usually 255 is an ID that is used by a variety of boards. So,
basically, you have to extract board data from Windows, add a proper
calibration variant that is specific to your board and then send the
resulting data to the ath11k mailing list.

> 
> Pengyu
> 
> [1] https://github.com/qca/qca-swiss-army-knife
Johan Hovold Dec. 20, 2024, 4:21 p.m. UTC | #5
On Sat, Dec 14, 2024 at 03:39:27PM +0200, Dmitry Baryshkov wrote:
> On Sat, Dec 14, 2024 at 08:23:00PM +0800, Pengyu Luo wrote:

> > >> +
> > >> +		/* /lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
> > >> +		 * there is no calibrate data for huawei,
> > >> +		 * but they have the same subsystem-device id
> > >> +		 */
> > >> +		qcom,ath11k-calibration-variant = "LE_X13S";

> > Finally, I found something, after I enabled ath11k boot dbg, I got my
> > id_string='bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=255`
> > 
> > With qca-swiss-army-knife (see [1])
> > 
> > $ ./ath11k-bdencoder -e board-2.bin | grep -i "$id_string"
> > bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=255.bin created size: 60048
> > 
> > It have already been here. So that means I don't need to extract from
> > Windows. I just extract it from linux-firmware then give it a variant
> > name and send patches to ath11k, right?
> 
> No. Usually 255 is an ID that is used by a variety of boards. So,
> basically, you have to extract board data from Windows, add a proper
> calibration variant that is specific to your board and then send the
> resulting data to the ath11k mailing list.

The board files used by Windows are not compatible with the Linux
firmware, so the calibration data needs to come from Qualcomm.

Try filing a request in the bugzilla:

	https://bugzilla.kernel.org/buglist.cgi?quicksearch=ath11k&list_id=1147229

Johan
Pengyu Luo Dec. 21, 2024, 5:26 a.m. UTC | #6
On Sat, Dec 21, 2024 at 12:20 AM Johan Hovold <johan@kernel.org> wrote:

> On Sat, Dec 14, 2024 at 03:39:27PM +0200, Dmitry Baryshkov wrote:
> > On Sat, Dec 14, 2024 at 08:23:00PM +0800, Pengyu Luo wrote:
> 
> > > >> +
> > > >> +                /* /lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
> > > >> +                 * there is no calibrate data for huawei,
> > > >> +                 * but they have the same subsystem-device id
> > > >> +                 */
> > > >> +                qcom,ath11k-calibration-variant = "LE_X13S";
> 
> > > Finally, I found something, after I enabled ath11k boot dbg, I got my
> > > id_string='bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=255`
> > >
> > > With qca-swiss-army-knife (see [1])
> > >
> > > $ ./ath11k-bdencoder -e board-2.bin | grep -i "$id_string"
> > > bus=pci,vendor=17cb,device=1103,subsystem-vendor=17cb,subsystem-device=0108,qmi-chip-id=2,qmi-board-id=255.bin created size: 60048
> > >
> > > It have already been here. So that means I don't need to extract from
> > > Windows. I just extract it from linux-firmware then give it a variant
> > > name and send patches to ath11k, right?
> >
> > No. Usually 255 is an ID that is used by a variety of boards. So,
> > basically, you have to extract board data from Windows, add a proper
> > calibration variant that is specific to your board and then send the
> > resulting data to the ath11k mailing list.
> 
> The board files used by Windows are not compatible with the Linux
> firmware, so the calibration data needs to come from Qualcomm.
> 

Then I don't understand why those bdwlan.* files would be in the
firmware tree.

> Try filing a request in the bugzilla:
> 
> 	https://bugzilla.kernel.org/buglist.cgi?quicksearch=ath11k&list_id=1147229
> 

Thanks, I will try it.

> Johan

Best wishes,
Pengyu
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 6ca8db4b8..00d02cf5f 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -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
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
new file mode 100644
index 000000000..98732754e
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-huawei-gaokun3.dts
@@ -0,0 +1,1332 @@ 
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2022, Linaro Limited
+ *
+ * Copyright (c) 2024, Tianyu Gao <gty0622@gmail.com>
+ * Copyright (c) 2024, Xuecong Chen <chenxuecong2009@outlook.com>
+ *
+ * Copyright (c) 2024, Pengyu Luo <mitltlatltl@gmail.com>
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/iio/qcom,spmi-adc7-pm8350.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/gpio-keys.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/phy/phy.h>
+
+#include "sc8280xp.dtsi"
+#include "sc8280xp-pmics.dtsi"
+
+/ {
+	chassis-type = "tablet";
+	model = "Matebook E Go";
+	compatible = "huawei,gaokun3", "qcom,sc8280xp";
+	
+	aliases {
+		i2c4 = &i2c4;
+		serial1 = &uart2;
+	};
+
+	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";
+		};
+	};
+
+	wcd938x: audio-codec {
+		compatible = "qcom,wcd9380-codec";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&wcd_default>;
+
+		reset-gpios = <&tlmm 106 GPIO_ACTIVE_LOW>;
+
+		vdd-buck-supply = <&vreg_s10b>;
+		vdd-rxtx-supply = <&vreg_s10b>;
+		vdd-io-supply = <&vreg_s10b>;
+		vdd-mic-bias-supply = <&vreg_bob>;
+
+		qcom,micbias1-microvolt = <1800000>;
+		qcom,micbias2-microvolt = <1800000>;
+		qcom,micbias3-microvolt = <1800000>;
+		qcom,micbias4-microvolt = <1800000>;
+		qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>;
+		qcom,mbhc-headset-vthreshold-microvolt = <1700000>;
+		qcom,mbhc-headphone-vthreshold-microvolt = <50000>;
+		qcom,rx-device = <&wcd_rx>;
+		qcom,tx-device = <&wcd_tx>;
+
+		#sound-dai-cells = <1>;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&mode_pin_active>, <&vol_up_n>;
+
+		switch-mode {
+			gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_TABLET_MODE>;
+			debounce-interval = <10>;
+			wakeup-source;
+		};
+
+		key-vol-up {
+			label = "Volume Up";
+			gpios = <&pmc8280_1_gpios 6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			debounce-interval = <15>;
+			linux,can-disable;
+			wakeup-source;
+		};
+
+	};
+
+	vreg_misc_3p3: regulator-misc-3p3 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC3B";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&pmc8280_1_gpios 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&misc_3p3_reg_en>;
+
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	vreg_nvme: regulator-nvme {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC3_SSD";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&tlmm 135 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&nvme_reg_en>;
+
+		regulator-boot-on;
+	};
+
+	vreg_vph_pwr: regulator-vph-pwr {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VPH_VCC3R9";
+		regulator-min-microvolt = <3900000>;
+		regulator-max-microvolt = <3900000>;
+
+		regulator-always-on;
+	};
+
+	vreg_wlan: regulator-wlan {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC_WLAN_3R9";
+		regulator-min-microvolt = <3900000>;
+		regulator-max-microvolt = <3900000>;
+
+		gpio = <&pmr735a_gpios 1 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&hastings_reg_en>;
+
+		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;
+		};
+	};
+
+	thermal-zones {
+		skin-temp-thermal {
+			polling-delay-passive = <250>;
+
+			thermal-sensors = <&pmk8280_adc_tm 5>;
+
+			trips {
+				skin_temp_alert0: trip-point0 {
+					temperature = <55000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				skin_temp_alert1: trip-point1 {
+					temperature = <58000>;
+					hysteresis = <1000>;
+					type = "passive";
+				};
+
+				skin-temp-crit {
+					temperature = <73000>;
+					hysteresis = <1000>;
+					type = "critical";
+				};
+			};
+
+			cooling-maps {
+				map0 {
+					trip = <&skin_temp_alert0>;
+					cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+
+				map1 {
+					trip = <&skin_temp_alert1>;
+					cooling-device = <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+							 <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+				};
+			};
+		};
+	};
+
+	wcn6855-pmu {
+		compatible = "qcom,wcn6855-pmu";
+
+		pinctrl-0 = <&bt_default>, <&wlan_en>;
+		pinctrl-names = "default";
+
+		wlan-enable-gpios = <&tlmm 134 GPIO_ACTIVE_HIGH>;
+		bt-enable-gpios = <&tlmm 133 GPIO_ACTIVE_HIGH>;
+		swctrl-gpios = <&tlmm 132 GPIO_ACTIVE_HIGH>;
+
+		vddio-supply = <&vreg_s10b>;
+		vddaon-supply = <&vreg_s12b>;
+		vddpmu-supply = <&vreg_s12b>;
+		vddpmumx-supply = <&vreg_s12b>;
+		vddpmucx-supply = <&vreg_s12b>;
+		vddrfa0p95-supply = <&vreg_s12b>;
+		vddrfa1p3-supply = <&vreg_s11b>;
+		vddrfa1p9-supply = <&vreg_s1c>;
+		vddpcie1p3-supply = <&vreg_s11b>;
+		vddpcie1p9-supply = <&vreg_s1c>;
+
+		regulators {
+			vreg_pmu_rfa_cmn_0p8: ldo0 {
+				regulator-name = "vreg_pmu_rfa_cmn_0p8";
+			};
+
+			vreg_pmu_aon_0p8: ldo1 {
+				regulator-name = "vreg_pmu_aon_0p8";
+			};
+
+			vreg_pmu_wlcx_0p8: ldo2 {
+				regulator-name = "vreg_pmu_wlcx_0p8";
+			};
+
+			vreg_pmu_wlmx_0p8: ldo3 {
+				regulator-name = "vreg_pmu_wlmx_0p8";
+			};
+
+			vreg_pmu_btcmx_0p8: ldo4 {
+				regulator-name = "vreg_pmu_btcmx_0p8";
+			};
+
+			vreg_pmu_pcie_1p8: ldo5 {
+				regulator-name = "vreg_pmu_pcie_1p8";
+			};
+
+			vreg_pmu_pcie_0p9: ldo6 {
+				regulator-name = "vreg_pmu_pcie_0p9";
+			};
+
+			vreg_pmu_rfa_0p8: ldo7 {
+				regulator-name = "vreg_pmu_rfa_0p8";
+			};
+
+			vreg_pmu_rfa_1p2: ldo8 {
+				regulator-name = "vreg_pmu_rfa_1p2";
+			};
+
+			vreg_pmu_rfa_1p7: ldo9 {
+				regulator-name = "vreg_pmu_rfa_1p7";
+			};
+		};
+	};
+};
+
+&apps_rsc {
+	regulators-0 {
+		compatible = "qcom,pm8350-rpmh-regulators";
+		qcom,pmic-id = "b";
+
+		vdd-l1-l4-supply = <&vreg_s12b>;
+		vdd-l2-l7-supply = <&vreg_bob>;
+		vdd-l3-l5-supply = <&vreg_s11b>;
+		vdd-l6-l9-l10-supply = <&vreg_s12b>;
+		vdd-l8-supply = <&vreg_s12b>;
+
+		vreg_s10b: smps10 {
+			regulator-name = "vreg_s10b";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-always-on;
+		};
+
+		vreg_s11b: smps11 {
+			regulator-name = "vreg_s11b";
+			regulator-min-microvolt = <1272000>;
+			regulator-max-microvolt = <1272000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_s12b: smps12 {
+			regulator-name = "vreg_s12b";
+			regulator-min-microvolt = <984000>;
+			regulator-max-microvolt = <984000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l1b: ldo1 {
+			regulator-name = "vreg_l1b";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l2b: ldo2 {
+			regulator-name = "vreg_l2b";
+			regulator-min-microvolt = <1904000>;
+			regulator-max-microvolt = <1904000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l3b: ldo3 {
+			regulator-name = "vreg_l3b";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-boot-on;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l4b: ldo4 {
+			regulator-name = "vreg_l4b";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l5b: ldo5 {
+			regulator-name = "vreg_l5b";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l6b: ldo6 {
+			regulator-name = "vreg_l6b";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <880000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-boot-on;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l7b: ldo7 {
+			regulator-name = "vreg_l7b";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-boot-on;
+		};
+
+		vreg_l9b: ldo9 {
+			regulator-name = "vreg_l9b";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+
+	regulators-1 {
+		compatible = "qcom,pm8350c-rpmh-regulators";
+		qcom,pmic-id = "c";
+
+		vdd-bob-supply = <&vreg_vph_pwr>;
+		vdd-l1-l12-supply = <&vreg_s1c>;
+		vdd-l2-l8-supply = <&vreg_s1c>;
+		vdd-l3-l4-l5-l7-l13-supply = <&vreg_bob>;
+		vdd-l6-l9-l11-supply = <&vreg_bob>;
+		vdd-l10-supply = <&vreg_s11b>;
+
+		vreg_s1c: smps1 {
+			regulator-name = "vreg_s1c";
+			regulator-min-microvolt = <1880000>;
+			regulator-max-microvolt = <1900000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-always-on;
+		};
+
+		/* s2c, s3c */
+
+		vreg_l1c: ldo1 {
+			regulator-name = "vreg_l1c";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l2c: ldo2 {
+			regulator-name = "vreg_l2c";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l8c: ldo8 {
+			regulator-name = "vreg_l8c";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l12c: ldo12 {
+			regulator-name = "vreg_l12c";
+			regulator-min-microvolt = <1800000>;
+			regulator-max-microvolt = <1800000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l13c: ldo13 {
+			regulator-name = "vreg_l13c";
+			regulator-min-microvolt = <3072000>;
+			regulator-max-microvolt = <3072000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_bob: bob {
+			regulator-name = "vreg_bob";
+			regulator-min-microvolt = <3008000>;
+			regulator-max-microvolt = <3960000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
+			regulator-always-on;
+		};
+	};
+
+	regulators-2 {
+		compatible = "qcom,pm8350-rpmh-regulators";
+		qcom,pmic-id = "d";
+
+		vdd-l1-l4-supply = <&vreg_s11b>;
+		vdd-l2-l7-supply = <&vreg_bob>;
+		vdd-l3-l5-supply = <&vreg_s11b>;
+		vdd-l6-l9-l10-supply = <&vreg_s12b>;
+		vdd-l8-supply = <&vreg_s12b>;
+
+		/* s10d, s11d, s12d */
+
+		vreg_l2d: ldo2 {
+			regulator-name = "vreg_l2d";
+			regulator-min-microvolt = <3072000>;
+			regulator-max-microvolt = <3072000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l3d: ldo3 {
+			regulator-name = "vreg_l3d";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l4d: ldo4 {
+			regulator-name = "vreg_l4d";
+			regulator-min-microvolt = <1200000>;
+			regulator-max-microvolt = <1200000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l6d: ldo6 {
+			regulator-name = "vreg_l6d";
+			regulator-min-microvolt = <880000>;
+			regulator-max-microvolt = <880000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l7d: ldo7 {
+			regulator-name = "vreg_l7d";
+			regulator-min-microvolt = <3072000>;
+			regulator-max-microvolt = <3072000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l8d: ldo8 {
+			regulator-name = "vreg_l8d";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l9d: ldo9 {
+			regulator-name = "vreg_l9d";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+
+		vreg_l10d: ldo10 {
+			regulator-name = "vreg_l10d";
+			regulator-min-microvolt = <912000>;
+			regulator-max-microvolt = <912000>;
+			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+			regulator-allow-set-load;
+			regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM
+						   RPMH_REGULATOR_MODE_HPM>;
+		};
+	};
+};
+
+&dispcc0 {
+	status = "okay";
+};
+
+&gpu {
+	status = "okay";
+
+	zap-shader {
+		memory-region = <&gpu_mem>;
+		firmware-name = "qcom/sc8280xp/HUAWEI/gaokun3/qcdxkmsuc8280.mbn";
+	};
+};
+
+&i2c4 {
+	clock-frequency = <400000>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c4_default>;
+
+	status = "okay";
+
+	touchscreen@4f {
+		compatible = "hid-over-i2c";
+		reg = <0x4f>;
+
+		hid-descr-addr = <0x1>;
+		interrupts-extended = <&tlmm 175 IRQ_TYPE_LEVEL_LOW>;
+
+		vdd-supply = <&vreg_misc_3p3>;
+		vddl-supply = <&vreg_s10b>;
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&ts0_default>;
+
+	};
+
+};
+
+&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>;
+};
+
+&pcie2a {
+	perst-gpios = <&tlmm 143 GPIO_ACTIVE_LOW>;
+	wake-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>;
+
+	vddpe-3v3-supply = <&vreg_nvme>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie2a_default>;
+
+	status = "okay";
+};
+
+&pcie2a_phy {
+	vdda-phy-supply = <&vreg_l6d>;
+	vdda-pll-supply = <&vreg_l4d>;
+
+	status = "okay";
+};
+
+&pcie4 {
+	max-link-speed = <2>;
+
+	perst-gpios = <&tlmm 141 GPIO_ACTIVE_LOW>;
+	wake-gpios = <&tlmm 139 GPIO_ACTIVE_LOW>;
+
+	vddpe-3v3-supply = <&vreg_wlan>;
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie4_default>;
+
+	status = "okay";
+};
+
+&pcie4_port0 {
+	wifi@0 {
+		compatible = "pci17cb,1103";
+		reg = <0x10000 0x0 0x0 0x0 0x0>;
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>;
+		vddaon-supply = <&vreg_pmu_aon_0p8>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p8>;
+		vddpcie1p8-supply = <&vreg_pmu_pcie_1p8>;
+		vddpcie0p9-supply = <&vreg_pmu_pcie_0p9>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>;
+
+		/* /lib/firmware/ath11k/WCN6855/hw2.1/board-2.bin
+		 * there is no calibrate data for huawei,
+		 * but they have the same subsystem-device id
+		 */
+		qcom,ath11k-calibration-variant = "LE_X13S";
+	};
+};
+
+&pcie4_phy {
+	vdda-phy-supply = <&vreg_l6d>;
+	vdda-pll-supply = <&vreg_l4d>;
+
+	status = "okay";
+};
+
+&pmk8280_adc_tm {
+	status = "okay";
+
+	sys-therm@0 {
+		reg = <0>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+
+	sys-therm@1 {
+		reg = <1>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+
+	sys-therm@2 {
+		reg = <2>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+
+	sys-therm@3 {
+		reg = <3>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+
+	sys-therm@4 {
+		reg = <4>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+
+	sys-therm@5 {
+		reg = <5>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+
+	sys-therm@6 {
+		reg = <6>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+
+	sys-therm@7 {
+		reg = <7>;
+		io-channels = <&pmk8280_vadc PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
+		qcom,hw-settle-time-us = <200>;
+		qcom,avg-samples = <2>;
+		qcom,ratiometric;
+	};
+};
+
+&pmk8280_pon_pwrkey {
+	status = "okay";
+};
+
+&pmk8280_pon_resin {
+	status = "okay";
+	linux,code = <KEY_VOLUMEDOWN>;
+};
+
+&pmk8280_rtc {
+	nvmem-cells = <&rtc_offset>;
+	nvmem-cell-names = "offset";
+
+	status = "okay";
+};
+
+&pmk8280_sdam_6 {
+	status = "okay";
+
+	rtc_offset: rtc-offset@bc {
+		reg = <0xbc 0x4>;
+	};
+};
+
+&pmk8280_vadc {
+	channel@144 {
+		reg = <PM8350_ADC7_AMUX_THM1_100K_PU(1)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm1";
+	};
+
+	channel@145 {
+		reg = <PM8350_ADC7_AMUX_THM2_100K_PU(1)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm2";
+	};
+
+	channel@146 {
+		reg = <PM8350_ADC7_AMUX_THM3_100K_PU(1)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm3";
+	};
+
+	channel@147 {
+		reg = <PM8350_ADC7_AMUX_THM4_100K_PU(1)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm4";
+	};
+
+	channel@344 {
+		reg = <PM8350_ADC7_AMUX_THM1_100K_PU(3)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm5";
+	};
+
+	channel@345 {
+		reg = <PM8350_ADC7_AMUX_THM2_100K_PU(3)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm6";
+	};
+
+	channel@346 {
+		reg = <PM8350_ADC7_AMUX_THM3_100K_PU(3)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm7";
+	};
+
+	channel@347 {
+		reg = <PM8350_ADC7_AMUX_THM4_100K_PU(3)>;
+		qcom,hw-settle-time = <200>;
+		qcom,ratiometric;
+		label = "sys_therm8";
+	};
+};
+
+&qup0 {
+	status = "okay";
+};
+
+&qup1 {
+	status = "okay";
+};
+
+&qup2 {
+	status = "okay";
+};
+
+&remoteproc_adsp {
+	firmware-name = "qcom/sc8280xp/HUAWEI/gaokun3/qcadsp8280.mbn";
+
+	status = "okay";
+};
+
+&remoteproc_nsp0 {
+	firmware-name = "qcom/sc8280xp/HUAWEI/gaokun3/qccdsp8280.mbn";
+
+	status = "okay";
+};
+
+&rxmacro {
+	status = "okay";
+};
+
+&sound {
+	compatible = "qcom,sc8280xp-sndcard";
+	model = "SC8280XP-HUAWEI-MATEBOOKEGO";
+	audio-routing =
+		"SpkrLeft IN", "WSA_SPK1 OUT",
+		"SpkrRight IN", "WSA_SPK2 OUT",
+		"IN1_HPHL", "HPHL_OUT",
+		"IN2_HPHR", "HPHR_OUT",
+		"AMIC2", "MIC BIAS2",
+		"VA DMIC0", "MIC BIAS1",
+		"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 {
+			sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>;
+		};
+
+		codec {
+			sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>;
+		};
+
+		platform {
+			sound-dai = <&q6apm>;
+		};
+	};
+
+	wcd-capture-dai-link {
+		link-name = "WCD Capture";
+		cpu {
+			sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>;
+		};
+
+		codec {
+			sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>;
+		};
+
+		platform {
+			sound-dai = <&q6apm>;
+		};
+	};
+
+	wsa-dai-link {
+		link-name = "WSA Playback";
+		cpu {
+			sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>;
+		};
+
+		codec {
+			sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>;
+		};
+
+		platform {
+			sound-dai = <&q6apm>;
+		};
+	};
+
+	va-dai-link {
+		link-name = "VA Capture";
+		cpu {
+			sound-dai = <&q6apmbedai VA_CODEC_DMA_TX_0>;
+		};
+
+		platform {
+			sound-dai = <&q6apm>;
+		};
+
+		codec {
+			sound-dai = <&vamacro 0>;
+		};
+	};
+};
+
+&swr0 {
+	status = "okay";
+
+	left_spkr: wsa8830-left@0,1 {
+		compatible = "sdw10217020200";
+		reg = <0 1>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&spkr_1_sd_n_default>;
+		powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>;
+		#thermal-sensor-cells = <0>;
+		sound-name-prefix = "SpkrLeft";
+		#sound-dai-cells = <0>;
+		vdd-supply = <&vreg_s10b>;
+	};
+
+	right_spkr: wsa8830-right@0,2 {
+		compatible = "sdw10217020200";
+		reg = <0 2>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&spkr_2_sd_n_default>;
+		powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_LOW>;
+		#thermal-sensor-cells = <0>;
+		sound-name-prefix = "SpkrRight";
+		#sound-dai-cells = <0>;
+		vdd-supply = <&vreg_s10b>;
+	};
+};
+
+&swr1 {
+	status = "okay";
+
+	wcd_rx: wcd9380-rx@0,4 {
+		compatible = "sdw20217010d00";
+		reg = <0 4>;
+		qcom,rx-port-mapping = <1 2 3 4 5>;
+	};
+};
+
+&swr2 {
+	status = "okay";
+
+	wcd_tx: wcd9380-tx@0,3 {
+		compatible = "sdw20217010d00";
+		reg = <0 3>;
+		qcom,tx-port-mapping = <1 1 2 3>;
+	};
+};
+
+&txmacro {
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-0 = <&uart2_default>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	bluetooth {
+		compatible = "qcom,wcn6855-bt";
+
+		vddrfacmn-supply = <&vreg_pmu_rfa_cmn_0p8>;
+		vddaon-supply = <&vreg_pmu_aon_0p8>;
+		vddwlcx-supply = <&vreg_pmu_wlcx_0p8>;
+		vddwlmx-supply = <&vreg_pmu_wlmx_0p8>;
+		vddbtcmx-supply = <&vreg_pmu_btcmx_0p8>;
+		vddrfa0p8-supply = <&vreg_pmu_rfa_0p8>;
+		vddrfa1p2-supply = <&vreg_pmu_rfa_1p2>;
+		vddrfa1p8-supply = <&vreg_pmu_rfa_1p7>;
+
+		max-speed = <3200000>;
+	};
+};
+
+&usb_0 {
+	status = "okay";
+};
+
+&usb_0_dwc3 {
+	dr_mode = "host";
+};
+
+&usb_0_hsphy {
+	vdda-pll-supply = <&vreg_l9d>;
+	vdda18-supply = <&vreg_l1c>;
+	vdda33-supply = <&vreg_l7d>;
+
+	status = "okay";
+};
+
+&usb_0_qmpphy {
+	vdda-phy-supply = <&vreg_l9d>;
+	vdda-pll-supply = <&vreg_l4d>;
+
+	orientation-switch;
+
+	status = "okay";
+};
+
+&usb_0_qmpphy_dp_in {
+	remote-endpoint = <&mdss0_dp0_out>;
+};
+
+&usb_1 {
+	status = "okay";
+};
+
+&usb_1_dwc3 {
+	dr_mode = "host";
+};
+
+&usb_1_hsphy {
+	vdda-pll-supply = <&vreg_l4b>;
+	vdda18-supply = <&vreg_l1c>;
+	vdda33-supply = <&vreg_l13c>;
+
+	status = "okay";
+};
+
+&usb_1_qmpphy {
+	vdda-phy-supply = <&vreg_l4b>;
+	vdda-pll-supply = <&vreg_l3b>;
+
+	orientation-switch;
+
+	status = "okay";
+};
+
+&usb_1_qmpphy_dp_in {
+	remote-endpoint = <&mdss0_dp1_out>;
+};
+
+&usb_2 {
+	status = "okay";
+};
+
+&usb_2_hsphy0 {
+	vdda-pll-supply = <&vreg_l1b>;
+	vdda18-supply = <&vreg_l1c>;
+	vdda33-supply = <&vreg_l7d>;
+
+	status = "okay";
+};
+
+&usb_2_hsphy1 {
+	vdda-pll-supply = <&vreg_l8d>;
+	vdda18-supply = <&vreg_l1c>;
+	vdda33-supply = <&vreg_l7d>;
+
+	status = "okay";
+};
+
+&usb_2_hsphy2 {
+	vdda-pll-supply = <&vreg_l10d>;
+	vdda18-supply = <&vreg_l8c>;
+	vdda33-supply = <&vreg_l2d>;
+
+	status = "okay";
+};
+
+&usb_2_hsphy3 {
+	vdda-pll-supply = <&vreg_l10d>;
+	vdda18-supply = <&vreg_l8c>;
+	vdda33-supply = <&vreg_l2d>;
+
+	status = "okay";
+};
+
+&usb_2_qmpphy0 {
+	vdda-phy-supply = <&vreg_l1b>;
+	vdda-pll-supply = <&vreg_l4d>;
+
+	status = "okay";
+};
+
+&usb_2_qmpphy1 {
+	vdda-phy-supply = <&vreg_l8d>;
+	vdda-pll-supply = <&vreg_l4d>;
+
+	status = "okay";
+};
+
+&vamacro {
+	pinctrl-0 = <&dmic01_default>, <&dmic23_default>;
+	pinctrl-names = "default";
+
+	vdd-micb-supply = <&vreg_s10b>;
+
+	qcom,dmic-sample-rate = <4800000>;
+
+	status = "okay";
+};
+
+&venus {
+	firmware-name = "qcom/sc8280xp/HUAWEI/gaokun3/qcvss8280.mbn";
+	status = "okay";
+};
+
+&wsamacro {
+	status = "okay";
+};
+
+&xo_board_clk {
+	clock-frequency = <38400000>;
+};
+
+/* PINCTRL */
+
+&lpass_tlmm {
+	status = "okay";
+};
+
+&pmc8280_1_gpios {
+	misc_3p3_reg_en: misc-3p3-reg-en-state {
+		pins = "gpio1";
+		function = "normal";
+	};
+
+	vol_up_n: vol-up-n-state {
+		pins = "gpio6";
+		function = "normal";
+		power-source = <1>;
+		input-enable;
+		bias-pull-up;
+	};
+};
+
+&pmr735a_gpios {
+	hastings_reg_en: hastings-reg-en-state {
+		pins = "gpio1";
+		function = "normal";
+	};
+};
+
+&tlmm {
+
+	gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 4>;
+
+	bt_default: bt-default-state {
+		hstp-bt-en-pins {
+			pins = "gpio133";
+			function = "gpio";
+			drive-strength = <16>;
+			bias-disable;
+		};
+
+		hstp-sw-ctrl-pins {
+			pins = "gpio132";
+			function = "gpio";
+			bias-pull-down;
+		};
+	};
+
+	i2c4_default: i2c4-default-state {
+		pins = "gpio171", "gpio172";
+		function = "qup4";
+		drive-strength = <16>;
+		bias-disable;
+	};
+
+	mode_pin_active: mode-pin-state {
+		pins = "gpio26";
+		function = "gpio";
+		bias-disable;
+	};
+
+	nvme_reg_en: nvme-reg-en-state {
+		pins = "gpio135";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-disable;
+	};
+
+	pcie2a_default: pcie2a-default-state {
+		clkreq-n-pins {
+			pins = "gpio142";
+			function = "pcie2a_clkreq";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+
+		perst-n-pins {
+			pins = "gpio143";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+		};
+
+		wake-n-pins {
+		       pins = "gpio145";
+		       function = "gpio";
+		       drive-strength = <2>;
+		       bias-pull-up;
+	       };
+	};
+
+	pcie4_default: pcie4-default-state {
+		clkreq-n-pins {
+			pins = "gpio140";
+			function = "pcie4_clkreq";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+
+		perst-n-pins {
+			pins = "gpio141";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+		};
+
+		wake-n-pins {
+			pins = "gpio139";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+	};
+
+	spkr_1_sd_n_default: spkr-1-sd-n-default-state {
+		perst-n-pins {
+			pins = "gpio178";
+			function = "gpio";
+			drive-strength = <16>;
+			bias-disable;
+			output-high;
+		};
+	};
+
+	spkr_2_sd_n_default: spkr-2-sd-n-default-state {
+		perst-n-pins {
+			pins = "gpio179";
+			function = "gpio";
+			drive-strength = <16>;
+			bias-disable;
+			output-high;
+		};
+	};
+
+	ts0_default: ts0-default-state {
+		int-n-pins {
+			pins = "gpio175";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+		};
+
+		reset-n-pins {
+			pins = "gpio99";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+			output-high;
+		};
+	};
+
+	uart2_default: uart2-default-state {
+		cts-pins {
+			pins = "gpio121";
+			function = "qup2";
+			bias-bus-hold;
+		};
+
+		rts-pins {
+			pins = "gpio122";
+			function = "qup2";
+			drive-strength = <2>;
+			bias-disable;
+		};
+
+		rx-pins {
+			pins = "gpio124";
+			function = "qup2";
+			bias-pull-up;
+		};
+
+		tx-pins {
+			pins = "gpio123";
+			function = "qup2";
+			drive-strength = <2>;
+			bias-disable;
+		};
+	};
+
+	wcd_default: wcd-default-state {
+		reset-pins {
+			pins = "gpio106";
+			function = "gpio";
+			bias-disable;
+		};
+	};
+
+	wlan_en: wlan-en-state {
+		pins = "gpio134";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-down;
+	};
+
+};