From patchwork Fri Apr 12 12:07:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ond=C5=99ej_Jirman?= X-Patchwork-Id: 10898083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D48E0922 for ; Fri, 12 Apr 2019 12:07:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3B6D28E60 for ; Fri, 12 Apr 2019 12:07:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A722028E64; Fri, 12 Apr 2019 12:07:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=2.0 tests=BAYES_00,DKIM_ADSP_DISCARD, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E21B228E60 for ; Fri, 12 Apr 2019 12:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2buixgCIUa1NFlkLkG6yq5L1K1/Z3sRg/tEZoTgw9sQ=; b=fyMUP/c5L62YVU BmLGAJFUmCs42hqYWEvR5ZB9qwJ0sQvRKC8cyTudhECFnSbUzB9sm81VjkZ+B3P7Qy2Z0vezyU0Qy /a0weNPSJJoLGuKOW5727J4MiTynOBURkMr2DBAUyrK2pgrcPmr3qT88vWGV8Sfa2NZQZfVu/52MN KRMbPMAR0984IJMRXSQ+eGWrHSzeCub/qNuAhgSwtlCr29cYdSbeK/vPgN6T9DtgYVJODB/hpWAaL R0jBgzvY9v5S42JXvzuM7631SMLH6483O+4YcWoM0hgj4o/4b17b80faSLs3HXgiT+ZZqY3waebRa sNnRr+/4XWuLjX2ffDfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEuyA-0007EX-Ut; Fri, 12 Apr 2019 12:07:46 +0000 Received: from vps.xff.cz ([195.181.215.36]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEuy0-0006zC-Eo for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2019 12:07:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1555070851; bh=IcfFAAQX97LzQohXDRrWYm6n9WHbCZodqxmuciTySWw=; h=From:To:Cc:Subject:Date:From; b=qNBillmgiitA/aE9aH0hRWLkVwBgTy+Q2amrxvCnQamsxrZnb/7wtNPTZM+Y08QkZ ExGmktrcYRSj9Dx2lZhaoNhwtU0uUFzKSQY1PmSp53EuWlrLAsGZDe/uHfaoR0FY5s fpk64ZqPT9giTCYNRM8X431LTlwtIXEP1I2EIo+k= From: megous@megous.com To: Alessandro Zummo , Alexandre Belloni , Rob Herring , Mark Rutland , Maxime Ripard , Chen-Yu Tsai 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> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_050737_246426_35554E5C X-CRM114-Status: GOOD ( 12.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ondrej Jirman , linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-)