Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2203309rdb; Thu, 21 Sep 2023 11:20:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfSFzGGVKgw/iLOPMc9SPyGfVaogOxljPeLrlDKV/4Gh1OWCwHVLZ+97wx97NqzDLcTgCz X-Received: by 2002:a17:902:728a:b0:1b8:7fd7:e022 with SMTP id d10-20020a170902728a00b001b87fd7e022mr4999907pll.28.1695320442808; Thu, 21 Sep 2023 11:20:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695320442; cv=none; d=google.com; s=arc-20160816; b=CLOna9YcQAVJz1Xaia9RVvZ87zHuni4M+e4tR7AaKoCRyi3bQMUYbG7NF+paV/WXUL FDuuYs+Spx3l2M9T6l/iNR0nD9EX30XMR7jrSfWYvvvw6PzXoAxY2OM4WkYoFjLBArlQ fdwhATgl5RziNmStCROl70FTuoC0nPoFONqnDYoc9SM5L0Zrv+91Yh7CSl10A3zy+OQp TNGYZHd1p71aZO9c21Cz1AyXiWwBDyrWi20BcGIpC1Mmg3AOMsswHQ+TNLI8HauVbVl9 GSy5Ad9+pq9aqs5DN3ANssarxe6Kxaymv2ps7ZnpjMRFMsgt+1KPkVPYDhSJ1oTi9VwX MLCw== 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=GqvMT6wImDJtsXoytzzrQuau/hlzcoYLUudG1FJirCQ=; fh=8is5k64RVmUpbI6rCMDWNb/XixDfrt0O/Am6aBwVSPc=; b=UexG7EDubqFKcln0+ESvu7ETWFRvspkoDsTMKgCXvVTL0jqNkS+HvTVafpi9aMV5wv n9Vb059BKmLmM2SAewP1CF7hYeHPC29/TFZHmd13/iRYHplZfvNil7xCoELPdVDKejtw R+xEqYLq7Cz5ri7AXPEefvjLthsaAB1JbJy1mdQYXn396d2RzlZI3J61R1CafG3L9yTS p97ktYNtEQQXEtRWfS0pndID/vI2MdU0xDJmURpk1fLnMSmxJhL/9R9xSrzscb59q0Nt ndTwW66RDnUJLqT825Ad0AUC7zmZZJS5tCb4+Jo1nWxsINSIY8y1MvdcJ7vY+C5FzkMY /ODA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pY3IDSRX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id jz13-20020a170903430d00b001bbae3ae2bcsi1798283plb.413.2023.09.21.11.20.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 11:20:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pY3IDSRX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 39A87821A142; Thu, 21 Sep 2023 11:10:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbjIUSKo (ORCPT + 99 others); Thu, 21 Sep 2023 14:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbjIUSKj (ORCPT ); Thu, 21 Sep 2023 14:10:39 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 045F185D17 for ; Thu, 21 Sep 2023 10:37:48 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 484CEC4DE17; Thu, 21 Sep 2023 12:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695297986; bh=ZKBejLxpxLiP18j3xN/sgh8MY7/Ts1j/7fzM5Nb1mY0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pY3IDSRXGoG3UnWuDSwjo5IIoIuQv3Dp8HhxtdSqoNg06dpPB6csEpUbUaTr4W5Xn iUHEvjjr35PPoC4yqvuWT1HzE7GBE0v70iDXacaXv0mO5fJPw6eNNSsanqKuoCTQuR 9cN18zojqgdLlsFFejBcMGSEdjM7+vfmzPkQ3pIskBVlIS8K+/PoIRpSAYA/d92Wvs u2ITLuagYQWGH93mfQ118NaARWZRfPRbxxaPvUdJaQB6l392Az9TUNpG6RDeGiyF54 MOJc+igrStR2WnEyB9BnAHsSw9oicyCcXIVGl+oJlrItLAmpMQ+W2XKvUpiD1aqFu1 TAsZe7IIZbguw== Date: Thu, 21 Sep 2023 13:06:20 +0100 From: Conor Dooley To: Chen Wang Cc: Conor Dooley , aou@eecs.berkeley.edu, chao.wei@sophgo.com, devicetree@vger.kernel.org, emil.renner.berthing@canonical.com, guoren@kernel.org, jszhang@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, palmer@dabbelt.com, paul.walmsley@sifive.com, robh+dt@kernel.org, xiaoguang.xing@sophgo.com, Chen Wang , Inochi Amaoto Subject: Re: [PATCH v2 09/11] riscv: dts: add initial SOPHGO SG2042 SoC device tree Message-ID: <20230921-fdc47972b1d3caa685f2a164@fedora> References: <20230920-financial-declared-7b4b4baae517@wendy> <20230921-d2db829b289c937081dc8a72@fedora> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3kYZRnlz9oHCd92h" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 21 Sep 2023 11:10:54 -0700 (PDT) --3kYZRnlz9oHCd92h Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 21, 2023 at 06:27:09PM +0800, Chen Wang wrote: > Conor Dooley =E4=BA=8E2023=E5=B9=B49=E6=9C=8821=E6=97= =A5=E5=91=A8=E5=9B=9B 18:15=E5=86=99=E9=81=93=EF=BC=9A > > > > On Thu, Sep 21, 2023 at 05:56:28PM +0800, Chen Wang wrote: > > > > > + > > > > > +/ { > > > > > + compatible =3D "sophgo,sg2042"; > > > > > + #address-cells =3D <2>; > > > > > + #size-cells =3D <2>; > > > > > + dma-noncoherent; > > > > > + > > > > > + aliases { > > > > > + serial0 =3D &uart0; > > > > > + }; > > > > > + > > > > > + /* the mem node will be updated by ZSBL. */ > > > > > > > > huh? So these are random numbers below? Either put something useful= here > > > > or delete it please. > > > > > > The memory for SG2042 is not fixed, the bootloader will detect memory > > > installed on board during booting and fill the actual address and size > > > in the memory node. The comment " /* the mem node will be updated by > > > ZSBL. */" is telling this. > > > > Yes, I read the comment! > > > > > We write memory nodes like this to make them act just as placeholders > > > and the value is by default written as zero. > > > > Why knowingly add something that is wrong, rather than omitting them > > entirely? >=20 > We learn this from arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts, > it writes DTS as following: >=20 > ``` > memory@0 { > device_type =3D "memory"; > /* rewrite this at bootloader */ > reg =3D <0x0 0x0 0x0 0x0>; > }; > ``` > So you mean we can totally remove the memory nodes in DTS and make > bootloader add it by itself? That sounds a good idea, I will have a > try. I used to think memory nodes are must-have in DTS. AFAIR, the ones for the d1 based systems (like the nezha I have) don't have a memory node at all. --3kYZRnlz9oHCd92h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZQwxuAAKCRB4tDGHoIJi 0vvKAQCrC0C9bXbaFXJHj7tbnfJboS8Mfb3B4Jj75CM/Q4JbpgD+L0gLJUvWQidi 1Jm9pI5/wQNC7eDOP6U2fe3VvEgK5Ao= =QS3Z -----END PGP SIGNATURE----- --3kYZRnlz9oHCd92h--