public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
@ 2025-03-27  8:14 Johan Hovold
  2025-03-27 14:04 ` Dmitry Baryshkov
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Johan Hovold @ 2025-03-27  8:14 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Dennis Gilmore,
	linux-arm-msm, devicetree, linux-kernel, Johan Hovold

Enable PCIe5 and the SDX62 modem present on some T14s.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---

I don't have a modem in my T14s, but this is based on the work I did to
enable the modem on the CRD reference design and the T14s schematics.

I'm hopping Dennis will be able to help out with testing.

Note that we may possibly need a new entry for SDX62 in the MHI driver
device id table (mhi_pci_id_table) as well. The output of 'lspci -n'
will tell.

Johan


 .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi   | 65 +++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
index 962fb050c55c..8b3f715bfc0b 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
@@ -310,6 +310,22 @@ vph_pwr: regulator-vph-pwr {
 		regulator-boot-on;
 	};
 
+	vreg_wwan: regulator-wwan {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VCC3B_WAN_RCM";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&tlmm 221 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&wwan_sw_en>;
+		pinctrl-names = "default";
+
+		regulator-boot-on;
+	};
+
 	sound {
 		compatible = "qcom,x1e80100-sndcard";
 		model = "X1E80100-LENOVO-Thinkpad-T14s";
@@ -1028,6 +1044,25 @@ &pcie4_phy {
 	status = "okay";
 };
 
+&pcie5 {
+	perst-gpios = <&tlmm 149 GPIO_ACTIVE_LOW>;
+	wake-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>;
+
+	vddpe-3v3-supply = <&vreg_wwan>;
+
+	pinctrl-0 = <&pcie5_default>;
+	pinctrl-names = "default";
+
+	status = "okay";
+};
+
+&pcie5_phy {
+	vdda-phy-supply = <&vreg_l3i_0p8>;
+	vdda-pll-supply = <&vreg_l3e_1p2>;
+
+	status = "okay";
+};
+
 &pcie6a {
 	perst-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
 	wake-gpios = <&tlmm 154 GPIO_ACTIVE_LOW>;
@@ -1309,6 +1344,29 @@ wake-n-pins {
 		};
 	};
 
+	pcie5_default: pcie5-default-state {
+		clkreq-n-pins {
+			pins = "gpio150";
+			function = "pcie5_clk";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+
+		perst-n-pins {
+			pins = "gpio149";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-disable;
+		};
+
+		wake-n-pins {
+			pins = "gpio151";
+			function = "gpio";
+			drive-strength = <2>;
+			bias-pull-up;
+		};
+	};
+
 	pcie6a_default: pcie6a-default-state {
 		clkreq-n-pins {
 			pins = "gpio153";
@@ -1367,6 +1425,13 @@ wcd_default: wcd-reset-n-active-state {
 		bias-disable;
 		output-low;
 	};
+
+	wwan_sw_en: wwan-sw-en-state {
+		pins = "gpio221";
+		function = "gpio";
+		drive-strength = <4>;
+		bias-disable;
+	};
 };
 
 &usb_1_ss0_hsphy {
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
  2025-03-27  8:14 [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem Johan Hovold
@ 2025-03-27 14:04 ` Dmitry Baryshkov
  2025-03-28  9:29 ` Abel Vesa
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Dmitry Baryshkov @ 2025-03-27 14:04 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Dennis Gilmore, linux-arm-msm, devicetree,
	linux-kernel

On Thu, Mar 27, 2025 at 09:14:27AM +0100, Johan Hovold wrote:
> Enable PCIe5 and the SDX62 modem present on some T14s.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
> 
> I don't have a modem in my T14s, but this is based on the work I did to
> enable the modem on the CRD reference design and the T14s schematics.
> 
> I'm hopping Dennis will be able to help out with testing.
> 
> Note that we may possibly need a new entry for SDX62 in the MHI driver
> device id table (mhi_pci_id_table) as well. The output of 'lspci -n'
> will tell.
> 
> Johan
> 
> 
>  .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi   | 65 +++++++++++++++++++
>  1 file changed, 65 insertions(+)
> 

> @@ -1028,6 +1044,25 @@ &pcie4_phy {
>  	status = "okay";
>  };
>  
> +&pcie5 {
> +	perst-gpios = <&tlmm 149 GPIO_ACTIVE_LOW>;
> +	wake-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>;
> +
> +	vddpe-3v3-supply = <&vreg_wwan>;

As we now have a proper PCIe slot power controls, is anything preventing
us from using it for the modem?

> +
> +	pinctrl-0 = <&pcie5_default>;
> +	pinctrl-names = "default";
> +
> +	status = "okay";
> +};
> +
-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
  2025-03-27  8:14 [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem Johan Hovold
  2025-03-27 14:04 ` Dmitry Baryshkov
