* [PATCH 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible
[not found] <20221109142623.53052-1-konrad.dybcio@linaro.org>
@ 2022-11-09 14:26 ` Konrad Dybcio
2022-11-09 14:34 ` Krzysztof Kozlowski
2022-11-09 14:26 ` [PATCH 2/3] arm64: dts: qcom: sm6375: Add SDHCI2 Konrad Dybcio
2022-11-09 14:26 ` [PATCH 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot Konrad Dybcio
2 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2022-11-09 14:26 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: patches, Konrad Dybcio, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Bhupesh Sharma, linux-mmc, devicetree,
linux-kernel
Document the compatible for SDHCI on SM6375.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
Documentation/devicetree/bindings/mmc/sdhci-msm.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
index fc8a6b345d97..12def0f57e3e 100644
--- a/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
+++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.yaml
@@ -46,6 +46,7 @@ properties:
- qcom,sm6115-sdhci
- qcom,sm6125-sdhci
- qcom,sm6350-sdhci
+ - qcom,sm6375-sdhci
- qcom,sm8150-sdhci
- qcom,sm8250-sdhci
- qcom,sm8450-sdhci
--
2.38.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible
2022-11-09 14:26 ` [PATCH 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible Konrad Dybcio
@ 2022-11-09 14:34 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-09 14:34 UTC (permalink / raw)
To: Konrad Dybcio, linux-arm-msm, andersson, agross
Cc: patches, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Bhupesh Sharma, linux-mmc, devicetree, linux-kernel
On 09/11/2022 15:26, Konrad Dybcio wrote:
> Document the compatible for SDHCI on SM6375.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] arm64: dts: qcom: sm6375: Add SDHCI2
[not found] <20221109142623.53052-1-konrad.dybcio@linaro.org>
2022-11-09 14:26 ` [PATCH 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible Konrad Dybcio
@ 2022-11-09 14:26 ` Konrad Dybcio
2022-11-09 14:35 ` Krzysztof Kozlowski
2022-11-09 14:26 ` [PATCH 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot Konrad Dybcio
2 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2022-11-09 14:26 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: patches, Konrad Dybcio, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, devicetree, linux-kernel
Configure the second SDHCI bus controller, which usually the
interface used for SD cards.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6375.dtsi | 82 ++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
index 6adffd927a8e..483202e60cd7 100644
--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
@@ -540,6 +540,46 @@ tlmm: pinctrl@500000 {
#interrupt-cells = <2>;
#gpio-cells = <2>;
+ sdc2_off_state: sdc2-off-state {
+ clk-pins {
+ pins = "sdc2_clk";
+ drive-strength = <2>;
+ bias-disable;
+ };
+
+ cmd-pins {
+ pins = "sdc2_cmd";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+
+ data-pins {
+ pins = "sdc2_data";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+ };
+
+ sdc2_on_state: sdc2-on-state {
+ clk-pins {
+ pins = "sdc2_clk";
+ drive-strength = <16>;
+ bias-disable;
+ };
+
+ cmd-pins {
+ pins = "sdc2_cmd";
+ drive-strength = <10>;
+ bias-pull-up;
+ };
+
+ data-pins {
+ pins = "sdc2_data";
+ drive-strength = <10>;
+ bias-pull-up;
+ };
+ };
+
qup_i2c0_default: qup-i2c0-default-state {
pins = "gpio0", "gpio1";
function = "qup00";
@@ -630,6 +670,48 @@ rpm_msg_ram: sram@45f0000 {
reg = <0 0x045f0000 0 0x7000>;
};
+ sdhc_2: sdhci@4784000 {
+ compatible = "qcom,sm6375-sdhci", "qcom,sdhci-msm-v5";
+ reg = <0 0x04784000 0 0x1000>;
+
+ interrupts = <GIC_SPI 350 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 353 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hc_irq", "pwr_irq";
+
+ clocks = <&gcc GCC_SDCC2_AHB_CLK>,
+ <&gcc GCC_SDCC2_APPS_CLK>,
+ <&rpmcc RPM_SMD_XO_CLK_SRC>;
+ clock-names = "iface", "core", "xo";
+ resets = <&gcc GCC_SDCC2_BCR>;
+ iommus = <&apps_smmu 0x40 0x0>;
+
+ pinctrl-0 = <&sdc2_on_state>;
+ pinctrl-1 = <&sdc2_off_state>;
+ pinctrl-names = "default", "sleep";
+
+ qcom,dll-config = <0x0007642c>;
+ qcom,ddr-config = <0x80040868>;
+ power-domains = <&rpmpd SM6375_VDDCX>;
+ operating-points-v2 = <&sdhc2_opp_table>;
+ bus-width = <4>;
+
+ status = "disabled";
+
+ sdhc2_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-100000000 {
+ opp-hz = /bits/ 64 <100000000>;
+ required-opps = <&rpmpd_opp_low_svs>;
+ };
+
+ opp-202000000 {
+ opp-hz = /bits/ 64 <202000000>;
+ required-opps = <&rpmpd_opp_svs_plus>;
+ };
+ };
+ };
+
gpi_dma0: dma-controller@4a00000 {
compatible = "qcom,sm6375-gpi-dma", "qcom,sm6350-gpi-dma";
reg = <0 0x04a00000 0 0x60000>;
--
2.38.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 2/3] arm64: dts: qcom: sm6375: Add SDHCI2
2022-11-09 14:26 ` [PATCH 2/3] arm64: dts: qcom: sm6375: Add SDHCI2 Konrad Dybcio
@ 2022-11-09 14:35 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-09 14:35 UTC (permalink / raw)
To: Konrad Dybcio, linux-arm-msm, andersson, agross
Cc: patches, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
devicetree, linux-kernel
On 09/11/2022 15:26, Konrad Dybcio wrote:
> Configure the second SDHCI bus controller, which usually the
> interface used for SD cards.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sm6375.dtsi | 82 ++++++++++++++++++++++++++++
> 1 file changed, 82 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6375.dtsi b/arch/arm64/boot/dts/qcom/sm6375.dtsi
> index 6adffd927a8e..483202e60cd7 100644
> --- a/arch/arm64/boot/dts/qcom/sm6375.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi
> @@ -540,6 +540,46 @@ tlmm: pinctrl@500000 {
> #interrupt-cells = <2>;
> #gpio-cells = <2>;
>
> + sdc2_off_state: sdc2-off-state {
> + clk-pins {
> + pins = "sdc2_clk";
> + drive-strength = <2>;
> + bias-disable;
> + };
> +
> + cmd-pins {
> + pins = "sdc2_cmd";
> + drive-strength = <2>;
> + bias-pull-up;
> + };
> +
> + data-pins {
> + pins = "sdc2_data";
> + drive-strength = <2>;
> + bias-pull-up;
> + };
> + };
> +
> + sdc2_on_state: sdc2-on-state {
> + clk-pins {
> + pins = "sdc2_clk";
> + drive-strength = <16>;
> + bias-disable;
> + };
> +
> + cmd-pins {
> + pins = "sdc2_cmd";
> + drive-strength = <10>;
> + bias-pull-up;
> + };
> +
> + data-pins {
> + pins = "sdc2_data";
> + drive-strength = <10>;
> + bias-pull-up;
> + };
> + };
> +
> qup_i2c0_default: qup-i2c0-default-state {
> pins = "gpio0", "gpio1";
> function = "qup00";
> @@ -630,6 +670,48 @@ rpm_msg_ram: sram@45f0000 {
> reg = <0 0x045f0000 0 0x7000>;
> };
>
> + sdhc_2: sdhci@4784000 {
Node name: mmc
> + compatible = "qcom,sm6375-sdhci", "qcom,sdhci-msm-v5";
> + reg = <0 0x04784000 0 0x1000>;
> +
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot
[not found] <20221109142623.53052-1-konrad.dybcio@linaro.org>
2022-11-09 14:26 ` [PATCH 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible Konrad Dybcio
2022-11-09 14:26 ` [PATCH 2/3] arm64: dts: qcom: sm6375: Add SDHCI2 Konrad Dybcio
@ 2022-11-09 14:26 ` Konrad Dybcio
2022-11-09 14:36 ` Krzysztof Kozlowski
2 siblings, 1 reply; 6+ messages in thread
From: Konrad Dybcio @ 2022-11-09 14:26 UTC (permalink / raw)
To: linux-arm-msm, andersson, agross, krzysztof.kozlowski
Cc: patches, Konrad Dybcio, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, devicetree, linux-kernel
Set SDHCI VMMC/VQMMC to <=2v96 and allow load setting by the SDHCI
driver, as required by this use case.
Configure the SD Card Detect pin, enable the SDHCI2 controller and
assign it the aforementioned regulators.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
.../qcom/sm6375-sony-xperia-murray-pdx225.dts | 34 +++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
index 33083f18755b..c4181476f3b8 100644
--- a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
+++ b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
@@ -153,7 +153,8 @@ pm6125_l4: l4 {
pm6125_l5: l5 {
regulator-min-microvolt = <1650000>;
- regulator-max-microvolt = <3050000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-allow-set-load;
};
pm6125_l6: l6 {
@@ -235,7 +236,8 @@ pm6125_l21: l21 {
pm6125_l22: l22 {
regulator-min-microvolt = <2704000>;
- regulator-max-microvolt = <3544000>;
+ regulator-max-microvolt = <2960000>;
+ regulator-allow-set-load;
};
pm6125_l23: l23 {
@@ -302,6 +304,34 @@ &qupv3_id_1 {
status = "okay";
};
+&sdc2_off_state {
+ sd-cd-pins {
+ pins = "gpio94";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-disable;
+ };
+};
+
+&sdc2_on_state {
+ sd-cd-pins {
+ pins = "gpio94";
+ function = "gpio";
+ drive-strength = <2>;
+ bias-pull-up;
+ };
+};
+
+&sdhc_2 {
+ status = "okay";
+
+ vmmc-supply = <&pm6125_l22>;
+ vqmmc-supply = <&pm6125_l5>;
+
+ cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
+};
+
+
&tlmm {
gpio-reserved-ranges = <13 4>;
--
2.38.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot
2022-11-09 14:26 ` [PATCH 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot Konrad Dybcio
@ 2022-11-09 14:36 ` Krzysztof Kozlowski
0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-09 14:36 UTC (permalink / raw)
To: Konrad Dybcio, linux-arm-msm, andersson, agross
Cc: patches, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
devicetree, linux-kernel
On 09/11/2022 15:26, Konrad Dybcio wrote:
> Set SDHCI VMMC/VQMMC to <=2v96 and allow load setting by the SDHCI
> driver, as required by this use case.
>
> Configure the SD Card Detect pin, enable the SDHCI2 controller and
> assign it the aforementioned regulators.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
> .../qcom/sm6375-sony-xperia-murray-pdx225.dts | 34 +++++++++++++++++--
> 1 file changed, 32 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
> index 33083f18755b..c4181476f3b8 100644
> --- a/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6375-sony-xperia-murray-pdx225.dts
> @@ -153,7 +153,8 @@ pm6125_l4: l4 {
>
> pm6125_l5: l5 {
> regulator-min-microvolt = <1650000>;
> - regulator-max-microvolt = <3050000>;
> + regulator-max-microvolt = <2960000>;
> + regulator-allow-set-load;
> };
>
> pm6125_l6: l6 {
> @@ -235,7 +236,8 @@ pm6125_l21: l21 {
>
> pm6125_l22: l22 {
> regulator-min-microvolt = <2704000>;
> - regulator-max-microvolt = <3544000>;
> + regulator-max-microvolt = <2960000>;
> + regulator-allow-set-load;
> };
>
> pm6125_l23: l23 {
> @@ -302,6 +304,34 @@ &qupv3_id_1 {
> status = "okay";
> };
>
> +&sdc2_off_state {
> + sd-cd-pins {
> + pins = "gpio94";
> + function = "gpio";
> + drive-strength = <2>;
> + bias-disable;
> + };
> +};
> +
> +&sdc2_on_state {
> + sd-cd-pins {
> + pins = "gpio94";
> + function = "gpio";
> + drive-strength = <2>;
> + bias-pull-up;
> + };
> +};
> +
> +&sdhc_2 {
> + status = "okay";
> +
> + vmmc-supply = <&pm6125_l22>;
> + vqmmc-supply = <&pm6125_l5>;
> +
> + cd-gpios = <&tlmm 94 GPIO_ACTIVE_HIGH>;
> +};
> +
> +
Just one blank line.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 6+ messages in thread