Introduce support for AN7583 ethernet controller to airoha-eth dirver. The main differences between EN7581 and AN7583 is the latter runs a single PPE module while EN7581 runs two of them. Moreover PPE SRAM in AN7583 SoC is reduced to 8K (while SRAM is 16K on EN7581). --- Changes in v2: - rely on IS_ENABLED(CONFIG_NET_AIROHA_FLOW_STATS) instead of ifedef CONFIG_NET_AIROHA_FLOW_STATS in airoha_ppe_get_num_stats_entries routine - return number of stats_entries from airoha_ppe_get_num_stats_entries() and airoha_ppe_get_total_num_stats_entries() - remove magic number in airoha_ppe_foe_commit_sram_entry routine - improve code readability in airhoha_set_gdm2_loopback routine adding some macros - improve commit logs - remove magic numbers in airoha_ppe_foe_get_entry_locked() - Link to v1: https://lore.kernel.org/r/20251015-an7583-eth-support-v1-0-064855f05923@xxxxxxxxxx --- Lorenzo Bianconi (13): dt-bindings: net: airoha: Add AN7583 support net: airoha: ppe: Dynamically allocate foe_check_time array in airoha_ppe struct net: airoha: Add airoha_ppe_get_num_stats_entries() and airoha_ppe_get_num_total_stats_entries() net: airoha: Add airoha_eth_soc_data struct net: airoha: Generalize airoha_ppe2_is_enabled routine net: airoha: ppe: Move PPE memory info in airoha_eth_soc_data struct net: airoha: ppe: Remove airoha_ppe_is_enabled() where not necessary net: airoha: ppe: Configure SRAM PPE entries via the cpu net: airoha: ppe: Flush PPE SRAM table during PPE setup net: airoha: Select default ppe cpu port in airoha_dev_init() net: airoha: Refactor src port configuration in airhoha_set_gdm2_loopback net: airoha: ppe: Do not use magic numbers in airoha_ppe_foe_get_entry_locked() net: airoha: Add AN7583 SoC support .../devicetree/bindings/net/airoha,en7581-eth.yaml | 60 ++++- drivers/net/ethernet/airoha/airoha_eth.c | 254 ++++++++++++++------ drivers/net/ethernet/airoha/airoha_eth.h | 65 ++++-- drivers/net/ethernet/airoha/airoha_ppe.c | 259 ++++++++++++++------- drivers/net/ethernet/airoha/airoha_ppe_debugfs.c | 3 +- drivers/net/ethernet/airoha/airoha_regs.h | 6 +- 6 files changed, 456 insertions(+), 191 deletions(-) --- base-commit: 00922eeaca3c5c2001781bcad40e0bd54d0fdbb6 change-id: 20251004-an7583-eth-support-1a2f2d649380 Best regards, -- Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
