diff options
| author | Kyle Hendry <kylehendrydev@gmail.com> | 2025-07-23 20:52:44 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-07-25 14:07:33 -0700 |
| commit | c251304ab021ff21c77e83e0babcb9eb76f8787a (patch) | |
| tree | f407657f2882fba52e70dd5bd2b167d2a9805b2f | |
| parent | net: dsa: b53: mmap: Add syscon reference and register layout for bcm63268 (diff) | |
| download | linux-c251304ab021ff21c77e83e0babcb9eb76f8787a.tar.gz linux-c251304ab021ff21c77e83e0babcb9eb76f8787a.zip | |
net: dsa: b53: mmap: Add register layout for bcm6318
Add ephy register info for bcm6318, which also applies to
bcm6328 and bcm6362.
Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20250724035300.20497-6-kylehendrydev@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/dsa/b53/b53_mmap.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_mmap.c b/drivers/net/dsa/b53/b53_mmap.c index 35bf39ab2771..51303f075a1f 100644 --- a/drivers/net/dsa/b53/b53_mmap.c +++ b/drivers/net/dsa/b53/b53_mmap.c @@ -40,6 +40,15 @@ struct b53_mmap_priv { const struct b53_phy_info *phy_info; }; +static const u32 bcm6318_ephy_offsets[] = {4, 5, 6, 7}; + +static const struct b53_phy_info bcm6318_ephy_info = { + .ephy_enable_mask = BIT(0) | BIT(4) | BIT(8) | BIT(12) | BIT(16), + .ephy_port_mask = GENMASK((ARRAY_SIZE(bcm6318_ephy_offsets) - 1), 0), + .ephy_bias_bit = 24, + .ephy_offset = bcm6318_ephy_offsets, +}; + static const u32 bcm63268_ephy_offsets[] = {4, 9, 14}; static const struct b53_phy_info bcm63268_ephy_info = { @@ -334,7 +343,11 @@ static int b53_mmap_probe(struct platform_device *pdev) priv->gpio_ctrl = syscon_regmap_lookup_by_phandle(np, "brcm,gpio-ctrl"); if (!IS_ERR(priv->gpio_ctrl)) { - if (pdata->chip_id == BCM63268_DEVICE_ID) + if (pdata->chip_id == BCM6318_DEVICE_ID || + pdata->chip_id == BCM6328_DEVICE_ID || + pdata->chip_id == BCM6362_DEVICE_ID) + priv->phy_info = &bcm6318_ephy_info; + else if (pdata->chip_id == BCM63268_DEVICE_ID) priv->phy_info = &bcm63268_ephy_info; } |
