Skip to contentSkip to conversation

dt-bindings: timer: Add am6 compatible for ti-timer

PATCH In review Tony Lindgren 4 participants 17 messages Apr 7, 2022 – Apr 8, 2022

Subsystems (5)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH 1/4 dt-bindings: timer: Add am6 compatible for ti-timer

Document the dual-mode timers available on am6.

Cc Keerthy <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Rob Herring <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/ti,timer.txt +1 -0
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)
 
 - reg:			Contains timer register address range (base address and
 			length).
Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH 2/4 clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions

We have pwm-omap-dmtimer tagged with COMPILE_TEST, so we need to use the ifdefs around the inline functions. Let's add ARCH_K3 to the list of SoCs to allow using timer-ti-dm on these SoCs.

Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 include/clocksource/timer-ti-dm.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
include/clocksource/timer-ti-dm.h +3 -2
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
  * The below are inlined to optimize code size for system timers. Other code
  * should not need these at all.
  */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)
 static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
 						int posted)
 {
@@ -390,5 +391,5 @@ static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
 {
 	writel_relaxed(value, timer->irq_stat);
 }
-#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS */
+#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS || CONFIG_ARCH_K3 */
 #endif /* __CLOCKSOURCE_DMTIMER_H */
Signature · 1 line
2.35.1
#2 lore raw

Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions

Quoted 16 lines · Tony Lindgren

We have pwm-omap-dmtimer tagged with COMPILE_TEST, so we need to use the ifdefs around the inline functions. Let's add ARCH_K3 to the list of SoCs to allow using timer-ti-dm on these SoCs.

Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
  include/clocksource/timer-ti-dm.h | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

include/clocksource/timer-ti-dm.h int omap_dm_timers_active(void); · line 255

Quoted 6 lines
include/clocksource/timer-ti-dm.h +2 -1
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
   * The below are inlined to optimize code size for system timers. Other code
   * should not need these at all.
   */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Quoted 10 lines
include/clocksource/timer-ti-dm.h +1 -1
  static inline u32 __omap_dm_timer_read(struct omap_dm_timer *timer, u32 reg,
  						int posted)
  {
@@ -390,5 +391,5 @@ static inline void __omap_dm_timer_write_status(struct omap_dm_timer *timer,
  {
  	writel_relaxed(value, timer->irq_stat);
  }
-#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS */
+#endif /* CONFIG_ARCH_OMAP1 || CONFIG_ARCH_OMAP2PLUS || CONFIG_ARCH_K3 */
  #endif /* __CLOCKSOURCE_DMTIMER_H */
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
author maintainer
#3 lore raw

Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions

Quoted 10 lines · Daniel Lezcano

include/clocksource/timer-ti-dm.h int omap_dm_timers_active(void); · line 255

Quoted 7 lines · Tony Lindgren
include/clocksource/timer-ti-dm.h +2 -1
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
   * The below are inlined to optimize code size for system timers. Other code
   * should not need these at all.
   */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Hmm that's a good question for why it was not that way earlier.

This series changes things for tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for COMPILE_TEST it seems.

Regards,

Tony

#4 lore raw

Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions

Quoted 12 lines · Tony Lindgren
Quoted 10 lines · Daniel Lezcano

include/clocksource/timer-ti-dm.h int omap_dm_timers_active(void); · line 255

Quoted 7 lines · Tony Lindgren
include/clocksource/timer-ti-dm.h +2 -1
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
    * The below are inlined to optimize code size for system timers. Other code
    * should not need these at all.
    */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Quoted 5 lines

Hmm that's a good question for why it was not that way earlier.

This series changes things for tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for COMPILE_TEST it seems.

But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
author maintainer
#5 lore raw

Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions

Quoted 13 lines · Daniel Lezcano
Quoted 12 lines · Tony Lindgren
Quoted 10 lines · Daniel Lezcano

include/clocksource/timer-ti-dm.h int omap_dm_timers_active(void); · line 255

Quoted 7 lines · Tony Lindgren
include/clocksource/timer-ti-dm.h +2 -1
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
    * The below are inlined to optimize code size for system timers. Other code
    * should not need these at all.
    */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Quoted 7 lines
Quoted 5 lines

Hmm that's a good question for why it was not that way earlier.

This series changes things for tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for COMPILE_TEST it seems.

But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?

Right but I suspect that COMPILE_TEST will produce a build error on other architectures. I need to check that though, maybe that is no longer the case.

Regards,

Tony

author maintainer
#6 lore raw

Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions

Quoted 20 lines · Tony Lindgren
Quoted 19 lines · Daniel Lezcano
Quoted 17 lines · Tony Lindgren
Quoted 10 lines · Daniel Lezcano

include/clocksource/timer-ti-dm.h int omap_dm_timers_active(void); · line 255

Quoted 7 lines · Tony Lindgren
include/clocksource/timer-ti-dm.h +2 -1
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
    * The below are inlined to optimize code size for system timers. Other code
    * should not need these at all.
    */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Hmm that's a good question for why it was not that way earlier.

This series changes things for tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for COMPILE_TEST it seems.

Quoted 5 lines
Quoted 1 line

But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?

Right but I suspect that COMPILE_TEST will produce a build error on other architectures. I need to check that though, maybe that is no longer the case.

We could use IS_ENABLED(CONFIG_OMAP_DM_TIMER), but looks like we can now just move the __omap_dm_timer_* inline functions to timer-ti-dm.c instead.

I'll do that and repost after some testing.

Regards,

Tony

#7 lore raw

Re: [PATCH 2/4] clocksource/drivers/timer-ti-dm: Update defines for am6 for inline functions

Quoted 23 lines · Tony Lindgren
Quoted 22 lines · Tony Lindgren
Quoted 20 lines · Daniel Lezcano
Quoted 12 lines · Tony Lindgren
Quoted 10 lines · Daniel Lezcano

include/clocksource/timer-ti-dm.h int omap_dm_timers_active(void); · line 255

Quoted 7 lines · Tony Lindgren
include/clocksource/timer-ti-dm.h +2 -1
@@ -251,7 +251,8 @@ int omap_dm_timers_active(void);
     * The below are inlined to optimize code size for system timers. Other code
     * should not need these at all.
     */
-#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS)
+#if defined(CONFIG_ARCH_OMAP1) || defined(CONFIG_ARCH_OMAP2PLUS) || \
+	defined(CONFIG_ARCH_K3)

Why not replace the above by CONFIG_OMAP_DM_TIMER ?

Quoted 5 lines

Hmm that's a good question for why it was not that way earlier.

This series changes things for tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST though. So the inline stubs are still needed for COMPILE_TEST it seems.

But if ARCH_K3 or COMPILE_TEST is set, CONFIG_DM_TIMER is also set, no?

Quoted 8 lines
Quoted 3 lines

Right but I suspect that COMPILE_TEST will produce a build error on other architectures. I need to check that though, maybe that is no longer the case.

We could use IS_ENABLED(CONFIG_OMAP_DM_TIMER), but looks like we can now just move the __omap_dm_timer_* inline functions to timer-ti-dm.c instead.

I'll do that and repost after some testing.

Even better :)

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
author maintainer
#8 lore raw

PATCH 3/4 clocksource/drivers/timer-ti-dm: Add compatible for am6

In reply to Tony Lindgren

Add compatible for am6 to support the timers. For example, am654 has four timers in the MCU domain and 12 timers in the MAIN domain.

Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 drivers/clocksource/timer-ti-dm.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/clocksource/timer-ti-dm.c +8 -0
@@ -922,6 +922,10 @@ static const struct dmtimer_platform_data omap3plus_pdata = {
 	.timer_ops = &dmtimer_ops,
 };
 
+static const struct dmtimer_platform_data am6_pdata = {
+	.timer_ops = &dmtimer_ops,
+};
+
 static const struct of_device_id omap_timer_match[] = {
 	{
 		.compatible = "ti,omap2420-timer",
@@ -950,6 +954,10 @@ static const struct of_device_id omap_timer_match[] = {
 		.compatible = "ti,dm816-timer",
 		.data = &omap3plus_pdata,
 	},
+	{
+		.compatible = "ti,am6-timer",
+		.data = &am6_pdata,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, omap_timer_match);
Signature · 1 line
2.35.1
author maintainer
#9 lore raw

PATCH 4/4 clocksource/drivers/timer-ti-dm: Make timer selectable for ARCH_K3

In reply to Tony Lindgren

Let's make timer-ti-dm selectable for ARCH_K3, and add a separate option for OMAP_DM_SYSTIMER as there should be no need for it on ARCH_K3.

For older TI SoCs, we are already selecting OMAP_DM_TIMER in arch/arm/mach-omap*/Kconfig. For mach-omap2, we need to now also select OMAP_DM_SYSTIMER.

Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 arch/arm/mach-omap2/Kconfig  | 2 ++
 drivers/clocksource/Kconfig  | 8 +++++++-
 drivers/clocksource/Makefile | 2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/Kconfig +2 -0
@@ -105,6 +105,7 @@ config ARCH_OMAP2PLUS
 	select MACH_OMAP_GENERIC
 	select MEMORY
 	select MFD_SYSCON
+	select OMAP_DM_SYSTIMER
 	select OMAP_DM_TIMER
 	select OMAP_GPMC
 	select PINCTRL
@@ -160,6 +161,7 @@ config SOC_OMAP2420
 	bool "OMAP2420 support"
 	depends on ARCH_OMAP2
 	default y
+	select OMAP_DM_SYSTIMER
 	select OMAP_DM_TIMER
 	select SOC_HAS_OMAP2_SDRC
 
drivers/clocksource/Kconfig +7 -1
@@ -22,7 +22,7 @@ config CLKEVT_I8253
 config I8253_LOCK
 	bool
 
-config OMAP_DM_TIMER
+config OMAP_DM_SYSTIMER
 	bool
 	select TIMER_OF
 
@@ -56,6 +56,12 @@ config DIGICOLOR_TIMER
 	help
 	  Enables the support for the digicolor timer driver.
 
+config OMAP_DM_TIMER
+	tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST
+	select TIMER_OF
+	help
+	  Enables the support for the TI dual-mode timer driver.
+
 config DW_APB_TIMER
 	bool "DW APB timer driver" if COMPILE_TEST
 	help
drivers/clocksource/Makefile +1 -1
@@ -18,7 +18,7 @@ obj-$(CONFIG_CLKSRC_MMIO)	+= mmio.o
 obj-$(CONFIG_DAVINCI_TIMER)	+= timer-davinci.o
 obj-$(CONFIG_DIGICOLOR_TIMER)	+= timer-digicolor.o
 obj-$(CONFIG_OMAP_DM_TIMER)	+= timer-ti-dm.o
-obj-$(CONFIG_OMAP_DM_TIMER)	+= timer-ti-dm-systimer.o
+obj-$(CONFIG_OMAP_DM_SYSTIMER)	+= timer-ti-dm-systimer.o
 obj-$(CONFIG_DW_APB_TIMER)	+= dw_apb_timer.o
 obj-$(CONFIG_DW_APB_TIMER_OF)	+= dw_apb_timer_of.o
 obj-$(CONFIG_FTTMR010_TIMER)	+= timer-fttmr010.o
Signature · 1 line
2.35.1
Acked-by on v1 1/4
#10 lore raw
In reply to Tony Lindgren
Quoted 9 lines · Tony Lindgren

Document the dual-mode timers available on am6.

Cc Keerthy <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Rob Herring <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Quoted 4 lines
---
 Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
 1 file changed, 1 insertion(+)

Best regards,
Krzysztof

#11 lore raw
In reply to Tony Lindgren
Quoted 26 lines · Tony Lindgren

Document the dual-mode timers available on am6.

Cc Keerthy <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Rob Herring <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/ti,timer.txt +1 -0
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)
 
 - reg:			Contains timer register address range (base address and
 			length).
Signature · 1 line
2.35.1

We need to convert this into yaml prior to the dts updates patches :(

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author maintainer
#12 lore raw
Quoted 23 lines · Nishanth Menon
Quoted 22 lines · Tony Lindgren

Document the dual-mode timers available on am6.

Cc Keerthy <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Rob Herring <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/timer/ti,timer.txt +1 -0
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)
 
Quoted 7 lines
Quoted 4 lines
Documentation/devicetree/bindings/timer/ti,timer.txt +0 -0
 - reg:			Contains timer register address range (base address and
 			length).
Signature · 1 line
2.35.1

We need to convert this into yaml prior to the dts updates patches :(

OK I'll convert to yaml and send the binding patch separately.

Regards,

Tony

#13 lore raw
In reply to Tony Lindgren
Quoted 17 lines · Tony Lindgren

Document the dual-mode timers available on am6.

Cc Keerthy <[email protected]>
Cc Krzysztof Kozlowski <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Rob Herring <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 Documentation/devicetree/bindings/timer/ti,timer.txt | 1 +
 1 file changed, 1 insertion(+)

Documentation/devicetree/bindings/timer/ti,timer.txt Required properties: · line 17

Quoted 4 lines
Documentation/devicetree/bindings/timer/ti,timer.txt +1 -0
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)

Suggestion:

Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans a couple of sub SoC architectures.

Quoted 5 lines
Documentation/devicetree/bindings/timer/ti,timer.txt +0 -0
 - reg:			Contains timer register address range (base address and
 			length).
Signature · 1 line
2.35.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author maintainer
#14 lore raw

Hi,

Quoted 12 lines · Nishanth Menon

Documentation/devicetree/bindings/timer/ti,timer.txt Required properties: · line 17

Quoted 8 lines · Tony Lindgren
Documentation/devicetree/bindings/timer/ti,timer.txt +1 -0
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)

Suggestion:

Quoted 2 lines

Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans a couple of sub SoC architectures.

I think the timer hardware is the same across am64, am65 and j7. So we should pick something to represent the am6 timers as it would allow using shared dtsi files for the 16 - 30 timers there are.

Using shared timer dtsi files should work as long as the clocks are defined in include/dt-bindings/clock for each SoC, and assuming we can use the same compatible property for the timers.

Of course if the timers are really different across am64, am65 and j72 then multiple compatible properties are neeeded.

If the timer hardware is the same, then I guess we should just pick the earliest version, so how about using ti,am64-timer?

Regards,

Tony

#15 lore raw
Quoted 18 lines · Tony Lindgren

Hi,

Quoted 12 lines · Nishanth Menon

Documentation/devicetree/bindings/timer/ti,timer.txt Required properties: · line 17

Quoted 8 lines · Tony Lindgren
Documentation/devicetree/bindings/timer/ti,timer.txt +1 -0
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)

Suggestion:

Quoted 2 lines

Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans a couple of sub SoC architectures.

Quoted 7 lines

I think the timer hardware is the same across am64, am65 and j7. So we should pick something to represent the am6 timers as it would allow using shared dtsi files for the 16 - 30 timers there are.

Using shared timer dtsi files should work as long as the clocks are defined in include/dt-bindings/clock for each SoC, and assuming we can use the same compatible property for the timers.

Compatible should work fine, Though I doubt clock and other indices (base address etc will scale appropriately), but we could give it a shot, but we can discuss that in the context of the dts patches.

Quoted 6 lines

Of course if the timers are really different across am64, am65 and j72 then multiple compatible properties are neeeded.

If the timer hardware is the same, then I guess we should just pick the earliest version, so how about using ti,am64-timer?

yep - the oldest version will be ti,am654-timer ( AM65 was the first K3 device. Unfortunately, the numbering does'nt follow a chronological order)

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
author maintainer
#16 lore raw
Quoted 23 lines · Nishanth Menon
Quoted 22 lines · Tony Lindgren

Hi,

Quoted 12 lines · Nishanth Menon

Documentation/devicetree/bindings/timer/ti,timer.txt Required properties: · line 17

Quoted 8 lines · Tony Lindgren
Documentation/devicetree/bindings/timer/ti,timer.txt +1 -0
@@ -14,6 +14,7 @@ Required properties:
 			ti,omap5430-timer (applicable to OMAP543x devices)
 			ti,am335x-timer	(applicable to AM335x devices)
 			ti,am335x-timer-1ms (applicable to AM335x devices)
+			ti,am6-timer (applicable to AM6 devices)

Suggestion:

Quoted 2 lines

Could we call this ti,am65-timer instead? AM6 is a bit nuanced and spans a couple of sub SoC architectures.

I think the timer hardware is the same across am64, am65 and j7. So we should pick something to represent the am6 timers as it would allow using shared dtsi files for the 16 - 30 timers there are.

Quoted 7 lines
Quoted 3 lines

Using shared timer dtsi files should work as long as the clocks are defined in include/dt-bindings/clock for each SoC, and assuming we can use the same compatible property for the timers.

Compatible should work fine, Though I doubt clock and other indices (base address etc will scale appropriately), but we could give it a shot, but we can discuss that in the context of the dts patches.

Yeah that's a separate series for sure and can be done later on after we have am6 timers working first.

Quoted 9 lines
Quoted 5 lines

Of course if the timers are really different across am64, am65 and j72 then multiple compatible properties are neeeded.

If the timer hardware is the same, then I guess we should just pick the earliest version, so how about using ti,am64-timer?

yep - the oldest version will be ti,am654-timer ( AM65 was the first K3 device. Unfortunately, the numbering does'nt follow a chronological order)

OK great, I will use ti,am654-timer then.

Regards,

Tony