2020-02-28 14:47:34

by Tero Kristo

[permalink] [raw]
Subject: [PATCH] cpufreq: ti-cpufreq: Add support for OPP_PLUS

From: Lokesh Vutla <[email protected]>

DRA762 SoC introduces OPP_PLUS which runs at 1.8GHz. Add
support for this OPP in ti-cpufreq driver.

Acked-by: Dave Gerlach <[email protected]>
Signed-off-by: Lokesh Vutla <[email protected]>
Signed-off-by: Tero Kristo <[email protected]>
---
drivers/cpufreq/ti-cpufreq.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
index 557cb513bf7f..d62b6b21325a 100644
--- a/drivers/cpufreq/ti-cpufreq.c
+++ b/drivers/cpufreq/ti-cpufreq.c
@@ -25,11 +25,14 @@

#define DRA7_EFUSE_HAS_OD_MPU_OPP 11
#define DRA7_EFUSE_HAS_HIGH_MPU_OPP 15
+#define DRA76_EFUSE_HAS_PLUS_MPU_OPP 18
#define DRA7_EFUSE_HAS_ALL_MPU_OPP 23
+#define DRA76_EFUSE_HAS_ALL_MPU_OPP 24

#define DRA7_EFUSE_NOM_MPU_OPP BIT(0)
#define DRA7_EFUSE_OD_MPU_OPP BIT(1)
#define DRA7_EFUSE_HIGH_MPU_OPP BIT(2)
+#define DRA76_EFUSE_PLUS_MPU_OPP BIT(3)

