0
g40

NanoPi K1: Adding U-Boot network support?

Recommended Posts

I'm trying to get TFTP support into U-Boot but it insists that 'no ethernet found'. I've added a couple of nodes to the device tree such that it has 'status = "okay" and mac-address = [00 00 00 00 00 00];

 

I've also added a top level alias in sun50i-h5-nanopi-k1-plus.dts (as added by @martinayotte following this thread) as below. 

 

Not sure if the U-Boot config needs changing in any way but the network components are certainly being built.

 

Any thoughts most welcome. AATIA.

 

	aliases {
		serial0 = &uart0;
		ethernet0 = &emac;
	};

U-Boot dump of the loaded DTB on running system follows:

=> bdinfo
arch_number = 0x00000000
boot_params = 0x40000100
DRAM bank   = 0x00000000
-> start    = 0x40000000
-> size     = 0x80000000
baudrate    = 115200 bps
TLB addr    = 0xBFFF0000
relocaddr   = 0xBDF4B000
reloc off   = 0x73F4B000
irq_sp      = 0xB9F27590
sp start    = 0xB9F27590
Early malloc usage: 2d8 / 400
fdt_blob = 00000000b9f275a8
=> fdt addr  00000000b9f275a8
=> fdt print ethernet0
ethernet@1c30000 {
        compatible = "allwinner,sun8i-h3-emac";
        syscon = <0x0000000e>;
        reg = <0x01c30000 0x00010000>;
        interrupts = <0x00000000 0x00000052 0x00000004>;
        interrupt-names = "macirq";
        resets = <0x00000005 0x0000000c>;
        reset-names = "stmmaceth";
        clocks = <0x00000005 0x0000001b>;
        clock-names = "stmmaceth";
        #address-cells = <0x00000001>;
        #size-cells = <0x00000000>;
        status = "okay";
        mac-address = [00 00 00 00 00 00];
        mdio {
                #address-cells = <0x00000001>;
                #size-cells = <0x00000000>;
                compatible = "snps,dwmac-mdio";
                phandle = <0x0000000f>;
        };
        mdio-mux {
                compatible = "allwinner,sun8i-h3-mdio-mux";
                #address-cells = <0x00000001>;
                #size-cells = <0x00000000>;
                mdio-parent-bus = <0x0000000f>;
                mdio@1 {
                        compatible = "allwinner,sun8i-h3-mdio-internal";
                        reg = <0x00000001>;
                        #address-cells = <0x00000001>;
                        #size-cells = <0x00000000>;
                        ethernet-phy@1 {
                                compatible = "ethernet-phy-ieee802.3-c22";
                                reg = <0x00000001>;
                                clocks = <0x00000005 0x00000043>;
                                resets = <0x00000005 0x00000027>;
                        };
                };
                mdio@2 {
                        reg = <0x00000002>;
                        #address-cells = <0x00000001>;
                        #size-cells = <0x00000000>;
                };
        };
};

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
0