diff options
author | Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com> | 2022-11-07 14:59:18 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-11-09 13:06:01 +0000 |
commit | ef912fe443adfa15b88645b3bf58c92e5a364167 (patch) | |
tree | e07aeb92651a6f84417c0f28483147bdd32ccb62 /drivers/net/dsa/microchip/ksz_common.h | |
parent | 380f9acdf74729d79972b947820f00b42cc26dae (diff) |
net: dsa: microchip: add ksz9563 in ksz_switch_ops and select based on compatible string
Add KSZ9563 inside ksz_switch_chips structure with
port_nirq as 3. KSZ9563 use KSZ9893 switch parameters
but port_nirq count is 3 for KSZ9563 whereas 2 for
KSZ9893. Add KSZ9563 inside ksz_switch_chips as a separate
member and from device tree map compatible string into
KSZ9563 inside ksz_spi.c and ksz9477_i2c.c.
Global Chip ID 1 and 2 registers read value 9893, select
sku based on Global Chip ID 4 Register which read 0x1c
for KSZ9563.
Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 9cfa179575ce..c6726cbd5465 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -154,6 +154,7 @@ enum ksz_model { KSZ9896, KSZ9897, KSZ9893, + KSZ9563, KSZ9567, LAN9370, LAN9371, @@ -172,6 +173,7 @@ enum ksz_chip_id { KSZ9896_CHIP_ID = 0x00989600, KSZ9897_CHIP_ID = 0x00989700, KSZ9893_CHIP_ID = 0x00989300, + KSZ9563_CHIP_ID = 0x00956300, KSZ9567_CHIP_ID = 0x00956700, LAN9370_CHIP_ID = 0x00937000, LAN9371_CHIP_ID = 0x00937100, @@ -551,6 +553,7 @@ static inline int is_lan937x(struct ksz_device *dev) /* KSZ9893, KSZ9563, KSZ8563 specific register */ #define REG_CHIP_ID4 0x0f #define SKU_ID_KSZ8563 0x3c +#define SKU_ID_KSZ9563 0x1c /* Driver set switch broadcast storm protection at 10% rate. */ #define BROADCAST_STORM_PROT_RATE 10 |