Skip to contentSkip to conversation

mfd: db8500-prcmu: Adjust map to reality

PATCH Applied Linus Walleij 3 participants 10 messages Aug 1, 2021 – Aug 9, 2021

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mfd: db8500-prcmu: Adjust map to reality

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.

---
 drivers/mfd/db8500-prcmu.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
drivers/mfd/db8500-prcmu.c +6 -8
index 3bde7fda755f..dea4e4e8bed5 100644
@@ -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;
Signature · 1 line
2.31.1
#1 lore raw

PATCH 2/2 mfd: db8500-prcmu: Handle missing FW variant

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.

---
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(-)
drivers/clk/ux500/u8500_of_clk.c +2 -1
index 0aedd42fad52..528c5bb397cc 100644
@@ -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:
drivers/mfd/db8500-prcmu.c +4 -2
index dea4e4e8bed5..ca1145f1a11a 100644
@@ -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:
include/linux/mfd/dbx500-prcmu.h +2 -1
index e6ee2ec35de9..cbf9d7619493 100644
@@ -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 */
Signature · 1 line
2.31.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant

Quoted 14 lines · Linus Walleij

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.

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

Quoted 5 lines
---
 drivers/clk/ux500/u8500_of_clk.c | 3 ++-
 drivers/mfd/db8500-prcmu.c       | 6 ++++--
 include/linux/mfd/dbx500-prcmu.h | 3 ++-
Quoted 1 line
 3 files changed, 8 insertions(+), 4 deletions(-)
Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
#3 lore raw

Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant

Quoted 19 lines · Lee Jones
Quoted 16 lines · Linus Walleij

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.

---
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 ++-
Quoted 4 lines
Quoted 2 lines
 drivers/mfd/db8500-prcmu.c       | 6 ++++--
 include/linux/mfd/dbx500-prcmu.h | 3 ++-

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

#4 lore raw

Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant

Quoted 20 lines · Linus Walleij
Quoted 19 lines · Lee Jones
Quoted 16 lines · Linus Walleij

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.

---
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 ++-
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
 drivers/mfd/db8500-prcmu.c       | 6 ++++--
 include/linux/mfd/dbx500-prcmu.h | 3 ++-

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.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#5 lore raw

Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant

Quoting Lee Jones (2021-08-05 01:00:09)

Quoted 27 lines · Linus Walleij
Quoted 26 lines · Lee Jones
Quoted 23 lines · Linus Walleij
Quoted 15 lines

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.

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

Quoted 5 lines
---
 drivers/clk/ux500/u8500_of_clk.c | 3 ++-
 drivers/mfd/db8500-prcmu.c       | 6 ++++--
 include/linux/mfd/dbx500-prcmu.h | 3 ++-
Quoted 9 lines
Quoted 3 lines

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?

#6 lore raw

Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant

Quoted 5 lines · Stephen Boyd
Quoted 2 lines

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

maintainer Acked-by on v1 2/2
#7 lore raw

Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant

In reply to Linus Walleij

Quoting Linus Walleij (2021-08-01 16:33:14)

Quoted 11 lines

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.

---

Applied
#8 lore raw

Re: [PATCH 2/2] mfd: db8500-prcmu: Handle missing FW variant

In reply to Linus Walleij
Quoted 14 lines · Linus Walleij

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.

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

Quoted 5 lines
---
 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.

Signature · 4 lines
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Applied
#9 lore raw
In reply to Linus Walleij
Quoted 11 lines · Linus Walleij

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.

---
 drivers/mfd/db8500-prcmu.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

Applied, thanks.

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