LAN966x Overlays
1. Introduction
This document describes how to enable different overlays. The overlays are enabled when booting the fit image. And it is required for the u-boot to have support for this.
In u-boot it is required to enabled the config option:
OF_LIBFDT_OVERLAY=y
Then in the fit image that is booted, it is required to have each overlay like a configuration node, for example:
/dts-v1/;
/ {
images {
...
fdt_lan9668_ung8385_sb_lan8840_0_at_lan966x {
data = /incbin/("./lan966x_pcb8385_sb_lan8840.dtbo");
type = "flat_dt";
arch = "arm";
load = <0x67e80000>;
compression = "none";
};
...
};
configurations {
...
lan9668_ung8385_sa_lan8840_0_at_lan966x {
fdt = "fdt_lan9668_ung8385_sa_lan8840_0_at_lan966x";
};
...
};
};
And then in u-boot, the env variable pcb can be changed to contain all the
overlays and the base configuration node. For example:
pcb=conf-1#lan9668_ung8385_sa_lan8840_0_at_lan966x#conf-2#conf-3
| It is the user responsability to know which overlays need to apply. |
1.1. LAN8651 Overlay
This is used for LAN966x where on the PIN header is possible to connect the a Raspberry Pi Hats and on top of this is possible to add the LAN8651 PHY.
To enable this overlay, it is required in u-boot to update the pcb env
variable to be like this
pcb=lan9662_ung8291_0_at_lan966x#lan9662_ung8291_lan8651_0_at_lan966x
Then after the kernel is booted there will be another network interface:
# ip -c link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 62:f7:1a:34:6c:ac brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 0a:70:30:bc:88:d5 brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 72:48:af:45:e0:88 brd ff:ff:ff:ff:ff:ff
5: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 22:94:0d:28:97:01 brd ff:ff:ff:ff:ff:ff
6: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/ether 22:94:0d:28:97:02 brd ff:ff:ff:ff:ff:ff
7: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
In this case the eth0 is the lan8651 PHY:
# ip link set dev eth0 up # [ 29.591550] lan8650 spi0.0 eth0: Link is Up - 10Mbps/Half - flow control off
Currently it is not possible to set eth0 and eth1 or eth2 under a
bridge interface meaning that traffic from eth0 to other eth devices will
not be forwarded.
|