Need help running FreeBSD aarch64 on Nanopi R2S-Plus

well in the more current u-boot of 2025-04 and dtb for rk3328-nanopi-r2s-plus
the 2nd NIC is disabled (scroll down)
Code:
    ethernet@ff540000 {
        compatible = "rockchip,rk3328-gmac";
        reg = <0x00 0xff540000 0x00 0x10000>;
        interrupts = <0x00 0x18 0x04>;
        interrupt-names = "macirq";
        clocks = <0x02 0x64 0x02 0x57 0x02 0x58 0x02 0x5a 0x02 0x59 0x02 0x96 0x02 0xdf>;
        clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_ref\0clk_mac_refout\0aclk_mac\0pclk_mac";
        resets = <0x02 0x63>;
        reset-names = "stmmaceth";
        rockchip,grf = <0x3a>;
        tx-fifo-depth = <0x800>;
        rx-fifo-depth = <0x1000>;
        snps,txpbl = <0x04>;
        status = "okay";
        assigned-clocks = <0x02 0x64 0x02 0x66>;
        assigned-clock-parents = <0x50 0x50>;
        clock_in_out = "input";
        phy-mode = "rgmii";
        phy-supply = <0x1c>;
        pinctrl-0 = <0x51>;
        pinctrl-names = "default";
        snps,aal;
        phy-handle = <0x52>;
        tx_delay = <0x24>;
        rx_delay = <0x18>;

        mdio {
            compatible = "snps,dwmac-mdio";
            #address-cells = <0x01>;
            #size-cells = <0x00>;

            ethernet-phy@1 {
                reg = <0x01>;
                pinctrl-0 = <0x53>;
                pinctrl-names = "default";
                reset-assert-us = <0x2710>;
                reset-deassert-us = <0xc350>;
                reset-gpios = <0x29 0x12 0x01>;
                phandle = <0x52>;
            };
        };
    };

    ethernet@ff550000 {
        compatible = "rockchip,rk3328-gmac";
        reg = <0x00 0xff550000 0x00 0x10000>;
        rockchip,grf = <0x3a>;
        interrupts = <0x00 0x15 0x04>;
        interrupt-names = "macirq";
        clocks = <0x02 0x54 0x02 0x53 0x02 0x53 0x02 0x55 0x02 0x95 0x02 0xde 0x02 0x56>;
        clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_ref\0aclk_mac\0pclk_mac\0clk_macphy";
        resets = <0x02 0x62>;
        reset-names = "stmmaceth";
        phy-mode = "rmii";
        phy-handle = <0x54>;
        tx-fifo-depth = <0x800>;
        rx-fifo-depth = <0x1000>;
        snps,txpbl = <0x04>;
        clock_in_out = "output";
        status = "disabled";

        mdio {
            compatible = "snps,dwmac-mdio";
            #address-cells = <0x01>;
            #size-cells = <0x00>;

            ethernet-phy@0 {
                compatible = "ethernet-phy-id1234.d400\0ethernet-phy-ieee802.3-c22";
                reg = <0x00>;
                clocks = <0x02 0x56>;
                resets = <0x02 0x64>;
                pinctrl-names = "default";
                pinctrl-0 = <0x55 0x56>;
                phy-is-integrated;
                phandle = <0x54>;
            };
        };
    };
 
do
dtc -I dtb file.dtb >file.dts
edit it with your fav text editor
dtc -I dts file.dts >file.dtb
copy it over the original and you are done
 
well in the more current u-boot of 2025-04 and dtb for rk3328-nanopi-r2s-plus
the 2nd NIC is disabled (scroll down)
Code:
    ethernet@ff540000 {
        compatible = "rockchip,rk3328-gmac";
        reg = <0x00 0xff540000 0x00 0x10000>;
        interrupts = <0x00 0x18 0x04>;
        interrupt-names = "macirq";
        clocks = <0x02 0x64 0x02 0x57 0x02 0x58 0x02 0x5a 0x02 0x59 0x02 0x96 0x02 0xdf>;
        clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_ref\0clk_mac_refout\0aclk_mac\0pclk_mac";
        resets = <0x02 0x63>;
        reset-names = "stmmaceth";
        rockchip,grf = <0x3a>;
        tx-fifo-depth = <0x800>;
        rx-fifo-depth = <0x1000>;
        snps,txpbl = <0x04>;
        status = "okay";
        assigned-clocks = <0x02 0x64 0x02 0x66>;
        assigned-clock-parents = <0x50 0x50>;
        clock_in_out = "input";
        phy-mode = "rgmii";
        phy-supply = <0x1c>;
        pinctrl-0 = <0x51>;
        pinctrl-names = "default";
        snps,aal;
        phy-handle = <0x52>;
        tx_delay = <0x24>;
        rx_delay = <0x18>;

        mdio {
            compatible = "snps,dwmac-mdio";
            #address-cells = <0x01>;
            #size-cells = <0x00>;

            ethernet-phy@1 {
                reg = <0x01>;
                pinctrl-0 = <0x53>;
                pinctrl-names = "default";
                reset-assert-us = <0x2710>;
                reset-deassert-us = <0xc350>;
                reset-gpios = <0x29 0x12 0x01>;
                phandle = <0x52>;
            };
        };
    };

    ethernet@ff550000 {
        compatible = "rockchip,rk3328-gmac";
        reg = <0x00 0xff550000 0x00 0x10000>;
        rockchip,grf = <0x3a>;
        interrupts = <0x00 0x15 0x04>;
        interrupt-names = "macirq";
        clocks = <0x02 0x54 0x02 0x53 0x02 0x53 0x02 0x55 0x02 0x95 0x02 0xde 0x02 0x56>;
        clock-names = "stmmaceth\0mac_clk_rx\0mac_clk_tx\0clk_mac_ref\0aclk_mac\0pclk_mac\0clk_macphy";
        resets = <0x02 0x62>;
        reset-names = "stmmaceth";
        phy-mode = "rmii";
        phy-handle = <0x54>;
        tx-fifo-depth = <0x800>;
        rx-fifo-depth = <0x1000>;
        snps,txpbl = <0x04>;
        clock_in_out = "output";
        status = "disabled";

        mdio {
            compatible = "snps,dwmac-mdio";
            #address-cells = <0x01>;
            #size-cells = <0x00>;

            ethernet-phy@0 {
                compatible = "ethernet-phy-id1234.d400\0ethernet-phy-ieee802.3-c22";
                reg = <0x00>;
                clocks = <0x02 0x56>;
                resets = <0x02 0x64>;
                pinctrl-names = "default";
                pinctrl-0 = <0x55 0x56>;
                phy-is-integrated;
                phandle = <0x54>;
            };
        };
    };
aaah, the one I have compiled from friendlyelec source only has ethernet@ff540000. definitely missing ethernet@ff550000
 
tbh, I do not what to copy. The only working dts is from friendlyelec source code. The generated dtb is different from the most recent uboot.
 

Attachments

here is a dts file pulled from u-boot (2025-04)
compile it to dtb and put it in /boot/dtb/rockchip/test.dtb
then in loader.conf put this

mydtb_name="/boot/dtb/rockchip/test.dtb"
mydtb_load="YES"
mydtb_type="dtb"

reboot
see what you get

LE. enable the second gmac first cause it's disabled now
 

Attachments

Back
Top