Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp965355pxb; Fri, 22 Apr 2022 15:29:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT9W3WeR4vCNDhzMUO2trCZquEZTeZt4F8KXwN0duVXdSwMfWHGfluukEGZ+khKm2WT8MY X-Received: by 2002:a63:5:0:b0:3aa:efca:fd24 with SMTP id 5-20020a630005000000b003aaefcafd24mr943580pga.486.1650666553156; Fri, 22 Apr 2022 15:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650666553; cv=none; d=google.com; s=arc-20160816; b=DgLcX4P8dBAqI2fY59TWUspNTOBV1JIZRparfd70DH8uqymj3e11Vjp9nVn6rvirmn /c8GI5U7uTZwBb4ORbR9apsEhX0TXG/J4GnSgTdw6c06y70xcFbG2UQ4G4GWk3r4qqlx biYbqAELR6Z1VQEcAilNr1+FD7Bio4VGIjXCLaluG/DFGw2evQ1MWVy70Ug/PYTXnfGS PZIW4FAY68kM/TsRbPI66IC/dQdtuuhFKglMcxArQSi+xjU01FmnDWdT4vOIGddizXnm Yzs/cDR5LVEALSqO9JFsLEDtgfrkfEQKNIul3b7XbyVTBCan44aWHgHN/DXnhvltHcY7 fnPQ== 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; bh=aqjkGtj7/DW9dNdytduHIQLHCn1jbSwSxOIbX8/141g=; b=DQFLL4YRRQ+uebAwkXDbFb+SQF8ZnQ2PqL9nk1decOxcCp9YLr6fbRlmmFXVerDEPl JSxiDDv6Vpcit7y0LKbuUbay+1Jq+azlk62fYFDc2G/rtpI1CV2Btx61BSE+iLYBbFAV 67eE6wvYd1tYp+GFNy2smhUhH9aArERHda4KASItAp+/ktjJQgghkxpbZqFvtqvWF4Ae 0EUVw/kShPV8VzxrKTr5U2EPSMDL8OK5EeNesZzxC234mCxCI2gy+8/NLgkwBYvzfa4d EqtAFUqe9EdpsTWvxMaeUjHtLyqy3axMRto80S87I4h6NAD3RTovBNdmvVcc3bIQVNYL amEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n13-20020a170903110d00b00153b2d16415si10165889plh.29.2022.04.22.15.29.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 15:29:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C618B29D277; Fri, 22 Apr 2022 13:36:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231225AbiDVS27 (ORCPT + 99 others); Fri, 22 Apr 2022 14:28:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbiDVS2l (ORCPT ); Fri, 22 Apr 2022 14:28:41 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2FAEA8167D; Fri, 22 Apr 2022 11:25:46 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0CE041FB; Fri, 22 Apr 2022 11:16:23 -0700 (PDT) Received: from [10.57.80.98] (unknown [10.57.80.98]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 362863F73B; Fri, 22 Apr 2022 11:16:19 -0700 (PDT) Message-ID: <36551341-60f5-8b61-59d1-176ece8204d6@arm.com> Date: Fri, 22 Apr 2022 19:16:13 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCHv1 18/19] arm64: dts: rockchip: Add base DT for rk3588 SoC Content-Language: en-GB To: Sebastian Reichel , Heiko Stuebner Cc: Rob Herring , Krzysztof Kozlowski , Linus Walleij , Bartosz Golaszewski , Adrian Hunter , Ulf Hansson , Philipp Zabel , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-mmc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@lists.collabora.co.uk, Kever Yang , kernel@collabora.com, Yifeng Zhao , Elaine Zhang , Sugar Zhang References: <20220422170920.401914-1-sebastian.reichel@collabora.com> <20220422170920.401914-19-sebastian.reichel@collabora.com> From: Robin Murphy In-Reply-To: <20220422170920.401914-19-sebastian.reichel@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 2022-04-22 18:09, Sebastian Reichel wrote: > From: Kever Yang > > This initial version supports (single core) CPU, dma, interrupts, timers, > UART and SDHCI. In short - everything necessary to boot Linux on this > system on chip. > > The DT is split into rk3588 and rk3588s, which is a reduced version > (i.e. with less peripherals) of the former. > > Signed-off-by: Yifeng Zhao > Signed-off-by: Elaine Zhang > Signed-off-by: Sugar Zhang > Signed-off-by: Kever Yang > [rebase, squash and reword commit message] > Signed-off-by: Sebastian Reichel > --- > arch/arm64/boot/dts/rockchip/rk3588.dtsi | 6 + > arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 501 ++++++++++++++++++++++ > include/dt-bindings/clock/rk3588-cru.h | 1 + > 3 files changed, 508 insertions(+) > create mode 100644 arch/arm64/boot/dts/rockchip/rk3588.dtsi > create mode 100644 arch/arm64/boot/dts/rockchip/rk3588s.dtsi > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588.dtsi b/arch/arm64/boot/dts/rockchip/rk3588.dtsi > new file mode 100644 > index 000000000000..ddb3ccff1299 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3588.dtsi > @@ -0,0 +1,6 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2021 Rockchip Electronics Co., Ltd. > + */ > + > +#include "rk3588s.dtsi" > diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > new file mode 100644 > index 000000000000..f7d3ad4384b3 > --- /dev/null > +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi > @@ -0,0 +1,501 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2021 Rockchip Electronics Co., Ltd. > + */ > + > +#include > +#include > +#include > + > +/ { > + compatible = "rockchip,rk3588"; > + > + interrupt-parent = <&gic>; > + #address-cells = <2>; > + #size-cells = <2>; > + > + aliases { > + serial0 = &uart0; > + serial1 = &uart1; > + serial2 = &uart2; > + serial3 = &uart3; > + serial4 = &uart4; > + serial5 = &uart5; > + serial6 = &uart6; > + serial7 = &uart7; > + serial8 = &uart8; > + serial9 = &uart9; > + }; > + > + clocks { > + compatible = "simple-bus"; > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; I'm pretty sure that doing clocks as fake buses fell out of favour long ago. > + > + spll: spll { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <702000000>; > + clock-output-names = "spll"; > + }; > + > + xin24m: xin24m { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <24000000>; > + clock-output-names = "xin24m"; > + }; > + > + xin32k: xin32k { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <32768>; > + clock-output-names = "xin32k"; > + }; Do those two really belong in the SoC DTSI? On previous SoCs they're typically external inputs, and while the 24MHz is usually a crystal which can be largely taken for granted, the 32KHz is often provided by an RTC chip or similar which might need proper modelling. > + }; > + > + cpus { > + #address-cells = <1>; > + #size-cells = <0>; > + > + cpu-map { > + cluster0 { > + core0 { > + cpu = <&cpu_l0>; > + }; > + }; > + }; > + > + cpu_l0: cpu@0 { > + device_type = "cpu"; > + compatible = "arm,cortex-a55"; > + reg = <0x0>; > + enable-method = "psci"; > + capacity-dmips-mhz = <530>; > + clocks = <&scmi_clk SCMI_CLK_CPUL>; > + i-cache-size = <32768>; > + i-cache-line-size = <64>; > + i-cache-sets = <128>; > + d-cache-size = <32768>; > + d-cache-line-size = <64>; > + d-cache-sets = <128>; > + next-level-cache = <&l2_cache_l0>; > + #cooling-cells = <2>; > + dynamic-power-coefficient = <228>; > + }; Is there any particular reason for not including more of the CPUs? > + > + l2_cache_l0: l2-cache-l0 { > + compatible = "cache"; > + cache-size = <131072>; > + cache-line-size = <64>; > + cache-sets = <512>; > + next-level-cache = <&l3_cache>; > + }; > + > + l3_cache: l3-cache { > + compatible = "cache"; > + cache-size = <3145728>; > + cache-line-size = <64>; > + cache-sets = <4096>; > + }; > + }; > + > + arm-pmu { > + compatible = "arm,armv8-pmuv3"; Please use the correct Cortex-A55 compatible. > + interrupts = ; > + interrupt-affinity = <&cpu_l0>; Is affinity meaningful for a single CPU? If this is going to need to be a partitioned PPI once the Cortex-A76 PMU shows up as well, start as you mean to go on. > + }; > + > + firmware { > + optee: optee { > + compatible = "linaro,optee-tz"; > + method = "smc"; > + }; > + > + scmi: scmi { > + compatible = "arm,scmi-smc"; > + shmem = <&scmi_shmem>; > + arm,smc-id = <0x82000010>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + scmi_clk: protocol@14 { > + reg = <0x14>; > + #clock-cells = <1>; > + > + assigned-clocks = <&scmi_clk SCMI_SPLL>; > + assigned-clock-rates = <700000000>; > + }; > + > + scmi_reset: protocol@16 { > + reg = <0x16>; > + #reset-cells = <1>; > + }; > + }; > + > + sdei: sdei { > + compatible = "arm,sdei-1.0"; > + method = "smc"; > + }; > + }; > + > + psci { > + compatible = "arm,psci-1.0"; > + method = "smc"; > + }; > + > + timer { > + compatible = "arm,armv8-timer"; > + interrupts = , > + , > + , > + ; A mask representing all 4 of one (of 8) CPUs, for a GICv2 which we don't have? I doubt it ;) > + }; > + > + sram@10f000 { > + compatible = "mmio-sram"; > + reg = <0x0 0x0010f000 0x0 0x100>; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x0 0x0010f000 0x100>; > + > + scmi_shmem: sram@0 { > + compatible = "arm,scmi-shmem"; > + reg = <0x0 0x100>; > + }; > + }; > + > + php_grf: syscon@fd5b0000 { > + compatible = "rockchip,rk3588-php-grf", "syscon"; > + reg = <0x0 0xfd5b0000 0x0 0x1000>; > + }; > + > + ioc: syscon@fd5f0000 { > + compatible = "rockchip,rk3588-ioc", "syscon"; > + reg = <0x0 0xfd5f0000 0x0 0x10000>; > + }; > + > + syssram: sram@fd600000 { > + compatible = "mmio-sram"; > + reg = <0x0 0xfd600000 0x0 0x100000>; > + > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0x0 0x0 0xfd600000 0x100000>; > + }; > + > + cru: clock-controller@fd7c0000 { > + compatible = "rockchip,rk3588-cru"; > + rockchip,grf = <&php_grf>; > + reg = <0x0 0xfd7c0000 0x0 0x5c000>; > + #clock-cells = <1>; > + #reset-cells = <1>; > + > + assigned-clocks = > + <&cru PLL_PPLL>, <&cru PLL_AUPLL>, > + <&cru PLL_NPLL>, <&cru PLL_GPLL>, > + <&cru ACLK_CENTER_ROOT>, > + <&cru HCLK_CENTER_ROOT>, <&cru ACLK_CENTER_LOW_ROOT>, > + <&cru ACLK_TOP_ROOT>, <&cru PCLK_TOP_ROOT>, > + <&cru ACLK_LOW_TOP_ROOT>, <&cru PCLK_PMU0_ROOT>, > + <&cru HCLK_PMU_CM0_ROOT>, <&cru ACLK_VOP>, > + <&cru ACLK_BUS_ROOT>, <&cru CLK_150M_SRC>, > + <&cru CLK_GPU>; > + assigned-clock-rates = > + <100000000>, <786432000>, > + <850000000>, <1188000000>, > + <702000000>, > + <400000000>, <500000000>, > + <800000000>, <100000000>, > + <400000000>, <100000000>, > + <200000000>, <500000000>, > + <375000000>, <150000000>, > + <200000000>; > + }; > + > + sdhci: mmc@fe2e0000 { > + compatible = "rockchip,rk3588-dwcmshc", "snps,dwcmshc-sdhci"; > + reg = <0x0 0xfe2e0000 0x0 0x10000>; > + interrupts = ; > + assigned-clocks = <&cru BCLK_EMMC>, <&cru TMCLK_EMMC>, <&cru CCLK_EMMC>; > + assigned-clock-rates = <200000000>, <24000000>, <200000000>; > + clocks = <&cru CCLK_EMMC>, <&cru HCLK_EMMC>, > + <&cru ACLK_EMMC>, <&cru BCLK_EMMC>, > + <&cru TMCLK_EMMC>; > + clock-names = "core", "bus", "axi", "block", "timer"; > + resets = <&cru SRST_C_EMMC>, <&cru SRST_H_EMMC>, > + <&cru SRST_A_EMMC>, <&cru SRST_B_EMMC>, > + <&cru SRST_T_EMMC>; > + reset-names = "core", "bus", "axi", "block", "timer"; > + max-frequency = <200000000>; > + status = "disabled"; > + }; > + > + gic: interrupt-controller@fe600000 { > + compatible = "arm,gic-v3"; > + reg = <0x0 0xfe600000 0 0x10000>, /* GICD */ > + <0x0 0xfe680000 0 0x100000>; /* GICR */ > + interrupts = ; > + interrupt-controller; > + #interrupt-cells = <3>; > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; > + > + its: interrupt-controller@fe640000 { > + compatible = "arm,gic-v3-its"; > + msi-controller; > + #msi-cells = <1>; > + reg = <0x0 0xfe640000 0x0 0x20000>; > + }; > + }; Does the ITS (and other bits related to GIC memory accesses) actually work, or will we have more of the same issues as RK356x? Thanks, Robin.