From patchwork Tue Apr 23 09:51:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 10912589 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 6F10A14DB for ; Tue, 23 Apr 2019 09:51:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6073928528 for ; Tue, 23 Apr 2019 09:51:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52F41287DB; Tue, 23 Apr 2019 09:51:33 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable 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 01C5D28528 for ; Tue, 23 Apr 2019 09:51:33 +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=7TP12XyYLwgrqMyNKQI34I+B2CdcaVJdwHqamP0b5vE=; b=IQ7iEEabxzqVIt Upf68RrEi4KA3yiFzkj2+6xKhAWISfsIuEEMqRZX7A7L94DwRw7+TWGvfu6BAyFQ7i6sMkulRtYjD C83NvSzUPOmcNZdm7sz/KgAfV/uvKo+U6K0sWQinn566vxSi3DMSlx3vxk6FQOMOq5WqFp5wS8mTA G/7RAPPH6VewRIuLKcF/HrDKpbDFGGqneu89EF0/Am6SATxBEjJG50tyRfbpou6H7IzrOMCcFQmbd tluPlDfY4W/r3V0jR4ukIMvix5JAmRiiw+/S9bhg0fWeQDdGFn+mLUmiG4+LR/CGj9ABB2ys1wofb VaEnLrN8ZSw61AjxCtoA==; 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 1hIs5H-0001Cv-Gt; Tue, 23 Apr 2019 09:51:27 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hIs5D-0001BZ-H0 for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2019 09:51:25 +0000 X-Originating-IP: 87.231.134.186 Received: from localhost (87-231-134-186.rev.numericable.fr [87.231.134.186]) (Authenticated sender: gregory.clement@bootlin.com) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 009CBE001F; Tue, 23 Apr 2019 09:51:11 +0000 (UTC) From: Gregory CLEMENT To: Stephen Boyd , Mike Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH resend v5 0/6] Add CPU clock support for Armada 7K/8K Date: Tue, 23 Apr 2019 11:51:01 +0200 Message-Id: <20190423095107.21091-1-gregory.clement@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190423_025124_084736_975EC705 X-CRM114-Status: GOOD ( 16.80 ) 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: devicetree@vger.kernel.org, Jason Cooper , Andrew Lunn , Antoine Tenart , Gregory CLEMENT , Maxime Chevallier , Rob Herring , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Rayn?= =?utf-8?q?al?= , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth 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 Hello, [resent because I used an old non worlking email for Stephen Boyd] This is the fifth version of a series allowing to manage the cpu clock for Armada 7K/8K. The third version was sent more than 3 months without any relevant feedback since this end of december last year. For these SoCs, the CPUs share the same clock by cluster, so actually the clock management is done at cluster level. As for the other Armada 7K/8K clocks it is possible to have multiple AP so here again we need to have unique name: the purpose of the second patch is to share a common code which will be used in 3 drivers. The last 2 patch enable the driver at dt and platform level and will be applied through the mvebu subsystem. Changelog v4->v5: - As requested by the device tree maintainer make the reg property mandatory - Updated the device tree files accordingly with the new binding Changelog v3->v4: - Rebased on v5.1-rc1 - Mention in the binding that a reg property can be used to make the device tree maintainer happy in the hope that there will be finally a review on this patch blocking the whole series. Changelog v2->v3: - Add back the first patch documenting the binding Changelog v1->v2: - Header cleanup - Use unsigned int instead of it for cluster member of the ap_cpu_clk struct - Use clk_hw instead of clk - Use regmap_read_poll_timeout - Use for_each_of_cpu_node - Remove unnecessary WARN_ON() - Remove headers from armada_ap_cp_helper.h - Few other minor cleanup Gregory CLEMENT (6): dt-bindings: ap806: add the cluster clock node in the syscon file clk: mvebu: add helper file for Armada AP and CP clocks clk: mvebu: add CPU clock driver for Armada 7K/8K clk: mvebu: ap806: Fix clock name for the cluster arm64: marvell: enable the Armada 7K/8K CPU clk driver arm64: dts: marvell: Add cpu clock node on Armada 7K/8K .../arm/marvell/ap806-system-controller.txt | 26 ++ arch/arm64/Kconfig.platforms | 1 + .../boot/dts/marvell/armada-ap806-quad.dtsi | 4 + arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 7 + drivers/clk/mvebu/Kconfig | 8 + drivers/clk/mvebu/Makefile | 2 + drivers/clk/mvebu/ap-cpu-clk.c | 259 ++++++++++++++++++ drivers/clk/mvebu/ap806-system-controller.c | 24 +- drivers/clk/mvebu/armada_ap_cp_helper.c | 30 ++ drivers/clk/mvebu/armada_ap_cp_helper.h | 11 + drivers/clk/mvebu/cp110-system-controller.c | 32 +-- 11 files changed, 362 insertions(+), 42 deletions(-) create mode 100644 drivers/clk/mvebu/ap-cpu-clk.c create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.c create mode 100644 drivers/clk/mvebu/armada_ap_cp_helper.h