#define OMAP3_CONTROL_DEVICE_STATUS 0x4800244C
#define OMAP3_CONTROL_IDCODE 0x4830A204
@@ -80,6 +83,9 @@ static unsigned long dra7_efuse_xlate(struct ti_cpufreq_data *opp_data,
*/

switch (efuse) {
+ case DRA76_EFUSE_HAS_PLUS_MPU_OPP:
+ case DRA76_EFUSE_HAS_ALL_MPU_OPP:
+ calculated_efuse |= DRA76_EFUSE_PLUS_MPU_OPP;
case DRA7_EFUSE_HAS_ALL_MPU_OPP:
case DRA7_EFUSE_HAS_HIGH_MPU_OPP:
calculated_efuse |= DRA7_EFUSE_HIGH_MPU_OPP;
--
2.17.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


2020-03-02 04:20:00

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH] cpufreq: ti-cpufreq: Add support for OPP_PLUS

On 28-02-20, 16:45, Tero Kristo wrote:
> From: Lokesh Vutla <[email protected]>
>
> DRA762 SoC introduces OPP_PLUS which runs at 1.8GHz. Add
> support for this OPP in ti-cpufreq driver.
>
> Acked-by: Dave Gerlach <[email protected]>
> Signed-off-by: Lokesh Vutla <[email protected]>
> Signed-off-by: Tero Kristo <[email protected]>
> ---
> drivers/cpufreq/ti-cpufreq.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
> index 557cb513bf7f..d62b6b21325a 100644
> --- a/drivers/cpufreq/ti-cpufreq.c
> +++ b/drivers/cpufreq/ti-cpufreq.c
> @@ -25,11 +25,14 @@
>
> #define DRA7_EFUSE_HAS_OD_MPU_OPP 11
> #define DRA7_EFUSE_HAS_HIGH_MPU_OPP 15
> +#define DRA76_EFUSE_HAS_PLUS_MPU_OPP 18
> #define DRA7_EFUSE_HAS_ALL_MPU_OPP 23
> +#define DRA76_EFUSE_HAS_ALL_MPU_OPP 24
>
> #define DRA7_EFUSE_NOM_MPU_OPP BIT(0)
> #define DRA7_EFUSE_OD_MPU_OPP BIT(1)
> #define DRA7_EFUSE_HIGH_MPU_OPP BIT(2)
> +#define DRA76_EFUSE_PLUS_MPU_OPP BIT(3)
>
> #define OMAP3_CONTROL_DEVICE_STATUS 0x4800244C
> #define OMAP3_CONTROL_IDCODE 0x4830A204
> @@ -80,6 +83,9 @@ static unsigned long dra7_efuse_xlate(struct ti_cpufreq_data *opp_data,
> */
>
> switch (efuse) {
> + case DRA76_EFUSE_HAS_PLUS_MPU_OPP:
> + case DRA76_EFUSE_HAS_ALL_MPU_OPP:
> + calculated_efuse |= DRA76_EFUSE_PLUS_MPU_OPP;
> case DRA7_EFUSE_HAS_ALL_MPU_OPP:
> case DRA7_EFUSE_HAS_HIGH_MPU_OPP:
> calculated_efuse |= DRA7_EFUSE_HIGH_MPU_OPP;

This is already merged, why sending it again ?

--
viresh

2020-03-02 09:23:31

by Tero Kristo

[permalink] [raw]
Subject: Re: [PATCH] cpufreq: ti-cpufreq: Add support for OPP_PLUS

On 02/03/2020 06:19, Viresh Kumar wrote:
> On 28-02-20, 16:45, Tero Kristo wrote:
>> From: Lokesh Vutla <[email protected]>
>>
>> DRA762 SoC introduces OPP_PLUS which runs at 1.8GHz. Add
>> support for this OPP in ti-cpufreq driver.
>>
>> Acked-by: Dave Gerlach <[email protected]>
>> Signed-off-by: Lokesh Vutla <[email protected]>
>> Signed-off-by: Tero Kristo <[email protected]>
>> ---
>> drivers/cpufreq/ti-cpufreq.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/cpufreq/ti-cpufreq.c b/drivers/cpufreq/ti-cpufreq.c
>> index 557cb513bf7f..d62b6b21325a 100644
>> --- a/drivers/cpufreq/ti-cpufreq.c
>> +++ b/drivers/cpufreq/ti-cpufreq.c
>> @@ -25,11 +25,14 @@
>>
>> #define DRA7_EFUSE_HAS_OD_MPU_OPP 11
>> #define DRA7_EFUSE_HAS_HIGH_MPU_OPP 15
>> +#define DRA76_EFUSE_HAS_PLUS_MPU_OPP 18
>> #define DRA7_EFUSE_HAS_ALL_MPU_OPP 2
>> +#define DRA76_EFUSE_HAS_ALL_MPU_OPP 24
>>
>> #define DRA7_EFUSE_NOM_MPU_OPP BIT(0)
>> #define DRA7_EFUSE_OD_MPU_OPP BIT(1)
>> #define DRA7_EFUSE_HIGH_MPU_OPP BIT(2)
>> +#define DRA76_EFUSE_PLUS_MPU_OPP BIT(3)
>>
>> #define OMAP3_CONTROL_DEVICE_STATUS 0x4800244C
>> #define OMAP3_CONTROL_IDCODE 0x4830A204
>> @@ -80,6 +83,9 @@ static unsigned long dra7_efuse_xlate(struct ti_cpufreq_data *opp_data,
>> */
>>
>> switch (efuse) {
>> + case DRA76_EFUSE_HAS_PLUS_MPU_OPP:
>> + case DRA76_EFUSE_HAS_ALL_MPU_OPP:
>> + calculated_efuse |= DRA76_EFUSE_PLUS_MPU_OPP;
>> case DRA7_EFUSE_HAS_ALL_MPU_OPP:
>> case DRA7_EFUSE_HAS_HIGH_MPU_OPP:
>> calculated_efuse |= DRA7_EFUSE_HIGH_MPU_OPP;
>
> This is already merged, why sending it again ?

Oops sorry, seems I was looking at stale local upstream branch when
checking what is still missing upstream. Please ignore.

-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki