* [PATCH V2 2/3] dt-bindings: mmc: sdhci-msm: Add entries for passing load values [not found] <1537424558-17989-1-git-send-email-vbadigan@codeaurora.org> @ 2018-09-20 6:22 ` Veerabhadrarao Badiganti 2018-09-21 0:15 ` Evan Green 0 siblings, 1 reply; 5+ messages in thread From: Veerabhadrarao Badiganti @ 2018-09-20 6:22 UTC (permalink / raw) To: adrian.hunter, ulf.hansson, robh+dt Cc: linux-mmc, asutoshd, riteshh, stummala, sayalil, evgreen, dianders, Vijay Viswanath, Veerabhadrarao Badiganti, Mark Rutland, open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, open list From: Vijay Viswanath <vviswana@codeaurora.org> The load a particular sdhc controller should request from a regulator is device specific and hence each device should individually vote for the required load. Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org> Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org> --- Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt index 502b3b8..3720385 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt @@ -26,6 +26,11 @@ Required properties: "cal" - reference clock for RCLK delay calibration (optional) "sleep" - sleep clock for RCLK delay calibration (optional) +Optional properties: +- qcom,<supply>-current-level-microamp - specifies load levels for supply during BUS_ON and + BUS_OFF states in power irq. Should be specified in + pairs (lpm, hpm), for BUS_OFF and BUS_ON respectively. + Units uA. Example: sdhc_1: sdhci@f9824900 { @@ -37,6 +42,7 @@ Example: vmmc-supply = <&pm8941_l20>; vqmmc-supply = <&pm8941_s3>; + qcom,vqmmc-current-level-microamp = <200 22000>; pinctrl-names = "default"; pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>; -- Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH V2 2/3] dt-bindings: mmc: sdhci-msm: Add entries for passing load values 2018-09-20 6:22 ` [PATCH V2 2/3] dt-bindings: mmc: sdhci-msm: Add entries for passing load values Veerabhadrarao Badiganti @ 2018-09-21 0:15 ` Evan Green 2018-09-21 10:32 ` Veerabhadrarao Badiganti 0 siblings, 1 reply; 5+ messages in thread From: Evan Green @ 2018-09-21 0:15 UTC (permalink / raw) To: vbadigan Cc: adrian.hunter, Ulf Hansson, robh+dt, linux-mmc, asutoshd, riteshh, stummala, sayali, Doug Anderson, vviswana, mark.rutland, devicetree, linux-kernel On Wed, Sep 19, 2018 at 11:24 PM Veerabhadrarao Badiganti <vbadigan@codeaurora.org> wrote: > > From: Vijay Viswanath <vviswana@codeaurora.org> > > The load a particular sdhc controller should request from a regulator > is device specific and hence each device should individually vote for > the required load. > > Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org> > Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org> > --- > Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > index 502b3b8..3720385 100644 > --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > @@ -26,6 +26,11 @@ Required properties: > "cal" - reference clock for RCLK delay calibration (optional) > "sleep" - sleep clock for RCLK delay calibration (optional) > > +Optional properties: > +- qcom,<supply>-current-level-microamp - specifies load levels for supply during BUS_ON and > + BUS_OFF states in power irq. Should be specified in > + pairs (lpm, hpm), for BUS_OFF and BUS_ON respectively. > + Units uA. > Example: > > sdhc_1: sdhci@f9824900 { > @@ -37,6 +42,7 @@ Example: > > vmmc-supply = <&pm8941_l20>; > vqmmc-supply = <&pm8941_s3>; > + qcom,vqmmc-current-level-microamp = <200 22000>; > > pinctrl-names = "default"; > pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>; > -- > Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project > Aren't the regulator load levels pretty coarse? Would it be safe to say that pretty much all sd/mmc devices need the high powered mode, or are there really some devices that can get by with LPM all the time? -Evan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V2 2/3] dt-bindings: mmc: sdhci-msm: Add entries for passing load values 2018-09-21 0:15 ` Evan Green @ 2018-09-21 10:32 ` Veerabhadrarao Badiganti 2018-09-21 20:06 ` Evan Green 0 siblings, 1 reply; 5+ messages in thread From: Veerabhadrarao Badiganti @ 2018-09-21 10:32 UTC (permalink / raw) To: Evan Green Cc: adrian.hunter, Ulf Hansson, robh+dt, linux-mmc, asutoshd, riteshh, stummala, sayali, Doug Anderson, vviswana, mark.rutland, devicetree, linux-kernel Hi Evan, On 9/21/2018 5:45 AM, Evan Green wrote: > On Wed, Sep 19, 2018 at 11:24 PM Veerabhadrarao Badiganti > <vbadigan@codeaurora.org> wrote: >> From: Vijay Viswanath <vviswana@codeaurora.org> >> >> The load a particular sdhc controller should request from a regulator >> is device specific and hence each device should individually vote for >> the required load. >> >> Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org> >> Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org> >> --- >> Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt >> index 502b3b8..3720385 100644 >> --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt >> +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt >> @@ -26,6 +26,11 @@ Required properties: >> "cal" - reference clock for RCLK delay calibration (optional) >> "sleep" - sleep clock for RCLK delay calibration (optional) >> >> +Optional properties: >> +- qcom,<supply>-current-level-microamp - specifies load levels for supply during BUS_ON and >> + BUS_OFF states in power irq. Should be specified in >> + pairs (lpm, hpm), for BUS_OFF and BUS_ON respectively. >> + Units uA. >> Example: >> >> sdhc_1: sdhci@f9824900 { >> @@ -37,6 +42,7 @@ Example: >> >> vmmc-supply = <&pm8941_l20>; >> vqmmc-supply = <&pm8941_s3>; >> + qcom,vqmmc-current-level-microamp = <200 22000>; >> >> pinctrl-names = "default"; >> pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>; >> -- >> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project >> > Aren't the regulator load levels pretty coarse? Would it be safe to > say that pretty much all sd/mmc devices need the high powered mode, or > are there really some devices that can get by with LPM all the time? > -Evan The load levels here are min and max supported by the regulator. To cover all devices we do set it to max load. We can't make any assumptions on this, as peak current may vary from device to device. Thanks, Veera ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V2 2/3] dt-bindings: mmc: sdhci-msm: Add entries for passing load values 2018-09-21 10:32 ` Veerabhadrarao Badiganti @ 2018-09-21 20:06 ` Evan Green 2018-10-04 13:13 ` Veerabhadrarao Badiganti 0 siblings, 1 reply; 5+ messages in thread From: Evan Green @ 2018-09-21 20:06 UTC (permalink / raw) To: vbadigan Cc: adrian.hunter, Ulf Hansson, robh+dt, linux-mmc, asutoshd, riteshh, stummala, sayali, Doug Anderson, vviswana, mark.rutland, devicetree, linux-kernel On Fri, Sep 21, 2018 at 3:32 AM Veerabhadrarao Badiganti <vbadigan@codeaurora.org> wrote: > > Hi Evan, > > > On 9/21/2018 5:45 AM, Evan Green wrote: > > On Wed, Sep 19, 2018 at 11:24 PM Veerabhadrarao Badiganti > > <vbadigan@codeaurora.org> wrote: > >> From: Vijay Viswanath <vviswana@codeaurora.org> > >> > >> The load a particular sdhc controller should request from a regulator > >> is device specific and hence each device should individually vote for > >> the required load. > >> > >> Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org> > >> Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org> > >> --- > >> Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 6 ++++++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > >> index 502b3b8..3720385 100644 > >> --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > >> +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt > >> @@ -26,6 +26,11 @@ Required properties: > >> "cal" - reference clock for RCLK delay calibration (optional) > >> "sleep" - sleep clock for RCLK delay calibration (optional) > >> > >> +Optional properties: > >> +- qcom,<supply>-current-level-microamp - specifies load levels for supply during BUS_ON and > >> + BUS_OFF states in power irq. Should be specified in > >> + pairs (lpm, hpm), for BUS_OFF and BUS_ON respectively. > >> + Units uA. > >> Example: > >> > >> sdhc_1: sdhci@f9824900 { > >> @@ -37,6 +42,7 @@ Example: > >> > >> vmmc-supply = <&pm8941_l20>; > >> vqmmc-supply = <&pm8941_s3>; > >> + qcom,vqmmc-current-level-microamp = <200 22000>; > >> > >> pinctrl-names = "default"; > >> pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>; > >> -- > >> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project > >> > > Aren't the regulator load levels pretty coarse? Would it be safe to > > say that pretty much all sd/mmc devices need the high powered mode, or > > are there really some devices that can get by with LPM all the time? > > -Evan > The load levels here are min and max supported by the regulator. To > cover all devices > we do set it to max load. We can't make any assumptions on this, as > peak current may vary > from device to device. Hi Veera, If it were up to me, I would just assume all devices need high power mode for BUS_ON and low power mode for BUS_OFF, and skip adding this binding until you actually came up with a device that needed lower power mode for BUS_ON, or high power mode for BUS_OFF (when would that be, anyway?) Are there any actual use cases you've seen that need different values in here? -Evan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH V2 2/3] dt-bindings: mmc: sdhci-msm: Add entries for passing load values 2018-09-21 20:06 ` Evan Green @ 2018-10-04 13:13 ` Veerabhadrarao Badiganti 0 siblings, 0 replies; 5+ messages in thread From: Veerabhadrarao Badiganti @ 2018-10-04 13:13 UTC (permalink / raw) To: Evan Green Cc: adrian.hunter, Ulf Hansson, robh+dt, linux-mmc, asutoshd, riteshh, stummala, sayali, Doug Anderson, vviswana, mark.rutland, devicetree, linux-kernel On 9/22/2018 1:36 AM, Evan Green wrote: > On Fri, Sep 21, 2018 at 3:32 AM Veerabhadrarao Badiganti > <vbadigan@codeaurora.org> wrote: >> Hi Evan, >> >> >> On 9/21/2018 5:45 AM, Evan Green wrote: >>> On Wed, Sep 19, 2018 at 11:24 PM Veerabhadrarao Badiganti >>> <vbadigan@codeaurora.org> wrote: >>>> From: Vijay Viswanath <vviswana@codeaurora.org> >>>> >>>> The load a particular sdhc controller should request from a regulator >>>> is device specific and hence each device should individually vote for >>>> the required load. >>>> >>>> Signed-off-by: Vijay Viswanath <vviswana@codeaurora.org> >>>> Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org> >>>> --- >>>> Documentation/devicetree/bindings/mmc/sdhci-msm.txt | 6 ++++++ >>>> 1 file changed, 6 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt >>>> index 502b3b8..3720385 100644 >>>> --- a/Documentation/devicetree/bindings/mmc/sdhci-msm.txt >>>> +++ b/Documentation/devicetree/bindings/mmc/sdhci-msm.txt >>>> @@ -26,6 +26,11 @@ Required properties: >>>> "cal" - reference clock for RCLK delay calibration (optional) >>>> "sleep" - sleep clock for RCLK delay calibration (optional) >>>> >>>> +Optional properties: >>>> +- qcom,<supply>-current-level-microamp - specifies load levels for supply during BUS_ON and >>>> + BUS_OFF states in power irq. Should be specified in >>>> + pairs (lpm, hpm), for BUS_OFF and BUS_ON respectively. >>>> + Units uA. >>>> Example: >>>> >>>> sdhc_1: sdhci@f9824900 { >>>> @@ -37,6 +42,7 @@ Example: >>>> >>>> vmmc-supply = <&pm8941_l20>; >>>> vqmmc-supply = <&pm8941_s3>; >>>> + qcom,vqmmc-current-level-microamp = <200 22000>; >>>> >>>> pinctrl-names = "default"; >>>> pinctrl-0 = <&sdc1_clk &sdc1_cmd &sdc1_data>; >>>> -- >>>> Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc., is a member of Code Aurora Forum, a Linux Foundation Collaborative Project >>>> >>> Aren't the regulator load levels pretty coarse? Would it be safe to >>> say that pretty much all sd/mmc devices need the high powered mode, or >>> are there really some devices that can get by with LPM all the time? >>> -Evan >> The load levels here are min and max supported by the regulator. To >> cover all devices >> we do set it to max load. We can't make any assumptions on this, as >> peak current may vary >> from device to device. > Hi Veera, > If it were up to me, I would just assume all devices need high power > mode for BUS_ON and low power mode for BUS_OFF, and skip adding this > binding until you actually came up with a device that needed lower > power mode for BUS_ON, or high power mode for BUS_OFF (when would that > be, anyway?) Are there any actual use cases you've seen that need > different values in here? > -Evan Hi Evan, With the present implementation if these load values are not supplied in dt, its not setting any load at all. Without setting load, I'm observing CRC/timeout/tuning errors. I can update the code to fallback to default values when these are not supplied in dt, but these values will be different from SD card and eMMC devices. So, this dt binding is needed. Thanks Veera ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-10-04 13:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1537424558-17989-1-git-send-email-vbadigan@codeaurora.org> 2018-09-20 6:22 ` [PATCH V2 2/3] dt-bindings: mmc: sdhci-msm: Add entries for passing load values Veerabhadrarao Badiganti 2018-09-21 0:15 ` Evan Green 2018-09-21 10:32 ` Veerabhadrarao Badiganti 2018-09-21 20:06 ` Evan Green 2018-10-04 13:13 ` Veerabhadrarao Badiganti
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).