From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10C103FC2 for ; Wed, 1 Sep 2021 05:39:55 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 1148B5804D0; Wed, 1 Sep 2021 01:39:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 01 Sep 2021 01:39:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=FxqtVW/6YN0SWpyFPqpwdZXDT4 Lx8JTld/yop8M1eVk=; b=c5S99uPolT1QGQOPkl+t6WAnU8OzVjm+Fsh7w50Zdd HuvdE46+SnP53Vkkx3loVfCVE8qjdOqGxCm3JeRBrkriP0/rETP9wHXuuDWI0gdn lh1dLYyFpp1N8WF75GAv8GTIC4CX/qSsgXSmJw1wq5WSsmt3tDUejFmDIF2vIMEo qEWOQnIA1aIf2cQRXAc6j5i5gAjDF3ZIvAaHR17cSplTR6RQI1ItS5saYjI+IaoV LgUcGJy7UWDigdcBj1tbS65NkoOOxpE1FFhYA/8TheuNpcY/Ju2c6towgHWYG594 cNFgGF0/d2UWGJw5TJ2N4u8Ykn30DeKidFbJpk9IBLdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=FxqtVW/6YN0SWpyFP qpwdZXDT4Lx8JTld/yop8M1eVk=; b=hQ6RzpkcQvPchmp1cegqFLCMUihgHX73M AB0maHQAsNxhoDHV2OSuU6JEUPD6KL6+33wL2BH/sIBi5ayzBhdOXwbMTjFO0Gcu NRBQBPT7h+SQPT+9R+alZvXm/bp7xVaUXRQeNPWfCLlTbaKy2ZPnibi9kSL3WN6C azZH1PfsrEhQd6OIYy6GNmDMF3fAn1kZLXK9MBOX1AEKcHbzS4F1A0GVnrxe2891 YpNJSzRtwU/kkgB0maDVgoF1CHVozps3a+t/ejn+yMYunrzX7DGaTfSbyvZ8cXd0 3EXDymATABxNTGrBeNLV/m1VudxdL3EIT/hr1XOXsVp5pvto/uFsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvvddgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeeiteekhfehuddugfeltddufeejjeefgeevheekueffhffhjeekheeiffdt vedtveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Sep 2021 01:39:52 -0400 (EDT) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Rob Herring Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Samuel Holland Subject: [RFC PATCH 0/7] clk: sunxi-ng: Add a RTC CCU driver Date: Wed, 1 Sep 2021 00:39:44 -0500 Message-Id: <20210901053951.60952-1-samuel@sholland.org> X-Mailer: git-send-email 2.31.1 Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This patch series adds a CCU driver for the RTC in the H616 and R329. The extra patches at the end of this series show 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. I do not know how to best represent that binding -- that is a major reason why this series is an RFC. 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 in the existing RTC clock driver and avoid some duplicate code, but I'm concerned about the complexity there, without any of the CCU abstraction. This series is currently based on top of the other series I just sent (clk: sunxi-ng: Lifetime fixes and module support), but I can rebase it elsewhere. Samuel Holland (7): dt-bindings: rtc: sun6i: Add H616 and R329 compatibles clk: sunxi-ng: div: Add macro using CLK_HW_INIT_FW_NAME clk: sunxi-ng: mux: Add macro using CLK_HW_INIT_PARENTS_DATA clk: sunxi-ng: mux: Allow muxes to have keys clk: sunxi-ng: Add support for the sun50i RTC clocks [DO NOT MERGE] clk: sunxi-ng: Add support for H6 [DO NOT MERGE] clk: sunxi-ng: Add support for T5 .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 55 ++- drivers/clk/sunxi-ng/Kconfig | 6 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu_common.h | 1 + drivers/clk/sunxi-ng/ccu_div.h | 14 + drivers/clk/sunxi-ng/ccu_mux.c | 7 + drivers/clk/sunxi-ng/ccu_mux.h | 28 ++ drivers/clk/sunxi-ng/sun50i-rtc-ccu.c | 433 ++++++++++++++++++ drivers/clk/sunxi-ng/sun50i-rtc-ccu.h | 15 + drivers/rtc/rtc-sun6i.c | 17 - include/dt-bindings/clock/sun50i-rtc.h | 12 + 11 files changed, 566 insertions(+), 23 deletions(-) create mode 100644 drivers/clk/sunxi-ng/sun50i-rtc-ccu.c create mode 100644 drivers/clk/sunxi-ng/sun50i-rtc-ccu.h create mode 100644 include/dt-bindings/clock/sun50i-rtc.h -- 2.31.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 712B4C4320E for ; Wed, 1 Sep 2021 05:42:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 38711610A4 for ; Wed, 1 Sep 2021 05:42:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 38711610A4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=yrBMVJfRlm9SAPtwgylgESArT6b0PZsYzi2M/0FoeTs=; b=sLwx/trTABTFsS IQRl/Mhg1VKab/b6lPBKAe37BPAO0WYrsITNYBoqI+sZmQvSAugpN9bDM+FxeODW7xC7J8ErX16M+ +NbMnG9oU6OE6uxWOC4xTN3hfsHA5+C4UU0tu2nMCin+JFogTrtZK9ciTqF7KAscNJCQf2aUGRK7u lCbk3qY6F9yg7a5wCyASi5NT/XXNnV444eUrHiuvlYwplkn/e3e3ts9AZZulbhIkOEK6wACAd+Uvr X9uUOQ+0YhRmMO78VUNAcJNWzIAJpPaJ4wAC3054286fmzXA/CZ6IAjy3ATrAJrthMtlV9YOEhozN yTA78j07OvxIYq00Mb4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLIyj-003vD2-MN; Wed, 01 Sep 2021 05:40:05 +0000 Received: from new3-smtp.messagingengine.com ([66.111.4.229]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLIyc-003v9W-Ma for linux-arm-kernel@lists.infradead.org; Wed, 01 Sep 2021 05:40:03 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.nyi.internal (Postfix) with ESMTP id 1148B5804D0; Wed, 1 Sep 2021 01:39:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 01 Sep 2021 01:39:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=FxqtVW/6YN0SWpyFPqpwdZXDT4 Lx8JTld/yop8M1eVk=; b=c5S99uPolT1QGQOPkl+t6WAnU8OzVjm+Fsh7w50Zdd HuvdE46+SnP53Vkkx3loVfCVE8qjdOqGxCm3JeRBrkriP0/rETP9wHXuuDWI0gdn lh1dLYyFpp1N8WF75GAv8GTIC4CX/qSsgXSmJw1wq5WSsmt3tDUejFmDIF2vIMEo qEWOQnIA1aIf2cQRXAc6j5i5gAjDF3ZIvAaHR17cSplTR6RQI1ItS5saYjI+IaoV LgUcGJy7UWDigdcBj1tbS65NkoOOxpE1FFhYA/8TheuNpcY/Ju2c6towgHWYG594 cNFgGF0/d2UWGJw5TJ2N4u8Ykn30DeKidFbJpk9IBLdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=FxqtVW/6YN0SWpyFP qpwdZXDT4Lx8JTld/yop8M1eVk=; b=hQ6RzpkcQvPchmp1cegqFLCMUihgHX73M AB0maHQAsNxhoDHV2OSuU6JEUPD6KL6+33wL2BH/sIBi5ayzBhdOXwbMTjFO0Gcu NRBQBPT7h+SQPT+9R+alZvXm/bp7xVaUXRQeNPWfCLlTbaKy2ZPnibi9kSL3WN6C azZH1PfsrEhQd6OIYy6GNmDMF3fAn1kZLXK9MBOX1AEKcHbzS4F1A0GVnrxe2891 YpNJSzRtwU/kkgB0maDVgoF1CHVozps3a+t/ejn+yMYunrzX7DGaTfSbyvZ8cXd0 3EXDymATABxNTGrBeNLV/m1VudxdL3EIT/hr1XOXsVp5pvto/uFsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddvvddgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgvlhcu jfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtffrrg htthgvrhhnpeeiteekhfehuddugfeltddufeejjeefgeevheekueffhffhjeekheeiffdt vedtveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Sep 2021 01:39:52 -0400 (EDT) From: Samuel Holland To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Rob Herring Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Samuel Holland Subject: [RFC PATCH 0/7] clk: sunxi-ng: Add a RTC CCU driver Date: Wed, 1 Sep 2021 00:39:44 -0500 Message-Id: <20210901053951.60952-1-samuel@sholland.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210831_223958_848833_4D7DAAB6 X-CRM114-Status: GOOD ( 18.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series adds a CCU driver for the RTC in the H616 and R329. The extra patches at the end of this series show 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. I do not know how to best represent that binding -- that is a major reason why this series is an RFC. 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 in the existing RTC clock driver and avoid some duplicate code, but I'm concerned about the complexity there, without any of the CCU abstraction. This series is currently based on top of the other series I just sent (clk: sunxi-ng: Lifetime fixes and module support), but I can rebase it elsewhere. Samuel Holland (7): dt-bindings: rtc: sun6i: Add H616 and R329 compatibles clk: sunxi-ng: div: Add macro using CLK_HW_INIT_FW_NAME clk: sunxi-ng: mux: Add macro using CLK_HW_INIT_PARENTS_DATA clk: sunxi-ng: mux: Allow muxes to have keys clk: sunxi-ng: Add support for the sun50i RTC clocks [DO NOT MERGE] clk: sunxi-ng: Add support for H6 [DO NOT MERGE] clk: sunxi-ng: Add support for T5 .../bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 55 ++- drivers/clk/sunxi-ng/Kconfig | 6 + drivers/clk/sunxi-ng/Makefile | 1 + drivers/clk/sunxi-ng/ccu_common.h | 1 + drivers/clk/sunxi-ng/ccu_div.h | 14 + drivers/clk/sunxi-ng/ccu_mux.c | 7 + drivers/clk/sunxi-ng/ccu_mux.h | 28 ++ drivers/clk/sunxi-ng/sun50i-rtc-ccu.c | 433 ++++++++++++++++++ drivers/clk/sunxi-ng/sun50i-rtc-ccu.h | 15 + drivers/rtc/rtc-sun6i.c | 17 - include/dt-bindings/clock/sun50i-rtc.h | 12 + 11 files changed, 566 insertions(+), 23 deletions(-) create mode 100644 drivers/clk/sunxi-ng/sun50i-rtc-ccu.c create mode 100644 drivers/clk/sunxi-ng/sun50i-rtc-ccu.h create mode 100644 include/dt-bindings/clock/sun50i-rtc.h -- 2.31.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel