Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp508287rdb; Thu, 21 Dec 2023 16:49:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IG70RlAYwyX6rHIx4fPWXpE1ZqWONMb7gFeZOFfiz2IOOjd2kpnS3sEnt9n89t6TfWjcu0+ X-Received: by 2002:ae9:e645:0:b0:781:2b3e:8b23 with SMTP id x5-20020ae9e645000000b007812b3e8b23mr601278qkl.5.1703206149874; Thu, 21 Dec 2023 16:49:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703206149; cv=none; d=google.com; s=arc-20160816; b=QqC8dG4vocdl+gsPybCsjJI1lC2QLES9/johiVpkf4xlnvdCdJgeK03hL8URdKfLrR Vi9BJXogC9syoMWePMetoPRBRECWuT0igbLsYrZF0+m1VJmPLnQME5KpvrJj4Kc4z78j WKUIP8G85isYzUPrbteqCzdEInxsvODyCIwOGUxc1dQdvanul7mklahOvCAiUveBW9Ju el11iQbgzMFHJo7/xcIeoTvZ7nWLKiJNzBaGB71U7EnMek7B4b2Q5ANp7eYj2XYJdzDy v0vIPbw0KgQz2rgBKwMK9LenJr1zpUSWGsbiwVI9wGznd4fTuWLi39V2A8a/L6lPRYIk vaxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=AKp4LbbkzI8lAg8ferUfQcF86nR3AYpirfOlh0UvzcU=; fh=YNLiuD++IHzLxmj7J/dKG07sRfES/AaSExz6HAvhurU=; b=pyS8846OtY7L2Q7yYGRAOiEsqpaj0IZ20AI5xlJt7Ij01puK9OsDqiRcpdRy3eyXPa WN9xLShtdXLUs9tBbkOVIgNDEUGLo641GtH9St1Dra+DCjZTNQDkZYV0X1vU0s7UdBsX 3aeRFz/SR3IP8nepl3C++FT9+XzTqbV2zLHxkplGY9gIUD0M6w4C49ehhLD1j1++5oKe vzMFdRvu719T8dGrBvYDo/rMlUMWYpwoVJd0t40994kLXOkc09gL0k/ETqQ5tq0Rv/ly G5mFr9uPVMuqK1eQcP+M+8rwjmxxTOrXXexPVBjdJNKpuFRDf05zmYik/ogHSZ9iTOn6 3GfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gxBcCIzz; spf=pass (google.com: domain of linux-kernel+bounces-9218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t13-20020a05620a450d00b00781102e74absi3508586qkp.3.2023.12.21.16.49.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 16:49:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gxBcCIzz; spf=pass (google.com: domain of linux-kernel+bounces-9218-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9218-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9ECFA1C237CD for ; Fri, 22 Dec 2023 00:49:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38709A5D; Fri, 22 Dec 2023 00:49:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gxBcCIzz" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6047D818; Fri, 22 Dec 2023 00:49:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8C3EC433C8; Fri, 22 Dec 2023 00:49:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703206141; bh=1DA8bmTOYGPA5GbuB9k2g469eTAv0F3olwtXeYlHwR0=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=gxBcCIzz0cbD3ugkonPp9VYh2HSxnLxa44GHnYR4IW6PW3J4Rgn6Pi+WryMmWt1u+ 5wnyPnVzVHb6DgT2GO27/QCOg4t+BvjuTcwizCAit096W6X13xq+4fB/fkm9xMJ+mV XzzXiN6P8tqW/3UKazKRBC1dyh6uQYainN29c7Cz5EVUloedh5VnVDqEwg5ox/ZTPE WAnKi/wnq12bdu9JOoLCsG2Hs1BtJrFNhXZ6TLM0u4y2mx2j+ug/sbSq8E3XmcfDh4 /mURGarpcdtNGvskvrtl4VatuZlGrDntmlitK3JCfTA5uqUMlr1JBBqsp/hc9VSEVz hmabHJBfCHumw== Message-ID: Content-Type: text/plain; charset="utf-8" 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 In-Reply-To: <21f758cb-ae25-4d74-905c-0d4820f00070@foss.st.com> References: <20231219130909.265091-1-gabriel.fernandez@foss.st.com> <20231219130909.265091-2-gabriel.fernandez@foss.st.com> <21f758cb-ae25-4d74-905c-0d4820f00070@foss.st.com> Subject: Re: [PATCH v7 1/2] clk: stm32: introduce clocks for STM32MP257 platform From: Stephen Boyd Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org To: Alexandre Torgue , Conor Dooley , Gabriel FERNANDEZ , Krzysztof Kozlowski , Maxime Coquelin , Michael Turquette , Philipp Zabel , Rob Herring Date: Thu, 21 Dec 2023 16:48:59 -0800 User-Agent: alot/0.10 Quoting Gabriel FERNANDEZ (2023-12-21 02:31:53) >=20 > On 12/20/23 23:16, Stephen Boyd wrote: > > Quoting gabriel.fernandez@foss.st.com (2023-12-19 05:09:08) > >> diff --git a/drivers/clk/stm32/clk-stm32mp25.c b/drivers/clk/stm32/clk= -stm32mp25.c > >> new file mode 100644 > >> index 000000000000..313e022c6142 > >> --- /dev/null > >> +++ b/drivers/clk/stm32/clk-stm32mp25.c > >> @@ -0,0 +1,1826 @@ > >> +// SPDX-License-Identifier: GPL-2.0-only > >> +/* > >> + * Copyright (C) STMicroelectronics 2023 - All Rights Reserved > >> + * Author: Gabriel Fernandez for STMi= croelectronics. > >> + */ > >> + > >> +#include > >> +#include > >> +#include > >> + > >> +#include "clk-stm32-core.h" > >> +#include "reset-stm32.h" > >> +#include "stm32mp25_rcc.h" > >> + > >> +#include > >> +#include > >> + > >> +static const struct clk_parent_data adc12_src[] =3D { > >> + { .name =3D "ck_flexgen_46" }, > > This is a new driver. Don't use .name here. Instead use .index or .hw > > and if that can't work then use .fw_name. >=20 > These parent clocks are managed by a secure world and exposed through SCM= I. >=20 > If I use .index or .fw_name, do I have to expose 122 clocks in my DT node= ? >=20 > This will significantly increase the size of the DT file >=20 > =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 clock-names =3D= "hse", "hsi", ..., "ck_scmi_stm500"; > =C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 clocks =3D <&sc= mi_clk CK_SCMI_HSE>, <&scmi_clk CK_SCMI_HSI>,=C2=A0=20 > ... , =C2=A0 <&scmi_clk CK_SCMI_STM500>; >=20 Yes? We want DT to express the connections between device nodes, and if the clks managed by SCMI are consumed here then they need to be specified via the clocks property. >=20 > > > >> + { } > >> +}; > >> +MODULE_DEVICE_TABLE(of, stm32mp25_match_data); > >> + > >> +static int get_clock_deps(struct device *dev) > > What is the explanation for this function? >=20 > It 's to manage the dependency with the SCMI clock driver. Please elaborate. Are you making sure the SCMI clk driver has probed before this driver? Why? What's wrong with probing this driver first?