Skip to contentSkip to conversation

sunxi: Add support for FriendlyARM NanoPi R1S H5

PATCH In review Chukun Pan 2 participants 3 messages Oct 10, 2021

Subsystems (2)
lore
Share & tools
lore

Chukun Pan

author
#0 lore raw

v2 cover sunxi: Add support for FriendlyARM NanoPi R1S H5

Hi Andre,

Quoted 2 lines

Please don't include not-yet-merged parts in here. Make a verbatim copy of the version in Linus' tree.

Okay, I remove the not-yet-merged parts in dts.

Quoted 2 lines

who is reading the MAC address out of the EEPROM, and how does it land in the kernel (if it lands there)?

There is a rtl8153 usb network card on this machine, and it will randomly generate a mac address when it bootup. I think the mac address on the eeprom is for this rtl8153 usb network card.

Quoted 1 line

So why is CONFIG_MACPWR missing from the defconfig?

This is my mistake, I'm very sorry about that.

Thanks,
Chukun

Chukun Pan (1):
sunxi: Add support for FriendlyARM NanoPi R1S H5

 arch/arm/dts/Makefile                    |   1 +
 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts | 195 +++++++++++++++++++++++
 board/sunxi/MAINTAINERS                  |   5 +
 configs/nanopi_r1s_h5_defconfig          |  14 ++
 4 files changed, 215 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
 create mode 100644 configs/nanopi_r1s_h5_defconfig
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH v2 1/1 sunxi: Add support for FriendlyARM NanoPi R1S H5

This adds support for the NanoPi R1S H5 board.

Allwinner H5 SoC
512MB DDR3 RAM
10/100/1000M Ethernet x 2
RTL8189ETV WiFi 802.11b/g/n
USB 2.0 host port (A)
MicroSD Slot
Reset button
Serial Debug Port
WAN - LAN - SYS LED

The dts file is taken from Linux 5.14 tag.

---
Changes for v2:
- Remove not-yet-merged parts in dts
- Add missing CONFIG_MACPWR option

 arch/arm/dts/Makefile                    |   1 +
 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts | 195 +++++++++++++++++++++++
 board/sunxi/MAINTAINERS                  |   5 +
 configs/nanopi_r1s_h5_defconfig          |  14 ++
 4 files changed, 215 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
 create mode 100644 configs/nanopi_r1s_h5_defconfig
arch/arm/dts/Makefile +1 -0
index 9e44817a40..e278480c1c 100644
@@ -632,6 +632,7 @@ dtb-$(CONFIG_MACH_SUN50I_H5) += \
 	sun50i-h5-libretech-all-h5-cc.dtb \
 	sun50i-h5-nanopi-neo2.dtb \
 	sun50i-h5-nanopi-neo-plus2.dtb \
+	sun50i-h5-nanopi-r1s-h5.dtb \
 	sun50i-h5-orangepi-zero-plus.dtb \
 	sun50i-h5-orangepi-pc2.dtb \
 	sun50i-h5-orangepi-prime.dtb \
arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts new file +195 -0

195 lines not on this page · raw message

board/sunxi/MAINTAINERS +5 -0
index 4fc26077b2..6cb36d8209 100644
@@ -358,6 +358,11 @@ M:	Jelle van der Waa <[email protected]>
 S:	Maintained
 F:	configs/nanopi_neo_air_defconfig
 
+NANOPI-R1S-H5 BOARD
+M:	Chukun Pan <[email protected]>
+S:	Maintained
+F:	configs/nanopi_r1s_h5_defconfig
+
 NANOPI-A64 BOARD
 M:	Jagan Teki <[email protected]>
 S:	Maintained
configs/nanopi_r1s_h5_defconfig new file +14 -0
new file mode 100644
index 0000000000..27cf172d72
@@ -0,0 +1,14 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h5-nanopi-r1s-h5"
+CONFIG_SPL=y
+CONFIG_MACH_SUN50I_H5=y
+CONFIG_DRAM_CLK=672
+CONFIG_DRAM_ZQ=3881977
+# CONFIG_DRAM_ODT_EN is not set
+CONFIG_MACPWR="PD6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SUN8I_EMAC=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
Signature · 1 line
2.17.1
Reviewed-by on the v2 series
#2 lore raw
In reply to Chukun Pan
Quoted 5 lines · On Sun, 10 Oct 2021 21:36:56 +0800 Chukun Pan <[email protected]> wrote:

Hi Andre,

Quoted 2 lines

Please don't include not-yet-merged parts in here. Make a verbatim copy of the version in Linus' tree.

Quoted 8 lines

Okay, I remove the not-yet-merged parts in dts.

Quoted 2 lines

who is reading the MAC address out of the EEPROM, and how does it land in the kernel (if it lands there)?

There is a rtl8153 usb network card on this machine, and it will randomly generate a mac address when it bootup. I think the mac address on the eeprom is for this rtl8153 usb network card.

Well, fair enough, but how does this MAC address end up in the USB MAC? I guess this misses some code, but IIUC Chen-Yu pointed you to the solution already in the Linux thread.

Quoted 3 lines
Quoted 1 line

So why is CONFIG_MACPWR missing from the defconfig?

This is my mistake, I'm very sorry about that.

Many thanks for the quick turnaround, that looks alright now. I will push it as part of the sunxi PR for v2022.01.

Quoted 6 lines

Thanks,
Chukun

Chukun Pan (1):
sunxi: Add support for FriendlyARM NanoPi R1S H5

Cheers,
Andre

Quoted 9 lines
 arch/arm/dts/Makefile                    |   1 +
 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts | 195 +++++++++++++++++++++++
 board/sunxi/MAINTAINERS                  |   5 +
 configs/nanopi_r1s_h5_defconfig          |  14 ++
 4 files changed, 215 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-h5-nanopi-r1s-h5.dts
 create mode 100644 configs/nanopi_r1s_h5_defconfig