* [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support
@ 2022-09-02 10:16 Romain Naour
2022-09-02 10:16 ` [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver Romain Naour
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Romain Naour @ 2022-09-02 10:16 UTC (permalink / raw)
To: netdev
Cc: pabeni, kuba, edumazet, davem, olteanv, f.fainelli,
vivien.didelot, andrew, UNGLinuxDriver, woojung.huh,
Romain Naour
From: Romain Naour <romain.naour@skf.com>
Add support for the KSZ9896 6-port Gigabit Ethernet Switch to the
ksz9477 driver.
Although the KSZ9896 is already listed in the device tree binding
documentation since a1c0ed24fe9b (dt-bindings: net: dsa: document
additional Microchip KSZ9477 family switches) the chip id
(0x00989600) is not recognized by ksz_switch_detect() and rejected
by the driver.
The KSZ9896 is similar to KSZ9897 but has only one configurable
MII/RMII/RGMII/GMII cpu port.
Signed-off-by: Romain Naour <romain.naour@skf.com>
---
It seems that the KSZ9896 support has been sent to the kernel netdev
mailing list a while ago but no further patch was sent after the
initial review:
https://www.spinics.net/lists/netdev/msg554771.html
The initial testing with the ksz9896 was done on a 5.10 kernel
but due to recent changes in dsa microchip driver it was required
to rework this initial version for 6.0-rc2 kernel and development
tree net-next for the upcoming 6.1 kernel.
v3: rebase onto net-next kernel tree
Add gbit_capable setting for per-port Gbit detection
v2: remove duplicated SoB line
---
drivers/net/dsa/microchip/ksz_common.c | 31 ++++++++++++++++++++++++++
drivers/net/dsa/microchip/ksz_common.h | 2 ++
drivers/net/dsa/microchip/ksz_spi.c | 6 +++++
3 files changed, 39 insertions(+)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 37fb5ba2cd7a..02fb721c1090 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -965,6 +965,35 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.rd_table = &ksz9477_register_set,
},
+ [KSZ9896] = {
+ .chip_id = KSZ9896_CHIP_ID,
+ .dev_name = "KSZ9896",
+ .num_vlans = 4096,
+ .num_alus = 4096,
+ .num_statics = 16,
+ .cpu_ports = 0x3F, /* can be configured as cpu port */
+ .port_cnt = 6, /* total physical port count */
+ .ops = &ksz9477_dev_ops,
+ .phy_errata_9477 = true,
+ .mib_names = ksz9477_mib_names,
+ .mib_cnt = ARRAY_SIZE(ksz9477_mib_names),
+ .reg_mib_cnt = MIB_COUNTER_NUM,
+ .regs = ksz9477_regs,
+ .masks = ksz9477_masks,
+ .shifts = ksz9477_shifts,
+ .xmii_ctrl0 = ksz9477_xmii_ctrl0,
+ .xmii_ctrl1 = ksz9477_xmii_ctrl1,
+ .supports_mii = {false, false, false, false,
+ false, true},
+ .supports_rmii = {false, false, false, false,
+ false, true},
+ .supports_rgmii = {false, false, false, false,
+ false, true},
+ .internal_phy = {true, true, true, true,
+ true, false},
+ .gbit_capable = {true, true, true, true, true, true},
+ },
+
[KSZ9897] = {
.chip_id = KSZ9897_CHIP_ID,
.dev_name = "KSZ9897",
@@ -1798,6 +1827,7 @@ static enum dsa_tag_protocol ksz_get_tag_protocol(struct dsa_switch *ds,
proto = DSA_TAG_PROTO_KSZ9893;
if (dev->chip_id == KSZ9477_CHIP_ID ||
+ dev->chip_id == KSZ9896_CHIP_ID ||
dev->chip_id == KSZ9897_CHIP_ID ||
dev->chip_id == KSZ9567_CHIP_ID)
proto = DSA_TAG_PROTO_KSZ9477;
@@ -2159,6 +2189,7 @@ static int ksz_switch_detect(struct ksz_device *dev)
switch (id32) {
case KSZ9477_CHIP_ID:
+ case KSZ9896_CHIP_ID:
case KSZ9897_CHIP_ID:
case KSZ9567_CHIP_ID:
case LAN9370_CHIP_ID:
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h
index c01989c04d4e..6efd2cdbd0bb 100644
--- a/drivers/net/dsa/microchip/ksz_common.h
+++ b/drivers/net/dsa/microchip/ksz_common.h
@@ -130,6 +130,7 @@ enum ksz_model {
KSZ8765,
KSZ8830,
KSZ9477,
+ KSZ9896,
KSZ9897,
KSZ9893,
KSZ9567,
@@ -147,6 +148,7 @@ enum ksz_chip_id {
KSZ8765_CHIP_ID = 0x8765,
KSZ8830_CHIP_ID = 0x8830,
KSZ9477_CHIP_ID = 0x00947700,
+ KSZ9896_CHIP_ID = 0x00989600,
KSZ9897_CHIP_ID = 0x00989700,
KSZ9893_CHIP_ID = 0x00989300,
KSZ9567_CHIP_ID = 0x00956700,
diff --git a/drivers/net/dsa/microchip/ksz_spi.c b/drivers/net/dsa/microchip/ksz_spi.c
index 44c2d9912406..bf7cb269118c 100644
--- a/drivers/net/dsa/microchip/ksz_spi.c
+++ b/drivers/net/dsa/microchip/ksz_spi.c
@@ -149,6 +149,10 @@ static const struct of_device_id ksz_dt_ids[] = {
.compatible = "microchip,ksz9477",
.data = &ksz_switch_chips[KSZ9477]
},
+ {
+ .compatible = "microchip,ksz9896",
+ .data = &ksz_switch_chips[KSZ9896]
+ },
{
.compatible = "microchip,ksz9897",
.data = &ksz_switch_chips[KSZ9897]
@@ -200,6 +204,7 @@ static const struct spi_device_id ksz_spi_ids[] = {
{ "ksz8863" },
{ "ksz8873" },
{ "ksz9477" },
+ { "ksz9896" },
{ "ksz9897" },
{ "ksz9893" },
{ "ksz9563" },
@@ -229,6 +234,7 @@ static struct spi_driver ksz_spi_driver = {
module_spi_driver(ksz_spi_driver);
MODULE_ALIAS("spi:ksz9477");
+MODULE_ALIAS("spi:ksz9896");
MODULE_ALIAS("spi:ksz9897");
MODULE_ALIAS("spi:ksz9893");
MODULE_ALIAS("spi:ksz9563");
--
2.34.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver
2022-09-02 10:16 [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support Romain Naour
@ 2022-09-02 10:16 ` Romain Naour
2022-09-02 13:39 ` Arun.Ramadoss
2022-09-02 10:16 ` [PATCH v3: net-next 3/4] net: dsa: microchip: ksz9477: remove 0x033C and 0x033D addresses from regmap_access_tables Romain Naour
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Romain Naour @ 2022-09-02 10:16 UTC (permalink / raw)
To: netdev
Cc: pabeni, kuba, edumazet, davem, olteanv, f.fainelli,
vivien.didelot, andrew, UNGLinuxDriver, woojung.huh,
Romain Naour
From: Romain Naour <romain.naour@skf.com>
Add support for the KSZ9896 6-port Gigabit Ethernet Switch to the
ksz9477 driver. The KSZ9896 supports both SPI (already in) and I2C.
Signed-off-by: Romain Naour <romain.naour@skf.com>
---
The KSZ9896 support i2c interface, it seems safe to enable as is but
runtime testing is really needed (my KSZ9896 is wired with spi).
v2: remove duplicated SoB line
---
drivers/net/dsa/microchip/ksz9477_i2c.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c b/drivers/net/dsa/microchip/ksz9477_i2c.c
index 99966514d444..8fbc122e3384 100644
--- a/drivers/net/dsa/microchip/ksz9477_i2c.c
+++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
@@ -91,6 +91,10 @@ static const struct of_device_id ksz9477_dt_ids[] = {
.compatible = "microchip,ksz9477",
.data = &ksz_switch_chips[KSZ9477]
},
+ {
+ .compatible = "microchip,ksz9896",
+ .data = &ksz_switch_chips[KSZ9896]
+ },
{
.compatible = "microchip,ksz9897",
.data = &ksz_switch_chips[KSZ9897]
--
2.34.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3: net-next 3/4] net: dsa: microchip: ksz9477: remove 0x033C and 0x033D addresses from regmap_access_tables
2022-09-02 10:16 [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support Romain Naour
2022-09-02 10:16 ` [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver Romain Naour
@ 2022-09-02 10:16 ` Romain Naour
2022-09-02 11:29 ` Oleksij Rempel
2022-09-02 10:16 ` [PATCH v3: net-next 4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip Romain Naour
2022-09-07 10:00 ` [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support patchwork-bot+netdevbpf
3 siblings, 1 reply; 10+ messages in thread
From: Romain Naour @ 2022-09-02 10:16 UTC (permalink / raw)
To: netdev
Cc: pabeni, kuba, edumazet, davem, olteanv, f.fainelli,
vivien.didelot, andrew, UNGLinuxDriver, woojung.huh,
Romain Naour, Oleksij Rempel
From: Romain Naour <romain.naour@skf.com>
According to the KSZ9477S datasheet, there is no global register
at 0x033C and 0x033D addresses.
Signed-off-by: Romain Naour <romain.naour@skf.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>
---
drivers/net/dsa/microchip/ksz_common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 02fb721c1090..a700631130e0 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -546,7 +546,8 @@ static const struct regmap_range ksz9477_valid_regs[] = {
regmap_reg_range(0x0302, 0x031b),
regmap_reg_range(0x0320, 0x032b),
regmap_reg_range(0x0330, 0x0336),
- regmap_reg_range(0x0338, 0x033e),
+ regmap_reg_range(0x0338, 0x033b),
+ regmap_reg_range(0x033e, 0x033e),
regmap_reg_range(0x0340, 0x035f),
regmap_reg_range(0x0370, 0x0370),
regmap_reg_range(0x0378, 0x0378),
--
2.34.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v3: net-next 4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip
2022-09-02 10:16 [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support Romain Naour
2022-09-02 10:16 ` [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver Romain Naour
2022-09-02 10:16 ` [PATCH v3: net-next 3/4] net: dsa: microchip: ksz9477: remove 0x033C and 0x033D addresses from regmap_access_tables Romain Naour
@ 2022-09-02 10:16 ` Romain Naour
2022-09-02 13:33 ` Arun.Ramadoss
2022-09-07 10:00 ` [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support patchwork-bot+netdevbpf
3 siblings, 1 reply; 10+ messages in thread
From: Romain Naour @ 2022-09-02 10:16 UTC (permalink / raw)
To: netdev
Cc: pabeni, kuba, edumazet, davem, olteanv, f.fainelli,
vivien.didelot, andrew, UNGLinuxDriver, woojung.huh,
Romain Naour
From: Romain Naour <romain.naour@skf.com>
Add register validation for KSZ9896.
Signed-off-by: Romain Naour <romain.naour@skf.com>
---
drivers/net/dsa/microchip/ksz_common.c | 215 +++++++++++++++++++++++++
1 file changed, 215 insertions(+)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index a700631130e0..7389837ddd84 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -802,6 +802,219 @@ static const struct regmap_access_table ksz9477_register_set = {
.n_yes_ranges = ARRAY_SIZE(ksz9477_valid_regs),
};
+static const struct regmap_range ksz9896_valid_regs[] = {
+ regmap_reg_range(0x0000, 0x0003),
+ regmap_reg_range(0x0006, 0x0006),
+ regmap_reg_range(0x0010, 0x001f),
+ regmap_reg_range(0x0100, 0x0100),
+ regmap_reg_range(0x0103, 0x0107),
+ regmap_reg_range(0x010d, 0x010d),
+ regmap_reg_range(0x0110, 0x0113),
+ regmap_reg_range(0x0120, 0x0127),
+ regmap_reg_range(0x0201, 0x0201),
+ regmap_reg_range(0x0210, 0x0213),
+ regmap_reg_range(0x0300, 0x0300),
+ regmap_reg_range(0x0302, 0x030b),
+ regmap_reg_range(0x0310, 0x031b),
+ regmap_reg_range(0x0320, 0x032b),
+ regmap_reg_range(0x0330, 0x0336),
+ regmap_reg_range(0x0338, 0x033b),
+ regmap_reg_range(0x033e, 0x033e),
+ regmap_reg_range(0x0340, 0x035f),
+ regmap_reg_range(0x0370, 0x0370),
+ regmap_reg_range(0x0378, 0x0378),
+ regmap_reg_range(0x037c, 0x037d),
+ regmap_reg_range(0x0390, 0x0393),
+ regmap_reg_range(0x0400, 0x040e),
+ regmap_reg_range(0x0410, 0x042f),
+
+ /* port 1 */
+ regmap_reg_range(0x1000, 0x1001),
+ regmap_reg_range(0x1013, 0x1013),
+ regmap_reg_range(0x1017, 0x1017),
+ regmap_reg_range(0x101b, 0x101b),
+ regmap_reg_range(0x101f, 0x1020),
+ regmap_reg_range(0x1030, 0x1030),
+ regmap_reg_range(0x1100, 0x1115),
+ regmap_reg_range(0x111a, 0x111f),
+ regmap_reg_range(0x1122, 0x1127),
+ regmap_reg_range(0x112a, 0x112b),
+ regmap_reg_range(0x1136, 0x1139),
+ regmap_reg_range(0x113e, 0x113f),
+ regmap_reg_range(0x1400, 0x1401),
+ regmap_reg_range(0x1403, 0x1403),
+ regmap_reg_range(0x1410, 0x1417),
+ regmap_reg_range(0x1420, 0x1423),
+ regmap_reg_range(0x1500, 0x1507),
+ regmap_reg_range(0x1600, 0x1612),
+ regmap_reg_range(0x1800, 0x180f),
+ regmap_reg_range(0x1820, 0x1827),
+ regmap_reg_range(0x1830, 0x1837),
+ regmap_reg_range(0x1840, 0x184b),
+ regmap_reg_range(0x1900, 0x1907),
+ regmap_reg_range(0x1914, 0x1915),
+ regmap_reg_range(0x1a00, 0x1a03),
+ regmap_reg_range(0x1a04, 0x1a07),
+ regmap_reg_range(0x1b00, 0x1b01),
+ regmap_reg_range(0x1b04, 0x1b04),
+
+ /* port 2 */
+ regmap_reg_range(0x2000, 0x2001),
+ regmap_reg_range(0x2013, 0x2013),
+ regmap_reg_range(0x2017, 0x2017),
+ regmap_reg_range(0x201b, 0x201b),
+ regmap_reg_range(0x201f, 0x2020),
+ regmap_reg_range(0x2030, 0x2030),
+ regmap_reg_range(0x2100, 0x2115),
+ regmap_reg_range(0x211a, 0x211f),
+ regmap_reg_range(0x2122, 0x2127),
+ regmap_reg_range(0x212a, 0x212b),
+ regmap_reg_range(0x2136, 0x2139),
+ regmap_reg_range(0x213e, 0x213f),
+ regmap_reg_range(0x2400, 0x2401),
+ regmap_reg_range(0x2403, 0x2403),
+ regmap_reg_range(0x2410, 0x2417),
+ regmap_reg_range(0x2420, 0x2423),
+ regmap_reg_range(0x2500, 0x2507),
+ regmap_reg_range(0x2600, 0x2612),
+ regmap_reg_range(0x2800, 0x280f),
+ regmap_reg_range(0x2820, 0x2827),
+ regmap_reg_range(0x2830, 0x2837),
+ regmap_reg_range(0x2840, 0x284b),
+ regmap_reg_range(0x2900, 0x2907),
+ regmap_reg_range(0x2914, 0x2915),
+ regmap_reg_range(0x2a00, 0x2a03),
+ regmap_reg_range(0x2a04, 0x2a07),
+ regmap_reg_range(0x2b00, 0x2b01),
+ regmap_reg_range(0x2b04, 0x2b04),
+
+ /* port 3 */
+ regmap_reg_range(0x3000, 0x3001),
+ regmap_reg_range(0x3013, 0x3013),
+ regmap_reg_range(0x3017, 0x3017),
+ regmap_reg_range(0x301b, 0x301b),
+ regmap_reg_range(0x301f, 0x3020),
+ regmap_reg_range(0x3030, 0x3030),
+ regmap_reg_range(0x3100, 0x3115),
+ regmap_reg_range(0x311a, 0x311f),
+ regmap_reg_range(0x3122, 0x3127),
+ regmap_reg_range(0x312a, 0x312b),
+ regmap_reg_range(0x3136, 0x3139),
+ regmap_reg_range(0x313e, 0x313f),
+ regmap_reg_range(0x3400, 0x3401),
+ regmap_reg_range(0x3403, 0x3403),
+ regmap_reg_range(0x3410, 0x3417),
+ regmap_reg_range(0x3420, 0x3423),
+ regmap_reg_range(0x3500, 0x3507),
+ regmap_reg_range(0x3600, 0x3612),
+ regmap_reg_range(0x3800, 0x380f),
+ regmap_reg_range(0x3820, 0x3827),
+ regmap_reg_range(0x3830, 0x3837),
+ regmap_reg_range(0x3840, 0x384b),
+ regmap_reg_range(0x3900, 0x3907),
+ regmap_reg_range(0x3914, 0x3915),
+ regmap_reg_range(0x3a00, 0x3a03),
+ regmap_reg_range(0x3a04, 0x3a07),
+ regmap_reg_range(0x3b00, 0x3b01),
+ regmap_reg_range(0x3b04, 0x3b04),
+
+ /* port 4 */
+ regmap_reg_range(0x4000, 0x4001),
+ regmap_reg_range(0x4013, 0x4013),
+ regmap_reg_range(0x4017, 0x4017),
+ regmap_reg_range(0x401b, 0x401b),
+ regmap_reg_range(0x401f, 0x4020),
+ regmap_reg_range(0x4030, 0x4030),
+ regmap_reg_range(0x4100, 0x4115),
+ regmap_reg_range(0x411a, 0x411f),
+ regmap_reg_range(0x4122, 0x4127),
+ regmap_reg_range(0x412a, 0x412b),
+ regmap_reg_range(0x4136, 0x4139),
+ regmap_reg_range(0x413e, 0x413f),
+ regmap_reg_range(0x4400, 0x4401),
+ regmap_reg_range(0x4403, 0x4403),
+ regmap_reg_range(0x4410, 0x4417),
+ regmap_reg_range(0x4420, 0x4423),
+ regmap_reg_range(0x4500, 0x4507),
+ regmap_reg_range(0x4600, 0x4612),
+ regmap_reg_range(0x4800, 0x480f),
+ regmap_reg_range(0x4820, 0x4827),
+ regmap_reg_range(0x4830, 0x4837),
+ regmap_reg_range(0x4840, 0x484b),
+ regmap_reg_range(0x4900, 0x4907),
+ regmap_reg_range(0x4914, 0x4915),
+ regmap_reg_range(0x4a00, 0x4a03),
+ regmap_reg_range(0x4a04, 0x4a07),
+ regmap_reg_range(0x4b00, 0x4b01),
+ regmap_reg_range(0x4b04, 0x4b04),
+
+ /* port 5 */
+ regmap_reg_range(0x5000, 0x5001),
+ regmap_reg_range(0x5013, 0x5013),
+ regmap_reg_range(0x5017, 0x5017),
+ regmap_reg_range(0x501b, 0x501b),
+ regmap_reg_range(0x501f, 0x5020),
+ regmap_reg_range(0x5030, 0x5030),
+ regmap_reg_range(0x5100, 0x5115),
+ regmap_reg_range(0x511a, 0x511f),
+ regmap_reg_range(0x5122, 0x5127),
+ regmap_reg_range(0x512a, 0x512b),
+ regmap_reg_range(0x5136, 0x5139),
+ regmap_reg_range(0x513e, 0x513f),
+ regmap_reg_range(0x5400, 0x5401),
+ regmap_reg_range(0x5403, 0x5403),
+ regmap_reg_range(0x5410, 0x5417),
+ regmap_reg_range(0x5420, 0x5423),
+ regmap_reg_range(0x5500, 0x5507),
+ regmap_reg_range(0x5600, 0x5612),
+ regmap_reg_range(0x5800, 0x580f),
+ regmap_reg_range(0x5820, 0x5827),
+ regmap_reg_range(0x5830, 0x5837),
+ regmap_reg_range(0x5840, 0x584b),
+ regmap_reg_range(0x5900, 0x5907),
+ regmap_reg_range(0x5914, 0x5915),
+ regmap_reg_range(0x5a00, 0x5a03),
+ regmap_reg_range(0x5a04, 0x5a07),
+ regmap_reg_range(0x5b00, 0x5b01),
+ regmap_reg_range(0x5b04, 0x5b04),
+
+ /* port 6 */
+ regmap_reg_range(0x6000, 0x6001),
+ regmap_reg_range(0x6013, 0x6013),
+ regmap_reg_range(0x6017, 0x6017),
+ regmap_reg_range(0x601b, 0x601b),
+ regmap_reg_range(0x601f, 0x6020),
+ regmap_reg_range(0x6030, 0x6030),
+ regmap_reg_range(0x6100, 0x6115),
+ regmap_reg_range(0x611a, 0x611f),
+ regmap_reg_range(0x6122, 0x6127),
+ regmap_reg_range(0x612a, 0x612b),
+ regmap_reg_range(0x6136, 0x6139),
+ regmap_reg_range(0x613e, 0x613f),
+ regmap_reg_range(0x6300, 0x6301),
+ regmap_reg_range(0x6400, 0x6401),
+ regmap_reg_range(0x6403, 0x6403),
+ regmap_reg_range(0x6410, 0x6417),
+ regmap_reg_range(0x6420, 0x6423),
+ regmap_reg_range(0x6500, 0x6507),
+ regmap_reg_range(0x6600, 0x6612),
+ regmap_reg_range(0x6800, 0x680f),
+ regmap_reg_range(0x6820, 0x6827),
+ regmap_reg_range(0x6830, 0x6837),
+ regmap_reg_range(0x6840, 0x684b),
+ regmap_reg_range(0x6900, 0x6907),
+ regmap_reg_range(0x6914, 0x6915),
+ regmap_reg_range(0x6a00, 0x6a03),
+ regmap_reg_range(0x6a04, 0x6a07),
+ regmap_reg_range(0x6b00, 0x6b01),
+ regmap_reg_range(0x6b04, 0x6b04),
+};
+
+static const struct regmap_access_table ksz9896_register_set = {
+ .yes_ranges = ksz9896_valid_regs,
+ .n_yes_ranges = ARRAY_SIZE(ksz9896_valid_regs),
+};
+
const struct ksz_chip_data ksz_switch_chips[] = {
[KSZ8563] = {
.chip_id = KSZ8563_CHIP_ID,
@@ -993,6 +1206,8 @@ const struct ksz_chip_data ksz_switch_chips[] = {
.internal_phy = {true, true, true, true,
true, false},
.gbit_capable = {true, true, true, true, true, true},
+ .wr_table = &ksz9896_register_set,
+ .rd_table = &ksz9896_register_set,
},
[KSZ9897] = {
--
2.34.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3: net-next 3/4] net: dsa: microchip: ksz9477: remove 0x033C and 0x033D addresses from regmap_access_tables
2022-09-02 10:16 ` [PATCH v3: net-next 3/4] net: dsa: microchip: ksz9477: remove 0x033C and 0x033D addresses from regmap_access_tables Romain Naour
@ 2022-09-02 11:29 ` Oleksij Rempel
0 siblings, 0 replies; 10+ messages in thread
From: Oleksij Rempel @ 2022-09-02 11:29 UTC (permalink / raw)
To: Romain Naour
Cc: netdev, pabeni, kuba, edumazet, davem, olteanv, f.fainelli,
vivien.didelot, andrew, UNGLinuxDriver, woojung.huh,
Romain Naour
On Fri, Sep 02, 2022 at 12:16:09PM +0200, Romain Naour wrote:
> From: Romain Naour <romain.naour@skf.com>
>
> According to the KSZ9477S datasheet, there is no global register
> at 0x033C and 0x033D addresses.
>
> Signed-off-by: Romain Naour <romain.naour@skf.com>
> Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/net/dsa/microchip/ksz_common.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
> index 02fb721c1090..a700631130e0 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -546,7 +546,8 @@ static const struct regmap_range ksz9477_valid_regs[] = {
> regmap_reg_range(0x0302, 0x031b),
> regmap_reg_range(0x0320, 0x032b),
> regmap_reg_range(0x0330, 0x0336),
> - regmap_reg_range(0x0338, 0x033e),
> + regmap_reg_range(0x0338, 0x033b),
> + regmap_reg_range(0x033e, 0x033e),
> regmap_reg_range(0x0340, 0x035f),
> regmap_reg_range(0x0370, 0x0370),
> regmap_reg_range(0x0378, 0x0378),
> --
> 2.34.3
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3: net-next 4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip
2022-09-02 10:16 ` [PATCH v3: net-next 4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip Romain Naour
@ 2022-09-02 13:33 ` Arun.Ramadoss
2022-09-02 17:20 ` Romain Naour
0 siblings, 1 reply; 10+ messages in thread
From: Arun.Ramadoss @ 2022-09-02 13:33 UTC (permalink / raw)
To: netdev, romain.naour
Cc: olteanv, andrew, UNGLinuxDriver, vivien.didelot, f.fainelli,
kuba, pabeni, edumazet, Woojung.Huh, romain.naour, davem
On Fri, 2022-09-02 at 12:16 +0200, Romain Naour wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> From: Romain Naour <romain.naour@skf.com>
>
> Add register validation for KSZ9896.
>
Hi Oleksij,
Do we have any support for regular expression support for the
regmap_reg_range, since all the ports have same register configuration
except the port number in the msb. Becaue If I need to add regmap
validation for lan937x which has 5 variant with port count from 4 to 8
it will increase the file size. Do we need to move the register map to
other file or adding in ksz_common.c itself is fine.
> Signed-off-by: Romain Naour <romain.naour@skf.com>
> ---
> drivers/net/dsa/microchip/ksz_common.c | 215
> +++++++++++++++++++++++++
> 1 file changed, 215 insertions(+)
>
> diff --git a/drivers/net/dsa/microchip/ksz_common.c
> b/drivers/net/dsa/microchip/ksz_common.c
> index a700631130e0..7389837ddd84 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -802,6 +802,219 @@ static const struct regmap_access_table
> ksz9477_register_set = {
> .n_yes_ranges = ARRAY_SIZE(ksz9477_valid_regs),
> };
>
> +static const struct regmap_range ksz9896_valid_regs[] = {
> + regmap_reg_range(0x0000, 0x0003),
> + regmap_reg_range(0x0006, 0x0006),
> + regmap_reg_range(0x0010, 0x001f),
> + regmap_reg_range(0x0100, 0x0100),
> + regmap_reg_range(0x0103, 0x0107),
> + regmap_reg_range(0x010d, 0x010d),
> + regmap_reg_range(0x0110, 0x0113),
> + regmap_reg_range(0x0120, 0x0127),
> + regmap_reg_range(0x0201, 0x0201),
> + regmap_reg_range(0x0210, 0x0213),
> + regmap_reg_range(0x0300, 0x0300),
> + regmap_reg_range(0x0302, 0x030b),
> + regmap_reg_range(0x0310, 0x031b),
> + regmap_reg_range(0x0320, 0x032b),
> + regmap_reg_range(0x0330, 0x0336),
> + regmap_reg_range(0x0338, 0x033b),
> + regmap_reg_range(0x033e, 0x033e),
> + regmap_reg_range(0x0340, 0x035f),
> + regmap_reg_range(0x0370, 0x0370),
> + regmap_reg_range(0x0378, 0x0378),
> + regmap_reg_range(0x037c, 0x037d),
> + regmap_reg_range(0x0390, 0x0393),
> + regmap_reg_range(0x0400, 0x040e),
> + regmap_reg_range(0x0410, 0x042f),
> +
> + /* port 1 */
> + regmap_reg_range(0x1000, 0x1001),
> + regmap_reg_range(0x1013, 0x1013),
> + regmap_reg_range(0x1017, 0x1017),
> + regmap_reg_range(0x101b, 0x101b),
> + regmap_reg_range(0x101f, 0x1020),
> + regmap_reg_range(0x1030, 0x1030),
> + regmap_reg_range(0x1100, 0x1115),
> + regmap_reg_range(0x111a, 0x111f),
> + regmap_reg_range(0x1122, 0x1127),
> + regmap_reg_range(0x112a, 0x112b),
> + regmap_reg_range(0x1136, 0x1139),
> + regmap_reg_range(0x113e, 0x113f),
> + regmap_reg_range(0x1400, 0x1401),
> + regmap_reg_range(0x1403, 0x1403),
> + regmap_reg_range(0x1410, 0x1417),
> + regmap_reg_range(0x1420, 0x1423),
> + regmap_reg_range(0x1500, 0x1507),
> + regmap_reg_range(0x1600, 0x1612),
> + regmap_reg_range(0x1800, 0x180f),
> + regmap_reg_range(0x1820, 0x1827),
> + regmap_reg_range(0x1830, 0x1837),
> + regmap_reg_range(0x1840, 0x184b),
> + regmap_reg_range(0x1900, 0x1907),
> + regmap_reg_range(0x1914, 0x1915),
> + regmap_reg_range(0x1a00, 0x1a03),
> + regmap_reg_range(0x1a04, 0x1a07),
> + regmap_reg_range(0x1b00, 0x1b01),
> + regmap_reg_range(0x1b04, 0x1b04),
> +
> + /* port 2 */
> + regmap_reg_range(0x2000, 0x2001),
> + regmap_reg_range(0x2013, 0x2013),
> + regmap_reg_range(0x2017, 0x2017),
> + regmap_reg_range(0x201b, 0x201b),
> + regmap_reg_range(0x201f, 0x2020),
> + regmap_reg_range(0x2030, 0x2030),
> + regmap_reg_range(0x2100, 0x2115),
> + regmap_reg_range(0x211a, 0x211f),
> + regmap_reg_range(0x2122, 0x2127),
> + regmap_reg_range(0x212a, 0x212b),
> + regmap_reg_range(0x2136, 0x2139),
> + regmap_reg_range(0x213e, 0x213f),
> + regmap_reg_range(0x2400, 0x2401),
> + regmap_reg_range(0x2403, 0x2403),
> + regmap_reg_range(0x2410, 0x2417),
> + regmap_reg_range(0x2420, 0x2423),
> + regmap_reg_range(0x2500, 0x2507),
> + regmap_reg_range(0x2600, 0x2612),
> + regmap_reg_range(0x2800, 0x280f),
> + regmap_reg_range(0x2820, 0x2827),
> + regmap_reg_range(0x2830, 0x2837),
> + regmap_reg_range(0x2840, 0x284b),
> + regmap_reg_range(0x2900, 0x2907),
> + regmap_reg_range(0x2914, 0x2915),
> + regmap_reg_range(0x2a00, 0x2a03),
> + regmap_reg_range(0x2a04, 0x2a07),
> + regmap_reg_range(0x2b00, 0x2b01),
> + regmap_reg_range(0x2b04, 0x2b04),
> +
> + /* port 3 */
> + regmap_reg_range(0x3000, 0x3001),
> + regmap_reg_range(0x3013, 0x3013),
> + regmap_reg_range(0x3017, 0x3017),
> + regmap_reg_range(0x301b, 0x301b),
> + regmap_reg_range(0x301f, 0x3020),
> + regmap_reg_range(0x3030, 0x3030),
> + regmap_reg_range(0x3100, 0x3115),
> + regmap_reg_range(0x311a, 0x311f),
> + regmap_reg_range(0x3122, 0x3127),
> + regmap_reg_range(0x312a, 0x312b),
> + regmap_reg_range(0x3136, 0x3139),
> + regmap_reg_range(0x313e, 0x313f),
> + regmap_reg_range(0x3400, 0x3401),
> + regmap_reg_range(0x3403, 0x3403),
> + regmap_reg_range(0x3410, 0x3417),
> + regmap_reg_range(0x3420, 0x3423),
> + regmap_reg_range(0x3500, 0x3507),
> + regmap_reg_range(0x3600, 0x3612),
> + regmap_reg_range(0x3800, 0x380f),
> + regmap_reg_range(0x3820, 0x3827),
> + regmap_reg_range(0x3830, 0x3837),
> + regmap_reg_range(0x3840, 0x384b),
> + regmap_reg_range(0x3900, 0x3907),
> + regmap_reg_range(0x3914, 0x3915),
> + regmap_reg_range(0x3a00, 0x3a03),
> + regmap_reg_range(0x3a04, 0x3a07),
> + regmap_reg_range(0x3b00, 0x3b01),
> + regmap_reg_range(0x3b04, 0x3b04),
> +
> + /* port 4 */
> + regmap_reg_range(0x4000, 0x4001),
> + regmap_reg_range(0x4013, 0x4013),
> + regmap_reg_range(0x4017, 0x4017),
> + regmap_reg_range(0x401b, 0x401b),
> + regmap_reg_range(0x401f, 0x4020),
> + regmap_reg_range(0x4030, 0x4030),
> + regmap_reg_range(0x4100, 0x4115),
> + regmap_reg_range(0x411a, 0x411f),
> + regmap_reg_range(0x4122, 0x4127),
> + regmap_reg_range(0x412a, 0x412b),
> + regmap_reg_range(0x4136, 0x4139),
> + regmap_reg_range(0x413e, 0x413f),
> + regmap_reg_range(0x4400, 0x4401),
> + regmap_reg_range(0x4403, 0x4403),
> + regmap_reg_range(0x4410, 0x4417),
> + regmap_reg_range(0x4420, 0x4423),
> + regmap_reg_range(0x4500, 0x4507),
> + regmap_reg_range(0x4600, 0x4612),
> + regmap_reg_range(0x4800, 0x480f),
> + regmap_reg_range(0x4820, 0x4827),
> + regmap_reg_range(0x4830, 0x4837),
> + regmap_reg_range(0x4840, 0x484b),
> + regmap_reg_range(0x4900, 0x4907),
> + regmap_reg_range(0x4914, 0x4915),
> + regmap_reg_range(0x4a00, 0x4a03),
> + regmap_reg_range(0x4a04, 0x4a07),
> + regmap_reg_range(0x4b00, 0x4b01),
> + regmap_reg_range(0x4b04, 0x4b04),
> +
> + /* port 5 */
> + regmap_reg_range(0x5000, 0x5001),
> + regmap_reg_range(0x5013, 0x5013),
> + regmap_reg_range(0x5017, 0x5017),
> + regmap_reg_range(0x501b, 0x501b),
> + regmap_reg_range(0x501f, 0x5020),
> + regmap_reg_range(0x5030, 0x5030),
> + regmap_reg_range(0x5100, 0x5115),
> + regmap_reg_range(0x511a, 0x511f),
> + regmap_reg_range(0x5122, 0x5127),
> + regmap_reg_range(0x512a, 0x512b),
> + regmap_reg_range(0x5136, 0x5139),
> + regmap_reg_range(0x513e, 0x513f),
> + regmap_reg_range(0x5400, 0x5401),
> + regmap_reg_range(0x5403, 0x5403),
> + regmap_reg_range(0x5410, 0x5417),
> + regmap_reg_range(0x5420, 0x5423),
> + regmap_reg_range(0x5500, 0x5507),
> + regmap_reg_range(0x5600, 0x5612),
> + regmap_reg_range(0x5800, 0x580f),
> + regmap_reg_range(0x5820, 0x5827),
> + regmap_reg_range(0x5830, 0x5837),
> + regmap_reg_range(0x5840, 0x584b),
> + regmap_reg_range(0x5900, 0x5907),
> + regmap_reg_range(0x5914, 0x5915),
> + regmap_reg_range(0x5a00, 0x5a03),
> + regmap_reg_range(0x5a04, 0x5a07),
> + regmap_reg_range(0x5b00, 0x5b01),
> + regmap_reg_range(0x5b04, 0x5b04),
> +
> + /* port 6 */
> + regmap_reg_range(0x6000, 0x6001),
> + regmap_reg_range(0x6013, 0x6013),
> + regmap_reg_range(0x6017, 0x6017),
> + regmap_reg_range(0x601b, 0x601b),
> + regmap_reg_range(0x601f, 0x6020),
> + regmap_reg_range(0x6030, 0x6030),
> + regmap_reg_range(0x6100, 0x6115),
> + regmap_reg_range(0x611a, 0x611f),
> + regmap_reg_range(0x6122, 0x6127),
> + regmap_reg_range(0x612a, 0x612b),
> + regmap_reg_range(0x6136, 0x6139),
> + regmap_reg_range(0x613e, 0x613f),
> + regmap_reg_range(0x6300, 0x6301),
> + regmap_reg_range(0x6400, 0x6401),
> + regmap_reg_range(0x6403, 0x6403),
> + regmap_reg_range(0x6410, 0x6417),
> + regmap_reg_range(0x6420, 0x6423),
> + regmap_reg_range(0x6500, 0x6507),
> + regmap_reg_range(0x6600, 0x6612),
> + regmap_reg_range(0x6800, 0x680f),
> + regmap_reg_range(0x6820, 0x6827),
> + regmap_reg_range(0x6830, 0x6837),
> + regmap_reg_range(0x6840, 0x684b),
> + regmap_reg_range(0x6900, 0x6907),
> + regmap_reg_range(0x6914, 0x6915),
> + regmap_reg_range(0x6a00, 0x6a03),
> + regmap_reg_range(0x6a04, 0x6a07),
> + regmap_reg_range(0x6b00, 0x6b01),
> + regmap_reg_range(0x6b04, 0x6b04),
> +};
> +
> +static const struct regmap_access_table ksz9896_register_set = {
> + .yes_ranges = ksz9896_valid_regs,
> + .n_yes_ranges = ARRAY_SIZE(ksz9896_valid_regs),
> +};
> +
> const struct ksz_chip_data ksz_switch_chips[] = {
> [KSZ8563] = {
> .chip_id = KSZ8563_CHIP_ID,
> @@ -993,6 +1206,8 @@ const struct ksz_chip_data ksz_switch_chips[] =
> {
> .internal_phy = {true, true, true, true,
> true, false},
> .gbit_capable = {true, true, true, true, true,
> true},
> + .wr_table = &ksz9896_register_set,
> + .rd_table = &ksz9896_register_set,
> },
>
> [KSZ9897] = {
> --
> 2.34.3
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver
2022-09-02 10:16 ` [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver Romain Naour
@ 2022-09-02 13:39 ` Arun.Ramadoss
2022-09-02 17:23 ` Romain Naour
0 siblings, 1 reply; 10+ messages in thread
From: Arun.Ramadoss @ 2022-09-02 13:39 UTC (permalink / raw)
To: netdev, romain.naour
Cc: olteanv, andrew, UNGLinuxDriver, vivien.didelot, f.fainelli,
kuba, pabeni, edumazet, Woojung.Huh, romain.naour, davem
On Fri, 2022-09-02 at 12:16 +0200, Romain Naour wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
>
> From: Romain Naour <romain.naour@skf.com>
>
> Add support for the KSZ9896 6-port Gigabit Ethernet Switch to the
> ksz9477 driver. The KSZ9896 supports both SPI (already in) and I2C.
>
> Signed-off-by: Romain Naour <romain.naour@skf.com>
> ---
> The KSZ9896 support i2c interface, it seems safe to enable as is but
> runtime testing is really needed (my KSZ9896 is wired with spi).
>
> v2: remove duplicated SoB line
> ---
> drivers/net/dsa/microchip/ksz9477_i2c.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c
> b/drivers/net/dsa/microchip/ksz9477_i2c.c
> index 99966514d444..8fbc122e3384 100644
> --- a/drivers/net/dsa/microchip/ksz9477_i2c.c
> +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
> @@ -91,6 +91,10 @@ static const struct of_device_id ksz9477_dt_ids[]
> = {
> .compatible = "microchip,ksz9477",
> .data = &ksz_switch_chips[KSZ9477]
> },
> + {
> + .compatible = "microchip,ksz9896",
> + .data = &ksz_switch_chips[KSZ9896]
> + },
Do we need to add the compatible in ksz_spi interface as well, since
ksz9896 supports both i2c and spi interface.
> {
> .compatible = "microchip,ksz9897",
> .data = &ksz_switch_chips[KSZ9897]
> --
> 2.34.3
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3: net-next 4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip
2022-09-02 13:33 ` Arun.Ramadoss
@ 2022-09-02 17:20 ` Romain Naour
0 siblings, 0 replies; 10+ messages in thread
From: Romain Naour @ 2022-09-02 17:20 UTC (permalink / raw)
To: Arun.Ramadoss, netdev
Cc: olteanv, andrew, UNGLinuxDriver, vivien.didelot, f.fainelli,
kuba, pabeni, edumazet, Woojung.Huh, romain.naour, davem
Hi Arun,
Le 02/09/2022 à 15:33, Arun.Ramadoss@microchip.com a écrit :
> On Fri, 2022-09-02 at 12:16 +0200, Romain Naour wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you
>> know the content is safe
>>
>> From: Romain Naour <romain.naour@skf.com>
>>
>> Add register validation for KSZ9896.
>>
>
> Hi Oleksij,
> Do we have any support for regular expression support for the
> regmap_reg_range, since all the ports have same register configuration
> except the port number in the msb. Becaue If I need to add regmap
> validation for lan937x which has 5 variant with port count from 4 to 8
> it will increase the file size. Do we need to move the register map to
> other file or adding in ksz_common.c itself is fine.
>
Notice that the cpu port is special, it has two extra registers (XMII Port Control)
regmap_reg_range(0x6300, 0x6301)
Best regards,
Romain
>> +
>> + /* port 5 */
>> + regmap_reg_range(0x5000, 0x5001),
>> + regmap_reg_range(0x5013, 0x5013),
>> + regmap_reg_range(0x5017, 0x5017),
>> + regmap_reg_range(0x501b, 0x501b),
>> + regmap_reg_range(0x501f, 0x5020),
>> + regmap_reg_range(0x5030, 0x5030),
>> + regmap_reg_range(0x5100, 0x5115),
>> + regmap_reg_range(0x511a, 0x511f),
>> + regmap_reg_range(0x5122, 0x5127),
>> + regmap_reg_range(0x512a, 0x512b),
>> + regmap_reg_range(0x5136, 0x5139),
>> + regmap_reg_range(0x513e, 0x513f),
>> + regmap_reg_range(0x5400, 0x5401),
>> + regmap_reg_range(0x5403, 0x5403),
>> + regmap_reg_range(0x5410, 0x5417),
>> + regmap_reg_range(0x5420, 0x5423),
>> + regmap_reg_range(0x5500, 0x5507),
>> + regmap_reg_range(0x5600, 0x5612),
>> + regmap_reg_range(0x5800, 0x580f),
>> + regmap_reg_range(0x5820, 0x5827),
>> + regmap_reg_range(0x5830, 0x5837),
>> + regmap_reg_range(0x5840, 0x584b),
>> + regmap_reg_range(0x5900, 0x5907),
>> + regmap_reg_range(0x5914, 0x5915),
>> + regmap_reg_range(0x5a00, 0x5a03),
>> + regmap_reg_range(0x5a04, 0x5a07),
>> + regmap_reg_range(0x5b00, 0x5b01),
>> + regmap_reg_range(0x5b04, 0x5b04),
>> +
>> + /* port 6 */
>> + regmap_reg_range(0x6000, 0x6001),
>> + regmap_reg_range(0x6013, 0x6013),
>> + regmap_reg_range(0x6017, 0x6017),
>> + regmap_reg_range(0x601b, 0x601b),
>> + regmap_reg_range(0x601f, 0x6020),
>> + regmap_reg_range(0x6030, 0x6030),
>> + regmap_reg_range(0x6100, 0x6115),
>> + regmap_reg_range(0x611a, 0x611f),
>> + regmap_reg_range(0x6122, 0x6127),
>> + regmap_reg_range(0x612a, 0x612b),
>> + regmap_reg_range(0x6136, 0x6139),
>> + regmap_reg_range(0x613e, 0x613f),
>> + regmap_reg_range(0x6300, 0x6301),
>> + regmap_reg_range(0x6400, 0x6401),
>> + regmap_reg_range(0x6403, 0x6403),
>> + regmap_reg_range(0x6410, 0x6417),
>> + regmap_reg_range(0x6420, 0x6423),
>> + regmap_reg_range(0x6500, 0x6507),
>> + regmap_reg_range(0x6600, 0x6612),
>> + regmap_reg_range(0x6800, 0x680f),
>> + regmap_reg_range(0x6820, 0x6827),
>> + regmap_reg_range(0x6830, 0x6837),
>> + regmap_reg_range(0x6840, 0x684b),
>> + regmap_reg_range(0x6900, 0x6907),
>> + regmap_reg_range(0x6914, 0x6915),
>> + regmap_reg_range(0x6a00, 0x6a03),
>> + regmap_reg_range(0x6a04, 0x6a07),
>> + regmap_reg_range(0x6b00, 0x6b01),
>> + regmap_reg_range(0x6b04, 0x6b04),
>> +};
>> +
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver
2022-09-02 13:39 ` Arun.Ramadoss
@ 2022-09-02 17:23 ` Romain Naour
0 siblings, 0 replies; 10+ messages in thread
From: Romain Naour @ 2022-09-02 17:23 UTC (permalink / raw)
To: Arun.Ramadoss, netdev
Cc: olteanv, andrew, UNGLinuxDriver, vivien.didelot, f.fainelli,
kuba, pabeni, edumazet, Woojung.Huh, romain.naour, davem
Hi Arun,
Le 02/09/2022 à 15:39, Arun.Ramadoss@microchip.com a écrit :
> On Fri, 2022-09-02 at 12:16 +0200, Romain Naour wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you
>> know the content is safe
>>
>> From: Romain Naour <romain.naour@skf.com>
>>
>> Add support for the KSZ9896 6-port Gigabit Ethernet Switch to the
>> ksz9477 driver. The KSZ9896 supports both SPI (already in) and I2C.
>>
>> Signed-off-by: Romain Naour <romain.naour@skf.com>
>> ---
>> The KSZ9896 support i2c interface, it seems safe to enable as is but
>> runtime testing is really needed (my KSZ9896 is wired with spi).
>>
>> v2: remove duplicated SoB line
>> ---
>> drivers/net/dsa/microchip/ksz9477_i2c.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c
>> b/drivers/net/dsa/microchip/ksz9477_i2c.c
>> index 99966514d444..8fbc122e3384 100644
>> --- a/drivers/net/dsa/microchip/ksz9477_i2c.c
>> +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
>> @@ -91,6 +91,10 @@ static const struct of_device_id ksz9477_dt_ids[]
>> = {
>> .compatible = "microchip,ksz9477",
>> .data = &ksz_switch_chips[KSZ9477]
>> },
>> + {
>> + .compatible = "microchip,ksz9896",
>> + .data = &ksz_switch_chips[KSZ9896]
>> + },
>
> Do we need to add the compatible in ksz_spi interface as well, since
> ksz9896 supports both i2c and spi interface.
That's what the first patch does.
Thanks for your review.
Best regards,
Romain
>
>> {
>> .compatible = "microchip,ksz9897",
>> .data = &ksz_switch_chips[KSZ9897]
>> --
>> 2.34.3
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support
2022-09-02 10:16 [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support Romain Naour
` (2 preceding siblings ...)
2022-09-02 10:16 ` [PATCH v3: net-next 4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip Romain Naour
@ 2022-09-07 10:00 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-07 10:00 UTC (permalink / raw)
To: Romain Naour
Cc: netdev, pabeni, kuba, edumazet, davem, olteanv, f.fainelli,
vivien.didelot, andrew, UNGLinuxDriver, woojung.huh,
romain.naour
Hello:
This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Fri, 2 Sep 2022 12:16:07 +0200 you wrote:
> From: Romain Naour <romain.naour@skf.com>
>
> Add support for the KSZ9896 6-port Gigabit Ethernet Switch to the
> ksz9477 driver.
>
> Although the KSZ9896 is already listed in the device tree binding
> documentation since a1c0ed24fe9b (dt-bindings: net: dsa: document
> additional Microchip KSZ9477 family switches) the chip id
> (0x00989600) is not recognized by ksz_switch_detect() and rejected
> by the driver.
>
> [...]
Here is the summary with links:
- [v3:,net-next,1/4] net: dsa: microchip: add KSZ9896 switch support
https://git.kernel.org/netdev/net-next/c/2eb3ff3c0908
- [v3:,net-next,2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver
https://git.kernel.org/netdev/net-next/c/13767525929d
- [v3:,net-next,3/4] net: dsa: microchip: ksz9477: remove 0x033C and 0x033D addresses from regmap_access_tables
https://git.kernel.org/netdev/net-next/c/3a8b8ea6c7c2
- [v3:,net-next,4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip
https://git.kernel.org/netdev/net-next/c/6674e7fd3bea
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-09-07 10:00 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-02 10:16 [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support Romain Naour
2022-09-02 10:16 ` [PATCH v3: net-next 2/4] net: dsa: microchip: add KSZ9896 to KSZ9477 I2C driver Romain Naour
2022-09-02 13:39 ` Arun.Ramadoss
2022-09-02 17:23 ` Romain Naour
2022-09-02 10:16 ` [PATCH v3: net-next 3/4] net: dsa: microchip: ksz9477: remove 0x033C and 0x033D addresses from regmap_access_tables Romain Naour
2022-09-02 11:29 ` Oleksij Rempel
2022-09-02 10:16 ` [PATCH v3: net-next 4/4] net: dsa: microchip: add regmap_range for KSZ9896 chip Romain Naour
2022-09-02 13:33 ` Arun.Ramadoss
2022-09-02 17:20 ` Romain Naour
2022-09-07 10:00 ` [PATCH v3: net-next 1/4] net: dsa: microchip: add KSZ9896 switch support patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.