From patchwork Wed Oct 5 08:53:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 12999062 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 ECB80C433F5 for ; Wed, 5 Oct 2022 08:54:22 +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=VhNbEXpCWkauHIRX8+uRLxAV8olkx5Hqi5B5lsll6lA=; b=ObarZZg2CK7GWL 9+5Ly4HhZ+vqlLG9Fe4Nvn3QD0yIctoizSX564ZTfWpJ+R7uEyl5s6Aym4cVmDDI3f0v1osD1F+W6 GHn8SiD/fGoa0MIVMcj3oM1nFLeJzucWPijaMSWglHoS5Ghi1dph1+eT/BQSFXWSzJMCSYiz5JWqC 6Mwas6qNoPZUd4PxmuqSKfwArsDBJ8GNo+8xI7hWLg/SOvy+RmXLXylFcHdYJCnFa6rOeWdI9DUqD 60TzubV61y1LfMR5+fkbufRX0cSNqkMnvyAyY21hkbCxQBgAzSqvf/MjWYR2oAfm+0ak+rZ4OBdFB fykTbMHCIXIpKWMuDfWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1og09U-00DCJE-7J; Wed, 05 Oct 2022 08:53:16 +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 1og09Q-00DCIF-VM for linux-arm-kernel@lists.infradead.org; Wed, 05 Oct 2022 08:53:14 +0000 Received: by mail-wr1-x431.google.com with SMTP id a3so12626217wrt.0 for ; Wed, 05 Oct 2022 01:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=8BqRTIfWSS9jf0LKTH+g0B1dFdrxfzLef727HSnDg5E=; b=PKxmtwuMywF2lVOXQI8Ca6UEoonhS751LjVm3KrBx8VHrRfyLKiUqcZciFCSo/CtOy s1lIs1HIDzL6ahr/ODtsZQSTe+KZvRQJtG3iXKzUHJIdn6PwYNR8v6Z33xDrn/8YishX TX0mMe2pE8EgFciVv7M9tdz+ZN83q38kRceEZcbX5dVbg60M2urHf5NVqcm2bDwUMdP/ s/2qMvdyhGYNeVlwB5N04sZrMFNp4wBPKRlhRh1eL6nVDsbE8T/HEnmQ7OY4cJNSbf+0 ei/mtpIpIFufC+npusVvxmGIwvqmmVIkglsH+fofPMj7B3YwAUgAn8S6blJxbp1hirh8 TR7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=8BqRTIfWSS9jf0LKTH+g0B1dFdrxfzLef727HSnDg5E=; b=VOxWsbNtvw7PVbqr6IoQNTMeb1Cy5zd5/5WgPNQ8jxlU8qiTsPRud46hmxOsOzyGy8 /cApknScMbVkiGTSURsbWnQBkotLzI2XeCn+A9W0pGp9o1euPbJW0r8Qzb2HbhUjNmpM W9gJ3ntNaa7JzxiDZ8hjOJUAwwdsRCp/tVOeCIrj8ANAK7XK5W9xVKMQ+3vJCzb0ME/D 49jf1tRHBFHw9S4HKq4sGSaiqbIyn37oSFgTpooPF+pDokZABaWBTk0cA8lLhUUxm1mS oYAwQVg0xrJS3mM9/fP0yhNl3UpzncAwwa212fxBLqSWnyudHOoda1+wI5GVPlzw3MTp iqhw== X-Gm-Message-State: ACrzQf1CmVz8Hx4rufmhjHg0gfamSehtjSbIbZUVeyQrLgdzdNOK0hGf DotOjsclf7XZ5fV44xPYMfc= X-Google-Smtp-Source: AMsMyM4bBNLaqXf7/qpCF+O7XFAWN6Rt2ddxzdLH3ac1+JugGkSavY+KGJhd2skUyERYhn7PowfJcA== X-Received: by 2002:a05:6000:1881:b0:22c:bee7:96e with SMTP id a1-20020a056000188100b0022cbee7096emr18495846wri.418.1664959988511; Wed, 05 Oct 2022 01:53:08 -0700 (PDT) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id n19-20020a05600c4f9300b003b4cba4ef71sm1333769wmq.41.2022.10.05.01.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 01:53:07 -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 v6 0/1] ARM: mstar: cpupll Date: Wed, 5 Oct 2022 10:53:04 +0200 Message-Id: <20221005085305.42075-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-20221005_015313_025609_31E832A1 X-CRM114-Status: GOOD ( 15.73 ) 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 v5: - Fixed tags for Willy - Add missing kernel.h and device.h - Use devm_of_clk_add_hw_provider - Move "cpupll_parent" on the stack as it is only used by devm_clk_hw_register (it seems safe). 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 | 7 + drivers/clk/mstar/Makefile | 1 + drivers/clk/mstar/clk-msc313-cpupll.c | 220 ++++++++++++++++++++++++++ 3 files changed, 228 insertions(+) create mode 100644 drivers/clk/mstar/clk-msc313-cpupll.c