Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1819962rdb; Thu, 7 Dec 2023 09:31:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9uhV3Zf6H0JTFbfy8scEiVXrQCUQllWHbGzh9wH/Rw8hcrtGMyg44px9BImUZgB51Q4aE X-Received: by 2002:a17:90a:ce02:b0:286:e264:999b with SMTP id f2-20020a17090ace0200b00286e264999bmr2473642pju.59.1701970313735; Thu, 07 Dec 2023 09:31:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701970313; cv=none; d=google.com; s=arc-20160816; b=RzPOon0xay/sSQA556xjlQuPAhZ93ta1UclZx1tAOsKxGVDU/058rJT8lM/m92E7or mcyZ/IqG6shV0epZIFiXNPeE0A9/lyMkRwh2F0ZLG9keOrdT8cqDzU95lesKQjuyB6WM iPQJ+gHjguOoUTysQYJZFNgarsyoCxXNT5/Jxg2x8HstLioh0z7JIR6cY5j/qdEwQuV2 fR8sJoP3C2nRsD8d8VLk9pfYZ4+jlT1eAGcAZarmSYxXL+1Q1DBWW8Hl6zLB+dMI9xrs jOr3+XlxQ+572eO2mV4FXwWEo2IjgiI3TJ1vKvzn54nbrfbHSaLv5m0PFa2BumZ+SKT7 3btQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZQa8BQTggtlpw4goT4qO87zJPj1Cy7x4UJVjY45wz7I=; fh=aHzrb2Df+lESKlw2NMKJ5lSFoSlBsmqpbFtPKpm9Zqg=; b=ga8Xv49nE5roU5khcX+9pZk2iBtVni5XkVBxFmzRVSlbbzKxVL60rgEf9Z2Q4uqG5T SFMX1z9YD7tFYlsQ64BXl5ZzB5s6SyYdG62BZBZ5iPUCzhgHR47cnO+9c3syVkJjNTrl aY6LaE3nuNVc5cQk/jQo94vrYy7fk0NFpPqvgCxuh+70e581CABu9tM7CpGXKlt6hp/K mow/lAQycO/LDXnnAOf7eSaCwoSg0a9tU6Z3XJAMFS6SKGpwBRknco7yZcbyTNrzI2m1 YU5uj1u1ZGWMivmsF19LoNIUhF1NnAIeqPA4Zgu8ESqjZwutcQRten6AuGbsm+wwPX/B fDRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h7ia9+f7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id gf21-20020a17090ac7d500b00286bb6f1ab9si1428172pjb.116.2023.12.07.09.31.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 09:31:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=h7ia9+f7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id D6BAC80C8DD5; Thu, 7 Dec 2023 09:31:50 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235228AbjLGRbe (ORCPT + 99 others); Thu, 7 Dec 2023 12:31:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231827AbjLGRbd (ORCPT ); Thu, 7 Dec 2023 12:31:33 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E7F910CA for ; Thu, 7 Dec 2023 09:31:40 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CA79C433C8; Thu, 7 Dec 2023 17:31:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701970299; bh=y5KQaG6xsO92nyU8jMBjwng72ljhMerO17hvLBT/01s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=h7ia9+f7X6k9/jV0mXmpBMYhlZE37AFCCRWGXDRntRLrVF+xVRoIuRw7reZjML+2w twc0HzmZg+PNMQTU8QG893Z0VAq/ltDXDMYDwkRcqBvSZhuS5g7ePrOMuijKvrBkIJ drbrnpbsWsIBYrt2VhHIo/Wpp3b/U4gprRE4EL0jzyW662+Rb4k+Gxdw26IogPqhSB OkJN0K4b1FQjFITQCU+5CsxCWT00mHkDGPgC+LWYJ16k2H0ZFHDmT6B6vwdhMDKHC2 0E5E4wQxu3LzxP2MVLB4uWuUyGfmPRArMIB5TYoQFkujhqEO9Y4uC55W4A/xVpBRsy VprPzntPwnHMw== Date: Thu, 7 Dec 2023 17:31:33 +0000 From: Conor Dooley To: Krzysztof Kozlowski Cc: Inochi Amaoto , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chao Wei , Chen Wang , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jisheng Zhang , Liu Gui , Emil Renner Berthing , qiujingbao.dlmu@gmail.com, dlan@gentoo.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v3 3/4] riscv: dts: sophgo: add clock generator for Sophgo CV1800 series SoC Message-ID: <20231207-doze-spinster-0bfad3b1441a@spud> References: <375bb6e4-18dc-4f54-9a06-6f9f2ba0a0ec@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lhuauHl59hGZdGju" Content-Disposition: inline In-Reply-To: <375bb6e4-18dc-4f54-9a06-6f9f2ba0a0ec@linaro.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 07 Dec 2023 09:31:51 -0800 (PST) --lhuauHl59hGZdGju Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 07, 2023 at 01:52:16PM +0100, Krzysztof Kozlowski wrote: > On 07/12/2023 10:42, Inochi Amaoto wrote: > >>> +&clk { > >>> + compatible =3D "sophgo,cv1810-clk"; > >>> +}; > >>> diff --git a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi b/arch/riscv/boot= /dts/sophgo/cv18xx.dtsi > >>> index 2d6f4a4b1e58..6ea1b2784db9 100644 > >>> --- a/arch/riscv/boot/dts/sophgo/cv18xx.dtsi > >>> +++ b/arch/riscv/boot/dts/sophgo/cv18xx.dtsi > >>> @@ -53,6 +53,12 @@ soc { > >>> dma-noncoherent; > >>> ranges; > >>> > >>> + clk: clock-controller@3002000 { > >>> + reg =3D <0x03002000 0x1000>; > >>> + clocks =3D <&osc>; > >>> + #clock-cells =3D <1>; > >> > >> I don't find such layout readable and maintainable. I did some parts > >> like this long, long time ago for one of my SoCs (Exynos54xx), but I > >> find it over time unmaintainable approach. I strongly suggest to have > >> compatible and other properties in one place, so cv1800 and cv1812, ev= en > >> if it duplicates the code. > >> > >=20 > > Hi Krzysztof: > >=20 > > Thanks for your advice, but I have a question about this: when I should > > use the DT override? The memory mapping of the CV1800 and CV1810 are > > almost the same (the CV1810 have more peripheral and the future SG200X > > have the same layout). IIRC, this is why conor suggested using DT overr= ide > > to make modification easier. But duplicating node seems to break thiS, = so > > I's pretty confused. >=20 > Go with whatever your subarchitecture and architecture maintainers > prefer, I just shared my opinion that I find such code difficult to read > and maintain. >=20 > Extending node with supplies, pinctrl or even clocks would be readable. > But the compatible: no. The same applies when you need to delete > property or subnode: not readable/maintainable IMHO. There are apparently 3 or 4 of these SoCs that are basically identical, which is why the approach was taken. I do agree that it looks somewhat messy because I was looking for device-specific compatibles for these SoCs. --lhuauHl59hGZdGju Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZXIBdQAKCRB4tDGHoIJi 0gvbAP0aZRnwZeW/uj2D5AKml7K6VntejuP/ZKF3cb023p/PeQD+K7QPGKIR7elG P9fe8O+9MjABjpbXTovEnCRCL6XdLwM= =5VP/ -----END PGP SIGNATURE----- --lhuauHl59hGZdGju--