Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2339605rdb; Thu, 21 Sep 2023 16:07:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4Q7dQs7Z4sB1lEpVxtkdnJljE3mjZ6GaMbl13iwiYYvqKUd2nGKf9NMPQnkDdV0q0u8CE X-Received: by 2002:a17:90a:430f:b0:276:66e8:f7fd with SMTP id q15-20020a17090a430f00b0027666e8f7fdmr1409708pjg.22.1695337676098; Thu, 21 Sep 2023 16:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695337676; cv=none; d=google.com; s=arc-20160816; b=zZ7ZDWvcokQPmUbRK2c/3I8CfvsmwiyqDVJ97bm4+GJv1dwxQPwll2lV6yHbo0Mexj 4CX49KPiUJLgWSozUUjRxS+0TWSwTg2hmJGBaTJL1srieb2svl2HP4Hg2LMQWVNYnk0X p0/cBSZa3wkOxBid8TA8Q8tEb091jslEVe8MbAhMwznR76jtZ8YA+2SFBnO0VjyPmL6h 7qewL6ixzlnE4+xWD/1JRnZRr5f8KVaTnGVEEftxnV/TMoP2TjlADWbYbjqn+QV5D3Dx 2tmPyQTpDvjslAD6ijHDpVdK52fG/LXuXkBgMt6sI3pZevo8Fq1Oz8ad24KbeT+4+VAO U6xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/X14ygd2DyigNPr5gXFYwES7vAO5XEO9/UTVxik7ixw=; fh=ojY/NyNDNpQcQ0L75L0csfKJ8wdXbIYcji60oNBvYS0=; b=uGhkmt9AcxJF7a5RyzkaL5wKzESFmToBjr7mECYgox9MwQHhDYrEti7C0G/Tq6ryjn Sc8opkKU0GoABhThH4+jnbodcSyyf7m76AEcDxmfVxdARhOO/wRfA0ZnR8xkNuJ3lIcz ok/NgeB9UPihCJnFwixWuQq8CKqpIEHiMzrmAaYL1vmYjyJNdoLyYdg0d/DaHq7a96RF I0EZWIr47hzQU9t86pvy40Qc8E0+28sA5k/DMwPqmdbIIB6jk3i2q5dVzLK+nPU0BUql rHGBb+173ouz/lQkX88jdRahOZC7PsVtP6bx0VY5KfmcqCo09fgS2qiwYUHa5s4O9e1v Eqcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iOxVuCvY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id gc19-20020a17090b311300b0027450695a78si4553564pjb.172.2023.09.21.16.07.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 16:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iOxVuCvY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 218768087B4A; Thu, 21 Sep 2023 14:06:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232402AbjIUVFv (ORCPT + 99 others); Thu, 21 Sep 2023 17:05:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232600AbjIUVEk (ORCPT ); Thu, 21 Sep 2023 17:04:40 -0400 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C821488095; Thu, 21 Sep 2023 10:38:40 -0700 (PDT) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-59e6ebdf949so17782447b3.0; Thu, 21 Sep 2023 10:38:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695317920; x=1695922720; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/X14ygd2DyigNPr5gXFYwES7vAO5XEO9/UTVxik7ixw=; b=iOxVuCvYdrPgy+GM/DuPWyioQ9sgXe9ak6xwhlcYpC6m929gYXHIn7cTaJCmWRmCYW Y1AHFvFAdUJAOWHmpmeawYpJBSMlfVlsxUGBgYJw6lRX+zLpopxHCNLPy7l+giWE606Q 2r5ILoD0QBP/LtCf9tQqc/wJv1HlpKWkCtpqQFOaJkIaNWsa7FZn9r0aatQtQjuUglcv JVVQhHsDu174ESZbj9lxMCiTMHMAVK1SHcmQlKF9oklSB8vHvjPi8yh0Ta5CZvO7TtlP jcYNRdIXZ0RhGDNg2WawlRzFsLBT7jCPKyPlU9qm9YEnwqb0+aOac2ywCKDKM6x6KesN +91w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695317920; x=1695922720; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/X14ygd2DyigNPr5gXFYwES7vAO5XEO9/UTVxik7ixw=; b=m6rd0ukdr5LyeKr7feA75/LriT3x/0zNXedUK/HzDJ2OsSF6yzNaUlGt/TEaD1KQPo zJ4qw1D3Q5MTYlJ1cuV9llAV9vknE8RYikYxOVTD3lxXRXuLMgP+Cml+zqbYD/M1POUd 9/P7WcC2Tp7bWzEvNc8pCJwW6LgN7HSknemonkCN+4SZWE+7PTJgp4tzgFr41IsGhepf j9VGStllR8rhUhdkooLc9gj2DBiYitgS0yjguIsK6mV3PNfZymYlD+qFOJ+3poZONk6c G45AJj1jF3fFxOMVImfwSRN3aBNelUZgIL96xYcPEUsxmmUEDoUPwmpnCHwrqjRmqSVb Kcog== X-Gm-Message-State: AOJu0YwEiQJ1m7YCNqCNq5mYPhwBpoBRbrh4Oe+vpUBdMlZ6iaVfQioi DFn2axgVpxR6dxz+ZdtE95c85gtTswvREEhEjJbwaLiDJ8Y= X-Received: by 2002:a0c:e9c2:0:b0:659:abb2:7ebd with SMTP id q2-20020a0ce9c2000000b00659abb27ebdmr751432qvo.19.1695292039735; Thu, 21 Sep 2023 03:27:19 -0700 (PDT) MIME-Version: 1.0 References: <20230920-financial-declared-7b4b4baae517@wendy> <20230921-d2db829b289c937081dc8a72@fedora> In-Reply-To: <20230921-d2db829b289c937081dc8a72@fedora> From: Chen Wang Date: Thu, 21 Sep 2023 18:27:09 +0800 Message-ID: Subject: Re: [PATCH v2 09/11] riscv: dts: add initial SOPHGO SG2042 SoC device tree To: Conor Dooley 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.5 required=5.0 tests=DATE_IN_PAST_06_12,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Thu, 21 Sep 2023 14:06:06 -0700 (PDT) Regards, unicornx 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: > > Regards, > > > > unicornx > > ...... > > > > + > > > > +/ { > > > > + 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 h= ere > > > 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? > > Thanks, > Conor. > We learn this from arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts, it writes DTS as following: ``` 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. > > > > > > > > > > > + memory@0 { > > > > + device_type =3D "memory"; > > > > + reg =3D <0x00000000 0x00000000 0x00000000 0x00000000>= ; > > > > + }; > > > > +