From patchwork Fri Jun 3 19:05:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12869380 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D3CF2C43334 for ; Fri, 3 Jun 2022 19:06:39 +0000 (UTC) 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=CjmMHf+mQ1TnHC8qJC5dgB+XCG4/MlH+TwqhvgCgYRk=; b=ejhkdsccpV8kSO 51WcN2UBRdDf+kJvUb0MLE/EfoTLeRfz7wMiFMxrmaOHanBXR2CpWlaULW2un8RCZ1klhNZ+MHyeb pmXwpO9kJ1JqK8lzTWqb4/bkICymqmQCeLgABSHJhT0SXO2l7QCE657Z/zMAHcdHDSsrnaTih9M+T z6WPCj9+NBiW0JO43J5iDZRrOTiG8ej/3wuJSzkv0qsgdsn7iD5DQp0UL/l8PEyHctHDQf4a5rCia baNfL5DRMbcbtTxQdbThHV8IhuoHlmjmmL/QCAycpWniIKX4PfzcX50AjXNwutwd1p04RhqSIDi1a yW4C8qpG+szNTcP5ASkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxCbr-008UEo-36; Fri, 03 Jun 2022 19:05:23 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nxCbn-008UCO-FD for linux-arm-kernel@lists.infradead.org; Fri, 03 Jun 2022 19:05:20 +0000 Received: by mail-wr1-x431.google.com with SMTP id a15so3001736wrh.2 for ; Fri, 03 Jun 2022 12:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H4l6l2+LqiOAH0dZelhPsMXnUGKfvd85Zt0GdanrYgo=; b=M5hnMb4CuBoUZpZeyvJDSxPSJ9OKj9E4VW0RDQ2aQNYV7/RnjpzNdxWpaAyjvTKLN7 USHIBU9qf22PFo4NgZ3humWSzMGISiVv666dwxX3rlb1OOQWksEomMKRWukUL8apazlR KPRl8LyO4WQvhm1CENAZKFlWqsr57FK+YpRv8gANAz0miyCko1XScotlwE5dcACPUjfe 9ILTCLGcaiWkQnQKFPXGMXNhJ8VnJoaqLUVgj3Noyr/Nn/1Gwl39ikS/rpTENK5LT5Oj Ns9gvKC20I9JCkCW9/rOxDFfwvRmis//ni+8mACpmwP/3+PIp+Tx5vJr5bZTvKHqhUKJ hSkA== 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=H4l6l2+LqiOAH0dZelhPsMXnUGKfvd85Zt0GdanrYgo=; b=xXsNz/Wx/y00nHfH1GJrUobe2e0yaKdPLkq7RELdM2jMCzb1ek9dSkHsvsvR2rsue8 1h0LZ3YMxPKXErnr/n6Tvgo/CDG/6nQ7UH9GRWMfAtJCY+uDbubgNIKpMzNjxkuvfc68 NMRzioXoz7aW/TPpkljKZdSd209W//r/9OJ3XJo7OhsA8Iy7Vza2EIGJ9MyLKbZCd/ZF ZanVMK9G5z9FYq2CpjkLE9tDLljixzAzvzLwpSgqPbJe/u8iQbrELvOq2UI6PT41sAXD 5Z/CTexh9yv6jzIty5S6Xm5TB4KRpzz3fBmbq+CuecWiwhZU+Tg+UbqnZ0XJL+cHxOK1 35nw== X-Gm-Message-State: AOAM533PXrkTcOuwitEthximPtzi19SGbasV7cvEpTgOaxQrAr+5jFq9 0stJr7oUl2y2A9o2vbgb7tw= X-Google-Smtp-Source: ABdhPJyenvVHsJ92MUvPmQJQfRXhRzsHiPrPAS0MBFnshuaYBPsmApjEVhnJsiJ+UARO477OXI92lA== X-Received: by 2002:a5d:6348:0:b0:213:3a8e:e75d with SMTP id b8-20020a5d6348000000b002133a8ee75dmr7758317wrw.55.1654283115278; Fri, 03 Jun 2022 12:05:15 -0700 (PDT) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id d12-20020a5d4f8c000000b00210346cd0b7sm8059568wru.101.2022.06.03.12.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jun 2022 12:05:14 -0700 (PDT) From: Romain Perier To: Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, Daniel Palmer , Romain Perier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND v5 0/1] ARM: mstar: cpupll Date: Fri, 3 Jun 2022 21:05:08 +0200 Message-Id: <20220603190509.45986-1-romain.perier@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220603_120519_549428_CA36D7F1 X-CRM114-Status: GOOD ( 14.63 ) 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 is a resend of the remaining patches of this series. I have kept the cover letter in order to do not loose context of the previous series. This series adds a basic driver for the PLL that generates the cpu clock on MStar/SigmaStar ARMv7 SoCs. Unfortunately there isn't much documentation for this thing so there are few magic values and guesses. This needs to come after the MPLL DT changes. Changes since v4: - Removed merged patches (dt-bindings documentation and dt-bindings) - Rebased onto 5.19 Changes since v3: - Added Reviewed-by on Daniel's patches - Removed "[PATCH v3 8/9] ARM: mstar: Add OPP table for mercury5" Changes since v2: - Re-ordered Kconfig by name - Re-ordered includes alphabetically and removed useless ones - Used timeout for cpu_relax - Returned DIV_ROUND_DOWN_ULL() directly in msc313_cpupll_frequencyforreg() - Returned DIV_ROUND_DOWN_ULL() directly in msc313_cpupll_regforfrequecy() - Reduced the number of lines for msc313_cpupll_of_match - Removed CLK_IS_CRITICAL Changes since v1: - Re-worked the series and ensure that 'make dt_binding_check' passes. The required commit is merged now, so it is okay. - Fixed coding style issues in the driver and makes check_patch.pl happy - Added one more commit for extending the opp_table for infinity2m. Daniel Palmer (1): clk: mstar: msc313 cpupll clk driver drivers/clk/mstar/Kconfig | 8 + drivers/clk/mstar/Makefile | 2 +- drivers/clk/mstar/clk-msc313-cpupll.c | 221 ++++++++++++++++++++++++++ 3 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/mstar/clk-msc313-cpupll.c