Skip to contentSkip to conversation

clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9

PATCH Applied Pali Rohár 3 participants 7 messages Nov 6, 2020 – Dec 21, 2020

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

PATCH 1/1 clk: mvebu: a3700: fix the XTAL MODE pin to MPP1_9

From: Terry Zhou <[email protected]>

There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8.

[pali: Fix pin name in commit message]
Fixes 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")

---
This patch is present in Marvell SDK and also in Marvell's kernel fork:
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134

Konstantin Porotchkin wrote on Github that Gregory Clement was notified about this patch, but as this patch is still not in mainline kernel I'm sending it again for review.

In original commit message (only in commit message, not code) was specified MPP9 pin on South Bridge, but correct is North Bridge.

---
 drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/mvebu/armada-37xx-xtal.c +2 -2
index e9e306d4e9af..41271351cf1f 100644
@@ -13,8 +13,8 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
-#define NB_GPIO1_LATCH	0xC
-#define XTAL_MODE	    BIT(31)
+#define NB_GPIO1_LATCH	0x8
+#define XTAL_MODE	    BIT(9)
 
 static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
 {
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Also, this is how A3720 WTMI code and ATF determines XTAL clock rate. No reason for kernel to do it differently.

Quoted 41 lines · On Fri, 6 Nov 2020 11:00:39 +0100 Pali Rohár <[email protected]> wrote:

From: Terry Zhou <[email protected]>

There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8.

[pali: Fix pin name in commit message]
Fixes 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")

---
This patch is present in Marvell SDK and also in Marvell's kernel fork:
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134

Konstantin Porotchkin wrote on Github that Gregory Clement was notified about this patch, but as this patch is still not in mainline kernel I'm sending it again for review.

In original commit message (only in commit message, not code) was specified MPP9 pin on South Bridge, but correct is North Bridge.

---
 drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/mvebu/armada-37xx-xtal.c +2 -2
index e9e306d4e9af..41271351cf1f 100644
@@ -13,8 +13,8 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
-#define NB_GPIO1_LATCH	0xC
-#define XTAL_MODE	    BIT(31)
+#define NB_GPIO1_LATCH	0x8
+#define XTAL_MODE	    BIT(9)
 
 static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
 {
#2 lore raw

Michael, Stephen: Could you take this clk patch?

Quoted 50 lines · On Friday 06 November 2020 11:51:18 Marek Behún wrote:

Also, this is how A3720 WTMI code and ATF determines XTAL clock rate. No reason for kernel to do it differently.

Quoted 41 lines · On Fri, 6 Nov 2020 11:00:39 +0100 Pali Rohár <[email protected]> wrote:

From: Terry Zhou <[email protected]>

There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8.

[pali: Fix pin name in commit message]
Fixes 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")

---
This patch is present in Marvell SDK and also in Marvell's kernel fork:
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134

Konstantin Porotchkin wrote on Github that Gregory Clement was notified about this patch, but as this patch is still not in mainline kernel I'm sending it again for review.

In original commit message (only in commit message, not code) was specified MPP9 pin on South Bridge, but correct is North Bridge.

---
 drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/mvebu/armada-37xx-xtal.c +2 -2
index e9e306d4e9af..41271351cf1f 100644
@@ -13,8 +13,8 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
-#define NB_GPIO1_LATCH	0xC
-#define XTAL_MODE	    BIT(31)
+#define NB_GPIO1_LATCH	0x8
+#define XTAL_MODE	    BIT(9)
 
 static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
 {
#3 lore raw

PING! I would like to remind this patch.

Quoted 53 lines · On Friday 13 November 2020 11:19:19 Pali Rohár wrote:

Michael, Stephen: Could you take this clk patch?

Quoted 50 lines · On Friday 06 November 2020 11:51:18 Marek Behún wrote:

Also, this is how A3720 WTMI code and ATF determines XTAL clock rate. No reason for kernel to do it differently.

Quoted 41 lines · On Fri, 6 Nov 2020 11:00:39 +0100 Pali Rohár <[email protected]> wrote:

From: Terry Zhou <[email protected]>

There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8.

[pali: Fix pin name in commit message]
Fixes 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")

---
This patch is present in Marvell SDK and also in Marvell's kernel fork:
https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/80d4cec4cef8282e5ac3aaf98ce3e68fb299a134

Konstantin Porotchkin wrote on Github that Gregory Clement was notified about this patch, but as this patch is still not in mainline kernel I'm sending it again for review.

In original commit message (only in commit message, not code) was specified MPP9 pin on South Bridge, but correct is North Bridge.

---
 drivers/clk/mvebu/armada-37xx-xtal.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/mvebu/armada-37xx-xtal.c +2 -2
index e9e306d4e9af..41271351cf1f 100644
@@ -13,8 +13,8 @@
 #include <linux/platform_device.h>
 #include <linux/regmap.h>
 
-#define NB_GPIO1_LATCH	0xC
-#define XTAL_MODE	    BIT(31)
+#define NB_GPIO1_LATCH	0x8
+#define XTAL_MODE	    BIT(9)
 
 static int armada_3700_xtal_clock_probe(struct platform_device *pdev)
 {
maintainer Applied
#4 lore raw
In reply to Pali Rohár

Quoting Pali Rohár (2020-11-06 02:00:39)

Quoted 6 lines

From: Terry Zhou <[email protected]>

There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8.

Quoted 7 lines
[pali: Fix pin name in commit message]
Fixes 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")

---

Applied to clk-next

#5 lore raw
Quoted 13 lines · On Saturday 19 December 2020 15:51:30 Stephen Boyd wrote:

Quoting Pali Rohár (2020-11-06 02:00:39)

Quoted 12 lines

From: Terry Zhou <[email protected]>

There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8.

[pali: Fix pin name in commit message]
Fixes 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
Quoted 3 lines
Quoted 1 line

---

Applied to clk-next

Hello Stephen! As this is fix also for stable releases, could you please queue this patch for 5.11 release?

maintainer
#6 lore raw

Quoting Pali Rohár (2020-12-20 08:21:35)

Quoted 14 lines · On Saturday 19 December 2020 15:51:30 Stephen Boyd wrote:
Quoted 13 lines

Quoting Pali Rohár (2020-11-06 02:00:39)

Quoted 12 lines

From: Terry Zhou <[email protected]>

There is an error in the current code that the XTAL MODE pin was set to NB MPP1_31 which should be NB MPP1_9. The latch register of NB MPP1_9 has different offset of 0x8.

[pali: Fix pin name in commit message]
Fixes 7ea8250406a6 ("clk: mvebu: Add the xtal clock for Armada 3700 SoC")
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

---

Applied to clk-next

Hello Stephen! As this is fix also for stable releases, could you please queue this patch for 5.11 release?

No problem.