linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix l4_ls interface clock and enable RTC
@ 2016-02-22 23:04 Tony Lindgren
  2016-02-22 23:04 ` [PATCH 1/4] ARM: OMAP2+: Fix hwmod clock for l4_ls Tony Lindgren
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Tony Lindgren @ 2016-02-22 23:04 UTC (permalink / raw)
  To: linux-omap
  Cc: Matthijs van Duin, Nicolas Chauvet, Neil Armstrong,
	Philipp Rosenberger, Delio Brignoli, Brian Hutchinson,
	linux-arm-kernel

Hi all,

Here are few ti81xx related improvments for v4.6 merge window.

Regards,

Tony


Tony Lindgren (4):
  ARM: OMAP2+: Fix hwmod clock for l4_ls
  ARM: OMAP2+: Add rtc hwmod configuration for ti81xx
  ARM: dts: Add RTC entry for dm814x and dra62x
  ARM: dts: Add RTC entry for dm816x

 arch/arm/boot/dts/dm814x.dtsi              |  7 +++++
 arch/arm/boot/dts/dm816x.dtsi              |  7 +++++
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 47 ++++++++++++++++++++++++++++--
 3 files changed, 59 insertions(+), 2 deletions(-)

-- 
2.7.0

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

* [PATCH 1/4] ARM: OMAP2+: Fix hwmod clock for l4_ls
  2016-02-22 23:04 [PATCH 0/4] Fix l4_ls interface clock and enable RTC Tony Lindgren
@ 2016-02-22 23:04 ` Tony Lindgren
  2016-02-26 19:04   ` Tony Lindgren
  2016-02-22 23:04 ` [PATCH 2/4] ARM: OMAP2+: Add rtc hwmod configuration for ti81xx Tony Lindgren
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Tony Lindgren @ 2016-02-22 23:04 UTC (permalink / raw)
  To: linux-omap
  Cc: Paul Walmsley, Matthijs van Duin, Nicolas Chauvet, Neil Armstrong,
	Philipp Rosenberger, Delio Brignoli, Brian Hutchinson,
	linux-arm-kernel

Looks like we have few cases with wrong clock, and some
entries with missing clock. It should always be sysclk6
for the l4_ls instance.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index e493ae3..f8cc400 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -429,6 +429,7 @@ static struct omap_hwmod dm81xx_elm_hwmod = {
 static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
 	.master		= &dm81xx_l4_ls_hwmod,
 	.slave		= &dm81xx_elm_hwmod,
+	.clk		= "sysclk6_ck",
 	.user		= OCP_USER_MPU,
 };
 
@@ -478,6 +479,7 @@ static struct omap_hwmod dm81xx_gpio1_hwmod = {
 static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
 	.master		= &dm81xx_l4_ls_hwmod,
 	.slave		= &dm81xx_gpio1_hwmod,
+	.clk		= "sysclk6_ck",
 	.user		= OCP_USER_MPU,
 };
 
@@ -504,6 +506,7 @@ static struct omap_hwmod dm81xx_gpio2_hwmod = {
 static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
 	.master		= &dm81xx_l4_ls_hwmod,
 	.slave		= &dm81xx_gpio2_hwmod,
+	.clk		= "sysclk6_ck",
 	.user		= OCP_USER_MPU,
 };
 
