diff mbox series

[3/3] arm64: dts: qcom: sdx75-idp: add SDHCI for SD Card

Message ID 20240515120958.32032-4-quic_nainmeht@quicinc.com (mailing list archive)
State Superseded
Headers show
Series Add SDHCI support for SDX75 SoC | expand

Commit Message

Naina Mehta May 15, 2024, 12:09 p.m. UTC
Enable SDHCI on sdx75-idp to support SD card.
Also add the required regulators.

Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sdx75-idp.dts | 45 ++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

--
2.17.1

Comments

Krzysztof Kozlowski May 15, 2024, 2:23 p.m. UTC | #1
On 15/05/2024 14:09, Naina Mehta wrote:
> Enable SDHCI on sdx75-idp to support SD card.
> Also add the required regulators.
> 
> Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sdx75-idp.dts | 45 ++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
> index f76e72fb2072..6f94278cf837 100644
> --- a/arch/arm64/boot/dts/qcom/sdx75-idp.dts
> +++ b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
> @@ -41,6 +41,29 @@
> 
>  		vin-supply = <&vph_ext>;
>  	};
> +
> +	vreg_sd_vccb: sd-vccb {

Please use name for all fixed regulators which matches current format
recommendation: 'regulator-[0-9]+v[0-9]+'

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git/commit/?id=b6d4b3500d57370f5b3abf0701c9166b384db976


Best regards,
Krzysztof
Naina Mehta May 16, 2024, 5:21 a.m. UTC | #2
On 5/15/2024 7:53 PM, Krzysztof Kozlowski wrote:
> On 15/05/2024 14:09, Naina Mehta wrote:
>> Enable SDHCI on sdx75-idp to support SD card.
>> Also add the required regulators.
>>
>> Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/sdx75-idp.dts | 45 ++++++++++++++++++++++++++
>>   1 file changed, 45 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>> index f76e72fb2072..6f94278cf837 100644
>> --- a/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>> +++ b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>> @@ -41,6 +41,29 @@
>>
>>   		vin-supply = <&vph_ext>;
>>   	};
>> +
>> +	vreg_sd_vccb: sd-vccb {
> 
> Please use name for all fixed regulators which matches current format
> recommendation: 'regulator-[0-9]+v[0-9]+'

Did you mean that vreg_sd_vdd should be updated according to the 
suggested format because vreg_sd_vccb is not a fixed regulator?

Thanks,
Naina

> 
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git/commit/?id=b6d4b3500d57370f5b3abf0701c9166b384db976
> 
> 
> Best regards,
> Krzysztof
>
Krzysztof Kozlowski May 17, 2024, 8:52 a.m. UTC | #3
On 16/05/2024 07:21, Naina Mehta wrote:
> 
> 
> On 5/15/2024 7:53 PM, Krzysztof Kozlowski wrote:
>> On 15/05/2024 14:09, Naina Mehta wrote:
>>> Enable SDHCI on sdx75-idp to support SD card.
>>> Also add the required regulators.
>>>
>>> Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
>>> ---
>>>   arch/arm64/boot/dts/qcom/sdx75-idp.dts | 45 ++++++++++++++++++++++++++
>>>   1 file changed, 45 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>>> index f76e72fb2072..6f94278cf837 100644
>>> --- a/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>>> @@ -41,6 +41,29 @@
>>>
>>>   		vin-supply = <&vph_ext>;
>>>   	};
>>> +
>>> +	vreg_sd_vccb: sd-vccb {
>>
>> Please use name for all fixed regulators which matches current format
>> recommendation: 'regulator-[0-9]+v[0-9]+'
> 
> Did you mean that vreg_sd_vdd should be updated according to the 
> suggested format because vreg_sd_vccb is not a fixed regulator?
> 

Yeah, it should be about sd-vdd, but then this one should be named as
well with a similar prefix to have it consistent.



Best regards,
Krzysztof
Naina Mehta May 17, 2024, 11:09 a.m. UTC | #4
On 5/17/2024 2:22 PM, Krzysztof Kozlowski wrote:
> On 16/05/2024 07:21, Naina Mehta wrote:
>>
>>
>> On 5/15/2024 7:53 PM, Krzysztof Kozlowski wrote:
>>> On 15/05/2024 14:09, Naina Mehta wrote:
>>>> Enable SDHCI on sdx75-idp to support SD card.
>>>> Also add the required regulators.
>>>>
>>>> Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
>>>> ---
>>>>    arch/arm64/boot/dts/qcom/sdx75-idp.dts | 45 ++++++++++++++++++++++++++
>>>>    1 file changed, 45 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>>>> index f76e72fb2072..6f94278cf837 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
>>>> @@ -41,6 +41,29 @@
>>>>
>>>>    		vin-supply = <&vph_ext>;
>>>>    	};
>>>> +
>>>> +	vreg_sd_vccb: sd-vccb {
>>>
>>> Please use name for all fixed regulators which matches current format
>>> recommendation: 'regulator-[0-9]+v[0-9]+'
>>
>> Did you mean that vreg_sd_vdd should be updated according to the
>> suggested format because vreg_sd_vccb is not a fixed regulator?
>>
> 
> Yeah, it should be about sd-vdd, but then this one should be named as
> well with a similar prefix to have it consistent.

Sure, I will update in next revision.

Thanks,
Naina
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdx75-idp.dts b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
index f76e72fb2072..6f94278cf837 100644
--- a/arch/arm64/boot/dts/qcom/sdx75-idp.dts
+++ b/arch/arm64/boot/dts/qcom/sdx75-idp.dts
@@ -41,6 +41,29 @@ 

 		vin-supply = <&vph_ext>;
 	};
+
+	vreg_sd_vccb: sd-vccb {
+		compatible = "regulator-gpio";
+		regulator-name = "vreg_sd_vccb";
+		regulator-min-microvolt = <1650000>;
+		regulator-max-microvolt = <3600000>;
+		enable-gpios = <&tlmm 102 GPIO_ACTIVE_HIGH>;
+		gpios = <&tlmm 84 GPIO_ACTIVE_HIGH>;
+		states = <1650000 0>, <3600000 1>;
+		startup-delay-us = <5000>;
+		enable-active-high;
+		regulator-boot-on;
+
+		vin-supply = <&vph_ext>;
+	};
+
+	vreg_sd_vdd: sd-vdd {
+		compatible = "regulator-fixed";
+		regulator-name = "vreg_sd_vdd";
+		regulator-min-microvolt = <2950000>;
+		regulator-max-microvolt = <2950000>;
+		vin-supply = <&vreg_sd_vccb>;
+	};
 };

 &apps_rsc {
@@ -259,8 +282,30 @@ 
 	status = "okay";
 };

+&sdhc {
+	cd-gpios = <&tlmm 103 GPIO_ACTIVE_LOW>;
+	vmmc-supply = <&vreg_sd_vdd>;
+	vqmmc-supply = <&vreg_sd_vccb>;
+	bus-width = <4>;
+	no-sdio;
+	no-mmc;
+
+	pinctrl-0 = <&sdc1_default &sd_cd>;
+	pinctrl-1 = <&sdc1_sleep &sd_cd>;
+	pinctrl-names = "default", "sleep";
+
+	status = "okay";
+};
+
 &tlmm {
 	gpio-reserved-ranges = <110 6>;
+
+	sd_cd: sd-cd-state {
+		pins = "gpio103";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-up;
+	};
 };

 &uart1 {