[PATCH] arm64: dts: allwinner: h6: tanix-tx6: Use internal oscillator

Maxime Ripard mripard at kernel.org
Thu Jan 16 00:06:52 PST 2020


Hi Jernej,

On Mon, Jan 13, 2020 at 07:07:20PM +0100, Jernej Skrabec wrote:
> Tanix TX6 doesn't have external 32 kHz oscillator, so switch RTC clock
> to internal one.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec at 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.

It's probably a bit of a dumb question but.. are you sure the crystal
is missing?

The H6 datasheet mentions that the 32kHz crystal needs to be there,
and it's part of the power sequence, so I'd expect all boards to have
it.

> Driver also considers missing clock property as deprecated (old DT) [1],
> so this might complicate things even further.
>
> What do you think?

I'm pretty sure (but that would need to be checked) that we never got
a node without the clocks property on the H6. If that's the case, then
we can add a check on the compatible.

> 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>;
> +};
> +

This should be dealt with in the driver however.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200116/a0dcfc28/attachment.sig>


More information about the linux-arm-kernel mailing list