Hi Marek On 6/23/24 21:15, Marek Vasut wrote:
The efuses on STM32MP13xx can be populated with ethernet MAC address. Add the nvmem-cells/nvmem-cell-name DT properties to ethernet MAC DT nodes to describe the placement of both MAC address fields within the efuses, so the ethernet MAC driver can access the efuses and populate the correct MAC address into the hardware. Signed-off-by: Marek Vasut <marex@xxxxxxx> --- Cc: Alexandre Torgue <alexandre.torgue@xxxxxxxxxxx> Cc: Christophe Roullier <christophe.roullier@xxxxxxxxxxx> Cc: Conor Dooley <conor+dt@xxxxxxxxxx> Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx> Cc: Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx> Cc: Rob Herring <robh@xxxxxxxxxx> Cc: devicetree@xxxxxxxxxxxxxxx Cc: kernel@xxxxxxxxxxxxxxxxxx Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx Cc: linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx --- arch/arm/boot/dts/st/stm32mp131.dtsi | 2 ++ arch/arm/boot/dts/st/stm32mp133.dtsi | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/st/stm32mp131.dtsi b/arch/arm/boot/dts/st/stm32mp131.dtsi index f41508195eb51..55f4150524f3c 100644 --- a/arch/arm/boot/dts/st/stm32mp131.dtsi +++ b/arch/arm/boot/dts/st/stm32mp131.dtsi @@ -1528,6 +1528,8 @@ ethernet1: ethernet@5800a000 { <&rcc ETH1RX>, <&rcc ETH1STP>, <&rcc ETH1CK_K>; + nvmem-cell-names = "mac-address"; + nvmem-cells = <ðernet_mac1_address>;
It should not be defined in soc dtsi file but rather in board file. OTP are provisioned by the end customer not by ST. If you order a SoC to ST it will not be provisioned OTP MAC addr will be set to 0.
Regards alex
snps,axi-config = <&stmmac_axi_config_1>; snps,mixed-burst; snps,pbl = <2>; diff --git a/arch/arm/boot/dts/st/stm32mp133.dtsi b/arch/arm/boot/dts/st/stm32mp133.dtsi index ae2fbc09e93b9..48b6ddb59badf 100644 --- a/arch/arm/boot/dts/st/stm32mp133.dtsi +++ b/arch/arm/boot/dts/st/stm32mp133.dtsi @@ -85,6 +85,8 @@ ethernet2: ethernet@5800e000 { <&rcc ETH2RX>, <&rcc ETH2STP>, <&rcc ETH2CK_K>; + nvmem-cell-names = "mac-address"; + nvmem-cells = <ðernet_mac2_address>; snps,axi-config = <&stmmac_axi_config_2>; snps,mixed-burst; snps,pbl = <2>;