Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp609728lqo; Fri, 10 May 2024 09:15:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVBe0/mlePjbsOD7bDH8PC4XrUtPHTU9vk+v4C9RLsvO3TyJnbmKuI1jA49uFXFLHiC7SNjHt4h2ua3wxtNIuNJSd5LRhKqCFnxds/JOw== X-Google-Smtp-Source: AGHT+IEYcc0EMtYaGOE6BAI1V4mu1d6suKKe67xctMPFYlY5iVPWjS/QVvpkQIAkQaePPZrgY6J5 X-Received: by 2002:ac2:5495:0:b0:51d:9f10:71b7 with SMTP id 2adb3069b0e04-5220fd7ce6dmr2272106e87.28.1715357708071; Fri, 10 May 2024 09:15:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715357708; cv=pass; d=google.com; s=arc-20160816; b=riRdhwB2iOuss0lnK38cidRDc1xIv2hjfp3s2lPVw6ucZfVZjj9zCMu18ou1VMSGga COAj56PXloBttVEcosj2crCcQChi2/PgtCT1JpzDC2gM1spnJD/zERg1Kuxp1bollIqG 7IQQgaSksefdmbysW2WaOrLtZ8PbKY8S1ku17pjIbzAWRaOYZ485PCoE339B3RK9FuSP pxMs3uYHnA6c4j2o+qzInDRpG0uq7vQ8OCYQn4Ch+aaKxm8t2cc3GjKlcBMXSZ5f2/y7 AlAdefaQJ8m/DC9Co616z6fWszaZOQAGsuEQIDgaqilq4NUkG0lsEvkTKS/Q6Mciqpt8 pVeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:autocrypt:from:references:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=XhK8gmeXNnQQ9F6mHYKNiwNqOgqSdBZ3wdm0t8Mec/s=; fh=irYDgY+yUG6zfQdK+JBioGvxR6aUVThSayzmlbZwrTs=; b=q29DL/ja/tpg56zD6oFZeA4tMD4aL1VKPYwGB3wJQuSYewNYaif78/3Nld4Rf5epfX UNlkef6nljSW9RDdIF3kOvkn9sklNXn9bUDG/tI5hQ9gANgdWNJiFD7oeB8aLyCvri9h tPc4OVZf+FHpfRcmiWSFmeKd+WTL3Tq6wrmPXZ9ZJIRhpGj1HQufdq2H0FDBZ53V49NF ujuFt8/frRS9W+8it5Bv5YkLpHri17UuSjcIWMQiiPN0nrH99lI0ckZB+AObVSWPJINN gfUoyLD4RQfquryYr9Ozv+eFBDLoand3paFMjoRh4qm/VQSJL1ZzI5FoZQzN5UGjE8+K b1KA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=fDIPeXCu; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-176000-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176000-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17c2cc3dsi213628266b.999.2024.05.10.09.15.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 09:15:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176000-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=fDIPeXCu; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-176000-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176000-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9AD741F22DF5 for ; Fri, 10 May 2024 16:15:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AA17172BAA; Fri, 10 May 2024 16:15:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="fDIPeXCu" Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55B0E172795 for ; Fri, 10 May 2024 16:14:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715357698; cv=none; b=gjPuXNgNt9DpGTi2EULFeXwXqWc7fsl3d8ZUxTqThj11FSiJf7ytjdx+DYRo9wg+YZ9Qg4u0U1CQA2U2ZOXuYvCD5JskurGbr7EC+OpzRfO4DsOPesEGD6MoOL9hQZf3Ht/KlmR4OaFJbxm4NndNmSAqgEzBLGSqVZyBUD4Xlk8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715357698; c=relaxed/simple; bh=zTIUdIfV/N/y35U1pZyMFVVA0cl+BsJ+303/9BJBxA4=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=ZdY6SlnJm5Os2IS7wR1nM2apmObEEaxUMXzNpEecw5weU0ro+dgqKHD8sgRj5KDQij8KOQe9MLN74ZkHR6ewzXV5tolp0DYxkS4ooajwtIhhCSK4S9xMnL7c8mV4q2gmZ67mzVrnut0qesFDbNYE69HMwG6rdZ5b1fFMcV28rk0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=fDIPeXCu; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6f4178aec15so1975809b3a.0 for ; Fri, 10 May 2024 09:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1715357695; x=1715962495; darn=vger.kernel.org; h=in-reply-to:autocrypt:from:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=XhK8gmeXNnQQ9F6mHYKNiwNqOgqSdBZ3wdm0t8Mec/s=; b=fDIPeXCu1jrEzBtrqBRZ/n5AMGNLetonaVtNR8FrPaRyBsPVmybJOcoNswtO+RDtss K73hwbkcB3G9LDdaWxtaatO+t6bX5T0hQ7wnNTWQS1Vt0zPvzq7xo7eDg3qy3e6ywTxZ vIqLB2N4U3wPXiujfMRol1/ATXZtwf46b1u/c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715357695; x=1715962495; h=in-reply-to:autocrypt:from:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=XhK8gmeXNnQQ9F6mHYKNiwNqOgqSdBZ3wdm0t8Mec/s=; b=DsFxkp52hUsMEifswsFtNBqse7IWsutN1jAcse2WNhfcXW6OaZDvLnWc1i1CJFfxNc w39qAJf0LVw3JUQp4tCtH907NsgaLAeMyi7vhvQfFgMkbiNdHKqvZRbHlgRiUbeyZ026 klhDsb/cv182vl5lCygGtsb5Y41mm5GldhLCpLzEeUqVz7uZeFD0j8x5UA7iUpvDo9dS sugQ4fenpN0qvHQMEZ8ZlLi5UFc7H8EnWsOCQ4oLAFQnXal7qiVwFOk2Z5MRZao1uJ0B bIDn26A9dzQuequ2v6pyfrcj9t/TeoNPnhpgQydubwq7MAWLHTIOMwJxvDk86qytDoF0 k/kA== X-Forwarded-Encrypted: i=1; AJvYcCVWcpGAohTS27pSvZ5EX5ooDtVsJdpVxgcn0rEDE+o1SAzlrhJfTA3m9BoXLSqGk2zFqs1/MJIJwEqaFBNWri0GzcaVhM4/5hx1lE2V X-Gm-Message-State: AOJu0Ywr/dHJkdpwXZL1G46ys86gQK0MVvQrBMPvbwoYHY5FTcT05oAM QCZN4Vw9LFH+RX9nZjSw7DZfyh0rLNoRguIW/QG4QTswe+0EEajyhQoMmUl1Rg== X-Received: by 2002:a05:6a21:614:b0:1af:63f0:b416 with SMTP id adf61e73a8af0-1afde0e6381mr3142724637.15.1715357695365; Fri, 10 May 2024 09:14:55 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-6340b862567sm2836782a12.29.2024.05.10.09.14.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 May 2024 09:14:53 -0700 (PDT) Message-ID: <786bbf35-e9fe-445c-b6f9-21119e60fb34@broadcom.com> Date: Fri, 10 May 2024 09:14:50 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 4/4] arm64: dts: broadcom: Add support for BCM2712 To: Andrea della Porta , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ray Jui , Scott Branden , Broadcom internal kernel review list , Ulf Hansson , Adrian Hunter , Kamal Dasu , Al Cooper , Eric Anholt , Stefan Wahren , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org References: <59a3015c3a6f2f0b70a38c030274a163773e7757.1715332922.git.andrea.porta@suse.com> From: Florian Fainelli Autocrypt: addr=florian.fainelli@broadcom.com; keydata= xsBNBFPAG8ABCAC3EO02urEwipgbUNJ1r6oI2Vr/+uE389lSEShN2PmL3MVnzhViSAtrYxeT M0Txqn1tOWoIc4QUl6Ggqf5KP6FoRkCrgMMTnUAINsINYXK+3OLe7HjP10h2jDRX4Ajs4Ghs JrZOBru6rH0YrgAhr6O5gG7NE1jhly+EsOa2MpwOiXO4DE/YKZGuVe6Bh87WqmILs9KvnNrQ PcycQnYKTVpqE95d4M824M5cuRB6D1GrYovCsjA9uxo22kPdOoQRAu5gBBn3AdtALFyQj9DQ KQuc39/i/Kt6XLZ/RsBc6qLs+p+JnEuPJngTSfWvzGjpx0nkwCMi4yBb+xk7Hki4kEslABEB AAHNMEZsb3JpYW4gRmFpbmVsbGkgPGZsb3JpYW4uZmFpbmVsbGlAYnJvYWRjb20uY29tPsLB IQQQAQgAywUCZWl41AUJI+Jo+hcKAAG/SMv+fS3xUQWa0NryPuoRGjsA3SAUAAAAAAAWAAFr ZXktdXNhZ2UtbWFza0BwZ3AuY29tjDAUgAAAAAAgAAdwcmVmZXJyZWQtZW1haWwtZW5jb2Rp bmdAcGdwLmNvbXBncG1pbWUICwkIBwMCAQoFF4AAAAAZGGxkYXA6Ly9rZXlzLmJyb2FkY29t Lm5ldAUbAwAAAAMWAgEFHgEAAAAEFQgJChYhBNXZKpfnkVze1+R8aIExtcQpvGagAAoJEIEx tcQpvGagWPEH/2l0DNr9QkTwJUxOoP9wgHfmVhqc0ZlDsBFv91I3BbhGKI5UATbipKNqG13Z TsB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oJEIExtcQpvGagugcIAJd5 EYe6KM6Y6RvI6TvHp+QgbU5dxvjqSiSvam0Ms3QrLidCtantcGT2Wz/2PlbZqkoJxMQc40rb fXa4xQSvJYj0GWpadrDJUvUu3LEsunDCxdWrmbmwGRKqZraV2oG7YEddmDqOe0Xm/NxeSobc MIlnaE6V0U8f5zNHB7Y46yJjjYT/Ds1TJo3pvwevDWPvv6rdBeV07D9s43frUS6xYd1uFxHC 7dZYWJjZmyUf5evr1W1gCgwLXG0PEi9n3qmz1lelQ8lSocmvxBKtMbX/OKhAfuP/iIwnTsww 95A2SaPiQZA51NywV8OFgsN0ITl2PlZ4Tp9hHERDe6nQCsNI/Us= In-Reply-To: <59a3015c3a6f2f0b70a38c030274a163773e7757.1715332922.git.andrea.porta@suse.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="00000000000020b88906181bd6c4" --00000000000020b88906181bd6c4 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/10/24 07:35, Andrea della Porta wrote: > The BCM2712 SoC family can be found on Raspberry Pi 5. > Add minimal SoC and board (Rpi5 specific) dts file to be able to > boot from SD card and use console on debug UART. > > Signed-off-by: Andrea della Porta > --- > arch/arm64/boot/dts/broadcom/Makefile | 1 + > .../boot/dts/broadcom/bcm2712-rpi-5-b.dts | 62 ++++ > arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 302 ++++++++++++++++++ > 3 files changed, 365 insertions(+) > create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts > create mode 100644 arch/arm64/boot/dts/broadcom/bcm2712.dtsi > > diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile > index 8b4591ddd27c..92565e9781ad 100644 > --- a/arch/arm64/boot/dts/broadcom/Makefile > +++ b/arch/arm64/boot/dts/broadcom/Makefile > @@ -6,6 +6,7 @@ DTC_FLAGS := -@ > dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \ > bcm2711-rpi-4-b.dtb \ > bcm2711-rpi-cm4-io.dtb \ > + bcm2712-rpi-5-b.dtb \ > bcm2837-rpi-3-a-plus.dtb \ > bcm2837-rpi-3-b.dtb \ > bcm2837-rpi-3-b-plus.dtb \ > diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts > new file mode 100644 > index 000000000000..b5921437e09f > --- /dev/null > +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts > @@ -0,0 +1,62 @@ > +// SPDX-License-Identifier: GPL-2.0 New DTS files should be under GPL-2.0-or-MIT AFAICT. > +/dts-v1/; > + > +#include > +#include "bcm2712.dtsi" > + > +/ { > + compatible = "raspberrypi,5-model-b", "brcm,bcm2712"; > + model = "Raspberry Pi 5"; > + > + aliases { > + serial10 = &uart0; > + }; > + > + chosen: chosen { > + stdout-path = "serial10:115200n8"; > + }; > + > + /* Will be filled by the bootloader */ > + memory@0 { > + device_type = "memory"; > + reg = <0 0 0x28000000>; That should be a 4 cell member, see my comment on bcm2712.dtsi. > + }; > + > + sd_io_1v8_reg: sd-io-1v8-reg { > + compatible = "regulator-gpio"; > + regulator-name = "vdd-sd-io"; > + regulator-min-microvolt = <1800000>; > + regulator-max-microvolt = <3300000>; > + regulator-boot-on; > + regulator-always-on; > + regulator-settling-time-us = <5000>; > + gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>; > + states = <1800000 0x1>, > + <3300000 0x0>; Can we use decimal for the second cell as well? > + }; > + > + sd_vcc_reg: sd-vcc-reg { > + compatible = "regulator-fixed"; > + regulator-name = "vcc-sd"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + regulator-boot-on; > + enable-active-high; > + gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>; > + }; > +}; > + > +/* The system UART */ > +&uart0 { > + status = "okay"; > +}; > + > +/* SDIO1 is used to drive the SD card */ > +&sdio1 { > + vqmmc-supply = <&sd_io_1v8_reg>; > + vmmc-supply = <&sd_vcc_reg>; > + bus-width = <4>; > + sd-uhs-sdr50; > + sd-uhs-ddr50; > + sd-uhs-sdr104; > +}; > diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi > new file mode 100644 > index 000000000000..398df13148bd > --- /dev/null > +++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi > @@ -0,0 +1,302 @@ > +// SPDX-License-Identifier: GPL-2.0 > +#include > + > +/ { > + compatible = "brcm,bcm2712"; > + > + #address-cells = <2>; > + #size-cells = <1>; This should be #size-cells = <2> to be future proof and support over 4GB of DRAM, because the DDR controller and the memory map on that chip have been designed with that requirement. > + > + interrupt-parent = <&gicv2>; > + > + axi: axi { > + compatible = "simple-bus"; > + #address-cells = <2>; > + #size-cells = <1>; > + ranges; The AXI peripheral window should be defined in the ranges property. The aperture is from 0x10_0000_0000 to 0x10_3FFF_FFFF. From that point on you can define all peripherals under the axi node to be relative to that axi aperture, just like what you did for the legacy Pi peripherals in the subsequent bus node. > + > + sdio1: mmc@1000fff000 { > + compatible = "brcm,bcm2712-sdhci", > + "brcm,sdhci-brcmstb"; > + reg = <0x10 0x00fff000 0x260>, > + <0x10 0x00fff400 0x200>; > + reg-names = "host", "cfg"; > + interrupts = ; > + clocks = <&clk_emmc2>; > + clock-names = "sw_sdio"; > + mmc-ddr-3_3v; > + }; > + > + gicv2: interrupt-controller@107fff9000 { > + interrupt-controller; > + #interrupt-cells = <3>; > + compatible = "arm,gic-400"; > + reg = <0x10 0x7fff9000 0x1000>, > + <0x10 0x7fffa000 0x2000>, > + <0x10 0x7fffc000 0x2000>, > + <0x10 0x7fffe000 0x2000>; > + interrupts = + IRQ_TYPE_LEVEL_HIGH)>; I would omit this interrupt property, because it is not clear to me whether the VGIC maintenance interrupt has actually been wired up. > + }; > + }; > + > + clocks { > + /* The oscillator is the root of the clock tree. */ > + clk_osc: clk-osc { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-output-names = "osc"; > + clock-frequency = <54000000>; > + }; > + > + clk_vpu: clk-vpu { > + #clock-cells = <0>; > + compatible = "fixed-clock"; > + clock-frequency = <750000000>; > + clock-output-names = "vpu-clock"; > + }; > + > + clk_uart: clk-uart { > + #clock-cells = <0>; > + compatible = "fixed-clock"; > + clock-frequency = <9216000>; > + clock-output-names = "uart-clock"; > + }; > + > + clk_emmc2: clk-emmc2 { > + #clock-cells = <0>; > + compatible = "fixed-clock"; > + clock-frequency = <200000000>; > + clock-output-names = "emmc2-clock"; > + }; > + }; > + > + cpus: cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + > + /* Source for d/i cache-line-size, cache-sets, cache-size > + * https://developer.arm.com/documentation/100798/0401 > + * /L1-memory-system/About-the-L1-memory-system?lang=en > + */ > + cpu0: cpu@0 { > + device_type = "cpu"; > + compatible = "arm,cortex-a76"; > + reg = <0x000>; > + enable-method = "psci"; > + d-cache-size = <0x10000>; > + d-cache-line-size = <64>; > + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + i-cache-size = <0x10000>; > + i-cache-line-size = <64>; > + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + next-level-cache = <&l2_cache_l0>; > + }; > + > + cpu1: cpu@1 { > + device_type = "cpu"; > + compatible = "arm,cortex-a76"; > + reg = <0x100>; > + enable-method = "psci"; > + d-cache-size = <0x10000>; > + d-cache-line-size = <64>; > + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + i-cache-size = <0x10000>; > + i-cache-line-size = <64>; > + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + next-level-cache = <&l2_cache_l1>; > + }; > + > + cpu2: cpu@2 { > + device_type = "cpu"; > + compatible = "arm,cortex-a76"; > + reg = <0x200>; > + enable-method = "psci"; > + d-cache-size = <0x10000>; > + d-cache-line-size = <64>; > + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + i-cache-size = <0x10000>; > + i-cache-line-size = <64>; > + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + next-level-cache = <&l2_cache_l2>; > + }; > + > + cpu3: cpu@3 { > + device_type = "cpu"; > + compatible = "arm,cortex-a76"; > + reg = <0x300>; > + enable-method = "psci"; > + d-cache-size = <0x10000>; > + d-cache-line-size = <64>; > + d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + i-cache-size = <0x10000>; > + i-cache-line-size = <64>; > + i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set > + next-level-cache = <&l2_cache_l3>; > + }; > + > + /* Source for cache-line-size and cache-sets: > + * https://developer.arm.com/documentation/100798/0401 > + * /L2-memory-system/About-the-L2-memory-system?lang=en > + * and for cache-size: > + * https://www.raspberrypi.com/documentation/computers > + * /processors.html#bcm2712 > + */ > + l2_cache_l0: l2-cache-l0 { > + compatible = "cache"; > + cache-size = <0x80000>; > + cache-line-size = <128>; > + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set > + cache-level = <2>; > + cache-unified; > + next-level-cache = <&l3_cache>; > + }; Since each of these L2 caches are per-CPU core, they should be under their respective CPU node. This is what I did for the BCM2712 sister chip, and it looks like this: cpu@0 { operating-points = <0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0>; d-cache-sets = <0x100>; d-cache-line-size = <0x40>; d-cache-size = <0x10000>; i-cache-sets = <0x100>; i-cache-line-size = <0x40>; i-cache-size = <0x10000>; clock-frequency = <0x95aad1c0>; device_type = "cpu"; enable-method = "psci"; compatible = "arm,cortex-a76"; reg = <0x0 0x0>; next-level-cache = <0x2>; cpu-idle-states = <0x3>; clocks = <0x4 0x0>; clock-names = "cpu"; phandle = <0x9>; cache-controller-0 { cache-sets = <0x400>; cache-line-size = <0x40>; cache-size = <0x80000>; compatible = "cache"; cache-unified; cache-level = <0x2>; next-level-cache = <0x5>; phandle = <0x2>; }; }; Also, the values are actually populated by the boot loader from reading the CLIDR registers, and they yield the same results as yours, so this part looks good to me. We should consider decimal numbers however for a source level Device Tree (the output I provided is rendered via libfdt). > + > + l2_cache_l1: l2-cache-l1 { > + compatible = "cache"; > + cache-size = <0x80000>; > + cache-line-size = <128>; > + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set > + cache-level = <2>; > + cache-unified; > + next-level-cache = <&l3_cache>; > + }; > + > + l2_cache_l2: l2-cache-l2 { > + compatible = "cache"; > + cache-size = <0x80000>; > + cache-line-size = <128>; > + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set > + cache-level = <2>; > + cache-unified; > + next-level-cache = <&l3_cache>; > + }; > + > + l2_cache_l3: l2-cache-l3 { > + compatible = "cache"; > + cache-size = <0x80000>; > + cache-line-size = <128>; > + cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set > + cache-level = <2>; > + cache-unified; > + next-level-cache = <&l3_cache>; > + }; > + > + /* Source for cache-line-size and cache-sets: > + * https://developer.arm.com/documentation/100453/0401/L3-cache?lang=en > + * Source for cache-size: > + * https://www.raspberrypi.com/documentation/computers/processors.html#bcm2712 > + */ > + l3_cache: l3-cache { > + compatible = "cache"; > + cache-size = <0x200000>; > + cache-line-size = <64>; > + cache-sets = <2048>; // 2MiB(size)/64(line-size)=32768ways/16-way set > + cache-level = <3>; > + cache-unified; > + }; > + }; > + > + psci { > + method = "smc"; > + compatible = "arm,psci-1.0", "arm,psci-0.2", "arm,psci"; > + cpu_on = <0xc4000003>; > + cpu_suspend = <0xc4000001>; > + cpu_off = <0x84000002>; > + }; > + > + rmem: reserved-memory { > + #address-cells = <2>; > + #size-cells = <1>; > + ranges; > + > + atf@0 { > + reg = <0x0 0x0 0x80000>; > + no-map; > + }; > + > + cma: linux,cma { > + compatible = "shared-dma-pool"; > + size = <0x4000000>; /* 64MB */ > + reusable; > + linux,cma-default; > + alloc-ranges = <0x0 0x00000000 0x40000000>; > + }; > + }; > + > + soc: soc@107c000000 { > + compatible = "simple-bus"; > + #address-cells = <1>; > + #size-cells = <1>; > + > + ranges = <0x7c000000 0x10 0x7c000000 0x04000000>; > + /* Emulate a contiguous 30-bit address range for DMA */ > + dma-ranges = <0xc0000000 0x00 0x00000000 0x40000000>, > + <0x7c000000 0x10 0x7c000000 0x04000000>; > + > + system_timer: timer@7c003000 { > + compatible = "brcm,bcm2835-system-timer"; > + reg = <0x7c003000 0x1000>; > + interrupts = , > + , > + , > + ; > + clock-frequency = <1000000>; > + }; > + > + mailbox: mailbox@7c013880 { > + compatible = "brcm,bcm2835-mbox"; > + reg = <0x7c013880 0x40>; > + interrupts = ; > + #mbox-cells = <0>; > + }; > + > + local_intc: local-intc@7cd00000 { > + compatible = "brcm,bcm2836-l1-intc"; > + reg = <0x7cd00000 0x100>; > + }; > + > + uart0: serial@7d001000 { > + compatible = "arm,pl011", "arm,primecell"; > + reg = <0x7d001000 0x200>; > + interrupts = ; > + clocks = <&clk_uart>, <&clk_vpu>; > + clock-names = "uartclk", "apb_pclk"; > + arm,primecell-periphid = <0x00241011>; > + status = "disabled"; > + }; > + > + interrupt-controller@7d517000 { > + compatible = "brcm,bcm7271-l2-intc"; > + reg = <0x7d517000 0x10>; > + interrupts = ; > + interrupt-controller; > + #interrupt-cells = <1>; > + status = "disabled"; > + }; I see no reason for an interrupt controller to be disabled by default, if the interrupts are not used, we are not going to be consuming resources. > + > + gio_aon: gpio@7d517c00 { > + compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio"; > + reg = <0x7d517c00 0x40>; > + gpio-controller; > + #gpio-cells = <2>; > + // Don't use GIO_AON as an interrupt controller because it will > + // clash with the firmware monitoring the PMIC interrupt via the VPU. > + brcm,gpio-bank-widths = <17 6>; > + }; > + }; > + > + timer { > + compatible = "arm,armv8-timer"; > + interrupts = + IRQ_TYPE_LEVEL_LOW)>, > + + IRQ_TYPE_LEVEL_LOW)>, > + + IRQ_TYPE_LEVEL_LOW)>, > + + IRQ_TYPE_LEVEL_LOW)>; > + /* This only applies to the ARMv7 stub */ > + arm,cpu-registers-not-fw-configured; And the A76 cannot boot an AArch32 kernel at EL1, is that comment still relevant? It looks like there is an ARM trusted reserved region, can we assume that it will have done the configuration properly? -- Florian --00000000000020b88906181bd6c4 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQeQYJKoZIhvcNAQcCoIIQajCCEGYCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3QMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPBQBwrA5+20Wxlk6k1 e6EKaaNaNZUy30q3ArEf30ZDpXyfCtiXnupjSK8WU2cK4qsEtj09JS4+mhi0CTCrCnXAzum3tgcH cHRg0prcSzzEUDQWo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