Re: [PATCH 1/1] arm64: dts: qcom: Add Lenovo Yoga C630

2019-09-02 Thread Lee Jones
On Tue, 03 Sep 2019, Lee Jones wrote:

> On Mon, 02 Sep 2019, Bjorn Andersson wrote:
> 
> > On Mon 02 Sep 06:24 PDT 2019, Lee Jones wrote:
> > 
> > > From: Bjorn Andersson 
> > > 
> > > The Lenovo Yoga C630 is built on the SDM850 from Qualcomm, but this seem
> > > to be similar enough to the SDM845 that we can reuse the sdm845.dtsi.
> > > 
> > > Supported by this patch is: keyboard, battery monitoring, UFS storage,
> > > USB host and Bluetooth.
> > 
> > Applied this to next-20190829 and booted it, got a little bit of EFI FB,
> > then the screen goes blank and after a while I'm back in GRUB.
> > 
> > I've not been able to figure out what's causing this though.
> 
> Probably DMA.  There is still an issue in the COM GENI Serial Engine
> Driver which reboots the system when a DMA transaction is initiated.
> 
> However, with a workaround patch applied to the Serial Engine driver
> (drivers/soc/qcom/qcom-geni-se.c) this DTS has no issue booting the
> system.
> 
> We have ~12 weeks to either fix or elegantly work around the Serial
> Engine issue.  IMHO is makes no sense to hold back this enablement
> patch (which cannot go in via the -rcs) for something which is likely
> to be fixed and applied during v3.4-rcX.

NB: If you're worried about other entities thinking the platform boots
fault free due to this DTS patch being applied, I would suggest we
place a little "NB:" note in the changelog to explain the situation.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 1/1] arm64: dts: qcom: Add Lenovo Yoga C630

2019-09-02 Thread Lee Jones
On Mon, 02 Sep 2019, Bjorn Andersson wrote:

> On Mon 02 Sep 06:24 PDT 2019, Lee Jones wrote:
> 
> > From: Bjorn Andersson 
> > 
> > The Lenovo Yoga C630 is built on the SDM850 from Qualcomm, but this seem
> > to be similar enough to the SDM845 that we can reuse the sdm845.dtsi.
> > 
> > Supported by this patch is: keyboard, battery monitoring, UFS storage,
> > USB host and Bluetooth.
> 
> Applied this to next-20190829 and booted it, got a little bit of EFI FB,
> then the screen goes blank and after a while I'm back in GRUB.
> 
> I've not been able to figure out what's causing this though.

Probably DMA.  There is still an issue in the COM GENI Serial Engine
Driver which reboots the system when a DMA transaction is initiated.

However, with a workaround patch applied to the Serial Engine driver
(drivers/soc/qcom/qcom-geni-se.c) this DTS has no issue booting the
system.

We have ~12 weeks to either fix or elegantly work around the Serial
Engine issue.  IMHO is makes no sense to hold back this enablement
patch (which cannot go in via the -rcs) for something which is likely
to be fixed and applied during v3.4-rcX.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 1/1] arm64: dts: qcom: Add Lenovo Yoga C630

2019-09-02 Thread Bjorn Andersson
On Mon 02 Sep 06:24 PDT 2019, Lee Jones wrote:

> From: Bjorn Andersson 
> 
> The Lenovo Yoga C630 is built on the SDM850 from Qualcomm, but this seem
> to be similar enough to the SDM845 that we can reuse the sdm845.dtsi.
> 
> Supported by this patch is: keyboard, battery monitoring, UFS storage,
> USB host and Bluetooth.

Applied this to next-20190829 and booted it, got a little bit of EFI FB,
then the screen goes blank and after a while I'm back in GRUB.

I've not been able to figure out what's causing this though.

Regards,
Bjorn

