From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (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 A306D70 for ; Mon, 7 Jun 2021 07:53:37 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B15E6121D for ; Mon, 7 Jun 2021 07:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623052417; bh=bZf1oPujuHjZMOhIewYXXJEcGVTtrINZZrYSSOjle5w=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NNznX+gSK1ubk2X3/IRC/NKUHBNtUpj3pIv/4c2uJBBiJUtAV/KhZcOXzgKlTc197 JoaqNhfMIWWrKQn+ytYhGSXvaYtI570te4Vf2QyUsmIwnEioZqlYZoWTtD3s/olZ1r zXU5lkoWfLDBysgxbwtN+RMG+JJ6rSHG187xSFhIHkUpAhqI91/h8j7NLXHV+zL4Ya kzZSX1foXTx99yEqWn2UEdMCZtAFdYIHFVjM5lYuzSOaV0RKUi40RbmSeLfz2PBK7X uWdUT9XRikixdbajY+xQgkc2hyki1enBqAao5zY2bxSkhf1xV+/LbpZIJLfCEA4My/ KUsm9jil4LFGg== Received: by mail-lj1-f171.google.com with SMTP id z22so4957150ljh.8 for ; Mon, 07 Jun 2021 00:53:37 -0700 (PDT) X-Gm-Message-State: AOAM5321S2892crFYmFAe17pp69rlTt33V+XJb2PJx3d8GrXJK6e+uc+ Wr9yI9vEOS8+hEbhtH/vCnQTDRrEBmiz9eYqWi0= X-Google-Smtp-Source: ABdhPJwH/bIcZcv9bYZevLpASI9avmmDzuyYLA4C+R6RK/v/ZYHyxwKOcgETDO+RRKacBwp8wDxom+B3t+B9y1ptv1M= X-Received: by 2002:a2e:3506:: with SMTP id z6mr14531480ljz.238.1623052415598; Mon, 07 Jun 2021 00:53:35 -0700 (PDT) X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1622970249-50770-1-git-send-email-guoren@kernel.org> <1622970249-50770-13-git-send-email-guoren@kernel.org> <2490489.OUOj5N01qN@jernej-laptop> <20210607072709.ul4jdvtyspj6t4c6@gilmour> In-Reply-To: <20210607072709.ul4jdvtyspj6t4c6@gilmour> From: Guo Ren Date: Mon, 7 Jun 2021 15:53:23 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 09/11] riscv: soc: Initial DTS for Allwinner D1 NeZha board To: Maxime Ripard Cc: =?UTF-8?Q?Jernej_=C5=A0krabec?= , Anup Patel , Palmer Dabbelt , Arnd Bergmann , Chen-Yu Tsai , Drew Fustini , liush@allwinnertech.com, =?UTF-8?B?V2VpIFd1ICjlkLTkvJ8p?= , wefu@redhat.com, linux-riscv , Linux Kernel Mailing List , linux-arch , linux-sunxi@lists.linux.dev, Guo Ren , Atish Patra , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thx for the clarification. On Mon, Jun 7, 2021 at 3:27 PM Maxime Ripard wrote: > > On Mon, Jun 07, 2021 at 11:44:03AM +0800, Guo Ren wrote: > > On Mon, Jun 7, 2021 at 12:26 AM Jernej =C5=A0krabec wrote: > > > > > > Hi! > > > > > > I didn't go through all details. After you fix all comments below, yo= u should > > > run "make dtbs_check" and fix all reported warnings too. > > > > > > Dne nedelja, 06. junij 2021 ob 11:04:07 CEST je guoren@kernel.org nap= isal(a): > > > > From: Guo Ren > > > > > > > > Add initial DTS for Allwinner D1 NeZha board having only essential > > > > devices (uart, dummy, clock, reset, clint, plic, etc). > > > > > > > > Signed-off-by: Guo Ren > > > > Co-Developed-by: Liu Shaohua > > > > Signed-off-by: Liu Shaohua > > > > Cc: Anup Patel > > > > Cc: Atish Patra > > > > Cc: Christoph Hellwig > > > > Cc: Chen-Yu Tsai > > > > Cc: Drew Fustini > > > > Cc: Maxime Ripard > > > > Cc: Palmer Dabbelt > > > > Cc: Wei Fu > > > > Cc: Wei Wu > > > > --- > > > > arch/riscv/boot/dts/Makefile | 1 + > > > > arch/riscv/boot/dts/allwinner/Makefile | 2 + > > > > .../boot/dts/allwinner/allwinner-d1-nezha-kit.dts | 29 ++++++++ > > > > arch/riscv/boot/dts/allwinner/allwinner-d1.dtsi | 84 > > > > ++++++++++++++++++++++ 4 files changed, 116 insertions(+) > > > > create mode 100644 arch/riscv/boot/dts/allwinner/Makefile > > > > create mode 100644 arch/riscv/boot/dts/allwinner/allwinner-d1-nezh= a-kit.dts > > > > create mode 100644 arch/riscv/boot/dts/allwinner/allwinner-d1.dtsi > > > > > > > > diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Mak= efile > > > > index fe996b8..3e7b264 100644 > > > > --- a/arch/riscv/boot/dts/Makefile > > > > +++ b/arch/riscv/boot/dts/Makefile > > > > @@ -2,5 +2,6 @@ > > > > subdir-y +=3D sifive > > > > subdir-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) +=3D canaan > > > > subdir-y +=3D microchip > > > > +subdir-y +=3D allwinner > > > > > > > > obj-$(CONFIG_BUILTIN_DTB) :=3D $(addsuffix /, $(subdir-y)) > > > > diff --git a/arch/riscv/boot/dts/allwinner/Makefile > > > > b/arch/riscv/boot/dts/allwinner/Makefile new file mode 100644 > > > > index 00000000..4adbf4b > > > > --- /dev/null > > > > +++ b/arch/riscv/boot/dts/allwinner/Makefile > > > > @@ -0,0 +1,2 @@ > > > > +# SPDX-License-Identifier: GPL-2.0 > > > > +dtb-$(CONFIG_SOC_SUNXI) +=3D allwinner-d1-nezha-kit.dtb > > > > diff --git a/arch/riscv/boot/dts/allwinner/allwinner-d1-nezha-kit.d= ts > > > > b/arch/riscv/boot/dts/allwinner/allwinner-d1-nezha-kit.dts new file= mode > > > > 100644 > > > > index 00000000..cd9f7c9 > > > > --- /dev/null > > > > +++ b/arch/riscv/boot/dts/allwinner/allwinner-d1-nezha-kit.dts > > > > > > Board DT names are comprised of soc name and board name, in this case= it would > > > be "sun20i-d1-nezha-kit.dts" > > > > > > > @@ -0,0 +1,29 @@ > > > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > > > > > > Usually copyrights are added below spdx id. > > > > > > > + > > > > +/dts-v1/; > > > > + > > > > +#include "allwinner-d1.dtsi" > > > > + > > > > +/ { > > > > + #address-cells =3D <2>; > > > > + #size-cells =3D <2>; > > > > > > This should be part of SoC level DTSI. > > > > > > > + model =3D "Allwinner D1 NeZha Kit"; > > > > + compatible =3D "allwinner,d1-nezha-kit"; > > > > > > Board specific compatible string should be followed with SoC compatib= le, in > > > this case "allwinner,sun20i-d1". You should document it too. > > > > > > > + > > > > + chosen { > > > > + bootargs =3D "console=3DttyS0,115200"; > > > > > > Above line doesn't belong here. If anything, it should be added dynam= ically by > > > bootloader. > > > > After discussion, we still want to keep a default value here. > > Sometimes we could boot with jtag and parse dtb is hard for gdbinit > > script. > > > > > > > > > + stdout-path =3D &serial0; > > > > + }; > > > > + > > > > + memory@40000000 { > > > > + device_type =3D "memory"; > > > > + reg =3D <0x0 0x40000000 0x0 0x20000000>; > > > > + }; > > > > > > Ditto for whole memory node. > > > > Ditto > > The thing is that there's never a good value for a default. Let's take > the memory node here: what would be a good default? If we want to make > it work everywhere it's going to be the lowest amount of memory > available on the D1 boards. It's going to be hard to maintain and very > likely to be overlooked, resulting in broken boards anyway. > > If someone is savvy enough to use JTAG, it's not really difficult to > modify the DT for their board when they need it. okay, I see. I'll follow the rule in the next version of the patchset. > > Maxime --=20 Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/