mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Diederik de Haas" <diederik@cknow-tech.com>
To: <ricardo@pardini.net>, "Heiner Kallweit" <hkallweit1@gmail.com>,
	<nic_swsd@realtek.com>, "Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Heiko Stuebner" <heiko@sntech.de>
Cc: "Sebastian Reichel" <sebastian.reichel@collabora.com>,
	<netdev@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-rockchip@lists.infradead.org>,
	"Jonas Karlman" <jonas@kwiboo.se>
Subject: Re: [PATCH v5 5/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on NanoPi R5S
Date: Wed, 23 Sep 2026 19:15:13 +0200	[thread overview]
Message-ID: <DLMV5WTF5TR1.BXDY94L4J4H7@cknow-tech.com> (raw)
In-Reply-To: <20260910-rk3588-dts-rtl-eth-describe-dt-alias-v5-5-c1b9e5f10cd6@pardini.net>

Hi,

On Thu Sep 10, 2026 at 10:07 PM CEST, Ricardo Pardini via B4 Relay wrote:
> From: Ricardo Pardini <ricardo@pardini.net>
>
> The FriendlyElec NanoPi R5S (rk3568) carries two on-board Realtek
> RTL8125 NICs behind pcie2x1 and pcie3x1, alongside the existing gmac0
> RGMII PHY.
>
> Describe the fixed function nodes and attach ethernet1/ethernet2
> aliases (ethernet0 stays mapped to gmac0), so that U-Boot's
> fdt_fixup_ethernet() can inject mac-address properties from its
> eth1addr/eth2addr env, for stable MACs across boots that both U-Boot
> and the kernel agree on.
>
> Signed-off-by: Ricardo Pardini <ricardo@pardini.net>
> ---
>  arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 30 ++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> index 90ce6f0e1dcff..9ed11663c31c9 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
> @@ -15,6 +15,8 @@ / {
>  
>  	aliases {
>  		ethernet0 = &gmac0;
> +		ethernet1 = &rtl_eth1;
> +		ethernet2 = &rtl_eth2;
>  	};

With my NanoPi-R5S I'm still getting the following warning:

  r8169 0001:11:00.0: can't read MAC address, setting random one

```
root@nanopi-r5s:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: end1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 4e:52:85:9e:22:f9 brd ff:ff:ff:ff:ff:ff
    altname enp1s0
    altname enx4e52859e22f9
3: end2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 12:e5:47:9e:e2:f1 brd ff:ff:ff:ff:ff:ff
    altname enP1p17s0
4: end0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 4e:52:85:9e:22:f8 brd ff:ff:ff:ff:ff:ff
    altname enx4e52859e22f8
```

I did not do anything (explicitly) in U-Boot, but it seems it created a
non-random MAC address for end0 and end1 ... and then stopped.
AFAIK gmac0=end0 already had a non-random MAC address and I hoped/expected
it would create non-random addresses for end1 and end2, which would've made
the above warning go away too.

Is this an issue with this patch, with U-Boot or me?

Full details:
https://paste.sr.ht/~diederik/8ae7d354985afcd1c3464e3a4ad81da1b4442364

Side note:
I wonder how 'random' those addresses are as during testing ``ssh rock5b``
landed me on another device (NanoPC-T6 Plus), f.e. My router has DHCP
reservations based on MAC addresses and it looks like it got confused ;-)

Cheers,
  Diederik

>  	gpio-keys {
> @@ -107,6 +109,20 @@ &pcie2x1 {
>  	num-lanes = <1>;
>  	reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
>  	status = "okay";
> +
> +	pcie@0,0 {
> +		reg = <0x000000 0 0 0 0>;
> +		#address-cells = <3>;
> +		#size-cells = <2>;
> +		ranges;
> +		device_type = "pci";
> +		bus-range = <0x00 0x0f>;
> +
> +		rtl_eth1: ethernet@0,0 {
> +			compatible = "pci10ec,8125";
> +			reg = <0x010000 0 0 0 0>;
> +		};
> +	};
>  };
>  
>  &pcie30phy {
> @@ -119,6 +135,20 @@ &pcie3x1 {
>  	reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
>  	vpcie3v3-supply = <&vcc3v3_pcie>;
>  	status = "okay";
> +
> +	pcie@0,0 {
> +		reg = <0x100000 0 0 0 0>;
> +		#address-cells = <3>;
> +		#size-cells = <2>;
> +		ranges;
> +		device_type = "pci";
> +		bus-range = <0x10 0x1f>;
> +
> +		rtl_eth2: ethernet@0,0 {
> +			compatible = "pci10ec,8125";
> +			reg = <0x110000 0 0 0 0>;
> +		};
> +	};
>  };
>  
>  &pcie3x2 {



  reply	other threads:[~2026-09-23 17:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 20:07 [PATCH v5 0/7] describe RTL8125 PCIe NICs on Rockchip boards (and add DT binding) Ricardo Pardini via B4 Relay
2026-09-10 20:07 ` [PATCH v5 1/7] dt-bindings: net: add Realtek RTL8125 PCIe Ethernet Ricardo Pardini via B4 Relay
2026-09-12 12:43   ` Heiko Stuebner
2026-09-18 19:46   ` Rob Herring (Arm)
2026-09-10 20:07 ` [PATCH v5 2/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on NanoPC-T6 Ricardo Pardini via B4 Relay
2026-09-11  9:52   ` Diederik de Haas
2026-09-11 12:19     ` Ricardo Pardini
2026-09-11 13:04       ` Diederik de Haas
2026-09-10 20:07 ` [PATCH v5 3/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on ROCK 5 family Ricardo Pardini via B4 Relay
2026-09-10 20:07 ` [PATCH v5 4/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on CM3588-NAS Ricardo Pardini via B4 Relay
2026-09-10 20:07 ` [PATCH v5 5/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on NanoPi R5S Ricardo Pardini via B4 Relay
2026-09-23 17:15   ` Diederik de Haas [this message]
2026-09-23 18:02     ` Ricardo Pardini
2026-09-23 18:40       ` Diederik de Haas
2026-09-10 20:07 ` [PATCH v5 6/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on NanoPi R6C Ricardo Pardini via B4 Relay
2026-09-10 20:07 ` [PATCH v5 7/7] arm64: dts: rockchip: describe PCIe RTL8125 Ethernet on ROCK 5 ITX Ricardo Pardini via B4 Relay
2026-09-22  9:17 ` [PATCH v5 0/7] describe RTL8125 PCIe NICs on Rockchip boards (and add DT binding) Geert Uytterhoeven
2026-09-23 18:42   ` Ricardo Pardini

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=DLMV5WTF5TR1.BXDY94L4J4H7@cknow-tech.com \
    --to=diederik@cknow-tech.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=heiko@sntech.de \
    --cc=hkallweit1@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=pabeni@redhat.com \
    --cc=ricardo@pardini.net \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.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

all inboxes | Powered by JetHome®