Linux-RTC Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] rtc: sun6i: Make external oscillator optional
@ 2020-02-13 21:14 Jernej Skrabec
  2020-02-13 21:14 ` [PATCH 1/2] rtc: sun6i: Make external 32k " Jernej Skrabec
  2020-02-13 21:14 ` [PATCH 2/2] arm64: dts: allwinner: h6: Move ext. oscillator to board DTs Jernej Skrabec
  0 siblings, 2 replies; 7+ messages in thread
From: Jernej Skrabec @ 2020-02-13 21:14 UTC (permalink / raw)
  To: mripard, wens
  Cc: robh+dt, mark.rutland, a.zummo, alexandre.belloni,
	linux-arm-kernel, devicetree, linux-kernel, linux-rtc,
	jernej.skrabec

This is implementation of idea discussed here:
https://lore.kernel.org/linux-arm-kernel/20200117183901.lkieha3hu6nz2hoj@gilmour.lan/T/

Part of first patch commit message:

Some boards, like OrangePi PC2 (H5), OrangePi Plus 2E (H3) and Tanix TX6
(H6) don't have external 32kHz oscillator. Till H6, it didn't really
matter if external oscillator was enabled because HW detected error and
fall back to internal one. H6 has same functionality but it's the first
SoC which have "auto switch bypass" bit documented and always enabled in
driver. This prevents RTC to work correctly if external crystal is not
present on board. There are other side effects - all peripherals which
depends on this clock also don't work (HDMI CEC for example).

In this series I fixed only H6 based boards since improper settings have
real impact due to explicitly forbidden fallback to internal oscillator.
Since most boards actually contain external oscillator, I wonder if it's
better to leave external oscillator in common H6 dtsi and just delete
clocks property in rtc node and ext. oscillator node in board dts file?

What do you think?

Best regards,
Jernej

Jernej Skrabec (2):
  rtc: sun6i: Make external 32k oscillator optional
  arm64: dts: allwinner: h6: Move ext. oscillator to board DTs

 .../boot/dts/allwinner/sun50i-h6-beelink-gs1.dts   | 11 +++++++++++
 .../boot/dts/allwinner/sun50i-h6-orangepi-3.dts    | 11 +++++++++++
 .../boot/dts/allwinner/sun50i-h6-orangepi.dtsi     | 11 +++++++++++
 .../boot/dts/allwinner/sun50i-h6-pine-h64.dts      | 11 +++++++++++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi       |  8 --------
 drivers/rtc/rtc-sun6i.c                            | 14 ++++++--------
 6 files changed, 50 insertions(+), 16 deletions(-)

-- 
2.25.0


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

end of thread, back to index

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 21:14 [PATCH 0/2] rtc: sun6i: Make external oscillator optional Jernej Skrabec
2020-02-13 21:14 ` [PATCH 1/2] rtc: sun6i: Make external 32k " Jernej Skrabec
2020-02-14  8:14   ` Maxime Ripard
2020-02-14 16:42     ` Jernej Škrabec
2020-02-20 17:47       ` Maxime Ripard
2020-02-20 17:59         ` Jernej Škrabec
2020-02-13 21:14 ` [PATCH 2/2] arm64: dts: allwinner: h6: Move ext. oscillator to board DTs Jernej Skrabec

Linux-RTC Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rtc/0 linux-rtc/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rtc linux-rtc/ https://lore.kernel.org/linux-rtc \
		linux-rtc@vger.kernel.org
	public-inbox-index linux-rtc

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rtc


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git