[PATCH 0/4] nvmem: imx-ocotp-ele: fix reading from ELE OCOTP

Fabio Estevam festevam at gmail.com
Wed Oct 23 18:09:37 PDT 2024


Hi Sascha,

On Wed, Oct 23, 2024 at 5:12 AM Sascha Hauer <s.hauer at pengutronix.de> wrote:
>
> Commits b2ab0edaf484 ("arm64: dts: imx93: add nvmem property for fec1")
> and 0d4fbaffbdca ("arm64: dts: imx93: add nvmem property for eqos")
> introduced NVMEM cell bindings for reading MAC addresses from the ELE
> OCOTP. This doesn't work as expected due to bugs in the driver:
>
> - imx_ocotp_reg_read() interprets the incoming offset as 32bit word
>   offset, but it really is in bytes which means the driver reads bogus
>   values whenever the offset is non zero
> - imx_ocotp_reg_read() reads wrong results when the offset is not 32bit
>   word aligned
> - MAC addresses are stored in reverse byte order in the ELE OCOTP, we
>   have to swap the order before passing them to the upper layer
>
> This likely went through unnoticed because the bootloader normally adds
> the MAC addresses to the ethernet nodes and in this case they are
> preferred over the NVMEM addresses.
>
> This series fixes these issues.

Patches 2, 3, and 4 should have a Fixes tag and Cc: stable.

Thanks



More information about the linux-arm-kernel mailing list