[PATCH 09/14] arm64: dts: qcom: sm6350: add refgen regulator and use it for DSI

Dmitry Baryshkov posted 14 patches 1 week, 3 days ago
[PATCH 09/14] arm64: dts: qcom: sm6350: add refgen regulator and use it for DSI
Posted by Dmitry Baryshkov 1 week, 3 days ago
Add the refgen regulator block and use it for the DSI controller.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/sm6350.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 8459b27cacc72a4827a2e289e669163ad6250059..dd009569a6683a25f13b068e3e0bd8746b2ac501 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -1768,6 +1768,12 @@ usb_1_hsphy: phy@88e3000 {
 			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
 		};
 
+		refgen: regulator@88e7000 {
+			compatible = "qcom,sm6350-refgen-regulator",
+				     "qcom,sm8250-refgen-regulator";
+			reg = <0x0 0x088e7000 0x0 0x84>;
+		};
+
 		usb_1_qmpphy: phy@88e8000 {
 			compatible = "qcom,sm6350-qmp-usb3-dp-phy";
 			reg = <0x0 0x088e8000 0x0 0x3000>;
@@ -2360,6 +2366,8 @@ mdss_dsi0: dsi@ae94000 {
 				phys = <&mdss_dsi0_phy>;
 				phy-names = "dsi";
 
+				refgen-supply = <&refgen>;
+
 				#address-cells = <1>;
 				#size-cells = <0>;
 

-- 
2.47.3
Re: [PATCH 09/14] arm64: dts: qcom: sm6350: add refgen regulator and use it for DSI
Posted by Luca Weiss 1 week, 1 day ago
Hi Dmitry,

On Sun Sep 21, 2025 at 9:09 AM CEST, Dmitry Baryshkov wrote:
> Add the refgen regulator block and use it for the DSI controller.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> index 8459b27cacc72a4827a2e289e669163ad6250059..dd009569a6683a25f13b068e3e0bd8746b2ac501 100644
> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> @@ -1768,6 +1768,12 @@ usb_1_hsphy: phy@88e3000 {
>  			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
>  		};
>  
> +		refgen: regulator@88e7000 {
> +			compatible = "qcom,sm6350-refgen-regulator",
> +				     "qcom,sm8250-refgen-regulator";
> +			reg = <0x0 0x088e7000 0x0 0x84>;

Are you sure the size is 0x84? Downstream and hwio_bitra_V1.cmm would
suggest size to be 0x60.

For sc7280, hwio_kodiak_E5.0.cmm does say 0x84 for refgen.

Apart from that, it's also what I have lying around somewhere, should've
upstreamed this already.

Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>

Regards
Luca

> +		};
> +
>  		usb_1_qmpphy: phy@88e8000 {
>  			compatible = "qcom,sm6350-qmp-usb3-dp-phy";
>  			reg = <0x0 0x088e8000 0x0 0x3000>;
> @@ -2360,6 +2366,8 @@ mdss_dsi0: dsi@ae94000 {
>  				phys = <&mdss_dsi0_phy>;
>  				phy-names = "dsi";
>  
> +				refgen-supply = <&refgen>;
> +
>  				#address-cells = <1>;
>  				#size-cells = <0>;
>  
Re: [PATCH 09/14] arm64: dts: qcom: sm6350: add refgen regulator and use it for DSI
Posted by Konrad Dybcio 5 days, 16 hours ago
On 9/23/25 9:17 AM, Luca Weiss wrote:
> Hi Dmitry,
> 
> On Sun Sep 21, 2025 at 9:09 AM CEST, Dmitry Baryshkov wrote:
>> Add the refgen regulator block and use it for the DSI controller.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>> ---
>>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
>> index 8459b27cacc72a4827a2e289e669163ad6250059..dd009569a6683a25f13b068e3e0bd8746b2ac501 100644
>> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
>> @@ -1768,6 +1768,12 @@ usb_1_hsphy: phy@88e3000 {
>>  			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
>>  		};
>>  
>> +		refgen: regulator@88e7000 {
>> +			compatible = "qcom,sm6350-refgen-regulator",
>> +				     "qcom,sm8250-refgen-regulator";
>> +			reg = <0x0 0x088e7000 0x0 0x84>;
> 
> Are you sure the size is 0x84? Downstream and hwio_bitra_V1.cmm would
> suggest size to be 0x60.
> 
> For sc7280, hwio_kodiak_E5.0.cmm does say 0x84 for refgen.

0x60

moreover, I see that there are two refgen regulators..

Konrad
Re: [PATCH 09/14] arm64: dts: qcom: sm6350: add refgen regulator and use it for DSI
Posted by Dmitry Baryshkov 5 days, 16 hours ago
On Fri, Sep 26, 2025 at 03:27:24PM +0200, Konrad Dybcio wrote:
> On 9/23/25 9:17 AM, Luca Weiss wrote:
> > Hi Dmitry,
> > 
> > On Sun Sep 21, 2025 at 9:09 AM CEST, Dmitry Baryshkov wrote:
> >> Add the refgen regulator block and use it for the DSI controller.
> >>
> >> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> >> ---
> >>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 8 ++++++++
> >>  1 file changed, 8 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> >> index 8459b27cacc72a4827a2e289e669163ad6250059..dd009569a6683a25f13b068e3e0bd8746b2ac501 100644
> >> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
> >> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
> >> @@ -1768,6 +1768,12 @@ usb_1_hsphy: phy@88e3000 {
> >>  			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
> >>  		};
> >>  
> >> +		refgen: regulator@88e7000 {
> >> +			compatible = "qcom,sm6350-refgen-regulator",
> >> +				     "qcom,sm8250-refgen-regulator";
> >> +			reg = <0x0 0x088e7000 0x0 0x84>;
> > 
> > Are you sure the size is 0x84? Downstream and hwio_bitra_V1.cmm would
> > suggest size to be 0x60.
> > 
> > For sc7280, hwio_kodiak_E5.0.cmm does say 0x84 for refgen.
> 
> 0x60
> 
> moreover, I see that there are two refgen regulators..

There are two refgens on each of the platforms, but I think the other
one is used in the automatic way. The HPG only tells us about
programming this one.

-- 
With best wishes
Dmitry
Re: [PATCH 09/14] arm64: dts: qcom: sm6350: add refgen regulator and use it for DSI
Posted by Konrad Dybcio 5 days, 16 hours ago
On 9/26/25 3:44 PM, Dmitry Baryshkov wrote:
> On Fri, Sep 26, 2025 at 03:27:24PM +0200, Konrad Dybcio wrote:
>> On 9/23/25 9:17 AM, Luca Weiss wrote:
>>> Hi Dmitry,
>>>
>>> On Sun Sep 21, 2025 at 9:09 AM CEST, Dmitry Baryshkov wrote:
>>>> Add the refgen regulator block and use it for the DSI controller.
>>>>
>>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>>> ---
>>>>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 8 ++++++++
>>>>  1 file changed, 8 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
>>>> index 8459b27cacc72a4827a2e289e669163ad6250059..dd009569a6683a25f13b068e3e0bd8746b2ac501 100644
>>>> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
>>>> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
>>>> @@ -1768,6 +1768,12 @@ usb_1_hsphy: phy@88e3000 {
>>>>  			resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
>>>>  		};
>>>>  
>>>> +		refgen: regulator@88e7000 {
>>>> +			compatible = "qcom,sm6350-refgen-regulator",
>>>> +				     "qcom,sm8250-refgen-regulator";
>>>> +			reg = <0x0 0x088e7000 0x0 0x84>;
>>>
>>> Are you sure the size is 0x84? Downstream and hwio_bitra_V1.cmm would
>>> suggest size to be 0x60.
>>>
>>> For sc7280, hwio_kodiak_E5.0.cmm does say 0x84 for refgen.
>>
>> 0x60
>>
>> moreover, I see that there are two refgen regulators..
> 
> There are two refgens on each of the platforms, but I think the other
> one is used in the automatic way. The HPG only tells us about
> programming this one.

OK thanks for checking that

Konrad