Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2878009rwb; Sun, 20 Nov 2022 03:27:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Nz32hg893+414WOv8CJgH0vMq/JUcR6U3wCuB++rOh3tvXGxgHFDGcNq+fyew25hpYsUP X-Received: by 2002:a17:906:49c2:b0:7aa:23ac:608e with SMTP id w2-20020a17090649c200b007aa23ac608emr11856675ejv.450.1668943638730; Sun, 20 Nov 2022 03:27:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668943638; cv=none; d=google.com; s=arc-20160816; b=Cwv2k/YdphqnCcaYJLBDC0r8PseJ7Ff9F5hWndL69oFRWQQ+pxZc995m6hCG+NuQOE 6B5f0ztPO/A8I0ET5JMGoRlfK38BGZ0flUkVUWk6HsStSP2IYUstvkpnN1+gkAjZZcmm 4KjfgtdLlNPXxjXAXmuzqPdtN2j/TIqXHah8KVuf4LF1914F5ygQ6jpwqLvrgpqY4ftn A+Y01V6yy8sBpQ1ZVp6kJlr50eK1oHsyfqimOrBv/1oVGiqLI4rGm6JY0NoG5Kq4/4tf 6S3SMzGAKg+B+8MjsZAn19mhD5M5Rb/fmAF2WtEqcdgqFfnisdGicBLS4Ue8DTqeiUXT C13Q== 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=4C1yMqoHnil+1vLT8Eh9lbnYEWKP2xZarK/IcwLhTgE=; b=ZpbW9W64BRKVRXLtzUosN5PJysomWQCcVQkRcFkxmBb3xkBLP75uboooNs5uj+/6P3 mt2JADH3ISqNVCMhsDt+hs84o/2/g05iovQXMNzJl/mgcajGT9iAqiBCeA67trvQoB/W OUEhudVIe8omX5qS+Q5IYEgA5es31ca0fx5V7CW0sOPyupSSTTjIYQS75bEMyGZhSOYl SMHYZsRQZeCl3nfDTYrdQNqUTjZiLWgHRGGowkL8ozZ5rGQCN6ibyNJfH0JpVwaAw5CB rOgqZ6lLS58p9msmBq9kgt8VmlUnLQjfAf0ChRKlWvJIyXPCE2aujVvP0p6afZYQyrPs KelA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Cs/PSADv"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss28-20020a170907c01c00b0078d473448afsi6285513ejc.233.2022.11.20.03.26.55; Sun, 20 Nov 2022 03:27:18 -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=@kernel.org header.s=k20201202 header.b="Cs/PSADv"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229607AbiKTLCo (ORCPT + 91 others); Sun, 20 Nov 2022 06:02:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbiKTLCk (ORCPT ); Sun, 20 Nov 2022 06:02:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87C5610B49; Sun, 20 Nov 2022 03:02:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2302760A50; Sun, 20 Nov 2022 11:02:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14E6EC433C1; Sun, 20 Nov 2022 11:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668942158; bh=gDU2LVXIzZwLgBshn5UVoInFo0YQ5h+qGGMcrbbByiA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Cs/PSADvyqH2ADXPbipsh1UqqL5+N4J52iN86y/9Ew92/X+0a29He9D9ds1c9FvmK +QVB8ohmocBD4E6DpjYtlBx6DfFOUJJdmSbBq5g6TmFGlMJVJ/zRsCXtiehfI4G8OB JQ3ZTopkx++6lrMFU8Hl8HVrqhMV3jOMZgHE06adWe/KPefOJaLhLsQiFqreK7nGVT k6BoUN6D97PzBNuaVG+LiHjOCa+E/H3D92esGe60FgVtJpyd27a/QRK3Va6TpbkEb9 PW7Y/Rt8Va7jUm0rXv632cPL308HS/RnxY0gB7vlmQ+g82T7vxMWqMaJ6ADsFLcTVg W/XfX2LZHQblA== Date: Sun, 20 Nov 2022 11:02:33 +0000 From: Conor Dooley To: Jisheng Zhang Cc: Greg Kroah-Hartman , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Jiri Slaby , linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH 5/7] riscv: dts: bouffalolab: add the bl808 SoC base device tree Message-ID: References: <20221120082114.3030-1-jszhang@kernel.org> <20221120082114.3030-6-jszhang@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221120082114.3030-6-jszhang@kernel.org> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 On Sun, Nov 20, 2022 at 04:21:12PM +0800, Jisheng Zhang wrote: > Add a baisc dtsi for the bouffalolab bl808 SoC. > > Signed-off-by: Jisheng Zhang > --- > arch/riscv/boot/dts/Makefile | 1 + > arch/riscv/boot/dts/bouffalolab/bl808.dtsi | 74 ++++++++++++++++++++++ > 2 files changed, 75 insertions(+) > create mode 100644 arch/riscv/boot/dts/bouffalolab/bl808.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/bl808.dtsi b/arch/riscv/boot/dts/bouffalolab/bl808.dtsi > new file mode 100644 > index 000000000000..c98ebb14ee10 > --- /dev/null > +++ b/arch/riscv/boot/dts/bouffalolab/bl808.dtsi > @@ -0,0 +1,74 @@ > +// SPDX-License-Identifier: (GPL-2.0+ or MIT) > +/* > + * Copyright (C) 2022 Jisheng Zhang > + */ > + > +#include > + > +/ { > + compatible = "bouffalolab,bl808"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + cpus { > + timebase-frequency = <1000000>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + cpu0: cpu@0 { > + compatible = "thead,c906", "riscv"; So this is not yet defined as the dt etc for the d1 has not yet landed. I think I will go pick up that patch for v6.2 as it should make everyone's life easier. Without that, dtbs_check produces: arch/riscv/boot/dts/bouffalolab/bl808-sipeed-m1s.dtb:0:0: /cpus/cpu@0: failed to match any schema with compatible: ['thead,c906', 'riscv'] > + device_type = "cpu"; > + reg = <0>; > + d-cache-block-size = <64>; > + d-cache-sets = <256>; > + d-cache-size = <32768>; > + i-cache-block-size = <64>; > + i-cache-sets = <128>; > + i-cache-size = <32768>; > + mmu-type = "riscv,sv39"; > + riscv,isa = "rv64imafdc"; > + > + cpu0_intc: interrupt-controller { > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <1>; > + }; > + }; > + }; > + > + xtal: xtal-clk { > + compatible = "fixed-clock"; > + clock-frequency = <40000000>; > + clock-output-names = "xtal"; > + #clock-cells = <0>; > + }; > + > + soc { > + compatible = "simple-bus"; > + ranges; > + interrupt-parent = <&plic>; > + dma-noncoherent; > + #address-cells = <1>; > + #size-cells = <1>; > + > + uart0: serial@30002000 { > + compatible = "bouffalolab,uart"; > + reg = <0x30002000 0x1000>; > + interrupts = <20 IRQ_TYPE_LEVEL_HIGH>; > + clocks = <&xtal>; > + status = "disabled"; > + }; > + > + plic: interrupt-controller@e0000000 { > + compatible = "thead,c900-plic"; Hmm, this one fails validation too. Likely you need to add a "bouffalolab,plic" to the plic dt-binding or otherwise modify the binding such that thead,c900-plic on it's own is permitted. CC Samuel on that patch please in case he has an opinion on it. Also, I've taken over picking up the misc dt stuff that Palmer used to apply - so canaan, starfive & sifive stuff. Do you intended sending PRs to Arnd for this stuff, or would you like to me bundle it with what I am going to be sending anyway? Thanks, Conor. > + reg = <0xe0000000 0x4000000>; > + interrupts-extended = <&cpu0_intc 0xffffffff>, > + <&cpu0_intc 9>; > + interrupt-controller; > + #address-cells = <0>; > + #interrupt-cells = <2>; > + riscv,ndev = <64>; > + }; > + }; > +}; > -- > 2.37.2 >