From patchwork Sun Sep 29 17:27:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3537 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 766813FA1A for ; Sun, 29 Sep 2024 19:27:50 +0200 (CEST) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5c89527fdcbsf670301a12.2 for ; Sun, 29 Sep 2024 10:27:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727630870; cv=pass; d=google.com; s=arc-20240605; b=YWTaDobdMMKhVB1ulf5HDFEDTtFdDPmeeFmojx17WYIPkpT2PqLLEAgeCPb0MylTSe v2T0Ikxo2UwLunxIzLVz/4c3tgEkLJ60BzZE+gkhQvaqEJB8Fpu4Ho3KrT/3nfD552ai k6atobm/3xOwsUQQHMUawR2TYzCyrpduQH57KdwBnMqL90afkLnTMs3ZWkVhcdn6qgp6 i0o4SHxAnQjzwNb1NQOeQj9zpx/R4HXD2bs/Pt06CpFRfdEO/H3kMuyrreIS6T4zZwKk d7HSEDmwXzFpk8gtmPuZOPf2IDzfuU6OX6kd2LlpsVi4HXumTQZFZ3AQoONioyQCvTo+ 1GxQ== 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=mI3hsLs5iPz2/XDIX1kVeUXc6EOOJgNiDUTsfJYWSsA=; fh=HIHme7QYPJoW5yz9OU9fPQXU+ln+aq0N/zBmyQuv43Q=; b=WSkwVUraIw1xxqIGUtmq4shjIYoKm5NgtExzxG2W7lNL7uVqH7DftSFC/LTV7cNc9R NqlNQ/1qxm0dDNM2DyVa97CPfzMnfGfy8xnMfiYwnbjuwT2ijTFjIuUO/xKBcbwL2+H/ URXfw8qB5UcjzUPfla5SMqNby7YXM7eiy9XkHFGGEx8kcXnLOsXjILlKAdepyA8dQYKK UfdlMmcePNtt8AD7cMto2D9w2jXGqMUAlJpDj7F7H9bq65X60EOx6UhZ32wGPxKT71zR attWFH4nQlLQVGGMs6sSqKToc7ZKt7gqfaizFyE6/njsAeT4D0aR2xTtXFmydOoYwVwj g73Q==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BaKw40n5; 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=1727630870; x=1728235670; 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=mI3hsLs5iPz2/XDIX1kVeUXc6EOOJgNiDUTsfJYWSsA=; b=MtCptXp22Qwa7hz9DH9Pm7KlHbtOvWm5Vo7Q4MP8ExAnrtzoKWT9STZjeZB9HGoy9X 5VnZdOZ/+LGT7jhUzv7FFX0xzrcMaW1hlgAQ8Oe6kF2xBY3RovVnMBO8tx5BC1mMajRf I/ej02DkBF0Lhi0bYNPQhsl0MT2+gQPU9bDwY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727630870; x=1728235670; 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=mI3hsLs5iPz2/XDIX1kVeUXc6EOOJgNiDUTsfJYWSsA=; b=Iy8NPAdjHEqye7xEfbZ9stu369FFTP+qR6hSgKaZB7S2LNfqJ/YVEEMd2NRnCspBhW 7yCafPpEG7DiTVRF5cGRWUp8ZXJLcqlpUGikhnUt06m5RhfmPij+GC0qJ8FyubGTYI5+ HahCri1gjtol9NZU8ej0GuXAsAsVONGg71+sbQ87x6StWu07VzmYSUycwPRSaBlblmtw uDi2B10OztIHrgejnawN0ERA4tF7Wr7SOw65ufsPgv9iO2mDzeF2oxs1cWi/YitJnivS JjxLNMM7MjK3u+/MHBe/DpUyS0f1WpLSxf80nD3NSWvPfkkov/WTShXINlHU+U26a/Lf 9X/g== X-Forwarded-Encrypted: i=2; AJvYcCVHVmCCz/YKYwRc99Hgn/pEu5A1+TtZFkYsd8wYfc0gOHjG/iWN+zuoRbtyLUTMlz5IxX+Wc3c4R82LlzSs@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yyxyh7kTJHbUlC24zMKFnvJmoUXlAjLKqA2Kw8OVG/HjZXndmxx c7MRYKuXm3vvC0unly9SlWcMWWkWG6izmvctI++Z9qaOOLNUV3uD7fEEStENuYnx/A== X-Google-Smtp-Source: AGHT+IFxNfZTWqpa+3FvKzXEoWRHF5XtsmMItI24rzwGPo2yWTnag7MJaiZMwCaaNzlD44vzmDDzwQ== X-Received: by 2002:a05:6402:5249:b0:5c8:9722:f9d1 with SMTP id 4fb4d7f45d1cf-5c89722fb64mr1313830a12.5.1727630869747; Sun, 29 Sep 2024 10:27:49 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:430c:b0:5c8:757d:2f35 with SMTP id 4fb4d7f45d1cf-5c8777683afls858751a12.0.-pod-prod-08-eu; Sun, 29 Sep 2024 10:27:48 -0700 (PDT) X-Received: by 2002:a17:907:60ce:b0:a8a:8cdb:838c with SMTP id a640c23a62f3a-a93c4a973cemr979173566b.53.1727630868165; Sun, 29 Sep 2024 10:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727630868; cv=none; d=google.com; s=arc-20160816; b=yNmY6Kw91dUGwqf5kriQP9CjHbND8iZVB11GOTzNDWz2WLFAFuSbkcH/I4jQNlJ82V 4mO/rqmTEMV1BrvW5FTFOA2oGOyEiKDpQlaWGJBEovV3HHPKJMkHGBZarGVDklaSY/HG dF7ACjyNxhtTRIpU5uj44VIXIswJhqL5FaGQD7TdMKbXbMTDenv1POc/AcspD+VHfI+Z xE5oACfX7HPQKzbWfXMRzIR8Cmp1MAe5UjHMsc6kMsW5Pc4sf0DVbj2r1cGTC7Q2ZP9l ezcsi7h7/9Z/1BgJGFMnBytm6tInJixnqajLmML4H3XNqtZq7kec358tkhANWnCioH+6 6wXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=zsgh0kyD9U5ZxoRxA8QRLb2QSbsWIvPPTG1CIfNu7Us=; fh=TcT5mq+DOC99WOQKF/pyM5BqA4EvWwQBAkqh1EN56Eg=; b=K9d5fscwrdduGekZgAgN2QePyftRH0Sv8r/UWBjoFdKPI6cF0HAWFJxt/U3QsFypGG 5UmN4y9oUeUfsdkmhUWi6QOVI4vsd9BMbBDfQa773JTKtT96+6WxhXLqk5Kfw77rCocT IWi6qxfRvXHihyyQQin+4BqqhiPGjOw8FmLoTJ/7aJ2iKQxccpEzwkycMPUacTjC0uOp QtiqC9zMtAAmbHDhe/XuCLQK4Cn0QBiz960w1RPrppJL2nJhCOX4J5m/rXGuZf4EiUPN nNVs7mo4BHqaq0hKyPIo4RHM741m33s5gVbdgEduUXZLXCojBJXeJtgKevLQviqlZvHj HMyA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BaKw40n5; 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-a93c29060acsor217647666b.6.2024.09.29.10.27.48 for (Google Transport Security); Sun, 29 Sep 2024 10:27:48 -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:3182:b0:a7a:a892:8e05 with SMTP id a640c23a62f3a-a93c492a4eemr1095867166b.33.1727630867626; Sun, 29 Sep 2024 10:27:47 -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-a93c27776a1sm403176866b.8.2024.09.29.10.27.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 10:27:47 -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 v2 1/6] dt-bindings: clock: imx8m-anatop: support spread spectrum clocking Date: Sun, 29 Sep 2024 19:27:11 +0200 Message-ID: <20240929172743.1758292-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240929172743.1758292-1-dario.binacchi@amarulasolutions.com> References: <20240929172743.1758292-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=BaKw40n5; 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 --- Changes in v2: - Add "allOf:" and place it after "required:" block, like in the example schema. - Move the properties definition to the top-level. - Drop unit types as requested by the "make dt_binding_check" command. .../bindings/clock/fsl,imx8m-anatop.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml b/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml index bbd22e95b319..a142c04fef00 100644 --- a/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml +++ b/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml @@ -33,11 +33,56 @@ properties: '#clock-cells': const: 1 + fsl,ssc-clocks: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + List of phandle and clock specifier pairs of PLLs with spread + spectrum generation hardware capability. + maxItems: 4 + + fsl,ssc-modfreq-hz: + description: + The values of modulation frequency (Hz unit) of spread spectrum + clocking for each PLL. + maxItems: 4 + + fsl,ssc-modrate-percent: + 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 - reg - '#clock-cells' +allOf: + - if: + not: + properties: + compatible: + contains: + const: fsl,imx8mm-anatop + then: + properties: + fsl,ssc-clocks: false + fsl,ssc-modfreq-hz: false + fsl,ssc-modrate-percent: false + fsl,ssc-modmethod: false + additionalProperties: false examples: From patchwork Sun Sep 29 17:27:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3538 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EE1E63FA24 for ; Sun, 29 Sep 2024 19:27:51 +0200 (CEST) Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-a8d13a9cc7asf272610766b.1 for ; Sun, 29 Sep 2024 10:27:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727630871; cv=pass; d=google.com; s=arc-20240605; b=ZGWIVcJm650+24vwZ42CnJisWGAyRbR9g38sW3y0TxaRCXC9ndtwDo/BH1kPUeH7st pJAi+kqH+mG20GoV/mnMzBVXSlmboEAVSSHprQoYLZC5Qc7vr/4z70/dXZbQ03DwcbQe Tw9nifAj6OJJw/me4p3iWrJ+BPazIuUj8wQb9JN/b7tCeEz40LiY5yEutra8SlhFOsNd aEiOW0ZHf2NCVbrdkVZBs21u4tOhopl0ZJRUCg5Pzk1HIb/tansKvxhm05HkOjPd0yVB 9klXKkPtXxcPS8pFvez7GofTCOe0RPh2vhKjIevxywyGPQkKH3MBW0X4G6I0Ar4nj++H XJkw== 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=hDpHbkpfdx4gXd1JCeuNz3EmiSCdKkWZGM7BYT+VG9o=; fh=/ByvMSqipvj+jWNAi7r5Uiu5Jez+jLdD6DOTcw4NEcI=; b=GW+s6VS63b5zI/r10Y8VKLZ1gysuoOCoum5nMQ34sXrIkBkxs8hK/anBRwh17ybMto Fs98MGpbaMwtQ66Ss9pXz+yUyt1fMviSoLQ4VvmkN/o6yynuXm8vSRTIq2Q5x1QCYVYQ cvjDMqghK3wtY/4MJouJT5/7ahAxikYZMkEriIupxgmi82wTKpYq+PW8/AZ4C1oD0S1X 7GCeADg/v8m/jHuBjJ79zZkhuYnejYwvTNIHn8GUBmNwrhIjELpXzxqmTXza/ac6F3mL 0XYKeg7Ex3ZnCRVOpb9myE8rxIGdkJ+JBJf3njat0o5Thw4qVZY2+VBfLHKXdttNSvoi yndA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H89UFI0p; 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=1727630871; x=1728235671; 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=hDpHbkpfdx4gXd1JCeuNz3EmiSCdKkWZGM7BYT+VG9o=; b=U4vDvT7L8bRgX8sAbC13M9EWf4wMzjE7Mk52z+8LTCzl3/TUKLhW0YJztC+uPtNjAr qZdIFkFVhUaU0sYK7AJNZvwoii6NSz+MqIUgm6S4gPF9OzXenI5GaXU6JqsKKeWo4Rlo iEUHmQNPMjTuhI01rPtw/d7es4zhj/nXuPNe8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727630871; x=1728235671; 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=hDpHbkpfdx4gXd1JCeuNz3EmiSCdKkWZGM7BYT+VG9o=; b=uehfPMBmQ5VcUtZhJw7k4ZOE2keIlGmUoUocj4yHqDX9JnbBULWd6GVV2muuFF9u87 n+nnHtKKlY5C7h/hTLHPMVzW3Z22xrIO4+NwxqNQILkXgEBhRwqxvS7lMYqGvg8M6U0U 1Ec5SUiT8ZxiY/ROVZAmwinrFNAMau0NZ+ds0DAwsEG2SBYilbcM7khe1HYaj5hDYfvV 7evqyNIYbMYzBxjSPQXaazp+aK7MCwnLqzRlQUAkyahUzYNiQ55I5TJwNkv+RF8DyOUZ pC11vdWiste+bbiO0aVC/by3B7Qe9PshI8YmtRpJm53RBo1dD53B6I5ZwrFpU0+rhmuy UhzA== X-Forwarded-Encrypted: i=2; AJvYcCVMPfwf5Tc3GBz7qT7PMPrmfCsYWz4xAQwhrdUEt1o6IScLC3SVg3JUKtxTYFnZoqCjuG2/6TaFjm9Jhsax@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzJZa2UIT85HMSWB+ITfQJ2k2M7laRH68FmGTL6UgOQTsWEcifu lDJ3Y4YAaxUNjCXaTKlRueEIkheojJIu3hL/asa2sSXJFMqMufg9+ipLPnCCWODEtQ== X-Google-Smtp-Source: AGHT+IFcKbpd4ofuwJ9JP5W8vsCpqTFNVUxsif+T9ayiXqUpCYhIHG04n0DPbCj4RxQ+GlJf9zHeuQ== X-Received: by 2002:a17:906:dc92:b0:a8a:926a:d02a with SMTP id a640c23a62f3a-a93c4adebfcmr905669566b.49.1727630871136; Sun, 29 Sep 2024 10:27:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:1ed1:b0:5c4:20f0:95bb with SMTP id 4fb4d7f45d1cf-5c87776511dls1148894a12.0.-pod-prod-09-eu; Sun, 29 Sep 2024 10:27:50 -0700 (PDT) X-Received: by 2002:a17:907:3d8d:b0:a8a:926a:d027 with SMTP id a640c23a62f3a-a93c4adeca2mr1132804566b.45.1727630869541; Sun, 29 Sep 2024 10:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727630869; cv=none; d=google.com; s=arc-20160816; b=udL4NVOwbY9KncZCMFjZ/ZLuBFzeZHjTDteOI4A+7v8WujvYoVa0WPaa07yXhEs9aq wKZQ6z8jzAW6beUr3SlTCMDNdQBIYpnVmUfQtsmHQeg1LZUQ2DYXv/vk9pJVYO0fJH4U S36nmhUuFrcPRHjpss1/ynQkHi/4p/2Vrth8MtfCPaGXy35rko01APM/0JOTeESknmLS /4FBD/8jXCxVskqbBLHsuDf3qoylEI+G5HakpY/TNiR8GQ1TCcuImhPA4tyT0yfLGhMT GM5tpFvWPpS47hi3pNPCY7ZVOoX3eo4OHu6rv6eD7LvycgDV0kxnd+J19SpYYPwu75um WNVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=HYFE+8+xJyXnOIazKfuEkYOBmIG07KamRjf0rhIE9ik=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=h0EL6hk8O0kcSVCkKEzY7UIaj70XgOLDQpjlJEPpsA0dMScU5ljlxdOAdGyMJnJmDI jGn3qnIEbntKMcMnBIyLv8+RsoeDEzdrp0BLOoFBbm3uzAhFPCSXZmHKeycONiVM6LlG Jt4Y3j77+gcnBIWxKmmQw+05S7BqSzj/dJdiQdC/M2FFGAHDBPmOz5rQxjbdKa4U2U1G Sz96my+iX8Ll0FRDIEpDcocSZy8N1urpDcy1nISaaqmmb5nsgTbUpyVu+8qkCFYNrLkC nwg2BJXsQcbKI7Zs5RjVO6CVVCjCSynBpKyjeUIKQw4sjPOhb7F+XKj2ji0tGwoAXiF+ qMuA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=H89UFI0p; 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-a93c2979a1csor204579466b.20.2024.09.29.10.27.49 for (Google Transport Security); Sun, 29 Sep 2024 10:27:49 -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:da85:b0:a8d:35cf:85f6 with SMTP id a640c23a62f3a-a93c4c26a25mr860443366b.57.1727630869076; Sun, 29 Sep 2024 10:27:49 -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-a93c27776a1sm403176866b.8.2024.09.29.10.27.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 10:27:48 -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 v2 2/6] clk: imx: pll14xx: support spread spectrum clock generation Date: Sun, 29 Sep 2024 19:27:12 +0200 Message-ID: <20240929172743.1758292-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240929172743.1758292-1-dario.binacchi@amarulasolutions.com> References: <20240929172743.1758292-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=H89UFI0p; 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 --- (no changes since v1) 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 Sun Sep 29 17:27:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3539 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 291F23F03C for ; Sun, 29 Sep 2024 19:27:53 +0200 (CEST) Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-5c87c784d50sf2282801a12.3 for ; Sun, 29 Sep 2024 10:27:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727630873; cv=pass; d=google.com; s=arc-20240605; b=B/tCafQbd/iIcMk4EFLa8UeuOSSQ9LEZpGMM0xpDY3gfSMDHXJ2qtMRdYrjSMl4+pv NN0PAaEEOH8DHgCt+acA7bSxUE2Gj0ME1lRfwqvljI4wPV/wlMqbWUf2cvGqGM3fh29a z6ltdO55X0F2Rg35vhzW1IGw8pf/mOisdyGh9X2VbVe9qVM61snqcyNOMkPfRjZWQ1EG Ww768p/GE8SwfucazXFDGhBmj8gwPp2tu8l0BRFuAyArHwq4+svrST4QdXR+7BCSGXB6 rpA/pm2tvsL2so5emJQxfhkDdvPgvzELcgn+Ud0CYmCaQDSPPEVfgrElQoKUTeDX+dXw XuxA== 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=H8MGpKuBGovpjQF+SRCrXw3SyfVUsjKsp1ASEgbMEEY=; fh=hQdHWFSwxujjOPKNnpSsgvZYLgb20Kwk3P8+0HG2QP0=; b=lDhTR4Gz9l2mXHVhJH1MmobwfHIVW21d0ErKWHsJFY09CSttQYBKCTwWaG1UlQ0FE8 YHKV1hLblBUw+LqhNBqIYSGGyS/VSn8YPc9izrXj55eaw1DketAU6M2M3HLWXefsfWxP SY87L6KZhWgpntBCdmQoPq3LVvjUKurzHezSqbQCHXiRLCptKJjVfiB/gY9b5WkIBlTd HM9jppHJu7Qsx41lLi1GPlHeJmMoIjsFw6gne/I3YkHX/8QgzriOqpWJ1ZEHigKW/imF R5IiKJw9ZYAKOe3ATiao/0M3TQODMnBg7HCG6uWQwHbYIweqKSF9wtq7LD6nPG5mLFq/ e2hA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nMQZ6Iov; 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=1727630873; x=1728235673; 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=H8MGpKuBGovpjQF+SRCrXw3SyfVUsjKsp1ASEgbMEEY=; b=BB1ixq2bAwYG0//dhq/XeYoQc1llLOQZmJvi3E8hPRxbjcz/oTkEJ7VZLl3ui6j6Xb snl5CxaZ3mgQeRR2SIcPRZk3GpbH/lwdqm0QCGa864Qpjfn+2trocwk5ptkdFlFUkly4 BBSCHEUd6aZwVadC742Ez8JCHlDm+QQvAC2qo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727630873; x=1728235673; 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=H8MGpKuBGovpjQF+SRCrXw3SyfVUsjKsp1ASEgbMEEY=; b=o+dZeHicfjF56eiDsi1y51ti4Sxnw0lgjT2SwjbdUPfxcll4wY/EAIdG5+8muJWIGy UzsgZfI4GKTw6NyVch7cnwtKGXAMA6qEv2uQf888VZ8q8wTRB9ZFKigEh0KxGDweLVD2 rg8CAMlFTEKQg82bP5O36ucrWfJWbMBiuznukuYMnA2Le7I5to+kpJOCpPf6a9JrofHs aNFZwPWz6m14t9Mpyn1AV7eac/eE+9Mg4vcRsW4Bnlr1uB/RDKuLzR3nbQds/814JbXK 6Li7p2SME/d0Sad8d0/pG/+ouvkTDG1W/6soSM2oILZ4Zrq1QTZ2f4sJ+01pSfZht1pc /B+g== X-Forwarded-Encrypted: i=2; AJvYcCUZYvITkl0iDC/tpuz0T8IGqfp+X67veDCUNz60rTa2J7bH3sYWOnP5sgJpY+wUqaGGMBK491U64Lxxxr4Y@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwSNuifP+BlWa32R8rNa/eEiqJvnSQ2vt4CQhnILSApZwWerA/H WN9mapUSDltsKu5LXvUY2MhQ20uZINhqwOnwkEJjbVep46PpUJ+7jUGYWt+XvzZrfQ== X-Google-Smtp-Source: AGHT+IG9pJ8j7ZMQJoSse3za/53QKCwVsRLQU3/X7EE+TxRGfTBZRntxb+MnfEOT87To007KleTcuQ== X-Received: by 2002:a05:6402:2814:b0:5c5:ba82:c3b1 with SMTP id 4fb4d7f45d1cf-5c8826034b5mr9556661a12.29.1727630872564; Sun, 29 Sep 2024 10:27:52 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:1ed1:b0:5c4:651d:a532 with SMTP id 4fb4d7f45d1cf-5c877765b81ls653885a12.0.-pod-prod-06-eu; Sun, 29 Sep 2024 10:27:51 -0700 (PDT) X-Received: by 2002:a17:906:d553:b0:a8a:87d5:2f5e with SMTP id a640c23a62f3a-a93c492a596mr1223163166b.34.1727630870840; Sun, 29 Sep 2024 10:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727630870; cv=none; d=google.com; s=arc-20240605; b=ZQGAvZaVLgOTx1Oyi7OpKJ4jaFtVp5gKhH7P/BFzi+LKOnv4WccUG69q+VKq19RIWz HPw7YzzicqKA5PZ4iu3j8o73KhukJamS3PvakhNUzTYmRcagmqrhK3Lb0rAlPudc2/wk z0ATcDQZLyD81xyhrScZXSDPreyAdVbG5mG72mTF1roOuxZBuo8LsPU1AKL2hLxIsqKM jziIQyjdRwJy2Oc9hnjCwQm8B45/USfdyLuUInI8FiaS+aZRQEOCWsaGJzVjKnC9tVt2 r7C05I/7XbwZL+K6uypf/8gmDsM6UQ3FLRXFDxjpsMNlLlJzMVccY7XAgEMUIo4hNFWd dTVg== 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=WlAZxFonTMYipfw1/+w0+N2nElhJYRwH4anfNSm1DKU=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=ZU0zlBVBGeYAQaTU7i/UEgSzOC0AXCKH6hsK3OL1+Y1z6CcXTPPZOlXSMd4UgitWOr XbskH72GqFz8xNm//hFqBl49pq9/KWFbI0qiYMOSTxBC1k+m3kA+bpnzz+sHdLPrJjIP VIq+TaUwy1gnfWBmo38MrnRWNyGSeEEKv8NHwAjP5gonUBgn2rT5wMuP6L1kut0nlm1X hhBJoq6NjotJY15nxABTEZNUzuylhuWRJYEKo21qk+ZG0yrexuWK4vrbsTZtowVwGnaG l7+QIN2YRZEtS9XPRBaF1LHANJpA2aB69OLCNhdwD31Fbz7ErzP9NDa1trLLWXMDWJdz XJVA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nMQZ6Iov; 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-a93db859b01sor129652466b.10.2024.09.29.10.27.50 for (Google Transport Security); Sun, 29 Sep 2024 10:27:50 -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:7b8d:b0:a90:419f:d8c3 with SMTP id a640c23a62f3a-a93c4a607b7mr981791766b.49.1727630870391; Sun, 29 Sep 2024 10:27:50 -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-a93c27776a1sm403176866b.8.2024.09.29.10.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 10:27:50 -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 v2 3/6] clk: imx8mm: support spread spectrum clock generation Date: Sun, 29 Sep 2024 19:27:13 +0200 Message-ID: <20240929172743.1758292-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240929172743.1758292-1-dario.binacchi@amarulasolutions.com> References: <20240929172743.1758292-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=nMQZ6Iov; 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 --- (no changes since v1) 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 Sun Sep 29 17:27:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3540 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 5680B3FA1A for ; Sun, 29 Sep 2024 19:27:55 +0200 (CEST) Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-5c88e8d0a69sf993273a12.0 for ; Sun, 29 Sep 2024 10:27:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727630875; cv=pass; d=google.com; s=arc-20240605; b=GZ+hbvgBczeb0UxIo0QPQqBczIvDcs60XDh5h3qAcXRtKVpFjNGM4XAjzpFsVsTd5d aO+tUCgR99OoHmQ3nCdXtsSwlaLN39cT0wiC0vC8veiGQfQfltqgrkg9cOqtbECoXFUh Alm22o9p4FNAUfTW4OylWwASq3KHiVEvWP+N52peRaCAZP9ZtXOlBzuLCdtfMp5ENzkb +cM7W0Nd9zZj0mR9aSJZ633VTcKrSK3Fej7kWFZ7qkhtGyfxSVpwqIGH6x+WvO31iu3h frodRfjIKXVEC3As5MJ1x4wLvFPJPlXvs5Ra5iNCf6RxhxBlsXg4xjuOKpgstUW6uSCI S2Bw== 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=Sk8HHWFKWLhI3/uk7zGgvu/nJPUkx9Xs9+YnkSnTtOQ=; fh=gpyDpVGV82DUZIoLeADkUGHm/gh5BRC1JDDnmbUydPk=; b=EMEtnX0GcwU7gV0TJ5fjcAtbcLvs+v1BsK4fbXVkTColDPJ6fVrpJ+sei3qjcm9184 FPETLznM+rVMCv3cGELzR4TAgGVzYxidSzn1WN0J1K93pAqAXPPtIyoWkajAiFYmoIjp kdCZcGKS5E9sfFJu0CSawd5TY/tUM+HidcHtCQ96QcebzNCA0TipCEcuMzRFMG6ydP42 EKq7mf3mmGLj2IEBTUxuUVykD8jVUOuJbZT1Uyueg5xVyOhfKxXFQqpefjvPtQmuQ62g nwkKwHbgsT/yIjhRRYonARdFifrCge8ZW8vjWHLHwAzEA27QixBxTPrSrJ9aF9aZ6QiQ iIVw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MKOzp2M9; 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=1727630875; x=1728235675; 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=Sk8HHWFKWLhI3/uk7zGgvu/nJPUkx9Xs9+YnkSnTtOQ=; b=GFUx9H8frDAxH+fhEDlKgggIVz7iEV4uDwPcBUecuGXjRHBVxjTVBTU4eeYxc1dmnM pYmifgB6hscsTVpd/QDGoBdZTBJem88o2M+U5OZeYv9RJGp7oaWXV8bI2Nfh1qcBoCWe IEoXlQfVF2e0Xeiv1IdQTFVZHf43Lm/ygPrB4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727630875; x=1728235675; 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=Sk8HHWFKWLhI3/uk7zGgvu/nJPUkx9Xs9+YnkSnTtOQ=; b=fR1njke5MKQ+boJzD3a2VD5OKTJ87Pbu1JQqveG8IsSmUOZGrHwfAa2LfIAu199nTO WssuEglDoMPD6M5ZxcauVhu6kYIGnp+j+9SJCPkmVdnXp6dnvRuLW2KVtOcPK74cIpn2 o5s9s5xfP8VvoJXXhJWODy6n9j3wbJsOz2pzd1ft4Of9RCEaLsqsaU6wgcyNk2Y00OcQ Dvx5vYvwu1Qd/jBP0zAUJ6mIPeA6aAon3cqy/ZA66x2ii6by8dyHkZ/kcPe7qfkgJxpx YkG+n6YNSfktlItWrJIZTBvZDl0983LLMpsX84Cze3UxziaVtkFpK7uJgjqRVHtaF6FV 837w== X-Forwarded-Encrypted: i=2; AJvYcCUnIzC89xlMzOAKQPRRcQGLnrLDO0IGPz8V3/FcxSeiqcb6YFy8RG87jMfJSFrxi1Jq0Ih32SM6aOD7xgcU@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyjxgTpBcRtq8HFqWgf0eEqZB9g66H/tVAUhk4AGeJcDM4EkaOm mwwxLVQ+EmYg3QNglzrXjfRCEsXzn/3CGgJ2sxvoAFyF+vbA+gVzzmB7Go1C04wOhA== X-Google-Smtp-Source: AGHT+IHdLfZacb6juVSWSAhdhggZG1HxsTsLT4uvwUTizfUC6MewP7jPvG9tn2zAwj/mox6jFR23LQ== X-Received: by 2002:a05:6402:1e93:b0:5c5:cb7f:e56a with SMTP id 4fb4d7f45d1cf-5c8777af668mr14901644a12.1.1727630874891; Sun, 29 Sep 2024 10:27:54 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:51c9:b0:5c4:651d:a541 with SMTP id 4fb4d7f45d1cf-5c877764409ls1414566a12.0.-pod-prod-00-eu; Sun, 29 Sep 2024 10:27:53 -0700 (PDT) X-Received: by 2002:a17:907:3e1c:b0:a6f:996f:23ea with SMTP id a640c23a62f3a-a93c30f0cccmr1021662766b.15.1727630873254; Sun, 29 Sep 2024 10:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727630873; cv=none; d=google.com; s=arc-20160816; b=SWwC/jpIY1Y2yXM7FtdzGrNDkC8yY+6r4pDw2kwhbFGwkdA+F9fLQC5c/Y/RAgIHqd WaMrr/8FYn2aRWjRGtlEUTbXHWEjOfFavifZVZO5txt422W82m+FczwpHPdCUNm0ajhi n1wcqSPMY6YVAenRsixdIYcm6enxJ0MCW0TfMb/3nOEAJUZfN/uoQoVV524Ya/TM+eEU njNfGDJTgA9wCcPsD8spI0DPNcLWDn2xNTxPxGZk4nFQYebT0Y+LFwr7qZgp2IJ8YtDb FHbEQwI0NW03V9ke+EE2BWWYgfHtAt4SkhKQ04ZatsG1N1XLfbkaLu+5eCHVHDP4KwYN P+oQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=I7j0vOxwdIuLpD77WK2SWPTcyyL5hPZ0rRLo8GOdwiU=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=NZzKRGu5l0/QMX1w6qDsDKk+pzANaGLkQHh34tj1QlL/dwjbYz0Q70I3tD0nOahA1Y apbzt24dxHWBImuQZ+68FEq+li04wEFqSkjheiHfR0XcUiqDTSmh51JrmZOESeRGUhk5 /wpCoAYCMYPQ5kK7orKNLFCp1x5+u1gAdsVE4rhdVaetOjg1if673bCoTU5jhEyuc32T yO5W7zjUeZtFyu9B+u/QihkKTVMKFmJXtRL7CaFz6H4S8uXWBzPFRlqu8bh1+ElJCHah fQKqd3dnmcfbbVptRhaQ8UY+m7wKNLzLfqpFbw7+NE7+eWLCMVBr6CBrUzYLIJkiCaHq szoA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MKOzp2M9; 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-a93a4e0c829sor413867666b.6.2024.09.29.10.27.53 for (Google Transport Security); Sun, 29 Sep 2024 10:27:53 -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:749:b0:a8d:41d8:14ad with SMTP id a640c23a62f3a-a93b1679b22mr1493843566b.29.1727630872356; Sun, 29 Sep 2024 10:27:52 -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-a93c27776a1sm403176866b.8.2024.09.29.10.27.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 10:27:51 -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 v2 4/6] clk: imx8mn: support spread spectrum clock generation Date: Sun, 29 Sep 2024 19:27:14 +0200 Message-ID: <20240929172743.1758292-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240929172743.1758292-1-dario.binacchi@amarulasolutions.com> References: <20240929172743.1758292-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=MKOzp2M9; 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 --- (no changes since v1) 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 Sun Sep 29 17:27:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3541 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id ED4283FA24 for ; Sun, 29 Sep 2024 19:27:56 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42cb6ed7f9dsf36350595e9.3 for ; Sun, 29 Sep 2024 10:27:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727630876; cv=pass; d=google.com; s=arc-20240605; b=g6li2PmGaTy9o+mQOSgd2oP633X7OCACKDtpU1LAeic1BNmQRmZKn8VoT/qkro4rSD qzdumZtmybeDOpfT5IvScFwrcoC1RhtuX0HUEnL7Q3tfxe6Rjdnnc7f6aiye23IkhsyL zeK4lAVt41CSGd+1IHj9DmagbfYG410C5XoJL7hYUp1IpwTE2Y19nVfyFT03/678v1C9 kl0r4Qjnhjkmz2+DTxvU1G5TP1Nm4+d9NOo09bRXFZj3v1d73jMZy/Yd7FfBiAiWGPV1 4Sq4MPOZgzZS9GFp82XZSNYzwYHticNmZfkLTBk6kQfJ9JrO+GPpEq8Opp1muVS2XD5B rhzg== 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=TMc6idWCwYsdkWVpvdqJO5S0odDJpt4d5aF8jZIuk8M=; fh=+nqT0WkNEQvmZRe3HEcv5M5+kagRyIrj7tO5fAlLatw=; b=KLKx8KOpGaAaIBM9KxzS9bIdU6uKj6qbwydxv61juPNHq4NoZ+s0aj4ebBJz4IUT42 pa0X3Otdtjf+zGfvn/vvpXyekvtjG18bHv1DDCBRYqGdIHw0P8ih65g9mhwPIQc+OnoE Z6Q7LukPex81j15ZEmhUOhfhgS6ZpjCAWmK496+sBB/tqMrEcsM3PV4rhVam5Er//maL RXEZpW9h1L9rQSVeq6uxEy9drphgS5gO7W3bLhHuidQOnP5/xfaxNA3k9quOkVSkQ6OL E4h1rms+/7Hq5Op25UScWj0STlotZeOStXHXhTu5VCV3hPDy5iXThEsktaIBIAU5AApj 7zKg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oGvHQisl; 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=1727630876; x=1728235676; 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=TMc6idWCwYsdkWVpvdqJO5S0odDJpt4d5aF8jZIuk8M=; b=aZ2ypzWzSucmLRMLX45GBd55C1vTiegzoMHidwM55w3cXtUa3CjSYwOarMaJnNphL5 DZuJ72+Xz2FpvSGJeUTCuuO0pFGOZWJarS+3ltI1Ine3Wgnk+i6ZVbhaOEGWM+EWELPj 90zaCr9cCbeGEWEnMtFbFay3I9CoW7fZ40lIU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727630876; x=1728235676; 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=TMc6idWCwYsdkWVpvdqJO5S0odDJpt4d5aF8jZIuk8M=; b=fxEx7ax2esMvhgmlW0SjTBT34B49cH8kwe+ohhSRhuq4/FLkhiVgZIucO14VJFb7a5 +8MUMT9tOfHuAoQi5GnHn+iMz9wS0pp1Zf88XshmX4p0F+655pfer2JFu9WB12lNDQw1 hhj8sV0o7ZXdkqMUmaJ+3KXXIjqi3pyec61kArLXRKrxqMMTsi+aYHOcFUBYcejEyImj MDWem1ohNQ+AeFj7yGn/U6rhLvO5V5C8VViRjWjLCbVLACRID0t5YGoaXrt7fUnHCvKn YszWVEI5wEmd8mG9eVG8EOXCixn2CCDFoLXPwz9SH4Kcft76y7hemOYiAlb7unEOxR2r rgLw== X-Forwarded-Encrypted: i=2; AJvYcCXjZPdEibCtCqt/m173HsNxW9F8e9AYjRNqKZKyd34YUBtoqZ7G047OJHcBh82ocwItSBFRi4N1fbfTHG22@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwrmWiHZsabGPIIwi9xHVHHH6i8ug38C3O7r1c7op33AQq21DV4 agxutzkDggAXV6c+dExrRP/WYpKjQ8h0tA3q6+q6P5Xw+hrn1YTHL2SF1yifJXYoSw== X-Google-Smtp-Source: AGHT+IGAYOCELRuG4tTFpwB3q447Wm7mCQwKEpm0WkXHiETcQeJ0BaM9V3wuYm8n2LFo3yGstSxPBQ== X-Received: by 2002:a05:600c:1988:b0:42c:bbd5:727b with SMTP id 5b1f17b1804b1-42f5849772dmr107733555e9.25.1727630876434; Sun, 29 Sep 2024 10:27:56 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:6889:0:b0:376:46c1:d33f with SMTP id ffacd0b85a97d-37ccdb8dd28ls718041f8f.2.-pod-prod-05-eu; Sun, 29 Sep 2024 10:27:55 -0700 (PDT) X-Received: by 2002:a05:6000:1146:b0:37c:cc4b:d1d6 with SMTP id ffacd0b85a97d-37cd5aa61e7mr8088742f8f.27.1727630874848; Sun, 29 Sep 2024 10:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727630874; cv=none; d=google.com; s=arc-20240605; b=WbgYy3x7PbmSWyk+pQ91FpHlfvrx41VyQ4neWMRfqlRGb4BZSZLUcp43N7RhfI5Bxc djtvWXbHpmuXHCLd3X7OxzFEABGeKftqYZB5r2MOxi2rTboOtNLKj18eH+XI68+z1/De cU6t+2CzZqhPucdKCytgDggVcB5Bp9viulK53LZVEEpnWm2jlPtoqwSpUURL/525HFrm tsc+SH2NhO2GjmBAh76qqCbEVtSqQyX8EM+Cttp8seScWtkdXlDP3r8Lw0+80VvTdUAK p4nG0fRVDWOtB2r1hhchPHfITaUug7AgCIid/vO0XLKmzdG+VeDWDAKNBTKGGwGgTG8P L7Pw== 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=2RymkxnNQTDpNcXN6Qg1uYxhHB5JeOGRw/tDAC3s4FE=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=NrS/A8kywbAOVAQ72VeGOR1l5e48GOjVig+OIda6HUxfJOSrXUKpoTMUobZlt10vp/ 9du/oIoezVF6Tmxtiv/gFkAvXjbqcGCYOxG75LrY/FNMUNzKUQDAYKYG4pUE7/eMiUES 3+Fimm3hZpgbY6cMT/XOar4XtJGXcMFZRQY0KTl5UAGBP2q2UfCuMXe3IswUoxNPbsa0 LhQnDzkRW+JMkOkSFoe4+4cit4RAoSaeI5RwgXBmtuEc0OpVXuaFAu2d4sVvQq/nOPzt dF6yLJEO4+n5UEji0ENgYLCmlt8G4BiwEaboFk1oiG2nj5mREhubQCMP8lYDvRKhNcYm vgHQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oGvHQisl; 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-37cd5639492sor1982640f8f.2.2024.09.29.10.27.54 for (Google Transport Security); Sun, 29 Sep 2024 10:27:54 -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:a5d:6886:0:b0:37c:cfa4:d998 with SMTP id ffacd0b85a97d-37cd5b1515amr8217224f8f.49.1727630874386; Sun, 29 Sep 2024 10:27:54 -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-a93c27776a1sm403176866b.8.2024.09.29.10.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 10:27:53 -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 v2 5/6] clk: imx8mp: don't lose the anatop device node Date: Sun, 29 Sep 2024 19:27:15 +0200 Message-ID: <20240929172743.1758292-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240929172743.1758292-1-dario.binacchi@amarulasolutions.com> References: <20240929172743.1758292-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=oGvHQisl; 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 --- (no changes since v1) 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 Sun Sep 29 17:27:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3542 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 11EA13F03C for ; Sun, 29 Sep 2024 19:27:59 +0200 (CEST) Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-5c8853e8451sf1256771a12.1 for ; Sun, 29 Sep 2024 10:27:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727630878; cv=pass; d=google.com; s=arc-20240605; b=AHhq8DFXtO00+yFBJKdbhvhzJ+gSlaUd6NoEfkrsLyEMCGAK9C1GwBO0cA459B/mZl wxE2+H8dFuznuZaabppshPRaqS1wmxwEXx9BcsfxrC1yFs28A8cnhOJNzkLk3E4jBfQf upg2gmjOB/DpbLtkjwyq05waUzogmSFiOwsJEeXw/FleDzKAURgOChUXrAUzAoWNZzxV eZpLkLk+DuCSxR34G7C+w3FzSsKJ+dLZvtxFEy+nyLan1M7wSOKvAdbujeks3HaiEULS Z31Z9AOJcfJJ3yDvs+uvs3en4j3pD8L8OzJFJZH4aVTTG4tp91/UDVysmAWd2xpatqtU oQFw== 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=agx7+u85kKbQbWiFSDrhUgGvq5ZsT6VSyiljEga4kgM=; fh=kZ7eLiqG5OSalQC4VLSRxITEa+jSct5f0s1/tTWoZK8=; b=RhRCj9pQXx/CQN4rFJAyWdSQOcHemPFFijYwsbVXPlWEjQROfmes+q5iWDI6bUnC3G zSEoJ663bPWJXYz9ZE5cM1rENJo7V9CJ+oB/utnEtTR9iIroX4KOiz+6KxQ4zP5Cjovk uELVIkWY5tOwSs6HdnFoQ+N0h9+Ju5hGyL14InNU69QZF34uL6ZCEyBuJaMgcx8xXj5t 0NdFPTekO2nBCa5DghQoTD8g2NZSKiHYvqMnc6Qd0fQOhuJOA0vdWtAwweEDsfwMpLDT RXVIOIGoBzcc2e++Ft0ElwNIoziABwq7+Oe72XEYwDMKPCfWMx5EgaVl+tuS7htFWhWV bnQw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Z18ekuU4; 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=1727630878; x=1728235678; 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=agx7+u85kKbQbWiFSDrhUgGvq5ZsT6VSyiljEga4kgM=; b=UcxMvCOPQeviVFclQ0bGzYtETR897vMr7SMvUIppMouaCBG/a39y0C7yquvJMBsPx0 RKhcNHldEJ22iHmBBMjHCgLjMr0wOI1ox3F8QNomPWvJvMegG5H8g8B+UtoeG1LCrC29 iIhDmrsrYnvIsD7XFTpkEIK9q1yoGCF72BUlw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727630878; x=1728235678; 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=agx7+u85kKbQbWiFSDrhUgGvq5ZsT6VSyiljEga4kgM=; b=hp7VNezK59STG2PB26TRubKSUT3JpqBMe2x83JOETIKNBekYar5Puy1288K+zg5Y1c JLNw0ddVU1PISEvOFvgEuM9kp8MFG8nklucCS6E8hwX4x8cPuHxRtf5zeGPFODHqffkM GG0IF5k2uon5+TUc66KPZv8KfNIG5a9YYJYT+e8mOHRsvVuqnAxabkGKxiPadIFwwmKT rkLaWraewYDdU5nR+5o6i4RSrHqMB6D/OdmMFry1SdCVktilSoTwEfGt/hMrpJlL7IhU z3nIun5msle0SKKaxcO7QCeQctMmQo3tnhpplqD8cLkB6eOoHEoJbREWppaHY9pLACws ewvw== X-Forwarded-Encrypted: i=2; AJvYcCWcfiBKl/TB75tu3L2Gkh5kyB1MyS5rhmZuplLNyHpGcJ7HRh//0pV9DDwGGi25YCgwFK6jVF0CUDkPTRJy@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz6wh5D0bFtcQmq6ITF19W+QQpXU4G3WS47dVN7aRlhnS73nz3Q VSqUdpUrl1pxNbLS6YGrNGX3EszW9tUXWDhcEZOK7K7gmy5JToEF+S+bZQTa/lQP/A== X-Google-Smtp-Source: AGHT+IF6gJLQt8ZOmF1IYTSyzbvalTUNjNPa+KHwtcDglys4+OW/T5s+htka/4lqWJ2pz1/oYGBuYw== X-Received: by 2002:a05:6402:3893:b0:5c7:227f:3990 with SMTP id 4fb4d7f45d1cf-5c88262cb6cmr9081158a12.31.1727630878628; Sun, 29 Sep 2024 10:27:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:26c9:b0:5c4:6c19:f742 with SMTP id 4fb4d7f45d1cf-5c877819335ls1502805a12.2.-pod-prod-02-eu; Sun, 29 Sep 2024 10:27:57 -0700 (PDT) X-Received: by 2002:a17:907:2dac:b0:a8d:6921:e181 with SMTP id a640c23a62f3a-a93c4921892mr941732566b.16.1727630876877; Sun, 29 Sep 2024 10:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727630876; cv=none; d=google.com; s=arc-20240605; b=E4YZm12hz0a+bZaVDJEf0Aim+sHwD++4Nk6PV7sVLFgbgTZpdVoVuV+LVz4jhhj/sT C55NfaKDHUyq337MgN4sEA4qiX//7jk8GKsOhDVxCl2ywni267CeOj9PE692oi2ce9pF lbVcKtmCy0VTVotAhmTYmMFmBWO4esmcaHeBMcPg3ixkQfHnq7ofWKyPCUM9GAkW2ZD8 A0X4ngN+XibTtuGjTfyutIbY1GWQLc5yiSAc/pLzRt5a05h0B7YH4ek82HOHfXhcXb2N 8oeTyJNv/YFoLqlxOfrfu8utq7rUcRKlTCwjltnsmaYg9z7DW5D3iKk42DY5RDYqvFqX lL7Q== 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=y0iBp/WuiGBbwsQFlblUsJsTztRh00umfcE38KK4N/I=; fh=u/u80m6tBSaxW7VWG5AQatIbYzkIAnRGhZp/RTASK5o=; b=FVNCrVW1F3fR3uhFXlcY78TklRyxlb8JGFe/m0KwTeVQnGdiZVTCYNH9g1BXy0/hoV zc/51VCBZASVwp1jQbDKHoMzl0H3vhKywhohwTnajpRBcnxvOa9nv+SismxaVjqsrSYP EYfHVFHU/D+zOudfk2zsFZ4Ge4SgdXghKvUCwQ+te2hMfqa5fbYZyJehW4HlD9dAYSH8 Wlb4Xd4ddd3z742/wABczHv9vhMZg6fwDSAcVb1CWk2bBRH36rbKYHTudVLG/2CDntOq xJRUgs/kyTtVK1T6B28trN+vhnLB3MkoIVF/ameawBcTE6huRpCztQzwLEM6g9Zu+aXL Zzjg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Z18ekuU4; 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-a93c29ba240sor200292566b.15.2024.09.29.10.27.56 for (Google Transport Security); Sun, 29 Sep 2024 10:27:56 -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:6d20:b0:a8a:8c92:1c9c with SMTP id a640c23a62f3a-a93c4967869mr949147066b.29.1727630876427; Sun, 29 Sep 2024 10:27:56 -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-a93c27776a1sm403176866b.8.2024.09.29.10.27.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Sep 2024 10:27:55 -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 v2 6/6] clk: imx8mp: support spread spectrum clock generation Date: Sun, 29 Sep 2024 19:27:16 +0200 Message-ID: <20240929172743.1758292-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240929172743.1758292-1-dario.binacchi@amarulasolutions.com> References: <20240929172743.1758292-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=Z18ekuU4; 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 --- (no changes since v1) 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);