From patchwork Sat Oct 22 13:34:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Perier X-Patchwork-Id: 13015969 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 6191BC433FE for ; Sat, 22 Oct 2022 13:35:31 +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=ik+iKLFWrwqjFVbln58aKnqglSBj69SA/gHeZRlI/dM=; b=xLssIX2cGZ4XMx 8JsvtZcl54fJmQOGjGPPobTsUP1LZNWRRKPVcgYMCPSsnuuyNtIF0Jvqln51idfxggI/iEwRaXcQL QYabp9/pQ+hsTp0G7X6xX2Opzlavr++F5M1Zi97IVTcxuw1EomBK+O9zp7QWpmdP9uPQyCTcSk0sh x1HR4Ln4lk6z22GdaQQcWaglI4dx2vQfeUnlBHZuhjLyRUvOo6GL0gNhUn6hIVfAbc798IGOcx4fL Weo7yS9b1/B/bWmucl/sv7J7mbV2+XUWNGxVGYveuzBi1LyMuhrngeUdM8AlZaoHjIUSAFegTEd0L SAtwRjbIjdLBXjr4eYPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omEdm-00CjDI-Kt; Sat, 22 Oct 2022 13:34:18 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omEdk-00CjCI-4k for linux-arm-kernel@lists.infradead.org; Sat, 22 Oct 2022 13:34:17 +0000 Received: by mail-wr1-x435.google.com with SMTP id o4so650159wrq.6 for ; Sat, 22 Oct 2022 06:34:14 -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:message-id:reply-to; bh=Fs1ugU1QCtTRojQKok2Y9RVK5OYpb5v6MU7b7mZxaIU=; b=ADfCJtpLhac9mODNjRtR9Trv7yVpCi+0T6WbsfEnkaoGWXQ23gFvNm1td9GyxF8AR+ sdXo88xxA8Kj0PLQxckvQ5bOJlYh+Bv4yqHPMX9ELqMnRmkh9FTIqnwOYIeXKq6aRJ0r 73TrRdD6/cWa/CzN+OAbySB5UT4pnve4pJT68lMowsBZqxGeUtzDeQnq+pXiprhK60LW pU5Wx3u+FvYqMKj6XCl87ShDLO8h8+6oPxhdrp5cLtQgaUhvmY2MQMX0E1xJeP3MpHGk 6oDpRwWVCRpmb5DIjToNNTSglYNC9NCCZWPrJsNpVfNwsnlgRaj8d/5lm2d9VzkrpjUm LFPA== 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:message-id :reply-to; bh=Fs1ugU1QCtTRojQKok2Y9RVK5OYpb5v6MU7b7mZxaIU=; b=Y2wa+zTS7KacC7ar51Rypmvk7Ooa64OVZWb2Zd0i/6CJmNhWRY6RiR3WqaQILMDO90 PCLKhZvOsXXR+aWAXHlrMvboecPllv1p8c7x8hoGcBkIskX0dF/kuWixFuR3u0RIzQid v1Zz+7I9I6PyFVWbjhoUiMWlf8Kn5+o8WINo5PfXzKR4Wb0AaUMclpY387/fEsiH6FPr SxIDIT704t4JKbkIGL78FFgT3+j+hUyt1kfaNLdDdqfdP1hzgFBXs5D/pVLGhvQuRPar 0/TWVntl/6ouL53JVvAxDsx8PqOXFmT+vdePMDYF76xfLGcx7R0mUMBJo7mkYmzbp6Sd zFYw== X-Gm-Message-State: ACrzQf0yI/rjO1P1bQNO8pwBeVrNVSHTYsXY49peIDL+xugMKMGo8+UW QOV0RTMERZbGY/z/YLrb47o= X-Google-Smtp-Source: AMsMyM6+Gp773kEwcLrpKgHk/yCZrQqvJIxZTgbaVCwMd9zoBCYVvddNef0t+kT59rcLdwldK52wZw== X-Received: by 2002:a5d:6f17:0:b0:22e:33e7:6f6c with SMTP id ay23-20020a5d6f17000000b0022e33e76f6cmr14986014wrb.201.1666445653321; Sat, 22 Oct 2022 06:34:13 -0700 (PDT) Received: from debby ([2a01:e0a:a6d:a8d0:7ff4:8f61:5574:9f95]) by smtp.gmail.com with ESMTPSA id t2-20020adff602000000b0023659925b2asm2770617wrp.51.2022.10.22.06.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 Oct 2022 06:34:12 -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 v7 0/1] ARM: mstar: cpupll Date: Sat, 22 Oct 2022 15:34:03 +0200 Message-Id: <20221022133404.3832-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-20221022_063416_225745_55AB7426 X-CRM114-Status: GOOD ( 15.38 ) 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 v6: - Add my Signed-off-by tag 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