Enable UFS internal storage of the Samsung Galaxy S22.
Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
.../boot/dts/qcom/sm8450-samsung-r0q.dts | 39 +++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
index c088f1acf6ea..0a55ce952f93 100644
--- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
+++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
@@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
regulator-max-microvolt = <888000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
+
+ vreg_l6b_1p2: ldo6 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l7b_2p5: ldo7 {
+ regulator-min-microvolt = <2504000>;
+ regulator-max-microvolt = <2504000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
+
+ vreg_l9b_1p2: ldo9 {
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ };
};
regulators-1 {
@@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
};
};
+&ufs_mem_hc {
+ reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+
+ vcc-supply = <&vreg_l7b_2p5>;
+ vcc-max-microamp = <1100000>;
+ vccq-supply = <&vreg_l9b_1p2>;
+ vccq-max-microamp = <1200000>;
+ vccq2-supply = <&vreg_l9b_1p2>;
+ vccq2-max-microamp = <1200000>;
+ vdd-hba-supply = <&vreg_l9b_1p2>;
+
+ status = "okay";
+};
+
+&ufs_mem_phy {
+ vdda-phy-supply = <&vreg_l5b_0p88>;
+ vdda-pll-supply = <&vreg_l6b_1p2>;
+
+ status = "okay";
+};
+
&usb_1 {
/* Keep USB 2.0 only for now */
qcom,select-utmi-as-pipe-clk;
--
2.51.0
On 9/20/25 3:46 AM, Eric Gonçalves wrote:
> Enable UFS internal storage of the Samsung Galaxy S22.
>
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
> .../boot/dts/qcom/sm8450-samsung-r0q.dts | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> index c088f1acf6ea..0a55ce952f93 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
> regulator-max-microvolt = <888000>;
> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> };
> +
> + vreg_l6b_1p2: ldo6 {
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1200000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l7b_2p5: ldo7 {
> + regulator-min-microvolt = <2504000>;
> + regulator-max-microvolt = <2504000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> +
> + vreg_l9b_1p2: ldo9 {
> + regulator-min-microvolt = <1200000>;
> + regulator-max-microvolt = <1200000>;
> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
> + };
> };
>
> regulators-1 {
> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
> };
> };
>
> +&ufs_mem_hc {
> + reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
> +
> + vcc-supply = <&vreg_l7b_2p5>;
> + vcc-max-microamp = <1100000>;
because you set this, you should also set regulator-allow-set-mode and
regulator-allowed-modes
Konrad
On September 25, 2025 10:07:31 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>> Enable UFS internal storage of the Samsung Galaxy S22.
>>
>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> ---
>> .../boot/dts/qcom/sm8450-samsung-r0q.dts | 39 +++++++++++++++++++
>> 1 file changed, 39 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> index c088f1acf6ea..0a55ce952f93 100644
>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
>> regulator-max-microvolt = <888000>;
>> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>> };
>> +
>> + vreg_l6b_1p2: ldo6 {
>> + regulator-min-microvolt = <1200000>;
>> + regulator-max-microvolt = <1200000>;
>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>> + };
>> +
>> + vreg_l7b_2p5: ldo7 {
>> + regulator-min-microvolt = <2504000>;
>> + regulator-max-microvolt = <2504000>;
>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>> + };
>> +
>> + vreg_l9b_1p2: ldo9 {
>> + regulator-min-microvolt = <1200000>;
>> + regulator-max-microvolt = <1200000>;
>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>> + };
>> };
>>
>> regulators-1 {
>> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
>> };
>> };
>>
>> +&ufs_mem_hc {
>> + reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
>> +
>> + vcc-supply = <&vreg_l7b_2p5>;
>> + vcc-max-microamp = <1100000>;
>
>because you set this, you should also set regulator-allow-set-mode and
>regulator-allowed-modes
>
>Konrad
Why is that necessary?
On 9/25/25 11:37 PM, Eric Gonçalves wrote:
>
>
> On September 25, 2025 10:07:31 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>> Enable UFS internal storage of the Samsung Galaxy S22.
>>>
>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>> ---
>>> .../boot/dts/qcom/sm8450-samsung-r0q.dts | 39 +++++++++++++++++++
>>> 1 file changed, 39 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> index c088f1acf6ea..0a55ce952f93 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
>>> regulator-max-microvolt = <888000>;
>>> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>> };
>>> +
>>> + vreg_l6b_1p2: ldo6 {
>>> + regulator-min-microvolt = <1200000>;
>>> + regulator-max-microvolt = <1200000>;
>>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>> + };
>>> +
>>> + vreg_l7b_2p5: ldo7 {
>>> + regulator-min-microvolt = <2504000>;
>>> + regulator-max-microvolt = <2504000>;
>>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>> + };
>>> +
>>> + vreg_l9b_1p2: ldo9 {
>>> + regulator-min-microvolt = <1200000>;
>>> + regulator-max-microvolt = <1200000>;
>>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>> + };
>>> };
>>>
>>> regulators-1 {
>>> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
>>> };
>>> };
>>>
>>> +&ufs_mem_hc {
>>> + reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
>>> +
>>> + vcc-supply = <&vreg_l7b_2p5>;
>>> + vcc-max-microamp = <1100000>;
>>
>> because you set this, you should also set regulator-allow-set-mode and
>> regulator-allowed-modes
>>
>> Konrad
> Why is that necessary?
Because that is then translated into the mode selection, based on
the aggregated usage
That said, you may also choose to omit this if you want to run all
regulators at high-power mode (less efficient at idle), which forcefully
ensures you're not hitting any current limits
Konrad
On October 6, 2025 9:08:54 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>On 9/25/25 11:37 PM, Eric Gonçalves wrote:
>>
>>
>> On September 25, 2025 10:07:31 AM GMT-03:00, Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> wrote:
>>> On 9/20/25 3:46 AM, Eric Gonçalves wrote:
>>>> Enable UFS internal storage of the Samsung Galaxy S22.
>>>>
>>>> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>>>> ---
>>>> .../boot/dts/qcom/sm8450-samsung-r0q.dts | 39 +++++++++++++++++++
>>>> 1 file changed, 39 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> index c088f1acf6ea..0a55ce952f93 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> +++ b/arch/arm64/boot/dts/qcom/sm8450-samsung-r0q.dts
>>>> @@ -146,6 +146,24 @@ vreg_l5b_0p88: ldo5 {
>>>> regulator-max-microvolt = <888000>;
>>>> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>> };
>>>> +
>>>> + vreg_l6b_1p2: ldo6 {
>>>> + regulator-min-microvolt = <1200000>;
>>>> + regulator-max-microvolt = <1200000>;
>>>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>> + };
>>>> +
>>>> + vreg_l7b_2p5: ldo7 {
>>>> + regulator-min-microvolt = <2504000>;
>>>> + regulator-max-microvolt = <2504000>;
>>>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>> + };
>>>> +
>>>> + vreg_l9b_1p2: ldo9 {
>>>> + regulator-min-microvolt = <1200000>;
>>>> + regulator-max-microvolt = <1200000>;
>>>> + regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
>>>> + };
>>>> };
>>>>
>>>> regulators-1 {
>>>> @@ -370,6 +388,27 @@ tsp_int_sleep: tsp_int_sleep_state {
>>>> };
>>>> };
>>>>
>>>> +&ufs_mem_hc {
>>>> + reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
>>>> +
>>>> + vcc-supply = <&vreg_l7b_2p5>;
>>>> + vcc-max-microamp = <1100000>;
>>>
>>> because you set this, you should also set regulator-allow-set-mode and
>>> regulator-allowed-modes
>>>
>>> Konrad
>> Why is that necessary?
>
>Because that is then translated into the mode selection, based on
>the aggregated usage
>
>That said, you may also choose to omit this if you want to run all
>regulators at high-power mode (less efficient at idle), which forcefully
>ensures you're not hitting any current limits
Will do, thanks
>
>Konrad
© 2016 - 2026 Red Hat, Inc.