@ 2025-03-28  9:29 ` Abel Vesa
  2025-03-29 12:06   ` Konrad Dybcio
       [not found] ` <CAJesf3M-LSS3PqGKBSzM+4SEYgRmqrVmv-kvJLYUZqqU_Vjjuw@mail.gmail.com>
  2025-05-17  5:57 ` Bjorn Andersson
  3 siblings, 1 reply; 7+ messages in thread
From: Abel Vesa @ 2025-03-28  9:29 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Dennis Gilmore, linux-arm-msm, devicetree,
	linux-kernel

On 25-03-27 09:14:27, Johan Hovold wrote:
> Enable PCIe5 and the SDX62 modem present on some T14s.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
> 
> I don't have a modem in my T14s, but this is based on the work I did to
> enable the modem on the CRD reference design and the T14s schematics.
> 

What happens with T14s variants that do not have the WWAN ?

Is it OK to enable it on those, HW-wise ?

(Hope we don't have to split the devicetree again, like we did for the
panel)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
       [not found] ` <CAJesf3M-LSS3PqGKBSzM+4SEYgRmqrVmv-kvJLYUZqqU_Vjjuw@mail.gmail.com>
@ 2025-03-28 17:02   ` Dennis Gilmore
  0 siblings, 0 replies; 7+ messages in thread
From: Dennis Gilmore @ 2025-03-28 17:02 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-msm,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list

Resending it as plain text so it ends up on the lists. My phone does
not allow me to send plain text emails. The modem shows up as device
ID 1eac:1007

Tested-by: Dennis Gilmore <dgilmore@redhat.com>


