From patchwork Sat Nov 14 13:50:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Palmer X-Patchwork-Id: 11905605 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=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 47467C63697 for ; Sat, 14 Nov 2020 13:53:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 F058D22252 for ; Sat, 14 Nov 2020 13:53:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="1v0lgipT"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=0x0f.com header.i=@0x0f.com header.b="HaIUiw2Q" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F058D22252 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=0x0f.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=73tjrS+lOA5dqHPPwTLjlGqw+pgJ4kK/a8UBYUaE1xw=; b=1v0lgipTo+8JIrjYDND6XgIBqX WBnfUXcmDor2UICd2rIPR5ut32k2kOT4kIr6AZWNOTfCsuaLvzj0AXTs79UR1utu2CMD7Lxzj615M b8RMIDeH6ygrEZKQLQ2c0B57/EhF4xPtyV1PRL+AG1JCjJ+ccB/YNVvmvH8nusQCiUOIKC58ilp00 +fCANRUlB1WeMOhH0lWjRE7gpgGuhlAgJ5vBkycY2GeaWzd5RLcwmFoNWvFoGcXSdpPq2aezXP6sS YrX5oo6yImY2Liil7NNSsj4bNvw2SAe/EYCd1plq3J+Ye0hsIBawKZCGbW/kMmjQ0V8jBeuej299l z/FARKJg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdvye-0008Dq-9A; Sat, 14 Nov 2020 13:52:28 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdvyZ-0008CL-Ba for linux-arm-kernel@lists.infradead.org; Sat, 14 Nov 2020 13:52:25 +0000 Received: by mail-pf1-x441.google.com with SMTP id y7so9741316pfq.11 for ; Sat, 14 Nov 2020 05:52:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=0x0f.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XwyLNKLBDuYh+S1CXSzktBr8nFzPgTD1/kheOU6L4+U=; b=HaIUiw2QOb9sBu43gc9htmVnhXqSKwFXI8hZNLBdm7Bv+ggoF2BEKIcxPwyLm1kb+B iD96/IbPqCdhaYGCCd1lIliHlez52aO4YmPcyPYCNUfZJW+Q08/pZki0ueQEiS4fURow Ju4vwM2FJ1I1gMhDUso2UXcaKQX/vBNCEveCM= 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=XwyLNKLBDuYh+S1CXSzktBr8nFzPgTD1/kheOU6L4+U=; b=GvOF32oUKzP2xY9Zz0cGjnPvSKkDWrOBFXmgZzQQKsO0qqDmUMyGGMyOCKvI9yNbNR CGbs/Qnc+1M3fpMbKR+eAJX6DVgR2KMjlkmSQ2rsPNydnysNIWjpqoiRvRCi8QvyB/lc BAzTUpy9azdHSLrjBLs7AshJjE3QNBHfQHU+33wWlxDAlTuVqy23pdQNjI4ZIR6fWwwj 8ODRkjGSJ9gus0sB6SOTfG2WX3xHJyUAzDphScAyS8xCEKotSzHCzJURUxOIiuqWyuaf O40YcZEtmjAeTTag7s1Zli7xo36hhwPu9BPRkORKGH+MqdTzfnVsN3nuV+wZYSjYcjR8 le+g== X-Gm-Message-State: AOAM532Ob9nYljZ7g2EFrIfLA8LQXTGLzt2H11fXByersMw5ieNEf3Fw 4kVEsTzRDz9FnIZ8/87jCw1zrhJoR2c4lQ== X-Google-Smtp-Source: ABdhPJw9EP67HuQ6JJdBN1Tbf3rKgx5WifKbz5KPceLjr+2b0yeL8JDoiHWpaTxbjAl985Lh55XdpA== X-Received: by 2002:a63:e04:: with SMTP id d4mr6043809pgl.101.1605361939416; Sat, 14 Nov 2020 05:52:19 -0800 (PST) Received: from shiro.work (p1268123-ipngn200803sizuokaden.shizuoka.ocn.ne.jp. [118.13.124.123]) by smtp.googlemail.com with ESMTPSA id r205sm13008023pfr.25.2020.11.14.05.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Nov 2020 05:52:18 -0800 (PST) From: Daniel Palmer To: linux-clk@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 0/6] ARM: mstar: Basic MPLL support Date: Sat, 14 Nov 2020 22:50:38 +0900 Message-Id: <20201114135044.724385-1-daniel@0x0f.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201114_085223_567397_315336FF X-CRM114-Status: GOOD ( 14.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Palmer , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, w@1wt.eu Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series adds support for the MPLL block that is present in MStar/SigmaStar ARMv7 SoCs. This block is intended to be set and forgotten about before Linux is running so all it actually does it read the registers and calculate what the output frequencies should be. We only care about this block because there are upstream dividers, gates, muxes etc that need something between the input crystal and themselves to calculate their own rates. I think this needs to be applied after the GPIO series[0] that is currently inflight. 0 - https://lore.kernel.org/linux-gpio/20201109121731.1537580-1-daniel@0x0f.com/ Daniel Palmer (6): dt-bindings: clk: mstar msc313 mpll binding header dt-bindings: clk: mstar msc313 mpll binding description clk: mstar: MStar/SigmaStar MPLL driver ARM: mstar: Select MSTAR_MSC313_MPLL ARM: mstar: Add the external clocks to the base dsti ARM: mstar: Add mpll to base dtsi .../bindings/clock/mstar,msc313-mpll.yaml | 58 ++++++ MAINTAINERS | 3 + arch/arm/boot/dts/mstar-v7.dtsi | 27 +++ arch/arm/mach-mstar/Kconfig | 1 + drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/mstar/Kconfig | 5 + drivers/clk/mstar/Makefile | 6 + drivers/clk/mstar/clk-msc313-mpll.c | 177 ++++++++++++++++++ include/dt-bindings/clock/mstar-msc313-mpll.h | 19 ++ 10 files changed, 298 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/mstar,msc313-mpll.yaml create mode 100644 drivers/clk/mstar/Kconfig create mode 100644 drivers/clk/mstar/Makefile create mode 100644 drivers/clk/mstar/clk-msc313-mpll.c create mode 100644 include/dt-bindings/clock/mstar-msc313-mpll.h