.../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+)
On Lenovo ThinkPad T14s, the fingerprint reader placed in the power
button is connected via the usb_2 controller. The controller has only
a USB 2.0 PHY which is then connected via a NXP PTN3222 eUSB2 repeater,
which in turn is connected to the Goodix fingerprint reader.
So enable all the usb_2 controller and PHY nodes, set dual-role mode to
host and describe the eUSB2 repeater in order to get the fingerprint
reader discovered.
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
.../dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts | 39 ++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
index 9bb6994cc482e28e3e78817adf7ef15421f63219..b2c2347f54fa65f9355f0d7c008119e95bb64fb2 100644
--- a/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
+++ b/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts
@@ -612,6 +612,20 @@ &i2c5 {
status = "okay";
+ eusb5_repeater: redriver@43 {
+ compatible = "nxp,ptn3222";
+ reg = <0x43>;
+ #phy-cells = <0>;
+
+ vdd3v3-supply = <&vreg_l13b_3p0>;
+ vdd1v8-supply = <&vreg_l4b_1p8>;
+
+ reset-gpios = <&tlmm 7 GPIO_ACTIVE_LOW>;
+
+ pinctrl-0 = <&eusb5_reset_n>;
+ pinctrl-names = "default";
+ };
+
eusb3_repeater: redriver@47 {
compatible = "nxp,ptn3222";
reg = <0x47>;
@@ -884,6 +898,14 @@ eusb3_reset_n: eusb3-reset-n-state {
output-low;
};
+ eusb5_reset_n: eusb5-reset-n-state {
+ pins = "gpio7";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ output-low;
+ };
+
eusb6_reset_n: eusb6-reset-n-state {
pins = "gpio184";
function = "gpio";
@@ -1058,6 +1080,23 @@ &usb_1_ss1_qmpphy_out {
remote-endpoint = <&pmic_glink_ss1_ss_in>;
};
+&usb_2 {
+ status = "okay";
+};
+
+&usb_2_dwc3 {
+ dr_mode = "host";
+};
+
+&usb_2_hsphy {
+ vdd-supply = <&vreg_l2e_0p8>;
+ vdda12-supply = <&vreg_l3e_1p2>;
+
+ phys = <&eusb5_repeater>;
+
+ status = "okay";
+};
+
&usb_mp {
status = "okay";
};
---
base-commit: 7b4b9bf203da94fbeac75ed3116c84aa03e74578
change-id: 20250107-x1e80100-t14-enable-fingerprint-sensor-a517aaa46576
Best regards,
--
Abel Vesa <abel.vesa@linaro.org>
On Tue, 07 Jan 2025 15:35:07 +0200, Abel Vesa wrote:
> On Lenovo ThinkPad T14s, the fingerprint reader placed in the power
> button is connected via the usb_2 controller. The controller has only
> a USB 2.0 PHY which is then connected via a NXP PTN3222 eUSB2 repeater,
> which in turn is connected to the Goodix fingerprint reader.
>
> So enable all the usb_2 controller and PHY nodes, set dual-role mode to
> host and describe the eUSB2 repeater in order to get the fingerprint
> reader discovered.
>
> [...]
Applied, thanks!
[1/1] arm64: dts: qcom: x1e78100-t14s: Enable fingerprint reader
commit: 5b451930fdeea4e4987d3cc1c4a44da85d0b8b9f
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
On 25-01-07 15:35:07, Abel Vesa wrote: > On Lenovo ThinkPad T14s, the fingerprint reader placed in the power > button is connected via the usb_2 controller. The controller has only > a USB 2.0 PHY which is then connected via a NXP PTN3222 eUSB2 repeater, > which in turn is connected to the Goodix fingerprint reader. > > So enable all the usb_2 controller and PHY nodes, set dual-role mode to > host and describe the eUSB2 repeater in order to get the fingerprint > reader discovered. > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Turns out that on resume a couple of things are broken w.r.t. to the usb_2 controller: [ 41.104913] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xe2010600, fsynr=0x110001, cbfrsynra=0x14e0, cb [ 41.104936] arm-smmu 15000000.iommu: FSR = 00000402 [Format=2 TF], SID=0x14e0 [ 41.104950] arm-smmu 15000000.iommu: FSYNR0 = 00110001 [S1CBNDX=17 PLVL=1] [ 51.420689] xhci-hcd xhci-hcd.6.auto: xHCI host not responding to stop endpoint command [ 51.420702] xhci-hcd xhci-hcd.6.auto: xHCI host controller not responding, assume dead [ 51.420720] xhci-hcd xhci-hcd.6.auto: HC died; cleaning up [ 51.420836] usb 5-1: PM: dpm_run_callback(): usb_dev_resume returns -22 [ 51.420864] usb 5-1: PM: failed to resume async: error -22 So do not apply this yet. Sorry for not testing this properly before sending.
On Tue, Jan 07, 2025 at 04:38:28PM +0200, Abel Vesa wrote: > On 25-01-07 15:35:07, Abel Vesa wrote: > > On Lenovo ThinkPad T14s, the fingerprint reader placed in the power > > button is connected via the usb_2 controller. The controller has only > > a USB 2.0 PHY which is then connected via a NXP PTN3222 eUSB2 repeater, > > which in turn is connected to the Goodix fingerprint reader. > > > > So enable all the usb_2 controller and PHY nodes, set dual-role mode to > > host and describe the eUSB2 repeater in order to get the fingerprint > > reader discovered. > > > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org> > > Turns out that on resume a couple of things are broken w.r.t. to the usb_2 controller: > > [ 41.104913] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xe2010600, fsynr=0x110001, cbfrsynra=0x14e0, cb > [ 41.104936] arm-smmu 15000000.iommu: FSR = 00000402 [Format=2 TF], SID=0x14e0 > [ 41.104950] arm-smmu 15000000.iommu: FSYNR0 = 00110001 [S1CBNDX=17 PLVL=1] > [ 51.420689] xhci-hcd xhci-hcd.6.auto: xHCI host not responding to stop endpoint command > [ 51.420702] xhci-hcd xhci-hcd.6.auto: xHCI host controller not responding, assume dead > [ 51.420720] xhci-hcd xhci-hcd.6.auto: HC died; cleaning up > [ 51.420836] usb 5-1: PM: dpm_run_callback(): usb_dev_resume returns -22 > [ 51.420864] usb 5-1: PM: failed to resume async: error -22 > > So do not apply this yet. > > Sorry for not testing this properly before sending. Heh, thanks for the heads up. I was just about to reply with my: Reviewed-by: Johan Hovold <johan+linaro@kernel.org> Tested-by: Johan Hovold <johan+linaro@kernel.org> after comparing with the schematics and verifying that the fingerprint reader enumerates. But I do indeed see something similar here on resume: [ 1891.737726] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xe3f6ddbec0, fsynr=0x510000, cbfrsynra=0x14e0, cb=3 [ 1891.737738] arm-smmu 15000000.iommu: FSR = 00000402 [Format=2 TF], SID=0x14e0 [ 1891.737746] arm-smmu 15000000.iommu: FSYNR0 = 00510000 [S1CBNDX=81 PLVL=0] [ 1891.804342] r8152 7-1:1.0 eth0: carrier on [ 1902.039158] xhci-hcd xhci-hcd.1.auto: xHCI host not responding to stop endpoint command [ 1902.039191] xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead [ 1902.039795] xhci-hcd xhci-hcd.1.auto: HC died; cleaning up [ 1902.040050] usb 1-1: PM: dpm_run_callback(): usb_dev_resume returns -5 [ 1902.040272] usb 1-1: PM: failed to resume async: error -5 [ 1902.581479] OOM killer enabled. [ 1902.586673] Restarting tasks ... [ 1902.587565] usb 1-1: USB disconnect, device number 2 Johan
On 25-01-07 16:19:26, Johan Hovold wrote: > On Tue, Jan 07, 2025 at 04:38:28PM +0200, Abel Vesa wrote: > > On 25-01-07 15:35:07, Abel Vesa wrote: > > > On Lenovo ThinkPad T14s, the fingerprint reader placed in the power > > > button is connected via the usb_2 controller. The controller has only > > > a USB 2.0 PHY which is then connected via a NXP PTN3222 eUSB2 repeater, > > > which in turn is connected to the Goodix fingerprint reader. > > > > > > So enable all the usb_2 controller and PHY nodes, set dual-role mode to > > > host and describe the eUSB2 repeater in order to get the fingerprint > > > reader discovered. > > > > > > Signed-off-by: Abel Vesa <abel.vesa@linaro.org> > > > > Turns out that on resume a couple of things are broken w.r.t. to the usb_2 controller: > > > > [ 41.104913] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xe2010600, fsynr=0x110001, cbfrsynra=0x14e0, cb > > [ 41.104936] arm-smmu 15000000.iommu: FSR = 00000402 [Format=2 TF], SID=0x14e0 > > [ 41.104950] arm-smmu 15000000.iommu: FSYNR0 = 00110001 [S1CBNDX=17 PLVL=1] > > [ 51.420689] xhci-hcd xhci-hcd.6.auto: xHCI host not responding to stop endpoint command > > [ 51.420702] xhci-hcd xhci-hcd.6.auto: xHCI host controller not responding, assume dead > > [ 51.420720] xhci-hcd xhci-hcd.6.auto: HC died; cleaning up > > [ 51.420836] usb 5-1: PM: dpm_run_callback(): usb_dev_resume returns -22 > > [ 51.420864] usb 5-1: PM: failed to resume async: error -22 > > > > So do not apply this yet. > > > > Sorry for not testing this properly before sending. > > Heh, thanks for the heads up. > > I was just about to reply with my: > > Reviewed-by: Johan Hovold <johan+linaro@kernel.org> > Tested-by: Johan Hovold <johan+linaro@kernel.org> > > after comparing with the schematics and verifying that the fingerprint > reader enumerates. Thanks for reviewing. > > But I do indeed see something similar here on resume: > > [ 1891.737726] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xe3f6ddbec0, fsynr=0x510000, cbfrsynra=0x14e0, cb=3 > [ 1891.737738] arm-smmu 15000000.iommu: FSR = 00000402 [Format=2 TF], SID=0x14e0 > [ 1891.737746] arm-smmu 15000000.iommu: FSYNR0 = 00510000 [S1CBNDX=81 PLVL=0] > [ 1891.804342] r8152 7-1:1.0 eth0: carrier on > [ 1902.039158] xhci-hcd xhci-hcd.1.auto: xHCI host not responding to stop endpoint command > [ 1902.039191] xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead > [ 1902.039795] xhci-hcd xhci-hcd.1.auto: HC died; cleaning up > [ 1902.040050] usb 1-1: PM: dpm_run_callback(): usb_dev_resume returns -5 > [ 1902.040272] usb 1-1: PM: failed to resume async: error -5 > [ 1902.581479] OOM killer enabled. > [ 1902.586673] Restarting tasks ... > [ 1902.587565] usb 1-1: USB disconnect, device number 2 Turns out it is the GDSC that has power status flags PWRSTS_OFF_ON when it should've had PWRSTS_RET_ON. Sent a fix here: https://lore.kernel.org/all/20250107-x1e80100-clk-gcc-fix-usb2-gdsc-pwrsts-v1-1-e15d1a5e7d80@linaro.org/ With this patch, the above resume issue goes away entirely. > > Johan Abel
On Tue, Jan 07, 2025 at 05:59:36PM +0200, Abel Vesa wrote: > On 25-01-07 16:19:26, Johan Hovold wrote: > > But I do indeed see something similar here on resume: > > > > [ 1891.737726] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0xe3f6ddbec0, fsynr=0x510000, cbfrsynra=0x14e0, cb=3 > > [ 1891.737738] arm-smmu 15000000.iommu: FSR = 00000402 [Format=2 TF], SID=0x14e0 > > [ 1891.737746] arm-smmu 15000000.iommu: FSYNR0 = 00510000 [S1CBNDX=81 PLVL=0] > > [ 1891.804342] r8152 7-1:1.0 eth0: carrier on > > [ 1902.039158] xhci-hcd xhci-hcd.1.auto: xHCI host not responding to stop endpoint command > > [ 1902.039191] xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead > > [ 1902.039795] xhci-hcd xhci-hcd.1.auto: HC died; cleaning up > > [ 1902.040050] usb 1-1: PM: dpm_run_callback(): usb_dev_resume returns -5 > > [ 1902.040272] usb 1-1: PM: failed to resume async: error -5 > > [ 1902.581479] OOM killer enabled. > > [ 1902.586673] Restarting tasks ... > > [ 1902.587565] usb 1-1: USB disconnect, device number 2 > > Turns out it is the GDSC that has power status flags PWRSTS_OFF_ON when it > should've had PWRSTS_RET_ON. Sent a fix here: > > https://lore.kernel.org/all/20250107-x1e80100-clk-gcc-fix-usb2-gdsc-pwrsts-v1-1-e15d1a5e7d80@linaro.org/ > > With this patch, the above resume issue goes away entirely. Indeed it does. Johan
© 2016 - 2025 Red Hat, Inc.