All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE
@ 2018-03-16 20:27 Hauke Mehrtens
  2018-03-16 20:27 ` [PATCH v2 1/3] MIPS: lantiq: fix Danube USB clock Hauke Mehrtens
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2018-03-16 20:27 UTC (permalink / raw)
  To: ralf, jhogan; +Cc: john, dev, linux-mips, martin.blumenstingl, Hauke Mehrtens

This fixes multiple bugs which were introduced when changing the driver
for the reset controller unit. The mid term plan is to move these SoCs
to the common clock framework and replace most of the code in sysctrl.c.

Mathias Kresin (3):
  MIPS: lantiq: fix Danube USB clock
  MIPS: lantiq: enable AHB Bus for USB
  MIPS: lantiq: ase: Enable MFD_SYSCON

 arch/mips/lantiq/Kconfig        | 2 ++
 arch/mips/lantiq/xway/sysctrl.c | 6 +++---
 2 files changed, 5 insertions(+), 3 deletions(-)

-- 
2.11.0

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

* [PATCH v2 1/3] MIPS: lantiq: fix Danube USB clock
  2018-03-16 20:27 [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE Hauke Mehrtens
@ 2018-03-16 20:27 ` Hauke Mehrtens
  2018-03-16 20:27 ` [PATCH v2 2/3] MIPS: lantiq: enable AHB Bus for USB Hauke Mehrtens
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2018-03-16 20:27 UTC (permalink / raw)
  To: ralf, jhogan
  Cc: john, dev, linux-mips, martin.blumenstingl, # 4 . 14+, Hauke Mehrtens

From: Mathias Kresin <dev@kresin.me>

On Danube the USB0 controller registers are at 1e101000 and the USB0 PHY
register is at 1f203018 similar to all other lantiq SoCs. Activate the
USB controller gating clock thorough the USB controller driver and not
the PHY.

This fixes a problem introduced in a previous commit.

Fixes: dea54fbad332 ("phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module")
Cc: <stable@vger.kernel.org> # 4.14+
Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/mips/lantiq/xway/sysctrl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c
index 52500d3b7004..f11f1dd10493 100644
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
@@ -560,7 +560,7 @@ void __init ltq_soc_init(void)
 	} else {
 		clkdev_add_static(ltq_danube_cpu_hz(), ltq_danube_fpi_hz(),
 				ltq_danube_fpi_hz(), ltq_danube_pp32_hz());
-		clkdev_add_pmu("1f203018.usb2-phy", "ctrl", 1, 0, PMU_USB0);
+		clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0);
 		clkdev_add_pmu("1f203018.usb2-phy", "phy", 1, 0, PMU_USB0_P);
 		clkdev_add_pmu("1e103000.sdio", NULL, 1, 0, PMU_SDIO);
 		clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
-- 
2.11.0

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

* [PATCH v2 2/3] MIPS: lantiq: enable AHB Bus for USB
  2018-03-16 20:27 [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE Hauke Mehrtens
  2018-03-16 20:27 ` [PATCH v2 1/3] MIPS: lantiq: fix Danube USB clock Hauke Mehrtens
@ 2018-03-16 20:27 ` Hauke Mehrtens
  2018-03-16 20:27 ` [PATCH v2 3/3] MIPS: lantiq: ase: Enable MFD_SYSCON Hauke Mehrtens
  2018-03-21 22:31 ` [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE James Hogan
  3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2018-03-16 20:27 UTC (permalink / raw)
  To: ralf, jhogan
  Cc: john, dev, linux-mips, martin.blumenstingl, # 4 . 14+, Hauke Mehrtens

From: Mathias Kresin <dev@kresin.me>

On Danube and AR9 the USB core is connected though a AHB bus to the main
system cross bar, hence we need to enable the gating clock of the AHB
Bus as well to make the USB controller work.

Fixes: dea54fbad332 ("phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module")
Cc: <stable@vger.kernel.org> # 4.14+
Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/mips/lantiq/xway/sysctrl.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/lantiq/xway/sysctrl.c b/arch/mips/lantiq/xway/sysctrl.c
index f11f1dd10493..e0af39b33e28 100644
--- a/arch/mips/lantiq/xway/sysctrl.c
+++ b/arch/mips/lantiq/xway/sysctrl.c
@@ -549,9 +549,9 @@ void __init ltq_soc_init(void)
 		clkdev_add_static(ltq_ar9_cpu_hz(), ltq_ar9_fpi_hz(),
 				ltq_ar9_fpi_hz(), CLOCK_250M);
 		clkdev_add_pmu("1f203018.usb2-phy", "phy", 1, 0, PMU_USB0_P);
-		clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0);
+		clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0 | PMU_AHBM);
 		clkdev_add_pmu("1f203034.usb2-phy", "phy", 1, 0, PMU_USB1_P);
-		clkdev_add_pmu("1e106000.usb", "otg", 1, 0, PMU_USB1);
+		clkdev_add_pmu("1e106000.usb", "otg", 1, 0, PMU_USB1 | PMU_AHBM);
 		clkdev_add_pmu("1e180000.etop", "switch", 1, 0, PMU_SWITCH);
 		clkdev_add_pmu("1e103000.sdio", NULL, 1, 0, PMU_SDIO);
 		clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
@@ -560,7 +560,7 @@ void __init ltq_soc_init(void)
 	} else {
 		clkdev_add_static(ltq_danube_cpu_hz(), ltq_danube_fpi_hz(),
 				ltq_danube_fpi_hz(), ltq_danube_pp32_hz());
-		clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0);
+		clkdev_add_pmu("1e101000.usb", "otg", 1, 0, PMU_USB0 | PMU_AHBM);
 		clkdev_add_pmu("1f203018.usb2-phy", "phy", 1, 0, PMU_USB0_P);
 		clkdev_add_pmu("1e103000.sdio", NULL, 1, 0, PMU_SDIO);
 		clkdev_add_pmu("1e103100.deu", NULL, 1, 0, PMU_DEU);
-- 
2.11.0

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

* [PATCH v2 3/3] MIPS: lantiq: ase: Enable MFD_SYSCON
  2018-03-16 20:27 [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE Hauke Mehrtens
  2018-03-16 20:27 ` [PATCH v2 1/3] MIPS: lantiq: fix Danube USB clock Hauke Mehrtens
  2018-03-16 20:27 ` [PATCH v2 2/3] MIPS: lantiq: enable AHB Bus for USB Hauke Mehrtens
@ 2018-03-16 20:27 ` Hauke Mehrtens
  2018-03-21 22:31 ` [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE James Hogan
  3 siblings, 0 replies; 5+ messages in thread
From: Hauke Mehrtens @ 2018-03-16 20:27 UTC (permalink / raw)
  To: ralf, jhogan
  Cc: john, dev, linux-mips, martin.blumenstingl, # 4 . 14+, Hauke Mehrtens

From: Mathias Kresin <dev@kresin.me>

Enable syscon to use it for the RCU MFD on Amazon SE as well.

The Amazon SE also has similar reset controller system as Danube and
XWAY and use their drivers mostly. As these drivers now need syscon also
activate the syscon subsystem for for Amazon SE.

Fixes: 2b6639d4c794 ("MIPS: lantiq: Enable MFD_SYSCON to be able to use it for the RCU MFD")
Cc: <stable@vger.kernel.org> # 4.14+
Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: Martin Blumenstingl<martin.blumenstingl@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 arch/mips/lantiq/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/mips/lantiq/Kconfig b/arch/mips/lantiq/Kconfig
index 692ae85a3e3d..8e3a1fc2bc39 100644
--- a/arch/mips/lantiq/Kconfig
+++ b/arch/mips/lantiq/Kconfig
@@ -13,6 +13,8 @@ choice
 config SOC_AMAZON_SE
 	bool "Amazon SE"
 	select SOC_TYPE_XWAY
+	select MFD_SYSCON
+	select MFD_CORE
 
 config SOC_XWAY
 	bool "XWAY"
-- 
2.11.0

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

* Re: [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE
  2018-03-16 20:27 [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE Hauke Mehrtens
                   ` (2 preceding siblings ...)
  2018-03-16 20:27 ` [PATCH v2 3/3] MIPS: lantiq: ase: Enable MFD_SYSCON Hauke Mehrtens
@ 2018-03-21 22:31 ` James Hogan
  3 siblings, 0 replies; 5+ messages in thread
From: James Hogan @ 2018-03-21 22:31 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: ralf, john, dev, linux-mips, martin.blumenstingl

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

On Fri, Mar 16, 2018 at 09:27:27PM +0100, Hauke Mehrtens wrote:
> This fixes multiple bugs which were introduced when changing the driver
> for the reset controller unit. The mid term plan is to move these SoCs
> to the common clock framework and replace most of the code in sysctrl.c.
> 
> Mathias Kresin (3):
>   MIPS: lantiq: fix Danube USB clock
>   MIPS: lantiq: enable AHB Bus for USB
>   MIPS: lantiq: ase: Enable MFD_SYSCON

Applied for 4.16

Thanks
James

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2018-03-21 22:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-16 20:27 [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE Hauke Mehrtens
2018-03-16 20:27 ` [PATCH v2 1/3] MIPS: lantiq: fix Danube USB clock Hauke Mehrtens
2018-03-16 20:27 ` [PATCH v2 2/3] MIPS: lantiq: enable AHB Bus for USB Hauke Mehrtens
2018-03-16 20:27 ` [PATCH v2 3/3] MIPS: lantiq: ase: Enable MFD_SYSCON Hauke Mehrtens
2018-03-21 22:31 ` [PATCH v2 0/3] MIPS: lantiq: fixes for clocks and Amazon SE James Hogan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.