linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality
@ 2021-08-01 23:33 Linus Walleij
  2021-08-01 23:33 ` [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant Linus Walleij
  2021-08-02  7:45 ` [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality Lee Jones
  0 siblings, 2 replies; 10+ messages in thread
From: Linus Walleij @ 2021-08-01 23:33 UTC (permalink / raw)
  To: Lee Jones, linux-kernel; +Cc: Linus Walleij, phone-devel

These are the actual frequencies reported by the PLL, so let's
report these. The roundoffs are inappropriate, we should round
to the frequency that the clock will later report.

Drop some whitespace at the same time.

Cc: phone-devel@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/mfd/db8500-prcmu.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index 3bde7fda755f..dea4e4e8bed5 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -1622,22 +1622,20 @@ static long round_clock_rate(u8 clock, unsigned long rate)
 }
 
 static const unsigned long db8500_armss_freqs[] = {
-	200000000,
-	400000000,
-	800000000,
+	199680000,
+	399360000,
+	798720000,
 	998400000
 };
 
 /* The DB8520 has slightly higher ARMSS max frequency */
 static const unsigned long db8520_armss_freqs[] = {
-	200000000,
-	400000000,
-	800000000,
+	199680000,
+	399360000,
+	798720000,
 	1152000000
 };
 