@@ -628,7 +631,7 @@ static struct omap_hwmod dm814x_timer1_hwmod = {
 static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = {
 	.master		= &dm81xx_l4_ls_hwmod,
 	.slave		= &dm814x_timer1_hwmod,
-	.clk		= "timer1_fck",
+	.clk		= "sysclk6_ck",
 	.user		= OCP_USER_MPU,
 };
 
@@ -665,7 +668,7 @@ static struct omap_hwmod dm814x_timer2_hwmod = {
 static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = {
 	.master		= &dm81xx_l4_ls_hwmod,
 	.slave		= &dm814x_timer2_hwmod,
-	.clk		= "timer2_fck",
+	.clk		= "sysclk6_ck",
 	.user		= OCP_USER_MPU,
 };
 
@@ -1123,6 +1126,7 @@ static struct omap_hwmod dm81xx_mailbox_hwmod = {
 static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
 	.master		= &dm81xx_l4_ls_hwmod,
 	.slave		= &dm81xx_mailbox_hwmod,
+	.clk		= "sysclk6_ck",
 	.user		= OCP_USER_MPU,
 };
 
@@ -1157,6 +1161,7 @@ static struct omap_hwmod dm81xx_spinbox_hwmod = {
 static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = {
 	.master		= &dm81xx_l4_ls_hwmod,
 	.slave		= &dm81xx_spinbox_hwmod,
+	.clk		= "sysclk6_ck",
 	.user		= OCP_USER_MPU,
 };
 
-- 
2.7.0

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

* [PATCH 2/4] ARM: OMAP2+: Add rtc hwmod configuration for ti81xx
  2016-02-22 23:04 [PATCH 0/4] Fix l4_ls interface clock and enable RTC Tony Lindgren
  2016-02-22 23:04 ` [PATCH 1/4] ARM: OMAP2+: Fix hwmod clock for l4_ls Tony Lindgren
@ 2016-02-22 23:04 ` Tony Lindgren
  2016-02-22 23:04 ` [PATCH 3/4] ARM: dts: Add RTC entry for dm814x and dra62x Tony Lindgren
  2016-02-22 23:04 ` [PATCH 4/4] ARM: dts: Add RTC entry for dm816x Tony Lindgren
  3 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2016-02-22 23:04 UTC (permalink / raw)
  To: linux-omap
  Cc: Paul Walmsley, Matthijs van Duin, Nicolas Chauvet, Neil Armstrong,
	Philipp Rosenberger, Delio Brignoli, Brian Hutchinson,
	linux-arm-kernel

This allows RTC to work properly with the related DTS
changes.

Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap_hwmod_81xx_data.c | 38 ++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
index f8cc400..39736ad 100644
--- a/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_81xx_data.c
@@ -228,6 +228,42 @@ static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = {
 	.user	= OCP_USER_MPU,
 };
 
+/* RTC */
+static struct omap_hwmod_class_sysconfig ti81xx_rtc_sysc = {
+	.rev_offs	= 0x74,
+	.sysc_offs	= 0x78,
+	.sysc_flags	= SYSC_HAS_SIDLEMODE,
+	.idlemodes	= SIDLE_FORCE | SIDLE_NO |
+			  SIDLE_SMART | SIDLE_SMART_WKUP,
+	.sysc_fields	= &omap_hwmod_sysc_type3,
+};
+
+static struct omap_hwmod_class ti81xx_rtc_hwmod_class = {
+	.name		= "rtc",
+	.sysc		= &ti81xx_rtc_sysc,
+};
+
+struct omap_hwmod ti81xx_rtc_hwmod = {
+	.name		= "rtc",
+	.class		= &ti81xx_rtc_hwmod_class,
+	.clkdm_name	= "alwon_l3s_clkdm",
+	.flags		= HWMOD_NO_IDLEST,
+	.main_clk	= "sysclk18_ck",
+	.prcm		= {
+		.omap4	= {
+			.clkctrl_offs = DM81XX_CM_ALWON_RTC_CLKCTRL,
+			.modulemode = MODULEMODE_SWCTRL,
+		},
+	},
+};
+
+static struct omap_hwmod_ocp_if ti81xx_l4_ls__rtc = {
+	.master		= &dm81xx_l4_ls_hwmod,
+	.slave		= &ti81xx_rtc_hwmod,
+	.clk		= "sysclk6_ck",
+	.user		= OCP_USER_MPU,
+};
+
 /* UART common */
 static struct omap_hwmod_class_sysconfig uart_sysc = {
 	.rev_offs	= 0x50,
@@ -1381,6 +1417,7 @@ static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = {
 	&dm81xx_l4_ls__mcspi1,
 	&dm814x_l4_ls__mmc1,
 	&dm814x_l4_ls__mmc2,
+	&ti81xx_l4_ls__rtc,
 	&dm81xx_alwon_l3_fast__tpcc,
 	&dm81xx_alwon_l3_fast__tptc0,
 	&dm81xx_alwon_l3_fast__tptc1,
@@ -1420,6 +1457,7 @@ static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
 	&dm81xx_l4_ls__gpio1,
 	&dm81xx_l4_ls__gpio2,
 	&dm81xx_l4_ls__elm,
+	&ti81xx_l4_ls__rtc,
 	&dm816x_l4_ls__mmc1,
 	&dm816x_l4_ls__timer1,
 	&dm816x_l4_ls__timer2,
-- 
2.7.0

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

* [PATCH 3/4] ARM: dts: Add RTC entry for dm814x and dra62x
  2016-02-22 23:04 [PATCH 0/4] Fix l4_ls interface clock and enable RTC Tony Lindgren
  2016-02-22 23:04 ` [PATCH 1/4] ARM: OMAP2+: Fix hwmod clock for l4_ls Tony Lindgren
  2016-02-22 23:04 ` [PATCH 2/4] ARM: OMAP2+: Add rtc hwmod configuration for ti81xx Tony Lindgren
@ 2016-02-22 23:04 ` Tony Lindgren
  2016-02-22 23:04 ` [PATCH 4/4] ARM: dts: Add RTC entry for dm816x Tony Lindgren
  3 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2016-02-22 23:04 UTC (permalink / raw)
  To: linux-omap
  Cc: Matthijs van Duin, Nicolas Chauvet, Neil Armstrong,
	Philipp Rosenberger, Delio Brignoli, Brian Hutchinson,
	linux-arm-kernel

Add RTC entry for dm814x and dra62x.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/dm814x.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/dm814x.dtsi b/arch/arm/boot/dts/dm814x.dtsi
index 3fe68b1..f752ac1 100644
--- a/arch/arm/boot/dts/dm814x.dtsi
+++ b/arch/arm/boot/dts/dm814x.dtsi
@@ -305,6 +305,13 @@
 				reg = <0x60000 0x1000>;
 			};
 
+			rtc: rtc@c0000 {
+				compatible = "ti,am3352-rtc", "ti,da830-rtc";
+				reg = <0xc0000 0x1000>;
+				interrupts = <75 76>;
+				ti,hwmods = "rtc";
+			};
+
 			mmc2: mmc@1d8000 {
 				compatible = "ti,omap4-hsmmc";
 				ti,hwmods = "mmc2";
-- 
2.7.0

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

* [PATCH 4/4] ARM: dts: Add RTC entry for dm816x
  2016-02-22 23:04 [PATCH 0/4] Fix l4_ls interface clock and enable RTC Tony Lindgren
                   ` (2 preceding siblings ...)
  2016-02-22 23:04 ` [PATCH 3/4] ARM: dts: Add RTC entry for dm814x and dra62x Tony Lindgren
@ 2016-02-22 23:04 ` Tony Lindgren
  3 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2016-02-22 23:04 UTC (permalink / raw)
  To: linux-omap
  Cc: Matthijs van Duin, Nicolas Chauvet, Neil Armstrong,
	Philipp Rosenberger, Delio Brignoli, Brian Hutchinson,
	linux-arm-kernel

Add RTC entry for dm816x.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/boot/dts/dm816x.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi
index c3b8811..e850686 100644
--- a/arch/arm/boot/dts/dm816x.dtsi
+++ b/arch/arm/boot/dts/dm816x.dtsi
@@ -214,6 +214,13 @@
 			reg = <0x48200000 0x1000>;
 		};
 
+		rtc: rtc@480c0000 {
+			compatible = "ti,am3352-rtc", "ti,da830-rtc";
+			reg = <0x480c0000 0x1000>;
+			interrupts = <75 76>;
+			ti,hwmods = "rtc";
+		};
+
 		mailbox: mailbox@480c8000 {
 			compatible = "ti,omap4-mailbox";
 			reg = <0x480c8000 0x2000>;
-- 
2.7.0

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

* Re: [PATCH 1/4] ARM: OMAP2+: Fix hwmod clock for l4_ls
  2016-02-22 23:04 ` [PATCH 1/4] ARM: OMAP2+: Fix hwmod clock for l4_ls Tony Lindgren
@ 2016-02-26 19:04   ` Tony Lindgren
  0 siblings, 0 replies; 6+ messages in thread
From: Tony Lindgren @ 2016-02-26 19:04 UTC (permalink / raw)
  To: linux-omap
  Cc: Paul Walmsley, Matthijs van Duin, Nicolas Chauvet, Neil Armstrong,
	Philipp Rosenberger, Delio Brignoli, Brian Hutchinson,
	linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [160222 15:04]:
> Looks like we have few cases with wrong clock, and some
> entries with missing clock. It should always be sysclk6
> for the l4_ls instance.

FYI, applying this into omap-for-v4.6/fixes-not-urgent, and
the rest of the series into omap-for-v4.6/soc and dt
branches.

Regards,

Tony

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

end of thread, other threads:[~2016-02-26 19:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22 23:04 [PATCH 0/4] Fix l4_ls interface clock and enable RTC Tony Lindgren
2016-02-22 23:04 ` [PATCH 1/4] ARM: OMAP2+: Fix hwmod clock for l4_ls Tony Lindgren
2016-02-26 19:04   ` Tony Lindgren
2016-02-22 23:04 ` [PATCH 2/4] ARM: OMAP2+: Add rtc hwmod configuration for ti81xx Tony Lindgren
2016-02-22 23:04 ` [PATCH 3/4] ARM: dts: Add RTC entry for dm814x and dra62x Tony Lindgren
2016-02-22 23:04 ` [PATCH 4/4] ARM: dts: Add RTC entry for dm816x Tony Lindgren

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