Commit graph

8 commits

Author SHA1 Message Date
Gerard Marull-Paretas 691facc20f include: always use <> for Zephyr includes
Double quotes "" should only be used for local headers.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2023-09-14 13:49:58 +02:00
Fabio Baltieri f2e275639d ethernet: smsc91x: rework the device node hierarchy
Rework the devicetree definition for smsc91x to put the mdio and
ethernet device at the same level, and make the phy a child of the mdio
node.

This allows matching up the device initialization sequence with the
devicetree hierarchy.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-16 14:52:31 +02:00
Fabio Baltieri e9e111b513 ethernet: smsc91x: fix a build warning
Move few variable inside a case statement to avoid build warning for
unused variables in some specific configuration.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-08-16 14:52:31 +02:00
Huifeng Zhang 0cf26615db drivers: eth_smsc91x: Fix the missing of selecting bank 3
Fix the missing of selecting bank 3 at the beginning of the function
`smsc_miibus_writereg`.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-07-27 13:27:47 +02:00
Ambroise Vincent b6af1ac66e drivers: eth_smsc91x: Implement promiscuous mode
Add the RCR_PRMS field to toggle the promiscuous mode in the Ethernet
controller.

Register a set_config function that can make use of the field when
CONFIG_NET_PROMISCUOUS_MODE is enabled.

Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
2023-07-10 15:14:33 +02:00
Luca Fancellu d36cbab7ae drivers: eth_smsc91x: Fix compilation error for assert
Fix a compilation error for the ethernet driver smsc91x that
prevents the build with asserts enabled.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
2023-05-16 11:18:22 -05:00
Gerard Marull-Paretas 1eb683a514 device: remove redundant init functions
Remove all init functions that do nothing, and provide a `NULL` to
*DEVICE*DEFINE* macros.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-04-19 10:00:25 +02:00
Huifeng Zhang 28ff3e1d8c drivers: eth_smsc91x: Add driver for SMSC91C111 aka LAN91C111 chip
Arm fvp_baser_aemv8r and fvp_base_revc_2xaemv8a boards are using
SMSC91C111 as their ethernet adapters.

Portions of the codes are based on FreeBSD code from its
'src/sys/dev/smc/if_smc.c' and 'src/sys/dev/smc/if_smcreg.h'.

This driver has two parts, one is the ethernet controller driver, which
is MAC layer driver. The other is the MDIO driver, which is the PHY
layer driver. Both of them are in the same source file due to that they
need to share the same reading and writing register functions and
the smsc object.

The mdio driver is needed by the existing 'phy_mii' driver, which is
a driver for the generic MII-compliant PHY.

This driver was developed under the fvp_base_revc_2xaemv8a target and
has been tested on the fvp_baser_aemv8r target.

Signed-off-by: Huifeng Zhang <Huifeng.Zhang@arm.com>
2023-04-11 11:27:05 +02:00