mbox series

[00/10] arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213

Message ID 20221030073232.22726-1-marijn.suijten@somainline.org
Headers show
Series arm64: dts: qcom: sm6350: SD Card fixes, pm6350 keys and touchscreen for PDX213 | expand

Message

Marijn Suijten Oct. 30, 2022, 7:32 a.m. UTC
Enable SD Card for Sony Lena PDX213 on the sm6350 SoC by providing it
the necessary IOMMU stream ID(s) and pinctrl in SoC dtsi, and setting up
the regulators in device/board DT.  Together with regulator support,
power up the touchscreen and import pm6350 dtsi to enable the power and
volume up/down keys.

Marijn Suijten (10):
  arm64: dts: qcom: sm6350: Add resets for SDHCI 1/2
  arm64: dts: qcom: sm6350: Add pinctrl for SDHCI 2
  arm64: dts: qcom: sm6350-lena: Add SD Card Detect to sdc2 on/off
    pinctrl
  arm64: dts: qcom: pm6350: Include header for KEY_POWER
  arm64: dts: qcom: sm6350-lena: Include pm6350 and configure buttons
  arm64: dts: qcom: sm6350-lena: Define pm6350 and pm6150l regulators
  arm64: dts: qcom: sm6350-lena: Provide power to SDHCI 2 (SDCard slot)
  arm64: dts: qcom: sm6350-lena: Enable QUP and GPI DMA
  arm64: dts: qcom: sm6350-lena: Configure Samsung touchscreen
  arm64: dts: qcom: sm6350: Add apps_smmu with streamID to SDHCI 1/2
    nodes

 arch/arm64/boot/dts/qcom/pm6350.dtsi          |   1 +
 .../qcom/sm6350-sony-xperia-lena-pdx213.dts   | 337 ++++++++++++++++++
 arch/arm64/boot/dts/qcom/sm6350.dtsi          |  48 +++
 3 files changed, 386 insertions(+)

--
2.38.1

Comments

Luca Weiss Oct. 31, 2022, 8:58 a.m. UTC | #1
On Sun Oct 30, 2022 at 8:32 AM CET, Marijn Suijten wrote:
> When enabling the APPS SMMU the mainline driver reconfigures the SMMU
> from its bootloader configuration, loosing the stream mapping for (among
> which) the SDHCI hardware and breaking its ADMA feature.  This feature
> can be disabled with:
>
>     sdhci.debug_quirks=0x40
>
> But it is of course desired to have this feature enabled and working
> through the SMMU.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>

Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Tested-by: Luca Weiss <luca.weiss@fairphone.com> # sm7225-fairphone-fp4

Regards
Luca

> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index b98b881ebe7e..c309a359ded9 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -485,6 +485,7 @@ sdhc_1: mmc@7c4000 {
>  			interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x60 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
>  				 <&gcc GCC_SDCC1_APPS_CLK>,
> @@ -1064,6 +1065,7 @@ sdhc_2: mmc@8804000 {
>  			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x560 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
>  				 <&gcc GCC_SDCC2_APPS_CLK>,
> -- 
> 2.38.1
Konrad Dybcio Oct. 31, 2022, 9:12 p.m. UTC | #2
On 30.10.2022 08:32, Marijn Suijten wrote:
> Make pm6350.dtsi self-contained by including input.h, needed for the
> KEY_POWER constant used to define the power key.
> 
> Fixes: d8a3c775d7cd ("arm64: dts: qcom: Add PM6350 PMIC")
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  arch/arm64/boot/dts/qcom/pm6350.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/pm6350.dtsi b/arch/arm64/boot/dts/qcom/pm6350.dtsi
> index 18c14257e2c1..111f4c1c56ae 100644
> --- a/arch/arm64/boot/dts/qcom/pm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pm6350.dtsi
> @@ -3,6 +3,7 @@
>   * Copyright (c) 2021, Luca Weiss <luca@z3ntu.xyz>
>   */
>  
> +#include <dt-bindings/input/input.h>
>  #include <dt-bindings/spmi/spmi.h>
>  
>  &spmi_bus {
Konrad Dybcio Oct. 31, 2022, 9:15 p.m. UTC | #3
On 30.10.2022 08:32, Marijn Suijten wrote:
> When enabling the APPS SMMU the mainline driver reconfigures the SMMU
> from its bootloader configuration, loosing the stream mapping for (among
> which) the SDHCI hardware and breaking its ADMA feature.  This feature
> can be disabled with:
> 
>     sdhci.debug_quirks=0x40
> 
> But it is of course desired to have this feature enabled and working
> through the SMMU.
> 
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>

Konrad
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index b98b881ebe7e..c309a359ded9 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -485,6 +485,7 @@ sdhc_1: mmc@7c4000 {
>  			interrupts = <GIC_SPI 641 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 644 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x60 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC1_AHB_CLK>,
>  				 <&gcc GCC_SDCC1_APPS_CLK>,
> @@ -1064,6 +1065,7 @@ sdhc_2: mmc@8804000 {
>  			interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_HIGH>,
>  				     <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>;
>  			interrupt-names = "hc_irq", "pwr_irq";
> +			iommus = <&apps_smmu 0x560 0x0>;
>  
>  			clocks = <&gcc GCC_SDCC2_AHB_CLK>,
>  				 <&gcc GCC_SDCC2_APPS_CLK>,