Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1063929pxu; Thu, 17 Dec 2020 00:57:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJxugJHMy0VaykqQtd8D61/iVK/HM6hpxgkXFfZSSE5jerkQ5LxkjdfKk9npS9Q/g6yrmrFO X-Received: by 2002:aa7:c0d6:: with SMTP id j22mr22892056edp.31.1608195476031; Thu, 17 Dec 2020 00:57:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608195476; cv=none; d=google.com; s=arc-20160816; b=RlbM7pB7ChFHIxS2idrMSt/KbzZmABS+/g6udpgvgJ0yB+GVhiung9Kx+jqcrEK6Fn LQsIti1WF3l6J/DehX8qYnyyhAeFYyoWYIM3pxwSNn1m3Tp4lzfwJ+uNKwtPqcl0iifg 7rZ6CCzTnvsGvFTSzD2FXm4BFyr4E0N4V/6G9kJJjoTwO2BOMWQfkux6AH4+oX7aCPZo eV5RLdeMs/VddL+2cWmcsj9OiRBNzI40qO2d52nCaMTF7izvSVrkNqiH5GK0b9Txxh2J g2htukg555xfK3wpAxH0DN1Iujdslylyv7GJOahVsq9FKtBGV7LXTIg+qzwHdaEF+QAa ob5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=zbCyCfWtfvtodDHI59bfZPUW8tnvvoQROimCIKbEMSc=; b=eGSl4hvH+m4ChwJiSpInMFYWM8MWq4fV05mDzSFIj+sLAHMl6NMRE80fBzkAwDjlf7 aeCuzT/EvQqA7bEhcH4e3TcvMma9MsjHb2fup+VB+pxQIx9o4Rxm3n4/nZskZYUYH9qz sQMxvylVLunuc0ivhjCp5Ry/oV4fbP1AsI+4J6CDjGJCLDhI005TPI/3kIKZp7hWarW9 ryNpx1HRRwzCU6wZ5kYu1gezIR+t4tfT9pg0OzYNnZEpCCDVvGZ7HxRgciZeNHihodj4 alzSJBWGyqTmpP2aVsLKkITsUKyydUHPwf4lt3g95WbuTvEp1H3aF7YozZHFfILWdls/ V0ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OCohtkSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si4145517edy.201.2020.12.17.00.57.33; Thu, 17 Dec 2020 00:57:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OCohtkSG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727035AbgLQIyl (ORCPT + 99 others); Thu, 17 Dec 2020 03:54:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:59754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727012AbgLQIyl (ORCPT ); Thu, 17 Dec 2020 03:54:41 -0500 Content-Type: text/plain; charset="utf-8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608195240; bh=N4iCRKQ5T+IdPgDG6/JntbvuDR/5Iy5t84sQRrpsDaM=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=OCohtkSGSmeckU3Jeo5YvNxdiDuc1KLDnm8UnKF5jSs7pnTbMH6Upz6XoiX6Y9684 bYIigips4cN0YKeQAfSMELNPVCGtG8/03MRdTQsNKh+FRuAJwxp+eVnFTRizuBLy5K /NZWtl+0hBYR7PecKHEb2Lts4lG3SOFzpa8nBLW4grG3DROVvCKfLqAfYy0i63VvdA UPxM6VzMnDX45pIZvckUyF60NluB5vHsj6dPAKXwL1Gr+TfeL3UeXnturfna1ew6bC gPtDc6XB8YL3LEdio1m7XtrALo7D3ml7TWXSDiSKwz/YkhD3Pjv8rnOpMLk1Rv0teQ oceMcokGDP+ZQ== MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20201123040237.GA3013347@chromium.org> References: <1604887429-29445-1-git-send-email-weiyi.lu@mediatek.com> <1604887429-29445-24-git-send-email-weiyi.lu@mediatek.com> <20201123040237.GA3013347@chromium.org> Subject: Re: [PATCH v5 23/24] arm64: dts: mediatek: Add mt8192 clock controllers From: Stephen Boyd Cc: Matthias Brugger , Rob Herring , Nicolas Boichat , srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Yingjoe Chen , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org To: Ikjoon Jang , Weiyi Lu Date: Thu, 17 Dec 2020 00:53:59 -0800 Message-ID: <160819523908.1580929.4609336150609889474@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Ikjoon Jang (2020-11-22 20:02:37) > On Mon, Nov 09, 2020 at 10:03:48AM +0800, Weiyi Lu wrote: > > Add clock controller nodes for SoC mt8192 > >=20 > > Signed-off-by: Weiyi Lu > > --- > > arch/arm64/boot/dts/mediatek/mt8192.dtsi | 163 +++++++++++++++++++++++= ++++++++ > > 1 file changed, 163 insertions(+) > >=20 > > diff --git a/arch/arm64/boot/dts/mediatek/mt8192.dtsi b/arch/arm64/boot= /dts/mediatek/mt8192.dtsi > > index e12e024..92dcfbd 100644 > > --- a/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > +++ b/arch/arm64/boot/dts/mediatek/mt8192.dtsi > > @@ -5,6 +5,7 @@ > > */ > > =20 > > /dts-v1/; > > +#include > > #include > > #include > > #include > > @@ -213,6 +214,24 @@ > > }; > > }; > > =20 > > + topckgen: syscon@10000000 { > > + compatible =3D "mediatek,mt8192-topckgen", "sysco= n"; > > + reg =3D <0 0x10000000 0 0x1000>; > > + #clock-cells =3D <1>; > > + }; > > + > > + infracfg: syscon@10001000 { > > + compatible =3D "mediatek,mt8192-infracfg", "sysco= n"; > > + reg =3D <0 0x10001000 0 0x1000>; > > + #clock-cells =3D <1>; > > + }; > > + > > + pericfg: syscon@10003000 { > > + compatible =3D "mediatek,mt8192-pericfg", "syscon= "; > > + reg =3D <0 0x10003000 0 0x1000>; > > + #clock-cells =3D <1>; > > + }; > > + >=20 > There are 26 new bindings for mt8192 clock providers, "mediatek,mt8192-*'. > I guess the one reason of doing this is that those mmio blocks are > just scattered all around over different memory regions. Yeah it seems that Mediatek likes to scatter the clks into basically every IP block. The alternate approach would be to create virtual platform device children of those IP blocks to register the clks. >=20 > I wonder if there could be a simpler way of merging them into one > binding of "mediatek,mt8192-clocks" and converting all new bindings > into generic syscon: >=20 > mt8192-clocks: mt8192_clocks { > compatible =3D "mediatek,mt8192-clocks"; > #clock-cells =3D <1>; >=20 > infracfg: clk_infracfg { > syscon =3D <&syscon_infracfg>; > }; > pericfg: clk_pericfg { > syscon =3D <&syscon_pericfg>: > }; > }; >=20 > syscon_pericfg: syscon@10003000 { > compatible =3D "syscon"; > reg =3D <0 0x10003000 0 0x1000>; > }; Is the syscon used for anything besides a clk provider? Having a mt8192_clocks node is wrong. The syscon is the clk provider and it should have a #clock-cells property. Making up a node that doesn't have a reg property is usually a sign that something is wrong.