From patchwork Thu Sep 26 10:48: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: 3521 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 246043F9F6 for ; Thu, 26 Sep 2024 12:49:02 +0200 (CEST) Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2f75ea32971sf7875011fa.1 for ; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727347741; cv=pass; d=google.com; s=arc-20240605; b=DLw3noOUlti8Ku9MhURD9b6Za8kmtHEULNK/pak42XUvfC3eY931v6D4kO0bVU8ycB zg7jKaf3J7r6LZtn2cfO2t/LoIfUEao41NgPhOHMiFJb0vnOfXzM5H9MO/28XnLZ7V5M /fA2UR7J+wqy+A8eSZmgqaoNgsU+9EVa126Oi86XYotuQanltzriuIrOyQxuOdzySnma DhyXLvvZWVDwlVDEidiNMOkMTWpjuFCiQfkILqDIBszD/FapZCKuwtmgXhqJ4GbtnUvE SqPzYYzwKoP4PgQj0J/Unn76cIu9DioVlLLK0XKqkly5afhk7gbV6PDIUvXAkXls09y6 sS4Q== 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:to:from:dkim-signature; bh=KKjCxc9wOoF4nBE1KmU1wYzNDV/fuglG12YjXQqIsWs=; fh=G47q1lKr05LM8hwHmclnZ8mTRXuH4wXmLzEeOpClKIs=; b=F4ZfpTwY8+Uv7Qy7ySXgpDdmKkF17pzvN21AWd/Gvxf2N7P1OMc3FGnAqGjI2h6vbq 1NN8UiTjdr7g4XWnxCZ+3hn14pNHDilSBBCQR87QhkfmoacoKMumL7nzQJez+nSwjDTH tQIoQgrms+n5PqlDVNXcB5pZKbl0cWtwX0k89ZiWmYZMaMoDi9f2QnUseOiMYhlmf4iK MUp8Ww5ZjqNJm4HmRZA7+5jtxFHHyARXhx5QuKEC1qSmJzomEsYCy2gtiobtTtiArJI9 echl0oRBEib82fG9u+5qbZDVGECmzEEC0AluRa9SHs44vgiyBUd0KNSI9LQF+iyKZ1lf 6PIw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=myXZBuYb; 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=1727347741; x=1727952541; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=KKjCxc9wOoF4nBE1KmU1wYzNDV/fuglG12YjXQqIsWs=; b=fZ7K1gGKDaeUcfpX0LhI2V4p0mPl+bgY9WZMf/Zjo8LDbavXxEd2NftNv/05xAOIQZ wd6bUfoWF0CzbY+SkhA1HamiplmlcwUG8rYdsrOQ6S1vjFTshp3iVvHvIfhLR35Kuvhq uIL1CggB64ZjV3F/Ud2mgeyB3XSrvH3AnhqEc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727347741; x=1727952541; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KKjCxc9wOoF4nBE1KmU1wYzNDV/fuglG12YjXQqIsWs=; b=VRWLFmhJg4NbtMATjdL6KYfSjOTq5ZHB8Gemw+m6IyY7rajDOuvDSWl1j8aO5jCPZO IOFg2ESLjSrkhd6SZpQvw1TONsl70m3rBsvt3qURaSxGBcgKhq74ErgfE4+M7L6e9zkN ULzVuhPCO/phxbXyg76BGoSiLwney53Z4Nu7+pt82WC0GNz4UJEOc2lsGoubpJGt4OhW oaeRyYJGionx9lHQdkfIDBceeUFR/TjtFX7A6eya7aRWBb4Cz/L2JWxZVedi2tBo8rui yWV5eZDEse9hW6TFIs/ArjCa2RBVe81nDtr8hsdPXxrrF+mEzh9koX98tLh9peXLE0NP fBNw== X-Forwarded-Encrypted: i=2; AJvYcCVElWH5Pbd+Xqhbk7LwLerWgoxgIV0lV8yF0BgOP8bHle4oycfDNHxr1PTVH7abtqnfVVCqT0sJFSS8K8FE@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yzpu5Ri/BZK/wTXMuGyjzMD2+RkY1QX78jgfsjglvd/1C27bqrx fZaAIyZ4LSRVHJ3Z4nd5T8u4Z5E+vfE8iHliDDMMDTrdHkChDD8GGONEj07ZuumDwQ== X-Google-Smtp-Source: AGHT+IF/myJWAyhiGPjz0ydBV5ES7b4wH4/uYfS9ZThIQvn9gTYGP9/RGqYjPZ6+1gJv3TM5W8S/VQ== X-Received: by 2002:a2e:74f:0:b0:2f7:5e7f:b4e1 with SMTP id 38308e7fff4ca-2f91ca4643bmr29836501fa.30.1727347741063; Thu, 26 Sep 2024 03:49:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a2e:1f0a:0:b0:2f6:6185:385f with SMTP id 38308e7fff4ca-2f9c6bb36a5ls3575061fa.0.-pod-prod-04-eu; Thu, 26 Sep 2024 03:48:59 -0700 (PDT) X-Received: by 2002:a2e:be8e:0:b0:2f7:64b9:ff90 with SMTP id 38308e7fff4ca-2f915fc366bmr40772701fa.9.1727347739175; Thu, 26 Sep 2024 03:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727347739; cv=none; d=google.com; s=arc-20240605; b=aFLsrX0iewgWtR9wIUp/kPu24EFakykm3m3ktXsIR3zpCtgLlDnQMfYUNG6qZWp/eT QZt6GOj4sZJSaxzf3HARqIMTsGbr+hHuDhrcQmdWRcdmj+WT2LtFPnmqzrrxuxDsUTj9 iXvD6KH0MB0qWtCo4cxhUF+8o7a/sQDWu2qAt9V84taBAMhHCrHCTvDRa4W7Cvs++L5S n/cIXzxOJSxSSkxiC+t553p4XoDsydHbbkahMQLfe/bmOEI68YGPrH05OlVybD0T0rrM LTjIX4YErhiJGPwhssITGxStVFSpcTIKR6E5pPF7yW6GExnhvDAWJoNAPKpridL5jNTX 0lnw== 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:to:from:dkim-signature; bh=hgBA2YgBzcVdnVEoc6s2KOvaf1NpbuG7MmZKT5HNBsQ=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=AMBg0q1mLdIPMLMwZolSTduytUXZngicdJnYw1YNXqpUZ/0/Of2LN/3eAtwt/K9d83 e3O0HGU69cD4f0qXV/6dLc+6r6BaSnITNCCwXvhEMQVrjQb3Hshm6uG0HWc7Kn+i8RJq auDFL4tXRQDxsXCHhDYiQAp9WMqWzHuRI14rKHNNLko8y/upoLN/rUejTQA3zB5anpqF MdEStT4ygoIhK045cQcXrtdhAeimML2UiKd24oCSJsh6eu2IRnwOdehwRKVQC0pM3MQo ybT3S2P8U1SUIuHQDkIptrlIPUvenbqKRYWVpupyPGNLZRQei551WIflqF9GWllbjBsh SLvg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=myXZBuYb; 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 38308e7fff4ca-2f9c85bc647sor3222731fa.14.2024.09.26.03.48.59 for (Google Transport Security); Thu, 26 Sep 2024 03:48:59 -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:a2e:130a:0:b0:2f6:5f0a:9cf8 with SMTP id 38308e7fff4ca-2f91ca68592mr29419511fa.39.1727347738299; Thu, 26 Sep 2024 03:48:58 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a55336sm43314755e9.47.2024.09.26.03.48.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 03:48:57 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 1/6] dt-bindings: clock: imx8m-anatop: support spread spectrum clocking Date: Thu, 26 Sep 2024 12:48:50 +0200 Message-ID: <20240926104855.656121-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926104855.656121-1-dario.binacchi@amarulasolutions.com> References: <20240926104855.656121-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=myXZBuYb; 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 Thu Sep 26 10:48: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: 3522 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4AC523FA4C for ; Thu, 26 Sep 2024 12:49:02 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42cb6dc3365sf5781225e9.2 for ; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727347742; cv=pass; d=google.com; s=arc-20240605; b=GJFPgS4FD4b9/87Fk9Uv6Yn/W5yN0u7i3pYWWc/jSQrCMXXNJ8jpLgi2vfC+DilK7n YIAuOv5b3UQ0NlOzbWIk6qByXezzEXgNyDUFOVL4VSKC2jFrmEkRAIoSc/K5PQZ9eyXR 7Va//vA56QC7ahOEp7XQl359CQTErt1XGYnqcp5kYnmo8ke1UAaRRkmkKEJQEDm1wV1H cyd3q+T76ApF+jmm2SYUUjZ8MlVco+EHpZAJeW7DQud6E4U6Hg82I/P0ejIaJdKE049C 3nBQYs7wmDBZQmFTAxsOD95nc/iwUw0BHxrV3Sgn5+KeT0khxnkXKJg58EMlexFet6cv 3MeQ== 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:to:from:dkim-signature; bh=R8keFJkM09Shp3yIumCQnXaysOStg3Cn1bxnwWLdejA=; fh=uCMsz/MoD/lEcAZYxud1ghI8806lteg5xZuWxqbBBsQ=; b=B9DNpP/1pnBX7dQ24J9xCewqAplsNg9jdAzVixwjpBvLHZpCEQjeNFAUtmZ96PphQw g9i5kfRn4n0mFZLQ8fzomcw+KiLAMdrAEx1VUE0YT1v1KQ5L0ef4FF9FNIWxUlmiy4Kw blb3ToEx9wVD7ayqcPN6Gm0CxbQ3qRHLEK3Alg+MnOpiV69lZJOrU1CmeWoyp80jWV++ y/QvMyoeJVlSdKfrux1YpoJzCAfoSbSNY/j+psUMluEC1fZrV1F2Jc1fv2WnhICCR3h5 tCTyStASVCYMgh2Jro4GBbbe04tHu1hqkfDDQGbN1SdOU2qPUIQa/odkJj1evtjOEux9 vORQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AEtXsSAT; 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=1727347742; x=1727952542; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=R8keFJkM09Shp3yIumCQnXaysOStg3Cn1bxnwWLdejA=; b=Ccx4d9n0ouN8ntKfWWcvRf1FrzVS5zeN2Q+Arspsi3OFMxOrMYXAo1LwuOjPXWlwrq 6PgFlmjNplFVLYacAwSf90+DB6uto24VcIP6Fia43rvDvRzZEoeoOtUX1Z6REJ/CiSda 1xSA3eqVrOLmrS6pt1ZUHxqsbRyMmxxYLUt60= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727347742; x=1727952542; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=R8keFJkM09Shp3yIumCQnXaysOStg3Cn1bxnwWLdejA=; b=JjupMdlkhfH4pnKUFQ3MxTgM3apsrRLsQIw1bGF5GPNLo65bs+nhvFWIL6g9/lskFV m5TKdd2yDW91ydXTSf0AdHUaAyd7o5q8BRQbTFVxai4pcK/9a5RqOiYd61f9BklDz80e /RHKnUsya+WUnJfvIWI4oJQaBdDXB9ubyVRec2lXwZniijkHqO6t7KBcbxNvEHF58YDX JJGe5dgv7Ji74hJZCCapkPsC3HPbhjiBDALcB6KPVB3ZyWlyTJ+Huz/RaRxDGs9By3qP Z1adto039vh64gk3w21DVzGcJ1u8aEVrnsMi0fN3DrbXPCWobjmuoIl0PnfOE/bLxQ41 14LQ== X-Forwarded-Encrypted: i=2; AJvYcCWgWdaTu612j9YAe5+boLuZqm4Iilfhrxz5w82y/b0hJIEi3aUhtiEPHJxMU+aIn8duA+D0DOp4sWPez2OJ@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwAZtfQJpnELO87POZuTNAEid7cQYSPnW8RhK3bbzrp5z851kiX piLfHywXptMfKNvrvUWDuPMo+WAAmwFeR8TlDrB2o6eRFWnHaWV6as9u6eR9oeFAuQ== X-Google-Smtp-Source: AGHT+IFgv8cJDhLvXU5+JkgIeE3PsKaN3QoACfjSnnvm5nJs5vWFcl9VeKpV+WWXJHguqlrdwCs1bQ== X-Received: by 2002:a05:600c:4ecd:b0:426:6455:f124 with SMTP id 5b1f17b1804b1-42e960af41bmr49100155e9.0.1727347741714; Thu, 26 Sep 2024 03:49:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3b89:b0:42c:af5b:facc with SMTP id 5b1f17b1804b1-42f522289fbls2442545e9.1.-pod-prod-07-eu; Thu, 26 Sep 2024 03:49:00 -0700 (PDT) X-Received: by 2002:a05:600c:45c9:b0:42c:b942:1bba with SMTP id 5b1f17b1804b1-42e96144c66mr40459525e9.27.1727347740120; Thu, 26 Sep 2024 03:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727347740; cv=none; d=google.com; s=arc-20160816; b=p9QiEoPn4QKHqzktKwkQW/fmjFEhyB+X0d3pBm1t0wYLsihbigxR9BHeMLpUkbg8TV yCjJfzlgbVk//vcfR/1B6Dl8dFTMBD0VCtSOSx5TOBR60jk9pJ6+f1FKlaJIAOj9IkGn KgDjgTRbEcuKA3ZLlVSHJhsiYV+KTlzKBt/Db7d3jg3y+TO/5r0+ERe6giFnvymJOPm9 dFl8anoqdgFN8RiLgQXbt0zDRtdVbUNWJIm6KMpLygP7BJH+VL6ok7n/w7QmUFHf1KnD fI6FTFTxVEp5z58BEG+VS3wmEqLXqCPv5UU+QAk7HdtIRIJbwCfl7dwrFe8hHoL23Ubq ZeNQ== 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:to:from:dkim-signature; bh=k379zOY8JpOCRdB0yzVh9VgxfCdVDSaVvSc2yhV6i0U=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=0XAABMAd80wDB7i6Ce3EFzY2Bk2roOLbGYJsn7QXJ0TlT04o4Q/zH1ZbVfs8/z56hL 626D23owPYI3M3oEp1dlCPiODnDhlO3eM2jXwrfDpP1PKxkqhgFCLtyOzTNUlECw2p28 wYZVTseml9lIJX243fAAK2W/emGl881Cu22FmCyyVmAwJsBy7fipIDfFGsMTKDz53+Ym DSCmhKG0W1AQ+V+sUT6N8DALGfGkIxLklGlZHo9omHEqxAjip/XmuWswlu12bR1rWxnC kou4taz27b0b6hcfV7PXB+7axZbMjnpg9nPwYJH/AiMZGNb6YdWt4jLNJEejl70LbmZp JVcA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=AEtXsSAT; 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 5b1f17b1804b1-42e906cf171sor26009945e9.13.2024.09.26.03.49.00 for (Google Transport Security); Thu, 26 Sep 2024 03:49:00 -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:fe06:0:b0:37c:cd57:d92f with SMTP id ffacd0b85a97d-37ccd57d9c3mr2062607f8f.3.1727347739289; Thu, 26 Sep 2024 03:48:59 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a55336sm43314755e9.47.2024.09.26.03.48.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 03:48:58 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 2/6] clk: imx: pll14xx: support spread spectrum clock generation Date: Thu, 26 Sep 2024 12:48:51 +0200 Message-ID: <20240926104855.656121-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926104855.656121-1-dario.binacchi@amarulasolutions.com> References: <20240926104855.656121-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=AEtXsSAT; 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 Thu Sep 26 10:48: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: 3523 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 DBAAA3FA6B for ; Thu, 26 Sep 2024 12:49:02 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42cb236ad4asf4755665e9.3 for ; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727347742; cv=pass; d=google.com; s=arc-20240605; b=kVcz1H50Cu9662IFyops0HwQ9eZFGrrduYyWjut03p2jAWcqATYWdGAaNosOX1NizR PwmiqJH34g3Zvo/Lg6dRRM/PgXwIgyNW4jnzdhHzSXX334PR44GRN76dyapp4pQoO8Pt 64H62THJvQnrSYo2udEq7P1PVhBqWF7RUVS1u1lcpLIp/1Xe6Tb/ytPvjpcKGGpu+VQk 1Y/bN+okzKMRsYSyfFbnZt/381fd3N4fzZZ3ayYVGNV1py2f/ZKeMDsB0XoscilzTqOB jMu5evBH8NJznujf0JTsmr5CCjzR7w6mB5m3FyHax+o6kYQCDdPlX5fWop/90TmhsFS1 hVYg== 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:to:from:dkim-signature; bh=Ig8TG/WROfQE3VTOrJ0pUmjlH2SjxILxAMTTEloFj7Q=; fh=t9qN/NylXtS16ordiKRInwYcAPWW4guBvNqLBZrlHLI=; b=KXmpyLEPIoV1vIMBwfNA9cwkCv4KfutdjYLPuEWrwAtDEwrSJZDl/djjp5rXEOwL2U b0IusoQnPLyJz3kcuuqs/i0tvOxF3GtL7+rZ+5SZQEfGiZNYOMkkc8xN33UPgl/f8gdh d+0ODvODuWe6VskMUdp4E0fszrl7oYgJoEl+QBBbYecWL2amCgGAvLN9msdCIYFuXFIz s/ge17rkiWcA1YZqhhKzOjXSCBoxhkwCWmXNmgt+84tjOTNIxzV+xIJDob4o0EFd+i1H myTFIk4dIl/alH98VkIlrsxNs6rJRESzCcTTtwY/2uLWTpk9ChoxZXqziuKGDcOCaXTL aUSA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=o6T3SSgJ; 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=1727347742; x=1727952542; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Ig8TG/WROfQE3VTOrJ0pUmjlH2SjxILxAMTTEloFj7Q=; b=I/oehOWzHDI00MsQFAR1K48AISz90gIkTdDtb+Mpm43bepJNugMmhxj/Qd1lZwlXAI XYUXB9W/O+OotCEKt2BkctZ94S99S9rUYH69eg/GFG5O+mEDxTC5sy/j8SdWD/qI5bnn P3G1J45ytDVRfnp6jYYn92NnmB369TKiAta3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727347742; x=1727952542; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Ig8TG/WROfQE3VTOrJ0pUmjlH2SjxILxAMTTEloFj7Q=; b=o4nAcCRErs7whIGKTA+mfGxxa4cCl4gsAPOMuT22yz3w3xEbjvu2boRugfwuq1w4lE 9eChnzs14joQ21vFWjnYRPYsyjr8bkj3pT3xvmJuy/XzmBVTg6yoS5Rpvz6j7XxqOagF zt17vGMzI50Fmxrr5Kcg8alkp5Mr4sBZTceHF2CKQMc+wMJXimCOtPFHLsRYmzvclMIQ 6QEcHl+EQfuZgLtvAgp48T9L+JAj71jYb4yMnHLnNr71utGVfPr3aryYv8EWsRRpqtPa oBL7mysSJeaJv2Zmi0gdqYtqQmW2A1saDo0Lfqfeb8y1+TsIksBNvCTu/USTmVZ9+F74 Kojw== X-Forwarded-Encrypted: i=2; AJvYcCXKYxByCnx6DRMdm6dcEFQmg+a/E6Jb97ImBrkCF6H36WxdvE3lsxG/1S33iWoZriW8MjeldaiaFhIenZpR@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz1hJiUMArvD23r8+4K3S4cLjtlZWXkJI3Eg7leRFe5PR+L5aFV yAl86G41oPhR+mwFjzudLbjzBMmOn5UQNbdsdj1ckuWJZx/foj60pKhXQkwmLMfBzQ== X-Google-Smtp-Source: AGHT+IG55nMicqo4ZLR6xpfrsRypzO+ndcaX963tarCuZNYe49bFX9r6Kt3OMJLcPAx2YijnTOTFaA== X-Received: by 2002:a05:600c:1c26:b0:425:7bbf:fd07 with SMTP id 5b1f17b1804b1-42e96103a1amr37816105e9.5.1727347742422; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:2712:b0:37c:ce3c:dfa2 with SMTP id ffacd0b85a97d-37cce3ce04dls204935f8f.1.-pod-prod-08-eu; Thu, 26 Sep 2024 03:49:01 -0700 (PDT) X-Received: by 2002:a5d:6a45:0:b0:37c:cc01:f7e with SMTP id ffacd0b85a97d-37ccc010fc8mr2012825f8f.58.1727347740926; Thu, 26 Sep 2024 03:49:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727347740; cv=none; d=google.com; s=arc-20160816; b=Y5w6bY9GoTcqS3KuKWzl5i4IlDGooNFgp8Yvio00TLuMFLhcyHHDqXGGcLzIIZ73Jk HzM1QR/SwVfBNeqWBE+sZdUDN34iOeQ52HGmVpGfOXB5dUEQ3HmnVzW9boycT3qUU+nr Zba3Evg9uMweJFWeCcaDFNBdgZHZERoLUz7//LIMNP1dj/DS9COSq/xgCclOCPUJDUyJ zvw63TaZZi7RRi5CzR6PAZc89VVdimizlDm5oLuNv1K3ecBgCYC7PwQqCO5Cx5N4z96z QWpg9jKOopOcfLeorkY4Il+Fdy6eNi+JzLxaqOpg2KI0P2Q00IiSsMgDApigsxHrLtmv z2FA== 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:to:from:dkim-signature; bh=3VEkdzuU9Qc4GQ7KPC08t+6l9YpInoSw+Q79uFbywaU=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=1LXceJZ2GEDbHYoYG/9jJPy1nVP2IasT+cThrNuYhPx0UwhxpnRlqJ0a7c1My0VF6H aCYjTVHSRvbIJekW8ai73XZrQCi88z0m3F6yVApAUX0UxWisDyeSpmDrVxnrkT5SSQ41 2eeZjj0VEkWEE0ELqIsF9peZJaV4D2ay23z/SFLeP03j0r7nzYioczyPDZB0HjNWJvpf /P+ebpxL5To69qNOwEuqPLn19l1sG5x+6Nh11JmnNbtznnbsQNr6vUsgKSptlhUOxAiS myEeKJJz8h0y/a2lNtFrPfsBAaMnMcL8GxujYaGnOp/mn8tsfmdJXn82Lokef05QjCKw +E5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=o6T3SSgJ; 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 5b1f17b1804b1-42e906570dcsor22620735e9.0.2024.09.26.03.49.00 for (Google Transport Security); Thu, 26 Sep 2024 03:49:00 -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:a05:600c:3d05:b0:42c:de2f:da27 with SMTP id 5b1f17b1804b1-42e9610381bmr39911275e9.2.1727347740288; Thu, 26 Sep 2024 03:49:00 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a55336sm43314755e9.47.2024.09.26.03.48.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 03:48:59 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 3/6] clk: imx8mm: support spread spectrum clock generation Date: Thu, 26 Sep 2024 12:48:52 +0200 Message-ID: <20240926104855.656121-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926104855.656121-1-dario.binacchi@amarulasolutions.com> References: <20240926104855.656121-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=o6T3SSgJ; 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 Thu Sep 26 10:48: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: 3524 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 BBF4F3F38A for ; Thu, 26 Sep 2024 12:49:03 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42cb6f3c476sf6214065e9.0 for ; Thu, 26 Sep 2024 03:49:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727347743; cv=pass; d=google.com; s=arc-20240605; b=SSZEPXwm6ZauwfWmAiv6jxuCZcFTp5JAO1eUWkygUXFHv3bxoq8KdqlFtRPmoLyuqy 0Ny4hpC785FzTIY+UKkTSi18sXBM08XT84unSIm07n+tqfts/okZvBxvPW4aquIUTo6Z B8/v3to3Oa5URAEXo+d5YgznO/H8DI1NtI0rdxLETbQY3MjAXnu7sQCqgmMARkBffYRh Db35IPO3ao95Qqd3/eZII/7Q5wUGbOZzDLTbOAn/hf/EvRNnMDRHAWqTl2LKQb1qqLC+ xXRecBdG2lVuBniOosbd/LjtkTFkEpTO/mWOpVunqXdL12i4Y3BktJDw4tbNL7g/T4DM gjnQ== 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:to:from:dkim-signature; bh=zq7nlSstzM5H4fQVlpl3Vl51/f+q168W1Jhf+dpR4z8=; fh=0/IJABBzyyyyAXTc/gi+qoebGMZo9PbuEVeDmx364V0=; b=XJ5kHJ4adpCrep7ttPYGV6RIgh8ygrBQIbrmStmfaMiJLCJLhyb3a/4xhKOmlD5hTa E48d0F47mYr2JI/43aCZ6ieFR2I/f8nY4IHzKBLh7ZTz084WMfldkfaWe/CZJfxW3SsQ HWmUm+X+EcvA0rMldl+MpGGSPRevjWtKAsAbaKDcbESw1kL+DQloVVbFmSI2TnKyL0MF G8N4zBHYuyNPvUKi1hX0JeUQIzY+6vAB3csDwwkm/OcsfVCBzmNY7gMH32CSIi2e/JRH u7acfQLiN+XYLoC/ow2Xud6l3Fz5kW18PC2a5T3I18GF/8uqK5xDiECTMTQtFKbd7qu8 m7XQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MiFwpr9p; 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=1727347743; x=1727952543; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=zq7nlSstzM5H4fQVlpl3Vl51/f+q168W1Jhf+dpR4z8=; b=hPFRgpu9MN9WOctDhGCp5CP0bL5s6xJUybD50y2QWYjibmhVLkb6a4qm3SVGGsL0p2 SN4l7x6dRggmeuneHChuWoxhm0SRBv5g/I7DZthABtMaCwYIgmagZg+6gnz2FeTLLFXF r0ck3zpAnq6KB7+Z2Obit01a9WTR1d2GE6DVQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727347743; x=1727952543; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zq7nlSstzM5H4fQVlpl3Vl51/f+q168W1Jhf+dpR4z8=; b=xKDXYaCBGvJubbRDfKPtvD86gnuQ6KsUcWpHGn0tLSybAClc/Ci8wR+gYuR02Y209o 1JN4yIU1oyilOpyZ1jnbpCEY71rvyCjBh2QLTwLzEev0fcMtGyBc0zZ4Q/Z32vcMFPoa gL7yyyXn1twokB5uHFg57ERTT10n2ZDnNO4n4C/uX4Vz19NiTJYSCtVVR1pjutZxrUII ZwnC4OGXvsvvhL9XwYBJ8xMMEHn7A5UuUMOBLQOGYI9BQKZvZ0aIN+Nx14LF2lKQFJV4 tTx17uufMd6/tkdtQ/Czv9dNH21UtcRpk1gihsOLhzwKv9cNR656x082MelnK6QwfQOY VKpA== X-Forwarded-Encrypted: i=2; AJvYcCUxoq6MoQXvJJwA6S9xMK/IaXkEHIuxjNm0Mi6OEA0BcGGeXFkQVuvtRlLGfPYAG5nREP48dtFJEhzKegbm@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwNVuqgThqg9kmWLFSUklcL8riGqI/bVprj4j9IP5fbPATScJ+V AJb3P3HGEVWTJrVbieqVOrp1FmJ9s8BzubM73ReCfi7QtB3fQ7fciVfhTHkXCjwsKw== X-Google-Smtp-Source: AGHT+IElLGwZSaZjyJAVAREZrVQnnZqorQ4pEjDWV3W15ZVmHfdFKCaDyNvUOKBcqZzxwLRsCtF4hA== X-Received: by 2002:a05:600c:3b1b:b0:42c:a90c:a8a with SMTP id 5b1f17b1804b1-42e96115d55mr45491585e9.21.1727347743369; Thu, 26 Sep 2024 03:49:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3b9c:b0:42c:af5b:facd with SMTP id 5b1f17b1804b1-42f52229b85ls3913215e9.1.-pod-prod-02-eu; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) X-Received: by 2002:a05:600c:1c05:b0:42c:b63e:fea6 with SMTP id 5b1f17b1804b1-42e961362e8mr42955335e9.22.1727347741884; Thu, 26 Sep 2024 03:49:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727347741; cv=none; d=google.com; s=arc-20240605; b=cpLbF7Qj/HfkCfHM02W7u6dXQ+PniXT69CgOoent/N/0A3CxF11BhhPRA16hVJeoIe i/WBuxxKLsLGOq0LZ5kq+1foHghLGSu1R03omCc8qWc37uwjg7pE835hPhcsxunOlmdY +vLHAoteL/h4omTgwgCd77RD/tCUJ7Yff6ONhArZE9njIxtIHfDFaJD19uu0UlQcy4UF gpBI4uNlx40FawSIC1aXAWePOddEmzJI086Vn40XIUirSaz5/l3CPMdd8whWMI/1vGKW wCepF9Q1T1ZqR34NfarGV1OP97ltOZqI3w395yqu3ZB71J+u0AMB3Yi5blKnuyz4dnUt C9GQ== 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:to:from:dkim-signature; bh=8yZI1Cll/jgswR1C/8/RE7gUqkNMAx5u3jKxacFOTcY=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=Q/NfU1vTnPsJ0MRdMdzul3Gp1L8AhF/SbXd5lLUgkPs1zQa8cgFKQKJjDwzIXpaqtd iYffg7+YwG9b2wAkAXwCdwELMZFgLkJSW7PlhNgAH1/UgRb2W3VcNxeZawEeGKUja6Mg PXl8JOklwqOQhuEBqX+g3oB5AVE1GtpHimDuEdoTF+Mc+UtysJ2Nn7uQUWbDF1NIBxIB NAWJpABRi0aDKXg6WGVJZPkmqv2tLwIGygLfrrn1O3F7Zm6i8o7GRlyvQj4cCV1nUiQZ EtHB+sxHef7MKZIIleJvNPVSzpjXRGrXAIWrko1T6N4o3PJ7bVaUD2G11Bt9FHQOXd9p 9fww==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MiFwpr9p; 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 5b1f17b1804b1-42e906ae9ecsor26309265e9.6.2024.09.26.03.49.01 for (Google Transport Security); Thu, 26 Sep 2024 03:49:01 -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:a05:600c:1688:b0:42f:4f6:f8bc with SMTP id 5b1f17b1804b1-42f04f6fbf6mr37225345e9.9.1727347741147; Thu, 26 Sep 2024 03:49:01 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a55336sm43314755e9.47.2024.09.26.03.49.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 03:49:00 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 4/6] clk: imx8mn: support spread spectrum clock generation Date: Thu, 26 Sep 2024 12:48:53 +0200 Message-ID: <20240926104855.656121-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926104855.656121-1-dario.binacchi@amarulasolutions.com> References: <20240926104855.656121-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=MiFwpr9p; 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 Thu Sep 26 10:48: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: 3525 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 C7BC0412D3 for ; Thu, 26 Sep 2024 12:49:04 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42caf073db8sf6811265e9.3 for ; Thu, 26 Sep 2024 03:49:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727347744; cv=pass; d=google.com; s=arc-20240605; b=HejyWP17LenZua7TZ9e620zBCgUKW0CTv83CvzTDDitstQ25LxZlgWaFaYfENKClrV AH5J00E9iCAxvdJnItajhVHjdCTMyAN2UZ3uSMS5I3pOP3i/JpsvaCh/7u7OO5sMV8a2 8J5ETOH/zFT8AgA61LLaqai9U03abGXHIlw7FuygPl7np8kkQ5YFqY5PjXYt6ftqanDA T+ubw6tji3B5G2ZGdHtMQN6Mll9VzGi1AyPqa90Wmy2vSzsRg3dXViKihC8bFMQpg0cc c0ShLaRS/nF1dSCv8iY1Rilm2ct7I+puKp/3sgtZ5OhKc2lOCrbltoNp3mTw6QTyGNSb DarQ== 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:to:from:dkim-signature; bh=wWH3r5nyj1A38s699399Zsd8fI1nZpcg4gkM6A9Vx1Q=; fh=gp7P/eWWEh+/WQ9lSaT9lj6BNpuYkTsibfYPp8PcBO4=; b=bxenwhzvN6f3SC6043ivr7ZVzNr5ZkQPwqWK5yhmINI7Lee0SR0b174CwSsiFVO8yR bRG9sq2R0OFn8TCA/lhTPRDh7xeQE1ee8WdAcQdD74FEPv4kbkYHNEX+amNmKPsKdgPE A3QdED9pMvwZYHLzWol27pR26cKmRYU+M563DUpBA2mQmSi/FSu/pJLzTmJDAuiHDp3B TCXbbef3eNaHhqtd/N4G3uJZmHR8RWv9dg9GcciKaMmWUNianqjYTGf4TIU529PKftG6 KxDcNRxCa8bKAN9GUcMvuSDXEdGIPHckmynMjdKC652EQsYYPPNTwbDZZbC7HBtfUeb8 mXdw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=m+HrKMfb; 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=1727347744; x=1727952544; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=wWH3r5nyj1A38s699399Zsd8fI1nZpcg4gkM6A9Vx1Q=; b=c4FR2HpHs4fBuJRqPOrM8o9HJx8D8R9JDigk3eJa1Et1IpHVbkge/LaM1D4guiUGBx csZt6NEgRoidELaRS/J/1uvwlrwsj0zfxIf08O1YjqwN8nyKIv+vzEdt9yN2E1VQuTmz TebkXR+Zjh03B5+SRIl1D2bOdGowP+6N/4kxU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727347744; x=1727952544; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wWH3r5nyj1A38s699399Zsd8fI1nZpcg4gkM6A9Vx1Q=; b=i1fIiTV1oI+wfeye/uULOd/luwnWg/rfSdR3GXSmclZ6wmYYdkZQ89esG71DMtECPJ fY+h3TIpt+wCvc8nYT5MSzORzSZZ2IVVhtCWvXOd3lyRTe/F11ugvHx3Mo17N6pnqpCw PwL4Ox8BVr4j5YZmMY+6TnHPW05/1i5XGznyjMq8z26sdCHA2htsQ6traJ9uBJY6noya eK25ebaAhoV05KCC3gG2oiNlc6IRPmAjdt8pSDJ7lHahD+JdOB6eM7GUySt+0MMv1C+b 0KVz5BDTsCurWKIQrrsp+fUMtYNdbf5VfXJEPxwzob8lyM9EIWxIN+jnChGtMiu8t0h9 qxEA== X-Forwarded-Encrypted: i=2; AJvYcCVgiJmWHCllctRG8a+R5XqWSvysgSJVE2nzP4qoE3M/Bkx0AaiB3e5YJ8t7IrXvmfSHUH3YCDcIpYSXQfKk@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yylvta33pKSEbccB1vXJtSe+jwDU+wh5CAwot5Va/wkN2fogERh TowWW3WLupDI4KrEZgK7sjtTUWDYdNHeYmPkYhGcL+8bNKxlWs1mY0eoJ8DALrHEkg== X-Google-Smtp-Source: AGHT+IGT4pi1p4G8IGBWsBNCwVlj3/wWlyqjgPGF+nr01JQJWfFyxEzv3ucNSzIqxXQ8BTf4zCZ5dw== X-Received: by 2002:a05:600c:1986:b0:42c:cd88:d0f4 with SMTP id 5b1f17b1804b1-42e96ab6604mr40546155e9.22.1727347744293; Thu, 26 Sep 2024 03:49:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3509:b0:42c:c82f:e5b with SMTP id 5b1f17b1804b1-42f52231940ls178445e9.2.-pod-prod-09-eu; Thu, 26 Sep 2024 03:49:03 -0700 (PDT) X-Received: by 2002:a05:600c:4447:b0:428:f0c2:ef4a with SMTP id 5b1f17b1804b1-42e9610d4famr38917245e9.13.1727347742733; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727347742; cv=none; d=google.com; s=arc-20160816; b=iF0cTxnWJoSl+ceGHpHKQtoWSYcFh9KnVb12MxVMNJw8x48mIxw3eKaKcGy56+Jagp srUKxw6CDxSAqgjgDfQxKmhq157sqTkBTBwg2MDTvzDI8VClUMC8Vkl6T1rzEqRc2Xaz b7exAzsUKWl4TJijYtlL2j4tk/gVrdk5RLIKQ9pDEnBESt5Zt3Wl90JavVPtejdQzmgB GGSEIf3BKESUMonGJGCx9KrMVoUEVSM+p5ws3ikjmDEklEo7I2Amr4HcqRQeQmQdDglS Ut9vaNLFyaO0HW27zvOYPbk4D4Vzls+XCUasHqNZvzw50hAzRBUgKsP+gCB8O24ZZCCE uLBg== 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:to:from:dkim-signature; bh=sANYTc56l1dzuSb6OkWAQtijEDV1flO+WLT+P2kRW58=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=z44OY126ov9eU71hpI6HiCnWxM13l0f7VpBsaI8RbRt5iECepGqEW+9eTx0MXK1e6r vWvL2KK6sRxS4iw8YwZw3B1V1ip8sfbrD7xY8pBW+awCQ/yeQqrXAXaZYlxVQ+475HoC h2NBKeh5+mn+kpLUjgG86TEzHG0z4ISmwqLkLx2n5DxRP7H03Ty5wQ2lLMAlQKEdr0KY 7FE2J4aM2IgnfLx02wgIinFYWDk+Eg4oLOpk+oEpuECnHNtPCY/n+C+ITha3YaEfO8Vk she0e1Dwkv3FXsBx6YuRKmWeOQ0dEAGaoFWO9kj0xbS5IoavNnRgSmF7X3MqJ1c73IJe z5mg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=m+HrKMfb; 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 5b1f17b1804b1-42e906d55c7sor26835815e9.12.2024.09.26.03.49.02 for (Google Transport Security); Thu, 26 Sep 2024 03:49:02 -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:a05:600c:314a:b0:42c:b6e4:e3aa with SMTP id 5b1f17b1804b1-42e961045c5mr41252085e9.5.1727347742009; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a55336sm43314755e9.47.2024.09.26.03.49.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 03:49:01 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 5/6] clk: imx8mp: don't lose the anatop device node Date: Thu, 26 Sep 2024 12:48:54 +0200 Message-ID: <20240926104855.656121-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926104855.656121-1-dario.binacchi@amarulasolutions.com> References: <20240926104855.656121-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=m+HrKMfb; 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 Thu Sep 26 10:48:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3526 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 D578A3F9F6 for ; Thu, 26 Sep 2024 12:49:05 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42f310f0ed2sf7777665e9.1 for ; Thu, 26 Sep 2024 03:49:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727347745; cv=pass; d=google.com; s=arc-20240605; b=b8cr3AovRUzBpS1JmU4SmkPGqRawUA9tFSw/xg/fKDethtd8S0sB7hdwtgz28bxEcE KbO4f3lNTHX9GaAYtQEVjpvgzgdAmEpGsEW7pm6053bQ37COmJ0TXl1ZpkpYil43f3Z7 m6/bXs0yDoHBxLpRBxs1FjnemNZKZlbOROJtsugY5ZXBmBJW5Su03Ijul9n0MfHcuVU4 9y8iNpkcR+Iz+YsTOwpCoRQMcZwWdhUnDndzwZk6mLI4n8eXOM3vnetomwIgjVJ6wD6v ua/9df/P67KFIUHptMcn2d+12Izs5L0QLYHoOliQ10LUrHOCcgAY5/tarRyFxv6uxK9P 3I5w== 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:to:from:dkim-signature; bh=/49e88ScGTaYGQd3ub28lfNQG6D4TrXc9H1hUqI6cz4=; fh=thVpoqiiHzyfaivadIgg5AaNYL+HI4jIoQO3YoLOcaU=; b=QXPw3ChXxN9IskcGQ+8TFSjL4jHVmWJk8gex2/IQBeOVr5gaR3m1SEcIN46E4dn0uw Z4njDajbYy4D+gMH0HsOD86rt67NGUE8vCAURrKveGi779WVl6dLtB7dLHeesEDqZwSy +wqV8sl33LgmBSWai85ue/Ql7x5Y3q1Fi05RTqDJbvNuDrHnoMD2kNMOjgu7WAKqUGZA ZkI91Z1kCtDmfRNS0nXBeBBHLcQpRGgzYKzwL9lOJmE801UBBt+pWk+zciGxBu+00GKL Ad0h7Hjz2EgVbNzJ5e/9fN2LVRQsPuk47epjtA4OkU+sbRoQBPSJ2LAXlf5nFDeJAf/4 uNoQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Aj83gvQd; 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=1727347745; x=1727952545; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=/49e88ScGTaYGQd3ub28lfNQG6D4TrXc9H1hUqI6cz4=; b=GGGw3511HGJ33wzNNWmb3BTy1fmTXY+scfapSzEdjHDHlNrk8REQsNvICda8jLt3f/ pj+g0KiiiHwCAfjheuQj5mq87X/CXTpQAAAvDvS4QlBjHpnk5w/4QDqk35AdpMzZJeKw pHAlvWkaszzWTGwtpBQBk/h1kWrknwtzhLIFs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727347745; x=1727952545; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/49e88ScGTaYGQd3ub28lfNQG6D4TrXc9H1hUqI6cz4=; b=NyvuoDt8KkMnwMfejhPara9lPs9urdjz+MiOOrXU+bxqSSYyMUf0yPsvaX2Bm7yfy9 miGJ9/5vlFeeF7xHEjUxMjxX+anh9N2E4mNPq6xw+HkbIw58LQNROKS9cdZB5drGqwQk PzTf9vDQRbQCSCWAjdyurIxwWaXyNvtqrw8O1iNH62hlkIWzSkr5jNCgpPTvGhlfBHqB 5UPifwSEgN8uAjwpqGPbbEqo8h7GshUq8zUHMkO5v4mxxDn1a1C6DiHR+Smt1+5gR1bA TCr9F8ogN40xE+dFPTGbAOLxTv2QNe78JApvqpEeOvGYx+LdMzRLMbJGfInSxTCcrP0S T4nA== X-Forwarded-Encrypted: i=2; AJvYcCV0Td3GTM2zEUCXjuD9p8A+fEBFeFP/x9Db2dI+pBRL3EuaFNpqXigRqq4YhcTD3Fb5SSub20CcJOLXzdIE@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yzq04HicUzkZfbAoz2vZynSObjN6vmQi20z3qbUQ33MpowIMMZh gDYhe5GFL3dphbCZvlq4nztYiM4b/zv/RIDMVzUN9hzonezSDuOPYPJsp9jMld22jQ== X-Google-Smtp-Source: AGHT+IGuN/DCpalysLwTlUwm68kgF2ypHwSzxq7kgU/tnCsEzXtMijht3r6KNDSFm64jQofK8yFybQ== X-Received: by 2002:a05:6000:18c9:b0:374:c3e4:d6b1 with SMTP id ffacd0b85a97d-37cc24b25b5mr4647178f8f.44.1727347745162; Thu, 26 Sep 2024 03:49:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:540b:0:b0:368:31b2:9e96 with SMTP id ffacd0b85a97d-37ccdb8419cls359261f8f.1.-pod-prod-05-eu; Thu, 26 Sep 2024 03:49:04 -0700 (PDT) X-Received: by 2002:a05:600c:4b97:b0:426:62c5:4731 with SMTP id 5b1f17b1804b1-42e96ab6d1fmr53742115e9.29.1727347743659; Thu, 26 Sep 2024 03:49:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727347743; cv=none; d=google.com; s=arc-20240605; b=CyIYZjJVmSv3lJipq46W4Od+Y2IBNaL0rdAWHYPik9j+lb2Bghy7O97Yw0iu0ee2zd CHYfpsy+aVBzU3KMSMsuGsoOndN9z8lmOSeAQzaI4OoVnuJ+iEnEjzGUerlqzZMH6pIY k0LB1TblCUIr3ImoOkbDU0zr4gmlvewf29ADNaCm+/xE1kzpxTK7mr9MJOV+oRismc+K nYsCZ0k2KcguTR4MWQFbEA0eVGIdMifmMO0cyeCBw+jd1tLOqEPmE1Cfhb9INZMvdW0v 4vKQ3AUuXnDrxsN1qxzujXmeiZ3vxnAJ8/45BQfUAtpirxy0Lw2RxvqsIpoP46BbeyQa 1ihA== 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:to:from:dkim-signature; bh=SqdVHCjP2z3b3GmppGHkZvxobZmXnCslqoKDvGYxVNw=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=SpS//DrhCkbvdQWL8FkJOHkmwRR/Zl7kLj9KIoMLfN4jJoZrukBni+8Ddg/f20FlrU 9nyLnAAZwTjszKDA1nSBKrvw+xXQuosxz2+Yv+mo+XQKmGL5nzw2gwywuBkFeUqwCyam 859lrGfT5iRPIMPXHWCtn+oEXe1Fgy3f3VOaxGy2Xuwk9cINV4FVA2GqEzr0Reqienx2 9w67mUjWPyalkGe6Ewd/pLCjJuab8p0tp76U3k4STlg/PyoKoJxt3sSNXoBtMap2hrw9 SZSeNLaFwx4HJrWN+n9TRxGC6GFhlqDKZuqzrwNRl2eRo5Farcb+ZkK6yW6MFtg2WULo 4i/w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Aj83gvQd; 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 5b1f17b1804b1-42f53098a16sor7972635e9.9.2024.09.26.03.49.03 for (Google Transport Security); Thu, 26 Sep 2024 03:49:03 -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:a05:600c:4511:b0:42c:a387:6a6f with SMTP id 5b1f17b1804b1-42e96118b2amr57858245e9.20.1727347742942; Thu, 26 Sep 2024 03:49:02 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e96a55336sm43314755e9.47.2024.09.26.03.49.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 03:49:02 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 6/6] clk: imx8mp: support spread spectrum clock generation Date: Thu, 26 Sep 2024 12:48:55 +0200 Message-ID: <20240926104855.656121-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240926104855.656121-1-dario.binacchi@amarulasolutions.com> References: <20240926104855.656121-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=Aj83gvQd; 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);