[v5,18/21] MIPS: qi_lb60: Use 750 kHz system timer & enable clocksource

Message ID 20180724231958.20659-19-paul@crapouillou.net
State Superseded
Headers show
Series
  • Ingenic JZ47xx TCU patchset v5
Related show

Commit Message

Paul Cercueil July 24, 2018, 11:19 p.m.
The default clock (12 MHz) is too fast for the system timer, which fails
to report time accurately.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 arch/mips/boot/dts/ingenic/qi_lb60.dts | 9 +++++++++
 1 file changed, 9 insertions(+)

 v5: New patch

Patch

diff --git a/arch/mips/boot/dts/ingenic/qi_lb60.dts b/arch/mips/boot/dts/ingenic/qi_lb60.dts
index 85529a142409..5d2aca867427 100644
--- a/arch/mips/boot/dts/ingenic/qi_lb60.dts
+++ b/arch/mips/boot/dts/ingenic/qi_lb60.dts
@@ -45,3 +45,12 @@ 
 		bias-disable;
 	};
 };
+
+&tcu {
+	/* Use TCU1 channel as clocksource */
+	ingenic,clocksource-channel = <1>;
+
+	/* 750 kHz for the system timer and clocksource */
+	assigned-clocks = <&tcu TCU_CLK_TIMER0>, <&tcu TCU_CLK_TIMER1>;
+	assigned-clock-rates = <750000>, <750000>;
+};