ARM: dts: imx6ul: Set macaddress location in ocotp
authorManuel Traut <manuel.traut@mt.com>
Thu, 8 Feb 2024 12:19:59 +0000 (13:19 +0100)
committerShawn Guo <shawnguo@kernel.org>
Fri, 23 Feb 2024 23:32:25 +0000 (07:32 +0800)
If a bootloader does not configure the MAC address, devices come up with
a random MAC at the moment.

ocotp provides registers for storing the mac-address.
Configure those for i.MX6UL and i.MX6ULL allows net/core to retrieve it from
there.

Signed-off-by: Manuel Traut <manuel.traut@mt.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/boot/dts/nxp/imx/imx6ul.dtsi

index c7ae708183759f630b2dbc6f346ebbe0cf65372e..db5b66b76846af6988d69b0b78b4ef89cffdb8a8 100644 (file)
                                fsl,num-rx-queues = <1>;
                                fsl,stop-mode = <&gpr 0x10 4>;
                                fsl,magic-packet;
+                               nvmem-cells = <&fec2_mac_addr>;
+                               nvmem-cell-names = "mac-address";
                                status = "disabled";
                        };
 
                                fsl,num-rx-queues = <1>;
                                fsl,stop-mode = <&gpr 0x10 3>;
                                fsl,magic-packet;
+                               nvmem-cells = <&fec1_mac_addr>;
+                               nvmem-cell-names = "mac-address";
                                status = "disabled";
                        };
 
                                cpu_speed_grade: speed-grade@10 {
                                        reg = <0x10 4>;
                                };
+
+                               fec1_mac_addr: mac-addr@88 {
+                                       reg = <0x88 6>;
+                               };
+
+                               fec2_mac_addr: mac-addr@8e {
+                                       reg = <0x8e 6>;
+                               };
                        };
 
                        csi: csi@21c4000 {