-
-
 static long round_armss_rate(unsigned long rate)
 {
 	unsigned long freq = 0;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-01 23:33 [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality Linus Walleij
@ 2021-08-01 23:33 ` Linus Walleij
  2021-08-02  7:47   ` Lee Jones
                     ` (2 more replies)
  2021-08-02  7:45 ` [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality Lee Jones
  1 sibling, 3 replies; 10+ messages in thread
From: Linus Walleij @ 2021-08-01 23:33 UTC (permalink / raw)
  To: Lee Jones, linux-kernel
  Cc: Linus Walleij, Michael Turquette, Stephen Boyd, linux-clk, phone-devel

There was an "unknown" firmware variant turning up in the wild
causing problems in the clock driver. Add this missing variant
and clarify that varian 11 and 15 are Samsung variants, as this
is now very well known from released products.

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Stephen Boyd <sboyd@kernel.org>
Cc: linux-clk@vger.kernel.org
Cc: phone-devel@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Clock maintainers: could you please ACK this so Lee can take
this into the MFD tree? The chances of merge collisions are
zero, this code changes very seldom.
---
 drivers/clk/ux500/u8500_of_clk.c | 3 ++-
 drivers/mfd/db8500-prcmu.c       | 6 ++++--
 include/linux/mfd/dbx500-prcmu.h | 3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
index 0aedd42fad52..528c5bb397cc 100644
--- a/drivers/clk/ux500/u8500_of_clk.c
+++ b/drivers/clk/ux500/u8500_of_clk.c
@@ -99,10 +99,11 @@ static void u8500_clk_init(struct device_node *np)
 	if (fw_version != NULL) {
 		switch (fw_version->project) {
 		case PRCMU_FW_PROJECT_U8500_C2:
-		case PRCMU_FW_PROJECT_U8500_MBL:
+		case PRCMU_FW_PROJECT_U8500_SSG1:
 		case PRCMU_FW_PROJECT_U8520:
 		case PRCMU_FW_PROJECT_U8420:
 		case PRCMU_FW_PROJECT_U8420_SYSCLK:
+		case PRCMU_FW_PROJECT_U8500_SSG2:
 			sgaclk_parent = "soc0_pll";
 			break;
 		default:
diff --git a/drivers/mfd/db8500-prcmu.c b/drivers/mfd/db8500-prcmu.c
index dea4e4e8bed5..ca1145f1a11a 100644
--- a/drivers/mfd/db8500-prcmu.c
+++ b/drivers/mfd/db8500-prcmu.c
@@ -2565,14 +2565,16 @@ static char *fw_project_name(u32 project)
 		return "U8500 C4";
 	case PRCMU_FW_PROJECT_U9500_MBL:
 		return "U9500 MBL";
-	case PRCMU_FW_PROJECT_U8500_MBL:
-		return "U8500 MBL";
+	case PRCMU_FW_PROJECT_U8500_SSG1:
+		return "U8500 Samsung 1";
 	case PRCMU_FW_PROJECT_U8500_MBL2:
 		return "U8500 MBL2";
 	case PRCMU_FW_PROJECT_U8520:
 		return "U8520 MBL";
 	case PRCMU_FW_PROJECT_U8420:
 		return "U8420";
+	case PRCMU_FW_PROJECT_U8500_SSG2:
+		return "U8500 Samsung 2";
 	case PRCMU_FW_PROJECT_U8420_SYSCLK:
 		return "U8420-sysclk";
 	case PRCMU_FW_PROJECT_U9540:
diff --git a/include/linux/mfd/dbx500-prcmu.h b/include/linux/mfd/dbx500-prcmu.h
index e6ee2ec35de9..cbf9d7619493 100644
--- a/include/linux/mfd/dbx500-prcmu.h
+++ b/include/linux/mfd/dbx500-prcmu.h
@@ -186,10 +186,11 @@ enum ddr_pwrst {
 #define PRCMU_FW_PROJECT_U8500_C3	8
 #define PRCMU_FW_PROJECT_U8500_C4	9
 #define PRCMU_FW_PROJECT_U9500_MBL	10
-#define PRCMU_FW_PROJECT_U8500_MBL	11 /* Customer specific */
+#define PRCMU_FW_PROJECT_U8500_SSG1	11 /* Samsung specific */
 #define PRCMU_FW_PROJECT_U8500_MBL2	12 /* Customer specific */
 #define PRCMU_FW_PROJECT_U8520		13
 #define PRCMU_FW_PROJECT_U8420		14
+#define PRCMU_FW_PROJECT_U8500_SSG2	15 /* Samsung specific */
 #define PRCMU_FW_PROJECT_U8420_SYSCLK	17
 #define PRCMU_FW_PROJECT_A9420		20
 /* [32..63] 9540 and derivatives */
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality
  2021-08-01 23:33 [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality Linus Walleij
  2021-08-01 23:33 ` [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant Linus Walleij
@ 2021-08-02  7:45 ` Lee Jones
  1 sibling, 0 replies; 10+ messages in thread
From: Lee Jones @ 2021-08-02  7:45 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-kernel, phone-devel

On Mon, 02 Aug 2021, Linus Walleij wrote:

> These are the actual frequencies reported by the PLL, so let's
> report these. The roundoffs are inappropriate, we should round
> to the frequency that the clock will later report.
> 
> Drop some whitespace at the same time.
> 
> Cc: phone-devel@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  drivers/mfd/db8500-prcmu.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-01 23:33 ` [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant Linus Walleij
@ 2021-08-02  7:47   ` Lee Jones
  2021-08-04 22:52     ` Linus Walleij
  2021-08-05 23:50   ` Stephen Boyd
  2021-08-09  8:33   ` Lee Jones
  2 siblings, 1 reply; 10+ messages in thread
From: Lee Jones @ 2021-08-02  7:47 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, Michael Turquette, Stephen Boyd, linux-clk, phone-devel

On Mon, 02 Aug 2021, Linus Walleij wrote:

> There was an "unknown" firmware variant turning up in the wild
> causing problems in the clock driver. Add this missing variant
> and clarify that varian 11 and 15 are Samsung variants, as this
> is now very well known from released products.
> 
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: linux-clk@vger.kernel.org
> Cc: phone-devel@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Clock maintainers: could you please ACK this so Lee can take
> this into the MFD tree? The chances of merge collisions are
> zero, this code changes very seldom.
> ---
>  drivers/clk/ux500/u8500_of_clk.c | 3 ++-

>  drivers/mfd/db8500-prcmu.c       | 6 ++++--
>  include/linux/mfd/dbx500-prcmu.h | 3 ++-

Acked-by: Lee Jones <lee.jones@linaro.org>

>  3 files changed, 8 insertions(+), 4 deletions(-)

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-02  7:47   ` Lee Jones
@ 2021-08-04 22:52     ` Linus Walleij
  2021-08-05  8:00       ` Lee Jones
  0 siblings, 1 reply; 10+ messages in thread
From: Linus Walleij @ 2021-08-04 22:52 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-kernel, Michael Turquette, Stephen Boyd, linux-clk, phone-devel

On Mon, Aug 2, 2021 at 9:47 AM Lee Jones <lee.jones@linaro.org> wrote:
> On Mon, 02 Aug 2021, Linus Walleij wrote:
>
> > There was an "unknown" firmware variant turning up in the wild
> > causing problems in the clock driver. Add this missing variant
> > and clarify that varian 11 and 15 are Samsung variants, as this
> > is now very well known from released products.
> >
> > Cc: Michael Turquette <mturquette@baylibre.com>
> > Cc: Stephen Boyd <sboyd@kernel.org>
> > Cc: linux-clk@vger.kernel.org
> > Cc: phone-devel@vger.kernel.org
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > Clock maintainers: could you please ACK this so Lee can take
> > this into the MFD tree? The chances of merge collisions are
> > zero, this code changes very seldom.
> > ---
> >  drivers/clk/ux500/u8500_of_clk.c | 3 ++-
>
> >  drivers/mfd/db8500-prcmu.c       | 6 ++++--
> >  include/linux/mfd/dbx500-prcmu.h | 3 ++-
>
> Acked-by: Lee Jones <lee.jones@linaro.org>

Actually I intended for the clock people to ACK it for you
but since it is completely independent of 1/2 it actually works
either way, maybe they will rather pick it up, who knows? :D

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-04 22:52     ` Linus Walleij
@ 2021-08-05  8:00       ` Lee Jones
  2021-08-05 23:51         ` Stephen Boyd
  0 siblings, 1 reply; 10+ messages in thread
From: Lee Jones @ 2021-08-05  8:00 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, Michael Turquette, Stephen Boyd, linux-clk, phone-devel

On Thu, 05 Aug 2021, Linus Walleij wrote:

> On Mon, Aug 2, 2021 at 9:47 AM Lee Jones <lee.jones@linaro.org> wrote:
> > On Mon, 02 Aug 2021, Linus Walleij wrote:
> >
> > > There was an "unknown" firmware variant turning up in the wild
> > > causing problems in the clock driver. Add this missing variant
> > > and clarify that varian 11 and 15 are Samsung variants, as this
> > > is now very well known from released products.
> > >
> > > Cc: Michael Turquette <mturquette@baylibre.com>
> > > Cc: Stephen Boyd <sboyd@kernel.org>
> > > Cc: linux-clk@vger.kernel.org
> > > Cc: phone-devel@vger.kernel.org
> > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > > ---
> > > Clock maintainers: could you please ACK this so Lee can take
> > > this into the MFD tree? The chances of merge collisions are
> > > zero, this code changes very seldom.
> > > ---
> > >  drivers/clk/ux500/u8500_of_clk.c | 3 ++-
> >
> > >  drivers/mfd/db8500-prcmu.c       | 6 ++++--
> > >  include/linux/mfd/dbx500-prcmu.h | 3 ++-
> >
> > Acked-by: Lee Jones <lee.jones@linaro.org>
> 
> Actually I intended for the clock people to ACK it for you
> but since it is completely independent of 1/2 it actually works
> either way, maybe they will rather pick it up, who knows? :D

That's fine too.

I assume they will not require an immutable branch, as the turn-over
in this file is very low.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-01 23:33 ` [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant Linus Walleij
  2021-08-02  7:47   ` Lee Jones
@ 2021-08-05 23:50   ` Stephen Boyd
  2021-08-09  8:33   ` Lee Jones
  2 siblings, 0 replies; 10+ messages in thread
From: Stephen Boyd @ 2021-08-05 23:50 UTC (permalink / raw)
  To: Lee Jones, Linus Walleij, linux-kernel
  Cc: Linus Walleij, Michael Turquette, linux-clk, phone-devel

Quoting Linus Walleij (2021-08-01 16:33:14)
> There was an "unknown" firmware variant turning up in the wild
> causing problems in the clock driver. Add this missing variant
> and clarify that varian 11 and 15 are Samsung variants, as this
> is now very well known from released products.
> 
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: linux-clk@vger.kernel.org
> Cc: phone-devel@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---

Acked-by: Stephen Boyd <sboyd@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-05  8:00       ` Lee Jones
@ 2021-08-05 23:51         ` Stephen Boyd
  2021-08-06  8:14           ` Linus Walleij
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Boyd @ 2021-08-05 23:51 UTC (permalink / raw)
  To: Lee Jones, Linus Walleij
  Cc: linux-kernel, Michael Turquette, linux-clk, phone-devel

Quoting Lee Jones (2021-08-05 01:00:09)
> On Thu, 05 Aug 2021, Linus Walleij wrote:
> 
> > On Mon, Aug 2, 2021 at 9:47 AM Lee Jones <lee.jones@linaro.org> wrote:
> > > On Mon, 02 Aug 2021, Linus Walleij wrote:
> > >
> > > > There was an "unknown" firmware variant turning up in the wild
> > > > causing problems in the clock driver. Add this missing variant
> > > > and clarify that varian 11 and 15 are Samsung variants, as this
> > > > is now very well known from released products.
> > > >
> > > > Cc: Michael Turquette <mturquette@baylibre.com>
> > > > Cc: Stephen Boyd <sboyd@kernel.org>
> > > > Cc: linux-clk@vger.kernel.org
> > > > Cc: phone-devel@vger.kernel.org
> > > > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > > > ---
> > > > Clock maintainers: could you please ACK this so Lee can take
> > > > this into the MFD tree? The chances of merge collisions are
> > > > zero, this code changes very seldom.
> > > > ---
> > > >  drivers/clk/ux500/u8500_of_clk.c | 3 ++-
> > >
> > > >  drivers/mfd/db8500-prcmu.c       | 6 ++++--
> > > >  include/linux/mfd/dbx500-prcmu.h | 3 ++-
> > >
> > > Acked-by: Lee Jones <lee.jones@linaro.org>
> > 
> > Actually I intended for the clock people to ACK it for you
> > but since it is completely independent of 1/2 it actually works
> > either way, maybe they will rather pick it up, who knows? :D
> 
> That's fine too.
> 
> I assume they will not require an immutable branch, as the turn-over
> in this file is very low.
> 

Seems fine to go through mfd. Isn't there some other ux500 patch on the
list though?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-05 23:51         ` Stephen Boyd
@ 2021-08-06  8:14           ` Linus Walleij
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Walleij @ 2021-08-06  8:14 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Lee Jones, linux-kernel, Michael Turquette, linux-clk, phone-devel

On Fri, Aug 6, 2021 at 1:51 AM Stephen Boyd <sboyd@kernel.org> wrote:

> > I assume they will not require an immutable branch, as the turn-over
> > in this file is very low.
>
> Seems fine to go through mfd. Isn't there some other ux500 patch on the
> list though?

Not for clocking, maybe more MFD stuff so merging to MFD should be
the best option.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant
  2021-08-01 23:33 ` [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant Linus Walleij
  2021-08-02  7:47   ` Lee Jones
  2021-08-05 23:50   ` Stephen Boyd
@ 2021-08-09  8:33   ` Lee Jones
  2 siblings, 0 replies; 10+ messages in thread
From: Lee Jones @ 2021-08-09  8:33 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-kernel, Michael Turquette, Stephen Boyd, linux-clk, phone-devel

On Mon, 02 Aug 2021, Linus Walleij wrote:

> There was an "unknown" firmware variant turning up in the wild
> causing problems in the clock driver. Add this missing variant
> and clarify that varian 11 and 15 are Samsung variants, as this
> is now very well known from released products.
> 
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: linux-clk@vger.kernel.org
> Cc: phone-devel@vger.kernel.org
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> Clock maintainers: could you please ACK this so Lee can take
> this into the MFD tree? The chances of merge collisions are
> zero, this code changes very seldom.
> ---
>  drivers/clk/ux500/u8500_of_clk.c | 3 ++-
>  drivers/mfd/db8500-prcmu.c       | 6 ++++--
>  include/linux/mfd/dbx500-prcmu.h | 3 ++-
>  3 files changed, 8 insertions(+), 4 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-08-09  8:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-01 23:33 [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality Linus Walleij
2021-08-01 23:33 ` [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant Linus Walleij
2021-08-02  7:47   ` Lee Jones
2021-08-04 22:52     ` Linus Walleij
2021-08-05  8:00       ` Lee Jones
2021-08-05 23:51         ` Stephen Boyd
2021-08-06  8:14           ` Linus Walleij
2021-08-05 23:50   ` Stephen Boyd
2021-08-09  8:33   ` Lee Jones
2021-08-02  7:45 ` [PATCH 1/2] mfd: db8500-prcmu: Adjust map to reality Lee Jones

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).