From patchwork Fri Feb 1 14:53:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 10792873 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 D929414E1 for ; Fri, 1 Feb 2019 14:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7903311CC for ; Fri, 1 Feb 2019 14:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BAD5330C3F; Fri, 1 Feb 2019 14:54:09 +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 5E0C130C3F for ; Fri, 1 Feb 2019 14:54:09 +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=Cr64dMD6DblDtJQIBsShePL0pfOGuTLozp+RfkvmUn8=; b=rRP5WAIlA+sEV9 VP+Lve5DmmDbGmrESIeRqPnCtcpuFezBswqmy0GIIcdIYyB01LqWk5RB/w4pl0gPE6SJ+3eCap3TO SE9YZLQFc//zJqKm+d3ImIvUyVeoCTxH/lzfA58pRJMxgPEpsMfhM0QlauqDlf4V1NnYeMhYrp5M7 GmMsERV2DWj5N0Wq2lrzVkyjUQyzrkmBSDZuuYiaBinBBucFBdPzyR1LKbns0aUhTOFhtGXr6cZ/x Koun2gCZ9wk+lYlXnR17XYehR42h0ObGc1ANz8cer1hdWIcw2+qTH72BLQLRsaG+rIF3RGePD37Tz zsTpy7ruQ8qPvubi0fDA==; 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 1gpaCm-0003eE-CX; Fri, 01 Feb 2019 14:54:08 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpaCX-0003QS-Bf for linux-amlogic@lists.infradead.org; Fri, 01 Feb 2019 14:53:55 +0000 Received: by mail-wr1-x442.google.com with SMTP id u4so7410713wrp.3 for ; Fri, 01 Feb 2019 06:53:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8eEdYNzMTYNh/Q6rC2KUrA/noaDZ+qRIqzEIbeziGHs=; b=EO8VTU8+S3rRiziKAMlCUFtrA6MNQaKttQlZLe3Rq0CetsF5MisgygwomPcHKIQgK4 utC8KaJ04hxFAmSA9OAFdRJLY3+9ift7vOAKHL8Q9l+7OVCcn+tixdWJOk8xyJt7sRCh YYGRLj4U1llQgxJErxlpIiSiSH9xmINA/cyIoTi8tnVt/+Osyr3muEBM3uELmqgQqyEM hH8kePo03ZOD/pyEpBHXT7Z015QXOEl5FozEkB8x+DFsJrSCnCiBqwwxTH7ac92JCbd9 3BcAsOofCNstV40QUS66jkwYqnHuJ9EtwRc82h/HIxTxQR7m9u+Ftuo6wscJS6q2ArwU q5qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8eEdYNzMTYNh/Q6rC2KUrA/noaDZ+qRIqzEIbeziGHs=; b=FxZz9IRICcsCTnU9NxdonO/1nSR+5dWCCn3p9wMq+42a9jfUp0TNWlaaTnYuTZapWf Boyxgoplnlg8fPBLTEHYBAzoQFPFDX086YLuzZgvDbDy/km0PsrIZfsFiMI7sMZ37xUD v3hSzZo+yY90PgutNeiQeSxf9lLCE/+AeUUni9lTPhjmH1RThtXQ9DUUqDJlGz0xRF6Z b9VJUl4hzZZthyRB6OpmPh9/4Hfy22OUlunXy4Ro89fgogWN8iNYRDs8SO20YBIM0Yyx csWFAG8GWCrDviRLH3WNSJEixKmZZX3+e4AGUsjqiYB12YPKazBcf3F/JEHfePD5Y8nb dn6w== X-Gm-Message-State: AHQUAubrazyifigCCQTZb6A3UZCZhE/6sQxPT/WIbSyy47YOsKA9yDvJ hNMB4f8i2Tz5uPSTaHlx48j1xg== X-Google-Smtp-Source: AHgI3IZuERyBKP8OahiXgqpaCWRLiGGMzi4ZUEP8uy6TsXIiOiRKqDK28ODJjhL51DHOVn11yh4nHg== X-Received: by 2002:a05:6000:14c:: with SMTP id r12mr1487232wrx.172.1549032831578; Fri, 01 Feb 2019 06:53:51 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id x186sm4754644wmg.41.2019.02.01.06.53.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Feb 2019 06:53:50 -0800 (PST) From: Jerome Brunet To: Neil Armstrong , Stephen Boyd , Michael Turquette Subject: [PATCH v6 0/4] clk: meson-g12a: Add EE clock controller driver Date: Fri, 1 Feb 2019 15:53:41 +0100 Message-Id: <20190201145345.6795-1-jbrunet@baylibre.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-20190201_065353_536616_5BF53479 X-CRM114-Status: GOOD ( 10.88 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, Jian Hu , linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This purpose of this patchset is to the main clock controller of the g12a SoC family This patchset depends on the recent rework the meson clock directory [7]. Changes since v5 [6]: * use clock input driver until something better comes along in CCF * fix pll fractional param size * fix broken gp0 and hifi pll param (<55) * add hdmi pll * fix fdiv2p5 * add mpll_50m * fix mpll clock tree (missing fix 2 divider) * add missing sdio clocks * add vpu clocks * add some RO clock gates * rabase on clk-meson tree Changes since v4 [5]: * add bypass clock "g12a_ee_core" from DT * fix Kconfig description * change g12a_mpll0_div/g12a_mpll1_div/g12a_mpll2_div/g12a_mpll3_div clock's parent name as fixed_pll_dco * drop CLK_SET_RATE_PARENT flag for pll clock * drop CLK_GET_RATE_NOCACHE flag for pll_dco clock * delete usless note * enable G12A clock driver Changes since v3 [4]: * add fixed clocks clk_regmap definition Changes since v2 [2]: * fix fixed clock descriptions * fix alignment * add enable bit for plls base on [3] patches * add fixed clock gate bit Changes since v1 [1]: * fix typo of 'Everything'. * change the word 'AmLogic' to 'Amlogic' * squash patch 1 and 2. * delete usless message of "Trying obsolete regs". * delete the empty line in include/dt-bindings/clock/g12a-clkc.h. * rebase on top of the "next/drivers" branch, and add g12a clock patch. * add CLK_MUX_ROUND_CLOSEST for g12a_sd_emmc_b_clk0_sel and g12a_sd_emmc_c_clk0_sel. [1]: https://lkml.kernel.org/r/1531133549-25806-2-git-send-email-jian.hu@amlogic.com [2]: https://lkml.kernel.org/r/1531728707-192230-2-git-send-email-jian.hu@amlogic.com [3]: https://lkml.kernel.org/r/20180717095617.12240-1-jbrunet@baylibre.com [4]: https://lkml.kernel.org/r/1533890858-113020-1-git-send-email-jian.hu@amlogic.com [5]: https://lkml.kernel.org/r/1541511349-121152-1-git-send-email-jian.hu@amlogic.com [6]: https://lkml.kernel.org/r/1543498917-98605-1-git-send-email-jian.hu@amlogic.com [7]: https://lkml.kernel.org/r/20190201125841.26785-1-jbrunet@baylibre.com Jerome Brunet (2): clk: meson: pll: update driver for the g12a clk: meson: factorise meson64 peripheral clock controller drivers Jian Hu (2): dt-bindings: clk: meson: add g12a periph clock controller bindings clk: meson: g12a: add peripheral clock controller .../bindings/clock/amlogic,gxbb-clkc.txt | 1 + drivers/clk/meson/Kconfig | 21 +- drivers/clk/meson/Makefile | 2 + drivers/clk/meson/axg.c | 59 +- drivers/clk/meson/clk-pll.c | 203 +- drivers/clk/meson/clk-pll.h | 10 +- drivers/clk/meson/clk-regmap.h | 9 +- drivers/clk/meson/g12a.c | 2359 +++++++++++++++++ drivers/clk/meson/g12a.h | 175 ++ drivers/clk/meson/gxbb.c | 272 +- drivers/clk/meson/meson-eeclk.c | 63 + drivers/clk/meson/meson-eeclk.h | 25 + include/dt-bindings/clock/g12a-clkc.h | 135 + 13 files changed, 3147 insertions(+), 187 deletions(-) create mode 100644 drivers/clk/meson/g12a.c create mode 100644 drivers/clk/meson/g12a.h create mode 100644 drivers/clk/meson/meson-eeclk.c create mode 100644 drivers/clk/meson/meson-eeclk.h create mode 100644 include/dt-bindings/clock/g12a-clkc.h Reviewed-by: Neil Armstrong