From patchwork Sat Sep 28 08:37:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13814644 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 204C2CF6493 for ; Sat, 28 Sep 2024 08:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=hgBA2YgBzcVdnVEoc6s2KOvaf1NpbuG7MmZKT5HNBsQ=; b=L+CZjtEMpyqyNp1i5/ELZzEqeJ 8K4y6i6IGRUyWaEyjZtnYYUhvgWMeWFa+QJoHBBHpsSuUffE37M7YIJlwyk2Yh7g62qVPJMuCEBbb 7ZH+eDKtUFKdFsTPPSdMmwjM1mZWVMrrE5LLuSY7AUBgv+MLc4I1im7QZrI3xAnGl0OwCdG/eBiDV Wd7j2o+9dx1yXoWNVNUZUe6wTLnXn7v4P401v28eKmhgz88VvYtaR+LKSd22hlVqmyWhkcK5UIMeO 8nJrtrnvvF1H1N9hEHkWysO0tSDDrP1AX9+unWDieS2aWvKw3NejxKaowCH2u1UP28qQDwAufL15D qmV/LKHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suT0L-0000000CpKA-1j1w; Sat, 28 Sep 2024 08:40:41 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suSy1-0000000Coyd-1Tws for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2024 08:38:18 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a8d56155f51so338584966b.2 for ; Sat, 28 Sep 2024 01:38:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512696; x=1728117496; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hgBA2YgBzcVdnVEoc6s2KOvaf1NpbuG7MmZKT5HNBsQ=; b=pCKVG+cr5nQSs8eKuBoTwziBnO/sv0uc+4CbuOqzVGwmAqcHdb6kh+fUFVcvZfuoOA 05kGl4Luapwvinw1CWhkCTk9yAdAliGpxw/e9h+i86SsbD1OHwG1hGHQybn0iQ160I9H 5VhTjrMIEuBWccAt6UThL1nRPHpSb5AGyC770= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512696; x=1728117496; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hgBA2YgBzcVdnVEoc6s2KOvaf1NpbuG7MmZKT5HNBsQ=; b=jugWD43Vm14NlCAWSRDbUhq+FXamiXv1szanj9OsqmKsevlQMFXBU1P/Xs9cURwQQx e+cIMuA5+v1r8qQZGujadGw3qwPipDwq53OyQHynNYZ5OFP5N1xkrA437hDYWh4Tlrsg pqF5YlcwHptVu8HqE+gjBMXqI24/hDFvD9Uc10NvhK6Zefzbp2QblkFcVY9lKY/EEcp+ cFhozm9wOo66qQ0ypyGigTZrbfpdGBde+Ni7RXplmxHZorVhgrQNIBFcq28R/yL9j/0S hC0skulqwhexYKR5ju6JvsH6YbnQirLjWREm7SelWMjkxn1UvBL3CzVLFoSz6y2Du6t2 pqTQ== X-Forwarded-Encrypted: i=1; AJvYcCWQNXHDDjnHioujUtFX+J9qjjNsR41xmRn7R+JmMUKbyd1JawfwAhUGimv2zJB3bq0HItvaPNGOawXxSYb2gw+1@lists.infradead.org X-Gm-Message-State: AOJu0Ywl7OwVDNear/R2KscwjWE32J01HcN3tW0mJESOR01JXYA9PIFt ZDiQTM5hGAkj8Yg2YwcuOIVvAtJTrq7iNsdodMfLr7JWSggbvjJ1iuCyrSFVduc= X-Google-Smtp-Source: AGHT+IHW+mNjedKWSVNhjRyLls2JlxbznPHja/LY2bWHOSPBdNL3yKePDnTYBIPjvZtBQUPB/9/APQ== X-Received: by 2002:a17:907:1c19:b0:a80:bf95:7743 with SMTP id a640c23a62f3a-a93c48f8a9emr546855266b.13.1727512695646; Sat, 28 Sep 2024 01:38:15 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-54-102-102.retail.telecomitalia.it. [79.54.102.102]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2947a48sm223679466b.118.2024.09.28.01.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 01:38:15 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , Stephen Boyd , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH 1/6] dt-bindings: clock: imx8m-anatop: support spread spectrum clocking Date: Sat, 28 Sep 2024 10:37:49 +0200 Message-ID: <20240928083804.1073942-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> References: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240928_013817_412977_6BB86891 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. 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 The patch adds the DT bindings for enabling and tuning spread spectrum clocking generation. Signed-off-by: Dario Binacchi --- .../bindings/clock/fsl,imx8m-anatop.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml b/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml index bbd22e95b319..c91eb4229ed3 100644 --- a/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml +++ b/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml @@ -32,6 +32,47 @@ properties: '#clock-cells': const: 1 +if: + properties: + compatible: + contains: + enum: + - fsl,imx8mm-anatop + +then: + properties: + fsl,ssc-clocks: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + The phandles to the PLLs with spread spectrum clock generation + hardware capability. + maxItems: 4 + + fsl,ssc-modfreq-hz: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + The values of modulation frequency (Hz unit) of spread spectrum + clocking for each PLL. + maxItems: 4 + + fsl,ssc-modrate-percent: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: + The percentage values of modulation rate of spread spectrum + clocking for each PLL. + maxItems: 4 + + fsl,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/string-array + description: + The modulation techniques of spread spectrum clocking for + each PLL. + oneOf: + - enum: + - down-spread + - up-spread + - center-spread + maxItems: 4 required: - compatible From patchwork Sat Sep 28 08:37:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13814645 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 88C29CF6493 for ; Sat, 28 Sep 2024 08:42:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=k379zOY8JpOCRdB0yzVh9VgxfCdVDSaVvSc2yhV6i0U=; b=m8C8JJjMXibdkaPY1kmdtX94TR jYvdBlfzI3eYkM973G+naJJK0tqprdUoNV5vOkAhZeYFGR779EpcR36YHHfumnAeRD4x2IvEqyMHx KKJLGT4OJM6Kk7ywXciK7PS13UyaGoKrjdD4ZSmnUcquo0rGWo0vsHWiI6w5e5gu8nrVGtkkhi3Fm xdowCidCY4SKHgaMvW9U9Hk/2Qukq5TjSuDpbY55X5h9HmgoXFBNyD5vQ9LuBQTop8NKF2ZC96v7q EddmeV7Rd6594YiwYnvZlGbWnTp+qz9NbWRgsWnlK2DltTmXzC/dYynPuWyLe/JS64t4iyCgKN8K5 N3M5wKrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suT1U-0000000CpUg-3kaJ; Sat, 28 Sep 2024 08:41:52 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suSy3-0000000CozA-44Qv for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2024 08:38:21 +0000 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-37cdac05af9so1138511f8f.0 for ; Sat, 28 Sep 2024 01:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512697; x=1728117497; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=k379zOY8JpOCRdB0yzVh9VgxfCdVDSaVvSc2yhV6i0U=; b=VuJa/+kED+AtuCtfWommUgUuD/atwdrXb+I5vphrvuFjyXNyJta6TAs6JnqoPMPZVy jlBy8v2V6wrLeU3fPSsWr+rWB8i7ckTGUTIcIJH0v/mUkR16dFDAS6DnxVcG/9Aw5EDb g2j0i4MpoHXpZLEfEHxxjZMRTcALFgzFS/yfY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512697; x=1728117497; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=k379zOY8JpOCRdB0yzVh9VgxfCdVDSaVvSc2yhV6i0U=; b=RUkyb+k2zHAcQXQFyTu7Z3U8uKVzIAcaPDM6/WlPcVyIdzcHVaU90imn+c8nu/QozQ 7X2X2Syj2ZtR2/sBu7dHzuOn0+YQSLZxHixrNg8mn2HXgj+domyKynvit6LKPVUWUM7J H70HhJ25cOsBcMBh8emypodEeCRz8x8W0BKnEBJWs4z9CZ8hAhKiUx+dVDvNa7V+rOxH CDKoip0+NpdcFR5Hl475BfwMcArMRfToMSy2lbxMx1UQQ+jdiTHdFzwdnjkT5xNlsK9X pOAhvOqSTUsonWHpamR65tMNArSnDiEQymwKZeHk32CIXfWxlZsTm6Md45VubyDil1sf B8QQ== X-Forwarded-Encrypted: i=1; AJvYcCXnYCfsVneNYEQc987kk1Dr33egt5XbYbGkWoMnHgu6eUCmxOabsvGlGyRrpk5nf0in3aAUJCTw3TKsFrg71DXm@lists.infradead.org X-Gm-Message-State: AOJu0YwNS024KmsY71Z+N7mK6jCnzd0lgdZc17YHIKY85Pe7nJebmMHp R30priGEgbHk0Eofg/1is/CDxgp4fNMN8FlEoRzy57z+qjiXAvOxKyDXapHYuz0= X-Google-Smtp-Source: AGHT+IHCyQ8skwu32yu2SwDHwvsHGmAVmHkmWH0xMp/ynee+PdhG3tyDaW/28q4Wvdxhu/O3lEXDmQ== X-Received: by 2002:adf:fa88:0:b0:37c:cce6:997d with SMTP id ffacd0b85a97d-37cd5a8c952mr5708720f8f.20.1727512697418; Sat, 28 Sep 2024 01:38:17 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-54-102-102.retail.telecomitalia.it. [79.54.102.102]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2947a48sm223679466b.118.2024.09.28.01.38.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 01:38:17 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Fabio Estevam , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH 2/6] clk: imx: pll14xx: support spread spectrum clock generation Date: Sat, 28 Sep 2024 10:37:50 +0200 Message-ID: <20240928083804.1073942-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> References: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240928_013820_036781_535F9313 X-CRM114-Status: GOOD ( 23.77 ) 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 adds support for spread spectrum clock (SSC) generation for the pll14xxx. The addition of the "imx_clk_hw_pll14xx_ssc" macro has minimized the number of changes required to avoid compilation errors following the addition of the SSC setup parameter to the "imx_dev_clk_hw_pll14xx" macro used in the files clk-imx8m{m,n,p}.c. The change to the clk-imx8mp-audiomix.c file prevents the patch from causing a compilation error. Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk-imx8mp-audiomix.c | 2 +- drivers/clk/imx/clk-pll14xx.c | 102 +++++++++++++++++++++++++- drivers/clk/imx/clk.h | 24 +++++- 3 files changed, 124 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp-audiomix.c b/drivers/clk/imx/clk-imx8mp-audiomix.c index b2cb157703c5..bfcf2975c217 100644 --- a/drivers/clk/imx/clk-imx8mp-audiomix.c +++ b/drivers/clk/imx/clk-imx8mp-audiomix.c @@ -365,7 +365,7 @@ static int clk_imx8mp_audiomix_probe(struct platform_device *pdev) clk_hw_data->hws[IMX8MP_CLK_AUDIOMIX_SAI_PLL_REF_SEL] = hw; hw = imx_dev_clk_hw_pll14xx(dev, "sai_pll", "sai_pll_ref_sel", - base + 0x400, &imx_1443x_pll); + base + 0x400, &imx_1443x_pll, NULL); if (IS_ERR(hw)) { ret = PTR_ERR(hw); goto err_clk_register; diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index d63564dbb12c..76014e243a57 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -20,6 +20,8 @@ #define GNRL_CTL 0x0 #define DIV_CTL0 0x4 #define DIV_CTL1 0x8 +#define SSCG_CTRL 0xc + #define LOCK_STATUS BIT(31) #define LOCK_SEL_MASK BIT(29) #define CLKE_MASK BIT(11) @@ -31,6 +33,10 @@ #define KDIV_MASK GENMASK(15, 0) #define KDIV_MIN SHRT_MIN #define KDIV_MAX SHRT_MAX +#define SSCG_ENABLE BIT(31) +#define MFREQ_CTL_MASK GENMASK(19, 12) +#define MRAT_CTL_MASK GENMASK(9, 4) +#define SEL_PF_MASK GENMASK(1, 0) #define LOCK_TIMEOUT_US 10000 @@ -40,6 +46,7 @@ struct clk_pll14xx { enum imx_pll14xx_type type; const struct imx_pll14xx_rate_table *rate_table; int rate_count; + struct imx_pll14xx_ssc ssc; }; #define to_clk_pll14xx(_hw) container_of(_hw, struct clk_pll14xx, hw) @@ -347,6 +354,27 @@ static int clk_pll1416x_set_rate(struct clk_hw *hw, unsigned long drate, return 0; } +static void clk_pll1443x_set_sscg(struct clk_hw *hw, unsigned long parent_rate, + unsigned int pdiv, unsigned int mdiv) +{ + struct clk_pll14xx *pll = to_clk_pll14xx(hw); + struct imx_pll14xx_ssc *ssc = &pll->ssc; + u32 sscg_ctrl = readl_relaxed(pll->base + SSCG_CTRL); + + sscg_ctrl &= + ~(SSCG_ENABLE | MFREQ_CTL_MASK | MRAT_CTL_MASK | SEL_PF_MASK); + if (ssc->enable) { + u32 mfr = parent_rate / (ssc->mod_freq * pdiv * (1 << 5)); + u32 mrr = (ssc->mod_rate * mdiv * (1 << 6)) / (100 * mfr); + + sscg_ctrl |= SSCG_ENABLE | FIELD_PREP(MFREQ_CTL_MASK, mfr) | + FIELD_PREP(MRAT_CTL_MASK, mrr) | + FIELD_PREP(SEL_PF_MASK, ssc->mod_type); + } + + writel_relaxed(sscg_ctrl, pll->base + SSCG_CTRL); +} + static int clk_pll1443x_set_rate(struct clk_hw *hw, unsigned long drate, unsigned long prate) { @@ -368,6 +396,9 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, unsigned long drate, writel_relaxed(FIELD_PREP(KDIV_MASK, rate.kdiv), pll->base + DIV_CTL1); + if (pll->ssc.enable) + clk_pll1443x_set_sscg(hw, prate, rate.pdiv, rate.mdiv); + return 0; } @@ -408,6 +439,9 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, unsigned long drate, gnrl_ctl &= ~BYPASS_MASK; writel_relaxed(gnrl_ctl, pll->base + GNRL_CTL); + if (pll->ssc.enable) + clk_pll1443x_set_sscg(hw, prate, rate.pdiv, rate.mdiv); + return 0; } @@ -487,7 +521,8 @@ static const struct clk_ops clk_pll1443x_ops = { struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, const char *parent_name, void __iomem *base, - const struct imx_pll14xx_clk *pll_clk) + const struct imx_pll14xx_clk *pll_clk, + const struct imx_pll14xx_ssc *ssc) { struct clk_pll14xx *pll; struct clk_hw *hw; @@ -525,6 +560,8 @@ struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, pll->type = pll_clk->type; pll->rate_table = pll_clk->rate_table; pll->rate_count = pll_clk->rate_count; + if (ssc) + memcpy(&pll->ssc, ssc, sizeof(pll->ssc)); val = readl_relaxed(pll->base + GNRL_CTL); val &= ~BYPASS_MASK; @@ -542,3 +579,66 @@ struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, return hw; } EXPORT_SYMBOL_GPL(imx_dev_clk_hw_pll14xx); + +static enum imx_pll14xx_ssc_mod_type clk_pll14xx_ssc_mode(const char *name, + enum imx_pll14xx_ssc_mod_type def) +{ + int i; + struct { + const char *name; + enum imx_pll14xx_ssc_mod_type id; + } mod_methods[] = { + { .name = "down-spread", .id = IMX_PLL14XX_SSC_DOWN_SPREAD }, + { .name = "up-spread", .id = IMX_PLL14XX_SSC_UP_SPREAD }, + { .name = "center-spread", .id = IMX_PLL14XX_SSC_CENTER_SPREAD } + }; + + for (i = 0; i < ARRAY_SIZE(mod_methods); i++) { + if (!strcmp(name, mod_methods[i].name)) + return mod_methods[i].id; + } + + return def; +} + +void imx_clk_pll14xx_get_ssc_conf(struct device_node *np, int pll_id, + struct imx_pll14xx_ssc *ssc) +{ + int i, ret, offset, num_clks; + u32 clk_id, clk_cell_size; + const char *s; + + if (!ssc) + return; + + memset(ssc, 0, sizeof(*ssc)); + + num_clks = of_count_phandle_with_args(np, "fsl,ssc-clocks", + "#clock-cells"); + if (num_clks <= 0) + return; + + ret = of_property_read_u32(np, "#clock-cells", &clk_cell_size); + if (ret) + return; + + for (i = 0; i < num_clks; i++) { + offset = i * clk_cell_size + 1; + of_property_read_u32_index(np, "fsl,ssc-clocks", offset, + &clk_id); + if (clk_id != pll_id) + continue; + + of_property_read_u32_index(np, "fsl,ssc-modfreq-hz", i, + &ssc->mod_freq); + of_property_read_u32_index(np, "fsl,ssc-modrate-percent", i, + &ssc->mod_rate); + if (!of_property_read_string(np, "fsl,ssc-modmethod", &s)) + ssc->mod_type = clk_pll14xx_ssc_mode( + s, IMX_PLL14XX_SSC_DOWN_SPREAD); + + ssc->enable = true; + break; + } +} +EXPORT_SYMBOL_GPL(imx_clk_pll14xx_get_ssc_conf); diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index aa5202f284f3..8cbc75480569 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -62,6 +62,19 @@ struct imx_pll14xx_rate_table { unsigned int kdiv; }; +enum imx_pll14xx_ssc_mod_type { + IMX_PLL14XX_SSC_DOWN_SPREAD, + IMX_PLL14XX_SSC_UP_SPREAD, + IMX_PLL14XX_SSC_CENTER_SPREAD, +}; + +struct imx_pll14xx_ssc { + bool enable; + unsigned int mod_freq; + unsigned int mod_rate; + enum imx_pll14xx_ssc_mod_type mod_type; +}; + struct imx_pll14xx_clk { enum imx_pll14xx_type type; const struct imx_pll14xx_rate_table *rate_table; @@ -222,11 +235,18 @@ extern struct imx_fracn_gppll_clk imx_fracn_gppll_integer; __imx_clk_hw_divider(name, parent, reg, shift, width, flags) #define imx_clk_hw_pll14xx(name, parent_name, base, pll_clk) \ - imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base, pll_clk) + imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base, pll_clk, NULL) + +#define imx_clk_hw_pll14xx_ssc(name, parent_name, base, pll_clk, ssc) \ + imx_dev_clk_hw_pll14xx(NULL, name, parent_name, base, pll_clk, ssc) struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, const char *parent_name, void __iomem *base, - const struct imx_pll14xx_clk *pll_clk); + const struct imx_pll14xx_clk *pll_clk, + const struct imx_pll14xx_ssc *ssc); + +void imx_clk_pll14xx_get_ssc_conf(struct device_node *np, int pll_id, + struct imx_pll14xx_ssc *ssc); struct clk_hw *imx_clk_hw_pllv1(enum imx_pllv1_type type, const char *name, const char *parent, void __iomem *base); From patchwork Sat Sep 28 08:37:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13814646 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 707B1CF6493 for ; Sat, 28 Sep 2024 08:43:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3VEkdzuU9Qc4GQ7KPC08t+6l9YpInoSw+Q79uFbywaU=; b=swYGI6Vc4RpTsKO4q4fCnn5+DA CpYP1656c5ssZaq4Vv8xB1leWfsyV59VLLXk6Jv6YQvK/e0Zh+tLUPRvRgYqVOPmGJQdVeUHKGHUb UGhoZPqLmWyccf3dbmSzHU51zBKbHSS3GD2VvZXndrln5GPOihiCrkoZ09hsCiw6SJSrXyCzZ5OT0 dH8r2JedlO7knoN1YB+2UO0HSgGkFfpOLXbe7S7hVtPi7Cjo7kuw6PgN+dxr3WnNDDU7yFt2CvGfZ YbNPiBq+9X5MkHeB4Bz18OOufs+ZkoXc2o6BfpZmn5BVjYYmDAF5QZ1yOJ2JUSnkM5dg2b2u8fqWz cuoKoNPQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suT2e-0000000CpsE-1W9u; Sat, 28 Sep 2024 08:43:04 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suSy4-0000000CozH-3vQ6 for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2024 08:38:22 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5c42e7adbddso3857727a12.2 for ; Sat, 28 Sep 2024 01:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512699; x=1728117499; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3VEkdzuU9Qc4GQ7KPC08t+6l9YpInoSw+Q79uFbywaU=; b=fdWyAorBc1yAS1FAIBECxBxACE77EFMpnzFmgiU4+h6cTKs4bOM3oay63y7tcx0GrD y7ZF+nzCFWuOXErxeEw/rW505xI/X1Dy7OC6LF0OubSVLEtpf31xuhrMbRgMxhTdIVIU SrEh0RzUQiqwMQlem4VJu1+UQbycX01Oh1o/M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512699; x=1728117499; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3VEkdzuU9Qc4GQ7KPC08t+6l9YpInoSw+Q79uFbywaU=; b=RxNi0GwjJNsa/Lt995QESLVM8CsqI7AmmYuLwdqbv+2Sf9PIm/8lRVmR+5qed4fdrN GWLM9+dTWlV8XsA/349zwk2ARumjbSJMnMYqsOZLOfAhWoVXSGKkHoT051KpX7ZCI3fT 1EiqmCvPARiEH4JJz8J6Ru6l+xMW6DL09q4+RuDOnkX4ZosfZU5fRHuMyZ+73XTigGdO cb/wWwhk9zjTFGF8iEhuesrBuVpkH7HfJqoBfFaNVHiOYldStxIDq37mqmolPQ6HqHte P2jw4m7ttOBLp0etfiBbE1qenGJazLj/XqgF9i9UnzKdHLHRsSUOF0kCX0BFHu2kSKn9 qVPQ== X-Forwarded-Encrypted: i=1; AJvYcCU78u4emf2oM0DFsaMfoP7NyPDqCwK9CIZmbcKUqiCo8Ij08B43hBYkIse0tyb/cXZLZIAsnBI6gxCGxVaz07R3@lists.infradead.org X-Gm-Message-State: AOJu0YwFA6G99Z1yGawR0xqBNwsXqm8lMfaHenwfKFJHkQwPL5MP/kbd DZ4iNwzU96/+YBaAaUTnlLiqyl6u7n3HEPNd+LRLEy7vrLZdmqS5ujF9XSoyJzI= X-Google-Smtp-Source: AGHT+IFa7csnZDelf35kuoatw+A4XX53RvHi8+qFq8X4RDr+Ud2jdFWJt1egnboit9+Z95EazZREyw== X-Received: by 2002:a17:907:3f17:b0:a8d:c3b:b16 with SMTP id a640c23a62f3a-a93c49299c3mr607559266b.28.1727512698854; Sat, 28 Sep 2024 01:38:18 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-54-102-102.retail.telecomitalia.it. [79.54.102.102]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2947a48sm223679466b.118.2024.09.28.01.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 01:38:18 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Fabio Estevam , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH 3/6] clk: imx8mm: support spread spectrum clock generation Date: Sat, 28 Sep 2024 10:37:51 +0200 Message-ID: <20240928083804.1073942-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> References: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240928_013821_005494_3B4EB901 X-CRM114-Status: GOOD ( 12.25 ) 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 The patch adds support for spread spectrum clock generation for the audio, video, and DRAM PLLs. Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk-imx8mm.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index 342049b847b9..0acf2979c929 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -301,6 +301,7 @@ static int imx8mm_clocks_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; void __iomem *base; + struct imx_pll14xx_ssc pll1443x_ssc; int ret; clk_hw_data = kzalloc(struct_size(clk_hw_data, hws, @@ -334,10 +335,14 @@ static int imx8mm_clocks_probe(struct platform_device *pdev) hws[IMX8MM_ARM_PLL_REF_SEL] = imx_clk_hw_mux("arm_pll_ref_sel", base + 0x84, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MM_SYS_PLL3_REF_SEL] = imx_clk_hw_mux("sys_pll3_ref_sel", base + 0x114, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MM_AUDIO_PLL1] = imx_clk_hw_pll14xx("audio_pll1", "audio_pll1_ref_sel", base, &imx_1443x_pll); - hws[IMX8MM_AUDIO_PLL2] = imx_clk_hw_pll14xx("audio_pll2", "audio_pll2_ref_sel", base + 0x14, &imx_1443x_pll); - hws[IMX8MM_VIDEO_PLL1] = imx_clk_hw_pll14xx("video_pll1", "video_pll1_ref_sel", base + 0x28, &imx_1443x_pll); - hws[IMX8MM_DRAM_PLL] = imx_clk_hw_pll14xx("dram_pll", "dram_pll_ref_sel", base + 0x50, &imx_1443x_dram_pll); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MM_AUDIO_PLL1, &pll1443x_ssc); + hws[IMX8MM_AUDIO_PLL1] = imx_clk_hw_pll14xx_ssc("audio_pll1", "audio_pll1_ref_sel", base, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MM_AUDIO_PLL2, &pll1443x_ssc); + hws[IMX8MM_AUDIO_PLL2] = imx_clk_hw_pll14xx_ssc("audio_pll2", "audio_pll2_ref_sel", base + 0x14, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MM_VIDEO_PLL1, &pll1443x_ssc); + hws[IMX8MM_VIDEO_PLL1] = imx_clk_hw_pll14xx_ssc("video_pll1", "video_pll1_ref_sel", base + 0x28, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MM_DRAM_PLL, &pll1443x_ssc); + hws[IMX8MM_DRAM_PLL] = imx_clk_hw_pll14xx_ssc("dram_pll", "dram_pll_ref_sel", base + 0x50, &imx_1443x_dram_pll, &pll1443x_ssc); hws[IMX8MM_GPU_PLL] = imx_clk_hw_pll14xx("gpu_pll", "gpu_pll_ref_sel", base + 0x64, &imx_1416x_pll); hws[IMX8MM_VPU_PLL] = imx_clk_hw_pll14xx("vpu_pll", "vpu_pll_ref_sel", base + 0x74, &imx_1416x_pll); hws[IMX8MM_ARM_PLL] = imx_clk_hw_pll14xx("arm_pll", "arm_pll_ref_sel", base + 0x84, &imx_1416x_pll); From patchwork Sat Sep 28 08:37:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13814647 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 D38EECF6495 for ; Sat, 28 Sep 2024 08:44:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8yZI1Cll/jgswR1C/8/RE7gUqkNMAx5u3jKxacFOTcY=; b=bntx2kCfw+dJAHiugjw374tVrR 2VT/M6727KSR3lN0AuGIpoGpiEaQQZ5keqbedK4Wk3fgAG2rnjBabpGlKIJOr8ObzmnUUlu5ASg8g nr4bMZAcxsGeDnAHNp0TaQE1h1uWDKMeOxYbsTU/EQfAmycbOudvfcB9nBAhTH/C6DON4qsMXJgBy aSHZn2UvxTdxgBLXjfi07zOFurHAGn0FzRbWjU54QtNxg87PEHGdfgJHtVa7aIPG0+uD4GbqoEwNf xJA85Hgt0k2X4SwiIjvk44qUhto2Ozp5RpNGCL/dkMZQnz27KK1T/CTiOEQUxXl1AB58l+bB6sn5E v7UxFMxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suT3m-0000000Cpyo-2uAU; Sat, 28 Sep 2024 08:44:14 +0000 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suSy5-0000000Cozm-3L0X for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2024 08:38:22 +0000 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-a8d43657255so422686866b.0 for ; Sat, 28 Sep 2024 01:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512700; x=1728117500; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8yZI1Cll/jgswR1C/8/RE7gUqkNMAx5u3jKxacFOTcY=; b=Xbz4tcfP4LpHI9lEi4F6KDoWq98NDYVSRXnAlgbI6JH0TFW4FbGL8YQrZ6gFQhBh07 MDqjIqcwGIEek6kpdHLJVTwT/umgy6TQjnaBv4gXqRa2vPaXcfs5hxiV2XvAbjB79TpR W1FLExeV6fsbcE9W+ksPuMf1vDpasac6SUZNA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512700; x=1728117500; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8yZI1Cll/jgswR1C/8/RE7gUqkNMAx5u3jKxacFOTcY=; b=E00G6RFZZc0MTpRrri2ZpETRDinlhCziz64hw0s6txSTx6V/yTUZyuq7UoCyOpvEHw mUP8CeCYKXg1wHMvjgOXkVB7YdsCy2Dghlkg3QEoO65QS/uT4Z9L8+YxAdSGDfqv+kEq oOE2KTDwBQISaszgsS6fZxvlWQAqvqsfnmSvjlcjFcmwM7nFY+1BL5Ad2P//kX8WEiwk s/D+9lZZiEsSNxAwkG11qqq9jN1wKf6jG63uCDuX8itVz86IvPKh2yaHd6wlQIxKk5c+ nGFshwdUzff5dQ+PUdb9AMAG8+2DCQJ2/J1bH7eGrZ3bT+TRHOi4dRD+fmhdrc/47NLN TIvw== X-Forwarded-Encrypted: i=1; AJvYcCV9xIxLdHXdZ/zC8qx61VX/X4eDnrOIlSkGTWC+p4wrUQob52a0WmP81GsynXbn8MsJIpYn/qgBr7L0K+1ygKZ/@lists.infradead.org X-Gm-Message-State: AOJu0YxgaXAx/GIckldKjeDG7PjYTg00L+d6vkzru1XuIptLtzxUu/ts izjOeeq1+XIpuB/attJM3GvKxt8L3kJi8834ZCZtGe9REXE3LdPu6WHvH9ensKY= X-Google-Smtp-Source: AGHT+IEpHCIIkW74i8daN8Da+0LfjBKkKzdVA5122EIzP6PQGBfEDmDMRqPpOckP0H6LzAyxWWQDkQ== X-Received: by 2002:a17:907:3203:b0:a86:851e:3a2b with SMTP id a640c23a62f3a-a93c49299e7mr544249166b.29.1727512700295; Sat, 28 Sep 2024 01:38:20 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-54-102-102.retail.telecomitalia.it. [79.54.102.102]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2947a48sm223679466b.118.2024.09.28.01.38.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 01:38:20 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Fabio Estevam , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH 4/6] clk: imx8mn: support spread spectrum clock generation Date: Sat, 28 Sep 2024 10:37:52 +0200 Message-ID: <20240928083804.1073942-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> References: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240928_013821_856181_C969D09A X-CRM114-Status: GOOD ( 12.34 ) 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 The patch adds support for spread spectrum clock generation for the audio, video, and DRAM PLLs. Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk-imx8mn.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index ab77e148e70c..b33590a9b7b7 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -321,6 +321,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np = dev->of_node; void __iomem *base; + struct imx_pll14xx_ssc pll1443x_ssc; int ret; clk_hw_data = devm_kzalloc(dev, struct_size(clk_hw_data, hws, @@ -356,10 +357,14 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) hws[IMX8MN_ARM_PLL_REF_SEL] = imx_clk_hw_mux("arm_pll_ref_sel", base + 0x84, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MN_SYS_PLL3_REF_SEL] = imx_clk_hw_mux("sys_pll3_ref_sel", base + 0x114, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MN_AUDIO_PLL1] = imx_clk_hw_pll14xx("audio_pll1", "audio_pll1_ref_sel", base, &imx_1443x_pll); - hws[IMX8MN_AUDIO_PLL2] = imx_clk_hw_pll14xx("audio_pll2", "audio_pll2_ref_sel", base + 0x14, &imx_1443x_pll); - hws[IMX8MN_VIDEO_PLL] = imx_clk_hw_pll14xx("video_pll", "video_pll_ref_sel", base + 0x28, &imx_1443x_pll); - hws[IMX8MN_DRAM_PLL] = imx_clk_hw_pll14xx("dram_pll", "dram_pll_ref_sel", base + 0x50, &imx_1443x_dram_pll); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MN_AUDIO_PLL1, &pll1443x_ssc); + hws[IMX8MN_AUDIO_PLL1] = imx_clk_hw_pll14xx_ssc("audio_pll1", "audio_pll1_ref_sel", base, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MN_AUDIO_PLL2, &pll1443x_ssc); + hws[IMX8MN_AUDIO_PLL2] = imx_clk_hw_pll14xx_ssc("audio_pll2", "audio_pll2_ref_sel", base + 0x14, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MN_VIDEO_PLL, &pll1443x_ssc); + hws[IMX8MN_VIDEO_PLL] = imx_clk_hw_pll14xx_ssc("video_pll", "video_pll_ref_sel", base + 0x28, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(np, IMX8MN_DRAM_PLL, &pll1443x_ssc); + hws[IMX8MN_DRAM_PLL] = imx_clk_hw_pll14xx_ssc("dram_pll", "dram_pll_ref_sel", base + 0x50, &imx_1443x_dram_pll, &pll1443x_ssc); hws[IMX8MN_GPU_PLL] = imx_clk_hw_pll14xx("gpu_pll", "gpu_pll_ref_sel", base + 0x64, &imx_1416x_pll); hws[IMX8MN_M7_ALT_PLL] = imx_clk_hw_pll14xx("m7_alt_pll", "m7_alt_pll_ref_sel", base + 0x74, &imx_1416x_pll); hws[IMX8MN_ARM_PLL] = imx_clk_hw_pll14xx("arm_pll", "arm_pll_ref_sel", base + 0x84, &imx_1416x_pll); From patchwork Sat Sep 28 08:37:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13814648 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 B6E6DCF6495 for ; Sat, 28 Sep 2024 08:45:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sANYTc56l1dzuSb6OkWAQtijEDV1flO+WLT+P2kRW58=; b=dEDnErwz19taOSSYOK/N6ajrD5 sT1xI3VrZoLd2zAX/EYAc8ZIeDtKoqYrx83m7lZrmi1eaEhmTW5HBLI+z+LKj6VU/1hNiNgrcREzr qtrlySKJHcZyi9lXVSsrZyH/Svr6hBI9rb/cCWyt3M36adRHOuqWmscbISFpYwi2/+fThn3D5UDNx AYCnfmlNHkjMhGlYgCfd2SErLO7+fdzYwWKB5X0bsFyZh5NmN2RCxRj+iCbjQHs5xj82EvUQ+Lixu E4g5KIf13qzLAUjRsTk4khf/WonurDevp4HjmDtjE+sP8C6WZdmucZMDaVs9PzUZIYjEiHLmPS70Q Ikvq7sEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suT4v-0000000Cq4d-1OcJ; Sat, 28 Sep 2024 08:45:25 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suSy7-0000000Cp0F-2tTJ for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2024 08:38:24 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a90188ae58eso346906566b.1 for ; Sat, 28 Sep 2024 01:38:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512702; x=1728117502; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sANYTc56l1dzuSb6OkWAQtijEDV1flO+WLT+P2kRW58=; b=H5euTCMq4COtVxsimfmXFnn4KQzMuYnitqyubnsp832MwDXTJQo2/CiLzNBUrbaK5w RYRkqw0IABMnMTlUDtjamUOO5ErwDKQSuNAUK3tQIxMjIOOSHlaUfoaGx8tgGhw34W9n IytmKFb/37BrP9SjiXp57AtN2e48bsmO+3ALE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512702; x=1728117502; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sANYTc56l1dzuSb6OkWAQtijEDV1flO+WLT+P2kRW58=; b=tuoIKe6PsHBFcJKFtq8gdUlukw7Yp22JGrFyMgCbrD216/B1WNt0hz9E/DMTH7OaRm MZ0xFBvuoZr4uFEQvYkD1jfH9QGz58ZVLvdxI6H//orekyFDAHxDZ4cjXn5pzlKJ1FvR AclOeuqVx3+tfSzh2SrHgZaguWdYs6kD2k5StrcAcpYws/3jaDAuz0J/TxaJRc8a59Aw /eVt46nZ82rCA96QcmqISWWHXIei0Q6RtoMTxt1ZCcil3n/bXTE18GRNKR3nKBzOZWFH qUPcqq2jdf6290BcyNbbV/GoGytEh2V0a94AxNrRt0gIEWM+uwtPXBpAOD1v/7qmPqRs CRFQ== X-Forwarded-Encrypted: i=1; AJvYcCWmfTGRgUdJIZ/BOXT+RHxEubCPjY1ILNp9dAczFue4HTfPSfDVHNW3oMrs8nGiHRwegoGhQITPPy6TXbzpcXPZ@lists.infradead.org X-Gm-Message-State: AOJu0YxLylBUOP/3oGxs0EVsmT7f5vHFL7lSNyZkt3anwET3NZWNxfyC rp/qrCszI+ulxcADWtgJh9UKwztqZ3rsn1rMkfzMLzmvlt9yaP+k46P/h514Aqw= X-Google-Smtp-Source: AGHT+IEQNTGrd7nRTduYyFXKYNHcURQgmU386XHHP3cI20GYQr7olx3OUCxS6nGdYAY+ZIc3kLmHPw== X-Received: by 2002:a17:906:fe04:b0:a8b:6ee7:ba29 with SMTP id a640c23a62f3a-a93c4ac9401mr576566566b.44.1727512701885; Sat, 28 Sep 2024 01:38:21 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-54-102-102.retail.telecomitalia.it. [79.54.102.102]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2947a48sm223679466b.118.2024.09.28.01.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 01:38:21 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Fabio Estevam , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH 5/6] clk: imx8mp: don't lose the anatop device node Date: Sat, 28 Sep 2024 10:37:53 +0200 Message-ID: <20240928083804.1073942-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> References: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240928_013823_748492_AC67DE80 X-CRM114-Status: GOOD ( 14.54 ) 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 Setting the "clk" (clock-controller@30380000) device node caused the reference to the "anatop" (clock-controller@30360000) device node to be lost. This patch, similar to what was already done for the base address, now distinguishes between the "anatop" device node and the "clk" device node. This change is preparatory for future developments. Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk-imx8mp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index 516dbd170c8a..b2778958a572 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -408,13 +408,13 @@ static struct clk_hw_onecell_data *clk_hw_data; static int imx8mp_clocks_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np; + struct device_node *np, *anatop_np; void __iomem *anatop_base, *ccm_base; int err; - np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop"); - anatop_base = devm_of_iomap(dev, np, 0, NULL); - of_node_put(np); + anatop_np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop"); + anatop_base = devm_of_iomap(dev, anatop_np, 0, NULL); + of_node_put(anatop_np); if (WARN_ON(IS_ERR(anatop_base))) return PTR_ERR(anatop_base); From patchwork Sat Sep 28 08:37:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13814649 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 8FD8ACF6495 for ; Sat, 28 Sep 2024 08:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SqdVHCjP2z3b3GmppGHkZvxobZmXnCslqoKDvGYxVNw=; b=mZ9TtFyk48Os2dG5s2YqFPpTvt ygrt5NcOrerc1s3rRyGnv2zORlmltjGum5rI8VbvFtP9FBlmp8m9rnHUm1mq6YvNSjUJ5BpMO7bpX yh0FndLUIUdbdJqFVT3OM09d+y+1jB24w+5Ea18AP+G3Bm8Tp81BFbQTk62VUReCKO6obBZvKMx3s aIY6AMrCTcMjhT9s2imVbIbDIGdj7PgNtRDJLnVbaKijoY/2DCJanTSRa9jSk2gHOKaHbI5Dj6Lx1 Fhjdt+Ou7KRVu99t/hzqbJ6Mj+3NG3yzG4rOiavDsYhaWnWRI/VpkBevKOdFp0Rrl2EFubvfDjdxD kWnVRcgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suT64-0000000CqCD-2dbR; Sat, 28 Sep 2024 08:46:36 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suSy8-0000000Cp0b-3KGS for linux-arm-kernel@lists.infradead.org; Sat, 28 Sep 2024 08:38:26 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a90188ae58eso346907566b.1 for ; Sat, 28 Sep 2024 01:38:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512703; x=1728117503; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SqdVHCjP2z3b3GmppGHkZvxobZmXnCslqoKDvGYxVNw=; b=AoxxvmhzsP3nuYYePmM0THpnHImfCuzN+9bMs64ySYefoWlJDuVvoVmC+m8q5eYXnl cKtEp9Pq2R+sIZk1RbDjdzV4X6YOFFn06K3TGUta8pPZsOdITQlA3QsWuOw+1ooJx/5Z 9xqgCtBlKhY6V6qle0m/T1pMWRZVq8/L1G+ek= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512703; x=1728117503; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SqdVHCjP2z3b3GmppGHkZvxobZmXnCslqoKDvGYxVNw=; b=L7znlx56YkE4MP1pX4B9yRdz8N2AXW0pmB4bNJZYxI63+rfsj8Iccn+EKzazS5M6jH HraNVjEx3JpjFHDpGY1iaqLsLpbE2eldtTJtMr8akwwRhDPHR6Xj06cZBBD9f5rZg/+T Trs0qfFwrWNICohQBCMMkBmvs4pKrpA0TUgPZrxsyGDNfiKdLX9yfdKT9v+N5HlPGlvn ccf9qPmQNLgJfwJh57lbX7TPs/ODhFafhHAS73u3wyWyPe7+o3kWjy+ouE1zZuRm55c4 p2KvxbS8BAHjSc0RMzuqukSudTpKK0KJukhAykWNx2h9k7HR93JxHMzsZYa0+9XN4EjH hDVw== X-Forwarded-Encrypted: i=1; AJvYcCVDSeteVbzzLh0KYAVhI9dVopKe4dtFt/r4LOUQz9zRWyAOtYB6bDvWf1NmjaKKDhQgVErnr5xz9kdplm27jIr0@lists.infradead.org X-Gm-Message-State: AOJu0YyZwKYUhcBfHW85d8ga1WR40ksK/5NkrHVrDXS4o8mVEsSFysRP Vd058jv5vD5BgFEbd4MTeTV+fmiOTe6cIuqfJ6UT6A5ZOS1JPdK0w6Q7aesiwZ4= X-Google-Smtp-Source: AGHT+IFep0uHWu7o5r2mN7w6qghEp9xGMWpGJDUw5UfEylXMOmM7N6REhb0d7hr9vD0ZU94R0/JpCA== X-Received: by 2002:a17:907:74c:b0:a8a:3ece:d073 with SMTP id a640c23a62f3a-a93c48f1b54mr526812266b.10.1727512703361; Sat, 28 Sep 2024 01:38:23 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-54-102-102.retail.telecomitalia.it. [79.54.102.102]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a93c2947a48sm223679466b.118.2024.09.28.01.38.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Sep 2024 01:38:23 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Fabio Estevam , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH 6/6] clk: imx8mp: support spread spectrum clock generation Date: Sat, 28 Sep 2024 10:37:54 +0200 Message-ID: <20240928083804.1073942-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> References: <20240928083804.1073942-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240928_013824_858870_1F3AF84E X-CRM114-Status: GOOD ( 12.44 ) 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 The patch adds support for spread spectrum clock generation for the audio, video, and DRAM PLLs. Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk-imx8mp.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index b2778958a572..460e8271def5 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -410,6 +410,7 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *np, *anatop_np; void __iomem *anatop_base, *ccm_base; + struct imx_pll14xx_ssc pll1443x_ssc; int err; anatop_np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop"); @@ -449,10 +450,14 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_SYS_PLL2_REF_SEL] = imx_clk_hw_mux("sys_pll2_ref_sel", anatop_base + 0x104, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MP_SYS_PLL3_REF_SEL] = imx_clk_hw_mux("sys_pll3_ref_sel", anatop_base + 0x114, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MP_AUDIO_PLL1] = imx_clk_hw_pll14xx("audio_pll1", "audio_pll1_ref_sel", anatop_base, &imx_1443x_pll); - hws[IMX8MP_AUDIO_PLL2] = imx_clk_hw_pll14xx("audio_pll2", "audio_pll2_ref_sel", anatop_base + 0x14, &imx_1443x_pll); - hws[IMX8MP_VIDEO_PLL1] = imx_clk_hw_pll14xx("video_pll1", "video_pll1_ref_sel", anatop_base + 0x28, &imx_1443x_pll); - hws[IMX8MP_DRAM_PLL] = imx_clk_hw_pll14xx("dram_pll", "dram_pll_ref_sel", anatop_base + 0x50, &imx_1443x_dram_pll); + imx_clk_pll14xx_get_ssc_conf(anatop_np, IMX8MP_AUDIO_PLL1, &pll1443x_ssc); + hws[IMX8MP_AUDIO_PLL1] = imx_clk_hw_pll14xx_ssc("audio_pll1", "audio_pll1_ref_sel", anatop_base, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(anatop_np, IMX8MP_AUDIO_PLL2, &pll1443x_ssc); + hws[IMX8MP_AUDIO_PLL2] = imx_clk_hw_pll14xx_ssc("audio_pll2", "audio_pll2_ref_sel", anatop_base + 0x14, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(anatop_np, IMX8MP_VIDEO_PLL1, &pll1443x_ssc); + hws[IMX8MP_VIDEO_PLL1] = imx_clk_hw_pll14xx_ssc("video_pll1", "video_pll1_ref_sel", anatop_base + 0x28, &imx_1443x_pll, &pll1443x_ssc); + imx_clk_pll14xx_get_ssc_conf(anatop_np, IMX8MP_DRAM_PLL, &pll1443x_ssc); + hws[IMX8MP_DRAM_PLL] = imx_clk_hw_pll14xx_ssc("dram_pll", "dram_pll_ref_sel", anatop_base + 0x50, &imx_1443x_dram_pll, &pll1443x_ssc); hws[IMX8MP_GPU_PLL] = imx_clk_hw_pll14xx("gpu_pll", "gpu_pll_ref_sel", anatop_base + 0x64, &imx_1416x_pll); hws[IMX8MP_VPU_PLL] = imx_clk_hw_pll14xx("vpu_pll", "vpu_pll_ref_sel", anatop_base + 0x74, &imx_1416x_pll); hws[IMX8MP_ARM_PLL] = imx_clk_hw_pll14xx("arm_pll", "arm_pll_ref_sel", anatop_base + 0x84, &imx_1416x_pll);