ARM: dts: imx6ul: Set macaddress location in ocotp
Subsystems (2)
PATCH 1/1 ARM: dts: imx6ul: Set macaddress location in ocotp
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.
--- arch/arm/boot/dts/nxp/imx/imx6ul.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm/boot/dts/nxp/imx/imx6ul.dtsi +12 -0
@@ -538,6 +538,8 @@ fec2: ethernet@20b4000 { 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"; };
@@ -897,6 +899,8 @@ fec1: ethernet@2188000 { 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"; };
@@ -1004,6 +1008,14 @@ tempmon_temp_grade: temp-grade@20 { 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 {
Signature · 1 line
2.43.0
Quoted 35 lines · Manuel Traut
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 <[email protected]>--- arch/arm/boot/dts/nxp/imx/imx6ul.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+)arch/arm/boot/dts/nxp/imx/imx6ul.dtsi +4
-0@@ -538,6 +538,8 @@ fec2: ethernet@20b4000 { 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"; };@@ -897,6 +899,8 @@ fec1: ethernet@2188000 { 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"; };
arch/arm/boot/dts/nxp/imx/imx6ul.dtsi tempmon_temp_grade: temp-grade@20 { · line 1010
Quoted 3 lines
arch/arm/boot/dts/nxp/imx/imx6ul.dtsi +0
-0@@ -1004,6 +1008,14 @@ tempmon_temp_grade: temp-grade@20 { cpu_speed_grade: speed-grade@10 { reg = <0x10 4>; };
Have a newline between nodes.
arch/arm/boot/dts/nxp/imx/imx6ul.dtsi tempmon_temp_grade: temp-grade@20 { · line 1018
Quoted 8 lines
arch/arm/boot/dts/nxp/imx/imx6ul.dtsi +8
-0+ fec1_mac_addr: mac-addr@88 { + reg = <0x88 6>; + }; + + fec2_mac_addr: mac-addr@8e { + reg = <0x8e 6>; + }; +
Dropped this one.
I fixed them up and applied the patch.
Shawn
Quoted 6 lines
arch/arm/boot/dts/nxp/imx/imx6ul.dtsi +0
-0}; csi: csi@21c4000 {Signature · 1 line
2.43.0