Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1964448rwb; Tue, 29 Nov 2022 23:48:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf7LLrEazBYQX2kBDLywYdiW1HWDWkMtJLfefXAiy0xHTz+Ai7o8+MhvCmxkebuY6Df5lBc3 X-Received: by 2002:aa7:cb8d:0:b0:467:bc1f:ca16 with SMTP id r13-20020aa7cb8d000000b00467bc1fca16mr56145846edt.269.1669794529420; Tue, 29 Nov 2022 23:48:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669794529; cv=none; d=google.com; s=arc-20160816; b=HPoFLA7WKoUw/hv0n011Ni6zqtnTImN9bWMwob6AJ/6CZlbx0ElS9nu4Ik6l4P/8Ic qkbv+7lwGyXoj4cTbRwTXtM7MwhHyiPJbw8oHo02vEFXEAsv0KJxRRKVu8jWxfFZ8Cr8 sJTB2fr5URCLLy4nwUkg6y1PZwK2EgezUTBXNfCVMcbD4O10ANkSQXl/ncH8RgHWzxLm D6AGyt+eTCS9qihrCMJaBTsCfYhe/nOYEBUWn7QvtPanbctu3GpHtefT4a7/y38zJago QZFKwJuzmipTtdu/I+zzYdq7Vxv24gv6wuMvnB5z2gl//ysThagmX/HZHg05SukXxGa+ lhRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:feedback-id:dkim-signature:dkim-signature; bh=7jCQGR0xy6Fkh672DFHxOw50RlZJiRPWysOecK1wOw8=; b=w1Xah3ZXHDy+7ZBOag+IWzVt+skJScKPGYq0srArxmyYGuVOKJppjoBII2WBPbqY3C nxCo9i1WP6z74aKl7nQQzxWzCPgOa3uuhzDU1YmVbriUzC9rvEezRoPb+7BJq7CT+Kt5 /8QkNNSYQvL2qdQ8tz6Kg/eSqDTtuDnjKvymIUVeza68h9dDRgUet3e70IhN5ywuEfm0 TqcRNjn/BD6mcMHuHa+2Bca/tfeFKexkDYF/96u45AsE6hx7y2K4Bv9w9FMPw7RII/Id hjHAmDOKrik1t0rqojGLd88kcGFQrblrUtbOu33w6rVIa1Y1NJ+D5eJrQtaJe5v2s+Lk I+vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=kaMSJfph; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Zf7Fw9Yp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp19-20020a170906c15300b007c093acadb0si808542ejc.508.2022.11.29.23.48.28; Tue, 29 Nov 2022 23:48:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=kaMSJfph; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=Zf7Fw9Yp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233917AbiK3HZg (ORCPT + 84 others); Wed, 30 Nov 2022 02:25:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbiK3HZf (ORCPT ); Wed, 30 Nov 2022 02:25:35 -0500 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662C65B85E; Tue, 29 Nov 2022 23:25:34 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id BF5F332008FE; Wed, 30 Nov 2022 02:25:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 30 Nov 2022 02:25:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669793132; x= 1669879532; bh=7jCQGR0xy6Fkh672DFHxOw50RlZJiRPWysOecK1wOw8=; b=k aMSJfphW6+/085SOqXaR1v5j3gYqHdwXRO3UWXeqKm0sI22YTLVg1zZxu4q8Mian NBoZ/YmBEuYu2d4eisUFlVx0ZOmJXhhwaoYIsgp/99BwYb+Vor9m2Ffi7Hk/r4U9 SxtngMe+h013xAkljyl+0ovCGZkZ42y9MCss/iUzxd1YRPpSM7XgIvbdUcuHwrOV r4f/Lr3ZWBDr+w8vTMU3H8z/islNut8v8E6jntzUqh403U4PDeF6Sxes74y4V9R+ wFueQVLNh+sc7iZ58oQwE8mhNH1VMx54n8KzhYPV9s+bzaYWb2lTUf8TyS5Mg85x DUVu7mTp8vE0OYfXcNInw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669793132; x= 1669879532; bh=7jCQGR0xy6Fkh672DFHxOw50RlZJiRPWysOecK1wOw8=; b=Z f7Fw9YpciDY0tKXZmMdllDr3lTxLjh1f3gANVehv7WIvTk0Oo7rcD0IfFVjOSodP 1rgPCzcif5rQGPtDoP/ZDlLKUPQe0C19R/CM4SuLiQWLVeCu/dyI2lN0ebpJXYpZ Xd8JxtOd5yg8pDVin3Nc3SDlni8baJtffS0mRmLgJGXMicKfaZwyMjVFCUBGk65q gZH3guPITWL/0BY9nXmied32Yky3J4/l3AMsHerwCPcrsd4npfrUPrl8PqjxPSQg FmXMGn6A/GdXKAiMiFhSWsabm93o+YY6SsaKlwmMXi0q3LoWx4IEYn9n1+osL306 L8g/SUdzpuLqgHDyR7pHg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrtddvgddutdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefurghm uhgvlhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenuc ggtffrrghtthgvrhhnpeekjeelleefiedthfdtgfekgeehudefudeugeffvdfhudekleel fedtteejhedutdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Nov 2022 02:25:31 -0500 (EST) Message-ID: <91d7eebd-7433-c06d-6d14-a01d11af9df9@sholland.org> Date: Wed, 30 Nov 2022 01:25:30 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux ppc64le; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v2 7/9] riscv: dts: bouffalolab: add Sipeed M1s SoM and Dock devicetree Content-Language: en-US To: Jisheng Zhang Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, Rob Herring , Conor Dooley , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Greg Kroah-Hartman , Jiri Slaby , =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= References: <20221127132448.4034-1-jszhang@kernel.org> <20221127132448.4034-8-jszhang@kernel.org> From: Samuel Holland In-Reply-To: <20221127132448.4034-8-jszhang@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 On 11/27/22 07:24, Jisheng Zhang wrote: > Sipeed manufactures a M1s system-on-module and dock board, add basic > support for them. > > Signed-off-by: Jisheng Zhang > --- > arch/riscv/boot/dts/Makefile | 1 + > arch/riscv/boot/dts/bouffalolab/Makefile | 2 ++ > .../dts/bouffalolab/bl808-sipeed-m1s-dock.dts | 25 +++++++++++++++++++ > .../dts/bouffalolab/bl808-sipeed-m1s.dtsi | 21 ++++++++++++++++ > 4 files changed, 49 insertions(+) > create mode 100644 arch/riscv/boot/dts/bouffalolab/Makefile > create mode 100644 arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s-dock.dts > create mode 100644 arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s.dtsi > > diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile > index ff174996cdfd..b525467152b2 100644 > --- a/arch/riscv/boot/dts/Makefile > +++ b/arch/riscv/boot/dts/Makefile > @@ -1,4 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0 > +subdir-y += bouffalolab > subdir-y += sifive > subdir-y += starfive > subdir-$(CONFIG_SOC_CANAAN_K210_DTB_BUILTIN) += canaan > diff --git a/arch/riscv/boot/dts/bouffalolab/Makefile b/arch/riscv/boot/dts/bouffalolab/Makefile > new file mode 100644 > index 000000000000..5419964e892d > --- /dev/null > +++ b/arch/riscv/boot/dts/bouffalolab/Makefile > @@ -0,0 +1,2 @@ > +# SPDX-License-Identifier: GPL-2.0 > +dtb-$(CONFIG_SOC_BOUFFALOLAB) += bl808-sipeed-m1s-dock.dtb > diff --git a/arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s-dock.dts b/arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s-dock.dts > new file mode 100644 > index 000000000000..c6b4894a7b88 > --- /dev/null > +++ b/arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s-dock.dts > @@ -0,0 +1,25 @@ > +// SPDX-License-Identifier: (GPL-2.0+ or MIT) > +/* > + * Copyright (C) 2022 Jisheng Zhang > + */ > + > +/dts-v1/; > + > +#include "bl808-sipeed-m1s.dtsi" > + > +/ { > + model = "Sipeed M1s Dock"; > + compatible = "sipeed,m1s-dock", "sipeed,m1s", "bouffalolab,bl808"; > + > + aliases { > + serial0 = &uart0; > + }; > + > + chosen { > + stdout-path = "serial0:2000000n8"; > + }; > +}; > + > +&uart0 { > + status = "okay"; > +}; > diff --git a/arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s.dtsi b/arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s.dtsi > new file mode 100644 > index 000000000000..5026de768534 > --- /dev/null > +++ b/arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s.dtsi > @@ -0,0 +1,21 @@ > +// SPDX-License-Identifier: (GPL-2.0+ or MIT) > +/* > + * Copyright (C) 2022 Jisheng Zhang > + */ > + > +/dts-v1/; > + > +#include "bl808.dtsi" > + > +/ { > + compatible = "sipeed,m1s", "bouffalolab,bl808"; > + > + memory@50000000 { > + device_type = "memory"; > + reg = <0x50000000 0x04000000>; > + }; The PSRAM is part of the BL808, so this should go in the SoC .dtsi file. (Unless I'm missing something and there are BL808 variants with different amounts of memory. The PSRAM init code in the SDK does size detection, so I suppose it is possible.) Regards, Samuel > +}; > + > +&xtal { > + clock-frequency = <40000000>; > +};