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: 3528 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4E8A63FADA for ; Sat, 28 Sep 2024 10:38:18 +0200 (CEST) Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a8ff95023b6sf208931166b.3 for ; Sat, 28 Sep 2024 01:38:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727512698; cv=pass; d=google.com; s=arc-20240605; b=HBA3A2qkJZv+VPbGugOROlI7CV3/Uiqxu7dT1RgoMK4WLwu7NaERErzf8TeQy7iPVA 1pP1vpKxDCJxfUXT2qivvVa7kny6kmcxj3dIMOGnN1T1ce+g3AC1zZzfGIlKqLW/t4xL bQuHVrqrKQU93g7gZnjvNqhLHfJ00BncBtPIWDMiqMpd7ezD/MFWtKfYaQ7qr3bpbb/h 47/RcD1aTmhRaf+MTXlXgG3Nauvj0PU1GCqC5KhXFBQZtbdZ0vHGsYrTlqdgTAr9VoC8 NacTkcZ0s1l8Kfe+kgwEIQvUnbyWyxwPSvF4ZrTiS4rbgCcc86hT+eei42XRKXxSNQ1i Ikmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=KKjCxc9wOoF4nBE1KmU1wYzNDV/fuglG12YjXQqIsWs=; fh=osq6qoEIL6RwQ1VOxV58UafEjxvDDAg4v1oNeeWrfkw=; b=fiMYa7DkBU9IHkKYEn+QISjXJe6cu6ONGQAAgDpHFk/98S9ptdKz2bYsn+haD78t0X s9gjAZHth8hJnksH6n/rmvMMm8GvNcJM6V5f/oU0+rsgZBL0vDCSh1S2k2Lr/7NK77wq HIbxSxnfHVZqgdnwVxvRzp6I4hTtrjHc/QP4zAmfgXpJjMTyK3Tq5prcwqqBNIXiRc8q 4IKMESRiOSdGiKBmQw7mlkHvGAtKOinMwoLlk+ZN/tFb4yOsTsEVXb2d0xK8GHRCyxB0 SU7XN1UJnmu+aB6WTfIjWeUQqoReBFONRRnJ0S9RBNW/IZA9mXUtQejMnG6UEhAQ2ikk rFIg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XqGSERyG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512698; x=1728117498; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=KKjCxc9wOoF4nBE1KmU1wYzNDV/fuglG12YjXQqIsWs=; b=du94KgSuaUhsnxnQ/oxS28yJA7IBly0M0XHezV6fnP5Eb0/TgnSdesYQ+muTE8MGqz ByjAC/pPmt/Lzf0evP9Q1X93NYNfplSNvpdnYZvzv3IUvnp5NwURb++dzw2o3jPLb/7K fZ3WnlfSlGslnGOFwMctjNOpfNqulRiXmbqog= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512698; x=1728117498; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KKjCxc9wOoF4nBE1KmU1wYzNDV/fuglG12YjXQqIsWs=; b=ZOsPzWob6CCD6RfBBvN1Z6uW4KINad6ViujTEX+/F87GSrYqNT0sEMIQwZaSxaU5T9 zMCGlHiX1xdxzbZFAf23ECuTqKX6ieUOALO8Vtgx0D9wcVn/GTBpfY7LN/z1hnCUmEH1 SgcmqLXAB7TNojeN07cRdaAxgblM489UKxFN6yU6RKT5GeRse6c2Ynwmd3ghu9deiFJQ +3kjBd6B6suR+KkMb+LRnlf7X5QFxxyuNwU/nyUYQ/M81psrT5EiiKqeI1DGFAmg8Pbl g7DnrpFYQdYcTZQTYHloeWZp2fPtoZcWPyD0JIV0IJS0ufROG1W8S2y1DxUGvnvhIBnp X02w== X-Forwarded-Encrypted: i=2; AJvYcCWpnPq6GZyJsVZCmJkWzSNR2O1PJ08ZM+fdeGhmgXZXnwuZYtvYpoy0wCdYEGzrSm0fnlyt0kO+JkV1tVa/@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxgvJYWJcFyZqvzPz1hOdIqU6rjXiu+3FS77svBUH4p/e68e8h8 BIN+RczYqG91trFk4chwF/DlKPjt4nQYLdmy4l/A+0DzJexQtHDHdaNOCduNxc6XEw== X-Google-Smtp-Source: AGHT+IF1EV3CE03ZNa1m2G51tS3W3zmGtF06/yv0w6Kj3zc6iN+ZOIKeb0jB413poJfGDk4euFWGow== X-Received: by 2002:a17:907:9341:b0:a8d:4e26:c9b9 with SMTP id a640c23a62f3a-a93c49218abmr576717466b.17.1727512697870; Sat, 28 Sep 2024 01:38:17 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:26c9:b0:5c4:6c19:f742 with SMTP id 4fb4d7f45d1cf-5c877819335ls702396a12.2.-pod-prod-02-eu; Sat, 28 Sep 2024 01:38:16 -0700 (PDT) X-Received: by 2002:a17:906:dac2:b0:a8d:fa3:bb24 with SMTP id a640c23a62f3a-a93c4921a34mr635901666b.23.1727512696243; Sat, 28 Sep 2024 01:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727512696; cv=none; d=google.com; s=arc-20240605; b=IpS7UFIsqJSuxxObUN5H0jFo2WhTNNP5DTWz8fdmfeb0LNHDnSrNchnuCYEvQgogak lJ0TP/6HUFFLIqsAMqVWpRRyEr7/JhTo7udUeqkINkMiYMKh5Bq5AozXtAxlCrw8jmdq W+0qrt7pIoyhDdMTLkOOi5XqAFqF81L65jrxgqfc+3n7CfaOqlUSfbezFtXTUBck+ojJ axllxQ04asJ+43DiqOshOMwz4GWb/ScTN/Cc7BcYkXVGmQNWZy+XX5kpJj0z0WGqIyCm 7eeLuWrowYzOEMX3N2EEAPyrxFRsEabN/GFxB1GoMxwxaMEIdHEYGDsZaT3HG6j8fnEo tjaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=hgBA2YgBzcVdnVEoc6s2KOvaf1NpbuG7MmZKT5HNBsQ=; fh=TcT5mq+DOC99WOQKF/pyM5BqA4EvWwQBAkqh1EN56Eg=; b=N2YPtxFJK0o62H7MspscquRwNjZrtdaVY4dFmeo2O7Q/Z5mnUOgaEbgvCXgZrfNHMB XKI6vBhfHxupKTfjVztbHo6ubfWkRjDo6BL5YH28Rc3tlueyYNJrylXnuUkVSqg893ag 2hFVTWHUvRQ3USNxGu9EH9158J5Tufura6CCml+ZptxjOp8cJymLEoq+5jBsh6dlrDAx MxfA1920GC2iBZ5t2dpKTbB8RfZk7Ui+0oqTLZxQvN0Km0KMREZEdt+8D1xlxSOfUDk3 c0W9t6WFN65s0iC659RFPal0YU7o6fdx3I4ZU1mvy3ZGXAtYXviddEfm3o8cUO2y9b3F sh1A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XqGSERyG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a93c29b38d2sor120223666b.14.2024.09.28.01.38.16 for (Google Transport Security); Sat, 28 Sep 2024 01:38:16 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=XqGSERyG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 3529 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 26DC03FA6C for ; Sat, 28 Sep 2024 10:38:20 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42cb115566esf27836185e9.2 for ; Sat, 28 Sep 2024 01:38:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727512700; cv=pass; d=google.com; s=arc-20240605; b=GxOrf9OGCg4jfvOCT6/JHUFyMCWM3F3DaCSbx1Z21M5pVqZmNPO1P0o+Bs1vd1pMwU lohXp0fvuaxpnYFWDlXaNa44L1aVcG53AfCG8ur363px2J191+lMjAZ0k5zeFa2/OVuX TpOPkGcWme/vnHLgZCb2wqTstHGIK8oE64xmybTa6oy7pLlAAKXAOjdNI6YXg5r+evPu xUsjSN+0YNO9DNfxN5nvUIM9fm2EJMEceZWxvFy+RNRNWT1f25/qpHUDtRMqfDgztr50 u03pKLj2TvIgdhEjjVsWRcAof2Mwpm4Jdi3kA68PLoh79hLs64PAZuaU0HNXs4py+u+C Oopg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=R8keFJkM09Shp3yIumCQnXaysOStg3Cn1bxnwWLdejA=; fh=19n4tRlkuRUOygnPYF0NJq9vmzNYJzqg5jctiAD/2I0=; b=Ait5PkFj2e+ByT3oJIeeslil+tvEFlDVOyGeNOsGIsYgfCa2guO6OqlkQtTku6P/qP Zn8S2vuqm+n+BfP9Rcm/2yRVUvPJ/RMxT/LrX7Ayr5rN1L7wS/CAoyKKyf+T6qLNv+7q /2cXFu+Q+UekFt1kYGGDBRLbGhcbvPK7mUKBHKx/eEdcyLwTkAjlUMrdOR6j3tIpYuf9 ZcoCvOGXBO02YVgipvKqFBAGPbN8xbRtmj1Tp1Ahj5C/hAEmjng6SHdVWvlP6Rjnp66W YAM8nFCLg2Rv2AY7cLw/yxXb7nYR0zmG/9tfKPPY4vj1Rli0FnOO1ya3zPrwCMMfB3lX 7l/w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Q/TDsLii"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512700; x=1728117500; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=R8keFJkM09Shp3yIumCQnXaysOStg3Cn1bxnwWLdejA=; b=o2wiyeWmsygqPDNhR5p9m0QjQdoa1tXjyT1/sH55/TsA4z9Xhn6n+lKYkFx8yC0UZ1 kX9AqzLrJMzwo5WtsqhBhwQFDlpg9oEzYHi4WVjMljtzD+Nn3o4rEWU8DuUfCXh4n98s OF+Q5fFQhwaxRAiX44o8aBU8COkBQzmTgstAM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512700; x=1728117500; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R8keFJkM09Shp3yIumCQnXaysOStg3Cn1bxnwWLdejA=; b=otFhAxdplmf4UxwbuCgQQ1waPsGKUv/IRLp7QHqp0I++Gu1GUACkUEBmCKzu7ipdp2 ORjh+luDrCxMd47Cdj4XE4c2TLS/wIRr6sco7dKIgo0P/qLYKJfs1c3/8WaeTiBpnqwB rF6sBnvXXqa6T2xgIKz2hNlZtNlwfQmbsU4xO8NNs+pqdsLtvLnzsjzy3c4+LIelPSYh LfY25s1D03mw2dalWq/mRN2ALQWoqzk++7iJnciFetleMowz41IvRyHyROQav2i2xbOL Y24T93ZzfDDg3AMdTvQ6NgljTZrjGz3w6L8jfZYNQVjuGNpZbA84RKk9QUyeJOt5Ysgk QKfQ== X-Forwarded-Encrypted: i=2; AJvYcCV18Ngimbi3jgkuHqoi0+Y0oiKRoRdhByV6j6aNAKtlnCJq8jDedx55bL0WfYO00QK4Yby6OHpWuM9muzN9@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyIxRl92MeLYHaaie9Zd59Ug1V6qrZQXZM5aE094enB2jQrxBYa 6t35Y4sEHwClivTu7QxXfN10Z2RMF12HSnCC1f83J1jPbwDHT0LXOiHHApWvVAsgDA== X-Google-Smtp-Source: AGHT+IEGyoQ5Kj3mqIULDZTo7JfG3CWkG3WHxRNqGaq7gAJkR/zK4C25+H4201C5gkiJnzi/97sYLw== X-Received: by 2002:a05:600c:4f14:b0:42c:b555:43dd with SMTP id 5b1f17b1804b1-42f5840e242mr54550395e9.3.1727512699440; Sat, 28 Sep 2024 01:38:19 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:4f8f:b0:42c:c82f:e2f with SMTP id 5b1f17b1804b1-42f52235afels5695355e9.2.-pod-prod-05-eu; Sat, 28 Sep 2024 01:38:18 -0700 (PDT) X-Received: by 2002:a05:600c:314d:b0:42c:b220:4769 with SMTP id 5b1f17b1804b1-42f584a1b52mr56120205e9.32.1727512697961; Sat, 28 Sep 2024 01:38:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727512697; cv=none; d=google.com; s=arc-20240605; b=cm52+NVhoi3kXh2XYQMHEuvA1ZSw5n2JGTnDY6koO4i+DspGYYVwYmFRcbzhS78Rv/ UT8HQcsSS80RByGK8CRpxx6eQtvY3bBuEBwt+93dplpBr8Kz91xOrp9AA74LmdJ5P7qm aQbBMzwuO8ANvwT7GJLn4zVddCamx/WPaYKE6DCaSl1L6FduMCjHmNzKUsGMWxBgzyEo ynkjfxOMHKd0LSuN+O/hkFnCYsTms0HCyoRpMuwuwm+0yt4uUjhGVZM8n/YwWBdQwPky aPar9EJMerSeOD6uaAtC3d6bCGPF4SLQcQxNIpIq3SI+J1wuEpM8rlxvynhaZlBHXFgf KJJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=k379zOY8JpOCRdB0yzVh9VgxfCdVDSaVvSc2yhV6i0U=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=I0dylzjxnKtOBzCRgXpIJs8kQ9xlWhQwd60q9EPLeZjwD5Lc+ch2LzGHZRULToNh6d E8ypPihDNO1AE2giMexQU7XJs9fyTLq2mn0yqOvFt5iZt0YtAE36Z2q/OuQ9Isk18tMN 202i9Js0YcE66yAJo347MOGeO5/yE95qW+4NLa85rvNoaPamIA/SYogdqYf0qQkeMVYs fPrP/guiEzB4yrDl9dCir5n3HWuTxqXRwfN65TUMPXzJLna7LT3b5/LSJVXXUv2EWh99 nC0NN7X+wblJvp/I5h7Jae1zGVgo8EQzuHaCK6sArIcOwMAjg4xeiv5pjjudCqg/gwJO /Wpw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Q/TDsLii"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-37cd564d0afsor1362777f8f.3.2024.09.28.01.38.17 for (Google Transport Security); Sat, 28 Sep 2024 01:38:17 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Q/TDsLii"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 3530 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 498B93FA6C for ; Sat, 28 Sep 2024 10:38:21 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5c877a8db97sf1986385a12.0 for ; Sat, 28 Sep 2024 01:38:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727512701; cv=pass; d=google.com; s=arc-20240605; b=e6gqv2cNE7Fl0uu/XLbjRpo/ZQy8UfzDM4rUHzL6EOt12DyaOP1JutyQw6OXtega8l rm5u+rqcBQsRbBLj5Itid7FeyZsJ1VORXAZm05Z3b3j/OmGleVhCDJIZSI1KMrijemzp +WREB1IoCZsoKcE2//okscIupYjl+gXWNxSj1SCkbxtNsD07alMXjcCF5bexnOZq6vrR gXBPtCvQFkHQxJU9MSM+L8mjAqiodAATrfZp1p/glguxmNvzVbWKowAUtuSGCe4judAt r1pzISsiDkDMu8CUOA2M0ADKSK7LOpPuNBrxn4RJ9pypC8Pd6P17611ib0c6g2+ab0e5 i0rg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Ig8TG/WROfQE3VTOrJ0pUmjlH2SjxILxAMTTEloFj7Q=; fh=BJ21x+Wo87euDVXCPcmNv/7Jf613rHP87tGUcKZ1I7o=; b=HeC04JsTHo81mo3oWJmwP76wI8E5Kb78seFvKj+HayBWwp1JaK/OTX0mbVUd8kGeiu h2CcPvm2AvWhNpHTjYqA37PALyNiLxp/pXX60uMNt80g3CwE13u3sce8h+BV/Df2GNzv L3EA/AGqzU35j2nWp/lmzPyR8/+LA3nuOri13BcBRSHhpin1aKU7AtBnUW4wSniv48nR tvdG2NND6Si/ju1t3lV7AkReifpQrCslvY1w35HfQPSolw1UHzs2VBVQv+i2m3CmEMFx R5/JS6OCPciEVDc6s7t2VP2mg8hBa3xf5Jl0LmzPudP4zkOPxn7D+cCFH1RXsfAuTGr3 AnKg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HxthSwqU; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512701; x=1728117501; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ig8TG/WROfQE3VTOrJ0pUmjlH2SjxILxAMTTEloFj7Q=; b=k9EZ074SGLai+o/PVL2xqRtui9VrCBeMXFxeXtm+DqsQlkHtZIDisTXynSUvAZFRWg tMOdOkyCcFeLib0lbbK5QYd3n79VDpfkzJKFomnBZlReNVP8BzoNrnTgrp9P218stZUw WUlO2cpVkGVMQTMI7Zknudfv2yL/FFmnZv0rA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512701; x=1728117501; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ig8TG/WROfQE3VTOrJ0pUmjlH2SjxILxAMTTEloFj7Q=; b=nR3m4lrzT6rGM2rMzgJGdqQhn4gDbGXO4bpeY9Q7jZEmaTmBqbz5dTcCL8BpwBuXMi 5hloV2beW+67woe2DVsCnIV/fheRX0fV/WH1aaSmLpdnOUv1q5ODW54a0T9v/K5vNngG GDoi1Yg5ytdTtb7vRsUps16oHvdQ6C5AX2akKDvdQIAakRyKhE1EdbBlWrd8Y+zWnnej jYZGbRrQY37s4HsKcB27uY/eVL907ujl7YAX8UYFFQAmkMLAod+7oGQbjWKGhEe64zlD CoVyAvYnFUN3STfEeRCPzcnp+blcTRgzrkEYbhpXmmPhQBduymg3OKWpn9KZA3IBTWme QK/g== X-Forwarded-Encrypted: i=2; AJvYcCWks8dHjNgOlO0EC4vfc4MQsqMK+reyImjMcXUTaxjBpW0UWDkHQgfTNcxsMMJVO3kvBwiDNwSApuPMj4vN@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz3oLIo9OyYq8G+42hFVhjE+hb/F5LThQK5BttcnWJDHonXGsdU /XDCZBXxTRUlNZepOULrX7hKRLLmyyiWu2X+hraeVqWAoW8Sog72PSf7eQbH2dX2NQ== X-Google-Smtp-Source: AGHT+IHwBXRR4QcZO2paZIWyxrPoC/oGOQODhP/Rss94UBsO3ZRqszg4gWLT+EsH/OnpvHcUOpjZow== X-Received: by 2002:a05:6402:5190:b0:5c8:8c35:7cb7 with SMTP id 4fb4d7f45d1cf-5c88c357e2emr693989a12.5.1727512700876; Sat, 28 Sep 2024 01:38:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:4307:b0:5c5:cdf0:178d with SMTP id 4fb4d7f45d1cf-5c8778191e3ls1625438a12.2.-pod-prod-06-eu; Sat, 28 Sep 2024 01:38:19 -0700 (PDT) X-Received: by 2002:a17:907:2dac:b0:a86:96ca:7f54 with SMTP id a640c23a62f3a-a93c490983amr487523066b.21.1727512699352; Sat, 28 Sep 2024 01:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727512699; cv=none; d=google.com; s=arc-20240605; b=la7W30kyOsD52SpKz+bCNkQrxyTCuee7oP7yyDNAxrszJAVsgTY5hh7Dy60Xuz88R1 MaOgUcEkHIp6bFDvT4psg1Bq2ee7GeIDJbloYAKxjengc0J9DBEVRyTVLcUDXoaZt430 +Yw8gUyapnfxxFKSpLgyZ2DEfoPWnZ+iN55q35OKWnV8wbW4DG2Og75/UiryBnkKX30J TUyumXTrk8Gif777qAy89CCpV1q0ums6l0+WzkEIxJ5L2t0esQigiSye33Z4EL4KRs/A Fkst1UlPxHgipQ3Nk1roVyWn5o5rhm+1fd/b/PRsGRA9SzrMxRnAD9pG/8tVtWaAcHr2 0Vag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=3VEkdzuU9Qc4GQ7KPC08t+6l9YpInoSw+Q79uFbywaU=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=jzwDVszqWDaTNhD/515hRiBhGqOBpJLbG5v9S0rA4DaTFHyZHYnY+aGN7eCkqk4r9K tHsUKY8hk2HN5ZASLXhKlMqrnZhjTSKTlGZVluoU185AFo7UdPIP0d6lVA9kTQHNpC8+ 0XWIzlqVl0EH+yKnQrB04vpK/znHRvKYT/ijjTCIyxFKjfZ6HhY5KIFWx8ACrNrxKMTx Kcm8bFEPdba/fQl1KvqTDJZ8JisZwpK0xyRdtHcvJr0LdRMl3Rtt3eEoTWfJBFIfv9I+ 6Fewy+Es2hLR0+JkUSdYFBn+U+r+QirfjZEJXp5GbHcptGdqs8Z52wGipO100BnrnX4M rb3g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HxthSwqU; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a93db7ec243sor41754766b.4.2024.09.28.01.38.19 for (Google Transport Security); Sat, 28 Sep 2024 01:38:19 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HxthSwqU; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 3531 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B38F43FA6C for ; Sat, 28 Sep 2024 10:38:22 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5c87b5179d9sf1785329a12.1 for ; Sat, 28 Sep 2024 01:38:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727512702; cv=pass; d=google.com; s=arc-20240605; b=NsM/VttWKkfjg4LOvPcCKRkDR3ViDqjW4czlCtsHgWCr0GEuV2GO4ZnSosklkA3xlf h2SughXZVyehulpYIvwWF5XWIoLdhr+KHD/bTpqfhl1eaidwl0mdFbn6HOOyBdfF8xr5 ibhcU6p6aaQOvT4zX4TGBoOm3zvRhuzlIppA+L7QsYvg/0/H+HUObEwX3fqLVUmmRanC B8fv6GL/iB8fovxhDFrm+xGznig+SP/6FDAOJmjVED8QEX0PMfcNz5XRNfGpjOm+5UPy n2NrWGvNT/2y6tuadfQO6cKER4BUb1zvn4gxItihSpr1OgLKuZxQwktSY+AC0p+MzO1F FInQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zq7nlSstzM5H4fQVlpl3Vl51/f+q168W1Jhf+dpR4z8=; fh=+AM8R7onTTrtHbll0oBeI54qIjSFe5so3Mv+3y+90Pk=; b=RQiPUWkOfBZEQDCcn7zfcawACwXjX7DBTsXRRFpRSouDIEDWMskAlH0Ivbu6caYiQL 13fmSJnN0O5kIQU4W9hXTadNRJB8gmPHaNwXPEiNwBmBVI3jBYhnc8z+kG81zgzCH+RP tFyUL8hjrRRi8qgUcS2JzKMV9JEAUJroZdNwpqsDgrBT6hbaqd7BmBmVdSO74izKBMSo OgzvjXxE2Szm3D8IaQfcUy1wFDJQdThL2I7G21M3gtUouS/WLyGL2EshE5jwhFpKVm1M ef5d9qUkWDj0xVQ+c6ypzZzQWX3mT3MwCYsvt9aCqipCizawSRTDGKLQCb5pHo2yiqw1 wLGw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rRSPzJev; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512702; x=1728117502; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zq7nlSstzM5H4fQVlpl3Vl51/f+q168W1Jhf+dpR4z8=; b=qud/cILuaquxTUrD4xbj5k8xXcZG1p0S8op+9LoH72W2MO78u+K3M4q5a2/aEsRD+Q lFT4wtTXyPXZQfKT2M43iQWkv2iv3rzUVjphlf1CaCEKLVTOgHU8/9K+Vq1ETVvTi133 79oSrv/ckX8SPDpHhGsMhdOGZ6LzAn1B3pZrc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512702; x=1728117502; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zq7nlSstzM5H4fQVlpl3Vl51/f+q168W1Jhf+dpR4z8=; b=ENe5MzstJGQWC9gjqeAw+FcuEEwOUCfH4MX1q/5rmMDuAtOzwMOoOP+Iik9YO18Jw2 xAXPwc4jzXtqVhm8mKFg/GMTlD2mOkqo5q7Zh/H0tOP0ercOEyZO53IuAcChJIGXfxah SWZES8DiBwefK6gcP6W0XYzcu/x5QBD9HNye6AVJ/zKmXNT1B116vEC6m7ltiQKCr8zA hvfJeNYx688+f85CtM2g99pXOm7lJFTcDWe/rWGuhDz0HNV2NaX52HSDCZx6BrixFGV9 h9NPVNxIr0u/n3uYZDrTMNBDaVyGj1a8Ze6N1hlTnrP3UAID49lxSMUf+4rpVZlll2Jj GJcA== X-Forwarded-Encrypted: i=2; AJvYcCXRkCClxq7P0rcC8Z53yU0XeQ6PmVtwzSzuE4ttzlxnZbnYclVVHBHo/6PEOuhE49CfYO3sHccD8HVV/n7L@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy660Ig+Pa8oIJ0sqbw8fZOyyAqtri3bzKFPRBm7huWcjwY7Fqk SlmEyOVSfoNG8q8WXcmObKAZiI/nWAQEzNw1l+y4vqccRK0TmT+xf0pIBttDzJpteA== X-Google-Smtp-Source: AGHT+IFWu9p+BygKZqyWJBc5y6XDEIVFBtz3EBFqLW0jaYG4VqwQeT/jNrA7qX9RzEU/o+YZteMeuQ== X-Received: by 2002:a05:6402:5292:b0:5c2:439e:d6cb with SMTP id 4fb4d7f45d1cf-5c8824d3d87mr4597644a12.12.1727512702248; Sat, 28 Sep 2024 01:38:22 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:4307:b0:5c5:cdf0:178d with SMTP id 4fb4d7f45d1cf-5c8778191e3ls1625451a12.2.-pod-prod-06-eu; Sat, 28 Sep 2024 01:38:21 -0700 (PDT) X-Received: by 2002:a17:907:31c9:b0:a91:158f:6693 with SMTP id a640c23a62f3a-a93c48e8f15mr570043466b.9.1727512700872; Sat, 28 Sep 2024 01:38:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727512700; cv=none; d=google.com; s=arc-20240605; b=Iwl/S0RmY4pDeoniE2WqB3J0IluXeeUpjbggUXYkTIBC+W9tu299V2HcU4XRrbWaY1 LS/ysSsUS57OtS2tk0LdmcvP4YYGigLKzcFkYFN7Wj81lBOKY4wTRgfclNrRDGp3JpoB YYM086FyFTKhOH9uAfao5jf20691R2dYKN9As/bq0kmEPdD+4rEz9Y9CIXUy2uOxRngx rpte/POPDLsyDqxpFweamX7sdSpLde71Wf2rusi67h8+I9xKh0UStGP1FvrA90EPS3BH +7nQ0HPxbkoRZL6suJiseqjvZ0JkrTl8m4sSF1irTtT7eXIIEilvxaA2hUs2g2xTvxif ljMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=8yZI1Cll/jgswR1C/8/RE7gUqkNMAx5u3jKxacFOTcY=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=ARuXJcNBOhF/0mqnZS7cYGAh/pnEMQVd8PPP1hhVwUzta1FJjdnY5re/2kOndY8ekX 1QYeAqvz2T6U+iTx6KwkP6CX0F+jfobTYKChXPm3uLzXPD9RSaHI31Bw8VNFcZlWDnf2 kBX1H1by/lyZvSdXAdXDg3PCI4b2fWU+lDRc5GNhfVCmchIzthk6QSeTbGdM/KyupL51 u66cW4kvDJbXBRkAEgv+FjOBc4IS1xpBir4UKgnG2jdW4N5uVAzOXSVo30gKEgFHDzzr mBvGmzZXVsajSK84tMxTQp1dhPX1GWPW4isiCDk6A2EjfQjB+3ovO2ED7sq94D3lunps QIRg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rRSPzJev; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a93db7ec284sor39147366b.3.2024.09.28.01.38.20 for (Google Transport Security); Sat, 28 Sep 2024 01:38:20 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rRSPzJev; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 3532 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2FAFC3FA6C for ; Sat, 28 Sep 2024 10:38:24 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c88517dccdsf779399a12.1 for ; Sat, 28 Sep 2024 01:38:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727512704; cv=pass; d=google.com; s=arc-20240605; b=Aehehd6fdMtiuUuzBoRFEzHgHL79fQxp3YcB93ZZqvjczGwbyrdsR7iELiA/HMDKTj j3pG9EDbqBppykYFKboTq2asglAtsgzOg1yrV1rzeIJIcKJIVdJaKy12Wd1vZw/s2bVr 4KQFRz6aCbO4kslJ93MxyXmRYhmdCxShQ5diQaMNcJhAay4kmUfpHD4b9LvH53XGSHBx aoy7kYTGxAYFjclGDSgr0k382qHvQ8on9W9nP5qLiw0Sin/NhUbjaKFcYoDUs895Okd0 Rtc1LjmzE210r0LrQG7VpYi9VgMxMUOVUQWKoxNG+w8Z+o0HVYbNC14ZYInCm9K20hIw c1rA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wWH3r5nyj1A38s699399Zsd8fI1nZpcg4gkM6A9Vx1Q=; fh=/HCPnKhfCVbC/WkiiMXm7W4mYkZZ52w5kDpxHULb5HQ=; b=kPsnWvVu6uDGbQUHz3j/AsZxiCRXpEGOEreVQkee6Gl3miBI/XJethTHZgPg86SfpZ tw8S0xP8uJK3z5ouqvB2uP9L/8mMeTOiVPOZouYbhA1vPY/HPlhVWRed3nJ+C020+bPW 0g66BDUH6/2XEIdBkWO+Ltuw0wO6j08Vy0CvdChBVe+i6MZ0sY2/q5TAno9304nCTdSu jwF1ADl4J/MrFdTuekOgOPNY7Hj8BV+abLBZly85iEZ4p/IRNiK0My0pKpNXdZCgDTAh vL8Tk8QsT2wblaoZsNe7Pk44or+uG7QkvzGvTJc9/FDZYTJU7SoB8uZv9qldHji88Jb8 EmVQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hgncElqX; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512704; x=1728117504; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=wWH3r5nyj1A38s699399Zsd8fI1nZpcg4gkM6A9Vx1Q=; b=DYju+N3sDZVgMJj0PvWyZmW7q00owdQVQi6TwOOUIGCtuTrWBZxhikGTqHJLWFAVaZ vTptJUgk+03zmvADpILhcd+VtdyWz41w6TCRRdbgQKLUKzCRkn2sy8mjQ7uLkTOTCaqp dokyU49Pj/gAnxShHqQge9pHON394fOSwfK8w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512704; x=1728117504; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wWH3r5nyj1A38s699399Zsd8fI1nZpcg4gkM6A9Vx1Q=; b=ii4zw0JCkVs2/hPKIuKM818UnDgsdtkk0dDs1kDZ51fuCwd0iwZpYroqwwFasv723U yhD8hKfXgaPxB9ohv/Y1IGns//Vz+gL0Ri5WKJ6t8p0wEkjxJmyQqYrvvQ30OBDbOqhp SOeZI8IcB6f8FMNtXH7t5vv6ICtGTElS94kQYDfugf5rqZJeNhdSzRQVLMIFwNriGYx8 mFhVeoRARS7I7HXAFggDtpAJvCdCOOHQ4VccFSW7owX5w+bVhiQ3Qi/0i1iSuDgPSNXT bhrzQKMrdbuJYrOC4EQTdTZO62nU76nfEcNMqnS5LM1hx000H7FHVApJ4qp7Eod52CJU WMuw== X-Forwarded-Encrypted: i=2; AJvYcCWm05aECv9+uOG+DQ6dFPjPYrBwhzPNeSJghiJHlpavRg1wJKFB1ig7FMjUjAPGFXadIqlSpSIvgxodKl6P@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy1GQLVBRGJ1gxAMtqtQ6CLIwldt9XRAZwkeNI+74bCyafLIOfd bdsrPapyJsVJVt+Ef+SEr3JXZdkFvGuVhu55GUpTST/F2bkDDwmWHpb0zPqOYGGRlw== X-Google-Smtp-Source: AGHT+IFM5T5NdcE7mCx3wX0+kR6X4JhS04Q721mLQgpsBoVzdnZ+j0vREdaghCrjtXLpH+HZXSl0jg== X-Received: by 2002:a05:6402:40d2:b0:5c2:439d:2042 with SMTP id 4fb4d7f45d1cf-5c8824cc640mr5078233a12.5.1727512703768; Sat, 28 Sep 2024 01:38:23 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:26c9:b0:5c5:bb82:b1cf with SMTP id 4fb4d7f45d1cf-5c8777f335bls628183a12.1.-pod-prod-07-eu; Sat, 28 Sep 2024 01:38:22 -0700 (PDT) X-Received: by 2002:a17:906:da86:b0:a8d:2d35:3dc6 with SMTP id a640c23a62f3a-a93c491ae93mr513876566b.26.1727512702262; Sat, 28 Sep 2024 01:38:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727512702; cv=none; d=google.com; s=arc-20240605; b=IVrQFwOqvVWbt837NTYHQkBmg7LWGFy1DKjAAhVj4J+ulM49blPUViVdzW9Hs7/9WW ivZ2ScdMqvq1nrekEJNcLxL+EhU0K/2IMGre9A3W/PYo9OoHKo1ie13MtM8dMnIbU54f WNmxY0IQGLC40cmcrkne8QpdrRRFvWFxm6W0TqAaNA9b/KZW8a9uyy0x3qo3iWi6Bnsd hFxVpWqerVpn2aGNfGoA0KKX11NNPNPVZro9HPArzptmJxBnRGlOVSaIsWRpLFVNyGnd S6MTXyhyMUeu0maUsjoHobFw/xw/s/FimtJm/c69khKOSRKu340pLXgugDKwzZAe3iJb y/vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=sANYTc56l1dzuSb6OkWAQtijEDV1flO+WLT+P2kRW58=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=WuH1Reu3qGbXevrt/15uflr1SLZ0Jx2GGFM3xy3L2V3lj9QI0Q3YxnsBVFk25S/pUz 4ltwHlDzWCS0QNK4gZsyvt1RVKky4n/UeXMTgsbdiOCrDYz2PJ3PrmgalQs0BeRp7dSs kNh8x5zvUgu/thNnNacUAZ5MANSwRsQtmM0QrMs4GpB4zY31bYuQ/mqR6I3bcpaPPhnp hHwF3gyQQIBw1Yl7ggk8IERscv2kjGuVfTI0xH1lCJigGXMsEmdSX1Mk9B8rj8hLYoqX 8Fhd2xaUKaOzgO6jxPw4dQeALlX2ABjYhYB3XEr09RS24LVpyTEnM6cGLmIWQ2jooQqZ MzcQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hgncElqX; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a93db801612sor29353566b.2.2024.09.28.01.38.22 for (Google Transport Security); Sat, 28 Sep 2024 01:38:22 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hgncElqX; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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: 3533 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D4AC93FA6C for ; Sat, 28 Sep 2024 10:38:25 +0200 (CEST) Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a8a9094c96csf194654066b.1 for ; Sat, 28 Sep 2024 01:38:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727512705; cv=pass; d=google.com; s=arc-20240605; b=fNl+c7zlnMf/4Rrbo9F/n3v2J1UX4aHqFw+SeGFupVVYu+gQM3/D9MbOe/d25PKAYj XAay88TD5ZN75ijwXY3PRvPZmVuof9b3+Lij5miGMWBMKr4dVllN+BwFDari97vR9yS9 dKvzquvfsEYQVkj4quSSwnzGGOIQhowf68nLrqSNK8iqM8YWMIVf2j6dmxFbT12fbK4V NH+B2Ul/2mbELogfa7djr9agzNd7QPpFLDpxr7CzEFNzrhSKIpHNrutCdO3UOUvPd7GA 1OpPHhOPLS/OseD8hDaaEdYRK648nmXBb3q9hqQIayi3abN2+WZXDxhvLXADi1Am3It1 5hOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=/49e88ScGTaYGQd3ub28lfNQG6D4TrXc9H1hUqI6cz4=; fh=R2l14idxMc4WOv8Ku5HhpAetIcsh2KTLMShCDZP+zxE=; b=gSCSfHFmX8g/+KPxkaz29+C5/8x54RLZgpUK668zy1Izd94dT954K1U8HORTqEI8Wa K0G68ehEh8/Pc8TfpJ+pn6Z8jKFYuiHJ4yYr26uZBY3POWFLrnNxShXkql5jaHR2MPjt L9NZ3oqNo08/uV45DJ2eyEk/go9pNM4q4FxPQRIz6ddnjd8fPD2s/vvidj3oe8ZpWdje Amw60YG2wMLhCdyAF03gXAd7DQi+fIalwxCMif9HMEIY/aNP2arH8XMINVIgUAMByE+a OJ+c8iLQhoBW1EnJtAw3ZXufq2yGCfCrbsO09CRkCFeGMln0cSg1+inb4wLb1W51FGci 2CuQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HfyqbE6O; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1727512705; x=1728117505; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/49e88ScGTaYGQd3ub28lfNQG6D4TrXc9H1hUqI6cz4=; b=Nc2fAUQhVXiCYNrMJ0wlhic+EDEqsD2Ht48/xgdGPop/smnl4X1bnNFuXoMuQi0FXi r4O+Th/4+GEf9h4G/WxcN+owOv3TQqQ/wKB+Pv78OHIc5LyvAIe7NbueSEABgl2MBDOd wc+pWc9jjKcoIsLOhlR81bAmo6qserIYB2ZR8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727512705; x=1728117505; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/49e88ScGTaYGQd3ub28lfNQG6D4TrXc9H1hUqI6cz4=; b=fi4UlVLiRmUT7J9+R43bXhoXsdPcDtPizNlmAJPewmtjaOqiYhOGzibUXqPh5CPna3 flIFR9bHHNQd/kyN5/C/CX0655VVc0PtO5KmYRNrQElRwhxzLiBuooAClVmibys1jb/V kVuZGBGdtGTL2AJBEM9WiwRXtU5mSgJxRp0w6gIeVlX0NbRMWJsSRWGZ+lAWK1HZOgPr lLs/2QArcBH6x8wCqHheoW/ajLCLR2+dgNjOUQODRzLEJVu4DnG5YrWPEy+Epmjrg716 fFQ4ly1+9HHFNT+ZCto41EWBcoIxX2gMmIt8ZYqGDd9Qhl+Tqryt9CRknNZTZirIWBw6 C15Q== X-Forwarded-Encrypted: i=2; AJvYcCV0DETtN7E9FvKtXMNs9x9r+UqiqLhMdFdONw3tDb0pmsP+0RBtQlxMzF/eJX/K2jGvwRJHuFVLYNXhwafV@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyeuhyhTRShMzZ4XDKL4Smvz06rrCy1Mjf21NLozIqE7G6XdZtX cbEVgL+8nGxKct1pkEN6UUuDw+gP8JHVnpZu4yin5Q6IaY/3934aGAtZ7pMWJDOTOg== X-Google-Smtp-Source: AGHT+IHCJBbUHUXHoBptkDASq17K9GVPqkLi6j1JobzUIY5r6l19L/CsQSOaXeCjXsVieNqgh8s18g== X-Received: by 2002:a17:907:748:b0:a86:a30f:4aef with SMTP id a640c23a62f3a-a93c49199b6mr523144566b.22.1727512705516; Sat, 28 Sep 2024 01:38:25 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:5113:b0:5c4:62b5:9aec with SMTP id 4fb4d7f45d1cf-5c8778096d0ls574232a12.2.-pod-prod-07-eu; Sat, 28 Sep 2024 01:38:24 -0700 (PDT) X-Received: by 2002:a17:906:794d:b0:a8e:a578:29df with SMTP id a640c23a62f3a-a93c48f0c1cmr626990266b.6.1727512703869; Sat, 28 Sep 2024 01:38:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727512703; cv=none; d=google.com; s=arc-20240605; b=BJzr8OMtrJEFrArXCRHFkCnEQe5JhOlykgb9bpPlS1cKMK6BbdxVz3hqhig3JC2+J3 ZmSt9skBd9TC98AHCtT5jmCdGyLjOL78z2i6Fn2aTnXbpH0+Vtq6C2RmyyNQn5ukWYE1 g1N7JQkJhJCC75lB2r5Sm1IuPUwQ0ovskOm8wibSt0jpO82j/Zko6+/TA5pQlHT8Pyws d9XOXOVgg684yH97wQ6MKKFBQmFzJvDFvkecRUuht6C0JWQFS6QSpm2nXdceu6yhO5qn CI8rTJ+Ea1f7uSzvHmwRR0/5Wt7YPWjB2XwAYOqhTtcgNdF6Ay8FpFXTbqkWEvVO/oT6 syYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=SqdVHCjP2z3b3GmppGHkZvxobZmXnCslqoKDvGYxVNw=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=iJ8izh2aoVkBlzntXY7mEc0HlpJfeF8yHyD4xrZ0PArqDTpwhi0J+IjJ+Jnr0aXutt Ah4KhdCuc9LY6Q5PO3njkocqAzHLYd43OZYLVhr8gU8+Yx3MuLd030UE6LQKHdWRuC+X DQA9BDUH+5oYmEVdYMicXw91WeRVE5AxzTtn5acKTx4ANt4xW9AvObyaNVZkYCBzEktD yxkPL3WUU349rEgg2twOTR3WV76zo+IRkgqpOVpb8drBofRYolN52gIodz6HI0+p1tzP fSJO2AvOVbiXcF5mE/fxIgaqMXo6ZjFTLenPFojQulnFyeAjzHUh0bsybd4saDZXMC6Z 30YA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HfyqbE6O; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a93db801612sor29354766b.2.2024.09.28.01.38.23 for (Google Transport Security); Sat, 28 Sep 2024 01:38:23 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HfyqbE6O; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);