Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp312828rdd; Tue, 9 Jan 2024 05:09:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFemV9TKhezSXvo0eZWpZcn6UPlDsJmIra25lzy+QZtQg4xT7PdyIeE0l+sUWqw79vZuoqr X-Received: by 2002:a17:902:704a:b0:1d5:7cb:7761 with SMTP id h10-20020a170902704a00b001d507cb7761mr2252422plt.51.1704805780436; Tue, 09 Jan 2024 05:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704805780; cv=none; d=google.com; s=arc-20160816; b=dhN3irWhEwLehEckxwy1EPjq9ZEYC+3rilQucTlQi8q7C1QiDcLxWzt2cMi0uhcqZA HLGroqjwS00eXc0sgk9Cz4s+bbbzOKrzWEpU5kB3emdlrQP4Q6SrSi75OAL26mGw/rKu ENoLtPw56Px7bFjifan97/ZP+5bCtjkjfnsxTNcjAwFHohubMhDMO/Bv6bYD0LyH+SNa YK3Q4DiV7qEw9nEo+jcwZtjxLrgM70DmDBO3Z/5WYcsP90bIvGYuzb8K+nvfed9gkAUb GLbQDuMUV0QWQr+aYjzpxiDVdKHmbNqSx6RWu0Imd6GUFnoIBFxrNq+miaCLea7wDa+x fV5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vxQTF6YqSuO1/KEoCC1oc3FiGKXIy05xOOnArz8/SEE=; fh=pMtOAjVju9qKxs1Aw97Xws+3Q51Yq5SA+gSc7kagSgo=; b=fcR8Cs5C4skb565MiX3reNjw1c8cmwuH5qvyCbjFIGuqbLxJZFAerVfvL6pHD+H+Y3 nTc1nxuNoc+XaNrrV+trW/ogDy58aML+tCTEnQZZCAP3wiNNU0T+2tGV7YxcglXoBgTt gk/rNzcNoGuUTZPkxhUCAxH+BvtS+1wsrb+9IjUQHuwf4O+mXROTKyPEJ5SM/ZqXaw87 HuCkg7mGHFoevmw5RNzB+nNhI6RSO6kevkgxzeyUVt5pRI4lYjJAV03hlgENgujb9m6b asyQwHSonnpiws91/9USmPJMJvMk0ai/SbD671Fu9NfndNfHL64IjyIBn0Pq51vXC/J4 AgAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=HBc4tMSu; spf=pass (google.com: domain of linux-kernel+bounces-20877-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20877-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id z10-20020a170903018a00b001d4891f73f0si1479368plg.549.2024.01.09.05.09.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:09:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20877-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=HBc4tMSu; spf=pass (google.com: domain of linux-kernel+bounces-20877-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20877-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E664AB23459 for ; Tue, 9 Jan 2024 13:06:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43B7238F83; Tue, 9 Jan 2024 13:06:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="HBc4tMSu" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 5EE7C374C5; Tue, 9 Jan 2024 13:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1704805562; x=1736341562; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=xpBv9CLJKeH2ktyG75BQLyQVSsvCPHK4QXybdij5Pio=; b=HBc4tMSuWs+KnUApm6tWhVDNwbCTmXvmvbrrGwW4zDnJ8WtpID2hFhdy iZ0kBe4eJvO0ZK5ruYWj31LZjybFljxUzW54YYbMEpH1zc2xChX8CCA4K 83qV+T96KPD7Bhexubpv230enFwS8BFyVGanUQjK82lrH0G3Drb9Ss9ly KQDmQTBlcnZUvG54TZOTOVzjtbpn97Wf09GCKhvgGcVUbXKLXb4HlTmIt szK42eetPNE3JhIasQ1zIC/MQ/bjjQXjyv7yd44PEsovv23QMYBLsAxb0 dA2JlbSUEmK4whZ7GQLULHj3elLA9+snB6qJNad5q4olEG7r/01qE/pbW A==; X-CSE-ConnectionGUID: z9oYC0TYRhSMRpXWHeg5bw== X-CSE-MsgGUID: iYtnSFXNRk2uY32sOXE+VQ== X-ThreatScanner-Verdict: Negative X-IronPort-AV: E=Sophos;i="6.04,182,1695711600"; d="asc'?scan'208";a="14904599" X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 09 Jan 2024 06:06:01 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 9 Jan 2024 06:05:29 -0700 Received: from wendy (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Tue, 9 Jan 2024 06:05:27 -0700 Date: Tue, 9 Jan 2024 13:04:52 +0000 From: Conor Dooley To: Emil Renner Berthing CC: Conor Dooley , , , , , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jisheng Zhang , Guo Ren , Fu Wei , Paul Walmsley , Palmer Dabbelt , Drew Fustini Subject: Re: [PATCH v2 3/8] riscv: dts: thead: Add TH1520 pin control nodes Message-ID: <20240109-tiptoeing-twirl-ebb943e17a29@wendy> References: <20240103132852.298964-1-emil.renner.berthing@canonical.com> <20240103132852.298964-4-emil.renner.berthing@canonical.com> <20240108-majorette-overtly-4ec65d0a15e9@spud> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="XthaSr7XjsnpG3pO" Content-Disposition: inline In-Reply-To: --XthaSr7XjsnpG3pO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 09, 2024 at 04:02:01AM -0800, Emil Renner Berthing wrote: > Conor Dooley wrote: > > On Wed, Jan 03, 2024 at 02:28:40PM +0100, Emil Renner Berthing wrote: > > > Add nodes for pin controllers on the T-Head TH1520 RISC-V SoC. > > > > > > Signed-off-by: Emil Renner Berthing > > > --- > > > .../boot/dts/thead/th1520-beaglev-ahead.dts | 4 ++++ > > > .../dts/thead/th1520-lichee-module-4a.dtsi | 4 ++++ > > > arch/riscv/boot/dts/thead/th1520.dtsi | 24 +++++++++++++++++= ++ > > > 3 files changed, 32 insertions(+) > > > > > > diff --git a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts b/arc= h/riscv/boot/dts/thead/th1520-beaglev-ahead.dts > > > index 70e8042c8304..6c56318a8705 100644 > > > --- a/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts > > > +++ b/arch/riscv/boot/dts/thead/th1520-beaglev-ahead.dts > > > @@ -44,6 +44,10 @@ &osc_32k { > > > clock-frequency =3D <32768>; > > > }; > > > > > > +&aonsys_clk { > > > + clock-frequency =3D <73728000>; > > > +}; > > > + > > > &apb_clk { > > > clock-frequency =3D <62500000>; > > > }; > > > diff --git a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi b= /arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi > > > index a802ab110429..9865925be372 100644 > > > --- a/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi > > > +++ b/arch/riscv/boot/dts/thead/th1520-lichee-module-4a.dtsi > > > @@ -25,6 +25,10 @@ &osc_32k { > > > clock-frequency =3D <32768>; > > > }; > > > > > > +&aonsys_clk { > > > + clock-frequency =3D <73728000>; > > > +}; > > > + > > > &apb_clk { > > > clock-frequency =3D <62500000>; > > > }; > > > diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/= dts/thead/th1520.dtsi > > > index ba4d2c673ac8..e65a306ff575 100644 > > > --- a/arch/riscv/boot/dts/thead/th1520.dtsi > > > +++ b/arch/riscv/boot/dts/thead/th1520.dtsi > > > @@ -134,6 +134,12 @@ osc_32k: 32k-oscillator { > > > #clock-cells =3D <0>; > > > }; > > > > > > + aonsys_clk: aonsys-clk { > > > + compatible =3D "fixed-clock"; > > > + clock-output-names =3D "aonsys_clk"; > > > + #clock-cells =3D <0>; > > > + }; > > > > Did this stuff sneak into this commit accidentally? >=20 > Not really by accident no. It turns out the clock tree has gates for the = bus > clock of each pinctrl block and I think it's better to add this clock > dependency to the bindings and driver up front. Maybe if I had looked a wee bit more deeply I would've noticed that it was used there, but it's always good to mention the rationale in the commit message so that it's more obvious why you're doin it. > Since there is not yet any clock driver the initial device tree for the T= H1520 > included the dummy apb_clk that two of the pinctrl blocks derive their cl= ock > from, but not the "aonsys" clock needed by the "always-on" pinctrl. I tho= ught > it was better to add this dummy clock with the only (so far) user of it, = but if > you have a better idea, let me know. No, that's fine. I was just wondering why there was an unmentioned set of clocks being added. If they're stubbed fixed clocks I dunno if it makes sense to add them to the board.dts/module.dtsi files though. Where do the initial values come from for the rates? Out of reset values or set by firmware that may vary from board to board? Cheers, Conor. --XthaSr7XjsnpG3pO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZZ1EdAAKCRB4tDGHoIJi 0ttJAPsEUXEE+T2o1HyH4EYifCCIDWdJZg4jidJGk2a0Yy+zNQD/UmU1FXzzcPlx B6tqiO1KUss7XC5DTIAZ9oVaxy5K9gU= =cRuY -----END PGP SIGNATURE----- --XthaSr7XjsnpG3pO--