linux-rtc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jernej Skrabec <jernej.skrabec@siol.net>
To: mripard@kernel.org, wens@csie.org
Cc: robh+dt@kernel.org, a.zummo@towertech.it,
	alexandre.belloni@bootlin.com,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org
Subject: [PATCH v2 0/2] rtc: sun6i: Make external oscillator optional
Date: Sun,  8 Mar 2020 14:58:47 +0100	[thread overview]
Message-ID: <20200308135849.106333-1-jernej.skrabec@siol.net> (raw)

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

Changes from v1:
- added comments to driver to make more clear how clock registration
  works

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                          | 16 ++++++++--------
 6 files changed, 52 insertions(+), 16 deletions(-)

-- 
2.25.1


             reply	other threads:[~2020-03-08 13:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 13:58 Jernej Skrabec [this message]
2020-03-08 13:58 ` [PATCH v2 1/2] rtc: sun6i: Make external 32k oscillator optional Jernej Skrabec
2020-03-09 15:17   ` Maxime Ripard
2020-03-12 23:20   ` Alexandre Belloni
2020-03-08 13:58 ` [PATCH v2 2/2] arm64: dts: allwinner: h6: Move ext. oscillator to board DTs Jernej Skrabec
2020-03-09 15:18   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200308135849.106333-1-jernej.skrabec@siol.net \
    --to=jernej.skrabec@siol.net \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).