Message ID | 20221028165921.94487-5-prabhakar.mahadev-lad.rj@bp.renesas.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp941281wru; Fri, 28 Oct 2022 10:03:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4ctf9cAuMuPyxKveEiiH/u4eLqVbrKXyeNph7xZ7OrbpUJlo3XXf/teoqgRDjFugZqgRQb X-Received: by 2002:a17:907:7805:b0:780:24fd:c4e8 with SMTP id la5-20020a170907780500b0078024fdc4e8mr325395ejc.78.1666976628089; Fri, 28 Oct 2022 10:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666976628; cv=none; d=google.com; s=arc-20160816; b=SRBLJYMwj4L4vJOCqHWdxbB7v4nijB/SSrEmJ+cPWLXLRRNQ2B2atOZO1TR1CsFaSv GKsHM2p+yFCz7S/1kwc9Dx2BiUf4J3ChZ7MGiI2bRzGfNVd0W6vJ8BLecXTGoycmoHWj nevDzQgXalJHV8a8v02ycooDriolNlxwOo3Ut7ModYo7SxFMw7nKPPmfALUdQG+cN324 vOLlwf9pLG7fDqLXv7X3LPtiTT4P73psNltbR0Y+a8ruIN53KIVA96gDmUKUQO+QJ1uS kkgmt4utKAYiuw9yG4rw7oTfRYmPulOEc51/Ay+hfwW3miO/m/BQQYl6N82rKBK8D7fw HwXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Uwam57UrMly/7fzbCijndaabO19arvpUZgXGPs6USsk=; b=ypkZ65H6VyoVhlkLhyKqJYGipS0n5SiBiVr1blPm3cOCq9L85aDW8K3w9nX4tJPuQ+ j4d+PZV5COqS4IjFGJ85WuVLPXoY7jqwJHvSZ1Y+c1+wWn6oFEYEH+pSCC0OSYsk2zqY m5yEsGRlhYpkuyNNF2zO09kVYAe+C3dQQ1kvluHqGlxVmATfLlEobx4VY0iqJoLSpqyr XgJy8FG/h/bEqynfeyfrwGt8RcsTYVh44Ve/EgeWhBBZHlylKA1UhxvXEOeIHDGTRint pd8x57zyBTqie7hPs3eX2k6KqhWRYUai+XZIcU05gjMAXbxuiwYjG/Z9oraFaVtX8dbd u4uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=j3dE9iFZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f7-20020a056402354700b00457f31c1a10si6215915edd.584.2022.10.28.10.03.22; Fri, 28 Oct 2022 10:03:48 -0700 (PDT) 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=@gmail.com header.s=20210112 header.b=j3dE9iFZ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231162AbiJ1RAh (ORCPT <rfc822;norden.jeffspam@gmail.com> + 99 others); Fri, 28 Oct 2022 13:00:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230413AbiJ1Q76 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 28 Oct 2022 12:59:58 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF9213FA3; Fri, 28 Oct 2022 09:59:37 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id y16so7379401wrt.12; Fri, 28 Oct 2022 09:59:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Uwam57UrMly/7fzbCijndaabO19arvpUZgXGPs6USsk=; b=j3dE9iFZN3Q4xHL4MBNM8nTSfEpFB1Jd797KVcPXCUEbjqQv7rSf7t7uxd4Ozl+Qs9 4B/lh3AjjZBXDs7JFchaMSVC/uS0oK36fuRi2jihGh2VY5s8QVGyZKX/0p7GQAIbpnRh lFSmHGTMWjeIyQQRPG/m45xIVo1fHR0cQS1BqJlJN4TmD6E7y78I2TyvVVz+RJMnPRgJ IMR9xHqmGSka2GeRcD85UaooRbjP56w3/jiSDG7MVixTxurH9au3BiRqEOter2XWUZA0 QV13yHKvXniFfJLJwhL+MtzA5SWhiQnkQ13h5Y00lHIRAa9zw5+qoJRTlZt6jphZVsYL aESQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uwam57UrMly/7fzbCijndaabO19arvpUZgXGPs6USsk=; b=2GsXoqHYWJ515GM2e7NPen0+HflUPrq645kHhleXWLOtXhuxdDFd1ehHhv89AYIcss pzocTkAlyy5gyPXWpyYAKbaE2h/b22PL32BgRN46f5UHWPRs+p+Tvw85FPxu4K2UYpp/ RDOs36+D/pUcf6VGFk8n6QhIGEkKRAxaRNMpOa8Kb+wgK3D4dHR1RuUjAQYbn4Ub2C75 kisl67mafZX67eeltkUoRA77/coJxjtYuzOLPcSWlQlEpVILZvVszBrOOpBLwtpKdS20 Ebu2inhNXMZT3DaBfRRoR7PqkG/K+G1f2LqP4tsqyBgTguz80J/UqfBTu0BezPwqXazF pDsw== X-Gm-Message-State: ACrzQf18EEGK3KpW6sN8t9rUqdhF7Yjp3D+q6xt0z3CHMyOuhkvTdnZI 9rsrjtpIvxgbjGHp2cVMT/8= X-Received: by 2002:a5d:47aa:0:b0:236:79cc:6d5f with SMTP id 10-20020a5d47aa000000b0023679cc6d5fmr176258wrb.391.1666976375559; Fri, 28 Oct 2022 09:59:35 -0700 (PDT) Received: from prasmi.home ([2a00:23c8:2501:c701:d53b:eaf9:15f:6a8a]) by smtp.gmail.com with ESMTPSA id h2-20020adfe982000000b002322bff5b3bsm4939689wrm.54.2022.10.28.09.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 09:59:34 -0700 (PDT) From: Prabhakar <prabhakar.csengg@gmail.com> X-Google-Original-From: Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> To: Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Geert Uytterhoeven <geert+renesas@glider.be>, Magnus Damm <magnus.damm@gmail.com> Cc: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Heiko Stuebner <heiko@sntech.de>, Conor Dooley <conor.dooley@microchip.com>, Guo Ren <guoren@kernel.org>, Anup Patel <anup@brainfault.org>, Atish Patra <atishp@rivosinc.com>, Heinrich Schuchardt <heinrich.schuchardt@canonical.com>, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Prabhakar <prabhakar.csengg@gmail.com>, Biju Das <biju.das.jz@bp.renesas.com>, Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Subject: [PATCH v5 4/7] riscv: dts: renesas: Add initial devicetree for Renesas RZ/Five SoC Date: Fri, 28 Oct 2022 17:59:18 +0100 Message-Id: <20221028165921.94487-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221028165921.94487-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20221028165921.94487-1-prabhakar.mahadev-lad.rj@bp.renesas.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747951684629312406?= X-GMAIL-MSGID: =?utf-8?q?1747951684629312406?= |
Series |
Add support for Renesas RZ/Five SoC
|
|
Commit Message
Lad, Prabhakar
Oct. 28, 2022, 4:59 p.m. UTC
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP Single). RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. r9a07g043f.dtsi includes RZ/Five SoC specific blocks. Below are the RZ/Five SoC specific blocks added in the initial DTSI which can be used to boot via initramfs on RZ/Five SMARC EVK: - AX45MP CPU - PLIC [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> --- v4 -> v5 * Fixed riscv,ndev value (should be 511) * Reworked completely (sort of new patch) v3 -> v4 * No change v2 -> v3 * Fixed clock entry for CPU core * Fixed timebase frequency to 12MHz * Fixed sorting of the nodes * Included RB tags v1 -> v2 * Dropped including makefile change * Updated ndev count --- arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi
Comments
On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > Single). > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > can be used to boot via initramfs on RZ/Five SMARC EVK: > - AX45MP CPU > - PLIC > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v4 -> v5 > * Fixed riscv,ndev value (should be 511) > * Reworked completely (sort of new patch) > > v3 -> v4 > * No change > > v2 -> v3 > * Fixed clock entry for CPU core > * Fixed timebase frequency to 12MHz > * Fixed sorting of the nodes > * Included RB tags > > v1 -> v2 > * Dropped including makefile change > * Updated ndev count > --- > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > 1 file changed, 57 insertions(+) > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > new file mode 100644 > index 000000000000..50134be548f5 > --- /dev/null > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > @@ -0,0 +1,57 @@ > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +/* > + * Device Tree Source for the RZ/Five SoC > + * > + * Copyright (C) 2022 Renesas Electronics Corp. > + */ > + > +#include <dt-bindings/interrupt-controller/irq.h> > + > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > + > +#include <arm64/renesas/r9a07g043.dtsi> The initial patch shouldn't be broken. Combine them together with the minimal components and add others late. Don't separate the DTS files. > + > +/ { > + cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + timebase-frequency = <12000000>; > + > + cpu0: cpu@0 { > + compatible = "andestech,ax45mp", "riscv"; > + device_type = "cpu"; > + reg = <0x0>; > + status = "okay"; > + riscv,isa = "rv64imafdc"; > + mmu-type = "riscv,sv39"; > + i-cache-size = <0x8000>; > + i-cache-line-size = <0x40>; > + d-cache-size = <0x8000>; > + d-cache-line-size = <0x40>; > + clocks = <&cpg CPG_CORE R9A07G043_CLK_I>; > + > + cpu0_intc: interrupt-controller { > + #interrupt-cells = <1>; > + compatible = "riscv,cpu-intc"; > + interrupt-controller; > + }; > + }; > + }; > +}; > + > +&soc { > + interrupt-parent = <&plic>; > + > + plic: interrupt-controller@12c00000 { > + compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; > + #interrupt-cells = <2>; > + #address-cells = <0>; > + riscv,ndev = <511>; > + interrupt-controller; > + reg = <0x0 0x12c00000 0 0x400000>; > + clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > + power-domains = <&cpg>; > + resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; Ditto, Where is cpg? in r9a07g043.dtsi? > + interrupts-extended = <&cpu0_intc 11 &cpu0_intc 9>; > + }; > +}; > -- > 2.25.1 >
Hi Guo, Thank you for the review. On Sat, Oct 29, 2022 at 5:25 AM Guo Ren <guoren@kernel.org> wrote: > > On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > > Single). > > > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > > can be used to boot via initramfs on RZ/Five SMARC EVK: > > - AX45MP CPU > > - PLIC > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > --- > > v4 -> v5 > > * Fixed riscv,ndev value (should be 511) > > * Reworked completely (sort of new patch) > > > > v3 -> v4 > > * No change > > > > v2 -> v3 > > * Fixed clock entry for CPU core > > * Fixed timebase frequency to 12MHz > > * Fixed sorting of the nodes > > * Included RB tags > > > > v1 -> v2 > > * Dropped including makefile change > > * Updated ndev count > > --- > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > > 1 file changed, 57 insertions(+) > > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > new file mode 100644 > > index 000000000000..50134be548f5 > > --- /dev/null > > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > @@ -0,0 +1,57 @@ > > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +/* > > + * Device Tree Source for the RZ/Five SoC > > + * > > + * Copyright (C) 2022 Renesas Electronics Corp. > > + */ > > + > > +#include <dt-bindings/interrupt-controller/irq.h> > > + > > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > > + > > +#include <arm64/renesas/r9a07g043.dtsi> > The initial patch shouldn't be broken. Combine them together with the > minimal components and add others late. Don't separate the DTS files. > r9a07g043.dtsi [0] already exists in the kernel. r9a07g043.dtsi is shared with the RZ/G2UL SoC (ARM64) and the RZ/Five SoC. There are two more patches [1] which are required and are currently queued up in the Renesas tree for v6.2 (Ive mentioned the dependencies in the cover letter). [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi [1] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20221025220629.79321-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ > > + > > +/ { > > + cpus { > > + #address-cells = <1>; > > + #size-cells = <0>; > > + timebase-frequency = <12000000>; > > + > > + cpu0: cpu@0 { > > + compatible = "andestech,ax45mp", "riscv"; > > + device_type = "cpu"; > > + reg = <0x0>; > > + status = "okay"; > > + riscv,isa = "rv64imafdc"; > > + mmu-type = "riscv,sv39"; > > + i-cache-size = <0x8000>; > > + i-cache-line-size = <0x40>; > > + d-cache-size = <0x8000>; > > + d-cache-line-size = <0x40>; > > + clocks = <&cpg CPG_CORE R9A07G043_CLK_I>; > > + > > + cpu0_intc: interrupt-controller { > > + #interrupt-cells = <1>; > > + compatible = "riscv,cpu-intc"; > > + interrupt-controller; > > + }; > > + }; > > + }; > > +}; > > + > > +&soc { > > + interrupt-parent = <&plic>; > > + > > + plic: interrupt-controller@12c00000 { > > + compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; > > + #interrupt-cells = <2>; > > + #address-cells = <0>; > > + riscv,ndev = <511>; > > + interrupt-controller; > > + reg = <0x0 0x12c00000 0 0x400000>; > > + clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > + power-domains = <&cpg>; > > + resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > Ditto, Where is cpg? in r9a07g043.dtsi? > Yes CPG node is in r9a07g043.dtsi. Cheers, Prabhakar
On Sun, Oct 30, 2022 at 3:11 AM Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote: > > Hi Guo, > > Thank you for the review. > > On Sat, Oct 29, 2022 at 5:25 AM Guo Ren <guoren@kernel.org> wrote: > > > > On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > > > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > > > Single). > > > > > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > > > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > > > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > > > > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > > > can be used to boot via initramfs on RZ/Five SMARC EVK: > > > - AX45MP CPU > > > - PLIC > > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > --- > > > v4 -> v5 > > > * Fixed riscv,ndev value (should be 511) > > > * Reworked completely (sort of new patch) > > > > > > v3 -> v4 > > > * No change > > > > > > v2 -> v3 > > > * Fixed clock entry for CPU core > > > * Fixed timebase frequency to 12MHz > > > * Fixed sorting of the nodes > > > * Included RB tags > > > > > > v1 -> v2 > > > * Dropped including makefile change > > > * Updated ndev count > > > --- > > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > > > 1 file changed, 57 insertions(+) > > > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > new file mode 100644 > > > index 000000000000..50134be548f5 > > > --- /dev/null > > > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > @@ -0,0 +1,57 @@ > > > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +/* > > > + * Device Tree Source for the RZ/Five SoC > > > + * > > > + * Copyright (C) 2022 Renesas Electronics Corp. > > > + */ > > > + > > > +#include <dt-bindings/interrupt-controller/irq.h> > > > + > > > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > > > + > > > +#include <arm64/renesas/r9a07g043.dtsi> > > The initial patch shouldn't be broken. Combine them together with the > > minimal components and add others late. Don't separate the DTS files. > > > r9a07g043.dtsi [0] already exists in the kernel. r9a07g043.dtsi is > shared with the RZ/G2UL SoC (ARM64) and the RZ/Five SoC. There are two > more patches [1] which are required and are currently queued up in the > Renesas tree for v6.2 (Ive mentioned the dependencies in the cover > letter). You could just move the below part to the second dtsi patch. Then compile won't be broken. clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; power-domains = <&cpg>; resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > [1] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20221025220629.79321-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ > > > > + > > > +/ { > > > + cpus { > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + timebase-frequency = <12000000>; > > > + > > > + cpu0: cpu@0 { > > > + compatible = "andestech,ax45mp", "riscv"; > > > + device_type = "cpu"; > > > + reg = <0x0>; > > > + status = "okay"; > > > + riscv,isa = "rv64imafdc"; > > > + mmu-type = "riscv,sv39"; > > > + i-cache-size = <0x8000>; > > > + i-cache-line-size = <0x40>; > > > + d-cache-size = <0x8000>; > > > + d-cache-line-size = <0x40>; > > > + clocks = <&cpg CPG_CORE R9A07G043_CLK_I>; > > > + > > > + cpu0_intc: interrupt-controller { > > > + #interrupt-cells = <1>; > > > + compatible = "riscv,cpu-intc"; > > > + interrupt-controller; > > > + }; > > > + }; > > > + }; > > > +}; > > > + > > > +&soc { > > > + interrupt-parent = <&plic>; > > > + > > > + plic: interrupt-controller@12c00000 { > > > + compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; > > > + #interrupt-cells = <2>; > > > + #address-cells = <0>; > > > + riscv,ndev = <511>; > > > + interrupt-controller; > > > + reg = <0x0 0x12c00000 0 0x400000>; > > > + clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > > + power-domains = <&cpg>; > > > + resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > Ditto, Where is cpg? in r9a07g043.dtsi? > > > Yes CPG node is in r9a07g043.dtsi. > > Cheers, > Prabhakar -- Best Regards Guo Ren
On Sun, Oct 30, 2022 at 08:02:10AM +0800, Guo Ren wrote: > On Sun, Oct 30, 2022 at 3:11 AM Lad, Prabhakar > <prabhakar.csengg@gmail.com> wrote: > > > > Hi Guo, > > > > Thank you for the review. > > > > On Sat, Oct 29, 2022 at 5:25 AM Guo Ren <guoren@kernel.org> wrote: > > > > > > On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > > > > > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > > > > Single). > > > > > > > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > > > > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > > > > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > > > > > > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > > > > can be used to boot via initramfs on RZ/Five SMARC EVK: > > > > - AX45MP CPU > > > > - PLIC > > > > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > --- > > > > v4 -> v5 > > > > * Fixed riscv,ndev value (should be 511) > > > > * Reworked completely (sort of new patch) > > > > > > > > v3 -> v4 > > > > * No change > > > > > > > > v2 -> v3 > > > > * Fixed clock entry for CPU core > > > > * Fixed timebase frequency to 12MHz > > > > * Fixed sorting of the nodes > > > > * Included RB tags > > > > > > > > v1 -> v2 > > > > * Dropped including makefile change > > > > * Updated ndev count > > > > --- > > > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > > > > 1 file changed, 57 insertions(+) > > > > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > new file mode 100644 > > > > index 000000000000..50134be548f5 > > > > --- /dev/null > > > > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > @@ -0,0 +1,57 @@ > > > > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > +/* > > > > + * Device Tree Source for the RZ/Five SoC > > > > + * > > > > + * Copyright (C) 2022 Renesas Electronics Corp. > > > > + */ > > > > + > > > > +#include <dt-bindings/interrupt-controller/irq.h> > > > > + > > > > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > > > > + > > > > +#include <arm64/renesas/r9a07g043.dtsi> > > > The initial patch shouldn't be broken. Combine them together with the > > > minimal components and add others late. Don't separate the DTS files. > > > > > r9a07g043.dtsi [0] already exists in the kernel. r9a07g043.dtsi is > > shared with the RZ/G2UL SoC (ARM64) and the RZ/Five SoC. There are two > > more patches [1] which are required and are currently queued up in the > > Renesas tree for v6.2 (Ive mentioned the dependencies in the cover > > letter). > > You could just move the below part to the second dtsi patch. Then > compile won't be broken. > > clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > power-domains = <&cpg>; > resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; The makefile for this directory is not added until the next patch right? The compile shouldn't be broken here since it therefore cannot be compiled? Slightly confused, Conor. > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > [1] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20221025220629.79321-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ > > > > > > + > > > > +/ { > > > > + cpus { > > > > + #address-cells = <1>; > > > > + #size-cells = <0>; > > > > + timebase-frequency = <12000000>; > > > > + > > > > + cpu0: cpu@0 { > > > > + compatible = "andestech,ax45mp", "riscv"; > > > > + device_type = "cpu"; > > > > + reg = <0x0>; > > > > + status = "okay"; > > > > + riscv,isa = "rv64imafdc"; > > > > + mmu-type = "riscv,sv39"; > > > > + i-cache-size = <0x8000>; > > > > + i-cache-line-size = <0x40>; > > > > + d-cache-size = <0x8000>; > > > > + d-cache-line-size = <0x40>; > > > > + clocks = <&cpg CPG_CORE R9A07G043_CLK_I>; > > > > + > > > > + cpu0_intc: interrupt-controller { > > > > + #interrupt-cells = <1>; > > > > + compatible = "riscv,cpu-intc"; > > > > + interrupt-controller; > > > > + }; > > > > + }; > > > > + }; > > > > +}; > > > > + > > > > +&soc { > > > > + interrupt-parent = <&plic>; > > > > + > > > > + plic: interrupt-controller@12c00000 { > > > > + compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; > > > > + #interrupt-cells = <2>; > > > > + #address-cells = <0>; > > > > + riscv,ndev = <511>; > > > > + interrupt-controller; > > > > + reg = <0x0 0x12c00000 0 0x400000>; > > > > + clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > > > + power-domains = <&cpg>; > > > > + resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > > Ditto, Where is cpg? in r9a07g043.dtsi? > > > > > Yes CPG node is in r9a07g043.dtsi. > > > > Cheers, > > Prabhakar > > > > -- > Best Regards > Guo Ren
Hi Guo, On Sun, Oct 30, 2022 at 1:02 AM Guo Ren <guoren@kernel.org> wrote: > > On Sun, Oct 30, 2022 at 3:11 AM Lad, Prabhakar > <prabhakar.csengg@gmail.com> wrote: > > > > Hi Guo, > > > > Thank you for the review. > > > > On Sat, Oct 29, 2022 at 5:25 AM Guo Ren <guoren@kernel.org> wrote: > > > > > > On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > > > > > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > > > > Single). > > > > > > > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > > > > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > > > > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > > > > > > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > > > > can be used to boot via initramfs on RZ/Five SMARC EVK: > > > > - AX45MP CPU > > > > - PLIC > > > > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > --- > > > > v4 -> v5 > > > > * Fixed riscv,ndev value (should be 511) > > > > * Reworked completely (sort of new patch) > > > > > > > > v3 -> v4 > > > > * No change > > > > > > > > v2 -> v3 > > > > * Fixed clock entry for CPU core > > > > * Fixed timebase frequency to 12MHz > > > > * Fixed sorting of the nodes > > > > * Included RB tags > > > > > > > > v1 -> v2 > > > > * Dropped including makefile change > > > > * Updated ndev count > > > > --- > > > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > > > > 1 file changed, 57 insertions(+) > > > > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > new file mode 100644 > > > > index 000000000000..50134be548f5 > > > > --- /dev/null > > > > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > @@ -0,0 +1,57 @@ > > > > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > +/* > > > > + * Device Tree Source for the RZ/Five SoC > > > > + * > > > > + * Copyright (C) 2022 Renesas Electronics Corp. > > > > + */ > > > > + > > > > +#include <dt-bindings/interrupt-controller/irq.h> > > > > + > > > > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > > > > + > > > > +#include <arm64/renesas/r9a07g043.dtsi> ^^^ look below... > > > The initial patch shouldn't be broken. Combine them together with the > > > minimal components and add others late. Don't separate the DTS files. > > > > > r9a07g043.dtsi [0] already exists in the kernel. r9a07g043.dtsi is > > shared with the RZ/G2UL SoC (ARM64) and the RZ/Five SoC. There are two > > more patches [1] which are required and are currently queued up in the > > Renesas tree for v6.2 (Ive mentioned the dependencies in the cover > > letter). > > You could just move the below part to the second dtsi patch. Then > compile won't be broken. > > clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > power-domains = <&cpg>; > resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > Compile won't break at all, the CPG node [0] and the pinctrl node [1] already exists in the kernel which is being re-used by this SoC DTSI. ... the include file above already exists in the kernel and is not part of the next follow up patch. [0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/renesas/r9a07g043.dtsi?h=next-20221028#n541 [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/renesas/r9a07g043.dtsi?h=next-20221028#n563 Cheers, Prabhakar
Hi Conor, On Sun, Oct 30, 2022 at 6:16 PM Conor Dooley <conor@kernel.org> wrote: > > On Sun, Oct 30, 2022 at 08:02:10AM +0800, Guo Ren wrote: > > On Sun, Oct 30, 2022 at 3:11 AM Lad, Prabhakar > > <prabhakar.csengg@gmail.com> wrote: > > > > > > Hi Guo, > > > > > > Thank you for the review. > > > > > > On Sat, Oct 29, 2022 at 5:25 AM Guo Ren <guoren@kernel.org> wrote: > > > > > > > > On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > > > > > > > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > > > > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > > > > > Single). > > > > > > > > > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > > > > > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > > > > > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > > > > > > > > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > > > > > can be used to boot via initramfs on RZ/Five SMARC EVK: > > > > > - AX45MP CPU > > > > > - PLIC > > > > > > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > > > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > --- > > > > > v4 -> v5 > > > > > * Fixed riscv,ndev value (should be 511) > > > > > * Reworked completely (sort of new patch) > > > > > > > > > > v3 -> v4 > > > > > * No change > > > > > > > > > > v2 -> v3 > > > > > * Fixed clock entry for CPU core > > > > > * Fixed timebase frequency to 12MHz > > > > > * Fixed sorting of the nodes > > > > > * Included RB tags > > > > > > > > > > v1 -> v2 > > > > > * Dropped including makefile change > > > > > * Updated ndev count > > > > > --- > > > > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > > > > > 1 file changed, 57 insertions(+) > > > > > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > > > > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > new file mode 100644 > > > > > index 000000000000..50134be548f5 > > > > > --- /dev/null > > > > > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > @@ -0,0 +1,57 @@ > > > > > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > > +/* > > > > > + * Device Tree Source for the RZ/Five SoC > > > > > + * > > > > > + * Copyright (C) 2022 Renesas Electronics Corp. > > > > > + */ > > > > > + > > > > > +#include <dt-bindings/interrupt-controller/irq.h> > > > > > + > > > > > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > > > > > + > > > > > +#include <arm64/renesas/r9a07g043.dtsi> > > > > The initial patch shouldn't be broken. Combine them together with the > > > > minimal components and add others late. Don't separate the DTS files. > > > > > > > r9a07g043.dtsi [0] already exists in the kernel. r9a07g043.dtsi is > > > shared with the RZ/G2UL SoC (ARM64) and the RZ/Five SoC. There are two > > > more patches [1] which are required and are currently queued up in the > > > Renesas tree for v6.2 (Ive mentioned the dependencies in the cover > > > letter). > > > > You could just move the below part to the second dtsi patch. Then > > compile won't be broken. > > > > clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > power-domains = <&cpg>; > > resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > The makefile for this directory is not added until the next patch right? > The compile shouldn't be broken here since it therefore cannot be > compiled? > These nodes are already present in the kernel [0] so the makefile change in the next patch if made here still won't break the compilation alone of SoC DTSI (included in dts). [0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/renesas/r9a07g043.dtsi?h=next-20221028#n563 Cheers, Prabhakar
On Sun, Oct 30, 2022 at 10:27:17PM +0000, Lad, Prabhakar wrote: > Hi Conor, > > > You could just move the below part to the second dtsi patch. Then > > > compile won't be broken. > > > > > > clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > > power-domains = <&cpg>; > > > resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > > > The makefile for this directory is not added until the next patch right? > > The compile shouldn't be broken here since it therefore cannot be > > compiled? > > > These nodes are already present in the kernel [0] so the makefile > change in the next patch if made here still won't break the > compilation alone of SoC DTSI (included in dts). Yeah I know, I did actually build the dtb ;) I was just confused as to how Guo Ren had found a build issue with this patch that the follow on patch would fix, when this dtsi is not buildable in this patch.
On Mon, Oct 31, 2022 at 2:16 AM Conor Dooley <conor@kernel.org> wrote: > > On Sun, Oct 30, 2022 at 08:02:10AM +0800, Guo Ren wrote: > > On Sun, Oct 30, 2022 at 3:11 AM Lad, Prabhakar > > <prabhakar.csengg@gmail.com> wrote: > > > > > > Hi Guo, > > > > > > Thank you for the review. > > > > > > On Sat, Oct 29, 2022 at 5:25 AM Guo Ren <guoren@kernel.org> wrote: > > > > > > > > On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > > > > > > > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > > > > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > > > > > Single). > > > > > > > > > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > > > > > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > > > > > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > > > > > > > > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > > > > > can be used to boot via initramfs on RZ/Five SMARC EVK: > > > > > - AX45MP CPU > > > > > - PLIC > > > > > > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > > > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > --- > > > > > v4 -> v5 > > > > > * Fixed riscv,ndev value (should be 511) > > > > > * Reworked completely (sort of new patch) > > > > > > > > > > v3 -> v4 > > > > > * No change > > > > > > > > > > v2 -> v3 > > > > > * Fixed clock entry for CPU core > > > > > * Fixed timebase frequency to 12MHz > > > > > * Fixed sorting of the nodes > > > > > * Included RB tags > > > > > > > > > > v1 -> v2 > > > > > * Dropped including makefile change > > > > > * Updated ndev count > > > > > --- > > > > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > > > > > 1 file changed, 57 insertions(+) > > > > > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > > > > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > new file mode 100644 > > > > > index 000000000000..50134be548f5 > > > > > --- /dev/null > > > > > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > @@ -0,0 +1,57 @@ > > > > > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > > +/* > > > > > + * Device Tree Source for the RZ/Five SoC > > > > > + * > > > > > + * Copyright (C) 2022 Renesas Electronics Corp. > > > > > + */ > > > > > + > > > > > +#include <dt-bindings/interrupt-controller/irq.h> > > > > > + > > > > > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > > > > > + > > > > > +#include <arm64/renesas/r9a07g043.dtsi> > > > > The initial patch shouldn't be broken. Combine them together with the > > > > minimal components and add others late. Don't separate the DTS files. > > > > > > > r9a07g043.dtsi [0] already exists in the kernel. r9a07g043.dtsi is > > > shared with the RZ/G2UL SoC (ARM64) and the RZ/Five SoC. There are two > > > more patches [1] which are required and are currently queued up in the > > > Renesas tree for v6.2 (Ive mentioned the dependencies in the cover > > > letter). > > > > You could just move the below part to the second dtsi patch. Then > > compile won't be broken. > > > > clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > power-domains = <&cpg>; > > resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > The makefile for this directory is not added until the next patch right? > The compile shouldn't be broken here since it therefore cannot be > compiled? If you put a DTS without a makefile added, it's an unused code in the repo. I still prefer to add them one by one and ensure every patch could be properly compiled. This patch series unnecessarily broke the compilation of the first patches. > > Slightly confused, > Conor. > > > > > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > [1] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20221025220629.79321-1-prabhakar.mahadev-lad.rj@bp.renesas.com/ > > > > > > > > + > > > > > +/ { > > > > > + cpus { > > > > > + #address-cells = <1>; > > > > > + #size-cells = <0>; > > > > > + timebase-frequency = <12000000>; > > > > > + > > > > > + cpu0: cpu@0 { > > > > > + compatible = "andestech,ax45mp", "riscv"; > > > > > + device_type = "cpu"; > > > > > + reg = <0x0>; > > > > > + status = "okay"; > > > > > + riscv,isa = "rv64imafdc"; > > > > > + mmu-type = "riscv,sv39"; > > > > > + i-cache-size = <0x8000>; > > > > > + i-cache-line-size = <0x40>; > > > > > + d-cache-size = <0x8000>; > > > > > + d-cache-line-size = <0x40>; > > > > > + clocks = <&cpg CPG_CORE R9A07G043_CLK_I>; > > > > > + > > > > > + cpu0_intc: interrupt-controller { > > > > > + #interrupt-cells = <1>; > > > > > + compatible = "riscv,cpu-intc"; > > > > > + interrupt-controller; > > > > > + }; > > > > > + }; > > > > > + }; > > > > > +}; > > > > > + > > > > > +&soc { > > > > > + interrupt-parent = <&plic>; > > > > > + > > > > > + plic: interrupt-controller@12c00000 { > > > > > + compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; > > > > > + #interrupt-cells = <2>; > > > > > + #address-cells = <0>; > > > > > + riscv,ndev = <511>; > > > > > + interrupt-controller; > > > > > + reg = <0x0 0x12c00000 0 0x400000>; > > > > > + clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > > > > + power-domains = <&cpg>; > > > > > + resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > > > Ditto, Where is cpg? in r9a07g043.dtsi? > > > > > > > Yes CPG node is in r9a07g043.dtsi. > > > > > > Cheers, > > > Prabhakar > > > > > > > > -- > > Best Regards > > Guo Ren
On Mon, Oct 31, 2022 at 6:27 AM Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote: > > Hi Conor, > > On Sun, Oct 30, 2022 at 6:16 PM Conor Dooley <conor@kernel.org> wrote: > > > > On Sun, Oct 30, 2022 at 08:02:10AM +0800, Guo Ren wrote: > > > On Sun, Oct 30, 2022 at 3:11 AM Lad, Prabhakar > > > <prabhakar.csengg@gmail.com> wrote: > > > > > > > > Hi Guo, > > > > > > > > Thank you for the review. > > > > > > > > On Sat, Oct 29, 2022 at 5:25 AM Guo Ren <guoren@kernel.org> wrote: > > > > > > > > > > On Sat, Oct 29, 2022 at 12:59 AM Prabhakar <prabhakar.csengg@gmail.com> wrote: > > > > > > > > > > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > > > > > > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > > > > > > Single). > > > > > > > > > > > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > > > > > > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > > > > > > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > > > > > > > > > > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > > > > > > can be used to boot via initramfs on RZ/Five SMARC EVK: > > > > > > - AX45MP CPU > > > > > > - PLIC > > > > > > > > > > > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > > > > > > > > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > > > --- > > > > > > v4 -> v5 > > > > > > * Fixed riscv,ndev value (should be 511) > > > > > > * Reworked completely (sort of new patch) > > > > > > > > > > > > v3 -> v4 > > > > > > * No change > > > > > > > > > > > > v2 -> v3 > > > > > > * Fixed clock entry for CPU core > > > > > > * Fixed timebase frequency to 12MHz > > > > > > * Fixed sorting of the nodes > > > > > > * Included RB tags > > > > > > > > > > > > v1 -> v2 > > > > > > * Dropped including makefile change > > > > > > * Updated ndev count > > > > > > --- > > > > > > arch/riscv/boot/dts/renesas/r9a07g043f.dtsi | 57 +++++++++++++++++++++ > > > > > > 1 file changed, 57 insertions(+) > > > > > > create mode 100644 arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > > > > > > > diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > new file mode 100644 > > > > > > index 000000000000..50134be548f5 > > > > > > --- /dev/null > > > > > > +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi > > > > > > @@ -0,0 +1,57 @@ > > > > > > +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > > > > +/* > > > > > > + * Device Tree Source for the RZ/Five SoC > > > > > > + * > > > > > > + * Copyright (C) 2022 Renesas Electronics Corp. > > > > > > + */ > > > > > > + > > > > > > +#include <dt-bindings/interrupt-controller/irq.h> > > > > > > + > > > > > > +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) > > > > > > + > > > > > > +#include <arm64/renesas/r9a07g043.dtsi> > > > > > The initial patch shouldn't be broken. Combine them together with the > > > > > minimal components and add others late. Don't separate the DTS files. > > > > > > > > > r9a07g043.dtsi [0] already exists in the kernel. r9a07g043.dtsi is > > > > shared with the RZ/G2UL SoC (ARM64) and the RZ/Five SoC. There are two > > > > more patches [1] which are required and are currently queued up in the > > > > Renesas tree for v6.2 (Ive mentioned the dependencies in the cover > > > > letter). > > > > > > You could just move the below part to the second dtsi patch. Then > > > compile won't be broken. > > > > > > clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; > > > power-domains = <&cpg>; > > > resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; > > > > The makefile for this directory is not added until the next patch right? > > The compile shouldn't be broken here since it therefore cannot be > > compiled? > > > These nodes are already present in the kernel [0] so the makefile > change in the next patch if made here still won't break the > compilation alone of SoC DTSI (included in dts). Oh... Sorry, I screwed up. The arch/arm64/boot/dts/renesas/r9a07g043.dtsi is not belonged to the patch series. > > [0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/arch/arm64/boot/dts/renesas/r9a07g043.dtsi?h=next-20221028#n563 > > Cheers, > Prabhakar
On Fri, Oct 28, 2022 at 6:59 PM Prabhakar <prabhakar.csengg@gmail.com> wrote: > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Add initial device tree for Renesas RZ/Five RISC-V CPU Core (AX45MP > Single). > > RZ/Five SoC is almost identical to RZ/G2UL Type-1 SoC (ARM64) hence we > will be reusing r9a07g043.dtsi [0] as a base DTSI for both the SoC's. > r9a07g043f.dtsi includes RZ/Five SoC specific blocks. > > Below are the RZ/Five SoC specific blocks added in the initial DTSI which > can be used to boot via initramfs on RZ/Five SMARC EVK: > - AX45MP CPU > - PLIC > > [0] arch/arm64/boot/dts/renesas/r9a07g043.dtsi > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > --- > v4 -> v5 > * Fixed riscv,ndev value (should be 511) > * Reworked completely (sort of new patch) Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
diff --git a/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi new file mode 100644 index 000000000000..50134be548f5 --- /dev/null +++ b/arch/riscv/boot/dts/renesas/r9a07g043f.dtsi @@ -0,0 +1,57 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +/* + * Device Tree Source for the RZ/Five SoC + * + * Copyright (C) 2022 Renesas Electronics Corp. + */ + +#include <dt-bindings/interrupt-controller/irq.h> + +#define SOC_PERIPHERAL_IRQ(nr) (nr + 32) + +#include <arm64/renesas/r9a07g043.dtsi> + +/ { + cpus { + #address-cells = <1>; + #size-cells = <0>; + timebase-frequency = <12000000>; + + cpu0: cpu@0 { + compatible = "andestech,ax45mp", "riscv"; + device_type = "cpu"; + reg = <0x0>; + status = "okay"; + riscv,isa = "rv64imafdc"; + mmu-type = "riscv,sv39"; + i-cache-size = <0x8000>; + i-cache-line-size = <0x40>; + d-cache-size = <0x8000>; + d-cache-line-size = <0x40>; + clocks = <&cpg CPG_CORE R9A07G043_CLK_I>; + + cpu0_intc: interrupt-controller { + #interrupt-cells = <1>; + compatible = "riscv,cpu-intc"; + interrupt-controller; + }; + }; + }; +}; + +&soc { + interrupt-parent = <&plic>; + + plic: interrupt-controller@12c00000 { + compatible = "renesas,r9a07g043-plic", "andestech,nceplic100"; + #interrupt-cells = <2>; + #address-cells = <0>; + riscv,ndev = <511>; + interrupt-controller; + reg = <0x0 0x12c00000 0 0x400000>; + clocks = <&cpg CPG_MOD R9A07G043_NCEPLIC_ACLK>; + power-domains = <&cpg>; + resets = <&cpg R9A07G043_NCEPLIC_ARESETN>; + interrupts-extended = <&cpu0_intc 11 &cpu0_intc 9>; + }; +};