From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 DE64518BC3F for ; Sun, 29 Dec 2024 14:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483836; cv=none; b=M108DhqJ+gtOf6oBVkJ5fCJvahOxl1ZmCsjXgD/eKDdv77H6tlgjs6drBh6qr5pgeqSykkw2KTSU1TH0KWJ9WnlFonf07sSh2YeCpyXMLLkz22lA1fO8MNUWaoYOZOxcwvOV5aw6NPe79SOxngvLUHYfPshsKplogFSp/QC1TfU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483836; c=relaxed/simple; bh=+1wDCnUf6V6waC2u4F0CjceMoJUJQ3m5duPgNX1wMjo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xd0zqGRwG/WFwH9yVvMnvA3XrPrh7x5M927+NMBkeYIqbQ5rdrOSaWli8RYgOHw5RbgDG9zbcVCP2PUd+2lPf6Sd9XGgkn3i/j4eXaUbvPEwoaiMW57Jail2cyMlPmEtFGZdW7w69RkqG7kW7d1MjZM32V1RJ/TqTs9sL607luY= 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=gHtmf5Xu; arc=none smtp.client-ip=209.85.218.45 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="gHtmf5Xu" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-aabfb33aff8so1483795466b.0 for ; Sun, 29 Dec 2024 06:50:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483833; x=1736088633; 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=0D3K2ln9Lb+MNQxN4twGUjq+Zn0uEKE9IsRwsBI/jVw=; b=gHtmf5XuC9i4a8ViQuXEmZ/iroMQLVn4ZbLpbRinDSC78zUJ7d/MqZIiGVssSQ8pME mP1IE6WEXS+ki3TZLKLw94Pm4kn2M6yt2CChFhZLmzj1BDRPy/m/2tG6ev8a5bEjbdv2 hE1IBkM0tMsjKrb+2A+ZImMca8Gnqd/OM3G+E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483833; x=1736088633; 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=0D3K2ln9Lb+MNQxN4twGUjq+Zn0uEKE9IsRwsBI/jVw=; b=oPEwU90buKYu9SIAd/FCkCmODCy7m/lqjENsBk6nBMSUxmfQYUfVJt5v9fu1h91Xiz nW4pSwFhIqdp/PdFAyXLsxy9Ox41ldknmxIOyQYaTqgXRGdir2xYX6ixXK945v0JTqjv jZNp0w8vN79dSvfYYoJT48A4URGp+JqBYeNcHeK5nMQlhTAJR+GU6vpOhuYLTDhlktNf 52+SfEqs+BFvBArvw7VQ18/mN6N68Q2QN/YOVcrx5KUKhs1hHIAx2W9V/lQ5MlJ1PiWb LyBdXz3DxihqdlYFqd84qXTucMnNGsb7Aa6ySM1Q7v0BWFE2WZOQ98EvIi0+pXvIcbjz akwQ== X-Gm-Message-State: AOJu0YzsTP5KlmbsRoKuXRbZu7SwYp5FToY9nIy7v8+LuyD4HB2I1JV8 w3Eky3L0oh0/w/AlduhXwaLlb2OXP8nI1W9EK8HOY+4AirbcCbPjnswKJo1jx5LX+NOnSy1jqrl N X-Gm-Gg: ASbGncsAbWkXNpvGEbUeUB60wEIVphd41m5NDDJ5BMvGJho5UynVSY0Epy8wc2pX6jY 7eUbeJwieUF4nPdA7yR1X2bXyMgDzrlP9V0RUdleUUP7DXbt/QeVV+OoVhGGzpSVwYq5ZfSu/Qj PX8y/f/a58y1dzCBjlBBUosdeXcu0LmMey5Z+/PHU4hWwv05kZ15dQ9L2UGXdUL/Gp6bwT6n0Xc W1p2k8WAtT1RSGohCflh7NP6wSK5V0RPiOEtd8w1H2rgmr8PgbxMv9/pziJY9PHeG5vrxnGfLIC fn5wOEWZhbWl4R9vOJAnoA== X-Google-Smtp-Source: AGHT+IFV6+DUifWNgtI/l9xv/1AQmyY+vn0i8+uFyhjAZ8e8hW4Xl/fClO119sqnG2ifR6YSa9Jbvw== X-Received: by 2002:a17:906:415a:b0:aaf:c0:be7e with SMTP id a640c23a62f3a-aaf00c0c9d4mr1166766266b.29.1735483833021; Sun, 29 Dec 2024 06:50:33 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:32 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , 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 v8 01/18] dt-bindings: clock: imx8mm: add VIDEO_PLL clocks Date: Sun, 29 Dec 2024 15:49:25 +0100 Message-ID: <20241229145027.3984542-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the name used in the RM is video_pll. So, let's add the IMX8MM_VIDEO_PLL[_*] definitions to be consistent with the RM and avoid misunderstandings. The IMX8MM_VIDEO_PLL1* constants have not been removed to ensure backward compatibility of the patch. No functional changes intended. Signed-off-by: Dario Binacchi Acked-by: Krzysztof Kozlowski --- (no changes since v6) Changes in v6: - Add 'Acked-by' tag of Krzysztof Kozlowski Changes in v5: - New include/dt-bindings/clock/imx8mm-clock.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/dt-bindings/clock/imx8mm-clock.h b/include/dt-bindings= /clock/imx8mm-clock.h index 1f768b2eeb1a..102d8a6cdb55 100644 --- a/include/dt-bindings/clock/imx8mm-clock.h +++ b/include/dt-bindings/clock/imx8mm-clock.h @@ -16,7 +16,8 @@ #define IMX8MM_CLK_EXT4 7 #define IMX8MM_AUDIO_PLL1_REF_SEL 8 #define IMX8MM_AUDIO_PLL2_REF_SEL 9 -#define IMX8MM_VIDEO_PLL1_REF_SEL 10 +#define IMX8MM_VIDEO_PLL_REF_SEL 10 +#define IMX8MM_VIDEO_PLL1_REF_SEL IMX8MM_VIDEO_PLL_REF_SEL #define IMX8MM_DRAM_PLL_REF_SEL 11 #define IMX8MM_GPU_PLL_REF_SEL 12 #define IMX8MM_VPU_PLL_REF_SEL 13 @@ -26,7 +27,8 @@ #define IMX8MM_SYS_PLL3_REF_SEL 17 #define IMX8MM_AUDIO_PLL1 18 #define IMX8MM_AUDIO_PLL2 19 -#define IMX8MM_VIDEO_PLL1 20 +#define IMX8MM_VIDEO_PLL 20 +#define IMX8MM_VIDEO_PLL1 IMX8MM_VIDEO_PLL #define IMX8MM_DRAM_PLL 21 #define IMX8MM_GPU_PLL 22 #define IMX8MM_VPU_PLL 23 @@ -36,7 +38,8 @@ #define IMX8MM_SYS_PLL3 27 #define IMX8MM_AUDIO_PLL1_BYPASS 28 #define IMX8MM_AUDIO_PLL2_BYPASS 29 -#define IMX8MM_VIDEO_PLL1_BYPASS 30 +#define IMX8MM_VIDEO_PLL_BYPASS 30 +#define IMX8MM_VIDEO_PLL1_BYPASS IMX8MM_VIDEO_PLL_BYPASS #define IMX8MM_DRAM_PLL_BYPASS 31 #define IMX8MM_GPU_PLL_BYPASS 32 #define IMX8MM_VPU_PLL_BYPASS 33 @@ -46,7 +49,8 @@ #define IMX8MM_SYS_PLL3_BYPASS 37 #define IMX8MM_AUDIO_PLL1_OUT 38 #define IMX8MM_AUDIO_PLL2_OUT 39 -#define IMX8MM_VIDEO_PLL1_OUT 40 +#define IMX8MM_VIDEO_PLL_OUT 40 +#define IMX8MM_VIDEO_PLL1_OUT IMX8MM_VIDEO_PLL_OUT #define IMX8MM_DRAM_PLL_OUT 41 #define IMX8MM_GPU_PLL_OUT 42 #define IMX8MM_VPU_PLL_OUT 43 --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 99A152594A6 for ; Sun, 29 Dec 2024 14:50:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483839; cv=none; b=g2aWtKehjxrXAqFWJ813Bww7d2gA+qw+NBkOUk/56bkv0Eg0rkJ78vw4r2H056bmW6shjbunafNWuVCn9MbK3C97Q4Ct802WWj224J/1RthttxMQBKXynDmaSZ8cuR0kbaC7xmLLiOEaybCl0//6gIcezyCHe7n/zCQUVCajtkM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483839; c=relaxed/simple; bh=awl6YwE5UVjc3KUbwMt94afSEc7QEcOUZKoHgRnGp2A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PMeHZjmCS063lZqHfwnWhGNGXqf6GOsEitDb+kIkZ7BuPRsYbcTbDl9drmwYIGFP+2QL801HdpNFYsx6NJ+y/5GTS9x+kkRUG4ertue9zlqgDZHWlVsqbceDIY5HlTlDZw9lBQ91cPhPbkhZyqRDi1EmVhwxu24HhuWGZzEZ+FA= 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=KCwFhwhC; arc=none smtp.client-ip=209.85.208.52 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="KCwFhwhC" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5d3e829ff44so17431871a12.0 for ; Sun, 29 Dec 2024 06:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483835; x=1736088635; 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=kXAgzqp6YN1DpD4nDAOaVXpHZiShYKGqmKOr0HW9Cag=; b=KCwFhwhCSJ7Re6W9PT57iJB/Xv4Jj5zGT65GeDJ9IEuLcglBV6pecuvN6BNoUDcgf2 0q0Z3LTE+3jvJptbwyPe0laRqTdQ40yPjnlvbbyQQuHDZw41ZNRMk9gUDnA7ofKt7rbB DLGCiHoldPSb2haamgJdwN4aQ2mzqh70M2V0c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483835; x=1736088635; 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=kXAgzqp6YN1DpD4nDAOaVXpHZiShYKGqmKOr0HW9Cag=; b=Xz/lrC1ExP547vzQVITTCWJ2UW9SYM2iCWB8eYZ24oiXj8voGOtMWMsQmlizYsywfZ o/rN2S24qx1+7xRksit65e1iNfBxe6YO2RcS96t62i90LOjqRqwUQNnshH3zXNSkEuFe fitRGT0sTQNRrsfa0mXuYMB5yaTz6lyAVbGrUcJN/LYLHcYgFZB9HhyMrfEpnbTLvwVg VI2YtA0OatlS2yWWq7rlq4dVK+hDalsiahfBD0bOW1pB2taxXbpaN/vCr/999OFIVqcm JV5I0Ytdcyx7gx3rjJ/nWTJCa/BsVmPVhT5VK7oAGkC27tT0SpSxWeezNtbYaII9JEY/ oxuw== X-Gm-Message-State: AOJu0Yw6Xzh6FLPpPQZsiFmCN2T5hhd+EhOkDNmSIa1A1AQvBULNMn+L etalU/Qm7N/UWIhDIelSpY1385AdwUG26IH8O3VqmuGXikVs06VRy25rUL7KRHGIEwm87VGVbLr p X-Gm-Gg: ASbGnctikxvBZA2EydaFj39S1NExAIrc2yQalEMh1THTA8QGB29zJl+jwIq99ScVurm kNYcoCTXQNmxBHX6XpoFNvStvnMLcUOD+uRGTihykVdd7i1oOivDoCUVtgZ25O284GhaJH9DqDE Nc6m6FrbylFrwxlMbbAdeOgiDcEXrTjoyeZ8eY991NnroU6wvQ334Qjh0MM6AZsyZ7RBxclxvn4 tGhC1pkDRdnUh+orkQpQGZElllmAHoqHD7zKkgOUcContsU6Lj6OdhbYYqlEEinzAe9/UCybFGk gPMicpmhoHtTS9DctF7ybA== X-Google-Smtp-Source: AGHT+IG2wbysUbCezLpJGCZJmekUUm0GIYShUbmIRapUdbAQJ5KcWfWulGHebj4TQt1DArYxfRByeQ== X-Received: by 2002:a17:906:478b:b0:aa6:950c:ae1a with SMTP id a640c23a62f3a-aac349cbbb7mr2867398166b.30.1735483834681; Sun, 29 Dec 2024 06:50:34 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:34 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Peng Fan , Abel Vesa , Fabio Estevam , Michael Turquette , 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 v8 02/18] clk: imx8mm: rename video_pll1 to video_pll Date: Sun, 29 Dec 2024 15:49:26 +0100 Message-ID: <20241229145027.3984542-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the name used in the RM is video_pll. So, let's rename "video_pll1" to "video_pll" to be consistent with the RM and avoid misunderstandings. No functional changes intended. Signed-off-by: Dario Binacchi Reviewed-by: Peng Fan --- The patch, which simply replaces video_pll1 with video_pll, highlights many warnings raised by checkpatch.pl. These are not generated by the changes made but are inherited from how the module was originally written. Fixing them would have meant "obscuring" the actual changes introduced. (no changes since v7) Changes in v7: - Add 'Reviewed-by' tag of Peng Fan Changes in v5: - Split the patch dropping the dt-bindings changes. Changes in v4: - New drivers/clk/imx/clk-imx8mm.c | 102 +++++++++++++++++------------------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mm.c b/drivers/clk/imx/clk-imx8mm.c index 342049b847b9..8a1fc7e17ba2 100644 --- a/drivers/clk/imx/clk-imx8mm.c +++ b/drivers/clk/imx/clk-imx8mm.c @@ -28,7 +28,7 @@ static u32 share_count_nand; static const char *pll_ref_sels[] =3D { "osc_24m", "dummy", "dummy", "dumm= y", }; static const char *audio_pll1_bypass_sels[] =3D {"audio_pll1", "audio_pll1= _ref_sel", }; static const char *audio_pll2_bypass_sels[] =3D {"audio_pll2", "audio_pll2= _ref_sel", }; -static const char *video_pll1_bypass_sels[] =3D {"video_pll1", "video_pll1= _ref_sel", }; +static const char *video_pll_bypass_sels[] =3D {"video_pll", "video_pll_re= f_sel", }; static const char *dram_pll_bypass_sels[] =3D {"dram_pll", "dram_pll_ref_s= el", }; static const char *gpu_pll_bypass_sels[] =3D {"gpu_pll", "gpu_pll_ref_sel"= , }; static const char *vpu_pll_bypass_sels[] =3D {"vpu_pll", "vpu_pll_ref_sel"= , }; @@ -42,22 +42,22 @@ static const char *imx8mm_a53_sels[] =3D {"osc_24m", "a= rm_pll_out", "sys_pll2_500m static const char * const imx8mm_a53_core_sels[] =3D {"arm_a53_div", "arm_= pll_out", }; =20 static const char *imx8mm_m4_sels[] =3D {"osc_24m", "sys_pll2_200m", "sys_= pll2_250m", "sys_pll1_266m", - "sys_pll1_800m", "audio_pll1_out", "video_pll1_out", "sys_pll3_= out", }; + "sys_pll1_800m", "audio_pll1_out", "video_pll_out", "sys_pll3_o= ut", }; =20 static const char *imx8mm_vpu_sels[] =3D {"osc_24m", "arm_pll_out", "sys_p= ll2_500m", "sys_pll2_1000m", "sys_pll1_800m", "sys_pll1_400m", "audio_pll1_out", "vpu_pll_out", }; =20 static const char *imx8mm_gpu3d_sels[] =3D {"osc_24m", "gpu_pll_out", "sys= _pll1_800m", "sys_pll3_out", - "sys_pll2_1000m", "audio_pll1_out", "video_pll1_out", "audio_pll2_o= ut", }; + "sys_pll2_1000m", "audio_pll1_out", "video_pll_out", "audio_pll2_ou= t", }; =20 static const char *imx8mm_gpu2d_sels[] =3D {"osc_24m", "gpu_pll_out", "sys= _pll1_800m", "sys_pll3_out", - "sys_pll2_1000m", "audio_pll1_out", "video_pll1_out", "audio_pll2_o= ut", }; + "sys_pll2_1000m", "audio_pll1_out", "video_pll_out", "audio_pll2_ou= t", }; =20 static const char *imx8mm_main_axi_sels[] =3D {"osc_24m", "sys_pll2_333m",= "sys_pll1_800m", "sys_pll2_250m", - "sys_pll2_1000m", "audio_pll1_out", "video_pll1_out", "sys_pll1_= 100m",}; + "sys_pll2_1000m", "audio_pll1_out", "video_pll_out", "sys_pll1_1= 00m",}; =20 static const char *imx8mm_enet_axi_sels[] =3D {"osc_24m", "sys_pll1_266m",= "sys_pll1_800m", "sys_pll2_250m", - "sys_pll2_200m", "audio_pll1_out", "video_pll1_out", "sys_pll3_o= ut", }; + "sys_pll2_200m", "audio_pll1_out", "video_pll_out", "sys_pll3_ou= t", }; =20 static const char *imx8mm_nand_usdhc_sels[] =3D {"osc_24m", "sys_pll1_266m= ", "sys_pll1_800m", "sys_pll2_200m", "sys_pll1_133m", "sys_pll3_out", "sys_pll2_250m", "audio_pll1_= out", }; @@ -72,28 +72,28 @@ static const char *imx8mm_disp_apb_sels[] =3D {"osc_24m= ", "sys_pll2_125m", "sys_pl "sys_pll1_40m", "audio_pll2_out", "clk_ext1", "clk_ext3", }; =20 static const char *imx8mm_disp_rtrm_sels[] =3D {"osc_24m", "sys_pll1_800m"= , "sys_pll2_200m", "sys_pll2_1000m", - "audio_pll1_out", "video_pll1_out", "clk_ext2", "clk_ext3", }; + "audio_pll1_out", "video_pll_out", "clk_ext2", "clk_ext3", }; =20 static const char *imx8mm_usb_bus_sels[] =3D {"osc_24m", "sys_pll2_500m", = "sys_pll1_800m", "sys_pll2_100m", "sys_pll2_200m", "clk_ext2", "clk_ext4", "audio_pll2_out", }; =20 static const char *imx8mm_gpu_axi_sels[] =3D {"osc_24m", "sys_pll1_800m", = "gpu_pll_out", "sys_pll3_out", "sys_pll2_1000m", - "audio_pll1_out", "video_pll1_out", "audio_pll2_out", }; + "audio_pll1_out", "video_pll_out", "audio_pll2_out", }; =20 static const char *imx8mm_gpu_ahb_sels[] =3D {"osc_24m", "sys_pll1_800m", = "gpu_pll_out", "sys_pll3_out", "sys_pll2_1000m", - "audio_pll1_out", "video_pll1_out", "audio_pll2_out", }; + "audio_pll1_out", "video_pll_out", "audio_pll2_out", }; =20 static const char *imx8mm_noc_sels[] =3D {"osc_24m", "sys_pll1_800m", "sys= _pll3_out", "sys_pll2_1000m", "sys_pll2_500m", - "audio_pll1_out", "video_pll1_out", "audio_pll2_out", }; + "audio_pll1_out", "video_pll_out", "audio_pll2_out", }; =20 static const char *imx8mm_noc_apb_sels[] =3D {"osc_24m", "sys_pll1_400m", = "sys_pll3_out", "sys_pll2_333m", "sys_pll2_200m", - "sys_pll1_800m", "audio_pll1_out", "video_pll1_out", }; + "sys_pll1_800m", "audio_pll1_out", "video_pll_out", }; =20 static const char *imx8mm_ahb_sels[] =3D {"osc_24m", "sys_pll1_133m", "sys= _pll1_800m", "sys_pll1_400m", - "sys_pll2_125m", "sys_pll3_out", "audio_pll1_out", "video_pll1_out", = }; + "sys_pll2_125m", "sys_pll3_out", "audio_pll1_out", "video_pll_out", }; =20 static const char *imx8mm_audio_ahb_sels[] =3D {"osc_24m", "sys_pll2_500m"= , "sys_pll1_800m", "sys_pll2_1000m", - "sys_pll2_166m", "sys_pll3_out", "audio_pll1_out", "video_pll1_= out", }; + "sys_pll2_166m", "sys_pll3_out", "audio_pll1_out", "video_pll_o= ut", }; =20 static const char *imx8mm_dram_alt_sels[] =3D {"osc_24m", "sys_pll1_800m",= "sys_pll1_100m", "sys_pll2_500m", "sys_pll2_1000m", "sys_pll3_out", "audio_pll1_out", "sys_pll1_26= 6m", }; @@ -108,10 +108,10 @@ static const char *imx8mm_vpu_g2_sels[] =3D {"osc_24m= ", "vpu_pll_out", "sys_pll1_8 "sys_pll1_100m", "sys_pll2_125m", "sys_pll3_out", "audio_pll1_out"= , }; =20 static const char *imx8mm_disp_dtrc_sels[] =3D {"osc_24m", "dummy", "sys_p= ll1_800m", "sys_pll2_1000m", - "sys_pll1_160m", "video_pll1_out", "sys_pll3_out", "audio_pll2_= out", }; + "sys_pll1_160m", "video_pll_out", "sys_pll3_out", "audio_pll2_o= ut", }; =20 static const char *imx8mm_disp_dc8000_sels[] =3D {"osc_24m", "dummy", "sys= _pll1_800m", "sys_pll2_1000m", - "sys_pll1_160m", "video_pll1_out", "sys_pll3_out", "audio_pll2_out",= }; + "sys_pll1_160m", "video_pll_out", "sys_pll3_out", "audio_pll2_out", = }; =20 static const char *imx8mm_pcie1_ctrl_sels[] =3D {"osc_24m", "sys_pll2_250m= ", "sys_pll2_200m", "sys_pll1_266m", "sys_pll1_800m", "sys_pll2_500m", "sys_pll2_333m", "sys_pll3_o= ut", }; @@ -122,47 +122,47 @@ static const char *imx8mm_pcie1_phy_sels[] =3D {"osc_= 24m", "sys_pll2_100m", "sys_p static const char *imx8mm_pcie1_aux_sels[] =3D {"osc_24m", "sys_pll2_200m"= , "sys_pll2_50m", "sys_pll3_out", "sys_pll2_100m", "sys_pll1_80m", "sys_pll1_160m", "sys_pll1_200= m", }; =20 -static const char *imx8mm_dc_pixel_sels[] =3D {"osc_24m", "video_pll1_out"= , "audio_pll2_out", "audio_pll1_out", +static const char *imx8mm_dc_pixel_sels[] =3D {"osc_24m", "video_pll_out",= "audio_pll2_out", "audio_pll1_out", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", "clk_ext4", }; =20 -static const char *imx8mm_lcdif_pixel_sels[] =3D {"osc_24m", "video_pll1_o= ut", "audio_pll2_out", "audio_pll1_out", +static const char *imx8mm_lcdif_pixel_sels[] =3D {"osc_24m", "video_pll_ou= t", "audio_pll2_out", "audio_pll1_out", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", "clk_ext4", }; =20 -static const char *imx8mm_sai1_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll1_out", +static const char *imx8mm_sai1_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext1", "clk_ext2", }; =20 -static const char *imx8mm_sai2_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll1_out", +static const char *imx8mm_sai2_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext2", "clk_ext3", }; =20 -static const char *imx8mm_sai3_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll1_out", +static const char *imx8mm_sai3_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext3", "clk_ext4", }; =20 -static const char *imx8mm_sai4_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll1_out", +static const char *imx8mm_sai4_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext1", "clk_ext2", }; =20 -static const char *imx8mm_sai5_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll1_out", +static const char *imx8mm_sai5_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext2", "clk_ext3", }; =20 -static const char *imx8mm_sai6_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll1_out", +static const char *imx8mm_sai6_sels[] =3D {"osc_24m", "audio_pll1_out", "a= udio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext3", "clk_ext4", }; =20 -static const char *imx8mm_spdif1_sels[] =3D {"osc_24m", "audio_pll1_out", = "audio_pll2_out", "video_pll1_out", +static const char *imx8mm_spdif1_sels[] =3D {"osc_24m", "audio_pll1_out", = "audio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext2", "clk_ext3", }; =20 -static const char *imx8mm_spdif2_sels[] =3D {"osc_24m", "audio_pll1_out", = "audio_pll2_out", "video_pll1_out", +static const char *imx8mm_spdif2_sels[] =3D {"osc_24m", "audio_pll1_out", = "audio_pll2_out", "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext3", "clk_ext4", }; =20 static const char *imx8mm_enet_ref_sels[] =3D {"osc_24m", "sys_pll2_125m",= "sys_pll2_50m", "sys_pll2_100m", - "sys_pll1_160m", "audio_pll1_out", "video_pll1_out", "clk_ext4",= }; + "sys_pll1_160m", "audio_pll1_out", "video_pll_out", "clk_ext4", = }; =20 static const char *imx8mm_enet_timer_sels[] =3D {"osc_24m", "sys_pll2_100m= ", "audio_pll1_out", "clk_ext1", "clk_ext2", - "clk_ext3", "clk_ext4", "video_pll1_out", }; + "clk_ext3", "clk_ext4", "video_pll_out", }; =20 static const char *imx8mm_enet_phy_sels[] =3D {"osc_24m", "sys_pll2_50m", = "sys_pll2_125m", "sys_pll2_200m", - "sys_pll2_500m", "video_pll1_out", "audio_pll2_out", }; + "sys_pll2_500m", "video_pll_out", "audio_pll2_out", }; =20 static const char *imx8mm_nand_sels[] =3D {"osc_24m", "sys_pll2_500m", "au= dio_pll1_out", "sys_pll1_400m", - "audio_pll2_out", "sys_pll3_out", "sys_pll2_250m", "video_pll1_out",= }; + "audio_pll2_out", "sys_pll3_out", "sys_pll2_250m", "video_pll_out", = }; =20 static const char *imx8mm_qspi_sels[] =3D {"osc_24m", "sys_pll1_400m", "sy= s_pll2_333m", "sys_pll2_500m", "audio_pll2_out", "sys_pll1_266m", "sys_pll3_out", "sys_pll1_100m", = }; @@ -174,16 +174,16 @@ static const char *imx8mm_usdhc2_sels[] =3D {"osc_24m= ", "sys_pll1_400m", "sys_pll1 "sys_pll3_out", "sys_pll1_266m", "audio_pll2_out", "sys_pll1_100m"= , }; =20 static const char *imx8mm_i2c1_sels[] =3D {"osc_24m", "sys_pll1_160m", "sy= s_pll2_50m", "sys_pll3_out", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", "sys_pll1_133m", }; + "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char *imx8mm_i2c2_sels[] =3D {"osc_24m", "sys_pll1_160m", "sy= s_pll2_50m", "sys_pll3_out", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", "sys_pll1_133m", }; + "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char *imx8mm_i2c3_sels[] =3D {"osc_24m", "sys_pll1_160m", "sy= s_pll2_50m", "sys_pll3_out", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", "sys_pll1_133m", }; + "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char *imx8mm_i2c4_sels[] =3D {"osc_24m", "sys_pll1_160m", "sy= s_pll2_50m", "sys_pll3_out", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", "sys_pll1_133m", }; + "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char *imx8mm_uart1_sels[] =3D {"osc_24m", "sys_pll1_80m", "sy= s_pll2_200m", "sys_pll2_100m", "sys_pll3_out", "clk_ext2", "clk_ext4", "audio_pll2_out", }; @@ -213,19 +213,19 @@ static const char *imx8mm_ecspi2_sels[] =3D {"osc_24m= ", "sys_pll2_200m", "sys_pll1 "sys_pll1_800m", "sys_pll3_out", "sys_pll2_250m", "audio_pll2_out"= , }; =20 static const char *imx8mm_pwm1_sels[] =3D {"osc_24m", "sys_pll2_100m", "sy= s_pll1_160m", "sys_pll1_40m", - "sys_pll3_out", "clk_ext1", "sys_pll1_80m", "video_pll1_out", }; + "sys_pll3_out", "clk_ext1", "sys_pll1_80m", "video_pll_out", }; =20 static const char *imx8mm_pwm2_sels[] =3D {"osc_24m", "sys_pll2_100m", "sy= s_pll1_160m", "sys_pll1_40m", - "sys_pll3_out", "clk_ext1", "sys_pll1_80m", "video_pll1_out", }; + "sys_pll3_out", "clk_ext1", "sys_pll1_80m", "video_pll_out", }; =20 static const char *imx8mm_pwm3_sels[] =3D {"osc_24m", "sys_pll2_100m", "sy= s_pll1_160m", "sys_pll1_40m", - "sys_pll3_out", "clk_ext2", "sys_pll1_80m", "video_pll1_out", }; + "sys_pll3_out", "clk_ext2", "sys_pll1_80m", "video_pll_out", }; =20 static const char *imx8mm_pwm4_sels[] =3D {"osc_24m", "sys_pll2_100m", "sy= s_pll1_160m", "sys_pll1_40m", - "sys_pll3_out", "clk_ext2", "sys_pll1_80m", "video_pll1_out", }; + "sys_pll3_out", "clk_ext2", "sys_pll1_80m", "video_pll_out", }; =20 static const char *imx8mm_gpt1_sels[] =3D {"osc_24m", "sys_pll2_100m", "sy= s_pll1_400m", "sys_pll1_40m", - "video_pll1_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext1" }; + "video_pll_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext1" }; =20 static const char *imx8mm_wdog_sels[] =3D {"osc_24m", "sys_pll1_133m", "sy= s_pll1_160m", "vpu_pll_out", "sys_pll2_125m", "sys_pll3_out", "sys_pll1_80m", "sys_pll2_166m", }; @@ -234,31 +234,31 @@ static const char *imx8mm_wrclk_sels[] =3D {"osc_24m"= , "sys_pll1_40m", "vpu_pll_ou "sys_pll1_266m", "sys_pll2_500m", "sys_pll1_100m", }; =20 static const char *imx8mm_dsi_core_sels[] =3D {"osc_24m", "sys_pll1_266m",= "sys_pll2_250m", "sys_pll1_800m", - "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll1_= out", }; + "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll_o= ut", }; =20 static const char *imx8mm_dsi_phy_sels[] =3D {"osc_24m", "sys_pll2_125m", = "sys_pll2_100m", "sys_pll1_800m", - "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", "video_pll1_out",= }; + "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", "video_pll_out", = }; =20 static const char *imx8mm_dsi_dbi_sels[] =3D {"osc_24m", "sys_pll1_266m", = "sys_pll2_100m", "sys_pll1_800m", - "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll1_o= ut", }; + "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll_ou= t", }; =20 static const char *imx8mm_usdhc3_sels[] =3D {"osc_24m", "sys_pll1_400m", "= sys_pll1_800m", "sys_pll2_500m", "sys_pll3_out", "sys_pll1_266m", "audio_pll2_out", "sys_pll1_100m"= , }; =20 static const char *imx8mm_csi1_core_sels[] =3D {"osc_24m", "sys_pll1_266m"= , "sys_pll2_250m", "sys_pll1_800m", - "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll1= _out", }; + "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll_= out", }; =20 static const char *imx8mm_csi1_phy_sels[] =3D {"osc_24m", "sys_pll2_333m",= "sys_pll2_100m", "sys_pll1_800m", - "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", "video_pll1_out"= , }; + "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", "video_pll_out",= }; =20 static const char *imx8mm_csi1_esc_sels[] =3D {"osc_24m", "sys_pll2_100m",= "sys_pll1_80m", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", "clk_ext3", "audio_pll2_out", = }; =20 static const char *imx8mm_csi2_core_sels[] =3D {"osc_24m", "sys_pll1_266m"= , "sys_pll2_250m", "sys_pll1_800m", - "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll1= _out", }; + "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", "video_pll_= out", }; =20 static const char *imx8mm_csi2_phy_sels[] =3D {"osc_24m", "sys_pll2_333m",= "sys_pll2_100m", "sys_pll1_800m", - "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", "video_pll1_out"= , }; + "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", "video_pll_out",= }; =20 static const char *imx8mm_csi2_esc_sels[] =3D {"osc_24m", "sys_pll2_100m",= "sys_pll1_80m", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", "clk_ext3", "audio_pll2_out", = }; @@ -286,9 +286,9 @@ static const char *imx8mm_dram_core_sels[] =3D {"dram_p= ll_out", "dram_alt_root", } static const char *imx8mm_clko1_sels[] =3D {"osc_24m", "sys_pll1_800m", "d= ummy", "sys_pll1_200m", "audio_pll2_out", "sys_pll2_500m", "vpu_pll", "sys_pll1_80m", }; static const char *imx8mm_clko2_sels[] =3D {"osc_24m", "sys_pll2_200m", "s= ys_pll1_400m", "sys_pll2_166m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", "osc_32k", }; + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "osc_32k", }; =20 -static const char * const clkout_sels[] =3D {"audio_pll1_out", "audio_pll2= _out", "video_pll1_out", +static const char * const clkout_sels[] =3D {"audio_pll1_out", "audio_pll2= _out", "video_pll_out", "dummy", "dummy", "gpu_pll_out", "vpu_pll_out", "arm_pll_out", "sys_pll1", "sys_pll2", "sys_pll3", "dummy", "dummy", "osc_24m", "dummy", "osc_32k"}; @@ -327,7 +327,7 @@ static int imx8mm_clocks_probe(struct platform_device *= pdev) =20 hws[IMX8MM_AUDIO_PLL1_REF_SEL] =3D imx_clk_hw_mux("audio_pll1_ref_sel", b= ase + 0x0, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MM_AUDIO_PLL2_REF_SEL] =3D imx_clk_hw_mux("audio_pll2_ref_sel", b= ase + 0x14, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MM_VIDEO_PLL1_REF_SEL] =3D imx_clk_hw_mux("video_pll1_ref_sel", b= ase + 0x28, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MM_VIDEO_PLL_REF_SEL] =3D imx_clk_hw_mux("video_pll_ref_sel", bas= e + 0x28, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MM_DRAM_PLL_REF_SEL] =3D imx_clk_hw_mux("dram_pll_ref_sel", base = + 0x50, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MM_GPU_PLL_REF_SEL] =3D imx_clk_hw_mux("gpu_pll_ref_sel", base + = 0x64, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MM_VPU_PLL_REF_SEL] =3D imx_clk_hw_mux("vpu_pll_ref_sel", base + = 0x74, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); @@ -336,7 +336,7 @@ static int imx8mm_clocks_probe(struct platform_device *= pdev) =20 hws[IMX8MM_AUDIO_PLL1] =3D imx_clk_hw_pll14xx("audio_pll1", "audio_pll1_r= ef_sel", base, &imx_1443x_pll); hws[IMX8MM_AUDIO_PLL2] =3D imx_clk_hw_pll14xx("audio_pll2", "audio_pll2_r= ef_sel", base + 0x14, &imx_1443x_pll); - hws[IMX8MM_VIDEO_PLL1] =3D imx_clk_hw_pll14xx("video_pll1", "video_pll1_r= ef_sel", base + 0x28, &imx_1443x_pll); + hws[IMX8MM_VIDEO_PLL] =3D imx_clk_hw_pll14xx("video_pll", "video_pll_ref_= sel", base + 0x28, &imx_1443x_pll); hws[IMX8MM_DRAM_PLL] =3D imx_clk_hw_pll14xx("dram_pll", "dram_pll_ref_sel= ", base + 0x50, &imx_1443x_dram_pll); hws[IMX8MM_GPU_PLL] =3D imx_clk_hw_pll14xx("gpu_pll", "gpu_pll_ref_sel", = base + 0x64, &imx_1416x_pll); hws[IMX8MM_VPU_PLL] =3D imx_clk_hw_pll14xx("vpu_pll", "vpu_pll_ref_sel", = base + 0x74, &imx_1416x_pll); @@ -348,7 +348,7 @@ static int imx8mm_clocks_probe(struct platform_device *= pdev) /* PLL bypass out */ hws[IMX8MM_AUDIO_PLL1_BYPASS] =3D imx_clk_hw_mux_flags("audio_pll1_bypass= ", base, 16, 1, audio_pll1_bypass_sels, ARRAY_SIZE(audio_pll1_bypass_sels),= CLK_SET_RATE_PARENT); hws[IMX8MM_AUDIO_PLL2_BYPASS] =3D imx_clk_hw_mux_flags("audio_pll2_bypass= ", base + 0x14, 16, 1, audio_pll2_bypass_sels, ARRAY_SIZE(audio_pll2_bypass= _sels), CLK_SET_RATE_PARENT); - hws[IMX8MM_VIDEO_PLL1_BYPASS] =3D imx_clk_hw_mux_flags("video_pll1_bypass= ", base + 0x28, 16, 1, video_pll1_bypass_sels, ARRAY_SIZE(video_pll1_bypass= _sels), CLK_SET_RATE_PARENT); + hws[IMX8MM_VIDEO_PLL_BYPASS] =3D imx_clk_hw_mux_flags("video_pll_bypass",= base + 0x28, 16, 1, video_pll_bypass_sels, ARRAY_SIZE(video_pll_bypass_sel= s), CLK_SET_RATE_PARENT); hws[IMX8MM_DRAM_PLL_BYPASS] =3D imx_clk_hw_mux_flags("dram_pll_bypass", b= ase + 0x50, 16, 1, dram_pll_bypass_sels, ARRAY_SIZE(dram_pll_bypass_sels), = CLK_SET_RATE_PARENT); hws[IMX8MM_GPU_PLL_BYPASS] =3D imx_clk_hw_mux_flags("gpu_pll_bypass", bas= e + 0x64, 28, 1, gpu_pll_bypass_sels, ARRAY_SIZE(gpu_pll_bypass_sels), CLK_= SET_RATE_PARENT); hws[IMX8MM_VPU_PLL_BYPASS] =3D imx_clk_hw_mux_flags("vpu_pll_bypass", bas= e + 0x74, 28, 1, vpu_pll_bypass_sels, ARRAY_SIZE(vpu_pll_bypass_sels), CLK_= SET_RATE_PARENT); @@ -358,7 +358,7 @@ static int imx8mm_clocks_probe(struct platform_device *= pdev) /* PLL out gate */ hws[IMX8MM_AUDIO_PLL1_OUT] =3D imx_clk_hw_gate("audio_pll1_out", "audio_p= ll1_bypass", base, 13); hws[IMX8MM_AUDIO_PLL2_OUT] =3D imx_clk_hw_gate("audio_pll2_out", "audio_p= ll2_bypass", base + 0x14, 13); - hws[IMX8MM_VIDEO_PLL1_OUT] =3D imx_clk_hw_gate("video_pll1_out", "video_p= ll1_bypass", base + 0x28, 13); + hws[IMX8MM_VIDEO_PLL_OUT] =3D imx_clk_hw_gate("video_pll_out", "video_pll= _bypass", base + 0x28, 13); hws[IMX8MM_DRAM_PLL_OUT] =3D imx_clk_hw_gate("dram_pll_out", "dram_pll_by= pass", base + 0x50, 13); hws[IMX8MM_GPU_PLL_OUT] =3D imx_clk_hw_gate("gpu_pll_out", "gpu_pll_bypas= s", base + 0x64, 11); hws[IMX8MM_VPU_PLL_OUT] =3D imx_clk_hw_gate("vpu_pll_out", "vpu_pll_bypas= s", base + 0x74, 11); --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (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 5A29A197556 for ; Sun, 29 Dec 2024 14:50:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483840; cv=none; b=NvLhdLMRG5iLyoXo6NJSUsI7sVG+YIagZYS5YQObfnjwoX4gN316G3xftIlCn7qcCczEMWbrAQymCfte5XqShyFb2j+jpl75d1UitWqtkDGZ9H5KYX/jiuVkvrv8HRA8nGODsWAG3ZY8mnABg5dz/zf35gnYshkWhm82iEdE/Ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483840; c=relaxed/simple; bh=xUBRrkr1aLPPwLeMGNd5Xto6SUkG0PhtvIzCxxAX118=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JZC9ges8fuNwx4rf2XIKXZf+uowfC+qH5ptlwrA/EQ5bRGaQ5VWh/rmsYdv0woiH94UBEUmyUdFqVSNgmKtZ9OTzxKWXkdrC94eVzKpTI0x6PsSutWmvnlDTpCkaiXLCUBEsp/FAuepJOFgrgrFgOKkatUnXvETVMGBL57VE6cs= 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=AVrmEmSO; arc=none smtp.client-ip=209.85.208.42 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="AVrmEmSO" Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5d4e2aa7ea9so15317420a12.2 for ; Sun, 29 Dec 2024 06:50:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483836; x=1736088636; 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=T8/6J4AE7rdE7DvbcqL7lv8LvF8nVi/MJUfgoa9DfhY=; b=AVrmEmSOEOGihK/K3eNASyprPdP2kVAtTHF7GcJp53eiZEkQLrjRIKcwHGHqR8Cu9C a8HpqBlPDT0UAiNlCxNfgA12eBNhW95PfvH8TqL4E2Faa8AwMUs9u7WJ4bcdYjs65+90 1yjq2o0hApmb0VMTXMkPSJAmMds1ud53e8lGU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483836; x=1736088636; 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=T8/6J4AE7rdE7DvbcqL7lv8LvF8nVi/MJUfgoa9DfhY=; b=CYWhcFJaofGvkLypkeccQst1d2Wt7+ep95abpYKekUGEvmZ+wDLFxWgR02te2WZfQW FkLHTMwGiNH5/asLCc1WkoDh+nYGzR1wmxtL44EKvNiavauIdTCEuqD6LMRp8q3BDrJ6 RZptUVFb1PKGrP7q6vNzRQP8eYWOekBHBJ/mt5+L0LMb1N5ydEOv1HmgA958yyl7eJ5l 11eImu5KAVSvqHzfEEtU6WL65KGnAPvs6U3veWusqa03IC35HqF/YoG4EXmT+vmbsL97 ctX3ELiuuh/JfRWQyBsL0aB8V2EbvmEYzLVRlkBXqmA2sMD1oOp/rtWvKnUiB/4b8PBo Z0oA== X-Gm-Message-State: AOJu0YyUna/Psj77s0/ATbR/LDSxcmE4ymvKJQLwNesVS/cpJACZLMEb Cb5P8+O/5Ss/2SSZpun6VdoZ+WBtxkwuxmSfZr5u4h9mBAyrqdhi8k+uVYVs7dgXTl9HinQ/xeW F X-Gm-Gg: ASbGncvUiMcfSCx1PIvz+7O9oQ+v3e8jbwH7PlByS0fYjOoagp1JjMNDJz4pRIsGHuJ SagWGEJYGxvJ4se1m1nYjISXHcB0lbAHF9NeJxr+Fa7gCqQZSKHD9s5wQ2y1xfForbbmfzcQM2H Ew81GtRCojp9Ug9n4FPoSxvrGLcQP6xeotQW5PLi22iLFazgegjb9AK0MghpU5JhsFR/sBNsgId hBWA+pZlyIZXHheWZUNCvNQdNXXwqKliFIlPqupbf9kMp2Z1Z8WEzJPeuBJUYstN8rEfHVJG1qV hlOdyVZ4ngzYSzROY1i1Cw== X-Google-Smtp-Source: AGHT+IFnuv6eSrJEFnSGoJ55pW6N8ZEy/aXetue0XOxKvCv2upMLBhB089HmsyjDVf6iCwLAHcCppg== X-Received: by 2002:a17:907:3f89:b0:aa6:9624:78fd with SMTP id a640c23a62f3a-aac3444eb22mr3253470566b.48.1735483836473; Sun, 29 Dec 2024 06:50:36 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:36 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , 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 v8 03/18] dt-bindings: clock: imx8mp: add VIDEO_PLL clocks Date: Sun, 29 Dec 2024 15:49:27 +0100 Message-ID: <20241229145027.3984542-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the name used in the RM is video_pll. So, let's add the IMX8MP_VIDEO_PLL[_*] definitions to be consistent with the RM and avoid misunderstandings. The IMX8MP_VIDEO_PLL1* constants have not been removed to ensure backward compatibility of the patch. No functional changes intended. Signed-off-by: Dario Binacchi Acked-by: Krzysztof Kozlowski --- (no changes since v6) Changes in v6: - Add 'Acked-by' tag of Krzysztof Kozlowski Changes in v5: - New include/dt-bindings/clock/imx8mp-clock.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/include/dt-bindings/clock/imx8mp-clock.h b/include/dt-bindings= /clock/imx8mp-clock.h index 7da4243984b2..3235d7de3b62 100644 --- a/include/dt-bindings/clock/imx8mp-clock.h +++ b/include/dt-bindings/clock/imx8mp-clock.h @@ -16,7 +16,8 @@ #define IMX8MP_CLK_EXT4 7 #define IMX8MP_AUDIO_PLL1_REF_SEL 8 #define IMX8MP_AUDIO_PLL2_REF_SEL 9 -#define IMX8MP_VIDEO_PLL1_REF_SEL 10 +#define IMX8MP_VIDEO_PLL_REF_SEL 10 +#define IMX8MP_VIDEO_PLL1_REF_SEL IMX8MP_VIDEO_PLL_REF_SEL #define IMX8MP_DRAM_PLL_REF_SEL 11 #define IMX8MP_GPU_PLL_REF_SEL 12 #define IMX8MP_VPU_PLL_REF_SEL 13 @@ -26,7 +27,8 @@ #define IMX8MP_SYS_PLL3_REF_SEL 17 #define IMX8MP_AUDIO_PLL1 18 #define IMX8MP_AUDIO_PLL2 19 -#define IMX8MP_VIDEO_PLL1 20 +#define IMX8MP_VIDEO_PLL 20 +#define IMX8MP_VIDEO_PLL1 IMX8MP_VIDEO_PLL #define IMX8MP_DRAM_PLL 21 #define IMX8MP_GPU_PLL 22 #define IMX8MP_VPU_PLL 23 @@ -36,7 +38,8 @@ #define IMX8MP_SYS_PLL3 27 #define IMX8MP_AUDIO_PLL1_BYPASS 28 #define IMX8MP_AUDIO_PLL2_BYPASS 29 -#define IMX8MP_VIDEO_PLL1_BYPASS 30 +#define IMX8MP_VIDEO_PLL_BYPASS 30 +#define IMX8MP_VIDEO_PLL1_BYPASS IMX8MP_VIDEO_PLL_BYPASS #define IMX8MP_DRAM_PLL_BYPASS 31 #define IMX8MP_GPU_PLL_BYPASS 32 #define IMX8MP_VPU_PLL_BYPASS 33 @@ -46,7 +49,8 @@ #define IMX8MP_SYS_PLL3_BYPASS 37 #define IMX8MP_AUDIO_PLL1_OUT 38 #define IMX8MP_AUDIO_PLL2_OUT 39 -#define IMX8MP_VIDEO_PLL1_OUT 40 +#define IMX8MP_VIDEO_PLL_OUT 40 +#define IMX8MP_VIDEO_PLL1_OUT IMX8MP_VIDEO_PLL_OUT #define IMX8MP_DRAM_PLL_OUT 41 #define IMX8MP_GPU_PLL_OUT 42 #define IMX8MP_VPU_PLL_OUT 43 --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 06B11198A06 for ; Sun, 29 Dec 2024 14:50:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483842; cv=none; b=uQq61Rz31m0WriTa2vycgvPDmhGVaBTseZr+3cbzScxX0rq2Pdr0ZLSxQRN2Plvvm4SaMMKWdFIR8b0TCRVzL2WAlwdMpMWlwwCVp3Ul+cvDg+z0LJrIhZQl4NGktIQV6QQOGC39Ae1YaSAcZ0HPH/mQRqsE0NjlJQ7gY2KOmBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483842; c=relaxed/simple; bh=7RmVN+XzoBMcz32cPIl1lXCb7gA5PPehFOz0mPb+bqk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lAn4w6zcoxYbiJ+IAI2Jztv06hebTJkzHSMEbgxU92ppAiMwaprHBCmrODdXHTEXJ82tSi9mWytU2F8uSNjT0VDKu9f4isMgBy5e1hLNieTVliOr0bIm+bIFWDlkj+b1AMG18VRT04IODnDXPWWr3we8Lp+cCx26G3xpfO/6cHg= 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=U0kcLcP8; arc=none smtp.client-ip=209.85.218.44 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="U0kcLcP8" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-aaeef97ff02so714201066b.1 for ; Sun, 29 Dec 2024 06:50:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483838; x=1736088638; 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=yMzd3DeVbU8dPsBbG7RBr+wvV0wa6aisDkctbx2isA0=; b=U0kcLcP84fmIME6NalAXuVz1nHZk97b3tSIwrnttHCy0Gg4MqLJ7NG/59KVZnQZPvG FOOe5lAsRolpW9lnPgmvtHZl8V3pwpcb6ikXcgLqA4kAAFD3IABauvWOL/Jd6gMBOQc7 Hj1tDDBWKj03HaZDljcSE330Na7S5vFl6JgEM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483838; x=1736088638; 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=yMzd3DeVbU8dPsBbG7RBr+wvV0wa6aisDkctbx2isA0=; b=pvd2ZSRn7s3BucIQ4fse3FvrB2Cro8Zb86egpWbHAavltjKhIFOvgk0UCWl+0x4SE2 HcIJTB5AlD1XBMlFRjK5k2NJj4uiDsYaxxSxNG7NiOEgMMh2JMo1/QWxsuZzt4gco15n DTCwSTBhdsBPybhZUshsORnyX+QUSz/FrLh9FzfrfGxKzlr7KHxWUJMGN3axqNp5wGY5 gpDehoKDPlBN2TqXcmsOBvls9TFGGFh5RNYO0UvTg67MgzlmjrTnX03SSRztrJeI4iRC k5GLmBfoedeYK8ZOpttYBCPsSfdCCASlvzMXFIhmqYkr8Gt5ME7RabMhJ1gqU6ocmBUn 85wA== X-Gm-Message-State: AOJu0YxPz9jogydjGsdXTwVk26vxptNCASCriY7T5EnvlGrnTmce0LMt 2Z8Gw3cSjpvBe3bnl+dYq6+3utZ/nFs3Hmr/XIA3UimJAofg24tER24M33lODVEvpFuvNK/29Dj n X-Gm-Gg: ASbGncvk/Xf3wzoD8KkUmpfgPC+oG3SBlHXErq5nmXjF540tUEJ6xZfZpPN6SICFtPg zv94B94+UbewruwSUleETTKdgw7W83a3ePQYb1xiuaJndcDIbT8pwKH89P/gbdPdNehnv//6uyv mRQHw2vozM3wafsj2PQI2dye6/2S4pNQtXRPDwEY9UTQirkTftcNAhgPrmbOtWU39RFDUBaWCJY 4TGB6+k2V02eZvgvAYUqFmmtkzkaHY3pehg+uH7DzD6p8malPqMVEjQcczkG819AO8umctdrZ23 Fm8giG6aQus6zPkBe7XRNA== X-Google-Smtp-Source: AGHT+IGjlO1RrpGgFA/+LI6vSdlePSfvSm9HVu/w1zMVVIGheKrtY+0TrAIq/8evJwbvb8Vb4pEx+A== X-Received: by 2002:a17:907:9805:b0:aaf:117f:1918 with SMTP id a640c23a62f3a-aaf117f1d51mr1305159066b.5.1735483838086; Sun, 29 Dec 2024 06:50:38 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:37 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Peng Fan , Abel Vesa , Fabio Estevam , Michael Turquette , 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 v8 04/18] clk: imx8mp: rename video_pll1 to video_pll Date: Sun, 29 Dec 2024 15:49:28 +0100 Message-ID: <20241229145027.3984542-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Unlike audio_pll1 and audio_pll2, there is no video_pll2. Further, the name used in the RM is video_pll. So, let's rename "video_pll1" to "video_pll" to be consistent with the RM and avoid misunderstandings. No functional changes intended. Signed-off-by: Dario Binacchi Reviewed-by: Peng Fan --- The patch, which simply replaces video_pll1 with video_pll, highlights many warnings raised by checkpatch.pl. These are not generated by the changes made but are inherited from how the module was originally written. Fixing them would have meant "obscuring" the actual changes introduced. (no changes since v7) Changes in v7: - Add 'Reviewed-by' tag of Peng Fan Changes in v5: - Split the patch dropping the dt-bindings changes. Changes in v4: - New drivers/clk/imx/clk-imx8mp.c | 118 +++++++++++++++++------------------ 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c index 516dbd170c8a..e96460534e7d 100644 --- a/drivers/clk/imx/clk-imx8mp.c +++ b/drivers/clk/imx/clk-imx8mp.c @@ -23,7 +23,7 @@ static u32 share_count_audio; static const char * const pll_ref_sels[] =3D { "osc_24m", "dummy", "dummy"= , "dummy", }; static const char * const audio_pll1_bypass_sels[] =3D {"audio_pll1", "aud= io_pll1_ref_sel", }; static const char * const audio_pll2_bypass_sels[] =3D {"audio_pll2", "aud= io_pll2_ref_sel", }; -static const char * const video_pll1_bypass_sels[] =3D {"video_pll1", "vid= eo_pll1_ref_sel", }; +static const char * const video_pll_bypass_sels[] =3D {"video_pll", "video= _pll_ref_sel", }; static const char * const dram_pll_bypass_sels[] =3D {"dram_pll", "dram_pl= l_ref_sel", }; static const char * const gpu_pll_bypass_sels[] =3D {"gpu_pll", "gpu_pll_r= ef_sel", }; static const char * const vpu_pll_bypass_sels[] =3D {"vpu_pll", "vpu_pll_r= ef_sel", }; @@ -40,27 +40,27 @@ static const char * const imx8mp_a53_core_sels[] =3D {"= arm_a53_div", "arm_pll_out" =20 static const char * const imx8mp_m7_sels[] =3D {"osc_24m", "sys_pll2_200m"= , "sys_pll2_250m", "vpu_pll_out", "sys_pll1_800m", "audio_pll1_out", - "video_pll1_out", "sys_pll3_out", }; + "video_pll_out", "sys_pll3_out", }; =20 static const char * const imx8mp_ml_sels[] =3D {"osc_24m", "gpu_pll_out", = "sys_pll1_800m", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_gpu3d_core_sels[] =3D {"osc_24m", "gpu_pl= l_out", "sys_pll1_800m", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_gpu3d_shader_sels[] =3D {"osc_24m", "gpu_= pll_out", "sys_pll1_800m", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_gpu2d_sels[] =3D {"osc_24m", "gpu_pll_out= ", "sys_pll1_800m", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_audio_axi_sels[] =3D {"osc_24m", "gpu_pll= _out", "sys_pll1_800m", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_hsio_axi_sels[] =3D {"osc_24m", "sys_pll2= _500m", "sys_pll1_800m", "sys_pll2_100m", "sys_pll2_200m", "clk_ext2", @@ -72,11 +72,11 @@ static const char * const imx8mp_media_isp_sels[] =3D {= "osc_24m", "sys_pll2_1000m" =20 static const char * const imx8mp_main_axi_sels[] =3D {"osc_24m", "sys_pll2= _333m", "sys_pll1_800m", "sys_pll2_250m", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "sys_pll1_100m",}; + "video_pll_out", "sys_pll1_100m",}; =20 static const char * const imx8mp_enet_axi_sels[] =3D {"osc_24m", "sys_pll1= _266m", "sys_pll1_800m", "sys_pll2_250m", "sys_pll2_200m", "audio_pll1_out", - "video_pll1_out", "sys_pll3_out", }; + "video_pll_out", "sys_pll3_out", }; =20 static const char * const imx8mp_nand_usdhc_sels[] =3D {"osc_24m", "sys_pl= l1_266m", "sys_pll1_800m", "sys_pll2_200m", "sys_pll1_133m", "sys_pll3_out", @@ -96,35 +96,35 @@ static const char * const imx8mp_media_apb_sels[] =3D {= "osc_24m", "sys_pll2_125m", =20 static const char * const imx8mp_gpu_axi_sels[] =3D {"osc_24m", "sys_pll1_= 800m", "gpu_pll_out", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_gpu_ahb_sels[] =3D {"osc_24m", "sys_pll1_= 800m", "gpu_pll_out", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_noc_sels[] =3D {"osc_24m", "sys_pll1_800m= ", "sys_pll3_out", "sys_pll2_1000m", "sys_pll2_500m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_noc_io_sels[] =3D {"osc_24m", "sys_pll1_8= 00m", "sys_pll3_out", "sys_pll2_1000m", "sys_pll2_500m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_ml_axi_sels[] =3D {"osc_24m", "sys_pll1_8= 00m", "gpu_pll_out", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_ml_ahb_sels[] =3D {"osc_24m", "sys_pll1_8= 00m", "gpu_pll_out", "sys_pll3_out", "sys_pll2_1000m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_ahb_sels[] =3D {"osc_24m", "sys_pll1_133m= ", "sys_pll1_800m", "sys_pll1_400m", "sys_pll2_125m", "sys_pll3_out", - "audio_pll1_out", "video_pll1_out", }; + "audio_pll1_out", "video_pll_out", }; =20 static const char * const imx8mp_audio_ahb_sels[] =3D {"osc_24m", "sys_pll= 2_500m", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll2_166m", "sys_pll3_out", - "audio_pll1_out", "video_pll1_out", }; + "audio_pll1_out", "video_pll_out", }; =20 static const char * const imx8mp_mipi_dsi_esc_rx_sels[] =3D {"osc_24m", "s= ys_pll2_100m", "sys_pll1_80m", "sys_pll1_800m", "sys_pll2_1000m", @@ -159,56 +159,56 @@ static const char * const imx8mp_pcie_aux_sels[] =3D = {"osc_24m", "sys_pll2_200m", "sys_pll1_160m", "sys_pll1_200m", }; =20 static const char * const imx8mp_i2c5_sels[] =3D {"osc_24m", "sys_pll1_160= m", "sys_pll2_50m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char * const imx8mp_i2c6_sels[] =3D {"osc_24m", "sys_pll1_160= m", "sys_pll2_50m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char * const imx8mp_sai1_sels[] =3D {"osc_24m", "audio_pll1_o= ut", "audio_pll2_out", - "video_pll1_out", "sys_pll1_133m", "osc_hdmi", + "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext1", "clk_ext2", }; =20 static const char * const imx8mp_sai2_sels[] =3D {"osc_24m", "audio_pll1_o= ut", "audio_pll2_out", - "video_pll1_out", "sys_pll1_133m", "osc_hdmi", + "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext2", "clk_ext3", }; =20 static const char * const imx8mp_sai3_sels[] =3D {"osc_24m", "audio_pll1_o= ut", "audio_pll2_out", - "video_pll1_out", "sys_pll1_133m", "osc_hdmi", + "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext3", "clk_ext4", }; =20 static const char * const imx8mp_sai5_sels[] =3D {"osc_24m", "audio_pll1_o= ut", "audio_pll2_out", - "video_pll1_out", "sys_pll1_133m", "osc_hdmi", + "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext2", "clk_ext3", }; =20 static const char * const imx8mp_sai6_sels[] =3D {"osc_24m", "audio_pll1_o= ut", "audio_pll2_out", - "video_pll1_out", "sys_pll1_133m", "osc_hdmi", + "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext3", "clk_ext4", }; =20 static const char * const imx8mp_enet_qos_sels[] =3D {"osc_24m", "sys_pll2= _125m", "sys_pll2_50m", "sys_pll2_100m", "sys_pll1_160m", "audio_pll1_out", - "video_pll1_out", "clk_ext4", }; + "video_pll_out", "clk_ext4", }; =20 static const char * const imx8mp_enet_qos_timer_sels[] =3D {"osc_24m", "sy= s_pll2_100m", "audio_pll1_out", "clk_ext1", "clk_ext2", "clk_ext3", - "clk_ext4", "video_pll1_out", }; + "clk_ext4", "video_pll_out", }; =20 static const char * const imx8mp_enet_ref_sels[] =3D {"osc_24m", "sys_pll2= _125m", "sys_pll2_50m", "sys_pll2_100m", "sys_pll1_160m", "audio_pll1_out", - "video_pll1_out", "clk_ext4", }; + "video_pll_out", "clk_ext4", }; =20 static const char * const imx8mp_enet_timer_sels[] =3D {"osc_24m", "sys_pl= l2_100m", "audio_pll1_out", "clk_ext1", "clk_ext2", "clk_ext3", - "clk_ext4", "video_pll1_out", }; + "clk_ext4", "video_pll_out", }; =20 static const char * const imx8mp_enet_phy_ref_sels[] =3D {"osc_24m", "sys_= pll2_50m", "sys_pll2_125m", "sys_pll2_200m", "sys_pll2_500m", "audio_pll1_out", - "video_pll1_out", "audio_pll2_out", }; + "video_pll_out", "audio_pll2_out", }; =20 static const char * const imx8mp_nand_sels[] =3D {"osc_24m", "sys_pll2_500= m", "audio_pll1_out", "sys_pll1_400m", "audio_pll2_out", "sys_pll3_out", - "sys_pll2_250m", "video_pll1_out", }; + "sys_pll2_250m", "video_pll_out", }; =20 static const char * const imx8mp_qspi_sels[] =3D {"osc_24m", "sys_pll1_400= m", "sys_pll2_333m", "sys_pll2_500m", "audio_pll2_out", "sys_pll1_266m", @@ -223,19 +223,19 @@ static const char * const imx8mp_usdhc2_sels[] =3D {"= osc_24m", "sys_pll1_400m", "s "audio_pll2_out", "sys_pll1_100m", }; =20 static const char * const imx8mp_i2c1_sels[] =3D {"osc_24m", "sys_pll1_160= m", "sys_pll2_50m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char * const imx8mp_i2c2_sels[] =3D {"osc_24m", "sys_pll1_160= m", "sys_pll2_50m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char * const imx8mp_i2c3_sels[] =3D {"osc_24m", "sys_pll1_160= m", "sys_pll2_50m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char * const imx8mp_i2c4_sels[] =3D {"osc_24m", "sys_pll1_160= m", "sys_pll2_50m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char * const imx8mp_uart1_sels[] =3D {"osc_24m", "sys_pll1_80= m", "sys_pll2_200m", @@ -276,42 +276,42 @@ static const char * const imx8mp_ecspi2_sels[] =3D {"= osc_24m", "sys_pll2_200m", "s =20 static const char * const imx8mp_pwm1_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_160m", "sys_pll1_40m", "sys_pll3_out", "clk_ext1", - "sys_pll1_80m", "video_pll1_out", }; + "sys_pll1_80m", "video_pll_out", }; =20 static const char * const imx8mp_pwm2_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_160m", "sys_pll1_40m", "sys_pll3_out", "clk_ext1", - "sys_pll1_80m", "video_pll1_out", }; + "sys_pll1_80m", "video_pll_out", }; =20 static const char * const imx8mp_pwm3_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_160m", "sys_pll1_40m", "sys_pll3_out", "clk_ext2", - "sys_pll1_80m", "video_pll1_out", }; + "sys_pll1_80m", "video_pll_out", }; =20 static const char * const imx8mp_pwm4_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_160m", "sys_pll1_40m", "sys_pll3_out", "clk_ext2", - "sys_pll1_80m", "video_pll1_out", }; + "sys_pll1_80m", "video_pll_out", }; =20 static const char * const imx8mp_gpt1_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_400m", - "sys_pll1_40m", "video_pll1_out", "sys_pll1_80m", + "sys_pll1_40m", "video_pll_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext1" }; =20 static const char * const imx8mp_gpt2_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_400m", - "sys_pll1_40m", "video_pll1_out", "sys_pll1_80m", + "sys_pll1_40m", "video_pll_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext2" }; =20 static const char * const imx8mp_gpt3_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_400m", - "sys_pll1_40m", "video_pll1_out", "sys_pll1_80m", + "sys_pll1_40m", "video_pll_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext3" }; =20 static const char * const imx8mp_gpt4_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_400m", - "sys_pll1_40m", "video_pll1_out", "sys_pll1_80m", + "sys_pll1_40m", "video_pll_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext1" }; =20 static const char * const imx8mp_gpt5_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_400m", - "sys_pll1_40m", "video_pll1_out", "sys_pll1_80m", + "sys_pll1_40m", "video_pll_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext2" }; =20 static const char * const imx8mp_gpt6_sels[] =3D {"osc_24m", "sys_pll2_100= m", "sys_pll1_400m", - "sys_pll1_40m", "video_pll1_out", "sys_pll1_80m", + "sys_pll1_40m", "video_pll_out", "sys_pll1_80m", "audio_pll1_out", "clk_ext3" }; =20 static const char * const imx8mp_wdog_sels[] =3D {"osc_24m", "sys_pll1_133= m", "sys_pll1_160m", @@ -328,19 +328,19 @@ static const char * const imx8mp_ipp_do_clko1_sels[] = =3D {"osc_24m", "sys_pll1_800 =20 static const char * const imx8mp_ipp_do_clko2_sels[] =3D {"osc_24m", "sys_= pll2_200m", "sys_pll1_400m", "sys_pll1_166m", "sys_pll3_out", "audio_pll1_out", - "video_pll1_out", "osc_32k" }; + "video_pll_out", "osc_32k" }; =20 static const char * const imx8mp_hdmi_fdcc_tst_sels[] =3D {"osc_24m", "sys= _pll1_266m", "sys_pll2_250m", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", - "audio_pll2_out", "video_pll1_out", }; + "audio_pll2_out", "video_pll_out", }; =20 static const char * const imx8mp_hdmi_24m_sels[] =3D {"osc_24m", "sys_pll1= _160m", "sys_pll2_50m", - "sys_pll3_out", "audio_pll1_out", "video_pll1_out", + "sys_pll3_out", "audio_pll1_out", "video_pll_out", "audio_pll2_out", "sys_pll1_133m", }; =20 static const char * const imx8mp_hdmi_ref_266m_sels[] =3D {"osc_24m", "sys= _pll1_400m", "sys_pll3_out", "sys_pll2_333m", "sys_pll1_266m", "sys_pll2_200m", - "audio_pll1_out", "video_pll1_out", }; + "audio_pll1_out", "video_pll_out", }; =20 static const char * const imx8mp_usdhc3_sels[] =3D {"osc_24m", "sys_pll1_4= 00m", "sys_pll1_800m", "sys_pll2_500m", "sys_pll3_out", "sys_pll1_266m", @@ -349,26 +349,26 @@ static const char * const imx8mp_usdhc3_sels[] =3D {"= osc_24m", "sys_pll1_400m", "s static const char * const imx8mp_media_cam1_pix_sels[] =3D {"osc_24m", "sy= s_pll1_266m", "sys_pll2_250m", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", - "video_pll1_out", }; + "video_pll_out", }; =20 static const char * const imx8mp_media_mipi_phy1_ref_sels[] =3D {"osc_24m"= , "sys_pll2_333m", "sys_pll2_100m", "sys_pll1_800m", "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", - "video_pll1_out", }; + "video_pll_out", }; =20 -static const char * const imx8mp_media_disp_pix_sels[] =3D {"osc_24m", "vi= deo_pll1_out", "audio_pll2_out", +static const char * const imx8mp_media_disp_pix_sels[] =3D {"osc_24m", "vi= deo_pll_out", "audio_pll2_out", "audio_pll1_out", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", "clk_ext4", }; =20 static const char * const imx8mp_media_cam2_pix_sels[] =3D {"osc_24m", "sy= s_pll1_266m", "sys_pll2_250m", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", "audio_pll2_out", - "video_pll1_out", }; + "video_pll_out", }; =20 static const char * const imx8mp_media_ldb_sels[] =3D {"osc_24m", "sys_pll= 2_333m", "sys_pll2_100m", "sys_pll1_800m", "sys_pll2_1000m", "clk_ext2", "audio_pll2_out", - "video_pll1_out", }; + "video_pll_out", }; =20 static const char * const imx8mp_memrepair_sels[] =3D {"osc_24m", "sys_pll= 2_100m", "sys_pll1_80m", "sys_pll1_800m", "sys_pll2_1000m", "sys_pll3_out", @@ -392,12 +392,12 @@ static const char * const imx8mp_vpu_vc8000e_sels[] = =3D {"osc_24m", "vpu_pll_out", "sys_pll3_out", "audio_pll1_out", }; =20 static const char * const imx8mp_sai7_sels[] =3D {"osc_24m", "audio_pll1_o= ut", "audio_pll2_out", - "video_pll1_out", "sys_pll1_133m", "osc_hdmi", + "video_pll_out", "sys_pll1_133m", "osc_hdmi", "clk_ext3", "clk_ext4", }; =20 static const char * const imx8mp_dram_core_sels[] =3D {"dram_pll_out", "dr= am_alt_root", }; =20 -static const char * const imx8mp_clkout_sels[] =3D {"audio_pll1_out", "aud= io_pll2_out", "video_pll1_out", +static const char * const imx8mp_clkout_sels[] =3D {"audio_pll1_out", "aud= io_pll2_out", "video_pll_out", "dummy", "dummy", "gpu_pll_out", "vpu_pll_out", "arm_pll_out", "sys_pll1", "sys_pll2", "sys_pll3", "dummy", "dummy", "osc_24m", "dummy", "osc_32k"}; @@ -440,7 +440,7 @@ static int imx8mp_clocks_probe(struct platform_device *= pdev) =20 hws[IMX8MP_AUDIO_PLL1_REF_SEL] =3D imx_clk_hw_mux("audio_pll1_ref_sel", a= natop_base + 0x0, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MP_AUDIO_PLL2_REF_SEL] =3D imx_clk_hw_mux("audio_pll2_ref_sel", a= natop_base + 0x14, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MP_VIDEO_PLL1_REF_SEL] =3D imx_clk_hw_mux("video_pll1_ref_sel", a= natop_base + 0x28, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MP_VIDEO_PLL_REF_SEL] =3D imx_clk_hw_mux("video_pll_ref_sel", ana= top_base + 0x28, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MP_DRAM_PLL_REF_SEL] =3D imx_clk_hw_mux("dram_pll_ref_sel", anato= p_base + 0x50, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MP_GPU_PLL_REF_SEL] =3D imx_clk_hw_mux("gpu_pll_ref_sel", anatop_= base + 0x64, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); hws[IMX8MP_VPU_PLL_REF_SEL] =3D imx_clk_hw_mux("vpu_pll_ref_sel", anatop_= base + 0x74, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); @@ -451,7 +451,7 @@ static int imx8mp_clocks_probe(struct platform_device *= pdev) =20 hws[IMX8MP_AUDIO_PLL1] =3D imx_clk_hw_pll14xx("audio_pll1", "audio_pll1_r= ef_sel", anatop_base, &imx_1443x_pll); hws[IMX8MP_AUDIO_PLL2] =3D imx_clk_hw_pll14xx("audio_pll2", "audio_pll2_r= ef_sel", anatop_base + 0x14, &imx_1443x_pll); - hws[IMX8MP_VIDEO_PLL1] =3D imx_clk_hw_pll14xx("video_pll1", "video_pll1_r= ef_sel", anatop_base + 0x28, &imx_1443x_pll); + hws[IMX8MP_VIDEO_PLL] =3D imx_clk_hw_pll14xx("video_pll", "video_pll_ref_= sel", anatop_base + 0x28, &imx_1443x_pll); hws[IMX8MP_DRAM_PLL] =3D imx_clk_hw_pll14xx("dram_pll", "dram_pll_ref_sel= ", anatop_base + 0x50, &imx_1443x_dram_pll); hws[IMX8MP_GPU_PLL] =3D imx_clk_hw_pll14xx("gpu_pll", "gpu_pll_ref_sel", = anatop_base + 0x64, &imx_1416x_pll); hws[IMX8MP_VPU_PLL] =3D imx_clk_hw_pll14xx("vpu_pll", "vpu_pll_ref_sel", = anatop_base + 0x74, &imx_1416x_pll); @@ -462,7 +462,7 @@ static int imx8mp_clocks_probe(struct platform_device *= pdev) =20 hws[IMX8MP_AUDIO_PLL1_BYPASS] =3D imx_clk_hw_mux_flags("audio_pll1_bypass= ", anatop_base, 16, 1, audio_pll1_bypass_sels, ARRAY_SIZE(audio_pll1_bypass= _sels), CLK_SET_RATE_PARENT); hws[IMX8MP_AUDIO_PLL2_BYPASS] =3D imx_clk_hw_mux_flags("audio_pll2_bypass= ", anatop_base + 0x14, 16, 1, audio_pll2_bypass_sels, ARRAY_SIZE(audio_pll2= _bypass_sels), CLK_SET_RATE_PARENT); - hws[IMX8MP_VIDEO_PLL1_BYPASS] =3D imx_clk_hw_mux_flags("video_pll1_bypass= ", anatop_base + 0x28, 16, 1, video_pll1_bypass_sels, ARRAY_SIZE(video_pll1= _bypass_sels), CLK_SET_RATE_PARENT); + hws[IMX8MP_VIDEO_PLL_BYPASS] =3D imx_clk_hw_mux_flags("video_pll_bypass",= anatop_base + 0x28, 16, 1, video_pll_bypass_sels, ARRAY_SIZE(video_pll_byp= ass_sels), CLK_SET_RATE_PARENT); hws[IMX8MP_DRAM_PLL_BYPASS] =3D imx_clk_hw_mux_flags("dram_pll_bypass", a= natop_base + 0x50, 16, 1, dram_pll_bypass_sels, ARRAY_SIZE(dram_pll_bypass_= sels), CLK_SET_RATE_PARENT); hws[IMX8MP_GPU_PLL_BYPASS] =3D imx_clk_hw_mux_flags("gpu_pll_bypass", ana= top_base + 0x64, 28, 1, gpu_pll_bypass_sels, ARRAY_SIZE(gpu_pll_bypass_sels= ), CLK_SET_RATE_PARENT); hws[IMX8MP_VPU_PLL_BYPASS] =3D imx_clk_hw_mux_flags("vpu_pll_bypass", ana= top_base + 0x74, 28, 1, vpu_pll_bypass_sels, ARRAY_SIZE(vpu_pll_bypass_sels= ), CLK_SET_RATE_PARENT); @@ -473,7 +473,7 @@ static int imx8mp_clocks_probe(struct platform_device *= pdev) =20 hws[IMX8MP_AUDIO_PLL1_OUT] =3D imx_clk_hw_gate("audio_pll1_out", "audio_p= ll1_bypass", anatop_base, 13); hws[IMX8MP_AUDIO_PLL2_OUT] =3D imx_clk_hw_gate("audio_pll2_out", "audio_p= ll2_bypass", anatop_base + 0x14, 13); - hws[IMX8MP_VIDEO_PLL1_OUT] =3D imx_clk_hw_gate("video_pll1_out", "video_p= ll1_bypass", anatop_base + 0x28, 13); + hws[IMX8MP_VIDEO_PLL_OUT] =3D imx_clk_hw_gate("video_pll_out", "video_pll= _bypass", anatop_base + 0x28, 13); hws[IMX8MP_DRAM_PLL_OUT] =3D imx_clk_hw_gate("dram_pll_out", "dram_pll_by= pass", anatop_base + 0x50, 13); hws[IMX8MP_GPU_PLL_OUT] =3D imx_clk_hw_gate("gpu_pll_out", "gpu_pll_bypas= s", anatop_base + 0x64, 11); hws[IMX8MP_VPU_PLL_OUT] =3D imx_clk_hw_gate("vpu_pll_out", "vpu_pll_bypas= s", anatop_base + 0x74, 11); --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 B75B0191F74 for ; Sun, 29 Dec 2024 14:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483843; cv=none; b=Q+GgqOi8aUH38mA2+2OZKMV7APwEDxyD9qwAO+ZOSyharZGbed5ErRalhX/lFtivswV64d9eDGvFzUWbIjZY6DluCi/BK49safktUlEqgC4NfZniG4EYLgbgf/KFiSxoatPFGW77fOUqJN20QhJrTH4yD4Qv5wheL6UkyZkwx3c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483843; c=relaxed/simple; bh=yzCgb+8exvG1QLnKJjYoUr8BJCg4DBti7sbXPOVT/90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G59kqlAz537R5gTZYm0WnoiVJ9Rj5sP1NVGS6tRDUeFMLvV9debSS2yjkLXOMQ1OrqrOEOsI3VK0WhQGOxG5FUX/8YwlooeRuWhSnidglHmhRO+UTXCZQ1/ZaV0J+V6SCWLgYbcJUwxsqVYQzNixo3w6TApC0Tmy0OAAqd4oJ/Y= 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=AL6/ejhv; arc=none smtp.client-ip=209.85.218.44 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="AL6/ejhv" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-aa696d3901bso789841266b.1 for ; Sun, 29 Dec 2024 06:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483840; x=1736088640; 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=xBVFA3tzS1bXJbCiJCU1B6IsR8mJkZI1gbjF/bIgONM=; b=AL6/ejhvTiNDwRMcU+s8ko0ILtExt8avl1OMT+FIi+8TEDr8AqCdO9+C6Xg/XU80PH Iu74avPR89wi/pqp1xyCl7HXAS18dXEf6jDJXm1jkmltGdfrp/2iUqFVC12k3VoEqhvj X+9QQ2m0wb5x3M4WiZZvjlPugZCztWH+Wuf7Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483840; x=1736088640; 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=xBVFA3tzS1bXJbCiJCU1B6IsR8mJkZI1gbjF/bIgONM=; b=p+cTIlywe3VwslsPZbvQ0+RygFSTsSZkGkT51V2ZLklEQlvhbGyD+W+bPLMPaZy3E7 ZdSBm1COos9G7lgbk8HA4Jn40O/br4Uu+v99fRuKMHgQNtnHrzxeejJEfXr9dqxxfiuP 70hnkkKbk26rj2rl55zcCeE/xO8nhre8Pi+kM8NvYOhS5u7lmGqgESBzRkusJIMUVJ2Y h55hFcqbEktezlCtnBPUPG9VNNIyFypxx0xV92xuWke0+XZ0+KIa9dgZNPf79VQavsU9 2+7aNCjxd0pDxlzT6Ed8PGS4dSYNC4LIjKDsc+OJ0gxCWpWJkDZenyhutwiZ2EanlLNh lqAw== X-Gm-Message-State: AOJu0YyfdkmeGqXU1qHTZxM5kN7Hf7BEtrXHHD/lPl02HjjC4AsSBMkl ag9vFSadDeY3+azMEA6v08/8bwWcHIVIsU39+uUoKLoZLcEKgBHq2/IljLz4P3dmavWv73TNj9M m X-Gm-Gg: ASbGncussQXMqKtO/UeGvVBXsqf+Hr1nWuaGqHQZFiUlib4rBCZ6gI0H6aihod3W2vU J8nAKvQ0YBQBbz9creOqEOrUFmmzV8fISaPx9byCZfduov9Wcs3E7SzIkKvt5/tf5uCMuL6K7U1 pTrQjWBXwdf9wKJStIL+MWvPrngLHikMEuGaOFZ8nMC0dJt+CuMv26f39BunvtZ031XNmUWCVN8 gYWRfJYFlvLbRUGkbSSsfUydni70+EOlYWEm2+lX7JPjKftaTtfYlm86kgZL5cNIXnbGEdjZ1bq /OjlgWIR632CgbA7HDqj6g== X-Google-Smtp-Source: AGHT+IEIf4U61sxeeHXLM/EgWVX8dQHDikp+oyp0/3nTSdsHTbTFCB8ZPYMgg4wewSXgfz435sDQrw== X-Received: by 2002:a17:907:c084:b0:aae:82b4:4691 with SMTP id a640c23a62f3a-aae82b4788fmr2345611766b.25.1735483839899; Sun, 29 Dec 2024 06:50:39 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:39 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , 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 v8 05/18] dt-bindings: clock: imx8m-anatop: add oscillators and PLLs Date: Sun, 29 Dec 2024 15:49:29 +0100 Message-ID: <20241229145027.3984542-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Though adding clocks and clock-names properties will break the ABI, it is required to accurately describe the hardware. Indeed, the anatop module uses the input oscillators to generate various PLLs. In turn, the Clock Control Module (CCM) receives clocks from the PLLs and oscillators and generates clocks for on-chip peripherals. Furthermore, as agreed in [1], this change represents the first step toward the implementation of the anatop driver. Currently, in fact, there is no dedicated anatop driver, but the CCM driver parses the anatop node and registers the PLLs it produces. [1] https://lore.kernel.org/imx/20241106090549.3684963-1-dario.binacchi@ama= rulasolutions.com/ Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski --- (no changes since v7) Changes in v7: - Add 'Reviewed-by' tag of Krzysztof Kozlowski Changes in v6: - Improve commit message - Merge it with patch 10, 11, and 12: - 10/20 dt-bindings: clock: imx8mm: add binding definitions for anatop - 11/20 dt-bindings: clock: imx8mn: add binding definitions for anatop - 12/20 dt-bindings: clock: imx8mp: add binding definitions for anatop Changes in v4: - New .../bindings/clock/fsl,imx8m-anatop.yaml | 53 ++++++++++++++- include/dt-bindings/clock/imx8mm-clock.h | 64 +++++++++++++++++ include/dt-bindings/clock/imx8mn-clock.h | 64 +++++++++++++++++ include/dt-bindings/clock/imx8mp-clock.h | 68 +++++++++++++++++++ 4 files changed, 248 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml = b/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml index bbd22e95b319..f439b0a94ce2 100644 --- a/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml +++ b/Documentation/devicetree/bindings/clock/fsl,imx8m-anatop.yaml @@ -30,22 +30,73 @@ properties: interrupts: maxItems: 1 =20 + clocks: + minItems: 2 + maxItems: 3 + + clock-names: + minItems: 2 + maxItems: 3 + '#clock-cells': const: 1 =20 required: - compatible - reg + - clocks + - clock-names - '#clock-cells' =20 +allOf: + - if: + properties: + compatible: + contains: + const: fsl,imx8mq-anatop + then: + properties: + clocks: + items: + - description: 32k osc + - description: 25m osc + - description: 27m osc + clock-names: + items: + - const: ckil + - const: osc_25m + - const: osc_27m + else: + properties: + clocks: + items: + - description: 32k osc + - description: 24m osc + + clock-names: + items: + - const: osc_32k + - const: osc_24m + additionalProperties: false =20 examples: - | - anatop: clock-controller@30360000 { + clock-controller@30360000 { compatible =3D "fsl,imx8mn-anatop", "fsl,imx8mm-anatop"; reg =3D <0x30360000 0x10000>; #clock-cells =3D <1>; + clocks =3D <&osc_32k>, <&osc_24m>; + clock-names =3D "osc_32k", "osc_24m"; + }; + + - | + clock-controller@30360000 { + compatible =3D "fsl,imx8mq-anatop"; + reg =3D <0x30360000 0x10000>; + #clock-cells =3D <1>; + clocks =3D <&ckil>, <&osc_25m>, <&osc_27m>; + clock-names =3D "ckil", "osc_25m", "osc_27m"; }; =20 ... diff --git a/include/dt-bindings/clock/imx8mm-clock.h b/include/dt-bindings= /clock/imx8mm-clock.h index 102d8a6cdb55..017c06e48430 100644 --- a/include/dt-bindings/clock/imx8mm-clock.h +++ b/include/dt-bindings/clock/imx8mm-clock.h @@ -287,4 +287,68 @@ =20 #define IMX8MM_CLK_END 258 =20 +#define IMX8MM_ANATOP_CLK_DUMMY 0 +#define IMX8MM_ANATOP_CLK_32K 1 +#define IMX8MM_ANATOP_CLK_24M 2 +#define IMX8MM_ANATOP_AUDIO_PLL1_REF_SEL 3 +#define IMX8MM_ANATOP_AUDIO_PLL2_REF_SEL 4 +#define IMX8MM_ANATOP_VIDEO_PLL_REF_SEL 5 +#define IMX8MM_ANATOP_DRAM_PLL_REF_SEL 6 +#define IMX8MM_ANATOP_GPU_PLL_REF_SEL 7 +#define IMX8MM_ANATOP_VPU_PLL_REF_SEL 8 +#define IMX8MM_ANATOP_ARM_PLL_REF_SEL 9 +#define IMX8MM_ANATOP_SYS_PLL3_REF_SEL 10 +#define IMX8MM_ANATOP_AUDIO_PLL1 11 +#define IMX8MM_ANATOP_AUDIO_PLL2 12 +#define IMX8MM_ANATOP_VIDEO_PLL 13 +#define IMX8MM_ANATOP_DRAM_PLL 14 +#define IMX8MM_ANATOP_GPU_PLL 15 +#define IMX8MM_ANATOP_VPU_PLL 16 +#define IMX8MM_ANATOP_ARM_PLL 17 +#define IMX8MM_ANATOP_SYS_PLL1 18 +#define IMX8MM_ANATOP_SYS_PLL2 19 +#define IMX8MM_ANATOP_SYS_PLL3 20 +#define IMX8MM_ANATOP_AUDIO_PLL1_BYPASS 21 +#define IMX8MM_ANATOP_AUDIO_PLL2_BYPASS 22 +#define IMX8MM_ANATOP_VIDEO_PLL_BYPASS 23 +#define IMX8MM_ANATOP_DRAM_PLL_BYPASS 24 +#define IMX8MM_ANATOP_GPU_PLL_BYPASS 25 +#define IMX8MM_ANATOP_VPU_PLL_BYPASS 26 +#define IMX8MM_ANATOP_ARM_PLL_BYPASS 27 +#define IMX8MM_ANATOP_SYS_PLL3_BYPASS 28 +#define IMX8MM_ANATOP_AUDIO_PLL1_OUT 29 +#define IMX8MM_ANATOP_AUDIO_PLL2_OUT 30 +#define IMX8MM_ANATOP_VIDEO_PLL_OUT 31 +#define IMX8MM_ANATOP_DRAM_PLL_OUT 32 +#define IMX8MM_ANATOP_GPU_PLL_OUT 33 +#define IMX8MM_ANATOP_VPU_PLL_OUT 34 +#define IMX8MM_ANATOP_ARM_PLL_OUT 35 +#define IMX8MM_ANATOP_SYS_PLL3_OUT 36 +#define IMX8MM_ANATOP_SYS_PLL1_OUT 37 +#define IMX8MM_ANATOP_SYS_PLL1_40M 38 +#define IMX8MM_ANATOP_SYS_PLL1_80M 39 +#define IMX8MM_ANATOP_SYS_PLL1_100M 40 +#define IMX8MM_ANATOP_SYS_PLL1_133M 41 +#define IMX8MM_ANATOP_SYS_PLL1_160M 42 +#define IMX8MM_ANATOP_SYS_PLL1_200M 43 +#define IMX8MM_ANATOP_SYS_PLL1_266M 44 +#define IMX8MM_ANATOP_SYS_PLL1_400M 45 +#define IMX8MM_ANATOP_SYS_PLL1_800M 46 +#define IMX8MM_ANATOP_SYS_PLL2_OUT 47 +#define IMX8MM_ANATOP_SYS_PLL2_50M 48 +#define IMX8MM_ANATOP_SYS_PLL2_100M 49 +#define IMX8MM_ANATOP_SYS_PLL2_125M 50 +#define IMX8MM_ANATOP_SYS_PLL2_166M 51 +#define IMX8MM_ANATOP_SYS_PLL2_200M 52 +#define IMX8MM_ANATOP_SYS_PLL2_250M 53 +#define IMX8MM_ANATOP_SYS_PLL2_333M 54 +#define IMX8MM_ANATOP_SYS_PLL2_500M 55 +#define IMX8MM_ANATOP_SYS_PLL2_1000M 56 +#define IMX8MM_ANATOP_CLK_CLKOUT1_SEL 57 +#define IMX8MM_ANATOP_CLK_CLKOUT1_DIV 58 +#define IMX8MM_ANATOP_CLK_CLKOUT1 59 +#define IMX8MM_ANATOP_CLK_CLKOUT2_SEL 60 +#define IMX8MM_ANATOP_CLK_CLKOUT2_DIV 61 +#define IMX8MM_ANATOP_CLK_CLKOUT2 62 + #endif diff --git a/include/dt-bindings/clock/imx8mn-clock.h b/include/dt-bindings= /clock/imx8mn-clock.h index 04809edab33c..b2fa73803d45 100644 --- a/include/dt-bindings/clock/imx8mn-clock.h +++ b/include/dt-bindings/clock/imx8mn-clock.h @@ -267,4 +267,68 @@ =20 #define IMX8MN_CLK_END 235 =20 +#define IMX8MN_ANATOP_CLK_DUMMY 0 +#define IMX8MN_ANATOP_CLK_32K 1 +#define IMX8MN_ANATOP_CLK_24M 2 +#define IMX8MN_ANATOP_AUDIO_PLL1_REF_SEL 3 +#define IMX8MN_ANATOP_AUDIO_PLL2_REF_SEL 4 +#define IMX8MN_ANATOP_VIDEO_PLL_REF_SEL 5 +#define IMX8MN_ANATOP_DRAM_PLL_REF_SEL 6 +#define IMX8MN_ANATOP_GPU_PLL_REF_SEL 7 +#define IMX8MN_ANATOP_M7_ALT_PLL_REF_SEL 8 +#define IMX8MN_ANATOP_ARM_PLL_REF_SEL 9 +#define IMX8MN_ANATOP_SYS_PLL3_REF_SEL 10 +#define IMX8MN_ANATOP_AUDIO_PLL1 11 +#define IMX8MN_ANATOP_AUDIO_PLL2 12 +#define IMX8MN_ANATOP_VIDEO_PLL 13 +#define IMX8MN_ANATOP_DRAM_PLL 14 +#define IMX8MN_ANATOP_GPU_PLL 15 +#define IMX8MN_ANATOP_M7_ALT_PLL 16 +#define IMX8MN_ANATOP_ARM_PLL 17 +#define IMX8MN_ANATOP_SYS_PLL1 18 +#define IMX8MN_ANATOP_SYS_PLL2 19 +#define IMX8MN_ANATOP_SYS_PLL3 20 +#define IMX8MN_ANATOP_AUDIO_PLL1_BYPASS 21 +#define IMX8MN_ANATOP_AUDIO_PLL2_BYPASS 22 +#define IMX8MN_ANATOP_VIDEO_PLL_BYPASS 23 +#define IMX8MN_ANATOP_DRAM_PLL_BYPASS 24 +#define IMX8MN_ANATOP_GPU_PLL_BYPASS 25 +#define IMX8MN_ANATOP_M7_ALT_PLL_BYPASS 26 +#define IMX8MN_ANATOP_ARM_PLL_BYPASS 27 +#define IMX8MN_ANATOP_SYS_PLL3_BYPASS 28 +#define IMX8MN_ANATOP_AUDIO_PLL1_OUT 29 +#define IMX8MN_ANATOP_AUDIO_PLL2_OUT 30 +#define IMX8MN_ANATOP_VIDEO_PLL_OUT 31 +#define IMX8MN_ANATOP_DRAM_PLL_OUT 32 +#define IMX8MN_ANATOP_GPU_PLL_OUT 33 +#define IMX8MN_ANATOP_M7_ALT_PLL_OUT 34 +#define IMX8MN_ANATOP_ARM_PLL_OUT 35 +#define IMX8MN_ANATOP_SYS_PLL3_OUT 36 +#define IMX8MN_ANATOP_SYS_PLL1_OUT 37 +#define IMX8MN_ANATOP_SYS_PLL1_40M 38 +#define IMX8MN_ANATOP_SYS_PLL1_80M 39 +#define IMX8MN_ANATOP_SYS_PLL1_100M 40 +#define IMX8MN_ANATOP_SYS_PLL1_133M 41 +#define IMX8MN_ANATOP_SYS_PLL1_160M 42 +#define IMX8MN_ANATOP_SYS_PLL1_200M 43 +#define IMX8MN_ANATOP_SYS_PLL1_266M 44 +#define IMX8MN_ANATOP_SYS_PLL1_400M 45 +#define IMX8MN_ANATOP_SYS_PLL1_800M 46 +#define IMX8MN_ANATOP_SYS_PLL2_OUT 47 +#define IMX8MN_ANATOP_SYS_PLL2_50M 48 +#define IMX8MN_ANATOP_SYS_PLL2_100M 49 +#define IMX8MN_ANATOP_SYS_PLL2_125M 50 +#define IMX8MN_ANATOP_SYS_PLL2_166M 51 +#define IMX8MN_ANATOP_SYS_PLL2_200M 52 +#define IMX8MN_ANATOP_SYS_PLL2_250M 53 +#define IMX8MN_ANATOP_SYS_PLL2_333M 54 +#define IMX8MN_ANATOP_SYS_PLL2_500M 55 +#define IMX8MN_ANATOP_SYS_PLL2_1000M 56 +#define IMX8MN_ANATOP_CLK_CLKOUT1_SEL 57 +#define IMX8MN_ANATOP_CLK_CLKOUT1_DIV 58 +#define IMX8MN_ANATOP_CLK_CLKOUT1 59 +#define IMX8MN_ANATOP_CLK_CLKOUT2_SEL 60 +#define IMX8MN_ANATOP_CLK_CLKOUT2_DIV 61 +#define IMX8MN_ANATOP_CLK_CLKOUT2 62 + #endif diff --git a/include/dt-bindings/clock/imx8mp-clock.h b/include/dt-bindings= /clock/imx8mp-clock.h index 3235d7de3b62..8c076225fd9e 100644 --- a/include/dt-bindings/clock/imx8mp-clock.h +++ b/include/dt-bindings/clock/imx8mp-clock.h @@ -402,4 +402,72 @@ =20 #define IMX8MP_CLK_AUDIOMIX_END 59 =20 +#define IMX8MP_ANATOP_CLK_DUMMY 0 +#define IMX8MP_ANATOP_CLK_24M 1 +#define IMX8MP_ANATOP_CLK_32K 2 +#define IMX8MP_ANATOP_AUDIO_PLL1_REF_SEL 3 +#define IMX8MP_ANATOP_AUDIO_PLL2_REF_SEL 4 +#define IMX8MP_ANATOP_VIDEO_PLL_REF_SEL 5 +#define IMX8MP_ANATOP_DRAM_PLL_REF_SEL 6 +#define IMX8MP_ANATOP_GPU_PLL_REF_SEL 7 +#define IMX8MP_ANATOP_VPU_PLL_REF_SEL 8 +#define IMX8MP_ANATOP_ARM_PLL_REF_SEL 9 +#define IMX8MP_ANATOP_SYS_PLL1_REF_SEL 10 +#define IMX8MP_ANATOP_SYS_PLL2_REF_SEL 11 +#define IMX8MP_ANATOP_SYS_PLL3_REF_SEL 12 +#define IMX8MP_ANATOP_AUDIO_PLL1 13 +#define IMX8MP_ANATOP_AUDIO_PLL2 14 +#define IMX8MP_ANATOP_VIDEO_PLL 15 +#define IMX8MP_ANATOP_DRAM_PLL 16 +#define IMX8MP_ANATOP_GPU_PLL 17 +#define IMX8MP_ANATOP_VPU_PLL 18 +#define IMX8MP_ANATOP_ARM_PLL 19 +#define IMX8MP_ANATOP_SYS_PLL1 20 +#define IMX8MP_ANATOP_SYS_PLL2 21 +#define IMX8MP_ANATOP_SYS_PLL3 22 +#define IMX8MP_ANATOP_AUDIO_PLL1_BYPASS 23 +#define IMX8MP_ANATOP_AUDIO_PLL2_BYPASS 24 +#define IMX8MP_ANATOP_VIDEO_PLL_BYPASS 25 +#define IMX8MP_ANATOP_DRAM_PLL_BYPASS 26 +#define IMX8MP_ANATOP_GPU_PLL_BYPASS 27 +#define IMX8MP_ANATOP_VPU_PLL_BYPASS 28 +#define IMX8MP_ANATOP_ARM_PLL_BYPASS 29 +#define IMX8MP_ANATOP_SYS_PLL1_BYPASS 30 +#define IMX8MP_ANATOP_SYS_PLL2_BYPASS 31 +#define IMX8MP_ANATOP_SYS_PLL3_BYPASS 32 +#define IMX8MP_ANATOP_AUDIO_PLL1_OUT 33 +#define IMX8MP_ANATOP_AUDIO_PLL2_OUT 34 +#define IMX8MP_ANATOP_VIDEO_PLL_OUT 35 +#define IMX8MP_ANATOP_DRAM_PLL_OUT 36 +#define IMX8MP_ANATOP_GPU_PLL_OUT 37 +#define IMX8MP_ANATOP_VPU_PLL_OUT 38 +#define IMX8MP_ANATOP_ARM_PLL_OUT 39 +#define IMX8MP_ANATOP_SYS_PLL3_OUT 40 +#define IMX8MP_ANATOP_SYS_PLL1_OUT 41 +#define IMX8MP_ANATOP_SYS_PLL1_40M 42 +#define IMX8MP_ANATOP_SYS_PLL1_80M 43 +#define IMX8MP_ANATOP_SYS_PLL1_100M 44 +#define IMX8MP_ANATOP_SYS_PLL1_133M 45 +#define IMX8MP_ANATOP_SYS_PLL1_160M 46 +#define IMX8MP_ANATOP_SYS_PLL1_200M 47 +#define IMX8MP_ANATOP_SYS_PLL1_266M 48 +#define IMX8MP_ANATOP_SYS_PLL1_400M 49 +#define IMX8MP_ANATOP_SYS_PLL1_800M 50 +#define IMX8MP_ANATOP_SYS_PLL2_OUT 51 +#define IMX8MP_ANATOP_SYS_PLL2_50M 52 +#define IMX8MP_ANATOP_SYS_PLL2_100M 53 +#define IMX8MP_ANATOP_SYS_PLL2_125M 54 +#define IMX8MP_ANATOP_SYS_PLL2_166M 55 +#define IMX8MP_ANATOP_SYS_PLL2_200M 56 +#define IMX8MP_ANATOP_SYS_PLL2_250M 57 +#define IMX8MP_ANATOP_SYS_PLL2_333M 58 +#define IMX8MP_ANATOP_SYS_PLL2_500M 59 +#define IMX8MP_ANATOP_SYS_PLL2_1000M 60 +#define IMX8MP_ANATOP_CLK_CLKOUT1_SEL 61 +#define IMX8MP_ANATOP_CLK_CLKOUT1_DIV 62 +#define IMX8MP_ANATOP_CLK_CLKOUT1 63 +#define IMX8MP_ANATOP_CLK_CLKOUT2_SEL 64 +#define IMX8MP_ANATOP_CLK_CLKOUT2_DIV 65 +#define IMX8MP_ANATOP_CLK_CLKOUT2 66 + #endif --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 C729419922F for ; Sun, 29 Dec 2024 14:50:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483845; cv=none; b=PC1h9bGKH1Fr1Qljk9Ad94clS/Yuz+DSACNOCG9IG/OuLOem+aeb2qhBe775P8cbeRRX22YqnyNu9OqGA9EiJDS0I1rQyJ2QAkDJPNZpeuHpmcpGuKmnmiLCCmJtvf+PqO1Jsy7SSlTVzO/baYSjRHYTYz54Jfso8QJqWGjNW0I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483845; c=relaxed/simple; bh=4JJzIfTPYd1xwS7ML8LLTZkwdWqlo3aofGz7RuYx0M4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SR7TcFflMPS5y9SRf50nDCY5ZcX1n9T3kO/ypW+/szeEnIjX6ymH5CsMrdYhjQJBVhPZGU6DP/KrZMyLEYh5t4JIan0KLo4ObbrQkosFtaYhytDpYq268M58B+P7PqayvX0z46yOjy9OMa2Z3rWIEQWHnZ1kWoemcroFHnP8Wto= 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=cH70o92a; arc=none smtp.client-ip=209.85.218.48 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="cH70o92a" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-aa689a37dd4so1278898666b.3 for ; Sun, 29 Dec 2024 06:50:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483842; x=1736088642; 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=hOYk7rkhvjRCnvuEcjwAqfr4aBzSa8a4sxHUvLuLnTs=; b=cH70o92aOcHncub04Z3LfhDm+jq0MazCkHQaxYGRy1nzhHVnZz0ULwMvEqzk5z4/ig laWzNV2uTh/4+8arx4RDzLq/nOcPySqfHeaxQLSUcvwbozPZ4cLmMETeKBeBuiO2+qPB 67QY7gCKw/5YU1vTtx/FROBDEkpVF9fki9gQ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483842; x=1736088642; 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=hOYk7rkhvjRCnvuEcjwAqfr4aBzSa8a4sxHUvLuLnTs=; b=j6EPqRKKpa/SzZDV3N7JqR1QCfna3ouWB8Ok1I9PVEn/eE3iE3ByJzKYR6W6VHqfLm vON56UDrQoNivgVlq0OQqkpwdLqkvAEuNL2/Q7wmAm4jzEYPiDK1lhMMn7b4z4cAcki+ /kS41puq/RBV2v97T3ybbLF0LhIOcasX+d/0tNF10Cw818gr+5QwsX9svGJ6MfH+Oy+6 OGXZrCRXuD63wYr9VV8wEZ7oASdMs14bB19vsMJ9ZfAA94pNMC853O6D6AdaNpJUM6c7 9j8fR6jk1y4XX1VP1YmiZTNoakyMM2PCqJoyjXF6hbbGYGN49bX6Pla5xFiUuFYhBxX1 4XZQ== X-Gm-Message-State: AOJu0Yx4MPFh2gUrHCvI0XToJS8hlBKfwzJsBNmDOfkAi0RxCK+iLgw7 UmHyRPWdNsHJcKtMajD1+DE8TNMqhs2U9L/AxSgRSmdgOnuXmjchuZ8Pzlu3aWVlnbgQ7DSfVEr Q X-Gm-Gg: ASbGncue8ptJ97vIXLc0ZLCCuFQj4j81Abu2mFu5rWM1sU1j6eL/ayAHUqVmRNf0RV0 W3cIN3I98eMkIB+ix4emc+snr3rCLN/wIzSyEM7JuoX+jgdOA12GnnkiYuJf9PpfQra9Z/b40bg C3rCUo1ciky175ZV9l2D2h+RT7ZpO5bTylHK8sssa4BtoCHyvOiGX8lXclyjw04nVtL+/bEKiZP abfDAXQ7Mns09mXor9eSTT8aL09Xh+q+4OGlxzwqtdjN5yZOeLeFEnzquOwvdSaPJUZNUiwhF16 LMNsijGnG6grPWuOVTjmOA== X-Google-Smtp-Source: AGHT+IG8CGrpEMFqA78kdByEQ0DjHHHYHTWphQaqH/VG7Rp9eeX5oN0WentSYeXyG9/fSH2aOKu83Q== X-Received: by 2002:a17:907:2d2c:b0:aa6:8b38:52a3 with SMTP id a640c23a62f3a-aac33787557mr2382830166b.50.1735483842145; Sun, 29 Dec 2024 06:50:42 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:41 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 06/18] arm64: dts: imx8mm: add anatop clocks Date: Sun, 29 Dec 2024 15:49:30 +0100 Message-ID: <20241229145027.3984542-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add clocks to anatop node. Add the bindings definitions for the anatop node. The patch is preparatory for future developments. Signed-off-by: Dario Binacchi --- (no changes since v4) Changes in v4: - New arch/arm64/boot/dts/freescale/imx8mm.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dt= s/freescale/imx8mm.dtsi index 4de3bf22902b..597041a05073 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -600,6 +600,8 @@ anatop: clock-controller@30360000 { compatible =3D "fsl,imx8mm-anatop"; reg =3D <0x30360000 0x10000>; #clock-cells =3D <1>; + clocks =3D <&osc_32k>, <&osc_24m>; + clock-names =3D "osc_32k", "osc_24m"; }; =20 snvs: snvs@30370000 { --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 4A9471993B1 for ; Sun, 29 Dec 2024 14:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483846; cv=none; b=N+Dp1THhFGgVmLksfxW7EGceEF2C23j/9MM76+W7lkCkczAdjl6OB6WDBCQ5wXQ4hol06YaiJTIWYMWDp13MKvPXTRSdE8ObAhOj/X0BbK3knKRKNi17Ktqe20WR3ylSWhpsBtuBe/PIQmlNRZ4xMQJc73ayqxvSsLmzMLIiuYE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483846; c=relaxed/simple; bh=MWwhsP/1Gq2jtC+XMH/+PSmlpfJmY2R2gm9uwDR4fZI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lSOURF4NDFhOSv0AxSnebpj/C7rwiOYfs7TslycWevy3c0P4vFpNIPIS4vmlNc2qpBmPkZPlM4CpTlBoyZJKgCPsMrjep06SYqe7hf3uY79zKF3KkL8tdPb8ZoffUqkpecL9mfEG5Z6sbTjJ40/mwJOei/AmSwgD30MG+4Xn0BU= 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=WhoyhjJ8; arc=none smtp.client-ip=209.85.218.47 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="WhoyhjJ8" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-aa69107179cso1409626166b.0 for ; Sun, 29 Dec 2024 06:50:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483843; x=1736088643; 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=Mr8rvSiMKhhr7+g2wBjSbr4ZapMlTY5YRIRH4XPzpek=; b=WhoyhjJ8Gh53xnH1VjxJ2t3s8su90wxMYsqX/2B0Vi/GhhGAX0N1ueST/hssidGLj1 NB4EiunY140IHb7g/B7+hIJTjcR9PSiDnXJL+vSbzBGVfWh3I8SV3+5K8hyOYmUHwlN0 s2Z9In9uyUPfmPnNSDHSgs3R7hmhxE5F1EP8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483843; x=1736088643; 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=Mr8rvSiMKhhr7+g2wBjSbr4ZapMlTY5YRIRH4XPzpek=; b=R00tBJ0APBMsWBDeQ+pmmCtqAJ3ek4V16d9q90T5lwhPa0O/P2sJSlXj89dp+HRPCD 7C18VJSW41dI2tSXIn2STPANsMbbg38ampEwM8+Utv6+TZRKJrPHlJHmtfD4r34DDRmA swzdYr9/KsRADORdhnJ9WakVBu2wVeaXl4l08murj96iTEs4kKwB3SG8uJhXxOMmVy8E 26XtgyUorRahF5IDy35YQuBAAdIOIzTh9dOb1tVl4gktjwrITgYiL+kymX/qnYbQ58fm oSvLmF8npLvTPZ/F+PrOPfJJneQGFh2z4CQGH5J6TOf77i5iM82XObTMZOEWG3W/bvHV FDew== X-Gm-Message-State: AOJu0Yw7xeOmsyGy2LLuqZCXulvZ3RyA7WUe3sPEOPxoRwEMBb/Ivl4B THqVZhqb4/HqHNCA6GNIYjfUca9tNfXoOGPQMMcp4Zt8Fgpp939qoWc1ClzQ1oUM8anFvIm5kqx O X-Gm-Gg: ASbGncuGYAicSFes0QeLYnYg417YKYoOvkC+EzcFOPU/JD2r0IcqQ3p++GlpWDDc1KF q+sxyE2RTOuLgPsxVRWcXaRWXDbqwRCO3FSk8FxRunMdi4S/oRLVUdrlXb0JQOBwppourwMDeG4 yCtZSKfePIbKZd7xBAJH8FUoiwfpUaou5JM84NoaTTi4GC5v19IRy0pZ0HLlCkOyOeGohzhkR0X QC6bXV9YAdNEyFWRd4DkH4VupAOi4q52Be6GuXGe/iVFc+0Qr8d16XSxzE6gZEOCperF7pqw+Ri VY5yLiPmPrP9WN8NuGa2cg== X-Google-Smtp-Source: AGHT+IFDrY6B7oSvA67ot9ukQjCg8UM4FQr4YLiQDwamuPsObDrBp+CwuA86CFPPQhHpy2R/frIabw== X-Received: by 2002:a17:907:d9f:b0:aa6:9ee3:e51f with SMTP id a640c23a62f3a-aac334e377amr3135317166b.41.1735483843575; Sun, 29 Dec 2024 06:50:43 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:43 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 07/18] arm64: dts: imx8mn: add anatop clocks Date: Sun, 29 Dec 2024 15:49:31 +0100 Message-ID: <20241229145027.3984542-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add clocks to anatop node. Signed-off-by: Dario Binacchi --- (no changes since v4) Changes in v4: - New arch/arm64/boot/dts/freescale/imx8mn.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dt= s/freescale/imx8mn.dtsi index a5f9cfb46e5d..49be492b5687 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -606,6 +606,8 @@ anatop: clock-controller@30360000 { compatible =3D "fsl,imx8mn-anatop", "fsl,imx8mm-anatop"; reg =3D <0x30360000 0x10000>; #clock-cells =3D <1>; + clocks =3D <&osc_32k>, <&osc_24m>; + clock-names =3D "osc_32k", "osc_24m"; }; =20 snvs: snvs@30370000 { --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 06F05199396 for ; Sun, 29 Dec 2024 14:50:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483848; cv=none; b=C96klMxjXOZEq1wvoRWC++ylyANEYXvRHpOzPepI9nwwJ0dXoMqEPT588A8ZrvuP/y4tZEdCMBP8bDc5dIrnimnltfRrdWO5eyuzD0fTF+OfQ145pnM41VnLcC6B0R0sBwr/KFxteBKsD5Xiv4G3tCRr9LD2p4QgFwm+xEFw2Fs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483848; c=relaxed/simple; bh=EfuJYR878rJ4Cw+YuO97nDjgeWj+F6WJVMj2hzhOd0Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MezVyqIte63irNGznlnWmaROImHgQzZ8idnsb4Rfjt8q9Q1dJw22Vf6+7uGdRNIz92u6JEBd0mgw6IpfaR6EsHAvdQzbQfc1+MKxl8SE/ZVFf6AKnO9t2/bcQNrC0fyvgMqf/CClK8mZZSDvhkBUhJpr3f0ulFPDo/uLvAriW9g= 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=b3qVwohw; arc=none smtp.client-ip=209.85.218.47 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="b3qVwohw" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-aaeecbb7309so709679566b.0 for ; Sun, 29 Dec 2024 06:50:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483845; x=1736088645; 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=JTseU8DWKtdHNNseUc2PJ1vcygpii+LlAX++fbmk+pc=; b=b3qVwohwnc1hMrHAgDEXZqLqrLo5CONkaEZjW8xrkDrbZEMj+/6K1VgSg8j/RPUVeX pS2gplCwj8M1YzggrCabBaljspesQus9wrI4mPgIHGX9aT5JUGYSwPPYmJjlbF+DXsLZ 2ixhVvhSOvEwJlV1SZL8cgVb96V8NeB5BAKdQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483845; x=1736088645; 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=JTseU8DWKtdHNNseUc2PJ1vcygpii+LlAX++fbmk+pc=; b=PZu1HHRA/LkB6k/wlm4GBzdMbxkNK4os0lZQMA79wHGIsDycfp+YkrLTSLWd8luHGW 4jtzxFPk4DB78KXtUGMUpnRBbyGo3O4pRV9dNT2dK7jv0n6aHLVCWDvYeQAYwDrYoB5M 69NuO87chtEApdAV+qPQDVVD+qqjIGLRFVSni97JBbdhJbqVnWtETIwxCXGKqbSgKsj1 6w948WY0qjBbXzH4a7jadyLXJPSYTkCURIYsr498lfo44Xsc/5KX92YwievVydC1JQHX N1T00qkf/mTekJOS8iqRBUIra0CftnGbroM3gUuA2SzJlZ9Umb0J8aL+y5ZIQdkKXlYe fW7A== X-Gm-Message-State: AOJu0Yx4LNaDoU628gfMVkqBBzw7584ox2EcnL85GFbJQteI4drcVDAh lcauLgPxSTXBWJsAE3IfdPQaPky5udj4QtlrDtm5egq0cMp9iVTBe1B2YDSo9idmdyrHQm2gYp/ / X-Gm-Gg: ASbGncued3YaNJJrW9PYk3CgAm+dZSsnU58V+qKN/07IEYlVi0EpfHGza1RsAr37uik ZgEfdaP3grWH5IUWiI0EJFkYMbRKiGNwsFfGwQtHnz7SNcKWAZHaqTr8f+O61z4W38u0A/bq6By VrxihDi1Gq4qjBXLNt4kCI5iIr81IeFFaUiJQFrqUAPVIt1enEKej9FtXi3Kzw+YJtfns0n1wWs mFN9j6xdLge08KIVDnjvuoXtaMN/vqM8MIVjfj2jt30Sa3zs03kLxWm3ZVokGKz0e+nIdGXCxoZ issQVLHFUTCab7kVSyyO+g== X-Google-Smtp-Source: AGHT+IGIJCSLlNgA08GSB5oSqyndnsfBTf0pp87lM2OqXe192f2irVoeHNvImjIfNJtI9EF5Ka+UDw== X-Received: by 2002:a17:907:6092:b0:aab:c35e:509b with SMTP id a640c23a62f3a-aac3378bee1mr2634088366b.55.1735483845025; Sun, 29 Dec 2024 06:50:45 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:44 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 08/18] arm64: dts: imx8mp: add anatop clocks Date: Sun, 29 Dec 2024 15:49:32 +0100 Message-ID: <20241229145027.3984542-9-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add clocks to anatop node. Signed-off-by: Dario Binacchi --- (no changes since v4) Changes in v4: - New arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dt= s/freescale/imx8mp.dtsi index e0d3b8cba221..0b928e173f29 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -709,6 +709,8 @@ anatop: clock-controller@30360000 { compatible =3D "fsl,imx8mp-anatop", "fsl,imx8mm-anatop"; reg =3D <0x30360000 0x10000>; #clock-cells =3D <1>; + clocks =3D <&osc_32k>, <&osc_24m>; + clock-names =3D "osc_32k", "osc_24m"; }; =20 snvs: snvs@30370000 { --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 2634E19ABD8 for ; Sun, 29 Dec 2024 14:50:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483849; cv=none; b=Vm7toEp4y2MZsZn2Sc7cIo5CFY4EvDa5PKc78EhbpYgCfDrn2pkRgbxc56Q3FtpJqu6qw4uAiZOjSNU6g7QWJEyJDBNE04fzE349Uy4NUyMk+4aEFUev5qvOTBJ0MS6C1omePBcU29Ew4H7FeeT3Dhomv5NonOQXJsM+Eu4pztM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483849; c=relaxed/simple; bh=vc25/TFqvg0Ekr2Sm4G/VkkviBdPeMF5e7FdTWNCvAE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bJn0LxITDX8NZJ6ckZ7I6qrDqAhbnjG/ri36tVVNx7EIlsozc3xUOdmsqqpd1GKxtoAmF2ur2/AgBpUniiTKU3W204Wfqxa15jXOYnh0BnY5rPYdDwo3vLynw4YZpQevBfptGBRhkZH2ILTjInLf44aWtt8vh0KES1PUHCEvFWw= 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=kqWmpTMT; arc=none smtp.client-ip=209.85.218.48 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="kqWmpTMT" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-aa679ad4265so1722998266b.0 for ; Sun, 29 Dec 2024 06:50:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483846; x=1736088646; 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=BHj8xJJDjB/nn7+FV+WNgNcGZHPneQlK/63TZumKERk=; b=kqWmpTMTDfwPj7pLduOsrcg//NtPazvffAb7fb1C8NQW0/v96b6EsDVWfq496gPVZQ 2UCzZedT6ERGDzgLW8O+NbthySDkhBji9OMEkrkFDuhhn0/WBIMfdzPQe3KLp+KzuCSi pc+qjcyrNUf95JxZsjOmk3AA+cHkef4C5PvVE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483846; x=1736088646; 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=BHj8xJJDjB/nn7+FV+WNgNcGZHPneQlK/63TZumKERk=; b=R1NAii9FUNXe5q+HYNZGwqJ7VoE2e6Ctpz9GY4R1Fm7xWvM4ccfZg2Kmw2+pcZOPiE evuab7ync7Bma8Nq6WgXISgmXL7bbVvnlVKdlJIodHK6yf8yOWLIXOZjdO/UXVslCDLc /13xtRYabPEVajIMn3GYeq1tNJ+MlDAK+GYLxJnfLnkEoZsLH+8jLS/LJQAWlTSJ0j+a xkjvSkzZhAdi06f/1cjnNwoRhKQNHOBiUdmaUoHvSEhfGmig7Y6dnWpK1dIuzGgrY3o/ HixhLXGdKZBjLYXoThNgrr8eXualmWxTOFN3lZLZY71xscgsyQL7ZqvzsYo9Lfzwuymc L4xA== X-Gm-Message-State: AOJu0YyfkmsaEbK82IAOUuOztimiw5XkOSzi71rmunDgdgGC2pWKo08L ajsRyHqDZk3gJyihmMkLC3mieO+KRs4359vygv2azJ/I4EpjSu6Vp2RwZY6lbwlqWp62ldfJGVg 8 X-Gm-Gg: ASbGnctaCTio0n10k6lgcn87FD567rnhaLUI1Iq7gz9M9rICYBCQKJrwmnb9lIRMg9C m2VNXO4X1C6rAFFy+J1TovZi1tR0XHwPmfmgZlUcfN+Sh0wv/XjhmcDPLODF66n2gOiMJ1mzQEA gvRw8omIz/rWFyRrG2oolH9PsJlLdhJtHO9RAvPu0V8V+GXZGLA0BN6WZ8c4o3Fc2k3CakL5E1G h7aHC8UTe0z4VAqMxkf9iW7gIdAt+wyu2xZS4dopGT8oRgsn8cavIPn6VQMO7rdD9684O/U1GfW 5FxfIpjXQ1WUjltGBxeH7w== X-Google-Smtp-Source: AGHT+IE9irkaow+qaH4xXnif+LMSxixYb24+xXMhBwgXh6+OtcomA+ytcyRHDSj5KcZLfwK4yNuYsg== X-Received: by 2002:a17:907:9482:b0:aa6:8096:2049 with SMTP id a640c23a62f3a-aac3350c059mr2950970366b.13.1735483846571; Sun, 29 Dec 2024 06:50:46 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:46 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 09/18] arm64: dts: imx8mq: add anatop clocks Date: Sun, 29 Dec 2024 15:49:33 +0100 Message-ID: <20241229145027.3984542-10-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add clocks to anatop node. Signed-off-by: Dario Binacchi --- (no changes since v4) Changes in v4: - New arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dt= s/freescale/imx8mq.dtsi index d51de8d899b2..1d1424a136f0 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi @@ -817,6 +817,8 @@ anatop: clock-controller@30360000 { reg =3D <0x30360000 0x10000>; interrupts =3D ; #clock-cells =3D <1>; + clocks =3D <&ckil>, <&osc_25m>, <&osc_27m>; + clock-names =3D "ckil", "osc_25m", "osc_27m"; }; =20 snvs: snvs@30370000 { --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 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 D2B5419CC05 for ; Sun, 29 Dec 2024 14:50:49 +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=1735483851; cv=none; b=qeYoV6OcPlMh85zGlbTLHgK06Rpz4gGvg7TQARieP/Su+ZDobiDlFn/T2kyBUpw+plt7mKavFS16c895e3lBWogf+hs4taARNmTVTaajXEgqgRn1X0HQ5Q7uyS5V6V7CApaBjfMlBJ5MoZXwkJb9emMNixzIXziXzs1PpXEG5vo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483851; c=relaxed/simple; bh=Se6p22DjeNW4mXfQtWBQzbMObZJXYELZ77nkap0xwso=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZLdVOtlRgvmhark7HN+c7ebSS5bl3xeQW0ql850HtMBYpI2wqASu0A4qJb1zFjZaDtoDY7alqbs1AqNuWqTCEoCDJgqFLOPiFBVXkOvdkIj/oEUKsMOTw6Xwk5qmJfHi1xeEkl7QvfZf8exKC9t5dQ58x1j42XYuO9XydJ3blT8= 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=bjOlw0sa; 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="bjOlw0sa" Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-aaec61d0f65so1221577666b.1 for ; Sun, 29 Dec 2024 06:50:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483848; x=1736088648; 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=CHfQ/VeJmhz8wn8A9KlfaIopMLyJVISWJA2tyBqE4w0=; b=bjOlw0sahd3D0HVFASmErNOlLL3JTdTFsdMpLbNP6cBXVOI6GNGRwID9w7xMMGh1Ge W/j9gWaLB4mQs7FsPYAaROpjPaCP+u2Yk108VZNgQCm5hG3KcVGMQICLNNTtSPe0p/Ib hvDgOe3T6zWwQTKaYMxfYC7B22RBEe9IZtTj4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483848; x=1736088648; 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=CHfQ/VeJmhz8wn8A9KlfaIopMLyJVISWJA2tyBqE4w0=; b=TBGnDOH4T+RNU/81J68OatYObWqfbNsQqpguW3vYOrWp6X/D4YpAq1NMAGTNmvGGuh Np+3uX39IEH67iJ52id8NZewAG8E/QASP9hdO1QG7Q2TuRI293vIXNXqPaJ5bj3JOYWr O4p+ZDx5CyChNCVI3FNDe3Zpl5d38HkMD5ofj6nwqXq8ThTdkuA6wsw/vAAM6+SJTsfa Xq0hLCFBYOvNeEtIjtAx2ZlHC8WvyV/4SfNpMJlzj2/q3yRkeUKtB3THinaB034NazsI pwJS4T0BYmmblFOmNm8y5VPmsyLw/0K4D8os5Ah82CQA4TTMuJ4dtlfJLlr1JuPz1wn+ 1gtQ== X-Gm-Message-State: AOJu0Yw7B8Hye2ilt9rj7+AMISqYee81R77OicmOyGz/vb5DKVLyoyH/ VKpgUV3RQ46vzSBVORn6fBkcBQIYN1s2oXRskbXsyzFg/WOg5xPMuTaDb1jPZFyQQrj+rw5C4ue X X-Gm-Gg: ASbGncva1t6Si3tGz2zNkkwiqPybwdC7qi6W2bMSLPQ48AcWtGDt44SG96ZWwb9lvph Mc5YH90erUMjrK8iDER9x4dOFZkHL2JiobOCCGrLE0NSN4qFtEX1GWdvsXoo338+e389u6GTwof yacpBy9r5V12x9cdwe4jbqUSkJdDSKfXjP7PWzeMi4C49Gq3QED5rNyO38CBU5N+QxF7vpvBoOz i4Y+bmX5GClnaOq6ciZ40Yz8sTd2t1xObIDdqb1LZ/uuF6euNAjeCYPJf1fr4um9p4tvZ3d8jdf gDZDP68db37LF1vOtnbEtQ== X-Google-Smtp-Source: AGHT+IGnU9rddkEjFb71xBUpHoE7jAWdM0Mj4zsaR45d/rt3vvu1CgxNBArT5n379CI0wDcjZNjmxg== X-Received: by 2002:a17:907:96a0:b0:aa6:7feb:193f with SMTP id a640c23a62f3a-aac2ad81a25mr3181092166b.20.1735483848082; Sun, 29 Dec 2024 06:50:48 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:47 -0800 (PST) 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 v8 10/18] clk: imx: add hw API imx_anatop_get_clk_hw Date: Sun, 29 Dec 2024 15:49:34 +0100 Message-ID: <20241229145027.3984542-11-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Get the hw of a clock registered by the anatop module. This function is preparatory for future developments. Signed-off-by: Dario Binacchi Reviewed-by: Peng Fan --- (no changes since v7) Changes in v7: - Add device_node type parameter to imx8m_anatop_get_clk_hw() - Rename imx8m_anatop_get_clk_hw() to imx_anatop_get_clk_hw() - Drop the gaurding macros so the code can be used also by i.MX9 Changes in v5: - Consider CONFIG_CLK_IMX8M{M,N,P,Q}_MODULE to fix compilation errors Changes in v4: - New drivers/clk/imx/clk.c | 15 +++++++++++++++ drivers/clk/imx/clk.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index df83bd939492..a906d3cd960b 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -128,6 +128,21 @@ struct clk_hw *imx_get_clk_hw_by_name(struct device_no= de *np, const char *name) } EXPORT_SYMBOL_GPL(imx_get_clk_hw_by_name); =20 +struct clk_hw *imx_anatop_get_clk_hw(struct device_node *np, int id) +{ + struct of_phandle_args args; + struct clk_hw *hw; + + args.np =3D np; + args.args_count =3D 1; + args.args[0] =3D id; + + hw =3D __clk_get_hw(of_clk_get_from_provider(&args)); + pr_debug("%s: got clk: %s\n", __func__, clk_hw_get_name(hw)); + return hw; +} +EXPORT_SYMBOL_GPL(imx_anatop_get_clk_hw); + /* * This fixups the register CCM_CSCMR1 write value. * The write/read/divider values of the aclk_podf field diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index aa5202f284f3..50e407cf48d9 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -487,4 +487,6 @@ struct clk_hw *imx_clk_gpr_mux(const char *name, const = char *compatible, u32 reg, const char **parent_names, u8 num_parents, const u32 *mux_table, u32 mask); =20 +struct clk_hw *imx_anatop_get_clk_hw(struct device_node *np, int id); + #endif --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (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 3E4DC19D06E for ; Sun, 29 Dec 2024 14:50:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483855; cv=none; b=IkcN+pTGpcp/Xz7KCuulRs71qcP44ZusnldJbBqriQmRl8KA0o7GGHvGThoTPUdmcMRmjia2qBl2oX9s0h5urOayZojVJTZhhBXY9wRDVOzk3oWHFwn3a+dn1vXx/21kTpHR0Q9OFzoEfA35DwHqaWCo75ogjC+WDo74/ax2bvU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483855; c=relaxed/simple; bh=bWRmFvxqhZ+28yf5JFXHx8pdct+bHGksNb6SFLtN498=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OHeojJwACrXY+obh+IZJ6OCSRrZrgibGJqQvPI0yXaY3VUVo1DClSJKb24iyRN7Ro9neozwgxomqP/mrppB+LpzcPyhzISoUuFJDPGUXWbtT1UkOoHx1VvSh1ipNoA/PEif9evo3tVK/n9g8oO888zthZkmF3nby/1rKuOpruUU= 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=QgZ5N9pN; arc=none smtp.client-ip=209.85.208.45 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="QgZ5N9pN" Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-5d3e9f60bf4so14479170a12.3 for ; Sun, 29 Dec 2024 06:50:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483850; x=1736088650; 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=R3M2Twd4RPp+D4raQf7zz0xs4A+eb54+adCLPeXEQO4=; b=QgZ5N9pNVvZsM1+HC6ykgPfh24hbTc942+ikdgZYB1DrJchbUzn2OHQt+HNKK4varO kiQ7/b2bTb67eZzivkCZtlUZ9bbx0KErhsdiXklNrILGwDyKxH2VfT4FHHCvS7UXoSpS 9Iep8iF5fdDbTpm7yjt+cVR4qHmrymWEYINm8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483850; x=1736088650; 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=R3M2Twd4RPp+D4raQf7zz0xs4A+eb54+adCLPeXEQO4=; b=wsnesQa4Y3S2V7GJ2q46pmVKSnpEwj7fISLUbirONoMiiv1qhfofgJaR2x3xuvvqXh j1r+1SHg44MoYAeAOh7hujGGgUCUJrFTX1VgnIcLP0xkUq0NSVchrtFMORX3JXcwp9fp 3M3I82e7PS04YwvTMDFo8lI7H9sSQbYbAQp8TECciEFyOfz6k2ZiSUtlF72ht2N8yEsp FX4J7iG9o+i6h79hK5ETsrEMbtZvYbl/T5mhch2/q2XGVxGK3tOUtFYmcg/zKPv6TmTW Te9eUNHW3Fangc508AGYb3ylcb9TdWrYXPbQxlCZmy2Bd6HALtwcJhzbXI/9V3K+fFZ0 sbcQ== X-Gm-Message-State: AOJu0YyW0z12eGfTT2J8tnjcq/b1tbLN/YD4vcOW0UuqQYDiRWCmwW+3 ozDCap77epq3OZZFSNkz52HRj29K8T7JGHzSCOgcBTD/RENexfcqo0yS6KLodXGrhHnVPzaYNEC 0 X-Gm-Gg: ASbGnct3oLKj8QOFNGZfRqnJl/d9zwcBdRD3/sgNXtDErfdQ9hcFb5v2Dam8lgNxjFD TwqHRlVbbIg1DRQODcfgByPHjmPCZruG27nDyOf0hGsjG6Q/uh99RQMyXZ2x5GQQj9uEgEz94R4 s9bzBgOlb8EC6sppRKwxoo+ffS//k6xjEbULvl1EtykMxPJ3xDR/K1a+M37Os2LNe+VCG7CK83g 63mprc8AUuOBzeSBvPyRldw4Ng5HPKJZLaULR7v7/AASWOOCiuf7wPh4QG+37v4ZIykfPDrr4eF l92dvH+kdcxRS7YXz4R0aw== X-Google-Smtp-Source: AGHT+IHImVLFZCAV8H6RyLgRl3bcygH3qBj3OU6J7FaswfRb+4E/3AfXdWPdVndilDa7Go3oc6Yykg== X-Received: by 2002:a17:906:d54f:b0:aac:622:8f6 with SMTP id a640c23a62f3a-aac3342d0c5mr2662720066b.17.1735483849746; Sun, 29 Dec 2024 06:50:49 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:49 -0800 (PST) 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 v8 11/18] clk: imx: add support for i.MX8MN anatop clock driver Date: Sun, 29 Dec 2024 15:49:35 +0100 Message-ID: <20241229145027.3984542-12-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Support NXP i.MX8M anatop PLL module which generates PLLs to CCM root. By doing so, we also simplify the CCM driver code. The changes are backward compatible. Signed-off-by: Dario Binacchi Reviewed-by: Peng Fan --- Changes in v8: - Drop call of of_parse_phandle() to get the anatop's device node. Changes in v7: - Update the code based on the changes made to the imx8m_anatop_get_clk_hw(): - Rename imx8m_anatop_get_clk_hw to imx_anatop_get_clk_hw - Add device_node type parameter - Call of_parse_phandle() to get the anatop's device node. Changes in v6: - Define IMX8MN_ANATOP_CLK_END inside the driver after it has ben removed from include/dt-bindings/clock/imx8mn-clock.h. Changes in v4: - New drivers/clk/imx/Makefile | 2 +- drivers/clk/imx/clk-imx8mn-anatop.c | 283 ++++++++++++++++++++++++++++ drivers/clk/imx/clk-imx8mn.c | 183 ++++++++---------- 3 files changed, 364 insertions(+), 104 deletions(-) create mode 100644 drivers/clk/imx/clk-imx8mn-anatop.c diff --git a/drivers/clk/imx/Makefile b/drivers/clk/imx/Makefile index 03f2b2a1ab63..f0f1d01c68f8 100644 --- a/drivers/clk/imx/Makefile +++ b/drivers/clk/imx/Makefile @@ -26,7 +26,7 @@ mxc-clk-objs +=3D clk-gpr-mux.o obj-$(CONFIG_MXC_CLK) +=3D mxc-clk.o =20 obj-$(CONFIG_CLK_IMX8MM) +=3D clk-imx8mm.o -obj-$(CONFIG_CLK_IMX8MN) +=3D clk-imx8mn.o +obj-$(CONFIG_CLK_IMX8MN) +=3D clk-imx8mn-anatop.o clk-imx8mn.o obj-$(CONFIG_CLK_IMX8MP) +=3D clk-imx8mp.o clk-imx8mp-audiomix.o obj-$(CONFIG_CLK_IMX8MQ) +=3D clk-imx8mq.o =20 diff --git a/drivers/clk/imx/clk-imx8mn-anatop.c b/drivers/clk/imx/clk-imx8= mn-anatop.c new file mode 100644 index 000000000000..895569d886f4 --- /dev/null +++ b/drivers/clk/imx/clk-imx8mn-anatop.c @@ -0,0 +1,283 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * clk-imx8mn-anatop.c - NXP i.MX8MN anatop clock driver + * + * Copyright (c) 2024 Dario Binacchi + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "clk.h" + +#define IMX8MN_ANATOP_CLK_END IMX8MN_ANATOP_CLK_CLKOUT2 + +static const char * const pll_ref_sels[] =3D { "osc_24m", "dummy", "dummy"= , "dummy", }; +static const char * const audio_pll1_bypass_sels[] =3D {"audio_pll1", "aud= io_pll1_ref_sel", }; +static const char * const audio_pll2_bypass_sels[] =3D {"audio_pll2", "aud= io_pll2_ref_sel", }; +static const char * const video_pll_bypass_sels[] =3D {"video_pll", "video= _pll_ref_sel", }; +static const char * const dram_pll_bypass_sels[] =3D {"dram_pll", "dram_pl= l_ref_sel", }; +static const char * const gpu_pll_bypass_sels[] =3D {"gpu_pll", "gpu_pll_r= ef_sel", }; +static const char * const m7_alt_pll_bypass_sels[] =3D {"m7_alt_pll", "m7_= alt_pll_ref_sel", }; +static const char * const arm_pll_bypass_sels[] =3D {"arm_pll", "arm_pll_r= ef_sel", }; +static const char * const sys_pll3_bypass_sels[] =3D {"sys_pll3", "sys_pll= 3_ref_sel", }; +static const char * const clkout_sels[] =3D {"audio_pll1_out", "audio_pll2= _out", "video_pll_out", + "dummy", "dummy", "gpu_pll_out", "dummy", + "arm_pll_out", "sys_pll1", "sys_pll2", "sys_pll3", + "dummy", "dummy", "osc_24m", "dummy", "osc_32k"}; + +static struct clk_hw_onecell_data *clk_hw_data; +static struct clk_hw **hws; + +static int imx8mn_anatop_clocks_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct device_node *np =3D dev->of_node; + void __iomem *base; + int ret; + + base =3D devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) { + dev_err(dev, "failed to get base address\n"); + return PTR_ERR(base); + } + + clk_hw_data =3D devm_kzalloc(dev, struct_size(clk_hw_data, hws, + IMX8MN_ANATOP_CLK_END), + GFP_KERNEL); + if (WARN_ON(!clk_hw_data)) + return -ENOMEM; + + clk_hw_data->num =3D IMX8MN_ANATOP_CLK_END; + hws =3D clk_hw_data->hws; + + hws[IMX8MN_ANATOP_CLK_DUMMY] =3D imx_clk_hw_fixed("dummy", 0); + hws[IMX8MN_ANATOP_CLK_32K] =3D imx_get_clk_hw_by_name(np, "osc_32k"); + hws[IMX8MN_ANATOP_CLK_24M] =3D imx_get_clk_hw_by_name(np, "osc_24m"); + + hws[IMX8MN_ANATOP_AUDIO_PLL1_REF_SEL] =3D + imx_clk_hw_mux("audio_pll1_ref_sel", base + 0x0, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MN_ANATOP_AUDIO_PLL2_REF_SEL] =3D + imx_clk_hw_mux("audio_pll2_ref_sel", base + 0x14, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MN_ANATOP_VIDEO_PLL_REF_SEL] =3D + imx_clk_hw_mux("video_pll_ref_sel", base + 0x28, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MN_ANATOP_DRAM_PLL_REF_SEL] =3D + imx_clk_hw_mux("dram_pll_ref_sel", base + 0x50, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MN_ANATOP_GPU_PLL_REF_SEL] =3D + imx_clk_hw_mux("gpu_pll_ref_sel", base + 0x64, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MN_ANATOP_M7_ALT_PLL_REF_SEL] =3D + imx_clk_hw_mux("m7_alt_pll_ref_sel", base + 0x74, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MN_ANATOP_ARM_PLL_REF_SEL] =3D + imx_clk_hw_mux("arm_pll_ref_sel", base + 0x84, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + hws[IMX8MN_ANATOP_SYS_PLL3_REF_SEL] =3D + imx_clk_hw_mux("sys_pll3_ref_sel", base + 0x114, 0, 2, + pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); + + hws[IMX8MN_ANATOP_AUDIO_PLL1] =3D + imx_clk_hw_pll14xx("audio_pll1", "audio_pll1_ref_sel", + base, &imx_1443x_pll); + hws[IMX8MN_ANATOP_AUDIO_PLL2] =3D + imx_clk_hw_pll14xx("audio_pll2", "audio_pll2_ref_sel", + base + 0x14, &imx_1443x_pll); + hws[IMX8MN_ANATOP_VIDEO_PLL] =3D + imx_clk_hw_pll14xx("video_pll", "video_pll_ref_sel", + base + 0x28, &imx_1443x_pll); + hws[IMX8MN_ANATOP_DRAM_PLL] =3D + imx_clk_hw_pll14xx("dram_pll", "dram_pll_ref_sel", base + 0x50, + &imx_1443x_dram_pll); + hws[IMX8MN_ANATOP_GPU_PLL] =3D + imx_clk_hw_pll14xx("gpu_pll", "gpu_pll_ref_sel", base + 0x64, + &imx_1416x_pll); + hws[IMX8MN_ANATOP_M7_ALT_PLL] =3D + imx_clk_hw_pll14xx("m7_alt_pll", "m7_alt_pll_ref_sel", + base + 0x74, &imx_1416x_pll); + hws[IMX8MN_ANATOP_ARM_PLL] =3D + imx_clk_hw_pll14xx("arm_pll", "arm_pll_ref_sel", base + 0x84, + &imx_1416x_pll); + hws[IMX8MN_ANATOP_SYS_PLL1] =3D imx_clk_hw_fixed("sys_pll1", 800000000); + hws[IMX8MN_ANATOP_SYS_PLL2] =3D imx_clk_hw_fixed("sys_pll2", 1000000000); + hws[IMX8MN_ANATOP_SYS_PLL3] =3D + imx_clk_hw_pll14xx("sys_pll3", "sys_pll3_ref_sel", base + 0x114, + &imx_1416x_pll); + + /* PLL bypass out */ + hws[IMX8MN_ANATOP_AUDIO_PLL1_BYPASS] =3D + imx_clk_hw_mux_flags("audio_pll1_bypass", base, 16, 1, + audio_pll1_bypass_sels, + ARRAY_SIZE(audio_pll1_bypass_sels), + CLK_SET_RATE_PARENT); + hws[IMX8MN_ANATOP_AUDIO_PLL2_BYPASS] =3D + imx_clk_hw_mux_flags("audio_pll2_bypass", base + 0x14, 16, 1, + audio_pll2_bypass_sels, + ARRAY_SIZE(audio_pll2_bypass_sels), + CLK_SET_RATE_PARENT); + hws[IMX8MN_ANATOP_VIDEO_PLL_BYPASS] =3D + imx_clk_hw_mux_flags("video_pll_bypass", base + 0x28, 16, 1, + video_pll_bypass_sels, + ARRAY_SIZE(video_pll_bypass_sels), + CLK_SET_RATE_PARENT); + hws[IMX8MN_ANATOP_DRAM_PLL_BYPASS] =3D + imx_clk_hw_mux_flags("dram_pll_bypass", base + 0x50, 16, 1, + dram_pll_bypass_sels, + ARRAY_SIZE(dram_pll_bypass_sels), + CLK_SET_RATE_PARENT); + hws[IMX8MN_ANATOP_GPU_PLL_BYPASS] =3D + imx_clk_hw_mux_flags("gpu_pll_bypass", base + 0x64, 28, 1, + gpu_pll_bypass_sels, + ARRAY_SIZE(gpu_pll_bypass_sels), + CLK_SET_RATE_PARENT); + hws[IMX8MN_ANATOP_M7_ALT_PLL_BYPASS] =3D + imx_clk_hw_mux_flags("m7_alt_pll_bypass", base + 0x74, 28, 1, + m7_alt_pll_bypass_sels, + ARRAY_SIZE(m7_alt_pll_bypass_sels), + CLK_SET_RATE_PARENT); + hws[IMX8MN_ANATOP_ARM_PLL_BYPASS] =3D + imx_clk_hw_mux_flags("arm_pll_bypass", base + 0x84, 28, 1, + arm_pll_bypass_sels, + ARRAY_SIZE(arm_pll_bypass_sels), + CLK_SET_RATE_PARENT); + hws[IMX8MN_ANATOP_SYS_PLL3_BYPASS] =3D + imx_clk_hw_mux_flags("sys_pll3_bypass", base + 0x114, 28, 1, + sys_pll3_bypass_sels, + ARRAY_SIZE(sys_pll3_bypass_sels), + CLK_SET_RATE_PARENT); + + /* PLL out gate */ + hws[IMX8MN_ANATOP_AUDIO_PLL1_OUT] =3D + imx_clk_hw_gate("audio_pll1_out", "audio_pll1_bypass", + base, 13); + hws[IMX8MN_ANATOP_AUDIO_PLL2_OUT] =3D + imx_clk_hw_gate("audio_pll2_out", "audio_pll2_bypass", + base + 0x14, 13); + hws[IMX8MN_ANATOP_VIDEO_PLL_OUT] =3D + imx_clk_hw_gate("video_pll_out", "video_pll_bypass", + base + 0x28, 13); + hws[IMX8MN_ANATOP_DRAM_PLL_OUT] =3D + imx_clk_hw_gate("dram_pll_out", "dram_pll_bypass", + base + 0x50, 13); + hws[IMX8MN_ANATOP_GPU_PLL_OUT] =3D + imx_clk_hw_gate("gpu_pll_out", "gpu_pll_bypass", + base + 0x64, 11); + hws[IMX8MN_ANATOP_M7_ALT_PLL_OUT] =3D + imx_clk_hw_gate("m7_alt_pll_out", "m7_alt_pll_bypass", + base + 0x74, 11); + hws[IMX8MN_ANATOP_ARM_PLL_OUT] =3D + imx_clk_hw_gate("arm_pll_out", "arm_pll_bypass", + base + 0x84, 11); + hws[IMX8MN_ANATOP_SYS_PLL3_OUT] =3D + imx_clk_hw_gate("sys_pll3_out", "sys_pll3_bypass", + base + 0x114, 11); + + /* SYS PLL1 fixed output */ + hws[IMX8MN_ANATOP_SYS_PLL1_OUT] =3D + imx_clk_hw_gate("sys_pll1_out", "sys_pll1", base + 0x94, 11); + hws[IMX8MN_ANATOP_SYS_PLL1_40M] =3D + imx_clk_hw_fixed_factor("sys_pll1_40m", "sys_pll1_out", 1, 20); + hws[IMX8MN_ANATOP_SYS_PLL1_80M] =3D + imx_clk_hw_fixed_factor("sys_pll1_80m", "sys_pll1_out", 1, 10); + hws[IMX8MN_ANATOP_SYS_PLL1_100M] =3D + imx_clk_hw_fixed_factor("sys_pll1_100m", "sys_pll1_out", 1, 8); + hws[IMX8MN_ANATOP_SYS_PLL1_133M] =3D + imx_clk_hw_fixed_factor("sys_pll1_133m", "sys_pll1_out", 1, 6); + hws[IMX8MN_ANATOP_SYS_PLL1_160M] =3D + imx_clk_hw_fixed_factor("sys_pll1_160m", "sys_pll1_out", 1, 5); + hws[IMX8MN_ANATOP_SYS_PLL1_200M] =3D + imx_clk_hw_fixed_factor("sys_pll1_200m", "sys_pll1_out", 1, 4); + hws[IMX8MN_ANATOP_SYS_PLL1_266M] =3D + imx_clk_hw_fixed_factor("sys_pll1_266m", "sys_pll1_out", 1, 3); + hws[IMX8MN_ANATOP_SYS_PLL1_400M] =3D + imx_clk_hw_fixed_factor("sys_pll1_400m", "sys_pll1_out", 1, 2); + hws[IMX8MN_ANATOP_SYS_PLL1_800M] =3D + imx_clk_hw_fixed_factor("sys_pll1_800m", "sys_pll1_out", 1, 1); + + /* SYS PLL2 fixed output */ + hws[IMX8MN_ANATOP_SYS_PLL2_OUT] =3D + imx_clk_hw_gate("sys_pll2_out", "sys_pll2", base + 0x104, 11); + hws[IMX8MN_ANATOP_SYS_PLL2_50M] =3D + imx_clk_hw_fixed_factor("sys_pll2_50m", "sys_pll2_out", 1, 20); + hws[IMX8MN_ANATOP_SYS_PLL2_100M] =3D + imx_clk_hw_fixed_factor("sys_pll2_100m", "sys_pll2_out", 1, 10); + hws[IMX8MN_ANATOP_SYS_PLL2_125M] =3D + imx_clk_hw_fixed_factor("sys_pll2_125m", "sys_pll2_out", 1, 8); + hws[IMX8MN_ANATOP_SYS_PLL2_166M] =3D + imx_clk_hw_fixed_factor("sys_pll2_166m", "sys_pll2_out", 1, 6); + hws[IMX8MN_ANATOP_SYS_PLL2_200M] =3D + imx_clk_hw_fixed_factor("sys_pll2_200m", "sys_pll2_out", 1, 5); + hws[IMX8MN_ANATOP_SYS_PLL2_250M] =3D + imx_clk_hw_fixed_factor("sys_pll2_250m", "sys_pll2_out", 1, 4); + hws[IMX8MN_ANATOP_SYS_PLL2_333M] =3D + imx_clk_hw_fixed_factor("sys_pll2_333m", "sys_pll2_out", 1, 3); + hws[IMX8MN_ANATOP_SYS_PLL2_500M] =3D + imx_clk_hw_fixed_factor("sys_pll2_500m", "sys_pll2_out", 1, 2); + hws[IMX8MN_ANATOP_SYS_PLL2_1000M] =3D + imx_clk_hw_fixed_factor("sys_pll2_1000m", "sys_pll2_out", 1, 1); + + hws[IMX8MN_ANATOP_CLK_CLKOUT1_SEL] =3D + imx_clk_hw_mux2("clkout1_sel", base + 0x128, 4, 4, + clkout_sels, ARRAY_SIZE(clkout_sels)); + hws[IMX8MN_ANATOP_CLK_CLKOUT1_DIV] =3D + imx_clk_hw_divider("clkout1_div", "clkout1_sel", base + 0x128, + 0, 4); + hws[IMX8MN_ANATOP_CLK_CLKOUT1] =3D + imx_clk_hw_gate("clkout1", "clkout1_div", base + 0x128, 8); + hws[IMX8MN_ANATOP_CLK_CLKOUT2_SEL] =3D + imx_clk_hw_mux2("clkout2_sel", base + 0x128, 20, 4, + clkout_sels, ARRAY_SIZE(clkout_sels)); + hws[IMX8MN_ANATOP_CLK_CLKOUT2_DIV] =3D + imx_clk_hw_divider("clkout2_div", "clkout2_sel", base + 0x128, + 16, 4); + hws[IMX8MN_ANATOP_CLK_CLKOUT2] =3D + imx_clk_hw_gate("clkout2", "clkout2_div", base + 0x128, 24); + + imx_check_clk_hws(hws, IMX8MN_ANATOP_CLK_END); + + ret =3D of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data); + if (ret < 0) { + imx_unregister_hw_clocks(hws, IMX8MN_ANATOP_CLK_END); + return dev_err_probe(dev, ret, + "failed to register anatop clock provider\n"); + } + + dev_info(dev, "NXP i.MX8MN anatop clock driver probed\n"); + return 0; +} + +static const struct of_device_id imx8mn_anatop_clk_of_match[] =3D { + { .compatible =3D "fsl,imx8mn-anatop" }, + { /* Sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, imx8mn_anatop_clk_of_match); + +static struct platform_driver imx8mn_anatop_clk_driver =3D { + .probe =3D imx8mn_anatop_clocks_probe, + .driver =3D { + .name =3D "imx8mn-anatop", + /* + * Disable bind attributes: clocks are not removed and + * reloading the driver will crash or break devices. + */ + .suppress_bind_attrs =3D true, + .of_match_table =3D imx8mn_anatop_clk_of_match, + }, +}; + +module_platform_driver(imx8mn_anatop_clk_driver); + +MODULE_AUTHOR("Dario Binacchi "); +MODULE_DESCRIPTION("NXP i.MX8MN anatop clock driver"); +MODULE_LICENSE("GPL"); diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index ab77e148e70c..c3a3d063d58e 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -24,16 +24,6 @@ static u32 share_count_disp; static u32 share_count_pdm; static u32 share_count_nand; =20 -static const char * const pll_ref_sels[] =3D { "osc_24m", "dummy", "dummy"= , "dummy", }; -static const char * const audio_pll1_bypass_sels[] =3D {"audio_pll1", "aud= io_pll1_ref_sel", }; -static const char * const audio_pll2_bypass_sels[] =3D {"audio_pll2", "aud= io_pll2_ref_sel", }; -static const char * const video_pll_bypass_sels[] =3D {"video_pll", "video= _pll_ref_sel", }; -static const char * const dram_pll_bypass_sels[] =3D {"dram_pll", "dram_pl= l_ref_sel", }; -static const char * const gpu_pll_bypass_sels[] =3D {"gpu_pll", "gpu_pll_r= ef_sel", }; -static const char * const m7_alt_pll_bypass_sels[] =3D {"m7_alt_pll", "m7_= alt_pll_ref_sel", }; -static const char * const arm_pll_bypass_sels[] =3D {"arm_pll", "arm_pll_r= ef_sel", }; -static const char * const sys_pll3_bypass_sels[] =3D {"sys_pll3", "sys_pll= 3_ref_sel", }; - static const char * const imx8mn_a53_sels[] =3D {"osc_24m", "arm_pll_out",= "sys_pll2_500m", "sys_pll2_1000m", "sys_pll1_800m", "sys_pll1_400m", "audio_pll1_out", "sys_pll3_out", }; @@ -308,21 +298,20 @@ static const char * const imx8mn_clko2_sels[] =3D {"o= sc_24m", "sys_pll2_200m", "sy "sys_pll2_166m", "sys_pll3_out", "audio_pll1_out", "video_pll_out", "osc_32k", }; =20 -static const char * const clkout_sels[] =3D {"audio_pll1_out", "audio_pll2= _out", "video_pll_out", - "dummy", "dummy", "gpu_pll_out", "dummy", - "arm_pll_out", "sys_pll1", "sys_pll2", "sys_pll3", - "dummy", "dummy", "osc_24m", "dummy", "osc_32k"}; - static struct clk_hw_onecell_data *clk_hw_data; static struct clk_hw **hws; =20 static int imx8mn_clocks_probe(struct platform_device *pdev) { struct device *dev =3D &pdev->dev; - struct device_node *np =3D dev->of_node; + struct device_node *np =3D dev->of_node, *anp; void __iomem *base; int ret; =20 + base =3D devm_platform_ioremap_resource(pdev, 0); + if (WARN_ON(IS_ERR(base))) + return PTR_ERR(base); + clk_hw_data =3D devm_kzalloc(dev, struct_size(clk_hw_data, hws, IMX8MN_CLK_END), GFP_KERNEL); if (WARN_ON(!clk_hw_data)) @@ -331,99 +320,90 @@ static int imx8mn_clocks_probe(struct platform_device= *pdev) clk_hw_data->num =3D IMX8MN_CLK_END; hws =3D clk_hw_data->hws; =20 - hws[IMX8MN_CLK_DUMMY] =3D imx_clk_hw_fixed("dummy", 0); - hws[IMX8MN_CLK_24M] =3D imx_get_clk_hw_by_name(np, "osc_24m"); - hws[IMX8MN_CLK_32K] =3D imx_get_clk_hw_by_name(np, "osc_32k"); + anp =3D of_find_compatible_node(NULL, NULL, "fsl,imx8mn-anatop"); + if (!anp) + return dev_err_probe(dev, -ENODEV, "missing anatop\n"); + + of_node_put(anp); + + hws[IMX8MN_CLK_DUMMY] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_CLK_DU= MMY); + hws[IMX8MN_CLK_24M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_CLK_24M); + hws[IMX8MN_CLK_32K] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_CLK_32K); hws[IMX8MN_CLK_EXT1] =3D imx_get_clk_hw_by_name(np, "clk_ext1"); hws[IMX8MN_CLK_EXT2] =3D imx_get_clk_hw_by_name(np, "clk_ext2"); hws[IMX8MN_CLK_EXT3] =3D imx_get_clk_hw_by_name(np, "clk_ext3"); hws[IMX8MN_CLK_EXT4] =3D imx_get_clk_hw_by_name(np, "clk_ext4"); =20 - np =3D of_find_compatible_node(NULL, NULL, "fsl,imx8mn-anatop"); - base =3D devm_of_iomap(dev, np, 0, NULL); - of_node_put(np); - if (WARN_ON(IS_ERR(base))) { - ret =3D PTR_ERR(base); - goto unregister_hws; - } - - hws[IMX8MN_AUDIO_PLL1_REF_SEL] =3D imx_clk_hw_mux("audio_pll1_ref_sel", b= ase + 0x0, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MN_AUDIO_PLL2_REF_SEL] =3D imx_clk_hw_mux("audio_pll2_ref_sel", b= ase + 0x14, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MN_VIDEO_PLL_REF_SEL] =3D imx_clk_hw_mux("video_pll_ref_sel", bas= e + 0x28, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MN_DRAM_PLL_REF_SEL] =3D imx_clk_hw_mux("dram_pll_ref_sel", base = + 0x50, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MN_GPU_PLL_REF_SEL] =3D imx_clk_hw_mux("gpu_pll_ref_sel", base + = 0x64, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MN_M7_ALT_PLL_REF_SEL] =3D imx_clk_hw_mux("m7_alt_pll_ref_sel", b= ase + 0x74, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - hws[IMX8MN_ARM_PLL_REF_SEL] =3D 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] =3D imx_clk_hw_mux("sys_pll3_ref_sel", base = + 0x114, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); - - hws[IMX8MN_AUDIO_PLL1] =3D imx_clk_hw_pll14xx("audio_pll1", "audio_pll1_r= ef_sel", base, &imx_1443x_pll); - hws[IMX8MN_AUDIO_PLL2] =3D imx_clk_hw_pll14xx("audio_pll2", "audio_pll2_r= ef_sel", base + 0x14, &imx_1443x_pll); - hws[IMX8MN_VIDEO_PLL] =3D imx_clk_hw_pll14xx("video_pll", "video_pll_ref_= sel", base + 0x28, &imx_1443x_pll); - hws[IMX8MN_DRAM_PLL] =3D imx_clk_hw_pll14xx("dram_pll", "dram_pll_ref_sel= ", base + 0x50, &imx_1443x_dram_pll); - hws[IMX8MN_GPU_PLL] =3D imx_clk_hw_pll14xx("gpu_pll", "gpu_pll_ref_sel", = base + 0x64, &imx_1416x_pll); - hws[IMX8MN_M7_ALT_PLL] =3D imx_clk_hw_pll14xx("m7_alt_pll", "m7_alt_pll_r= ef_sel", base + 0x74, &imx_1416x_pll); - hws[IMX8MN_ARM_PLL] =3D imx_clk_hw_pll14xx("arm_pll", "arm_pll_ref_sel", = base + 0x84, &imx_1416x_pll); - hws[IMX8MN_SYS_PLL1] =3D imx_clk_hw_fixed("sys_pll1", 800000000); - hws[IMX8MN_SYS_PLL2] =3D imx_clk_hw_fixed("sys_pll2", 1000000000); - hws[IMX8MN_SYS_PLL3] =3D imx_clk_hw_pll14xx("sys_pll3", "sys_pll3_ref_sel= ", base + 0x114, &imx_1416x_pll); + hws[IMX8MN_AUDIO_PLL1_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANAT= OP_AUDIO_PLL1_REF_SEL); + hws[IMX8MN_AUDIO_PLL2_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANAT= OP_AUDIO_PLL2_REF_SEL); + hws[IMX8MN_VIDEO_PLL_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATO= P_VIDEO_PLL_REF_SEL); + hws[IMX8MN_DRAM_PLL_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP= _DRAM_PLL_REF_SEL); + hws[IMX8MN_GPU_PLL_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= GPU_PLL_REF_SEL); + hws[IMX8MN_M7_ALT_PLL_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANAT= OP_M7_ALT_PLL_REF_SEL); + hws[IMX8MN_ARM_PLL_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= ARM_PLL_REF_SEL); + hws[IMX8MN_SYS_PLL3_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP= _SYS_PLL3_REF_SEL); + + hws[IMX8MN_AUDIO_PLL1] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_AUDIO= _PLL1); + hws[IMX8MN_AUDIO_PLL2] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_AUDIO= _PLL2); + hws[IMX8MN_VIDEO_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_VIDEO_= PLL); + hws[IMX8MN_DRAM_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_DRAM_PL= L); + hws[IMX8MN_GPU_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_GPU_PLL); + hws[IMX8MN_M7_ALT_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_M7_AL= T_PLL); + hws[IMX8MN_ARM_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_ARM_PLL); + hws[IMX8MN_SYS_PLL1] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS_PLL= 1); + hws[IMX8MN_SYS_PLL2] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS_PLL= 2); + hws[IMX8MN_SYS_PLL3] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS_PLL= 3); =20 /* PLL bypass out */ - hws[IMX8MN_AUDIO_PLL1_BYPASS] =3D imx_clk_hw_mux_flags("audio_pll1_bypass= ", base, 16, 1, audio_pll1_bypass_sels, ARRAY_SIZE(audio_pll1_bypass_sels),= CLK_SET_RATE_PARENT); - hws[IMX8MN_AUDIO_PLL2_BYPASS] =3D imx_clk_hw_mux_flags("audio_pll2_bypass= ", base + 0x14, 16, 1, audio_pll2_bypass_sels, ARRAY_SIZE(audio_pll2_bypass= _sels), CLK_SET_RATE_PARENT); - hws[IMX8MN_VIDEO_PLL_BYPASS] =3D imx_clk_hw_mux_flags("video_pll_bypass",= base + 0x28, 16, 1, video_pll_bypass_sels, ARRAY_SIZE(video_pll_bypass_sel= s), CLK_SET_RATE_PARENT); - hws[IMX8MN_DRAM_PLL_BYPASS] =3D imx_clk_hw_mux_flags("dram_pll_bypass", b= ase + 0x50, 16, 1, dram_pll_bypass_sels, ARRAY_SIZE(dram_pll_bypass_sels), = CLK_SET_RATE_PARENT); - hws[IMX8MN_GPU_PLL_BYPASS] =3D imx_clk_hw_mux_flags("gpu_pll_bypass", bas= e + 0x64, 28, 1, gpu_pll_bypass_sels, ARRAY_SIZE(gpu_pll_bypass_sels), CLK_= SET_RATE_PARENT); - hws[IMX8MN_M7_ALT_PLL_BYPASS] =3D imx_clk_hw_mux_flags("m7_alt_pll_bypass= ", base + 0x74, 28, 1, m7_alt_pll_bypass_sels, ARRAY_SIZE(m7_alt_pll_bypass= _sels), CLK_SET_RATE_PARENT); - hws[IMX8MN_ARM_PLL_BYPASS] =3D imx_clk_hw_mux_flags("arm_pll_bypass", bas= e + 0x84, 28, 1, arm_pll_bypass_sels, ARRAY_SIZE(arm_pll_bypass_sels), CLK_= SET_RATE_PARENT); - hws[IMX8MN_SYS_PLL3_BYPASS] =3D imx_clk_hw_mux_flags("sys_pll3_bypass", b= ase + 0x114, 28, 1, sys_pll3_bypass_sels, ARRAY_SIZE(sys_pll3_bypass_sels),= CLK_SET_RATE_PARENT); + hws[IMX8MN_AUDIO_PLL1_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATO= P_AUDIO_PLL1_BYPASS); + hws[IMX8MN_AUDIO_PLL2_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATO= P_AUDIO_PLL2_BYPASS); + hws[IMX8MN_VIDEO_PLL_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP= _VIDEO_PLL_BYPASS); + hws[IMX8MN_DRAM_PLL_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= DRAM_PLL_BYPASS); + hws[IMX8MN_GPU_PLL_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_G= PU_PLL_BYPASS); + hws[IMX8MN_M7_ALT_PLL_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATO= P_M7_ALT_PLL_BYPASS); + hws[IMX8MN_ARM_PLL_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_A= RM_PLL_BYPASS); + hws[IMX8MN_SYS_PLL3_BYPASS] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= SYS_PLL3_BYPASS); =20 /* PLL out gate */ - hws[IMX8MN_AUDIO_PLL1_OUT] =3D imx_clk_hw_gate("audio_pll1_out", "audio_p= ll1_bypass", base, 13); - hws[IMX8MN_AUDIO_PLL2_OUT] =3D imx_clk_hw_gate("audio_pll2_out", "audio_p= ll2_bypass", base + 0x14, 13); - hws[IMX8MN_VIDEO_PLL_OUT] =3D imx_clk_hw_gate("video_pll_out", "video_pll= _bypass", base + 0x28, 13); - hws[IMX8MN_DRAM_PLL_OUT] =3D imx_clk_hw_gate("dram_pll_out", "dram_pll_by= pass", base + 0x50, 13); - hws[IMX8MN_GPU_PLL_OUT] =3D imx_clk_hw_gate("gpu_pll_out", "gpu_pll_bypas= s", base + 0x64, 11); - hws[IMX8MN_M7_ALT_PLL_OUT] =3D imx_clk_hw_gate("m7_alt_pll_out", "m7_alt_= pll_bypass", base + 0x74, 11); - hws[IMX8MN_ARM_PLL_OUT] =3D imx_clk_hw_gate("arm_pll_out", "arm_pll_bypas= s", base + 0x84, 11); - hws[IMX8MN_SYS_PLL3_OUT] =3D imx_clk_hw_gate("sys_pll3_out", "sys_pll3_by= pass", base + 0x114, 11); + hws[IMX8MN_AUDIO_PLL1_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_A= UDIO_PLL1_OUT); + hws[IMX8MN_AUDIO_PLL2_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_A= UDIO_PLL2_OUT); + hws[IMX8MN_VIDEO_PLL_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_VI= DEO_PLL_OUT); + hws[IMX8MN_DRAM_PLL_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_DRA= M_PLL_OUT); + hws[IMX8MN_GPU_PLL_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_GPU_= PLL_OUT); + hws[IMX8MN_M7_ALT_PLL_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_M= 7_ALT_PLL_OUT); + hws[IMX8MN_ARM_PLL_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_ARM_= PLL_OUT); + hws[IMX8MN_SYS_PLL3_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS= _PLL3_OUT); =20 /* SYS PLL1 fixed output */ - hws[IMX8MN_SYS_PLL1_OUT] =3D imx_clk_hw_gate("sys_pll1_out", "sys_pll1", = base + 0x94, 11); - hws[IMX8MN_SYS_PLL1_40M] =3D imx_clk_hw_fixed_factor("sys_pll1_40m", "sys= _pll1_out", 1, 20); - hws[IMX8MN_SYS_PLL1_80M] =3D imx_clk_hw_fixed_factor("sys_pll1_80m", "sys= _pll1_out", 1, 10); - hws[IMX8MN_SYS_PLL1_100M] =3D imx_clk_hw_fixed_factor("sys_pll1_100m", "s= ys_pll1_out", 1, 8); - hws[IMX8MN_SYS_PLL1_133M] =3D imx_clk_hw_fixed_factor("sys_pll1_133m", "s= ys_pll1_out", 1, 6); - hws[IMX8MN_SYS_PLL1_160M] =3D imx_clk_hw_fixed_factor("sys_pll1_160m", "s= ys_pll1_out", 1, 5); - hws[IMX8MN_SYS_PLL1_200M] =3D imx_clk_hw_fixed_factor("sys_pll1_200m", "s= ys_pll1_out", 1, 4); - hws[IMX8MN_SYS_PLL1_266M] =3D imx_clk_hw_fixed_factor("sys_pll1_266m", "s= ys_pll1_out", 1, 3); - hws[IMX8MN_SYS_PLL1_400M] =3D imx_clk_hw_fixed_factor("sys_pll1_400m", "s= ys_pll1_out", 1, 2); - hws[IMX8MN_SYS_PLL1_800M] =3D imx_clk_hw_fixed_factor("sys_pll1_800m", "s= ys_pll1_out", 1, 1); + hws[IMX8MN_SYS_PLL1_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS= _PLL1_OUT); + hws[IMX8MN_SYS_PLL1_40M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS= _PLL1_40M); + hws[IMX8MN_SYS_PLL1_80M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS= _PLL1_80M); + hws[IMX8MN_SYS_PLL1_100M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL1_100M); + hws[IMX8MN_SYS_PLL1_133M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL1_133M); + hws[IMX8MN_SYS_PLL1_160M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL1_160M); + hws[IMX8MN_SYS_PLL1_200M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL1_200M); + hws[IMX8MN_SYS_PLL1_266M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL1_266M); + hws[IMX8MN_SYS_PLL1_400M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL1_400M); + hws[IMX8MN_SYS_PLL1_800M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL1_800M); =20 /* SYS PLL2 fixed output */ - hws[IMX8MN_SYS_PLL2_OUT] =3D imx_clk_hw_gate("sys_pll2_out", "sys_pll2", = base + 0x104, 11); - hws[IMX8MN_SYS_PLL2_50M] =3D imx_clk_hw_fixed_factor("sys_pll2_50m", "sys= _pll2_out", 1, 20); - hws[IMX8MN_SYS_PLL2_100M] =3D imx_clk_hw_fixed_factor("sys_pll2_100m", "s= ys_pll2_out", 1, 10); - hws[IMX8MN_SYS_PLL2_125M] =3D imx_clk_hw_fixed_factor("sys_pll2_125m", "s= ys_pll2_out", 1, 8); - hws[IMX8MN_SYS_PLL2_166M] =3D imx_clk_hw_fixed_factor("sys_pll2_166m", "s= ys_pll2_out", 1, 6); - hws[IMX8MN_SYS_PLL2_200M] =3D imx_clk_hw_fixed_factor("sys_pll2_200m", "s= ys_pll2_out", 1, 5); - hws[IMX8MN_SYS_PLL2_250M] =3D imx_clk_hw_fixed_factor("sys_pll2_250m", "s= ys_pll2_out", 1, 4); - hws[IMX8MN_SYS_PLL2_333M] =3D imx_clk_hw_fixed_factor("sys_pll2_333m", "s= ys_pll2_out", 1, 3); - hws[IMX8MN_SYS_PLL2_500M] =3D imx_clk_hw_fixed_factor("sys_pll2_500m", "s= ys_pll2_out", 1, 2); - hws[IMX8MN_SYS_PLL2_1000M] =3D imx_clk_hw_fixed_factor("sys_pll2_1000m", = "sys_pll2_out", 1, 1); - - hws[IMX8MN_CLK_CLKOUT1_SEL] =3D imx_clk_hw_mux2("clkout1_sel", base + 0x1= 28, 4, 4, clkout_sels, ARRAY_SIZE(clkout_sels)); - hws[IMX8MN_CLK_CLKOUT1_DIV] =3D imx_clk_hw_divider("clkout1_div", "clkout= 1_sel", base + 0x128, 0, 4); - hws[IMX8MN_CLK_CLKOUT1] =3D imx_clk_hw_gate("clkout1", "clkout1_div", bas= e + 0x128, 8); - hws[IMX8MN_CLK_CLKOUT2_SEL] =3D imx_clk_hw_mux2("clkout2_sel", base + 0x1= 28, 20, 4, clkout_sels, ARRAY_SIZE(clkout_sels)); - hws[IMX8MN_CLK_CLKOUT2_DIV] =3D imx_clk_hw_divider("clkout2_div", "clkout= 2_sel", base + 0x128, 16, 4); - hws[IMX8MN_CLK_CLKOUT2] =3D imx_clk_hw_gate("clkout2", "clkout2_div", bas= e + 0x128, 24); - - np =3D dev->of_node; - base =3D devm_platform_ioremap_resource(pdev, 0); - if (WARN_ON(IS_ERR(base))) { - ret =3D PTR_ERR(base); - goto unregister_hws; - } + hws[IMX8MN_SYS_PLL2_OUT] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS= _PLL2_OUT); + hws[IMX8MN_SYS_PLL2_50M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SYS= _PLL2_50M); + hws[IMX8MN_SYS_PLL2_100M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL2_100M); + hws[IMX8MN_SYS_PLL2_125M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL2_125M); + hws[IMX8MN_SYS_PLL2_166M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL2_166M); + hws[IMX8MN_SYS_PLL2_200M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL2_200M); + hws[IMX8MN_SYS_PLL2_250M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL2_250M); + hws[IMX8MN_SYS_PLL2_333M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL2_333M); + hws[IMX8MN_SYS_PLL2_500M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_SY= S_PLL2_500M); + hws[IMX8MN_SYS_PLL2_1000M] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_S= YS_PLL2_1000M); + + hws[IMX8MN_CLK_CLKOUT1_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= CLK_CLKOUT1_SEL); + hws[IMX8MN_CLK_CLKOUT1_DIV] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= CLK_CLKOUT1_DIV); + hws[IMX8MN_CLK_CLKOUT1] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_CLK_= CLKOUT1); + hws[IMX8MN_CLK_CLKOUT2_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= CLK_CLKOUT2_SEL); + hws[IMX8MN_CLK_CLKOUT2_DIV] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_= CLK_CLKOUT2_DIV); + hws[IMX8MN_CLK_CLKOUT2] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_CLK_= CLKOUT2); =20 /* CORE */ hws[IMX8MN_CLK_A53_DIV] =3D imx8m_clk_hw_composite_core("arm_a53_div", im= x8mn_a53_sels, base + 0x8000); @@ -599,18 +579,15 @@ static int imx8mn_clocks_probe(struct platform_device= *pdev) =20 ret =3D of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data); if (ret < 0) { - dev_err(dev, "failed to register hws for i.MX8MN\n"); - goto unregister_hws; + imx_unregister_hw_clocks(hws, IMX8MN_CLK_END); + return dev_err_probe(dev, ret, + "failed to register hws for i.MX8MN\n"); } =20 imx_register_uart_clocks(); =20 + dev_info(dev, "NXP i.MX8MN ccm clock driver probed\n"); return 0; - -unregister_hws: - imx_unregister_hw_clocks(hws, IMX8MN_CLK_END); - - return ret; } =20 static const struct of_device_id imx8mn_clk_of_match[] =3D { --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 4F2EB19D087 for ; Sun, 29 Dec 2024 14:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483855; cv=none; b=A3K84d28HjBqHvWrSp5Y9abtxL42JUspEt0WRXvc1GhuTtaf6E490Fgj4KfNWHsdhb1KmxUm4og7lBkm6Ht6EK2ZjifO9Y3AoeKSmYUq7QRmcxlvxhDK7t9YzRjXD45DZzqBGIfgdv/q8vtIV4bcbftZnTBz1bsBmCxlPNbzySE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483855; c=relaxed/simple; bh=3HpG5JSfnp1rR8LM9tLDyGAnkrv7gQYHSv7Ks+OYcRk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ry8I/NaAcRJ8WVQfUzDfPc/TXcjojITLa37tuXLs5cVHFS5DxvybBMrbDuIdeO2FICBvhI9wADMSpx0YdGTPYOHbvlZyo2bgQUEbgz74vzlHBRQ3eoq5pxcDx4T20RCTXzoL/H5uNESp40RIGQcX6ygunOJ4mQSxSMOYdn43IKU= 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=fNx073Vk; arc=none smtp.client-ip=209.85.218.42 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="fNx073Vk" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a9e44654ae3so1383546366b.1 for ; Sun, 29 Dec 2024 06:50:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483851; x=1736088651; 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=AjwlhaAOkrwwhyUyrS6nha6mqO5aPDlQoHWfonPTSAw=; b=fNx073VkFNcHajTQaq7kMBGREn9S/Uy0N4fCO2FxqT7p1hYPKzAlRQ/E+0iANAcOMr 9AtGY/6DT5XdVaOaa+WsH9W1R8liHqjTLgKgk+mqkNVq1kGQf5YMenhJSR3QzXVRHudZ KBRxQjlWdDnzkq7tM14F5tPNyh9kHHLiVDIo8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483851; x=1736088651; 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=AjwlhaAOkrwwhyUyrS6nha6mqO5aPDlQoHWfonPTSAw=; b=MqTzTHyOzuaI0b1z2wUffBWGnBXF09OHQT1okXTxU/yXo1xBHkF9giT0IopwzNTu8g gcWpfmHQMmWhxgWYsb7OM8QfJqcEqPy7uKX5nQsmZBAJXYl+cAF7UPw7Z26u7FGIgf0/ Pq7XT2d3adB7YER4CjKdT+dLbtD80uPs8IVQi4Rhw/dFG6cmwLmBFksuTvMrHkx1PyeP +LqpIWmSo7e21LqIvwDzAoRrf7krhL14ouQYEXq/kDBUCRLjeGX3AW2k01gEh02dG1W5 KNuByAQHzIXVhLrG2Bb4bl3KxUP9PAv8EgzuBlU1Cp97P7FGaqVd/fNWQBKYwiWhTJJz hdvw== X-Gm-Message-State: AOJu0Ywbu5dpGsbJQh4Rk5Zlxv2/Ms4BUeN/eu88XvSVkE6BfJ4abZNI bQZtWY2QLR+u4E7Mid2r+KvPKl2LjUm075GsIi/r0NXgNXaaUvXF2vvS6rQfIvVeI7Be1CFVoM3 X X-Gm-Gg: ASbGnctwAa/oHSeFsiJGLkpebijHua5DY52RTmTvG8gh81n2YW3aiPfd91UeB6MUgXO pH8eYndN/sGqBLrqk2YJf6OvIq6ZZNICLVyoq51SYkZQsSw7c+jhJDpYgUAoUkmuYI/lpIE77hK yBPrXC8E8NR5I1LkjrP/e9E/BFID0tee7FMvlN6L8FTb/7WDGheOPykiasl/S+bvYXPXuQBA69D NBcJvsAsmtr/r7rZIQMho+R2x580q3tmCBGtk2i4IJX5iZGGyMlFNxarXHv2o1t5VUVEsr4yp8+ nHPPz60VNwd8a2NmkZS6Ug== X-Google-Smtp-Source: AGHT+IFxgItt54HHYH/8mA88WaD38CQ9mOKSbKko/RvuXIeFzD1DAkYznBzK7j3ZQqQYmVzmFb1k8A== X-Received: by 2002:a17:906:6a15:b0:aab:d8e4:2062 with SMTP id a640c23a62f3a-aac3366b549mr2566530166b.56.1735483851580; Sun, 29 Dec 2024 06:50:51 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:51 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , 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 v8 12/18] dt-bindings: clock: imx8m-clock: add PLLs Date: Sun, 29 Dec 2024 15:49:36 +0100 Message-ID: <20241229145027.3984542-13-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Though adding the PLLs to clocks and clock-names properties will break the ABI, it is required to accurately describe the hardware. Indeed, the Clock Control Module (CCM) receives clocks from the PLLs and oscillators and generates clocks for on-chip peripherals. Signed-off-by: Dario Binacchi Reviewed-by: Krzysztof Kozlowski --- (no changes since v7) Changes in v7: - Add 'Reviewed-by' tag of Krzysztof Kozlowski Changes in v6: - New .../bindings/clock/imx8m-clock.yaml | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Doc= umentation/devicetree/bindings/clock/imx8m-clock.yaml index c643d4a81478..d96570bf60dc 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -29,12 +29,12 @@ properties: maxItems: 2 =20 clocks: - minItems: 6 - maxItems: 7 + minItems: 7 + maxItems: 10 =20 clock-names: - minItems: 6 - maxItems: 7 + minItems: 7 + maxItems: 10 =20 '#clock-cells': const: 1 @@ -86,6 +86,10 @@ allOf: - description: ext2 clock input - description: ext3 clock input - description: ext4 clock input + - description: audio1 PLL input + - description: audio2 PLL input + - description: dram PLL input + - description: video PLL input =20 clock-names: items: @@ -95,20 +99,31 @@ allOf: - const: clk_ext2 - const: clk_ext3 - const: clk_ext4 + - const: audio_pll1 + - const: audio_pll2 + - const: dram_pll + - const: video_pll =20 additionalProperties: false =20 examples: # Clock Control Module node: - | + #include + clock-controller@30380000 { compatible =3D "fsl,imx8mm-ccm"; reg =3D <0x30380000 0x10000>; #clock-cells =3D <1>; clocks =3D <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>, - <&clk_ext3>, <&clk_ext4>; + <&clk_ext3>, <&clk_ext4>, + <&anatop IMX8MM_ANATOP_AUDIO_PLL1>, + <&anatop IMX8MM_ANATOP_AUDIO_PLL2>, + <&anatop IMX8MM_ANATOP_DRAM_PLL>, + <&anatop IMX8MM_ANATOP_VIDEO_PLL>; clock-names =3D "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", - "clk_ext3", "clk_ext4"; + "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", + "dram_pll", "video_pll"; }; =20 - | --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (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 00A8B19D897 for ; Sun, 29 Dec 2024 14:50:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483856; cv=none; b=Rvro5l/Zip+Es8Hfuyy1IFrM+Q6kMRsqzyx/taYDo8rPeRvteLyJAdELd/lmTMs+Ha2J6rLLD5/JBAK3grfmfhgr8A8l67V9MypfDuyx6G9GS8o5jOaY6pLKYpkM/PKdlV6zBpPa8dQpi+VLLpCefGR1LtgeSMfBYmPKL8Z9PbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483856; c=relaxed/simple; bh=gzAb8Vev7F0m4l48I407MYxa8qXR/pteEzI03GTE0HY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=crq1I2Z59KwXZxwIZ44SqgImnUxV4hdAQTQHxnPO1fXJZYZhUCjsFNaVs3/veIxSKtY0k787mJjmFMyyobzxkwwD+xOIWV5TSYcNW30zlz0ZxlLJLF3iptGOkDu12jxwWP5tl+p7eSvrt6EnDCeb4EPzPLSstoJnROBnMHy7QWs= 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=rck3lPzA; arc=none smtp.client-ip=209.85.208.47 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="rck3lPzA" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d3e9f60bf4so14479212a12.3 for ; Sun, 29 Dec 2024 06:50:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483853; x=1736088653; 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=FS59gZd32BjVBMnl0y8BuCd7aMfa22x1ZHu9pei4qQQ=; b=rck3lPzAq69inkk6doL0xUhyz+D4myn4VtP+mwNEe2OWN78qCrQ2ds4PGiZeD3mQuR +HPbbsxK04ZeG2RX9YCyGb90IaZznW3PIcvvlUpU4/i5iiu80qz1HAxAiz9aKwpx67Ax 2bvRpSOKb0z2WyH8/C/sRVv/3NNbK05UmYsL8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483853; x=1736088653; 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=FS59gZd32BjVBMnl0y8BuCd7aMfa22x1ZHu9pei4qQQ=; b=PogriZleH6mS0rK12bFQrw9e/Ab3j84DYEqwJmSGmb3wvmg5oNt/+QFOyPqRI1WSLd kJeUPXfYiWSrtsFgvJDM4n5/bQa5Tp190efnMdexwVa1WYxQPmkUGBeslwuA6dkaxcmt rY7ODDwzJSu0Xit7OiXqFI5lPZqLcVvnobjix0jTR2m5EPGQoffurYEChfXcwFmx66yN 8smK/c32QjWRG2M5snVFFOAE+D/0aEYJ3q6Cp+3etZ2wfkrZFr3WQEM8a8ALCWJvC5Nr 16jOcYoSpAIFUXP7zCm61slCGPkwPyYsE0gbcGQbE7i6fVbLBGy2SoJPrlfksdtIbHK5 sjfQ== X-Gm-Message-State: AOJu0YzUwwqI8P84XGsd7ZnSG9D0YwCQUjHuxETWbVOAU76of2i09C6A VK4lZP/VLkFWSaMXYcdBeZENSekJt7Y0/cSMBKBc4pJYqe0z3cr5m0+SlPWwM+upsPoRigeLehi j X-Gm-Gg: ASbGncudBwAPeZmnOp6no6lbo2LoUAtifWJhN/F6/ElRPjNQ0FNb7EtFsTnN4unL76z fVs3GjZ6EpAdzH0HiokGxCa0kX1SvjamJnYmN9DnwEgaRbYUnLj0qL6hZcB5HKLkSrwzCR11zyJ QsRwcw+kop54GlnK3Uno/ZJxfM9Dt5nC8rNA1zbUbEbZpiTyZk09KwOoCa9dB6w8EkDNk8UAIfn P/csUjRtc50uaVFrrQsfqAD4qx+tT5JHIBVJR28+OepbquwP3WOABlfqAtSuluQPsexw29o99OF 5QJokVhLtOvhK0et9nX51A== X-Google-Smtp-Source: AGHT+IGAr/fj0/FxvDNSF3QhklUe5PsXkRgWrVEt4Z7yfy8kv6dXfzAqgAyAuWRdOWj4EIdZF2KqUg== X-Received: by 2002:a17:907:3f9e:b0:aa6:7f99:81aa with SMTP id a640c23a62f3a-aac2d446f68mr2704157366b.6.1735483853232; Sun, 29 Dec 2024 06:50:53 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:52 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 13/18] arm64: dts: imx8mm: add PLLs to clock controller module (CCM) Date: Sun, 29 Dec 2024 15:49:37 +0100 Message-ID: <20241229145027.3984542-14-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add the PLLs generated by anatop to the clock list of the Clock Controller Module (CCM) node. Signed-off-by: Dario Binacchi --- (no changes since v4) Changes in v4: - New arch/arm64/boot/dts/freescale/imx8mm.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dt= s/freescale/imx8mm.dtsi index 597041a05073..79f4c1ae7d8b 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -642,9 +642,14 @@ clk: clock-controller@30380000 { ; #clock-cells =3D <1>; clocks =3D <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>, - <&clk_ext3>, <&clk_ext4>; + <&clk_ext3>, <&clk_ext4>, + <&anatop IMX8MM_ANATOP_AUDIO_PLL1>, + <&anatop IMX8MM_ANATOP_AUDIO_PLL2>, + <&anatop IMX8MM_ANATOP_DRAM_PLL>, + <&anatop IMX8MM_ANATOP_VIDEO_PLL>; clock-names =3D "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", - "clk_ext3", "clk_ext4"; + "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", + "dram_pll", "video_pll"; assigned-clocks =3D <&clk IMX8MM_CLK_A53_SRC>, <&clk IMX8MM_CLK_A53_CORE>, <&clk IMX8MM_CLK_NOC>, --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 6941619D8BB for ; Sun, 29 Dec 2024 14:50:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483858; cv=none; b=ZVvAxgaR741/NJN6t7mJ0IbAmQxaZJeM324qU2TP7cgkSxjSWgivnHmO/3Jg8PcsGIH9G+mf3wmu1z1oYPIbsl/GxawiVS+cDSEA7OPwER9KyvzmMidIkFEujX9nlsqK5rMsLKkPVkwDjs3up91Ild0y3Z8hFIF1sLm9wqnF8GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483858; c=relaxed/simple; bh=7yYZJd86bIYU+vT8RAjY7wEp1oq0Xfmfy1RQITDVRe8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qgmL0lq7dc1lS5+ggMLeW/NFp6sUU3mmrcNWuNWYIdHr7obXaSqWjoLAbup9qlaCaV0pHsj+ENEt9iVu6EBaILCIiW4AW7rjc9EtRdkhUa/yIX9qwIXpfFCpCqEuBP8HSVx38vpaPNTMDisok3aiEXRnpYNqnKHqCDBQGXMOJC8= 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=OfKNEyof; arc=none smtp.client-ip=209.85.218.50 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="OfKNEyof" Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-aaeec07b705so666673266b.2 for ; Sun, 29 Dec 2024 06:50:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483855; x=1736088655; 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=8grfYWwIX4hpiA7jlx82Mk2yoAsYJcNHuOuvJvnYwRc=; b=OfKNEyofogqbMotCEeERoUEudBB0h+IjDOlbO4YGfnxvOugNSqB69nqMSqaTohXqCs 55M/+jvAD5u1o8xvEgrHTsZ1+CpjlUIQKes7XC9PqnfTJV9+YXC9k124gjEdxoV6hYS8 npn4PxM/FIqQqBfp49Tae3h8UKjoF2CMKu/nU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483855; x=1736088655; 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=8grfYWwIX4hpiA7jlx82Mk2yoAsYJcNHuOuvJvnYwRc=; b=FyLrkWSz9bVB1nPfd2m7Yosig9a4u9zHj8ibrn/ykDdQ/MO5V35uyAJ2fjW+0ikM/O WVVIKJO2i1G70ZDhRrBBUlVgSI6QKriFaj2IQ82q7rTiIxPFuJqsuE44bupdpDsKS0/s RTdTyuQMKAN2hdMI7k4BZEioeLNIumMGyHcxDJEQGkLGBrEe7JQLI4LsS128rEXxwI0t kKY3C3T6opuk8iTt2yFSyfWy+mulCcCYHara/G/PeUD8h9hxg2qFO4izqoM+j6tZn7Ks Oza04fUsEwAnLkP02bHuNkoQZgKqjOlyIf2HEpTxAlQ12mq7Ap/NLwzr7vjXHtCkiATg 3hhg== X-Gm-Message-State: AOJu0YyCMhaEXCxOCUuLrk6ahoByziCu5huaFy0T8O4SCJATC8fJpQfV 8Bx9Yw+MsGV+DzOKQp4nKcKhE4xL2fCvDFZaolZlnkZerOK/U/GNjh4eE9GiT0tPkdL3cN8t1vZ + X-Gm-Gg: ASbGnctL2tqvGtN/su0E4L8BL2tvJwtfLulQhvbuVin+agTIuj7fL+Xhf7pHGNI8T6n b6KHJ8FHpixe+tKEYdGhThRuGfC5d4ZD8mwxiwxeeW2HQ9E/Xw9ZHiilweacjNaK5mYr6uBe9NY iTacONyOL/6qG8Th5oWe/Az8eOboRs87CuungP78p/8HgDvga7BHiGkf8x9mNvIIhzBcLiSN773 tx2Htvp8ZE7qBfAbBG9Hz+okER0HbLCr6GB6r+ocQcuxj3Xy6OGNoN8nF0bcDDbReiVBDSQDFpl 5zifS0axAd778fBvhMNaPQ== X-Google-Smtp-Source: AGHT+IGu2N+6ZD25BGmle+g9l4PupNH1HacLiS+Z1hhM3CuT2AA41uFWrZ6hOnOskLaUH72Ls045WQ== X-Received: by 2002:a17:907:c082:b0:aae:93aa:9ac7 with SMTP id a640c23a62f3a-aae93aa9bcemr2063864266b.50.1735483854672; Sun, 29 Dec 2024 06:50:54 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:54 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 14/18] arm64: dts: imx8mn: add PLLs to clock controller module (CCM) Date: Sun, 29 Dec 2024 15:49:38 +0100 Message-ID: <20241229145027.3984542-15-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add the PLLs generated by anatop to the clock list of the Clock Controller Module (CCM) node. Signed-off-by: Dario Binacchi --- (no changes since v4) Changes in v4: - New arch/arm64/boot/dts/freescale/imx8mn.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dt= s/freescale/imx8mn.dtsi index 49be492b5687..01013c1fd61d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi @@ -643,9 +643,14 @@ clk: clock-controller@30380000 { ; #clock-cells =3D <1>; clocks =3D <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>, - <&clk_ext3>, <&clk_ext4>; + <&clk_ext3>, <&clk_ext4>, + <&anatop IMX8MN_ANATOP_AUDIO_PLL1>, + <&anatop IMX8MN_ANATOP_AUDIO_PLL2>, + <&anatop IMX8MN_ANATOP_DRAM_PLL>, + <&anatop IMX8MN_ANATOP_VIDEO_PLL>; clock-names =3D "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", - "clk_ext3", "clk_ext4"; + "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", + "dram_pll", "video_pll"; assigned-clocks =3D <&clk IMX8MN_CLK_A53_SRC>, <&clk IMX8MN_CLK_A53_CORE>, <&clk IMX8MN_CLK_NOC>, --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 0E99019DF98 for ; Sun, 29 Dec 2024 14:50:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483859; cv=none; b=W3PuXie3JEvw+NKGUcJP6onIB0zV3kSz8h31VrRzCKu67ZCcurXIBVO0X6GvECXQ4ih0mjNiRXCBZXgA1OfSGaW9IIwRTzKzJ4E5qmhLyw/WOlKewNphS+q4wdClTGgGFrdKDxipbUdZUUPKUmsIj0gRv2iv/P8/NRhutPO9jhY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483859; c=relaxed/simple; bh=PC1buv5hYG2W3S8/eU+2VA2jywMzm7Vv3xQppQcKsGg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BWwwdrnh5vPbrSiGilCvBvBb40teFkAivgjrpJGkDuO5I4PSr5MB2dyDcmAxI48TzM6Ek5OzWCa9zC0EQo0OybDVcOhJZCZqNwQ1kPhIdJFJ9tHMjzGo8AVjGOfO28jdN9c6Z39434I8Win3X5t/NPOOHm6gq+Oef21qGCoOgUs= 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=Mx/asu4I; arc=none smtp.client-ip=209.85.218.44 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="Mx/asu4I" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-aaeef97ff02so714221566b.1 for ; Sun, 29 Dec 2024 06:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483856; x=1736088656; 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=7KTPitaOd10kqEMh4mWJPB1Bs0wTX2XDIfABV6gUcV0=; b=Mx/asu4IM4eRmRcdVQKntg8G6eRO0KI7NMkDhorg//kSIzw2ybe/4wYD5yE7DxLSJx N4a4UBBCOQflrAvEbxfPnnQkDWy7ahPw8OHtP4Am/dEm8M1oxjaB3IR6gpTi1dpUbiO3 d4vcSCkjjNELq3sXpu2blpjDBTjB79oc0dzBY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483856; x=1736088656; 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=7KTPitaOd10kqEMh4mWJPB1Bs0wTX2XDIfABV6gUcV0=; b=GsbJl2CLmED1CtTGD2w2k62W9iWnu91hXVwWz3Dd3O3gW6stELipDaq6sG9QhNu3S2 DiZ+dCEToGXsQ5cdcuFSFXmln9GYici/IGMeFpQ8BRwtnZ8LTq2JZwpwEb+fMDsKQ8n1 /vjo3qVWnDoLd8Ct/febIlOELMRIigXmqAw5NCgazTmXUSwlRqBafUuc9A+dz7FqEAqQ 3MbsDmVKTPsDvK2+6kABIDR63jx6zGuyeWtn5ySJURjTvEjUWxcRW3sl5ed/j9S8L9RA NdkTph0+pCqhkY4YmFwubpI0icENIKi+p8KemMzeT5UhdyEEMcGTqRwhyuzyHkmZNhWn dn6w== X-Gm-Message-State: AOJu0YyyPM2nchoVrOd9ySfK5yDqgLQbd3lYxgVhdYiagKqHMsLv6Sa9 /jfAwiLHRboP1YiUPCQkl/T56NU/nfxuUmfBBbQ9HlkNzfrCIQihGNz1OAfx1B7CwGVJMvPwgqe G X-Gm-Gg: ASbGncumHAzq5tDFhLp2oSMxfQNhC+HAoMBxE5UQZqrAGL8tC2othIMd8brR/kFy73o 8MSbQSu0vAx1dsfzbS9jgCZVNC2OgXq5lzVKCCNMrjfXZJNqnj8XaundauepqUnuM9u06pvBT4z LjES4js4eQfhltCrIEOV8nDjxx16JxqYFfifyVXwsVp8Uw26QKUG7B+QZ5Yw3/GDxxy2UspMIYK 2wNnEOIPpEGXv2yFEkkdnd0mvX9ilZiGuD5CHFtLukfvCMP8dZz1iUI1E+rdI7zVU7oGxaV56gA 9MsStZFJvoZqzRC5zz0/4A== X-Google-Smtp-Source: AGHT+IHvQXTsCcZJ8CU1KhAq/G5BDJIBlqOMAEAV9YW5qQI6LW38CUK2eUxP4LJJg+eZZRtCwN8OPg== X-Received: by 2002:a17:907:c1d:b0:aae:ccbe:993d with SMTP id a640c23a62f3a-aaeccbe9ac9mr2338346966b.35.1735483856193; Sun, 29 Dec 2024 06:50:56 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:55 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH v8 15/18] arm64: dts: imx8mp: add PLLs to clock controller module (CCM) Date: Sun, 29 Dec 2024 15:49:39 +0100 Message-ID: <20241229145027.3984542-16-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add the PLLs generated by anatop to the clock list of the Clock Controller Module (CCM) node. Signed-off-by: Dario Binacchi --- (no changes since v4) Changes in v4: - New arch/arm64/boot/dts/freescale/imx8mp.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dt= s/freescale/imx8mp.dtsi index 0b928e173f29..eab05170442d 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi @@ -751,9 +751,14 @@ clk: clock-controller@30380000 { ; #clock-cells =3D <1>; clocks =3D <&osc_32k>, <&osc_24m>, <&clk_ext1>, <&clk_ext2>, - <&clk_ext3>, <&clk_ext4>; + <&clk_ext3>, <&clk_ext4>, + <&anatop IMX8MP_ANATOP_AUDIO_PLL1>, + <&anatop IMX8MP_ANATOP_AUDIO_PLL2>, + <&anatop IMX8MP_ANATOP_DRAM_PLL>, + <&anatop IMX8MP_ANATOP_VIDEO_PLL>; clock-names =3D "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", - "clk_ext3", "clk_ext4"; + "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", + "dram_pll", "video_pll"; assigned-clocks =3D <&clk IMX8MP_CLK_A53_SRC>, <&clk IMX8MP_CLK_A53_CORE>, <&clk IMX8MP_CLK_NOC>, --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 DCFC119EEBF for ; Sun, 29 Dec 2024 14:50:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483861; cv=none; b=KdTcqkQNFcothErNuodOGgqNDXC5UclxcRTYldLzOVFCNIr2RqdxBO+PWZOL66tDypZwTDdb9/I9T5zKTz4CrxRX+km4GcFs+p+VfsaSPt2kpO2xWh0GP2gQw6NI4avCJyCXOu7GIrzH7O6IKqb40VKXUwxOU6TtpE70TO1V2qo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483861; c=relaxed/simple; bh=El72Xw99HLuBdH9KtR0LW7UzZsYG3PNdKxTAjv0VMF0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BMndqCCbubde8SXPebIcJcm/yVTrP7PRieB5Tc5Y4ieRrEUEDXBozUuLBFEVGQ2r5J2lFsOOKawnngIAyaQpTvMMQg3o3NIIpPzd2FO7AMl7xajgBFqEy/eUbAqzMCnnzF04v9yjVYV0WxP3jmV95p7QA6Qv2SCf6ink3ruiZ44= 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=I40BOtED; arc=none smtp.client-ip=209.85.218.47 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="I40BOtED" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-aa6a92f863cso1372957166b.1 for ; Sun, 29 Dec 2024 06:50:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483858; x=1736088658; 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=aXOt2DStfgxzjFuE8T9ZB+qgm2XwGSAXjcE/H4FasAs=; b=I40BOtEDtH5hY+98pr6yMKrKtgu/XXpN5k3txPIcYgJqW1mjQcB4Msc1AF05fgMOqG ossIKeMP8pCmZMVog4v5/WqnPuPaYxS45YR0bf5Fxacnyebg+306t5g3dFJduluuY/pc FMqU/ntSrE2a+Lrv8Et6QQFb7xyPFw/gbJOt4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483858; x=1736088658; 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=aXOt2DStfgxzjFuE8T9ZB+qgm2XwGSAXjcE/H4FasAs=; b=AwebDWBhLGQjiyH4DwCx5igQfRv3QMqoSM1V0QGB39wIJCq/I863nG5jhWVQkr+wX2 Y6zhOJbivV2FzKbmIgOFYtd83sEAirvHg9ilHgPB5643WbU7IGFl4JBHrCgrO65E7IRX XyMZRYKEea1CVl4ScXLGWdH80H8atM/ZETnxzgx+SKAMc1amsH2/Eb7yZm3WzbVEa93J 0ivQE4ORvo2PsWmLtfjylvaxgUhV2os93cJNCay379Bsh7RiaO8ZNDRJxtsHLBnI5Sa2 V8jvnGG2RakZ5fUAIhuhQjotmHYTiKnzksOAFpVzz//qKPYb5G8Xzmy3tzMpWRm7SWEf 4UwA== X-Gm-Message-State: AOJu0YwhmlPDKxlJiw5+aEGAL4MzbL8jIfzFOPlsDjdaKScF5Z0aiwxE 2xKnBE2u2kVfX3RVaDbcbhrh2XK/5fbGXljf8gMwtpOxClFguqbJBR8K1KuFPfe3AhkR5SBxmyr C X-Gm-Gg: ASbGncuSSXy8AofVrDMwh0F4PgPbPE+mxLPiNixhtaV67WQjmCh+2C9+To1ZKqd4t1b uKVQoRLs80L2WJoVy68cBqPWEIacXM3kp7+GkMLlQ+wIJgoKzkzSDtmg1hYQQTWRHDn9Yozvvye SqflSvXCD4u8i6XJOZE61Uo40SPEvybmKSv0Da3yOnS4SYyQM02z+uZlUC4EWkbvzooXFMMKP3r HG5jN9uklx7+ZNgHa0c12pQRSLPC0t4gsR4CnnM0IzIwj9r3cEIb06j/KKoZgtPUV2cvjG2LPMM mLJZNg+bABHcASsMe7areA== X-Google-Smtp-Source: AGHT+IFUZKKdB0iUzGRoX60NeZj/L8H0CgHBD5QlmlsHW+jn/bxgVOxw8oTNEA264fbFGQVGlo990A== X-Received: by 2002:a17:907:9621:b0:aa6:6f92:74b1 with SMTP id a640c23a62f3a-aac2ad7fa01mr3093170366b.13.1735483857971; Sun, 29 Dec 2024 06:50:57 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:57 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Krzysztof Kozlowski , 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 v8 16/18] dt-bindings: clock: imx8m-clock: support spread spectrum clocking Date: Sun, 29 Dec 2024 15:49:40 +0100 Message-ID: <20241229145027.3984542-17-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Krzysztof Kozlowski --- (no changes since v7) Changes in v7: - List the PLLs to strictly define the setup order for each of the added properties - Drop maxItems from "fsl,ssc-modfreq-hz" and "fsl,ssc-modrate-percent" properties - Add 'Reviewed-by' tag of Krzysztof Kozlowski 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 | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Doc= umentation/devicetree/bindings/clock/imx8m-clock.yaml index d96570bf60dc..d347d630764a 100644 --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml @@ -43,6 +43,46 @@ properties: ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8m= -clock.h for the full list of i.MX8M clock IDs. =20 + fsl,ssc-modfreq-hz: + description: + The values of modulation frequency (Hz unit) for each clock + supporting spread spectrum. + minItems: 1 + items: + - description: audio_pll1 + - description: audio_pll2 + - description: dram_pll + - description: video_pll + + fsl,ssc-modrate-percent: + description: + The percentage values of modulation rate for each clock + supporting spread spectrum. + minItems: 1 + items: + - description: audio_pll1 + - description: audio_pll2 + - description: dram_pll + - description: video_pll + + fsl,ssc-modmethod: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: | + The modulation techniques for each clock supporting spread + spectrum in this order:: + - audio_pll1 + - audio_pll2 + - dram_pll + - video_pll + minItems: 1 + maxItems: 4 + items: + enum: + - "" + - down-spread + - up-spread + - center-spread + required: - compatible - reg @@ -76,6 +116,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 +168,9 @@ examples: clock-names =3D "osc_32k", "osc_24m", "clk_ext1", "clk_ext2", "clk_ext3", "clk_ext4", "audio_pll1", "audio_pll2", "dram_pll", "video_pll"; + fsl,ssc-modfreq-hz =3D <6818>, <0>, <0>, <2419>; + fsl,ssc-modrate-percent =3D <3>, <0>, <0>, <7>; + fsl,ssc-modmethod =3D "down-spread", "", "", "center-spread"; }; =20 - | --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 5A0FB19F128 for ; Sun, 29 Dec 2024 14:51:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483863; cv=none; b=EO3WKJH9YuG5036RtrxZL+qbKlVDwlV640BevK21yjoFbZ4t9c6D2oYHXxMerO6WjI669AEISKH++WM89Xg2mehDwyGY0w0Gm56QY85FTn/pOHAduHNmy0JRCQ6IsIEhJu/EO4Q6koOfuEGShPmxA+1hm1nOFKROqa4T4q8oT8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483863; c=relaxed/simple; bh=QwSYYok++37LYEdsDoQCkwcsiEGqDK+06Bz9bDqOiPY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mk1bcBmTSM0G3pBfYKqBaFz+mRhTCgFmNhRoKm/Rvxcrf1fSnHIXNcgEfHD61EDgF2FpTWnZycU8IRYlrgkE4BexSzOf2UbrBWVyLsw5vNTkRz55dGD1xwnWyOvDYHcsSzzrtRsCRMO9g6WWMRRGSkJp3Q93602xiNRxaCrel5M= 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=QN7O/3Fx; arc=none smtp.client-ip=209.85.218.44 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="QN7O/3Fx" Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-aaf3c3c104fso262606666b.1 for ; Sun, 29 Dec 2024 06:51:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483859; x=1736088659; 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=jzsVBhjhlmiF36sGbiHfZNPUdaBOg5gbMlUQSL+IAZc=; b=QN7O/3FxuW+eLbVskJaZEX2e7wZ2TgJwqNa+AH9VMlZTqK87L7resMEEYG7IanUjs3 NFpjf+vbGFs4RbCE8q2mcWP6+6KD6egUc763wmTRw0KdytEtv368uBqsf1DSsaHqowJZ RJu7yU2/dh/Ih31p2iPmTCjkIeEkGvIjmS/v0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483859; x=1736088659; 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=jzsVBhjhlmiF36sGbiHfZNPUdaBOg5gbMlUQSL+IAZc=; b=u9jOgT3uhV+yUibfN0If0sOJQDqtyyD4fEpW7F9DuWDVKrWiVzLI5k7jPWDi3TUuPe tskt6lc0gbuTPd2koK5YOeKlszcmVRUZPj1Ss4SGFB8gmcwZE+ENX9u6b7ZkVLiyjAe3 bwvZ2gwsAC1mTYpSOftvPYM36fEIaxwtyZa2OQ3N2vY+FZMpzfi4jsrlItRX1c4qR3xz xYFpyH52lKfnCWMeXmYncNlO11OHivavB3zku30Uqcps+b6zcrRCeYlze3If0ygaRBYL h6pHccdEqT0YdY/SwMx1njIQ607KfDn0j3pVeRgm+1cOrYveLOdZ83wFeceaKEJpAcE1 Kazw== X-Gm-Message-State: AOJu0Ywe3j4/ITdwCt5FLTndNLD/wrzS8fisyQJhoxXLEyfyI1JWbbb5 SnAqIGf2YRa67iREcfPU0HX2n1M0obW94Bt0KvBL2ZOouuSkQ7C/uJnc+IsvMuNoDlHZPbkM8He W X-Gm-Gg: ASbGnctg8MfvqH9diGlX/i8YppLMw3Ol64SFW85XkkEdfPIZV7vfZcmk+hc4xfYQ6RE HvkPer4cFh+crl6r59mciANshqRqR8ohZLz2msIbjxVRZ9fOq2Q5WbvuuGqMpcYdyXfrD/mlM/F rZAhsBEaz9c4uJTu3Z5NAuCNsJp5iROp5r+Q/XbYy02e59uC0BKUolMkqaXkHyw0gV8J+3E7lQt vv4cjnbibb2KepaeiSCEjb1ZYk0HP1Ya/P3nzBCXslW/Xoyc/ZeErEOx1XiplDt0kHdUvdGxEs3 gYqddjh2uGkIVh4fHDtV7A== X-Google-Smtp-Source: AGHT+IGonlEnl0JiDrA5A72iBC8cUxm0T3+II8EAxliL06cYdXrClqNNSpQCBZm7+nUKIwPGFzUbWQ== X-Received: by 2002:a17:906:f598:b0:aae:c3c1:1361 with SMTP id a640c23a62f3a-aaec3c1186fmr2529063966b.44.1735483859533; Sun, 29 Dec 2024 06:50:59 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:50:59 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Peng Fan , Abel Vesa , Fabio Estevam , Michael Turquette , 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 v8 17/18] clk: imx: pll14xx: support spread spectrum clock generation Date: Sun, 29 Dec 2024 15:49:41 +0100 Message-ID: <20241229145027.3984542-18-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for spread spectrum clock (SSC) generation to the pll14xxx driver. Signed-off-by: Dario Binacchi Reviewed-by: Peng Fan --- (no changes since v7) Changes in v7: - Add 'Reviewed-by' tag of Peng Fan Changes in v6: - Update the code based on the changes made to the DT bindings drivers/clk/imx/clk-pll14xx.c | 134 ++++++++++++++++++++++++++++++++++ drivers/clk/imx/clk.h | 16 ++++ 2 files changed, 150 insertions(+) diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index d63564dbb12c..c20f1ade9dff 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) =20 #define LOCK_TIMEOUT_US 10000 =20 @@ -40,6 +46,8 @@ struct clk_pll14xx { enum imx_pll14xx_type type; const struct imx_pll14xx_rate_table *rate_table; int rate_count; + bool ssc_enable; + struct imx_pll14xx_ssc ssc_conf; }; =20 #define to_clk_pll14xx(_hw) container_of(_hw, struct clk_pll14xx, hw) @@ -347,6 +355,27 @@ static int clk_pll1416x_set_rate(struct clk_hw *hw, un= signed long drate, return 0; } =20 +static void clk_pll1443x_enable_ssc(struct clk_hw *hw, unsigned long paren= t_rate, + unsigned int pdiv, unsigned int mdiv) +{ + struct clk_pll14xx *pll =3D to_clk_pll14xx(hw); + struct imx_pll14xx_ssc *conf =3D &pll->ssc_conf; + u32 sscg_ctrl, mfr, mrr; + + sscg_ctrl =3D readl_relaxed(pll->base + SSCG_CTRL); + sscg_ctrl &=3D + ~(SSCG_ENABLE | MFREQ_CTL_MASK | MRAT_CTL_MASK | SEL_PF_MASK); + + mfr =3D parent_rate / (conf->mod_freq * pdiv * (1 << 5)); + mrr =3D (conf->mod_rate * mdiv * (1 << 6)) / (100 * mfr); + + sscg_ctrl |=3D SSCG_ENABLE | FIELD_PREP(MFREQ_CTL_MASK, mfr) | + FIELD_PREP(MRAT_CTL_MASK, mrr) | + FIELD_PREP(SEL_PF_MASK, conf->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 +397,9 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, uns= igned long drate, writel_relaxed(FIELD_PREP(KDIV_MASK, rate.kdiv), pll->base + DIV_CTL1); =20 + if (pll->ssc_enable) + clk_pll1443x_enable_ssc(hw, prate, rate.pdiv, rate.mdiv); + return 0; } =20 @@ -408,6 +440,9 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, uns= igned long drate, gnrl_ctl &=3D ~BYPASS_MASK; writel_relaxed(gnrl_ctl, pll->base + GNRL_CTL); =20 + if (pll->ssc_enable) + clk_pll1443x_enable_ssc(hw, prate, rate.pdiv, rate.mdiv); + return 0; } =20 @@ -542,3 +577,102 @@ struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *= dev, const char *name, return hw; } EXPORT_SYMBOL_GPL(imx_dev_clk_hw_pll14xx); + +void imx_clk_pll14xx_enable_ssc(struct clk_hw *hw, struct imx_pll14xx_ssc = *conf) +{ + struct clk_pll14xx *pll =3D to_clk_pll14xx(hw); + + pll->ssc_enable =3D true; + memcpy(&pll->ssc_conf, conf, sizeof(pll->ssc_conf)); +} +EXPORT_SYMBOL_GPL(imx_clk_pll14xx_enable_ssc); + +static int clk_pll14xx_ssc_mod_type(const char *name, + enum imx_pll14xx_ssc_mod_type *mod_type) +{ + int i; + struct { + const char *name; + enum imx_pll14xx_ssc_mod_type id; + } mod_types[] =3D { + { .name =3D "down-spread", .id =3D IMX_PLL14XX_SSC_DOWN_SPREAD }, + { .name =3D "up-spread", .id =3D IMX_PLL14XX_SSC_UP_SPREAD }, + { .name =3D "center-spread", .id =3D IMX_PLL14XX_SSC_CENTER_SPREAD } + }; + + for (i =3D 0; i < ARRAY_SIZE(mod_types); i++) { + if (!strcmp(name, mod_types[i].name)) { + *mod_type =3D mod_types[i].id; + return 0; + } + } + + return -EINVAL; +} + +static int clk_pll14xx_ssc_index(const char *pll_name) +{ + static const char *const pll_names[] =3D { + "audio_pll1", + "audio_pll2", + "dram_pll", + "video_pll" + }; + int i; + + for (i =3D 0; i < ARRAY_SIZE(pll_names); i++) { + if (!strcmp(pll_names[i], pll_name)) + return i; + } + + return -ENODEV; +} + +int imx_clk_pll14xx_ssc_parse_dt(struct device_node *np, const char *pll_n= ame, + struct imx_pll14xx_ssc *conf) +{ + int index, ret; + const char *s; + + if (!conf) + return -EINVAL; + + index =3D clk_pll14xx_ssc_index(pll_name); + if (index < 0) + return index; + + ret =3D of_property_read_u32_index(np, "fsl,ssc-modfreq-hz", index, + &conf->mod_freq); + if (ret) + return ret; + + ret =3D of_property_read_u32_index(np, "fsl,ssc-modrate-percent", index, + &conf->mod_rate); + if (ret) { + pr_err("missing fsl,ssc-modrate-percent property for %pOFn\n", + np); + return ret; + } + + ret =3D of_property_read_string_index(np, "fsl,ssc-modmethod", index, &s); + if (ret) { + pr_err("failed to get fsl,ssc-modmethod property for %pOFn\n", + np); + return ret; + } + + if (strlen(s) =3D=3D 0) + return -ENODEV; + + ret =3D clk_pll14xx_ssc_mod_type(s, &conf->mod_type); + if (ret) { + pr_err("wrong fsl,ssc-modmethod property for %pOFn\n", np); + return ret; + } + + pr_debug("%s: SSC %s settings: mod_freq: %d, mod_rate: %d: mod_method: %s= [%d]\n", + __func__, pll_name, conf->mod_freq, conf->mod_rate, s, conf->mod_type); + + return 0; +} +EXPORT_SYMBOL_GPL(imx_clk_pll14xx_ssc_parse_dt); diff --git a/drivers/clk/imx/clk.h b/drivers/clk/imx/clk.h index 50e407cf48d9..38e4a4cf253d 100644 --- a/drivers/clk/imx/clk.h +++ b/drivers/clk/imx/clk.h @@ -69,6 +69,18 @@ struct imx_pll14xx_clk { int flags; }; =20 +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 { + unsigned int mod_freq; + unsigned int mod_rate; + enum imx_pll14xx_ssc_mod_type mod_type; +}; + extern struct imx_pll14xx_clk imx_1416x_pll; extern struct imx_pll14xx_clk imx_1443x_pll; extern struct imx_pll14xx_clk imx_1443x_dram_pll; @@ -489,4 +501,8 @@ struct clk_hw *imx_clk_gpr_mux(const char *name, const = char *compatible, =20 struct clk_hw *imx_anatop_get_clk_hw(struct device_node *np, int id); =20 +void imx_clk_pll14xx_enable_ssc(struct clk_hw *hw, struct imx_pll14xx_ssc = *conf); +int imx_clk_pll14xx_ssc_parse_dt(struct device_node *np, const char *pll_n= ame, + struct imx_pll14xx_ssc *conf); + #endif --=20 2.43.0 From nobody Thu Dec 18 08:14:23 2025 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 4EE011A00FE for ; Sun, 29 Dec 2024 14:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483866; cv=none; b=ckaZOQXhQfr+KsAadRILre+zgql7r5/QQrihdTPFuvRzu2+oZ5ScISCtd6utXYoHRXrSoGg13uTbw4kj2/Leuw8Kx0yvRrWbk2xEdRumv0BTQlsBx6cVoAXOMuX36ZJrEeAiz+3W0VfPM+GnWW7q3uNRHGcJX2O3m4kEl8ZcThE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735483866; c=relaxed/simple; bh=wAM96yqCW+lsz81e2QPgNILmLnuIJ654UrL1361ydeg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Erf+fi3s26M5d3GK1yaJyHMtOxLxTiYvCgVuMOh4Sb9x1SZowRAD9y7cURq3dhn5gA372q2vWE/SLR92MdhQbAy1kFV5VY6KdZa16L+63r7O4KPdIL4+bVtYJ6Ogc1m5FfK6Hznyk8//gjMfAJjAoJAVOVeXuIHloAncrfmHPv4= 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=AnviPi7l; arc=none smtp.client-ip=209.85.218.48 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="AnviPi7l" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-aa66e4d1d5aso1363805166b.2 for ; Sun, 29 Dec 2024 06:51:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1735483863; x=1736088663; 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=6wKU7hDbBAEhh5ugFEv8c2E//GwNCMwODyh4qXAxbC4=; b=AnviPi7lqL01/1x45KkXpYscaqjga4hdoUfhMvrDRz5dcKADU7+ZXkwZYAKnL89ffs /esfPcKq4m7fiMXC3Cnw8piXh+28YAdfpKMrYi6ZoTdeA6Vf1yah2z3igJuo6fKGQyVM MhBa6UAM8V9cO0nBisVfd1wOzbjMmPEDntWxE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735483863; x=1736088663; 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=6wKU7hDbBAEhh5ugFEv8c2E//GwNCMwODyh4qXAxbC4=; b=cHFrIlU348UwOgZ833dxg2VlFnIp0REqgQi6x0iSo+O5pO6Nzy8H5eW2K/H9+/4WO7 Ff6oGKlG87+/1HZucdE5J3x0TBX5VgZnfM8LNgExZL0/YgD8cVE3fx7IDWku2sBUxDkd nlCWBb8gMicGy+ixCtpNazQSIb5sX5j7C3NGPIR/84mwyZZHIyl1oVVufT6+Re8dfHDV Yqjw/zsF7bHhSK0HrVPa/W8VnomCzBBIOZvQlqt7N5Jl9aC7laVcOtm4BFh9+UxbDSag 3peJYnDqSlzUHTvRdkfR2Nscbdn2N/W+PNy9PpUKoJoV9V6TuXI3A4XFwdhP6zuFQlUR G1VQ== X-Gm-Message-State: AOJu0YyuG436kDnzW3+ZhWW9qCXkVqw+CPBh0Jqa0AH1yE84eDVEU0CL Wpu6zNXW5W5msCgOOcp9uu57fJVK8pXfAa+fdbeTQ5fsHFLOFr34ov3Gj/df3p9SgZ7umy/8rNU 5 X-Gm-Gg: ASbGncvIEkxzHVtVehp7+PD6DRbxpG2R0DdmDYXNQ3TrCrXZBIL9TKf+5S7E54UnAHj i4T0V6d97d0GjnmaW/IHtk6f/kZ6wKIwSeDaXM6kpmnl/Q02xFSEJI/3hCSXmYSOTnJTIOSvSu+ CKhUEllZvEpWX3+1O2Sc85yu38E/0c4ZUgJ4ahCHK9aXdVwd+HmPLDa+sNXkiTTKBKfYVhVyvU8 0tWefujX5DqAmbzPD526gvPbE2TspieWosLsXCMVpyWc0kDf5iP9MlIhz0sc1D+QarBwUZ/+YLJ pPWy9Ml0Y/5gXVO07rP+HA== X-Google-Smtp-Source: AGHT+IGuXfjaRQPAunk4u+eEYZZYA62lhB0xm8g69aCXAJE2Mnda7O4OIdrZd531BTzMeroRuU5qFw== X-Received: by 2002:a17:907:2d2c:b0:aa6:8b38:52a3 with SMTP id a640c23a62f3a-aac33787557mr2382898066b.50.1735483861073; Sun, 29 Dec 2024 06:51:01 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.43.175]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aac0e895080sm1362084466b.47.2024.12.29.06.50.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Dec 2024 06:51:00 -0800 (PST) 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 v8 18/18] clk: imx8mn: support spread spectrum clock generation Date: Sun, 29 Dec 2024 15:49:42 +0100 Message-ID: <20241229145027.3984542-19-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241229145027.3984542-1-dario.binacchi@amarulasolutions.com> References: <20241229145027.3984542-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: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for spread spectrum clock generation for the audio, video, and DRAM PLLs. Signed-off-by: Dario Binacchi Reviewed-by: Peng Fan --- Changes in v8: - Drop the patches added in version 7: - 10/23 dt-bindings: clock: imx8m-clock: add phandle to the anatop - 11/23 arm64: dts: imx8mm: add phandle to anatop within CCM - 12/23 arm64: dts: imx8mn: add phandle to anatop within CCM - 13/23 arm64: dts: imx8mp: add phandle to anatop within CCM - 14/23 arm64: dts: imx8mq: add phandle to anatop within CCM Changes in v7: - Add and manage fsl,anatop property as phandle to the anatop node with the new patches: - 10/23 dt-bindings: clock: imx8m-clock: add phandle to the anatop - 11/23 arm64: dts: imx8mm: add phandle to anatop within CCM - 12/23 arm64: dts: imx8mn: add phandle to anatop within CCM - 13/23 arm64: dts: imx8mp: add phandle to anatop within CCM - 14/23 arm64: dts: imx8mq: add phandle to anatop within CCM Changes in v6: - Merge patches: 10/20 dt-bindings: clock: imx8mm: add binding definitions for anatop 11/20 dt-bindings: clock: imx8mn: add binding definitions for anatop 12/20 dt-bindings: clock: imx8mp: add binding definitions for anatop to 05/20 dt-bindings: clock: imx8m-anatop: define clocks/clock-names now renamed 05/18 dt-bindings: clock: imx8m-anatop: add oscillators and PLLs - Split the patch 15/20 dt-bindings-clock-imx8m-clock-support-spread-spectru.patch into 12/18 dt-bindings: clock: imx8m-clock: add PLLs 16/18 dt-bindings: clock: imx8m-clock: support spread spectrum clocking Changes in v5: - Fix compilation errors. - Separate driver code from dt-bindings Changes in v4: - Add dt-bindings for anatop - Add anatop driver - Drop fsl,ssc-clocks from spread spectrum dt-bindings Changes in v3: - Patches 1/8 has been added in version 3. 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. - Patches {3,5}/8 have been added in version 3. - Patches {4,6,8}/8 use ccm device node instead of the anatop one. 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. drivers/clk/imx/clk-imx8mn.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/clk/imx/clk-imx8mn.c b/drivers/clk/imx/clk-imx8mn.c index c3a3d063d58e..090b5924fa01 100644 --- a/drivers/clk/imx/clk-imx8mn.c +++ b/drivers/clk/imx/clk-imx8mn.c @@ -306,6 +306,7 @@ static int imx8mn_clocks_probe(struct platform_device *= pdev) struct device *dev =3D &pdev->dev; struct device_node *np =3D dev->of_node, *anp; void __iomem *base; + struct imx_pll14xx_ssc ssc_conf; int ret; =20 base =3D devm_platform_ioremap_resource(pdev, 0); @@ -344,9 +345,21 @@ static int imx8mn_clocks_probe(struct platform_device = *pdev) hws[IMX8MN_SYS_PLL3_REF_SEL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP= _SYS_PLL3_REF_SEL); =20 hws[IMX8MN_AUDIO_PLL1] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_AUDIO= _PLL1); + if (!imx_clk_pll14xx_ssc_parse_dt(np, "audio_pll1", &ssc_conf)) + imx_clk_pll14xx_enable_ssc(hws[IMX8MN_AUDIO_PLL1], &ssc_conf); + hws[IMX8MN_AUDIO_PLL2] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_AUDIO= _PLL2); + if (!imx_clk_pll14xx_ssc_parse_dt(np, "audio_pll2", &ssc_conf)) + imx_clk_pll14xx_enable_ssc(hws[IMX8MN_AUDIO_PLL2], &ssc_conf); + hws[IMX8MN_VIDEO_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_VIDEO_= PLL); + if (!imx_clk_pll14xx_ssc_parse_dt(np, "video_pll", &ssc_conf)) + imx_clk_pll14xx_enable_ssc(hws[IMX8MN_VIDEO_PLL], &ssc_conf); + hws[IMX8MN_DRAM_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_DRAM_PL= L); + if (!imx_clk_pll14xx_ssc_parse_dt(np, "dram_pll", &ssc_conf)) + imx_clk_pll14xx_enable_ssc(hws[IMX8MN_DRAM_PLL], &ssc_conf); + hws[IMX8MN_GPU_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_GPU_PLL); hws[IMX8MN_M7_ALT_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_M7_AL= T_PLL); hws[IMX8MN_ARM_PLL] =3D imx_anatop_get_clk_hw(anp, IMX8MN_ANATOP_ARM_PLL); --=20 2.43.0