net: fsl_enetc: Add initial netc-blk-ctrl driver support
authorMarek Vasut <marex@denx.de>
Thu, 16 Jan 2025 04:03:28 +0000 (05:03 +0100)
committerFabio Estevam <festevam@gmail.com>
Mon, 20 Jan 2025 11:40:39 +0000 (08:40 -0300)
commit58b9e70f2d9144d9d8f579751b35417395366db2
treea37655ddf7ca004a0c199a55255c138db9685c25
parentdb7d2356dfd1e578532e1edd7459834b785b7930
net: fsl_enetc: Add initial netc-blk-ctrl driver support

The netc-blk-ctrl driver is used to configure Integrated Endpoint
Register Block (IERB) and Privileged Register Block (PRB) of NETC.
For i.MX platforms, it is also used to configure the NETCMIX block.

The IERB contains registers that are used for pre-boot initialization,
debug, and non-customer configuration. The PRB controls global reset
and global error handling for NETC. The NETCMIX block is mainly used
to set MII protocol and PCS protocol of the links, it also contains
settings for some other functions.

Note the IERB configuration registers can only be written after being
unlocked by PRB, otherwise, all write operations are inhibited. A warm
reset is performed when the IERB is unlocked, and it results in an FLR
to all NETC devices. Therefore, all NETC device drivers must be probed
or initialized after the warm reset is finished.

Ported from Linux 6.13-rc as of commit
fe5ba6bf91b3 ("net: enetc: add initial netc-blk-ctrl driver support")

Signed-off-by: Marek Vasut <marex@denx.de>
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/fsl_enetc_netc_blk_ctrl.c [new file with mode: 0644]