From: Marc Zyngier <maz@kernel.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
Kever Yang <kever.yang@rock-chips.com>
Cc: Heiko Stuebner <heiko@sntech.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
Christopher Obbard <chris.obbard@collabora.com>,
Benjamin Gaignard <benjamin.gaignard@collabora.com>,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@collabora.com,
Yifeng Zhao <yifeng.zhao@rock-chips.com>,
Elaine Zhang <zhangqing@rock-chips.com>,
Sugar Zhang <sugar.zhang@rock-chips.com>
Subject: Re: [PATCHv5 3/7] arm64: dts: rockchip: Add base DT for rk3588 SoC
Date: Fri, 09 Dec 2022 12:01:21 +0000 [thread overview]
Message-ID: <86cz8srdke.wl-maz@kernel.org> (raw)
In-Reply-To: <20221205172350.75234-4-sebastian.reichel@collabora.com>
On Mon, 05 Dec 2022 17:23:46 +0000,
Sebastian Reichel <sebastian.reichel@collabora.com> wrote:
>
> From: Kever Yang <kever.yang@rock-chips.com>
>
> 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 <yifeng.zhao@rock-chips.com>
> Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
> Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> [rebase, squash and reword commit message]
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
> arch/arm64/boot/dts/rockchip/rk3588.dtsi | 58 +
> arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 1672 +++++++++++++++++++++
> 2 files changed, 1730 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/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
> new file mode 100644
> index 000000000000..ecdd2294cd42
> --- /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
> @@ -0,0 +1,1672 @@
[...]
> + pmu-a55 {
> + compatible = "arm,cortex-a55-pmu";
> + interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
> + };
> +
> + pmu-a76 {
> + compatible = "arm,cortex-a76-pmu";
> + interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH>;
> + };
Two PMUs with the same PPI and no partition? This is totally
wrong. Please see how RK3399 does it, with each PMU having a PPI
partition allocated.
See the PMU binding for the details.
> +
> + psci {
> + compatible = "arm,psci-1.0";
> + method = "smc";
> + };
> +
> + spll: clock-0 {
> + compatible = "fixed-clock";
> + clock-frequency = <702000000>;
> + clock-output-names = "spll";
> + #clock-cells = <0>;
> + };
> +
> + timer {
> + compatible = "arm,armv8-timer";
> + interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH>;
You have a set of ARMv8.2 cores, which do have an interrupt for the
EL2 virtual timer. Please add this interrupt and while you're at it,
add the interrupt-names properties that are associated with them.
See the binding for the details.
[...]
> + gic: interrupt-controller@fe600000 {
> + compatible = "arm,gic-v3";
> + reg = <0x0 0xfe600000 0 0x10000>, /* GICD */
> + <0x0 0xfe680000 0 0x100000>; /* GICR */
> + interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-controller;
> + mbi-alias = <0x0 0xfe610000>;
> + mbi-ranges = <424 56>;
> + msi-controller;
> + #interrupt-cells = <3>;
> +
> + ppi-partitions {
> + interrupt-partition-0 {
> + affinity = <
> + &cpu_l0 &cpu_l1 &cpu_l2 &cpu_l3
> + &cpu_b0 &cpu_b1 &cpu_b2 &cpu_b3
> + >;
> + };
> + };
What is the purpose of having an interrupt partition that covers *all*
the CPUs? This makes zero sense. You need to:
- Bump #interrupt-cells to 4, as per the GIC binding
- Create PPI partitions to segregate the two CPU types
- Make the PMU devices use the corresponding PPI partition as per the binding
- Fix all the interrupt specifiers to use 4 cells instead of 3
Again, RK3399 got it right, and for once I'm advocating some sort of
copy/paste...
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2022-12-09 12:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 17:23 [PATCHv5 0/7] Initial rk3588 DT Sebastian Reichel
2022-12-05 17:23 ` [PATCHv5 1/7] dt-bindings: soc: rockchip: add initial rk3588 syscon compatibles Sebastian Reichel
2022-12-05 17:23 ` [PATCHv5 2/7] arm64: dts: rockchip: Add rk3588 pinctrl data Sebastian Reichel
2022-12-05 17:23 ` [PATCHv5 3/7] arm64: dts: rockchip: Add base DT for rk3588 SoC Sebastian Reichel
2022-12-09 12:01 ` Marc Zyngier [this message]
2022-12-05 17:23 ` [PATCHv5 4/7] dt-bindings: arm: rockchip: add initial rk3588 boards Sebastian Reichel
2022-12-05 17:23 ` [PATCHv5 5/7] arm64: dts: rockchip: Add rk3588-evb1 board Sebastian Reichel
2022-12-05 17:23 ` [PATCHv5 6/7] arm64: dts: rockchip: Add rock-5a board Sebastian Reichel
2022-12-05 17:23 ` [PATCHv5 7/7] arm64: dts: rockchip: Add rock-5b board Sebastian Reichel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86cz8srdke.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=benjamin.gaignard@collabora.com \
--cc=chris.obbard@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=kernel@collabora.com \
--cc=kever.yang@rock-chips.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=sugar.zhang@rock-chips.com \
--cc=yifeng.zhao@rock-chips.com \
--cc=zhangqing@rock-chips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).