linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: allwinner: h6: tanix-tx6: Use internal oscillator
@ 2020-01-13 18:07 Jernej Skrabec
  2020-01-16  8:06 ` Maxime Ripard
  0 siblings, 1 reply; 4+ messages in thread
From: Jernej Skrabec @ 2020-01-13 18:07 UTC (permalink / raw)
  To: mripard, wens, robh+dt, mark.rutland
  Cc: linux-arm-kernel, devicetree, linux-kernel, linux-sunxi

Tanix TX6 doesn't have external 32 kHz oscillator, so switch RTC clock
to internal one.

Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---

While this patch gives one possible solution, I mainly want to start
discussion why Allwinner SoC dtsi reference external 32 kHz crystal
although some boards don't have it. My proposal would be to make clock
property optional, based on the fact if external crystal is present or
not. However, I'm not sure if that is possible at this point or not.
Driver also considers missing clock property as deprecated (old DT) [1],
so this might complicate things even further.

What do you think?

Best regards,
Jernej

[1] https://elixir.bootlin.com/linux/latest/source/drivers/rtc/rtc-sun6i.c#L263

 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
index 83e6cb0e59ce..af3aebda47bb 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts
@@ -91,6 +91,12 @@ &r_ir {
 	status = "okay";
 };
 
+/* This board doesn't have external 32 kHz crystal. */
+&rtc {
+	assigned-clocks = <&rtc 0>;
+	assigned-clock-parents = <&rtc 2>;
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ph_pins>;
-- 
2.24.1


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

end of thread, other threads:[~2020-01-17 18:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-13 18:07 [PATCH] arm64: dts: allwinner: h6: tanix-tx6: Use internal oscillator Jernej Skrabec
2020-01-16  8:06 ` Maxime Ripard
2020-01-16 16:47   ` Jernej Škrabec
2020-01-17 18:39     ` Maxime Ripard

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