1
Hardware and Performance / Re: [Work In Progress] OPNsense Ported into ARM Devices
« on: September 18, 2022, 06:17:59 am »
Can someone share their (working) dts for the R4S and/or R4SE?
I've tried both mainline u-boot and the friendlyarm vendor versions.
Both cause a kernel panic when devmatch fires.
EDIT - nevermind, I got it working on both the r4s and r4se!
The tl;dr to the last 10 hours of my life is that in the version of rk3399.dtsi that is in u-boot repos,someone fatfingered the first chunk of the pcie address range (I think that's what this field is for). see below
The "ranges" field under "pcie0: pcie@f8000000" needs to start with 0x83000000, not 0x82000000, such that it reads like this:
Made that switch and mostly good now. I'm seeing the same issue I saw in openwrt 21.x where the re0 interface disappears sometimes on soft reboots. The openwrt folks have this patch, I glanced through the freebsd kernel sources and it might be possible to duplicate the effects? I'm not sure how setting the mmc voltage effects the pcie nic though
https://github.com/immortalwrt/immortalwrt/blob/master/target/linux/rockchip/patches-5.15/107-mmc-core-set-initial-signal-voltage-on-power-off.patch
EDIT EDIT - A-HA: (why wasn't this mainlined?)
https://github.com/friendlyarm/kernel-rockchip/commit/8efe01b4386ab38a36b99cfdc1dc02c38a8898c3
I've tried both mainline u-boot and the friendlyarm vendor versions.
Both cause a kernel panic when devmatch fires.
Code: [Select]
Starting device manager...Fatal data abort:
x0: 0
x1: ffffa0000758a000
x2: 3
x3: ffff0000da33f650 ($d.10 + d8f61078)
x4: ffff0000da33f5d8 ($d.10 + d8f61000)
<snip>
EDIT - nevermind, I got it working on both the r4s and r4se!
The tl;dr to the last 10 hours of my life is that in the version of rk3399.dtsi that is in u-boot repos,
The "ranges" field under "pcie0: pcie@f8000000" needs to start with 0x83000000, not 0x82000000, such that it reads like this:
Code: [Select]
pcie0: pcie@f8000000 {
<snip>
ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x1e00000
0x81000000 0x0 0xfbe00000 0x0 0xfbe00000 0x0 0x100000>;
<snip>
Made that switch and mostly good now. I'm seeing the same issue I saw in openwrt 21.x where the re0 interface disappears sometimes on soft reboots. The openwrt folks have this patch, I glanced through the freebsd kernel sources and it might be possible to duplicate the effects? I'm not sure how setting the mmc voltage effects the pcie nic though
https://github.com/immortalwrt/immortalwrt/blob/master/target/linux/rockchip/patches-5.15/107-mmc-core-set-initial-signal-voltage-on-power-off.patch
EDIT EDIT - A-HA: (why wasn't this mainlined?)
https://github.com/friendlyarm/kernel-rockchip/commit/8efe01b4386ab38a36b99cfdc1dc02c38a8898c3