From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2807B1922EF for ; Sun, 22 Dec 2024 17:06:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734887169; cv=none; b=Hho41IHpEJ0+ubX8l9ocAzJ6qt+/lVJDMUXln0wmzwkICZCGeOxoUb4lV/HYfOlllAdSjB2lQa/lGJFsgSUQWQbvEcclwf5eUcmRtQAhPRQQtdSMLIU6fiFUa0UMAifTYOaA+94VAlgCCAnCBxDvhxLpYgsiZUV06ZK3WrJge+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734887169; c=relaxed/simple; bh=s5iJgN4o+dP7Gm3bTpRMP//ThuhyNAU+qKwiQFlkd/I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=faoIL6PsRYavwZHDDSPKCMhKLZiJuuLMANCIwLs1y20sC35CwHuBkj8BB3+aJXzcoDJPkBKhkrsLuA4wY5morxXOvt8nLgzHQKmhsOqHGmG+whUcpnD4nacEgrpOqg8VwSOiD+HjWlKdl8hdmO1n4jlmrb7LXxR54+n5/orUh6M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b=qiw8wQ2q; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="qiw8wQ2q" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-aa6b4cc7270so516754666b.0 for ; Sun, 22 Dec 2024 09:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1734887166; x=1735491966; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=D27zsP+xnLWGVrxLHgK+E6loU9nNNR60aUGojpIfAP0=; b=qiw8wQ2qDw6AOtleKaWotq3IslemjFIBVHyTmI1n/sN3MyUyAjeokzAWMue4kPeKIP XKa6hpifusOPetnjguEQAltdQxMnttwPBz9r9DkibxrFZVQ2noKmnQEwnmYq5J41sqvU x6MfWT5/QqEaRVpzmsaaSJJRwwTjP8SJVBmGU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734887166; x=1735491966; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D27zsP+xnLWGVrxLHgK+E6loU9nNNR60aUGojpIfAP0=; b=ZKfDFLL8GebetPBUb3adgoUcLeNrcS4e67hlawggOOD/BS/YzuV32Y1zl1Zuz1FonQ CxZbnPkxwVbEgCV0w7HxcILYD23appODMzUOmV2C7NzuPGiFdBPIeY3fFSgaI48fEmXW 0pVqrWFT8E40rNqZoTEIA2pcRvcGb4dmViS01lYVAyBWaHs8KX7da78v4bis4rQ2SB0m PZY95rUrqaU59BwAVgWyhhgqPtV8O280IEZ28Lo9Emr+L7VWxO+G5As27HurVafXKkOM 1hypFtjlR8wLfvET/1l0yw8ei+V3aNO44+1nEyUGxc6o6L0JO5UOft1UVAvsChgVylHq jLtA== X-Gm-Message-State: AOJu0YxynItf/UVHS7nsWEzFzDry3mJFY5TzOzPqw4qyUPUQFKeC5KYX lXfK7eiLIcRnB/7Ei5wIADCH+ncHwdM/+2QNGakbnAcWAFPxj3BV9ocg0SD42AindgDwbkf7HMl C X-Gm-Gg: ASbGncsjwO0ZmTQ/HPy0LA6OGTYrF3ucV2lwMtf64Zl6ki/Z51bYzoFzAbI5Ma80Xnd tuGjw7p2pq4pZ2XelH68L/BLiZb+AfEWPlMtXDGf0PgifyFfvDFBjDeSF+Iim9OSLCqcQ5zYK0B wismxgGKc/chpv6kEGgcSBFEhsq6eFN7rIuQ+LWeC4WcyTQZTx9daGXfxMz6gSqwVneCdIqgy7h yUQRpkSkr7nGmZHzs80bMl5VLxNdXW8ZO1faeqmSO1AZwG9I73DGSZjG6PdwW2uvWgaHu3JOVz0 E2G03ThB7m+yH1vUdnJJ9vyv4Kdpao5ZBoVanjgL7mnW6w== X-Google-Smtp-Source: AGHT+IGcYyO/2OQzc2CMhKzJEpw1eb8IeHSQcUz4cGsgJFNDVKrwWV2cnf1BfIdXqT/0W4OuaXsQKA== X-Received: by 2002:a05:6402:348d:b0:5d4:55e:f99e with SMTP id 4fb4d7f45d1cf-5d81ddc09abmr22317161a12.18.1734887166231; Sun, 22 Dec 2024 09:06:06 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.87]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0efe48d6sm414056566b.127.2024.12.22.09.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2024 09:06:05 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , 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 v6 16/18] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Sun, 22 Dec 2024 18:04:31 +0100 Message-ID: <20241222170534.3621453-17-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241222170534.3621453-1-dario.binacchi@amarulasolutions.com> References: <20241222170534.3621453-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The addition of DT bindings for enabling and tuning spread spectrum clocking generation can be applied specifically to the PLLs. The "" value for the fsl,ssc-method property is specifically intended to specify a "no SSC" case, as in the example, when you don't want to configure spread spectrum for one of the PLLs, thus avoiding the use of a method that would only make sense if SSC were being set. Signed-off-by: Dario Binacchi --- Changes in v6: - Improve the commit message - change minItems from 7 to 1 for all the ssc properties added - change maxItems from 10 to 4 for alle the ssc properties added - update the DTS example Changes in v4: - Drop "fsl,ssc-clocks" property. The other added properties now refer to the clock list. - Updated minItems and maxItems of - clocks - clock-names - fsl,ssc-modfreq-hz - fsl,ssc-modrate-percent - fsl,ssc-modmethod - Updated the dts examples Changes in v3: - Added in v3 - The dt-bindings have been moved from fsl,imx8m-anatop.yaml to imx8m-clock.yaml. The anatop device (fsl,imx8m-anatop.yaml) is indeed more or less a syscon, so it represents a memory area accessible by ccm (imx8m-clock.yaml) to setup the PLLs. 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/imx8m-clock.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml index 05bc01960045..37cc6a6e89d4 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -43,6 +43,37 @@ properties: ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8m-clock.h for the full list of i.MX8M clock IDs. + fsl,ssc-modfreq-hz: + description: + The values of modulation frequency (Hz unit) for each clock + supporting spread spectrum (i. e. audio_pll1, audio_pll2, + dram_pll and video_pll). + minItems: 1 + maxItems: 4 + + fsl,ssc-modrate-percent: + description: + The percentage values of modulation rate for each clock + supporting spread spectrum (i. e. audio_pll1, audio_pll2, + dram_pll and video_pll). + minItems: 1 + maxItems: 4 + + fsl,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: + The modulation techniques for each clock supporting spread + spectrum (i. e. audio_pll1, audio_pll2, dram_pll and + video_pll). + minItems: 1 + maxItems: 4 + items: + enum: + - "" + - down-spread + - up-spread + - center-spread + required: - compatible - reg @@ -76,6 +107,10 @@ allOf: - const: clk_ext2 - const: clk_ext3 - const: clk_ext4 + fsl,ssc-modfreq-hz: false + fsl,ssc-modrate-percent: false + fsl,ssc-modmethod: false + else: properties: clocks: @@ -124,6 +159,9 @@ examples: clock-names = "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", "dram_pll", "video_pll"; + fsl,ssc-modfreq-hz = <6818>, <0>, <0>, <2419>; + fsl,ssc-modrate-percent = <3>, <0>, <0>, <7>; + fsl,ssc-modmethod = "down-spread", "", "", "center-spread"; }; - | -- 2.43.0