Commit 545a9558 authored by Tony Lindgren's avatar Tony Lindgren
Browse files

ARM: dts: Configure system timers for am437x



We can now init system timers using the dmtimer and 32k counter
based on only devicetree data and drivers/clocksource timers.
Let's configure the clocksource and clockevent, and drop the old
unused platform data.

As we're just dropping platform data, and the early platform data
init is based on the custom ti,hwmods property, we want to drop
both the platform data and ti,hwmods property in a single patch.

Since the dmtimer can use both 32k clock and system clock as the
source, let's also configure the SoC specific default values. The
board specific dts files can reconfigure these with assigned-clocks
and assigned-clock-parents as needed.

Cc: devicetree@vger.kernel.org
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e20ef23d
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -553,3 +553,23 @@
		#reset-cells = <1>;
	};
};

/* Preferred always-on timer for clocksource */
&timer1_target {
	ti,no-reset-on-init;
	ti,no-idle;
	timer@0 {
		assigned-clocks = <&timer1_fck>;
		assigned-clock-parents = <&sys_clkin_ck>;
	};
};

/* Preferred timer for clockevent */
&timer2_target {
	ti,no-reset-on-init;
	ti,no-idle;
	timer@0 {
		assigned-clocks = <&timer2_fck>;
		assigned-clock-parents = <&sys_clkin_ck>;
	};
};
+2 −5
Original line number Diff line number Diff line
@@ -328,9 +328,8 @@
			};
		};

		target-module@31000 {			/* 0x44e31000, ap 24 40.0 */
		timer1_target: target-module@31000 {	/* 0x44e31000, ap 24 40.0 */
			compatible = "ti,sysc-omap2-timer", "ti,sysc";
			ti,hwmods = "timer1";
			reg = <0x31000 0x4>,
			      <0x31010 0x4>,
			      <0x31014 0x4>;
@@ -450,7 +449,6 @@

		target-module@86000 {			/* 0x44e86000, ap 40 70.0 */
			compatible = "ti,sysc-omap2", "ti,sysc";
			ti,hwmods = "counter_32k";
			reg = <0x86000 0x4>,
			      <0x86004 0x4>;
			reg-names = "rev", "sysc";
@@ -868,9 +866,8 @@
			};
		};

		target-module@40000 {			/* 0x48040000, ap 18 1e.0 */
		timer2_target: target-module@40000 {	/* 0x48040000, ap 18 1e.0 */
			compatible = "ti,sysc-omap4-timer", "ti,sysc";
			ti,hwmods = "timer2";
			reg = <0x40000 0x4>,
			      <0x40010 0x4>,
			      <0x40014 0x4>;
+1 −1
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
	.init_late	= am43xx_init_late,
	.init_irq	= omap_gic_of_init,
	.init_machine	= omap_generic_init,
	.init_time	= omap3_gptimer_timer_init,
	.init_time	= omap_init_time_of,
	.dt_compat	= am43_boards_compat,
	.restart	= omap44xx_restart,
MACHINE_END
+0 −2
Original line number Diff line number Diff line
@@ -44,8 +44,6 @@ extern struct omap_hwmod am33xx_smartreflex0_hwmod;
extern struct omap_hwmod am33xx_smartreflex1_hwmod;
extern struct omap_hwmod am33xx_gpmc_hwmod;
extern struct omap_hwmod am33xx_rtc_hwmod;
extern struct omap_hwmod am33xx_timer1_hwmod;
extern struct omap_hwmod am33xx_timer2_hwmod;

extern struct omap_hwmod_class am33xx_emif_hwmod_class;
extern struct omap_hwmod_class am33xx_l4_hwmod_class;
+0 −8
Original line number Diff line number Diff line
@@ -106,14 +106,6 @@ struct omap_hwmod_ocp_if am33xx_l3_s__gpmc = {
	.user		= OCP_USER_MPU,
};

/* l4 per -> timer2 */
struct omap_hwmod_ocp_if am33xx_l4_ls__timer2 = {
	.master		= &am33xx_l4_ls_hwmod,
	.slave		= &am33xx_timer2_hwmod,
	.clk		= "l4ls_gclk",
	.user		= OCP_USER_MPU,
};

/* l3 main -> ocmc */
struct omap_hwmod_ocp_if am33xx_l3_main__ocmc = {
	.master		= &am33xx_l3_main_hwmod,
Loading