Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82411C64EC4 for ; Tue, 7 Mar 2023 01:59:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 024FE85894; Tue, 7 Mar 2023 02:59:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id D64D1858CD; Tue, 7 Mar 2023 02:59:42 +0100 (CET) Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by phobos.denx.de (Postfix) with ESMTP id 160AA8587C for ; Tue, 7 Mar 2023 02:59:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=yanhong.wang@starfivetech.com Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 46FFA24E21A; Tue, 7 Mar 2023 09:59:33 +0800 (CST) Received: from EXMBX073.cuchost.com (172.16.6.83) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 09:59:33 +0800 Received: from [192.168.120.49] (171.223.208.138) by EXMBX073.cuchost.com (172.16.6.83) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 7 Mar 2023 09:59:32 +0800 Message-ID: <7442f666-e76c-3052-8048-9909155b95d7@starfivetech.com> Date: Tue, 7 Mar 2023 09:59:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v3 14/17] riscv: dts: jh7110: Add initial StarFive JH7110 device tree Content-Language: en-US To: Conor Dooley CC: , Rick Chen , Leo , Lukasz Majewski , Sean Anderson , Lee Kuan Lim , "Jianlong Huang" , Emil Renner Berthing References: <20230303032432.7837-1-yanhong.wang@starfivetech.com> <20230303032432.7837-15-yanhong.wang@starfivetech.com> <36985130-896c-43d9-9623-c1e7bf07dd32@spud> From: yanhong wang In-Reply-To: <36985130-896c-43d9-9623-c1e7bf07dd32@spud> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX073.cuchost.com (172.16.6.83) X-YovoleRuleAgent: yovoleflag X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 2023/3/4 5:16, Conor Dooley wrote: > On Fri, Mar 03, 2023 at 11:24:29AM +0800, Yanhong Wang wrote: >> Add initial device tree for the JH7110 RISC-V SoC. >> >> Signed-off-by: Yanhong Wang >> --- >> arch/riscv/dts/jh7110.dtsi | 582 +++++++++++++++++++++++++++++++++++++ >> 1 file changed, 582 insertions(+) >> create mode 100644 arch/riscv/dts/jh7110.dtsi >> >> diff --git a/arch/riscv/dts/jh7110.dtsi b/arch/riscv/dts/jh7110.dtsi >> new file mode 100644 >> index 0000000000..d3e9f92987 >> --- /dev/null >> +++ b/arch/riscv/dts/jh7110.dtsi >> @@ -0,0 +1,582 @@ >> +// SPDX-License-Identifier: GPL-2.0 OR MIT >> +/* >> + * Copyright (C) 2022 StarFive Technology Co., Ltd. >> + */ >> + >> +/dts-v1/; >> +#include >> +#include >> + >> +/ { >> + compatible = "starfive,jh7110"; >> + #address-cells = <2>; >> + #size-cells = <2>; >> + >> + cpus { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + >> + S7_0: cpu@0 { >> + compatible = "sifive,s7", "riscv"; >> + reg = <0>; >> + d-cache-block-size = <64>; >> + d-cache-sets = <64>; >> + d-cache-size = <8192>; >> + d-tlb-sets = <1>; >> + d-tlb-size = <40>; >> + device_type = "cpu"; >> + i-cache-block-size = <64>; >> + i-cache-sets = <64>; >> + i-cache-size = <16384>; >> + i-tlb-sets = <1>; >> + i-tlb-size = <40>; >> + mmu-type = "riscv,sv39"; >> + next-level-cache = <&ccache>; >> + riscv,isa = "rv64imac_zba_zbb"; > > Hmm, based on what Sean said on the previous version, "We use strchr on > it; so something like Zicsr is parsed as 5 extensions", are you sure that > adding this here behaves correctly? > As you said, u-boot does not parse the content after '_', zba/zbb has no practical meaning in u-boot. The definitions of 'riscv,isa' refer to linux and is consistent with this. https://patchwork.kernel.org/project/linux-riscv/patch/20230221024645.127922-18-hal.feng@starfivetech.com/ Do you have any better suggestion? Referring to the definition of Sifive fu740, remove '_zba_zbb'? > https://lore.kernel.org/u-boot/22e805d4-f823-975c-a970-a4a19bb13ece@gmail.com/ > > I know that having zba/zbb is *correct*, but if U-Boot doesn't parse it > correctly... > > Cheers, > Conor.