From mboxrd@z Thu Jan 1 00:00:00 1970 From: megous via linux-sunxi Subject: [PATCH 0/3] Add basic support for RTC on Allwinner H6 SoC Date: Fri, 12 Apr 2019 14:07:27 +0200 Message-ID: <20190412120730.473-1-megous@megous.com> Reply-To: megous-5qf/QAjKc83QT0dZR+AlfA@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai Cc: Ondrej Jirman , linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-Id: devicetree@vger.kernel.org From: Ondrej Jirman I went through the datasheets for H6 and H5, and compared the differences. RTCs are largely similar, but not entirely compatible. Incompatibilities are in details not yet implemented by the rtc driver though. I also corrected the clock tree in H6 DTSI. There's a small detail here, that's not described absolutely correctly in DTSI, but the difference is not really that material. ext_osc32k is originally modelled as a fixed clock that feeds into RTC module, but in reality it's the RTC module that implements via its registers enabling and disabling of this oscillator/clock. Though: - there's no other possible user of ext_osc32k than RTC module - there's no other possible external configuration for the crystal circuit that would need to be handled in the dts per board So I guess, while the description is not perfect, this patch series still improves the current situation. Or maybe I'm misunderstanding something, and &ext_osc32k node just describes a fact that there's a crystal on the board. Then, everything is perhaps fine. :) For now, the enable bit for this oscillator is toggled by the re-parenting code automatically, as needed. This patchset is necessary for implementing the WiFi/Bluetooth support on boards using H6 SoC. Please take a look. Thank you and regards, Ondrej Jirman Ondrej Jirman (3): dt-bindings: Add compatible for H6 RTC rtc: sun6i: Add support for H6 RTC arm64: dts: sun50i-h6: Add support for RTC and fix the clock tree .../devicetree/bindings/rtc/sun6i-rtc.txt | 1 + arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 30 +++++++------- drivers/rtc/rtc-sun6i.c | 40 ++++++++++++++++++- 3 files changed, 55 insertions(+), 16 deletions(-) -- 2.21.0