Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NanoPi R2S Plus #7913

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ig3
Copy link

@ig3 ig3 commented Mar 6, 2025

Description

Add support for FriendlyElec board NanoPi R2S Plus

Enables eMMC and WAN port.

Device tree for the kernel is the kernel device tree for NanoPi R2S Plus with a patch to enable the WAN network port.

u-boot version is v2025.01 which has native support for NanoPi R2S Plus.

Four files added. No changes to existing files.

How Has This Been Tested?

Build current and edge images. Booted from SD. Installed with armbian-install to boot from eMMC with system on USB drive then removed SD card and booted from eMMC. Test LAN and WAN ports by ssh connection.

Checklist:

  • [x ] I have performed a self-review of my own code
  • [x ] My changes generate no new warnings

@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Mar 6, 2025
@Kwiboo
Copy link
Contributor

Kwiboo commented Mar 7, 2025

@ig3 the device tree in mainline Linux should already work as-is, did you test without any of your DT mods after you updated to U-Boot v2025.01?

@Kwiboo
Copy link
Contributor

Kwiboo commented Mar 7, 2025

Also think BOOT_SCENARIO="binman" can be used to avoid need for trust.ini.

@igorpecovnik
Copy link
Member

Add support for FriendlyElec board NanoPi R2S Plus

Would you act as a maintainer of this board? BOARD_MAINTAINER="" For .csc this is obligation free, for supported, testing & reporting its status before release. https://docs.armbian.com/User-Guide_Board-Support-Rules/#standard-support

@ig3
Copy link
Author

ig3 commented Mar 9, 2025

@Kwiboo I first made a board config for NanoPi R2S Plus that was based on the Armbian NanoPi R2S device tree but eMMC and WAN network port didn't work, as expected, as that was the case with the NanoPi R2S image. I modified it following what FriendlyElec did in their kernel and then both worked. But then I changed the board config to use the device tree from the kernel as-is. The eMMC worked but the WAN port did not. Again I had to make changes to accommodate the change from rtl8211e to rtl8211f on the WAN port. With those changes, both eMMC and WAN port work. The board config I have submitted is based on the kernel device tree rather than what is used for NanoPi R2S in Armbian.

@igorpecovnik I only have one NanoPi R2S Plus, without the WiFi add-on, and very little experience with the build framework, device trees and u-boot, but otherwise would be happy to look at any issues as they arise. Best effort, subject to my availability. I'll test kernel upgrades from time to time in any case. Would that suffice?

@ig3
Copy link
Author

ig3 commented Mar 9, 2025

@Kwiboo Regarding BOOT_SCENARIO, I'm not familiar with it or trust.ini or the implications of going one way or the other. But quite happy to take advice on the matter. I only stumbled through getting it to work.

Edit: I think there was an error message about trust.ini and I followed the suggestion in the error message. Recollection is a bit vague now. It seemed a small detail - one among many unfamiliar details that 'just worked', well enough from my perspective.

@ig3
Copy link
Author

ig3 commented Mar 9, 2025

I should say that I'm quite happy to keep the configuration for NanoPi R2S Plus in my userpatches. I submitted the pull request as a small contribution in appreciation of all that Armbian project provides for me. So only accept it if it seems good for the project. No worries either way, but thanks much for Armbian!

@igorpecovnik
Copy link
Member

I'll test kernel upgrades from time to time in any case. Would that suffice?

Keeping an eye on the device before (major) kernel / u-boot upgrades are most critical so its nice that someone is around to report - knowing that something is wrong with the device is already an added value, fixing the problem = nice but not mandatory - we also only do what we can / possible / time permits.

@Kwiboo
Copy link
Contributor

Kwiboo commented Mar 9, 2025

The eMMC worked but the WAN port did not. Again I had to make changes to accommodate the change from rtl8211e to rtl8211f on the WAN port. With those changes, both eMMC and WAN port work.

The WAN port most likely did not work because of an issue in mainline Linux where the RTL8211F PHY is not reset prior to being probed. Now that you have moved to use a mainline U-Boot defconfig for the NanoPi R2S Plus, the RTL8211F PHY should be reset by U-Boot and Linux should be able to probe it.

I.e you should no longer need a custom .dts-files and I expect that you can now use rk3328-nanopi-r2s-plus.dts directly and have a working WAN-port.

The board config I have submitted is based on the kernel device tree rather than what is used for NanoPi R2S in Armbian.

I have no insight or interest into what or how stuff works in Armbian, it is not something I use myself.

However, I keep seeing people having issues that should already work with upstream mainline Linux and U-Boot. And those issues is mostly due to an old and broken versions of U-Boot is being used with latest mainline Linux.

So when it relates to a board I maintain in U-Boot or have helped upstream in mainline Linux I try to understand if there is a real issue that could/should be fixed in upstream or not. NanoPi R2S Plus is one such board and in this case I think you just needed to use a newer mainline U-Boot with a defconfig made for your board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hardware Hardware related like kernel, U-Boot, ... Needs review Seeking for review Patches Patches related to kernel, U-Boot, ... size/medium PR with more then 50 and less then 250 lines
Development

Successfully merging this pull request may close these issues.

3 participants