From patchwork Thu Oct 7 19:41:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Protsenko X-Patchwork-Id: 12542897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0AEFC433EF for ; Thu, 7 Oct 2021 19:43:07 +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 66E5A60FC4 for ; Thu, 7 Oct 2021 19:43:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 66E5A60FC4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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=Z91GOeAyIeX4vCBJgaHNiCMSt/ojJkhxGJPYljC7dUg=; b=WqplYXXvCqwnRo 73eRDpFlP2fEKOsICPg/Wdiz3syU0X9rFEZTxZT1IimE41sx/fpANBTiNYBZWcsb9NE31QBtesoTG BV94W680qBPJNa2ghfj1P3YtissbQo3zdS6ZsdQO/s4RE516ARuBVnRT9+ZIMqh02kJP+OXMTJlDV hXcGVnw5XSqo1MEVQrOWJ19qOuWE+kHjO3sLtAx5xAIj8fT01F6TpVuFd8otDdBEFZAqcsQzXkqT9 mRZANEqSsHWmH1F6PuKPPrSvtCrE7gk68zz5QjA47dL7mdlFQG1Ds59m7RwnFgwYpiNxuTjombOU2 YY3mIJEq9O2JB3yGQdQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYZGb-000amS-IU; Thu, 07 Oct 2021 19:41:21 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mYZGX-000alM-SW for linux-arm-kernel@lists.infradead.org; Thu, 07 Oct 2021 19:41:19 +0000 Received: by mail-lf1-x134.google.com with SMTP id j21so11493725lfe.0 for ; Thu, 07 Oct 2021 12:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WZ5raaSJ3Kh1m3565MHsi6//vzYo4hkeevp5MNSOJt4=; b=AbO00kxEwuBcmi49QesZN1giMt72iFySJuAC6O7CpoMTKLLnWY/Sm5SunfqzMIKY5/ C1SG32C3bS0r14x8qS4oc8JtpiMTvT9heLEvBMaxgEfvnbQHsHeE13t2MINGg+TV7fg6 xUdfOK4wwvvDRZ8HAlBsXczfALPPImI5rYrLlXVx2UnKjCHfF+6ibK65xcAMpJv0y8Yv dnf6Oo6uPsYNpHAmGfVrtfYY//4eknVUUwg0ddRACIFXA7Wci6Mwtsp+uIp7YH2ULlBJ tSfK9kTpDB95S/BRzc6kfCntUuG5GrB98Em6b+GZipoJlmLithRsUAtMMglT4qt/RPq7 1Ung== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WZ5raaSJ3Kh1m3565MHsi6//vzYo4hkeevp5MNSOJt4=; b=Ot8JwivsV0VMvUFclJtuC4xiOSmWb/CBgqPh4K0tkAW5ZDJc917InSJzPtCxL0Jv3v 74U5ozhBqDZeHuBUUOstP5KzwqMre10xZrgdsz0Dto5f31ZFYX+VxSCLsILHAgDct1rc pf6VW7EnvG1/gf+Up/GCD8eeHnINbHz1prZfFPMSs4NapF0WOX1q6JysaS0w3Mbslo1u NutAhi65Mwd1T/KvYH364oLALrLsqCBGNm9JwHf8J3+HdNBen4vpU7EsTvYU8MJRwSyb 1mG5pwe8+NZI27ZIZL9IM4QyJe/TVZlvaqACx5I7/IU8JY6FUiF0gKa4r0sltQ/H08W5 yP9w== X-Gm-Message-State: AOAM530hK6VxCZ1UFTQ7cPhy/dMAKv8jPWBSMCWN/1REKWw4HIMKJst+ 3AcQIKobfeo8sU/tdUCha70QhQ== X-Google-Smtp-Source: ABdhPJx72lBMBm4B023ZywQIdYifb6RLPIYCHYxT2sMbt3Qa4kMZYvce/V4Tfti1jFrhxzvQgWKFgA== X-Received: by 2002:a05:6512:13a5:: with SMTP id p37mr6066109lfa.403.1633635675174; Thu, 07 Oct 2021 12:41:15 -0700 (PDT) Received: from localhost ([31.134.121.151]) by smtp.gmail.com with ESMTPSA id q8sm23879lfd.126.2021.10.07.12.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 12:41:14 -0700 (PDT) From: Sam Protsenko To: Krzysztof Kozlowski , Sylwester Nawrocki , =?utf-8?q?Pawe=C5=82_Chmiel?= , Chanwoo Choi , Tomasz Figa , Rob Herring , Stephen Boyd , Michael Turquette Cc: Ryu Euiyoul , Tom Gall , Sumit Semwal , John Stultz , Amit Pundir , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2 0/5] clk: samsung: Introduce Exynos850 SoC clock driver Date: Thu, 7 Oct 2021 22:41:08 +0300 Message-Id: <20211007194113.10507-1-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211007_124117_952456_70228024 X-CRM114-Status: GOOD ( 15.13 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series provides the implementation for Exynos850 clock driver, its documentation and corresponding changes for Samsung clock infrastructure (adds new PLL types used in Exynos850 SoC, following TRM). I tried to follow already established design for Samsung clock drivers (getting most insights from Exynos5433 clock driver), and integrate the driver into existing infrastructure. The whole driver was implemented from scratch, using mostly TRM and downstream kernel for clock dependencies/hierarchy info. For now only basic clocks are implemented, including next blocks: - CMU_TOP - CMU_PERI - CMU_CORE - CMU_HSI - CMU_DPU Some CMUs are still not implemented, but that can be added in future, when the need arises. The driver also lacks CLKOUT support, PM ops and automatic clocks control (using Q-Channel protocol). All that can be added independently later. Implemented clock tree was tested via UART and MMC drivers, and using DebugFS clk support (e.g. using 'clk_summary' file). In order to keep all clocks running I added 'clk_ignore_unused' kernel param in my local tree, and defined CLOCK_ALLOW_WRITE_DEBUGFS in clk.c for actually testing the clocks via DebugFS. Changes in v2: - Added CMU_DPU implementation - Moved bus clock enablement to clk-exynos850.c - See also "v2 changes" list in each particular patch Sam Protsenko (5): clk: samsung: clk-pll: Implement pll0822x PLL type clk: samsung: clk-pll: Implement pll0831x PLL type dt-bindings: clock: Add bindings definitions for Exynos850 CMU dt-bindings: clock: Document Exynos850 CMU bindings clk: samsung: Introduce Exynos850 clock driver .../clock/samsung,exynos850-clock.yaml | 185 ++++ drivers/clk/samsung/Makefile | 1 + drivers/clk/samsung/clk-exynos850.c | 835 ++++++++++++++++++ drivers/clk/samsung/clk-pll.c | 196 ++++ drivers/clk/samsung/clk-pll.h | 2 + include/dt-bindings/clock/exynos850.h | 141 +++ 6 files changed, 1360 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/samsung,exynos850-clock.yaml create mode 100644 drivers/clk/samsung/clk-exynos850.c create mode 100644 include/dt-bindings/clock/exynos850.h