From: sashiko-bot@kernel.org
To: "Ricardo Pardini via B4 Relay" <devnull+ricardo.pardini.net@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/2] arm64: dts: rockchip: describe PCIe Ethernet controllers on NanoPC-T6
Date: Fri, 29 May 2026 15:52:27 +0000 [thread overview]
Message-ID: <20260529155228.5ACDA1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260529-rk3588-dts-rtl-eth-describe-dt-alias-v2-1-49700248143f@pardini.net>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Hardcoded and incorrectly bounded PCI bus numbers in device tree for dynamically enumerable PCI devices.
--
commit 79c9b71b546cb8ecf96eb0ea66c76b17346368b3
Author: Ricardo Pardini <ricardo@pardini.net>
arm64: dts: rockchip: describe PCIe Ethernet controllers on NanoPC-T6
This commit adds device tree nodes describing the two on-board Realtek
RTL8125BG NICs on the NanoPC-T6. It attaches ethernet0 and ethernet1
aliases to these fixed PCI function nodes.
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
> index 84b6b53f016ab..04c4479f08170 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dtsi
[ ... ]
> @@ -635,6 +637,20 @@ &pcie2x1l0 {
> pinctrl-names = "default";
> pinctrl-0 = <&pcie2_0_rst>;
> status = "okay";
> +
> + pcie@0,0 {
> + reg = <0x200000 0 0 0 0>;
> + #address-cells = <3>;
> + #size-cells = <2>;
> + ranges;
> + device_type = "pci";
> + bus-range = <0x20 0x2f>;
[Severity: Medium]
Is this bus-range declaration correct for a bridge?
The first value of a bridge's bus-range is its secondary bus. If the Root
Port is on primary bus 0x20 (as defined by the host bridge), setting the
secondary bus to 0x20 sets it equal to the primary bus, which violates PCI
topology rules. Furthermore, the child device is declared below on bus
0x21, which contradicts this declaration.
> +
> + rtl_eth0: ethernet@0,0 {
> + compatible = "pci10ec,8125";
> + reg = <0x210000 0 0 0 0>;
[Severity: Medium]
Does this hardcode a dynamic PCI bus number?
Using a specific bus number like 0x210000 instead of a relative address like
<0 0 0 0 0> can cause problems with strict parsers or bootloaders (such as
U-Boot) that perform dynamic enumeration. They might fail to match the nodes,
which could prevent device tree aliases from resolving correctly and break
MAC address injection.
> + };
> + };
> };
>
[ ... ]
> @@ -651,6 +667,20 @@ &pcie2x1l2 {
> pinctrl-names = "default";
> pinctrl-0 = <&pcie2_2_rst>;
> status = "okay";
> +
> + pcie@0,0 {
> + reg = <0x400000 0 0 0 0>;
> + #address-cells = <3>;
> + #size-cells = <2>;
> + ranges;
> + device_type = "pci";
> + bus-range = <0x40 0x4f>;
[Severity: Medium]
Is this bus-range declaration correct for a bridge?
The first value of a bridge's bus-range is its secondary bus. If the Root
Port is on primary bus 0x40 (as defined by the host bridge), setting the
secondary bus to 0x40 sets it equal to the primary bus, which violates PCI
topology rules. Furthermore, the child device is declared below on bus
0x41, which contradicts this declaration.
> +
> + rtl_eth1: ethernet@0,0 {
> + compatible = "pci10ec,8125";
> + reg = <0x410000 0 0 0 0>;
[Severity: Medium]
Does this hardcode a dynamic PCI bus number?
Using a specific bus number like 0x410000 instead of a relative address like
<0 0 0 0 0> can cause problems with strict parsers or bootloaders (such as
U-Boot) that perform dynamic enumeration. They might fail to match the nodes,
which could prevent device tree aliases from resolving correctly and break
MAC address injection.
> + };
> + };
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260529-rk3588-dts-rtl-eth-describe-dt-alias-v2-0-49700248143f@pardini.net?part=1
next prev parent reply other threads:[~2026-05-29 15:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 15:31 [PATCH v2 0/2] describe PCIe ethernet interfaces and alias ethernet0/1 on NanoPC-T6 Ricardo Pardini via B4 Relay
2026-05-29 15:31 ` [PATCH v2 1/2] arm64: dts: rockchip: describe PCIe Ethernet controllers " Ricardo Pardini via B4 Relay
2026-05-29 15:52 ` sashiko-bot [this message]
2026-05-29 15:31 ` [PATCH v2 2/2] arm64: dts: rockchip: fix PCIe regulator name " Ricardo Pardini via B4 Relay
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=20260529155228.5ACDA1F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+ricardo.pardini.net@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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