Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp575980pxb; Tue, 15 Feb 2022 22:36:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEnPemmS78xK/H33qlUMzoCYI1qZ6SP8OwQ/X1OcfiaqiyRXlwE8nkgAmZFcnzL4QWiAnG X-Received: by 2002:a17:90a:8b14:b0:1b9:3472:23fe with SMTP id y20-20020a17090a8b1400b001b9347223femr121528pjn.39.1644993387005; Tue, 15 Feb 2022 22:36:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644993387; cv=none; d=google.com; s=arc-20160816; b=oJtnnwiR3QKg9dN77/RRbk//2mYWSZegUreZqpQrUEHgA2dgXlgU6hkAVR/dMH9Jrc Fvxt1ZOg718C4alaCvdi0tS1oS7E6J1kljo8YkF6LvjjDiBs0a+BtT8O/DZBTca1NqLX A2rDEYOOzMUP5RHCrPO2PTkPqiE4TzPHrkr4N4eSZMeoxjVLgSVknbdZQmVIXa9Goy+V zP2HpQ9i9sydkWjCosSVrNbeaHIeulge9Dzx55J3Z+++P6VNjplMWVIpjj6zwE6q+MwK xGOj1E0perRI6HQoUstdG48bb9dFyZqTwK/k/SV7VoVN3dHEJ7GtSrbwblTSVwqyOauh oj3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fdlEzyM6wV1U+RwGyQK9WmkMI5mhDJdmK2glPQLND8k=; b=AwtqUXHvYoM4W1KcHXbf03Yd/DdiDfP4JWIWcR1oAuQiDeEzA0cCF7YbGgrerrhUUS v+/wloP1ljU+Vruw1FryUQ62ZXoNv1t/rtmByxP3tWlNNHggHNtkWRA6HuSMpQU93LOr FYnEMQhIxGDf9651OlKB7BC9XujA5d9aCocAvhvCiBbVijb0CHXtXl+r7EPyuiCYtWIy oSoFIwb+SdH5YH1LMwdRRRf4L3LZcWk8G3ZktT/8Jj4xE6rMJLTNgVpl7WXw3DxSyQxM 9I7+NJQmZ43n55T7ktXvKsNgE9SC5Z8W6upTkUlsjZrU7pqAV1uScejkeRQOwnoQwb9C aDqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PZbPwJgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b7si32365215pff.301.2022.02.15.22.36.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 22:36:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=PZbPwJgw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E397D2A712; Tue, 15 Feb 2022 22:27:02 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244539AbiBOWQ6 (ORCPT + 99 others); Tue, 15 Feb 2022 17:16:58 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbiBOWQ5 (ORCPT ); Tue, 15 Feb 2022 17:16:57 -0500 X-Greylist: delayed 24574 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 15 Feb 2022 14:16:45 PST Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5ABA29800; Tue, 15 Feb 2022 14:16:45 -0800 (PST) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 1D0BC240002; Tue, 15 Feb 2022 22:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1644963401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fdlEzyM6wV1U+RwGyQK9WmkMI5mhDJdmK2glPQLND8k=; b=PZbPwJgwrtf0MbAXbKC/ZGhSkjZPn+1Ph7P9YrP6UByMDHYK9Ox9Ed3riiim95aPtCzUvg OsR1svKQug1ksFzzDa8wIezWiBEj4Qj0zzEAsPUFVUYmL2/E5ptK/KQbpmvm6ntNvpV8NM 5ySJrTfxnnCy01hO1vnbrB0lhkHL9wfinR0WvEGG3Rw2sTz3hTvp8MIjjhtwN1k/ZJrg4w 43QqcKrBMyRXTXqiSxdWPFUa7MSiL50Q2M/3KpaownXvw0MrC5IHL7sEvlup7EFslkNFAT tQpBEcoGIq6h8MnT5X5Nrjs7rK4DWjlGKjljq0wX109XIAM7nVdLDufvSDXK1g== Date: Tue, 15 Feb 2022 23:16:39 +0100 From: Alexandre Belloni To: Samuel Holland Cc: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , linux-sunxi@lists.linux.dev, Alessandro Zummo , Michael Turquette , linux-arm-kernel@lists.infradead.org, Rob Herring , devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Boyd Subject: Re: [PATCH v3 0/6] clk: sunxi-ng: Add a RTC CCU driver Message-ID: References: <20220203021736.13434-1-samuel@sholland.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220203021736.13434-1-samuel@sholland.org> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 02/02/2022 20:17:30-0600, Samuel Holland wrote: > This patch series adds a CCU driver for the RTC in the H616, R329 and > D1. The extra patch at the end of this series shows how it would be > explanded to additional hardware variants. > > The driver is intended to support the existing binding used for the H6, > but also an updated binding which includes all RTC input clocks. > > A future patch series could add functionality to the driver to manage > IOSC calibration at boot and during suspend/resume. > > It may be possible to support all of these hardware variants without > adding this new driver, by adding them to the existing RTC clock > provider, but I'm concerned about the complexity there, without any of > the CCU abstraction. > > Changes in v3: > - Add/fix several maxItems attributes for clocks and clock-items > - Drop the SUNXI_CCU_MUX_HW_WITH_KEY macro, since it is no longer used. > - Also drop the patch adding the SUNXI_CCU_MUX_DATA_WITH_GATE macro. > - Rebase on v5.17-rc2 (CCU module support series was merged). > - Move IOSC calibration control to prepare/unprepare operations. > - Declare several `struct clk_init_data`s as static variables (instead > of as anonymous) so they can be modified from the probe function > without casting away const. > - Instead of creating two copies of clocks which may or may not have > muxes, change the number of parents to 1 in the non-mux case. > - Use a single CCU description for all variants. > - Use IS_REACHABLE to guard the call to sun6i_rtc_ccu_probe. > - Allow the driver to be built on !ARM64 (i.e. RISCV). > - Rebase example on top of driver changes, and drop the second example. > > Changes in v2: > - Combine "const"s to "enum" in the DT binding compatible property. > - Properly update the DT binding clocks and clock-names properties. > - Rebase on v2 of the CCU module support series. > - Load the CCU driver from the RTC driver, not as an OF provider. > > Samuel Holland (6): > dt-bindings: rtc: sun6i: Clean up repetition > dt-bindings: rtc: sun6i: Add H616, R329, and D1 support > rtc: sun6i: Enable the bus clock when provided I've now applied 1-3/6, thanks! > clk: sunxi-ng: mux: Allow muxes to have keys > clk: sunxi-ng: Add support for the sun6i RTC clocks > [DO NOT MERGE] clk: sunxi-ng: sun6i-rtc: Add support for H6 > > .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 84 +++- > drivers/clk/sunxi-ng/Kconfig | 5 + > drivers/clk/sunxi-ng/Makefile | 2 + > drivers/clk/sunxi-ng/ccu-sun6i-rtc.c | 393 ++++++++++++++++++ > drivers/clk/sunxi-ng/ccu-sun6i-rtc.h | 15 + > drivers/clk/sunxi-ng/ccu_common.h | 1 + > drivers/clk/sunxi-ng/ccu_mux.c | 7 + > drivers/rtc/rtc-sun6i.c | 48 ++- > include/dt-bindings/clock/sun6i-rtc.h | 10 + > include/linux/clk/sunxi-ng.h | 2 + > 10 files changed, 538 insertions(+), 29 deletions(-) > create mode 100644 drivers/clk/sunxi-ng/ccu-sun6i-rtc.c > create mode 100644 drivers/clk/sunxi-ng/ccu-sun6i-rtc.h > create mode 100644 include/dt-bindings/clock/sun6i-rtc.h > > -- > 2.33.1 > -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com