* [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A @ 2023-07-25 10:00 Naveen Kumar Goud Arepalli 2023-07-25 21:50 ` Andrew Halaney 0 siblings, 1 reply; 6+ messages in thread From: Naveen Kumar Goud Arepalli @ 2023-07-25 10:00 UTC (permalink / raw) To: quic_nitirawa, agross, andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, conor+dt Cc: linux-arm-msm, devicetree, linux-kernel, Naveen Kumar Goud Arepalli L8A is the supply for UFS VCC, UFS specification allows different VCC configurations for UFS devices. -UFS 2.x devices: 2.70V - 3.60V -UFS 3.x devices: 2.40V - 2.70V As sa8775p-ride supports both ufs 2.x and ufs 3.x devices, remove min/max voltages for L8A regulator. Initial voltage of L8A will be set to 2.504v or 2.952v during PON depending on the UFS device type. On sa8775, UFS is the only client in Linux for L8A and this regulator will be voted only for enabling/disabling. Signed-off-by: Naveen Kumar Goud Arepalli <quic_narepall@quicinc.com> --- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts index ed76680410b4..6f3891a09e59 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts @@ -98,8 +98,6 @@ vreg_l8a: ldo8 { regulator-name = "vreg_l8a"; - regulator-min-microvolt = <2504000>; - regulator-max-microvolt = <3300000>; regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; regulator-allow-set-load; regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM -- 2.17.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A 2023-07-25 10:00 [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A Naveen Kumar Goud Arepalli @ 2023-07-25 21:50 ` Andrew Halaney 2023-07-26 12:32 ` Naveen Kumar Goud Arepalli (QUIC) 0 siblings, 1 reply; 6+ messages in thread From: Andrew Halaney @ 2023-07-25 21:50 UTC (permalink / raw) To: Naveen Kumar Goud Arepalli Cc: quic_nitirawa, agross, andersson, konrad.dybcio, robh+dt, krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree, linux-kernel On Tue, Jul 25, 2023 at 03:30:07PM +0530, Naveen Kumar Goud Arepalli wrote: > L8A is the supply for UFS VCC, UFS specification allows different VCC > configurations for UFS devices. > -UFS 2.x devices: 2.70V - 3.60V > -UFS 3.x devices: 2.40V - 2.70V > > As sa8775p-ride supports both ufs 2.x and ufs 3.x devices, remove min/max > voltages for L8A regulator. Initial voltage of L8A will be set to 2.504v > or 2.952v during PON depending on the UFS device type. On sa8775, UFS is > the only client in Linux for L8A and this regulator will be voted only > for enabling/disabling. > > Signed-off-by: Naveen Kumar Goud Arepalli <quic_narepall@quicinc.com> > --- > arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > index ed76680410b4..6f3891a09e59 100644 > --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > @@ -98,8 +98,6 @@ > > vreg_l8a: ldo8 { > regulator-name = "vreg_l8a"; > - regulator-min-microvolt = <2504000>; > - regulator-max-microvolt = <3300000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM > -- > 2.17.1 > Reviewing with very little expertise in the area.... A few questions below that would help me understand this a bit better. Does it make sense to *not* set the range of the regulator at all?: 1. A board dts knows its UFS device 2. Is UFS backwards compatible with respect to UFS2/UFS3? I don't know how the version is determined, but if it's a "start at UFS2, go to UFS3" should it be scaled as that goes? Relying on the bootloader to set up the device before the kernel starts seems like a direction that should be actively avoided instead of depended on in my opinion. Thanks, Andrew ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A 2023-07-25 21:50 ` Andrew Halaney @ 2023-07-26 12:32 ` Naveen Kumar Goud Arepalli (QUIC) 2023-07-26 13:07 ` Krzysztof Kozlowski 0 siblings, 1 reply; 6+ messages in thread From: Naveen Kumar Goud Arepalli (QUIC) @ 2023-07-26 12:32 UTC (permalink / raw) To: Andrew Halaney Cc: Nitin Rawat (QUIC), agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org On Tue, Jul 25, 2023 at 03:30:07PM +0530, Naveen Kumar Goud Arepalli wrote: > L8A is the supply for UFS VCC, UFS specification allows different VCC > configurations for UFS devices. > -UFS 2.x devices: 2.70V - 3.60V > -UFS 3.x devices: 2.40V - 2.70V > > As sa8775p-ride supports both ufs 2.x and ufs 3.x devices, remove > min/max voltages for L8A regulator. Initial voltage of L8A will be set > to 2.504v or 2.952v during PON depending on the UFS device type. On > sa8775, UFS is the only client in Linux for L8A and this regulator > will be voted only for enabling/disabling. > > Signed-off-by: Naveen Kumar Goud Arepalli <quic_narepall@quicinc.com> > --- > arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > index ed76680410b4..6f3891a09e59 100644 > --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts > @@ -98,8 +98,6 @@ > > vreg_l8a: ldo8 { > regulator-name = "vreg_l8a"; > - regulator-min-microvolt = <2504000>; > - regulator-max-microvolt = <3300000>; > regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; > regulator-allow-set-load; > regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM > -- > 2.17.1 > Reviewing with very little expertise in the area.... A few questions below that would help me understand this a bit better. Does it make sense to *not* set the range of the regulator at all?: >>> Yes, we are removing the range of the regulator. 1. A board dts knows its UFS device 2. Is UFS backwards compatible with respect to UFS2/UFS3? I don't know how the version is determined, but if it's a "start at UFS2, go to UFS3" should it be scaled as that goes? >>>> For a UFS device 3.x, we cannot start as UFS 2.0. vcc has to be as per UFS 3.x recommendations. Relying on the bootloader to set up the device before the kernel starts seems like a direction that should be actively avoided instead of depended on in my opinion. >>>> As per upstream UFS driver, voltage voting is not there and we vote only for enable/disable . Since UFS is the only client in Linux for this rail (L8A ), we don't need min and max range to support UFS 2.x and 3.x cards. Thanks, Naveen ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A 2023-07-26 12:32 ` Naveen Kumar Goud Arepalli (QUIC) @ 2023-07-26 13:07 ` Krzysztof Kozlowski 2023-08-04 8:04 ` Naveen Kumar Goud Arepalli (QUIC) 0 siblings, 1 reply; 6+ messages in thread From: Krzysztof Kozlowski @ 2023-07-26 13:07 UTC (permalink / raw) To: Naveen Kumar Goud Arepalli (QUIC), Andrew Halaney Cc: Nitin Rawat (QUIC), agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org On 26/07/2023 14:32, Naveen Kumar Goud Arepalli (QUIC) wrote: > On Tue, Jul 25, 2023 at 03:30:07PM +0530, Naveen Kumar Goud Arepalli wrote: >> L8A is the supply for UFS VCC, UFS specification allows different VCC >> configurations for UFS devices. >> -UFS 2.x devices: 2.70V - 3.60V >> -UFS 3.x devices: 2.40V - 2.70V >> >> As sa8775p-ride supports both ufs 2.x and ufs 3.x devices, remove >> min/max voltages for L8A regulator. Initial voltage of L8A will be set >> to 2.504v or 2.952v during PON depending on the UFS device type. On >> sa8775, UFS is the only client in Linux for L8A and this regulator >> will be voted only for enabling/disabling. >> >> Signed-off-by: Naveen Kumar Goud Arepalli <quic_narepall@quicinc.com> >> --- >> arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> index ed76680410b4..6f3891a09e59 100644 >> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> @@ -98,8 +98,6 @@ >> >> vreg_l8a: ldo8 { >> regulator-name = "vreg_l8a"; >> - regulator-min-microvolt = <2504000>; >> - regulator-max-microvolt = <3300000>; >> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; >> regulator-allow-set-load; >> regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM >> -- >> 2.17.1 >> > > Reviewing with very little expertise in the area.... > A few questions below that would help me understand this a bit better. > > Does it make sense to *not* set the range of the regulator at all?: >>>> Yes, we are removing the range of the regulator. > > 1. A board dts knows its UFS device > 2. Is UFS backwards compatible with respect to UFS2/UFS3? > I don't know how the version is determined, but if it's a > "start at UFS2, go to UFS3" should it be scaled as that goes? > >>>> For a UFS device 3.x, we cannot start as UFS 2.0. vcc has to be as per UFS 3.x recommendations. > > Relying on the bootloader to set up the device before the kernel starts > seems like a direction that should be actively avoided instead of > depended on in my opinion. I have trouble finding which part is your reply and which is quote of Andrew. Please reconfigure your mail client. >>>>> As per upstream UFS driver, voltage voting is not there and we vote only for enable/disable . > Since UFS is the only client in Linux for this rail (L8A ), we don't need min and max range to support > UFS 2.x and 3.x cards. I would assume some reasonable range is always desired. Why it cannot be the wider range from both? 2.4 - 3.6? Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A 2023-07-26 13:07 ` Krzysztof Kozlowski @ 2023-08-04 8:04 ` Naveen Kumar Goud Arepalli (QUIC) 2023-08-04 9:43 ` Krzysztof Kozlowski 0 siblings, 1 reply; 6+ messages in thread From: Naveen Kumar Goud Arepalli (QUIC) @ 2023-08-04 8:04 UTC (permalink / raw) To: Krzysztof Kozlowski, Andrew Halaney Cc: Nitin Rawat (QUIC), agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org On 26/07/2023 14:32, Naveen Kumar Goud Arepalli (QUIC) wrote: > On Tue, Jul 25, 2023 at 03:30:07PM +0530, Naveen Kumar Goud Arepalli wrote: >> L8A is the supply for UFS VCC, UFS specification allows different VCC >> configurations for UFS devices. >> -UFS 2.x devices: 2.70V - 3.60V >> -UFS 3.x devices: 2.40V - 2.70V >> >> As sa8775p-ride supports both ufs 2.x and ufs 3.x devices, remove >> min/max voltages for L8A regulator. Initial voltage of L8A will be >> set to 2.504v or 2.952v during PON depending on the UFS device type. >> On sa8775, UFS is the only client in Linux for L8A and this regulator >> will be voted only for enabling/disabling. >> >> Signed-off-by: Naveen Kumar Goud Arepalli <quic_narepall@quicinc.com> >> --- >> arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 2 -- >> 1 file changed, 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> index ed76680410b4..6f3891a09e59 100644 >> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >> @@ -98,8 +98,6 @@ >> >> vreg_l8a: ldo8 { >> regulator-name = "vreg_l8a"; >> - regulator-min-microvolt = <2504000>; >> - regulator-max-microvolt = <3300000>; >> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; >> regulator-allow-set-load; >> regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM >> -- >> 2.17.1 >> > > Reviewing with very little expertise in the area.... > A few questions below that would help me understand this a bit better. > > Does it make sense to *not* set the range of the regulator at all?: >>>> Yes, we are removing the range of the regulator. > > 1. A board dts knows its UFS device > 2. Is UFS backwards compatible with respect to UFS2/UFS3? > I don't know how the version is determined, but if it's a > "start at UFS2, go to UFS3" should it be scaled as that goes? > >>>> For a UFS device 3.x, we cannot start as UFS 2.0. vcc has to be as per UFS 3.x recommendations. > > Relying on the bootloader to set up the device before the kernel > starts seems like a direction that should be actively avoided instead > of depended on in my opinion. I have trouble finding which part is your reply and which is quote of Andrew. Please reconfigure your mail client. >>>>> As per upstream UFS driver, voltage voting is not there and we vote only for enable/disable . > Since UFS is the only client in Linux for this rail (L8A ), we don't > need min and max range to support UFS 2.x and 3.x cards. I would assume some reasonable range is always desired. Why it cannot be the wider range from both? 2.4 - 3.6? Wider range cannot be mentioned in DT, For UFS 2.x range is 2.7 V to 3.6 V and for UFS 3.x range is 2.4V to 2.7V. Giving the wider range will not set the correct voltage. For example: If the range is mentioned as 2.4V to 3.6V in DT and we have connected UFS 2.x device, Since UFS driver is voting only for regulator_enable(voltage is not being set) the voltage will be 2.4V(min voltage) from pmic driver which is wrong voltage for UFS 2.x devices, which is violation of spec. Regards Naveen ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A 2023-08-04 8:04 ` Naveen Kumar Goud Arepalli (QUIC) @ 2023-08-04 9:43 ` Krzysztof Kozlowski 0 siblings, 0 replies; 6+ messages in thread From: Krzysztof Kozlowski @ 2023-08-04 9:43 UTC (permalink / raw) To: Naveen Kumar Goud Arepalli (QUIC), Andrew Halaney Cc: Nitin Rawat (QUIC), agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org On 04/08/2023 10:04, Naveen Kumar Goud Arepalli (QUIC) wrote: >>> diff --git a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >>> b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >>> index ed76680410b4..6f3891a09e59 100644 >>> --- a/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >>> +++ b/arch/arm64/boot/dts/qcom/sa8775p-ride.dts >>> @@ -98,8 +98,6 @@ >>> >>> vreg_l8a: ldo8 { >>> regulator-name = "vreg_l8a"; >>> - regulator-min-microvolt = <2504000>; >>> - regulator-max-microvolt = <3300000>; >>> regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; >>> regulator-allow-set-load; >>> regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM >>> -- >>> 2.17.1 >>> >> >> Reviewing with very little expertise in the area.... >> A few questions below that would help me understand this a bit better. >> >> Does it make sense to *not* set the range of the regulator at all?: >>>>> Yes, we are removing the range of the regulator. >> >> 1. A board dts knows its UFS device >> 2. Is UFS backwards compatible with respect to UFS2/UFS3? >> I don't know how the version is determined, but if it's a >> "start at UFS2, go to UFS3" should it be scaled as that goes? >> >>>> For a UFS device 3.x, we cannot start as UFS 2.0. vcc has to be as per UFS 3.x recommendations. >> >> Relying on the bootloader to set up the device before the kernel >> starts seems like a direction that should be actively avoided instead >> of depended on in my opinion. > > I have trouble finding which part is your reply and which is quote of Andrew. Please reconfigure your mail client. Who said this? Me or you? I am pretty sure I *said this*. Not only you pasted it as your reply, but you also re-wrapped lines. That's not how email communication works outside of corporate structure. Please, don't bring Outlook style to our lives... > >>>>>> As per upstream UFS driver, voltage voting is not there and we vote only for enable/disable . >> Since UFS is the only client in Linux for this rail (L8A ), we don't >> need min and max range to support UFS 2.x and 3.x cards. > > I would assume some reasonable range is always desired. Why it cannot be the wider range from both? 2.4 - 3.6? Again - who said that? I am 100% sure that me, not you. > > Wider range cannot be mentioned in DT, For UFS 2.x range is 2.7 V to 3.6 V and for UFS 3.x range is 2.4V to 2.7V. > Giving the wider range will not set the correct voltage. So is this your reply? I don't see a problem in wider range... > > For example: > If the range is mentioned as 2.4V to 3.6V in DT and we have connected UFS 2.x device, Since UFS driver is voting only for > regulator_enable(voltage is not being set) the voltage will be 2.4V(min voltage) from pmic driver which is wrong voltage for > UFS 2.x devices, which is violation of spec. So what is your solution? Remove constraints? Then who configures them? You rely on bootloader which is not what we want. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-08-04 9:43 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-07-25 10:00 [PATCH V1] arm64: dts: qcom: sa8775p-ride: Remove min and max voltages for L8A Naveen Kumar Goud Arepalli 2023-07-25 21:50 ` Andrew Halaney 2023-07-26 12:32 ` Naveen Kumar Goud Arepalli (QUIC) 2023-07-26 13:07 ` Krzysztof Kozlowski 2023-08-04 8:04 ` Naveen Kumar Goud Arepalli (QUIC) 2023-08-04 9:43 ` Krzysztof Kozlowski
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).