On Fri, Mar 28, 2025 at 7:05 AM Dennis Gilmore <dgilmore@redhat.com> wrote:
>
> Tested-by: Dennis Gilmore <dgilmore@redhat.com>
>
> It worked fine here, the modem already exists in mhi and the fcc- unlock code is already upstream in ModemManager
>
> Dennis
>
> On Thu, 27 Mar 2025, 03:24 Johan Hovold, <johan+linaro@kernel.org> wrote:
>>
>> Enable PCIe5 and the SDX62 modem present on some T14s.
>>
>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>> ---
>>
>> I don't have a modem in my T14s, but this is based on the work I did to
>> enable the modem on the CRD reference design and the T14s schematics.
>>
>> I'm hopping Dennis will be able to help out with testing.
>>
>> Note that we may possibly need a new entry for SDX62 in the MHI driver
>> device id table (mhi_pci_id_table) as well. The output of 'lspci -n'
>> will tell.
>>
>> Johan
>>
>>
>>  .../qcom/x1e78100-lenovo-thinkpad-t14s.dtsi   | 65 +++++++++++++++++++
>>  1 file changed, 65 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
>> index 962fb050c55c..8b3f715bfc0b 100644
>> --- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dtsi
>> @@ -310,6 +310,22 @@ vph_pwr: regulator-vph-pwr {
>>                 regulator-boot-on;
>>         };
>>
>> +       vreg_wwan: regulator-wwan {
>> +               compatible = "regulator-fixed";
>> +
>> +               regulator-name = "VCC3B_WAN_RCM";
>> +               regulator-min-microvolt = <3300000>;
>> +               regulator-max-microvolt = <3300000>;
>> +
>> +               gpio = <&tlmm 221 GPIO_ACTIVE_HIGH>;
>> +               enable-active-high;
>> +
>> +               pinctrl-0 = <&wwan_sw_en>;
>> +               pinctrl-names = "default";
>> +
>> +               regulator-boot-on;
>> +       };
>> +
>>         sound {
>>                 compatible = "qcom,x1e80100-sndcard";
>>                 model = "X1E80100-LENOVO-Thinkpad-T14s";
>> @@ -1028,6 +1044,25 @@ &pcie4_phy {
>>         status = "okay";
>>  };
>>
>> +&pcie5 {
>> +       perst-gpios = <&tlmm 149 GPIO_ACTIVE_LOW>;
>> +       wake-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>;
>> +
>> +       vddpe-3v3-supply = <&vreg_wwan>;
>> +
>> +       pinctrl-0 = <&pcie5_default>;
>> +       pinctrl-names = "default";
>> +
>> +       status = "okay";
>> +};
>> +
>> +&pcie5_phy {
>> +       vdda-phy-supply = <&vreg_l3i_0p8>;
>> +       vdda-pll-supply = <&vreg_l3e_1p2>;
>> +
>> +       status = "okay";
>> +};
>> +
>>  &pcie6a {
>>         perst-gpios = <&tlmm 152 GPIO_ACTIVE_LOW>;
>>         wake-gpios = <&tlmm 154 GPIO_ACTIVE_LOW>;
>> @@ -1309,6 +1344,29 @@ wake-n-pins {
>>                 };
>>         };
>>
>> +       pcie5_default: pcie5-default-state {
>> +               clkreq-n-pins {
>> +                       pins = "gpio150";
>> +                       function = "pcie5_clk";
>> +                       drive-strength = <2>;
>> +                       bias-pull-up;
>> +               };
>> +
>> +               perst-n-pins {
>> +                       pins = "gpio149";
>> +                       function = "gpio";
>> +                       drive-strength = <2>;
>> +                       bias-disable;
>> +               };
>> +
>> +               wake-n-pins {
>> +                       pins = "gpio151";
>> +                       function = "gpio";
>> +                       drive-strength = <2>;
>> +                       bias-pull-up;
>> +               };
>> +       };
>> +
>>         pcie6a_default: pcie6a-default-state {
>>                 clkreq-n-pins {
>>                         pins = "gpio153";
>> @@ -1367,6 +1425,13 @@ wcd_default: wcd-reset-n-active-state {
>>                 bias-disable;
>>                 output-low;
>>         };
>> +
>> +       wwan_sw_en: wwan-sw-en-state {
>> +               pins = "gpio221";
>> +               function = "gpio";
>> +               drive-strength = <4>;
>> +               bias-disable;
>> +       };
>>  };
>>
>>  &usb_1_ss0_hsphy {
>> --
>> 2.48.1
>>


-- 
Dennis Gilmore
Senior Manager Systems Enablement OpenShift Development


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
  2025-03-28  9:29 ` Abel Vesa
@ 2025-03-29 12:06   ` Konrad Dybcio
  2025-03-29 20:30     ` Abel Vesa
  0 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2025-03-29 12:06 UTC (permalink / raw)
  To: Abel Vesa, Johan Hovold
  Cc: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Dennis Gilmore, linux-arm-msm, devicetree,
	linux-kernel

On 3/28/25 10:29 AM, Abel Vesa wrote:
> On 25-03-27 09:14:27, Johan Hovold wrote:
>> Enable PCIe5 and the SDX62 modem present on some T14s.
>>
>> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>> ---
>>
>> I don't have a modem in my T14s, but this is based on the work I did to
>> enable the modem on the CRD reference design and the T14s schematics.
>>
> 
> What happens with T14s variants that do not have the WWAN ?
> 
> Is it OK to enable it on those, HW-wise ?
> 
> (Hope we don't have to split the devicetree again, like we did for the
> panel)

Unless Lenovo planted something else on these GPIOs (doubt), it's even better
to enable it, as UEFI brings up this controller anyway

Konrad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
  2025-03-29 12:06   ` Konrad Dybcio
@ 2025-03-29 20:30     ` Abel Vesa
  0 siblings, 0 replies; 7+ messages in thread
From: Abel Vesa @ 2025-03-29 20:30 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Johan Hovold, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Dennis Gilmore, linux-arm-msm,
	devicetree, linux-kernel

On 25-03-29 13:06:54, Konrad Dybcio wrote:
> On 3/28/25 10:29 AM, Abel Vesa wrote:
> > On 25-03-27 09:14:27, Johan Hovold wrote:
> >> Enable PCIe5 and the SDX62 modem present on some T14s.
> >>
> >> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> >> ---
> >>
> >> I don't have a modem in my T14s, but this is based on the work I did to
> >> enable the modem on the CRD reference design and the T14s schematics.
> >>
> > 
> > What happens with T14s variants that do not have the WWAN ?
> > 
> > Is it OK to enable it on those, HW-wise ?
> > 
> > (Hope we don't have to split the devicetree again, like we did for the
> > panel)
> 
> Unless Lenovo planted something else on these GPIOs (doubt), it's even better
> to enable it, as UEFI brings up this controller anyway

SGTM then.

> 
> Konrad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
  2025-03-27  8:14 [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem Johan Hovold
                   ` (2 preceding siblings ...)
       [not found] ` <CAJesf3M-LSS3PqGKBSzM+4SEYgRmqrVmv-kvJLYUZqqU_Vjjuw@mail.gmail.com>
@ 2025-05-17  5:57 ` Bjorn Andersson
  3 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2025-05-17  5:57 UTC (permalink / raw)
  To: Konrad Dybcio, Johan Hovold
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Dennis Gilmore,
	linux-arm-msm, devicetree, linux-kernel


On Thu, 27 Mar 2025 09:14:27 +0100, Johan Hovold wrote:
> Enable PCIe5 and the SDX62 modem present on some T14s.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem
      commit: 03026046589d9baca0d24348faa76c72899de48f

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-17  5:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27  8:14 [PATCH] arm64: dts: qcom: x1e78100-t14s: enable SDX62 modem Johan Hovold
2025-03-27 14:04 ` Dmitry Baryshkov
2025-03-28  9:29 ` Abel Vesa
2025-03-29 12:06   ` Konrad Dybcio
2025-03-29 20:30     ` Abel Vesa
     [not found] ` <CAJesf3M-LSS3PqGKBSzM+4SEYgRmqrVmv-kvJLYUZqqU_Vjjuw@mail.gmail.com>
2025-03-28 17:02   ` Dennis Gilmore
2025-05-17  5:57 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox