2024-05-23 08:00:45

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 0/3] arm64: qcom: sdm450: add initial support for Lenovo Smart Tab M10

Add initial support for the WiFi version of the Lenovo Smart Tab M10,
model TB-X605F with:
- SDM450 SoC
- Up to 3GiB of DDR
- 10.1" LCD Touch Panel
- eMMC
- Bluetooth & WiFi
- SDcard Slot
- Camera (unsupported)

Tablet can be found as "Tab M10" and "Smart Tab M10", the "Smart" variant
seems to comes with a dock I do not own.

Vendor page:
- https://pcsupport.lenovo.com/us/en/products/tablets/m-series-tablets/tab-m10

Downstream sources can be found at:
- https://github.com/Yahoo-Mike/android_kernel_lenovo_X605F
- https://gitlab.com/ubports/porting/community-ports/android9/lenovo-tab-m10-fhd/kernel-lenovo-x605

In order to pass DTBs check, the GPU SMMU compatible needs to be fixed.

The current display uses simple-framebuffer, proper support
of the BOE TV101WUM-LL2 DSI panel will be sent separately.

Signed-off-by: Neil Armstrong <[email protected]>
---
Neil Armstrong (3):
dt-bindings: arm: qcom: Add Lenovo Smart Tab M10 (WiFi)
dt-bindings: iommu: qcom,iommu: Add MSM8953 GPU IOMMU to SMMUv2 compatibles
arm64: dts: qcom: sdm450: add Lenovo Smart Tab M10 DTS

Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
.../devicetree/bindings/iommu/qcom,iommu.yaml | 1 +
arch/arm64/boot/dts/qcom/Makefile | 1 +
arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts | 276 +++++++++++++++++++++
4 files changed, 279 insertions(+)
---
base-commit: a38297e3fb012ddfa7ce0321a7e5a8daeb1872b6
change-id: 20240522-topic-sdm450-upstream-tbx605f-220e89a43cba

Best regards,
--
Neil Armstrong <[email protected]>



2024-05-23 08:01:22

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 3/3] arm64: dts: qcom: sdm450: add Lenovo Smart Tab M10 DTS

This add initial support for the Lenovo Smart Tab M10 (WiFi)
(model tbx605f) which is a 10.1" tablet by Lenovo based on the
SDM450 SoC.

It has a 10.1" LCP touch panel, SDCard slot, Volume+Power buttons,
USB-C port amd front-facing camera (not supported).

The proper LCP Panel support will be added later, for now using the
simeple-framebuffer with the bootloader-initialized video memory.

Signed-off-by: Neil Armstrong <[email protected]>
---
arch/arm64/boot/dts/qcom/Makefile | 1 +
arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts | 276 +++++++++++++++++++++
2 files changed, 277 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index 7d40ec5e7d21..f163eedd2af2 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -175,6 +175,7 @@ dtb-$(CONFIG_ARCH_QCOM) += sc8180x-primus.dtb
dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-crd.dtb
dtb-$(CONFIG_ARCH_QCOM) += sc8280xp-lenovo-thinkpad-x13s.dtb
dtb-$(CONFIG_ARCH_QCOM) += sda660-inforce-ifc6560.dtb
+dtb-$(CONFIG_ARCH_QCOM) += sdm450-lenovo-tbx605f.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm450-motorola-ali.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-ganges-kirin.dtb
dtb-$(CONFIG_ARCH_QCOM) += sdm630-sony-xperia-nile-discovery.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts b/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts
new file mode 100644
index 000000000000..175befc02b22
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts
@@ -0,0 +1,276 @@
+// SPDX-License-Identifier: BSD-3-Clause
+/*
+ * Copyright (c) 2024, Neil Armstrong <[email protected]>
+ */
+/dts-v1/;
+
+#include "sdm450.dtsi"
+#include "pm8953.dtsi"
+#include "pmi8950.dtsi"
+
+/ {
+ model = "Lenovo Smart Tab M10";
+ compatible = "lenovo,tbx605f", "qcom,sdm450";
+ chassis-type = "tablet";
+
+ chosen {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ framebuffer@90001000 {
+ compatible = "simple-framebuffer";
+ reg = <0 0x90001000 0 (1200 * 1920 * 3)>;
+
+ width = <1200>;
+ height = <1920>;
+ stride = <(1200 * 3)>;
+ format = "r8g8b8";
+
+ power-domains = <&gcc MDSS_GDSC>;
+
+ clocks = <&gcc GCC_MDSS_AHB_CLK>,
+ <&gcc GCC_MDSS_AXI_CLK>,
+ <&gcc GCC_MDSS_VSYNC_CLK>,
+ <&gcc GCC_MDSS_MDP_CLK>,
+ <&gcc GCC_MDSS_BYTE0_CLK>,
+ <&gcc GCC_MDSS_PCLK0_CLK>,
+ <&gcc GCC_MDSS_ESC0_CLK>;
+ };
+ };
+
+ reserved-memory {
+ other_ext_region@0 {
+ no-map;
+ reg = <0x00 0x84500000 0x00 0x2300000>;
+ };
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+ key-volume-up {
+ label = "volume_up";
+ gpios = <&tlmm 85 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_VOLUMEUP>;
+ };
+ };
+
+ vph_pwr: vph-pwr-regulator {
+ compatible = "regulator-fixed";
+ regulator-name = "vph_pwr";
+ regulator-always-on;
+ regulator-boot-on;
+ };
+};
+
+&hsusb_phy {
+ vdd-supply = <&pm8953_l3>;
+ vdda-pll-supply = <&pm8953_l7>;
+ vdda-phy-dpdm-supply = <&pm8953_l13>;
+
+ status = "okay";
+};
+
+&i2c_3 {
+ status = "okay";
+
+ touchscreen@38 {
+ compatible = "edt,edt-ft5506";
+ reg = <0x38>;
+ interrupt-parent = <&tlmm>;
+ interrupts = <65 IRQ_TYPE_EDGE_FALLING>;
+ vcc-supply = <&pm8953_l10>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&ts_int_active &ts_reset_active>;
+
+ reset-gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
+ touchscreen-size-x = <1200>;
+ touchscreen-size-y = <1920>;
+ };
+};
+
+&pm8953_resin {
+ linux,code = <KEY_VOLUMEDOWN>;
+ status = "okay";
+};
+
+&rpm_requests {
+ regulators {
+ compatible = "qcom,rpm-pm8953-regulators";
+
+ vdd_s1-supply = <&vph_pwr>;
+ vdd_s2-supply = <&vph_pwr>;
+ vdd_s3-supply = <&vph_pwr>;
+ vdd_s4-supply = <&vph_pwr>;
+ vdd_s5-supply = <&vph_pwr>;
+ vdd_s6-supply = <&vph_pwr>;
+ vdd_s7-supply = <&vph_pwr>;
+ vdd_l1-supply = <&pm8953_s3>;
+ vdd_l2_l3-supply = <&pm8953_s3>;
+ vdd_l4_l5_l6_l7_l16_l19-supply = <&pm8953_s4>;
+ vdd_l8_l11_l12_l13_l14_l15-supply = <&vph_pwr>;
+ vdd_l9_l10_l17_l18_l22-supply = <&vph_pwr>;
+
+ pm8953_s1: s1 {
+ regulator-min-microvolt = <870000>;
+ regulator-max-microvolt = <1156000>;
+ };
+
+ pm8953_s3: s3 {
+ regulator-min-microvolt = <1224000>;
+ regulator-max-microvolt = <1224000>;
+ };
+
+ pm8953_s4: s4 {
+ regulator-min-microvolt = <1900000>;
+ regulator-max-microvolt = <2050000>;
+ };
+
+ pm8953_l1: l1 {
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <1100000>;
+ };
+
+ pm8953_l2: l2 {
+ regulator-min-microvolt = <975000>;
+ regulator-max-microvolt = <1225000>;
+ };
+
+ pm8953_l3: l3 {
+ regulator-min-microvolt = <925000>;
+ regulator-max-microvolt = <925000>;
+ };
+
+ pm8953_l5: l5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8953_l6: l6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8953_l7: l7 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1900000>;
+ };
+
+ pm8953_l8: l8 {
+ regulator-min-microvolt = <2900000>;
+ regulator-max-microvolt = <2900000>;
+ };
+
+ pm8953_l9: l9 {
+ regulator-min-microvolt = <3000000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ pm8953_l10: l10 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ pm8953_l11: l11 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ pm8953_l12: l12 {
+ regulator-min-microvolt = <2950000>;
+ regulator-max-microvolt = <2950000>;
+ };
+
+ pm8953_l13: l13 {
+ regulator-min-microvolt = <3125000>;
+ regulator-max-microvolt = <3125000>;
+ };
+
+ pm8953_l16: l16 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
+
+ pm8953_l17: l17 {
+ regulator-min-microvolt = <2850000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ pm8953_l19: l19 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1350000>;
+ };
+
+ pm8953_l22: l22 {
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2850000>;
+ };
+
+ pm8953_l23: l23 {
+ regulator-min-microvolt = <975000>;
+ regulator-max-microvolt = <1225000>;
+ };
+ };
+};
+
+&sdhc_1 {
+ vmmc-supply = <&pm8953_l8>;
+ vqmmc-supply = <&pm8953_l5>;
+
+ status = "okay";
+};
+
+&sdhc_2 {
+ vmmc-supply = <&pm8953_l11>;
+ vqmmc-supply = <&pm8953_l12>;
+
+ cd-gpios = <&tlmm 133 GPIO_ACTIVE_LOW>;
+
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_off>;
+ pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
+
+ status = "okay";
+};
+
+&tlmm {
+ gpio-reserved-ranges = <0 4>, <135 4>;
+
+ ts_int_active: ts-int-active-state {
+ pins = "gpio65";
+ function = "gpio";
+ drive-strength = <8>;
+ bias-pull-up;
+ };
+
+ ts_reset_active: ts-reset-active-state {
+ pins = "gpio64";
+ function = "gpio";
+ drive-strength = <0x08>;
+ bias-pull-up;
+ };
+};
+
+&usb3 {
+ status = "okay";
+};
+
+&usb3_dwc3 {
+ dr_mode = "peripheral";
+};
+
+&wcnss {
+ vddpx-supply = <&pm8953_l5>;
+
+ status = "okay";
+};
+
+&wcnss_iris {
+ compatible = "qcom,wcn3660b";
+
+ vddxo-supply = <&pm8953_l7>;
+ vddrfa-supply = <&pm8953_l19>;
+ vddpa-supply = <&pm8953_l9>;
+ vdddig-supply = <&pm8953_l5>;
+};

--
2.34.1


2024-05-23 08:02:44

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: arm: qcom: Add Lenovo Smart Tab M10 (WiFi)

This documents Lenovo Smart Tab M10 (WiFi) (model tbx605f)
which is a 10.1" tablet by Lenovo based on the SDM450 SoC.

Signed-off-by: Neil Armstrong <[email protected]>
---
Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 66beaac60e1d..ab72a6f855d7 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -801,6 +801,7 @@ properties:

- items:
- enum:
+ - lenovo,tbx605f
- motorola,ali
- const: qcom,sdm450


--
2.34.1


2024-05-23 08:03:20

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: iommu: qcom,iommu: Add MSM8953 GPU IOMMU to SMMUv2 compatibles

Add MSM8953 compatible string with "qcom,msm-iommu-v2" as fallback
for the MSM8953 GPU IOMMU which is compatible with Qualcomm's secure
fw "SMMU v2" implementation.

Signed-off-by: Neil Armstrong <[email protected]>
---
Documentation/devicetree/bindings/iommu/qcom,iommu.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml b/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml
index a74eb899c381..571e5746d177 100644
--- a/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml
+++ b/Documentation/devicetree/bindings/iommu/qcom,iommu.yaml
@@ -25,6 +25,7 @@ properties:
- const: qcom,msm-iommu-v1
- items:
- enum:
+ - qcom,msm8953-iommu
- qcom,msm8976-iommu
- const: qcom,msm-iommu-v2


--
2.34.1


2024-05-23 09:03:51

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: arm: qcom: Add Lenovo Smart Tab M10 (WiFi)

On 23/05/2024 09:59, Neil Armstrong wrote:
> This documents Lenovo Smart Tab M10 (WiFi) (model tbx605f)
> which is a 10.1" tablet by Lenovo based on the SDM450 SoC.
>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---

Acked-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-05-23 09:04:15

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: iommu: qcom,iommu: Add MSM8953 GPU IOMMU to SMMUv2 compatibles

On 23/05/2024 09:59, Neil Armstrong wrote:
> Add MSM8953 compatible string with "qcom,msm-iommu-v2" as fallback
> for the MSM8953 GPU IOMMU which is compatible with Qualcomm's secure
> fw "SMMU v2" implementation.
>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---


Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-05-27 16:34:09

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 3/3] arm64: dts: qcom: sdm450: add Lenovo Smart Tab M10 DTS

On Thu, May 23, 2024 at 09:59:35AM GMT, Neil Armstrong wrote:
> diff --git a/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts b/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts
[..]
> +&rpm_requests {
> + regulators {
> + compatible = "qcom,rpm-pm8953-regulators";
[..]
> + pm8953_l8: l8 {
> + regulator-min-microvolt = <2900000>;
> + regulator-max-microvolt = <2900000>;
> + };
[..]
> + pm8953_l11: l11 {
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + };
[..]
> + };
> +};
> +
> +&sdhc_1 {
> + vmmc-supply = <&pm8953_l8>;

JFYI. Not ensuring that the vmmc-supply is in HPM mode bitten us
multiple times in the past.

Regards,
Bjorn

2024-05-28 03:37:34

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/3] arm64: qcom: sdm450: add initial support for Lenovo Smart Tab M10


On Thu, 23 May 2024 09:59:32 +0200, Neil Armstrong wrote:
> Add initial support for the WiFi version of the Lenovo Smart Tab M10,
> model TB-X605F with:
> - SDM450 SoC
> - Up to 3GiB of DDR
> - 10.1" LCD Touch Panel
> - eMMC
> - Bluetooth & WiFi
> - SDcard Slot
> - Camera (unsupported)
>
> [...]

Applied, thanks!

[3/3] arm64: dts: qcom: sdm450: add Lenovo Smart Tab M10 DTS
commit: 7ddab80e115086c0f2f37fa5a95466d0885d66d2

Best regards,
--
Bjorn Andersson <[email protected]>

2024-05-28 12:40:55

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH 3/3] arm64: dts: qcom: sdm450: add Lenovo Smart Tab M10 DTS



On 5/27/24 18:33, Bjorn Andersson wrote:
> On Thu, May 23, 2024 at 09:59:35AM GMT, Neil Armstrong wrote:
>> diff --git a/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts b/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts
> [..]
>> +&rpm_requests {
>> + regulators {
>> + compatible = "qcom,rpm-pm8953-regulators";
> [..]
>> + pm8953_l8: l8 {
>> + regulator-min-microvolt = <2900000>;
>> + regulator-max-microvolt = <2900000>;
>> + };
> [..]
>> + pm8953_l11: l11 {
>> + regulator-min-microvolt = <3300000>;
>> + regulator-max-microvolt = <3300000>;
>> + };
> [..]
>> + };
>> +};
>> +
>> +&sdhc_1 {
>> + vmmc-supply = <&pm8953_l8>;
>
> JFYI. Not ensuring that the vmmc-supply is in HPM mode bitten us
> multiple times in the past.

it's not rpmh ;)

Konrad

2024-05-28 14:13:51

by Bjorn Andersson

[permalink] [raw]
Subject: Re: (subset) [PATCH 0/3] arm64: qcom: sdm450: add initial support for Lenovo Smart Tab M10


On Thu, 23 May 2024 09:59:32 +0200, Neil Armstrong wrote:
> Add initial support for the WiFi version of the Lenovo Smart Tab M10,
> model TB-X605F with:
> - SDM450 SoC
> - Up to 3GiB of DDR
> - 10.1" LCD Touch Panel
> - eMMC
> - Bluetooth & WiFi
> - SDcard Slot
> - Camera (unsupported)
>
> [...]

Applied, thanks!

[1/3] dt-bindings: arm: qcom: Add Lenovo Smart Tab M10 (WiFi)
commit: 5f2fd4aefac8ac376d1e4979d5237f5e7c53174d

Best regards,
--
Bjorn Andersson <[email protected]>

2024-05-28 17:24:41

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 3/3] arm64: dts: qcom: sdm450: add Lenovo Smart Tab M10 DTS

On Tue, May 28, 2024 at 02:19:28PM GMT, Konrad Dybcio wrote:
>
>
> On 5/27/24 18:33, Bjorn Andersson wrote:
> > On Thu, May 23, 2024 at 09:59:35AM GMT, Neil Armstrong wrote:
> > > diff --git a/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts b/arch/arm64/boot/dts/qcom/sdm450-lenovo-tbx605f.dts
> > [..]
> > > +&rpm_requests {
> > > + regulators {
> > > + compatible = "qcom,rpm-pm8953-regulators";
> > [..]
> > > + pm8953_l8: l8 {
> > > + regulator-min-microvolt = <2900000>;
> > > + regulator-max-microvolt = <2900000>;
> > > + };
> > [..]
> > > + pm8953_l11: l11 {
> > > + regulator-min-microvolt = <3300000>;
> > > + regulator-max-microvolt = <3300000>;
> > > + };
> > [..]
> > > + };
> > > +};
> > > +
> > > +&sdhc_1 {
> > > + vmmc-supply = <&pm8953_l8>;
> >
> > JFYI. Not ensuring that the vmmc-supply is in HPM mode bitten us
> > multiple times in the past.
>
> it's not rpmh ;)
>

Here are a few non-rpmh examples of us being bitten...

e38161bd325e ("arm64: dts: apq8096-db820c: Increase load on l21 for SDCARD")
03864e57770a ("ARM: dts: qcom: msm8974-hammerhead: increase load on l20 for sdhci")
27fe0fc05f35 ("ARM: dts: msm8974-FP2: Increase load on l20 for sdhci")

..taken care of by forcing the relevant regulators into HPM.

Regards,
Bjorn