> 
> Signed-off-by: Bjorn Andersson 
> Signed-off-by: Lee Jones 
> ---
>  arch/arm64/boot/dts/qcom/Makefile |   1 +
>  .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 450 ++
>  2 files changed, 451 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile 
> b/arch/arm64/boot/dts/qcom/Makefile
> index 0a7e5dfce6f7..670c6c65f9e9 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -12,5 +12,6 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r2.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sdm845-cheza-r3.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sdm845-db845c.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += sdm845-mtp.dtb
> +dtb-$(CONFIG_ARCH_QCOM)  += sdm850-lenovo-yoga-c630.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += qcs404-evb-1000.dtb
>  dtb-$(CONFIG_ARCH_QCOM)  += qcs404-evb-4000.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts 
> b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> new file mode 100644
> index ..3177b054035f
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
> @@ -0,0 +1,450 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Lenovo Yoga C630
> + *
> + * Copyright (c) 2019, Linaro Ltd.
> + */
> +
> +/dts-v1/;
> +
> +#include 
> +#include "sdm845.dtsi"
> +#include "pm8998.dtsi"
> +
> +/ {
> + model = "Lenovo Yoga C630";
> + compatible = "lenovo,yoga-c630", "qcom,sdm845";
> +
> + aliases {
> + hsuart0 = &uart6;
> + };
> +};
> +
> +&apps_rsc {
> + pm8998-rpmh-regulators {
> + compatible = "qcom,pm8998-rpmh-regulators";
> + qcom,pmic-id = "a";
> +
> + vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
> + vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
> +
> + vreg_s2a_1p125: smps2 {
> + };
> +
> + vreg_s3a_1p35: smps3 {
> + regulator-min-microvolt = <1352000>;
> + regulator-max-microvolt = <1352000>;
> + regulator-initial-mode = ;
> + };
> +
> + vreg_s4a_1p8: smps4 {
> + regulator-min-microvolt = <180>;
> + regulator-max-microvolt = <180>;
> + regulator-initial-mode = ;
> + };
> +
> + vreg_s5a_2p04: smps5 {
> + regulator-min-microvolt = <204>;
> + regulator-max-microvolt = <204>;
> + regulator-initial-mode = ;
> + };
> +
> + vreg_s7a_1p025: smps7 {
> + };
> +
> + vdd_qusb_hs0:
> + vdda_hp_pcie_core:
> + vdda_mipi_csi0_0p9:
> + vdda_mipi_csi1_0p9:
> + vdda_mipi_csi2_0p9:
> + vdda_mipi_dsi0_pll:
> + vdda_mipi_dsi1_pll:
> + vdda_qlink_lv:
> + vdda_qlink_lv_ck:
> + vdda_qrefs_0p875:
> + vdda_pcie_core:
> + vdda_pll_cc_ebi01:
> + vdda_pll_cc_ebi23:
> + vdda_sp_sensor:
> + vdda_ufs1_core:
> + vdda_ufs2_core:
> + vdda_usb1_ss_core:
> + vdda_usb2_ss_core:
> + vreg_l1a_0p875: ldo1 {
> + regulator-min-microvolt = <88>;
> + regulator-max-microvolt = <88>;
> + regulator-initial-mode = ;
> + };
> +
> + vddpx_10:
> + vreg_l2a_1p2: ldo2 {
> + regulator-min-microvolt = <120>;
> + regulator-max-microvolt = <120>;
> + regulator-initial-mode = ;
> + regulator-always-on;
> + };
> +
> + vreg_l3a_1p0: ldo3 {
> + };
> +
> + vdd_wcss_cx:
> + vdd_wcss_mx:
> + vdda_wcss_pll:
> + vreg_l5a_0p8: ldo5 {
> + regulator-min-microvolt = <80>;
> + regulator-max-microvolt = <80>;
> + regulator-initial-mode = ;
> + };
> +
> + vddpx_13:
> + vreg_l6a_1p8: ldo6 {
> + regulator-min-microvolt = <180>;
> + regulator-max-microvolt = <180>;
> + regulator-initial-m

[PATCH 1/1] arm64: dts: qcom: Add Lenovo Yoga C630

2019-09-02 Thread Lee Jones
From: Bjorn Andersson 

The Lenovo Yoga C630 is built on the SDM850 from Qualcomm, but this seem
to be similar enough to the SDM845 that we can reuse the sdm845.dtsi.

Supported by this patch is: keyboard, battery monitoring, UFS storage,
USB host and Bluetooth.

Signed-off-by: Bjorn Andersson 
Signed-off-by: Lee Jones 
---
 arch/arm64/boot/dts/qcom/Makefile |   1 +
 .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 450 ++
 2 files changed, 451 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile 
b/arch/arm64/boot/dts/qcom/Makefile
index 0a7e5dfce6f7..670c6c65f9e9 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -12,5 +12,6 @@ dtb-$(CONFIG_ARCH_QCOM)   += sdm845-cheza-r2.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sdm845-cheza-r3.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sdm845-db845c.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= sdm845-mtp.dtb
+dtb-$(CONFIG_ARCH_QCOM)+= sdm850-lenovo-yoga-c630.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= qcs404-evb-1000.dtb
 dtb-$(CONFIG_ARCH_QCOM)+= qcs404-evb-4000.dtb
diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts 
b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
new file mode 100644
index ..3177b054035f
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts
@@ -0,0 +1,450 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Lenovo Yoga C630
+ *
+ * Copyright (c) 2019, Linaro Ltd.
+ */
+
+/dts-v1/;
+
+#include 
+#include "sdm845.dtsi"
+#include "pm8998.dtsi"
+
+/ {
+   model = "Lenovo Yoga C630";
+   compatible = "lenovo,yoga-c630", "qcom,sdm845";
+
+   aliases {
+   hsuart0 = &uart6;
+   };
+};
+
+&apps_rsc {
+   pm8998-rpmh-regulators {
+   compatible = "qcom,pm8998-rpmh-regulators";
+   qcom,pmic-id = "a";
+
+   vdd-l2-l8-l17-supply = <&vreg_s3a_1p35>;
+   vdd-l7-l12-l14-l15-supply = <&vreg_s5a_2p04>;
+
+   vreg_s2a_1p125: smps2 {
+   };
+
+   vreg_s3a_1p35: smps3 {
+   regulator-min-microvolt = <1352000>;
+   regulator-max-microvolt = <1352000>;
+   regulator-initial-mode = ;
+   };
+
+   vreg_s4a_1p8: smps4 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-initial-mode = ;
+   };
+
+   vreg_s5a_2p04: smps5 {
+   regulator-min-microvolt = <204>;
+   regulator-max-microvolt = <204>;
+   regulator-initial-mode = ;
+   };
+
+   vreg_s7a_1p025: smps7 {
+   };
+
+   vdd_qusb_hs0:
+   vdda_hp_pcie_core:
+   vdda_mipi_csi0_0p9:
+   vdda_mipi_csi1_0p9:
+   vdda_mipi_csi2_0p9:
+   vdda_mipi_dsi0_pll:
+   vdda_mipi_dsi1_pll:
+   vdda_qlink_lv:
+   vdda_qlink_lv_ck:
+   vdda_qrefs_0p875:
+   vdda_pcie_core:
+   vdda_pll_cc_ebi01:
+   vdda_pll_cc_ebi23:
+   vdda_sp_sensor:
+   vdda_ufs1_core:
+   vdda_ufs2_core:
+   vdda_usb1_ss_core:
+   vdda_usb2_ss_core:
+   vreg_l1a_0p875: ldo1 {
+   regulator-min-microvolt = <88>;
+   regulator-max-microvolt = <88>;
+   regulator-initial-mode = ;
+   };
+
+   vddpx_10:
+   vreg_l2a_1p2: ldo2 {
+   regulator-min-microvolt = <120>;
+   regulator-max-microvolt = <120>;
+   regulator-initial-mode = ;
+   regulator-always-on;
+   };
+
+   vreg_l3a_1p0: ldo3 {
+   };
+
+   vdd_wcss_cx:
+   vdd_wcss_mx:
+   vdda_wcss_pll:
+   vreg_l5a_0p8: ldo5 {
+   regulator-min-microvolt = <80>;
+   regulator-max-microvolt = <80>;
+   regulator-initial-mode = ;
+   };
+
+   vddpx_13:
+   vreg_l6a_1p8: ldo6 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-initial-mode = ;
+   };
+
+   vreg_l7a_1p8: ldo7 {
+   regulator-min-microvolt = <180>;
+   regulator-max-microvolt = <180>;
+   regulator-initial-mode = ;
+   };
+
+   vreg_l8a_1p2: ldo8 {
+   };
+
+   vreg_l9a_1p8: ldo9 {
+   };
+
+