devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible
       [not found] <20221109144153.53630-1-konrad.dybcio@linaro.org>
@ 2022-11-09 14:41 ` Konrad Dybcio
  2022-11-09 14:41 ` [PATCH v2 2/3] arm64: dts: qcom: sm6375: Add SDHCI2 Konrad Dybcio
  2022-11-09 14:41 ` [PATCH v2 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot Konrad Dybcio
  2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2022-11-09 14:41 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>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v1:
- Pick up r-b

 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] 4+ messages in thread

* [PATCH v2 2/3] arm64: dts: qcom: sm6375: Add SDHCI2
       [not found] <20221109144153.53630-1-konrad.dybcio@linaro.org>
  2022-11-09 14:41 ` [PATCH v2 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible Konrad Dybcio
@ 2022-11-09 14:41 ` Konrad Dybcio
  2022-11-10 14:09   ` Krzysztof Kozlowski
  2022-11-09 14:41 ` [PATCH v2 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot Konrad Dybcio
  2 siblings, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2022-11-09 14:41 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>
---
Changes since v1:
- use mmc@ node name instead of sdhci@

 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..08587c8681b2 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: mmc@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] 4+ messages in thread

* [PATCH v2 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot
       [not found] <20221109144153.53630-1-konrad.dybcio@linaro.org>
  2022-11-09 14:41 ` [PATCH v2 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible Konrad Dybcio
  2022-11-09 14:41 ` [PATCH v2 2/3] arm64: dts: qcom: sm6375: Add SDHCI2 Konrad Dybcio
@ 2022-11-09 14:41 ` Konrad Dybcio
  2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2022-11-09 14:41 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>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
Changes since v1:
- remove stray newline
- pick up r-b

 .../qcom/sm6375-sony-xperia-murray-pdx225.dts | 33 +++++++++++++++++--
 1 file changed, 31 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..7cf71b8bcac5 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,33 @@ &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] 4+ messages in thread

* Re: [PATCH v2 2/3] arm64: dts: qcom: sm6375: Add SDHCI2
  2022-11-09 14:41 ` [PATCH v2 2/3] arm64: dts: qcom: sm6375: Add SDHCI2 Konrad Dybcio
@ 2022-11-10 14:09   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-10 14:09 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:41, 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>
> ---
> Changes since v1:
> - use mmc@ node name instead of sdhci@


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-10 14:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20221109144153.53630-1-konrad.dybcio@linaro.org>
2022-11-09 14:41 ` [PATCH v2 1/3] dt-bindings: mmc: sdhci-msm: Document the SM6375 compatible Konrad Dybcio
2022-11-09 14:41 ` [PATCH v2 2/3] arm64: dts: qcom: sm6375: Add SDHCI2 Konrad Dybcio
2022-11-10 14:09   ` Krzysztof Kozlowski
2022-11-09 14:41 ` [PATCH v2 3/3] arm64: dts: qcom: sm6375-pdx225: Enable SD card slot Konrad Dybcio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).