From: Trevor Woerner <twoerner@gmail.com>
To: yocto@lists.yoctoproject.org
Subject: [meta-rockchip][PATCH v2] nanopi-r4s: add
Date: Tue, 19 Sep 2023 09:01:15 -0400 [thread overview]
Message-ID: <20230919130115.17484-1-twoerner@gmail.com> (raw)
Add a MACHINE definition for the FriendlyElec NanoPi R4S
https://www.friendlyelec.com/index.php?route=product/product&product_id=284
Include a device-tree patch to enable the 2nd PCIe ethernet.
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
---
v2:
- rebase on top of master
- s/r2s/r4s/g
- include DT patch to enable PCIe ethernet
---
README | 1 +
conf/machine/nanopi-r4s.conf | 13 ++++++
.../linux/linux-yocto/nanopi-r4s.scc | 6 +++
...anopi-r4s.dts-enable-second-ethernet.patch | 41 +++++++++++++++++++
recipes-kernel/linux/linux-yocto_%.bbappend | 2 +
5 files changed, 63 insertions(+)
create mode 100644 conf/machine/nanopi-r4s.conf
create mode 100644 recipes-kernel/linux/linux-yocto/nanopi-r4s.scc
create mode 100644 recipes-kernel/linux/linux-yocto/rockchip-kmeta/bsp/rockchip/0001-rk3399-nanopi-r4s.dts-enable-second-ethernet.patch
diff --git a/README b/README
index d66ed7e79bd2..286dafbe1020 100644
--- a/README
+++ b/README
@@ -29,6 +29,7 @@ Status of supported boards:
tinker-board-s
vyasa-rk3288
firefly-rk3288
+ nanopi-r4s
builds:
marsboard-rk3066
radxarock
diff --git a/conf/machine/nanopi-r4s.conf b/conf/machine/nanopi-r4s.conf
new file mode 100644
index 000000000000..160f8b906d63
--- /dev/null
+++ b/conf/machine/nanopi-r4s.conf
@@ -0,0 +1,13 @@
+#@TYPE: Machine
+#@NAME: NanoPi R4S
+#@DESCRIPTION: NanoPi R4S is a high-end FriendlyElec mini-router based on the RK3399 SoC
+#https://www.friendlyelec.com/index.php?route=product/product&product_id=284
+
+MACHINEOVERRIDES =. "nanopi-r4s:"
+
+require conf/machine/include/rk3399.inc
+
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+
+KERNEL_DEVICETREE = "rockchip/rk3399-nanopi-r4s.dtb"
+UBOOT_MACHINE = "nanopi-r4s-rk3399_defconfig"
diff --git a/recipes-kernel/linux/linux-yocto/nanopi-r4s.scc b/recipes-kernel/linux/linux-yocto/nanopi-r4s.scc
new file mode 100644
index 000000000000..266b77c63fe5
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/nanopi-r4s.scc
@@ -0,0 +1,6 @@
+define KFEATURE_DESCRIPTION "tweaks for the nanopi-r4s"
+define KMACHINE nanopi-r4s
+define KTYPE standard
+define KARCH arm64
+
+include bsp/rockchip/0001-rk3399-nanopi-r4s.dts-enable-second-ethernet.patch
diff --git a/recipes-kernel/linux/linux-yocto/rockchip-kmeta/bsp/rockchip/0001-rk3399-nanopi-r4s.dts-enable-second-ethernet.patch b/recipes-kernel/linux/linux-yocto/rockchip-kmeta/bsp/rockchip/0001-rk3399-nanopi-r4s.dts-enable-second-ethernet.patch
new file mode 100644
index 000000000000..e1f2b92665dd
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/rockchip-kmeta/bsp/rockchip/0001-rk3399-nanopi-r4s.dts-enable-second-ethernet.patch
@@ -0,0 +1,41 @@
+From 4c867907b68b417da0711cabdde30a969e368596 Mon Sep 17 00:00:00 2001
+From: Trevor Woerner <twoerner@gmail.com>
+Date: Sun, 17 Sep 2023 17:30:43 -0400
+Subject: [PATCH] rk3399-nanopi-r4s.dts: enable second ethernet
+
+# lspci
+00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3399 PCI Express Root Port
+01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ether)
+
+Link: https://github.com/armbian/build/pull/2415
+Upstream-Status: Submitted [by someone else]
+Signed-off-by: Trevor Woerner <twoerner@gmail.com>
+---
+ arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+index fe5b52610010..771615722358 100644
+--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+@@ -76,6 +76,17 @@ &pcie0 {
+ max-link-speed = <1>;
+ num-lanes = <1>;
+ vpcie3v3-supply = <&vcc3v3_sys>;
++
++ pcie@0 {
++ reg = <0x00000000 0 0 0 0>;
++ #address-cells = <3>;
++ #size-cells = <2>;
++
++ r8169: pcie@0,0 {
++ reg = <0x000000 0 0 0 0>;
++ local-mac-address = [ 00 00 00 00 00 00 ];
++ };
++ };
+ };
+
+ &pinctrl {
+--
+2.41.0.327.gaa9166bcc0ba
+
diff --git a/recipes-kernel/linux/linux-yocto_%.bbappend b/recipes-kernel/linux/linux-yocto_%.bbappend
index d0d24f1b074f..53833f1cc3f4 100644
--- a/recipes-kernel/linux/linux-yocto_%.bbappend
+++ b/recipes-kernel/linux/linux-yocto_%.bbappend
@@ -12,5 +12,7 @@ COMPATIBLE_MACHINE:nanopi-m4 = "nanopi-m4"
COMPATIBLE_MACHINE:nanopi-m4-2gb = "nanopi-m4-2gb"
COMPATIBLE_MACHINE:rock64 = "rock64"
COMPATIBLE_MACHINE:rock-pi-e = "rock-pi-e"
+COMPATIBLE_MACHINE:nanopi-r4s = "nanopi-r4s"
SRC_URI:append = " file://rockchip-kmeta;type=kmeta;name=rockchip-kmeta;destsuffix=rockchip-kmeta"
+SRC_URI:append:nanopi-r4s = " file://nanopi-r4s.scc"
--
2.41.0.327.gaa9166bcc0ba
next reply other threads:[~2023-09-19 13:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 13:01 Trevor Woerner [this message]
2023-09-22 2:47 ` [meta-rockchip][PATCH v2] nanopi-r4s: add Trevor Woerner
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=20230919130115.17484-1-twoerner@gmail.com \
--to=twoerner@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.