[net-next,1/6] net: dsa: microchip: lan937x: add regmap range validation

Message ID 20221102041058.128779-2-rakesh.sankaranarayanan@microchip.com
State New
Headers
Series net: dsa: microchip: regmap range validation and ksz_pwrite status check for lan937x and irq and error checking updates for ksz series |

Commit Message

Rakesh Sankaranarayanan Nov. 2, 2022, 4:10 a.m. UTC
  Add regmap_range and regmap_access_table to define valid
register range for LAN937x switch family. LAN937x family
have sku id's LAN9370, LAN9371, LAN9372, LAN9373 and
LAN9374. regmap_range structure is arranged as Global
Registers followed by Port Registers but they are distributed
as Global Registers, T1 PHY Port Registers, Tx PHY Port Registers,
RGMII Port Registers, SGMII Port Registers. On 16 bit addressing,
most significant 4 bits are used for representing port number.
So valid range of two different T1 PHY ports within a sku
will differ on upper nibble only.

Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
---
 drivers/net/dsa/microchip/ksz_common.c | 1760 ++++++++++++++++++++++++
 1 file changed, 1760 insertions(+)
  

Comments

Florian Fainelli Nov. 2, 2022, 5:15 p.m. UTC | #1
On 11/1/22 21:10, Rakesh Sankaranarayanan wrote:
> Add regmap_range and regmap_access_table to define valid
> register range for LAN937x switch family. LAN937x family
> have sku id's LAN9370, LAN9371, LAN9372, LAN9373 and
> LAN9374. regmap_range structure is arranged as Global
> Registers followed by Port Registers but they are distributed
> as Global Registers, T1 PHY Port Registers, Tx PHY Port Registers,
> RGMII Port Registers, SGMII Port Registers. On 16 bit addressing,
> most significant 4 bits are used for representing port number.
> So valid range of two different T1 PHY ports within a sku
> will differ on upper nibble only.
> 
> Signed-off-by: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
> ---
>   drivers/net/dsa/microchip/ksz_common.c | 1760 ++++++++++++++++++++++++
>   1 file changed, 1760 insertions(+)
> 
> diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
> index d612181b3226..b0905c5b701d 100644
> --- a/drivers/net/dsa/microchip/ksz_common.c
> +++ b/drivers/net/dsa/microchip/ksz_common.c
> @@ -1030,6 +1030,1756 @@ static const struct regmap_access_table ksz9896_register_set = {
>   	.n_yes_ranges = ARRAY_SIZE(ksz9896_valid_regs),
>   };
>   
> +static const struct regmap_range lan9370_valid_regs[] = {

Suggest you employ some macros for generating the valid register ranges 
for ports since there is a lot of repetition, and chances are that new 
registers may have to be added in the future, or corrected.

Between the fact that regmap makes you pull an entire subsystem into the 
kernel image thus adding to code sections, plus these big tables of 
register ranges adding to read-only data sections, this really makes me 
wonder what benefit there is just to expose a debugfs interface for 
dumping registers... value proposition does not seem so great to me.
  
Rakesh Sankaranarayanan Nov. 3, 2022, 8:44 a.m. UTC | #2
On Wed, 2022-11-02 at 10:15 -0700, Florian Fainelli wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> On 11/1/22 21:10, Rakesh Sankaranarayanan wrote:
> > Add regmap_range and regmap_access_table to define valid
> > register range for LAN937x switch family. LAN937x family
> > have sku id's LAN9370, LAN9371, LAN9372, LAN9373 and
> > LAN9374. regmap_range structure is arranged as Global
> > Registers followed by Port Registers but they are distributed
> > as Global Registers, T1 PHY Port Registers, Tx PHY Port Registers,
> > RGMII Port Registers, SGMII Port Registers. On 16 bit addressing,
> > most significant 4 bits are used for representing port number.
> > So valid range of two different T1 PHY ports within a sku
> > will differ on upper nibble only.
> > 
> > Signed-off-by: Rakesh Sankaranarayanan
> > <rakesh.sankaranarayanan@microchip.com>
> > ---
> >   drivers/net/dsa/microchip/ksz_common.c | 1760
> > ++++++++++++++++++++++++
> >   1 file changed, 1760 insertions(+)
> > 
> > diff --git a/drivers/net/dsa/microchip/ksz_common.c
> > b/drivers/net/dsa/microchip/ksz_common.c
> > index d612181b3226..b0905c5b701d 100644
> > --- a/drivers/net/dsa/microchip/ksz_common.c
> > +++ b/drivers/net/dsa/microchip/ksz_common.c
> > @@ -1030,6 +1030,1756 @@ static const struct regmap_access_table
> > ksz9896_register_set = {
> >       .n_yes_ranges = ARRAY_SIZE(ksz9896_valid_regs),
> >   };
> > 
> > +static const struct regmap_range lan9370_valid_regs[] = {
> 
> Suggest you employ some macros for generating the valid register
> ranges
> for ports since there is a lot of repetition, and chances are that
> new
> registers may have to be added in the future, or corrected.
> 
> Between the fact that regmap makes you pull an entire subsystem into
> the
> kernel image thus adding to code sections, plus these big tables of
> register ranges adding to read-only data sections, this really makes
> me
> wonder what benefit there is just to expose a debugfs interface for
> dumping registers... value proposition does not seem so great to me.
> --
> Florian
> 

Thanks for the comment, Florian.

Changes added to have register range validation for lan937x series, I
tried adding common MACRO's instead of individual tables. It will
reduce lines of code and make it easier for any future modifications.
But anyway, finally it is going to expand as individual tables.
Considering this, I will remove this patch from series from next
revision.

But out of curiosity, I have seen usage of regmap_range tables in
kernel for the register range validation. Do you think that, is it
really required to have this check? or any other better approach?

Thanks,
Rakesh S
  

Patch

diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index d612181b3226..b0905c5b701d 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -1030,6 +1030,1756 @@  static const struct regmap_access_table ksz9896_register_set = {
 	.n_yes_ranges = ARRAY_SIZE(ksz9896_valid_regs),
 };
 
+static const struct regmap_range lan9370_valid_regs[] = {
+	regmap_reg_range(0x0000, 0x0003),
+	regmap_reg_range(0x0007, 0x0007),
+	regmap_reg_range(0x000f, 0x0027),
+	regmap_reg_range(0x0030, 0x0035),
+	regmap_reg_range(0x0050, 0x005f),
+	regmap_reg_range(0x0100, 0x011b),
+	regmap_reg_range(0x0120, 0x0123),
+	regmap_reg_range(0x0128, 0x0140),
+	regmap_reg_range(0x0142, 0x0159),
+	regmap_reg_range(0x0200, 0x0203),
+	regmap_reg_range(0x0210, 0x0217),
+	regmap_reg_range(0x0300, 0x0300),
+	regmap_reg_range(0x0302, 0x0307),
+	regmap_reg_range(0x030a, 0x0336),
+	regmap_reg_range(0x0338, 0x033b),
+	regmap_reg_range(0x033e, 0x033e),
+	regmap_reg_range(0x0340, 0x0367),
+	regmap_reg_range(0x0370, 0x0370),
+	regmap_reg_range(0x0374, 0x0378),
+	regmap_reg_range(0x037c, 0x037d),
+	regmap_reg_range(0x0380, 0x0383),
+	regmap_reg_range(0x0390, 0x039b),
+	regmap_reg_range(0x03a4, 0x03b7),
+	regmap_reg_range(0x03e0, 0x03e3),
+	regmap_reg_range(0x03e8, 0x03eb),
+	regmap_reg_range(0x0400, 0x040e),
+	regmap_reg_range(0x0410, 0x0437),
+	regmap_reg_range(0x0440, 0x046f),
+	regmap_reg_range(0x0500, 0x054b),
+	regmap_reg_range(0x0550, 0x05b7),
+	regmap_reg_range(0x0640, 0x0645),
+	regmap_reg_range(0x0648, 0x064d),
+	regmap_reg_range(0x0650, 0x0655),
+	regmap_reg_range(0x0700, 0x07ff),
+	regmap_reg_range(0x0800, 0x088b),
+	regmap_reg_range(0x0900, 0x09ff),
+
+	/* Port 1 */
+	regmap_reg_range(0x1000, 0x1001),
+	regmap_reg_range(0x1004, 0x100b),
+	regmap_reg_range(0x101b, 0x101b),
+	regmap_reg_range(0x101f, 0x1021),
+	regmap_reg_range(0x1030, 0x1030),
+	regmap_reg_range(0x1040, 0x1040),
+	regmap_reg_range(0x1100, 0x111f),
+	regmap_reg_range(0x1200, 0x120b),
+	regmap_reg_range(0x1300, 0x1307),
+	regmap_reg_range(0x1400, 0x1405),
+	regmap_reg_range(0x1408, 0x1409),
+	regmap_reg_range(0x1410, 0x1417),
+	regmap_reg_range(0x1420, 0x1427),
+	regmap_reg_range(0x1500, 0x1507),
+	regmap_reg_range(0x1600, 0x1665),
+	regmap_reg_range(0x1668, 0x168f),
+	regmap_reg_range(0x1694, 0x169b),
+	regmap_reg_range(0x16a0, 0x16a2),
+	regmap_reg_range(0x16c0, 0x16c3),
+	regmap_reg_range(0x16d0, 0x16d4),
+	regmap_reg_range(0x16e0, 0x16ef),
+	regmap_reg_range(0x1800, 0x1804),
+	regmap_reg_range(0x1808, 0x180b),
+	regmap_reg_range(0x1810, 0x181f),
+	regmap_reg_range(0x1850, 0x1857),
+	regmap_reg_range(0x1860, 0x186b),
+	regmap_reg_range(0x1870, 0x188c),
+	regmap_reg_range(0x1890, 0x1890),
+	regmap_reg_range(0x1894, 0x18a0),
+	regmap_reg_range(0x18a0, 0x18ab),
+	regmap_reg_range(0x18c1, 0x18e7),
+	regmap_reg_range(0x1900, 0x1907),
+	regmap_reg_range(0x1914, 0x1920),
+	regmap_reg_range(0x1923, 0x1936),
+	regmap_reg_range(0x1938, 0x193d),
+	regmap_reg_range(0x1940, 0x1941),
+	regmap_reg_range(0x1944, 0x1953),
+	regmap_reg_range(0x1a00, 0x1a1b),
+	regmap_reg_range(0x1b00, 0x1b04),
+	regmap_reg_range(0x1b08, 0x1b13),
+	regmap_reg_range(0x1c00, 0x1c05),
+	regmap_reg_range(0x1c08, 0x1c1b),
+
+	/* Port 2 */
+	regmap_reg_range(0x2000, 0x2001),
+	regmap_reg_range(0x2004, 0x200b),
+	regmap_reg_range(0x201b, 0x201b),
+	regmap_reg_range(0x201f, 0x2021),
+	regmap_reg_range(0x2030, 0x2030),
+	regmap_reg_range(0x2040, 0x2040),
+	regmap_reg_range(0x2100, 0x211f),
+	regmap_reg_range(0x2200, 0x220b),
+	regmap_reg_range(0x2300, 0x2307),
+	regmap_reg_range(0x2400, 0x2405),
+	regmap_reg_range(0x2408, 0x2409),
+	regmap_reg_range(0x2410, 0x2417),
+	regmap_reg_range(0x2420, 0x2427),
+	regmap_reg_range(0x2500, 0x2507),
+	regmap_reg_range(0x2600, 0x2665),
+	regmap_reg_range(0x2668, 0x268f),
+	regmap_reg_range(0x2694, 0x269b),
+	regmap_reg_range(0x26a0, 0x26a2),
+	regmap_reg_range(0x26c0, 0x26c3),
+	regmap_reg_range(0x26d0, 0x26d4),
+	regmap_reg_range(0x26e0, 0x26ef),
+	regmap_reg_range(0x2800, 0x2804),
+	regmap_reg_range(0x2808, 0x280b),
+	regmap_reg_range(0x2810, 0x281f),
+	regmap_reg_range(0x2850, 0x2857),
+	regmap_reg_range(0x2860, 0x286b),
+	regmap_reg_range(0x2870, 0x288c),
+	regmap_reg_range(0x2890, 0x2890),
+	regmap_reg_range(0x2894, 0x28a0),
+	regmap_reg_range(0x28a0, 0x28ab),
+	regmap_reg_range(0x28c1, 0x28e7),
+	regmap_reg_range(0x2900, 0x2907),
+	regmap_reg_range(0x2914, 0x2920),
+	regmap_reg_range(0x2923, 0x2936),
+	regmap_reg_range(0x2938, 0x293d),
+	regmap_reg_range(0x2940, 0x2941),
+	regmap_reg_range(0x2944, 0x2953),
+	regmap_reg_range(0x2a00, 0x2a1b),
+	regmap_reg_range(0x2b00, 0x2b04),
+	regmap_reg_range(0x2b08, 0x2b13),
+	regmap_reg_range(0x2c00, 0x2c05),
+	regmap_reg_range(0x2c08, 0x2c1b),
+
+	/* Port 3 */
+	regmap_reg_range(0x3000, 0x3001),
+	regmap_reg_range(0x3004, 0x300b),
+	regmap_reg_range(0x301b, 0x301b),
+	regmap_reg_range(0x301f, 0x3021),
+	regmap_reg_range(0x3030, 0x3030),
+	regmap_reg_range(0x3040, 0x3040),
+	regmap_reg_range(0x3100, 0x311f),
+	regmap_reg_range(0x3200, 0x320b),
+	regmap_reg_range(0x3300, 0x3307),
+	regmap_reg_range(0x3400, 0x3405),
+	regmap_reg_range(0x3408, 0x3409),
+	regmap_reg_range(0x3410, 0x3417),
+	regmap_reg_range(0x3420, 0x3427),
+	regmap_reg_range(0x3500, 0x3507),
+	regmap_reg_range(0x3600, 0x3665),
+	regmap_reg_range(0x3668, 0x368f),
+	regmap_reg_range(0x3694, 0x369b),
+	regmap_reg_range(0x36a0, 0x36a2),
+	regmap_reg_range(0x36c0, 0x36c3),
+	regmap_reg_range(0x36d0, 0x36d4),
+	regmap_reg_range(0x36e0, 0x36ef),
+	regmap_reg_range(0x3800, 0x3804),
+	regmap_reg_range(0x3808, 0x380b),
+	regmap_reg_range(0x3810, 0x381f),
+	regmap_reg_range(0x3850, 0x3857),
+	regmap_reg_range(0x3860, 0x386b),
+	regmap_reg_range(0x3870, 0x388c),
+	regmap_reg_range(0x3890, 0x3890),
+	regmap_reg_range(0x3894, 0x38a0),
+	regmap_reg_range(0x38a0, 0x38ab),
+	regmap_reg_range(0x38c1, 0x38e7),
+	regmap_reg_range(0x3900, 0x3907),
+	regmap_reg_range(0x3914, 0x3920),
+	regmap_reg_range(0x3923, 0x3936),
+	regmap_reg_range(0x3938, 0x393d),
+	regmap_reg_range(0x3940, 0x3941),
+	regmap_reg_range(0x3944, 0x3953),
+	regmap_reg_range(0x3a00, 0x3a1b),
+	regmap_reg_range(0x3b00, 0x3b04),
+	regmap_reg_range(0x3b08, 0x3b13),
+	regmap_reg_range(0x3c00, 0x3c05),
+	regmap_reg_range(0x3c08, 0x3c1b),
+
+	/* Port 4 */
+	regmap_reg_range(0x4000, 0x4001),
+	regmap_reg_range(0x4004, 0x400b),
+	regmap_reg_range(0x401b, 0x401b),
+	regmap_reg_range(0x401f, 0x4021),
+	regmap_reg_range(0x4030, 0x4030),
+	regmap_reg_range(0x4040, 0x4040),
+	regmap_reg_range(0x4100, 0x411f),
+	regmap_reg_range(0x4200, 0x420b),
+	regmap_reg_range(0x4300, 0x4307),
+	regmap_reg_range(0x4400, 0x4405),
+	regmap_reg_range(0x4408, 0x4409),
+	regmap_reg_range(0x4410, 0x4417),
+	regmap_reg_range(0x4420, 0x4427),
+	regmap_reg_range(0x4500, 0x4507),
+	regmap_reg_range(0x4600, 0x4665),
+	regmap_reg_range(0x4668, 0x468f),
+	regmap_reg_range(0x4694, 0x469b),
+	regmap_reg_range(0x46a0, 0x46a2),
+	regmap_reg_range(0x46c0, 0x46c3),
+	regmap_reg_range(0x46d0, 0x46d4),
+	regmap_reg_range(0x46e0, 0x46ef),
+	regmap_reg_range(0x4800, 0x4804),
+	regmap_reg_range(0x4808, 0x480b),
+	regmap_reg_range(0x4810, 0x481f),
+	regmap_reg_range(0x4850, 0x4857),
+	regmap_reg_range(0x4860, 0x486b),
+	regmap_reg_range(0x4870, 0x488c),
+	regmap_reg_range(0x4890, 0x4890),
+	regmap_reg_range(0x4894, 0x48a0),
+	regmap_reg_range(0x48a0, 0x48ab),
+	regmap_reg_range(0x48c1, 0x48e7),
+	regmap_reg_range(0x4900, 0x4907),
+	regmap_reg_range(0x4914, 0x4920),
+	regmap_reg_range(0x4923, 0x4936),
+	regmap_reg_range(0x4938, 0x493d),
+	regmap_reg_range(0x4940, 0x4941),
+	regmap_reg_range(0x4944, 0x4953),
+	regmap_reg_range(0x4a00, 0x4a1b),
+	regmap_reg_range(0x4b00, 0x4b04),
+	regmap_reg_range(0x4b08, 0x4b13),
+	regmap_reg_range(0x4c00, 0x4c05),
+	regmap_reg_range(0x4c08, 0x4c1b),
+
+	/* Port 5 */
+	regmap_reg_range(0x5000, 0x5001),
+	regmap_reg_range(0x5004, 0x500b),
+	regmap_reg_range(0x501b, 0x501b),
+	regmap_reg_range(0x501f, 0x5021),
+	regmap_reg_range(0x5030, 0x5030),
+	regmap_reg_range(0x5040, 0x5040),
+	regmap_reg_range(0x5200, 0x520b),
+	regmap_reg_range(0x5300, 0x5307),
+	regmap_reg_range(0x5400, 0x5405),
+	regmap_reg_range(0x5408, 0x5409),
+	regmap_reg_range(0x5410, 0x5417),
+	regmap_reg_range(0x5420, 0x5427),
+	regmap_reg_range(0x5500, 0x5507),
+	regmap_reg_range(0x5600, 0x5665),
+	regmap_reg_range(0x5668, 0x568f),
+	regmap_reg_range(0x5694, 0x569b),
+	regmap_reg_range(0x56a0, 0x56a2),
+	regmap_reg_range(0x56c0, 0x56c3),
+	regmap_reg_range(0x56d0, 0x56d4),
+	regmap_reg_range(0x56e0, 0x56ef),
+	regmap_reg_range(0x5800, 0x5804),
+	regmap_reg_range(0x5808, 0x580b),
+	regmap_reg_range(0x5810, 0x581f),
+	regmap_reg_range(0x5850, 0x5857),
+	regmap_reg_range(0x5860, 0x586b),
+	regmap_reg_range(0x5870, 0x588c),
+	regmap_reg_range(0x5890, 0x5890),
+	regmap_reg_range(0x5894, 0x58a0),
+	regmap_reg_range(0x58a0, 0x58ab),
+	regmap_reg_range(0x58c1, 0x58e7),
+	regmap_reg_range(0x5900, 0x5907),
+	regmap_reg_range(0x5914, 0x5920),
+	regmap_reg_range(0x5923, 0x5936),
+	regmap_reg_range(0x5938, 0x593d),
+	regmap_reg_range(0x5940, 0x5941),
+	regmap_reg_range(0x5944, 0x5953),
+	regmap_reg_range(0x5a00, 0x5a1b),
+	regmap_reg_range(0x5b00, 0x5b04),
+	regmap_reg_range(0x5b08, 0x5b13),
+	regmap_reg_range(0x5c00, 0x5c05),
+	regmap_reg_range(0x5c08, 0x5c1b),
+};
+
+static const struct regmap_access_table lan9370_register_set = {
+	.yes_ranges = lan9370_valid_regs,
+	.n_yes_ranges = ARRAY_SIZE(lan9370_valid_regs),
+};
+
+static const struct regmap_range lan9371_valid_regs[] = {
+	regmap_reg_range(0x0000, 0x0003),
+	regmap_reg_range(0x0007, 0x0007),
+	regmap_reg_range(0x000f, 0x0027),
+	regmap_reg_range(0x0030, 0x0035),
+	regmap_reg_range(0x0050, 0x005f),
+	regmap_reg_range(0x0100, 0x011b),
+	regmap_reg_range(0x0120, 0x0123),
+	regmap_reg_range(0x0128, 0x0140),
+	regmap_reg_range(0x0142, 0x0159),
+	regmap_reg_range(0x0200, 0x0203),
+	regmap_reg_range(0x0210, 0x0217),
+	regmap_reg_range(0x0300, 0x0300),
+	regmap_reg_range(0x0302, 0x0307),
+	regmap_reg_range(0x030a, 0x0336),
+	regmap_reg_range(0x0338, 0x033b),
+	regmap_reg_range(0x033e, 0x033e),
+	regmap_reg_range(0x0340, 0x0367),
+	regmap_reg_range(0x0370, 0x0370),
+	regmap_reg_range(0x0374, 0x0378),
+	regmap_reg_range(0x037c, 0x037d),
+	regmap_reg_range(0x0380, 0x0383),
+	regmap_reg_range(0x0390, 0x039b),
+	regmap_reg_range(0x03a4, 0x03b7),
+	regmap_reg_range(0x03e0, 0x03e3),
+	regmap_reg_range(0x03e8, 0x03eb),
+	regmap_reg_range(0x0400, 0x040e),
+	regmap_reg_range(0x0410, 0x0437),
+	regmap_reg_range(0x0440, 0x046f),
+	regmap_reg_range(0x0500, 0x054b),
+	regmap_reg_range(0x0550, 0x05b7),
+	regmap_reg_range(0x0640, 0x0645),
+	regmap_reg_range(0x0648, 0x064d),
+	regmap_reg_range(0x0650, 0x0655),
+	regmap_reg_range(0x0700, 0x07ff),
+	regmap_reg_range(0x0800, 0x088b),
+	regmap_reg_range(0x0900, 0x09ff),
+
+	/* Port 1 */
+	regmap_reg_range(0x1000, 0x1001),
+	regmap_reg_range(0x1004, 0x100b),
+	regmap_reg_range(0x101b, 0x101b),
+	regmap_reg_range(0x101f, 0x1021),
+	regmap_reg_range(0x1030, 0x1030),
+	regmap_reg_range(0x1040, 0x1040),
+	regmap_reg_range(0x1100, 0x111f),
+	regmap_reg_range(0x1200, 0x120b),
+	regmap_reg_range(0x1300, 0x1307),
+	regmap_reg_range(0x1400, 0x1405),
+	regmap_reg_range(0x1408, 0x1409),
+	regmap_reg_range(0x1410, 0x1417),
+	regmap_reg_range(0x1420, 0x1427),
+	regmap_reg_range(0x1500, 0x1507),
+	regmap_reg_range(0x1600, 0x1665),
+	regmap_reg_range(0x1668, 0x168f),
+	regmap_reg_range(0x1694, 0x169b),
+	regmap_reg_range(0x16a0, 0x16a2),
+	regmap_reg_range(0x16c0, 0x16c3),
+	regmap_reg_range(0x16d0, 0x16d4),
+	regmap_reg_range(0x16e0, 0x16ef),
+	regmap_reg_range(0x1800, 0x1804),
+	regmap_reg_range(0x1808, 0x180b),
+	regmap_reg_range(0x1810, 0x181f),
+	regmap_reg_range(0x1850, 0x1857),
+	regmap_reg_range(0x1860, 0x186b),
+	regmap_reg_range(0x1870, 0x188c),
+	regmap_reg_range(0x1890, 0x1890),
+	regmap_reg_range(0x1894, 0x18a0),
+	regmap_reg_range(0x18a0, 0x18ab),
+	regmap_reg_range(0x18c1, 0x18e7),
+	regmap_reg_range(0x1900, 0x1907),
+	regmap_reg_range(0x1914, 0x1920),
+	regmap_reg_range(0x1923, 0x1936),
+	regmap_reg_range(0x1938, 0x193d),
+	regmap_reg_range(0x1940, 0x1941),
+	regmap_reg_range(0x1944, 0x1953),
+	regmap_reg_range(0x1a00, 0x1a1b),
+	regmap_reg_range(0x1b00, 0x1b04),
+	regmap_reg_range(0x1b08, 0x1b13),
+	regmap_reg_range(0x1c00, 0x1c05),
+	regmap_reg_range(0x1c08, 0x1c1b),
+
+	/* Port 2 */
+	regmap_reg_range(0x2000, 0x2001),
+	regmap_reg_range(0x2004, 0x200b),
+	regmap_reg_range(0x201b, 0x201b),
+	regmap_reg_range(0x201f, 0x2021),
+	regmap_reg_range(0x2030, 0x2030),
+	regmap_reg_range(0x2040, 0x2040),
+	regmap_reg_range(0x2100, 0x211f),
+	regmap_reg_range(0x2200, 0x220b),
+	regmap_reg_range(0x2300, 0x2307),
+	regmap_reg_range(0x2400, 0x2405),
+	regmap_reg_range(0x2408, 0x2409),
+	regmap_reg_range(0x2410, 0x2417),
+	regmap_reg_range(0x2420, 0x2427),
+	regmap_reg_range(0x2500, 0x2507),
+	regmap_reg_range(0x2600, 0x2665),
+	regmap_reg_range(0x2668, 0x268f),
+	regmap_reg_range(0x2694, 0x269b),
+	regmap_reg_range(0x26a0, 0x26a2),
+	regmap_reg_range(0x26c0, 0x26c3),
+	regmap_reg_range(0x26d0, 0x26d4),
+	regmap_reg_range(0x26e0, 0x26ef),
+	regmap_reg_range(0x2800, 0x2804),
+	regmap_reg_range(0x2808, 0x280b),
+	regmap_reg_range(0x2810, 0x281f),
+	regmap_reg_range(0x2850, 0x2857),
+	regmap_reg_range(0x2860, 0x286b),
+	regmap_reg_range(0x2870, 0x288c),
+	regmap_reg_range(0x2890, 0x2890),
+	regmap_reg_range(0x2894, 0x28a0),
+	regmap_reg_range(0x28a0, 0x28ab),
+	regmap_reg_range(0x28c1, 0x28e7),
+	regmap_reg_range(0x2900, 0x2907),
+	regmap_reg_range(0x2914, 0x2920),
+	regmap_reg_range(0x2923, 0x2936),
+	regmap_reg_range(0x2938, 0x293d),
+	regmap_reg_range(0x2940, 0x2941),
+	regmap_reg_range(0x2944, 0x2953),
+	regmap_reg_range(0x2a00, 0x2a1b),
+	regmap_reg_range(0x2b00, 0x2b04),
+	regmap_reg_range(0x2b08, 0x2b13),
+	regmap_reg_range(0x2c00, 0x2c05),
+	regmap_reg_range(0x2c08, 0x2c1b),
+
+	/* Port 3 */
+	regmap_reg_range(0x3000, 0x3001),
+	regmap_reg_range(0x3004, 0x300b),
+	regmap_reg_range(0x301b, 0x301b),
+	regmap_reg_range(0x301f, 0x3021),
+	regmap_reg_range(0x3030, 0x3030),
+	regmap_reg_range(0x3040, 0x3040),
+	regmap_reg_range(0x3100, 0x311f),
+	regmap_reg_range(0x3200, 0x320b),
+	regmap_reg_range(0x3300, 0x3307),
+	regmap_reg_range(0x3400, 0x3405),
+	regmap_reg_range(0x3408, 0x3409),
+	regmap_reg_range(0x3410, 0x3417),
+	regmap_reg_range(0x3420, 0x3427),
+	regmap_reg_range(0x3500, 0x3507),
+	regmap_reg_range(0x3600, 0x3665),
+	regmap_reg_range(0x3668, 0x368f),
+	regmap_reg_range(0x3694, 0x369b),
+	regmap_reg_range(0x36a0, 0x36a2),
+	regmap_reg_range(0x36c0, 0x36c3),
+	regmap_reg_range(0x36d0, 0x36d4),
+	regmap_reg_range(0x36e0, 0x36ef),
+	regmap_reg_range(0x3800, 0x3804),
+	regmap_reg_range(0x3808, 0x380b),
+	regmap_reg_range(0x3810, 0x381f),
+	regmap_reg_range(0x3850, 0x3857),
+	regmap_reg_range(0x3860, 0x386b),
+	regmap_reg_range(0x3870, 0x388c),
+	regmap_reg_range(0x3890, 0x3890),
+	regmap_reg_range(0x3894, 0x38a0),
+	regmap_reg_range(0x38a0, 0x38ab),
+	regmap_reg_range(0x38c1, 0x38e7),
+	regmap_reg_range(0x3900, 0x3907),
+	regmap_reg_range(0x3914, 0x3920),
+	regmap_reg_range(0x3923, 0x3936),
+	regmap_reg_range(0x3938, 0x393d),
+	regmap_reg_range(0x3940, 0x3941),
+	regmap_reg_range(0x3944, 0x3953),
+	regmap_reg_range(0x3a00, 0x3a1b),
+	regmap_reg_range(0x3b00, 0x3b04),
+	regmap_reg_range(0x3b08, 0x3b13),
+	regmap_reg_range(0x3c00, 0x3c05),
+	regmap_reg_range(0x3c08, 0x3c1b),
+
+	/* Port 4 */
+	regmap_reg_range(0x4000, 0x4001),
+	regmap_reg_range(0x4004, 0x400b),
+	regmap_reg_range(0x401b, 0x401b),
+	regmap_reg_range(0x401f, 0x4021),
+	regmap_reg_range(0x4030, 0x4030),
+	regmap_reg_range(0x4040, 0x4040),
+	regmap_reg_range(0x4200, 0x420b),
+	regmap_reg_range(0x4280, 0x42ff),
+	regmap_reg_range(0x4300, 0x4307),
+	regmap_reg_range(0x4400, 0x4405),
+	regmap_reg_range(0x4408, 0x4409),
+	regmap_reg_range(0x4410, 0x4417),
+	regmap_reg_range(0x4420, 0x4427),
+	regmap_reg_range(0x4500, 0x4507),
+	regmap_reg_range(0x4600, 0x4665),
+	regmap_reg_range(0x4668, 0x468f),
+	regmap_reg_range(0x4694, 0x469b),
+	regmap_reg_range(0x46a0, 0x46a2),
+	regmap_reg_range(0x46c0, 0x46c3),
+	regmap_reg_range(0x46d0, 0x46d4),
+	regmap_reg_range(0x46e0, 0x46ef),
+	regmap_reg_range(0x4800, 0x4804),
+	regmap_reg_range(0x4808, 0x480b),
+	regmap_reg_range(0x4810, 0x481f),
+	regmap_reg_range(0x4850, 0x4857),
+	regmap_reg_range(0x4860, 0x486b),
+	regmap_reg_range(0x4870, 0x488c),
+	regmap_reg_range(0x4890, 0x4890),
+	regmap_reg_range(0x4894, 0x48a0),
+	regmap_reg_range(0x48a0, 0x48ab),
+	regmap_reg_range(0x48c1, 0x48e7),
+	regmap_reg_range(0x4900, 0x4907),
+	regmap_reg_range(0x4914, 0x4920),
+	regmap_reg_range(0x4923, 0x4936),
+	regmap_reg_range(0x4938, 0x493d),
+	regmap_reg_range(0x4940, 0x4941),
+	regmap_reg_range(0x4944, 0x4953),
+	regmap_reg_range(0x4a00, 0x4a1b),
+	regmap_reg_range(0x4b00, 0x4b04),
+	regmap_reg_range(0x4b08, 0x4b13),
+	regmap_reg_range(0x4c00, 0x4c05),
+	regmap_reg_range(0x4c08, 0x4c1b),
+
+	/* Port 5 */
+	regmap_reg_range(0x5000, 0x5001),
+	regmap_reg_range(0x5004, 0x500b),
+	regmap_reg_range(0x501b, 0x501b),
+	regmap_reg_range(0x501f, 0x5021),
+	regmap_reg_range(0x5030, 0x5030),
+	regmap_reg_range(0x5040, 0x5040),
+	regmap_reg_range(0x5200, 0x520b),
+	regmap_reg_range(0x5300, 0x5307),
+	regmap_reg_range(0x5400, 0x5405),
+	regmap_reg_range(0x5408, 0x5409),
+	regmap_reg_range(0x5410, 0x5417),
+	regmap_reg_range(0x5420, 0x5427),
+	regmap_reg_range(0x5500, 0x5507),
+	regmap_reg_range(0x5600, 0x5665),
+	regmap_reg_range(0x5668, 0x568f),
+	regmap_reg_range(0x5694, 0x569b),
+	regmap_reg_range(0x56a0, 0x56a2),
+	regmap_reg_range(0x56c0, 0x56c3),
+	regmap_reg_range(0x56d0, 0x56d4),
+	regmap_reg_range(0x56e0, 0x56ef),
+	regmap_reg_range(0x5800, 0x5804),
+	regmap_reg_range(0x5808, 0x580b),
+	regmap_reg_range(0x5810, 0x581f),
+	regmap_reg_range(0x5850, 0x5857),
+	regmap_reg_range(0x5860, 0x586b),
+	regmap_reg_range(0x5870, 0x588c),
+	regmap_reg_range(0x5890, 0x5890),
+	regmap_reg_range(0x5894, 0x58a0),
+	regmap_reg_range(0x58a0, 0x58ab),
+	regmap_reg_range(0x58c1, 0x58e7),
+	regmap_reg_range(0x5900, 0x5907),
+	regmap_reg_range(0x5914, 0x5920),
+	regmap_reg_range(0x5923, 0x5936),
+	regmap_reg_range(0x5938, 0x593d),
+	regmap_reg_range(0x5940, 0x5941),
+	regmap_reg_range(0x5944, 0x5953),
+	regmap_reg_range(0x5a00, 0x5a1b),
+	regmap_reg_range(0x5b00, 0x5b04),
+	regmap_reg_range(0x5b08, 0x5b13),
+	regmap_reg_range(0x5c00, 0x5c05),
+	regmap_reg_range(0x5c08, 0x5c1b),
+
+	/* Port 6 */
+	regmap_reg_range(0x6000, 0x6001),
+	regmap_reg_range(0x6004, 0x600b),
+	regmap_reg_range(0x601b, 0x601b),
+	regmap_reg_range(0x601f, 0x6021),
+	regmap_reg_range(0x6030, 0x6030),
+	regmap_reg_range(0x6040, 0x6040),
+	regmap_reg_range(0x6200, 0x620b),
+	regmap_reg_range(0x6300, 0x6307),
+	regmap_reg_range(0x6400, 0x6405),
+	regmap_reg_range(0x6408, 0x6409),
+	regmap_reg_range(0x6410, 0x6417),
+	regmap_reg_range(0x6420, 0x6427),
+	regmap_reg_range(0x6500, 0x6507),
+	regmap_reg_range(0x6600, 0x6665),
+	regmap_reg_range(0x6668, 0x668f),
+	regmap_reg_range(0x6694, 0x669b),
+	regmap_reg_range(0x66a0, 0x66a2),
+	regmap_reg_range(0x66c0, 0x66c3),
+	regmap_reg_range(0x66d0, 0x66d4),
+	regmap_reg_range(0x66e0, 0x66ef),
+	regmap_reg_range(0x6800, 0x6804),
+	regmap_reg_range(0x6808, 0x680b),
+	regmap_reg_range(0x6810, 0x681f),
+	regmap_reg_range(0x6850, 0x6857),
+	regmap_reg_range(0x6860, 0x686b),
+	regmap_reg_range(0x6870, 0x688c),
+	regmap_reg_range(0x6890, 0x6890),
+	regmap_reg_range(0x6894, 0x68a0),
+	regmap_reg_range(0x68a0, 0x68ab),
+	regmap_reg_range(0x68c1, 0x68e7),
+	regmap_reg_range(0x6900, 0x6907),
+	regmap_reg_range(0x6914, 0x6920),
+	regmap_reg_range(0x6923, 0x6936),
+	regmap_reg_range(0x6938, 0x693d),
+	regmap_reg_range(0x6940, 0x6941),
+	regmap_reg_range(0x6944, 0x6953),
+	regmap_reg_range(0x6a00, 0x6a1b),
+	regmap_reg_range(0x6b00, 0x6b04),
+	regmap_reg_range(0x6b08, 0x6b13),
+	regmap_reg_range(0x6c00, 0x6c05),
+	regmap_reg_range(0x6c08, 0x6c1b),
+};
+
+static const struct regmap_access_table lan9371_register_set = {
+	.yes_ranges = lan9371_valid_regs,
+	.n_yes_ranges = ARRAY_SIZE(lan9371_valid_regs),
+};
+
+static const struct regmap_range lan9372_valid_regs[] = {
+	regmap_reg_range(0x0000, 0x0003),
+	regmap_reg_range(0x0007, 0x0007),
+	regmap_reg_range(0x000f, 0x0027),
+	regmap_reg_range(0x0030, 0x0035),
+	regmap_reg_range(0x0050, 0x005f),
+	regmap_reg_range(0x0100, 0x011b),
+	regmap_reg_range(0x0120, 0x0123),
+	regmap_reg_range(0x0128, 0x0140),
+	regmap_reg_range(0x0142, 0x0159),
+	regmap_reg_range(0x0200, 0x0203),
+	regmap_reg_range(0x0210, 0x0217),
+	regmap_reg_range(0x0300, 0x0300),
+	regmap_reg_range(0x0302, 0x0307),
+	regmap_reg_range(0x030a, 0x0336),
+	regmap_reg_range(0x0338, 0x033b),
+	regmap_reg_range(0x033e, 0x033e),
+	regmap_reg_range(0x0340, 0x0367),
+	regmap_reg_range(0x0370, 0x0370),
+	regmap_reg_range(0x0374, 0x0378),
+	regmap_reg_range(0x037c, 0x037d),
+	regmap_reg_range(0x0380, 0x0383),
+	regmap_reg_range(0x0390, 0x039b),
+	regmap_reg_range(0x03a4, 0x03b7),
+	regmap_reg_range(0x03e0, 0x03e3),
+	regmap_reg_range(0x03e8, 0x03eb),
+	regmap_reg_range(0x0400, 0x040e),
+	regmap_reg_range(0x0410, 0x0437),
+	regmap_reg_range(0x0440, 0x046f),
+	regmap_reg_range(0x0500, 0x054b),
+	regmap_reg_range(0x0550, 0x05b7),
+	regmap_reg_range(0x0640, 0x0645),
+	regmap_reg_range(0x0648, 0x064d),
+	regmap_reg_range(0x0650, 0x0655),
+	regmap_reg_range(0x0700, 0x07ff),
+	regmap_reg_range(0x0800, 0x088b),
+	regmap_reg_range(0x0900, 0x09ff),
+
+	/* Port 1 */
+	regmap_reg_range(0x1000, 0x1001),
+	regmap_reg_range(0x1004, 0x100b),
+	regmap_reg_range(0x101b, 0x101b),
+	regmap_reg_range(0x101f, 0x1021),
+	regmap_reg_range(0x1030, 0x1030),
+	regmap_reg_range(0x1040, 0x1040),
+	regmap_reg_range(0x1100, 0x111f),
+	regmap_reg_range(0x1200, 0x120b),
+	regmap_reg_range(0x1300, 0x1307),
+	regmap_reg_range(0x1400, 0x1405),
+	regmap_reg_range(0x1408, 0x1409),
+	regmap_reg_range(0x1410, 0x1417),
+	regmap_reg_range(0x1420, 0x1427),
+	regmap_reg_range(0x1500, 0x1507),
+	regmap_reg_range(0x1600, 0x1665),
+	regmap_reg_range(0x1668, 0x168f),
+	regmap_reg_range(0x1694, 0x169b),
+	regmap_reg_range(0x16a0, 0x16a2),
+	regmap_reg_range(0x16c0, 0x16c3),
+	regmap_reg_range(0x16d0, 0x16d4),
+	regmap_reg_range(0x16e0, 0x16ef),
+	regmap_reg_range(0x1800, 0x1804),
+	regmap_reg_range(0x1808, 0x180b),
+	regmap_reg_range(0x1810, 0x181f),
+	regmap_reg_range(0x1850, 0x1857),
+	regmap_reg_range(0x1860, 0x186b),
+	regmap_reg_range(0x1870, 0x188c),
+	regmap_reg_range(0x1890, 0x1890),
+	regmap_reg_range(0x1894, 0x18a0),
+	regmap_reg_range(0x18a0, 0x18ab),
+	regmap_reg_range(0x18c1, 0x18e7),
+	regmap_reg_range(0x1900, 0x1907),
+	regmap_reg_range(0x1914, 0x1920),
+	regmap_reg_range(0x1923, 0x1936),
+	regmap_reg_range(0x1938, 0x193d),
+	regmap_reg_range(0x1940, 0x1941),
+	regmap_reg_range(0x1944, 0x1953),
+	regmap_reg_range(0x1a00, 0x1a1b),
+	regmap_reg_range(0x1b00, 0x1b04),
+	regmap_reg_range(0x1b08, 0x1b13),
+	regmap_reg_range(0x1c00, 0x1c05),
+	regmap_reg_range(0x1c08, 0x1c1b),
+
+	/* Port 2 */
+	regmap_reg_range(0x2000, 0x2001),
+	regmap_reg_range(0x2004, 0x200b),
+	regmap_reg_range(0x201b, 0x201b),
+	regmap_reg_range(0x201f, 0x2021),
+	regmap_reg_range(0x2030, 0x2030),
+	regmap_reg_range(0x2040, 0x2040),
+	regmap_reg_range(0x2100, 0x211f),
+	regmap_reg_range(0x2200, 0x220b),
+	regmap_reg_range(0x2300, 0x2307),
+	regmap_reg_range(0x2400, 0x2405),
+	regmap_reg_range(0x2408, 0x2409),
+	regmap_reg_range(0x2410, 0x2417),
+	regmap_reg_range(0x2420, 0x2427),
+	regmap_reg_range(0x2500, 0x2507),
+	regmap_reg_range(0x2600, 0x2665),
+	regmap_reg_range(0x2668, 0x268f),
+	regmap_reg_range(0x2694, 0x269b),
+	regmap_reg_range(0x26a0, 0x26a2),
+	regmap_reg_range(0x26c0, 0x26c3),
+	regmap_reg_range(0x26d0, 0x26d4),
+	regmap_reg_range(0x26e0, 0x26ef),
+	regmap_reg_range(0x2800, 0x2804),
+	regmap_reg_range(0x2808, 0x280b),
+	regmap_reg_range(0x2810, 0x281f),
+	regmap_reg_range(0x2850, 0x2857),
+	regmap_reg_range(0x2860, 0x286b),
+	regmap_reg_range(0x2870, 0x288c),
+	regmap_reg_range(0x2890, 0x2890),
+	regmap_reg_range(0x2894, 0x28a0),
+	regmap_reg_range(0x28a0, 0x28ab),
+	regmap_reg_range(0x28c1, 0x28e7),
+	regmap_reg_range(0x2900, 0x2907),
+	regmap_reg_range(0x2914, 0x2920),
+	regmap_reg_range(0x2923, 0x2936),
+	regmap_reg_range(0x2938, 0x293d),
+	regmap_reg_range(0x2940, 0x2941),
+	regmap_reg_range(0x2944, 0x2953),
+	regmap_reg_range(0x2a00, 0x2a1b),
+	regmap_reg_range(0x2b00, 0x2b04),
+	regmap_reg_range(0x2b08, 0x2b13),
+	regmap_reg_range(0x2c00, 0x2c05),
+	regmap_reg_range(0x2c08, 0x2c1b),
+
+	/* Port 3 */
+	regmap_reg_range(0x3000, 0x3001),
+	regmap_reg_range(0x3004, 0x300b),
+	regmap_reg_range(0x301b, 0x301b),
+	regmap_reg_range(0x301f, 0x3021),
+	regmap_reg_range(0x3030, 0x3030),
+	regmap_reg_range(0x3040, 0x3040),
+	regmap_reg_range(0x3100, 0x311f),
+	regmap_reg_range(0x3200, 0x320b),
+	regmap_reg_range(0x3300, 0x3307),
+	regmap_reg_range(0x3400, 0x3405),
+	regmap_reg_range(0x3408, 0x3409),
+	regmap_reg_range(0x3410, 0x3417),
+	regmap_reg_range(0x3420, 0x3427),
+	regmap_reg_range(0x3500, 0x3507),
+	regmap_reg_range(0x3600, 0x3665),
+	regmap_reg_range(0x3668, 0x368f),
+	regmap_reg_range(0x3694, 0x369b),
+	regmap_reg_range(0x36a0, 0x36a2),
+	regmap_reg_range(0x36c0, 0x36c3),
+	regmap_reg_range(0x36d0, 0x36d4),
+	regmap_reg_range(0x36e0, 0x36ef),
+	regmap_reg_range(0x3800, 0x3804),
+	regmap_reg_range(0x3808, 0x380b),
+	regmap_reg_range(0x3810, 0x381f),
+	regmap_reg_range(0x3850, 0x3857),
+	regmap_reg_range(0x3860, 0x386b),
+	regmap_reg_range(0x3870, 0x388c),
+	regmap_reg_range(0x3890, 0x3890),
+	regmap_reg_range(0x3894, 0x38a0),
+	regmap_reg_range(0x38a0, 0x38ab),
+	regmap_reg_range(0x38c1, 0x38e7),
+	regmap_reg_range(0x3900, 0x3907),
+	regmap_reg_range(0x3914, 0x3920),
+	regmap_reg_range(0x3923, 0x3936),
+	regmap_reg_range(0x3938, 0x393d),
+	regmap_reg_range(0x3940, 0x3941),
+	regmap_reg_range(0x3944, 0x3953),
+	regmap_reg_range(0x3a00, 0x3a1b),
+	regmap_reg_range(0x3b00, 0x3b04),
+	regmap_reg_range(0x3b08, 0x3b13),
+	regmap_reg_range(0x3c00, 0x3c05),
+	regmap_reg_range(0x3c08, 0x3c1b),
+
+	/* Port 4 */
+	regmap_reg_range(0x4000, 0x4001),
+	regmap_reg_range(0x4004, 0x400b),
+	regmap_reg_range(0x401b, 0x401b),
+	regmap_reg_range(0x401f, 0x4021),
+	regmap_reg_range(0x4030, 0x4030),
+	regmap_reg_range(0x4040, 0x4040),
+	regmap_reg_range(0x4200, 0x420b),
+	regmap_reg_range(0x4280, 0x42ff),
+	regmap_reg_range(0x4300, 0x4307),
+	regmap_reg_range(0x4400, 0x4405),
+	regmap_reg_range(0x4408, 0x4409),
+	regmap_reg_range(0x4410, 0x4417),
+	regmap_reg_range(0x4420, 0x4427),
+	regmap_reg_range(0x4500, 0x4507),
+	regmap_reg_range(0x4600, 0x4665),
+	regmap_reg_range(0x4668, 0x468f),
+	regmap_reg_range(0x4694, 0x469b),
+	regmap_reg_range(0x46a0, 0x46a2),
+	regmap_reg_range(0x46c0, 0x46c3),
+	regmap_reg_range(0x46d0, 0x46d4),
+	regmap_reg_range(0x46e0, 0x46ef),
+	regmap_reg_range(0x4800, 0x4804),
+	regmap_reg_range(0x4808, 0x480b),
+	regmap_reg_range(0x4810, 0x481f),
+	regmap_reg_range(0x4850, 0x4857),
+	regmap_reg_range(0x4860, 0x486b),
+	regmap_reg_range(0x4870, 0x488c),
+	regmap_reg_range(0x4890, 0x4890),
+	regmap_reg_range(0x4894, 0x48a0),
+	regmap_reg_range(0x48a0, 0x48ab),
+	regmap_reg_range(0x48c1, 0x48e7),
+	regmap_reg_range(0x4900, 0x4907),
+	regmap_reg_range(0x4914, 0x4920),
+	regmap_reg_range(0x4923, 0x4936),
+	regmap_reg_range(0x4938, 0x493d),
+	regmap_reg_range(0x4940, 0x4941),
+	regmap_reg_range(0x4944, 0x4953),
+	regmap_reg_range(0x4a00, 0x4a1b),
+	regmap_reg_range(0x4b00, 0x4b04),
+	regmap_reg_range(0x4b08, 0x4b13),
+	regmap_reg_range(0x4c00, 0x4c05),
+	regmap_reg_range(0x4c08, 0x4c1b),
+
+	/* Port 5 */
+	regmap_reg_range(0x5000, 0x5001),
+	regmap_reg_range(0x5004, 0x500b),
+	regmap_reg_range(0x501b, 0x501b),
+	regmap_reg_range(0x501f, 0x5021),
+	regmap_reg_range(0x5030, 0x5030),
+	regmap_reg_range(0x5040, 0x5040),
+	regmap_reg_range(0x5200, 0x520b),
+	regmap_reg_range(0x5300, 0x5307),
+	regmap_reg_range(0x5400, 0x5405),
+	regmap_reg_range(0x5408, 0x5409),
+	regmap_reg_range(0x5410, 0x5417),
+	regmap_reg_range(0x5420, 0x5427),
+	regmap_reg_range(0x5500, 0x5507),
+	regmap_reg_range(0x5600, 0x5665),
+	regmap_reg_range(0x5668, 0x568f),
+	regmap_reg_range(0x5694, 0x569b),
+	regmap_reg_range(0x56a0, 0x56a2),
+	regmap_reg_range(0x56c0, 0x56c3),
+	regmap_reg_range(0x56d0, 0x56d4),
+	regmap_reg_range(0x56e0, 0x56ef),
+	regmap_reg_range(0x5800, 0x5804),
+	regmap_reg_range(0x5808, 0x580b),
+	regmap_reg_range(0x5810, 0x581f),
+	regmap_reg_range(0x5850, 0x5857),
+	regmap_reg_range(0x5860, 0x586b),
+	regmap_reg_range(0x5870, 0x588c),
+	regmap_reg_range(0x5890, 0x5890),
+	regmap_reg_range(0x5894, 0x58a0),
+	regmap_reg_range(0x58a0, 0x58ab),
+	regmap_reg_range(0x58c1, 0x58e7),
+	regmap_reg_range(0x5900, 0x5907),
+	regmap_reg_range(0x5914, 0x5920),
+	regmap_reg_range(0x5923, 0x5936),
+	regmap_reg_range(0x5938, 0x593d),
+	regmap_reg_range(0x5940, 0x5941),
+	regmap_reg_range(0x5944, 0x5953),
+	regmap_reg_range(0x5a00, 0x5a1b),
+	regmap_reg_range(0x5b00, 0x5b04),
+	regmap_reg_range(0x5b08, 0x5b13),
+	regmap_reg_range(0x5c00, 0x5c05),
+	regmap_reg_range(0x5c08, 0x5c1b),
+
+	/* Port 6 */
+	regmap_reg_range(0x6000, 0x6001),
+	regmap_reg_range(0x6004, 0x600b),
+	regmap_reg_range(0x601b, 0x601b),
+	regmap_reg_range(0x601f, 0x6021),
+	regmap_reg_range(0x6030, 0x6030),
+	regmap_reg_range(0x6040, 0x6040),
+	regmap_reg_range(0x6200, 0x620b),
+	regmap_reg_range(0x6300, 0x6307),
+	regmap_reg_range(0x6400, 0x6405),
+	regmap_reg_range(0x6408, 0x6409),
+	regmap_reg_range(0x6410, 0x6417),
+	regmap_reg_range(0x6420, 0x6427),
+	regmap_reg_range(0x6500, 0x6507),
+	regmap_reg_range(0x6600, 0x6665),
+	regmap_reg_range(0x6668, 0x668f),
+	regmap_reg_range(0x6694, 0x669b),
+	regmap_reg_range(0x66a0, 0x66a2),
+	regmap_reg_range(0x66c0, 0x66c3),
+	regmap_reg_range(0x66d0, 0x66d4),
+	regmap_reg_range(0x66e0, 0x66ef),
+	regmap_reg_range(0x6800, 0x6804),
+	regmap_reg_range(0x6808, 0x680b),
+	regmap_reg_range(0x6810, 0x681f),
+	regmap_reg_range(0x6850, 0x6857),
+	regmap_reg_range(0x6860, 0x686b),
+	regmap_reg_range(0x6870, 0x688c),
+	regmap_reg_range(0x6890, 0x6890),
+	regmap_reg_range(0x6894, 0x68a0),
+	regmap_reg_range(0x68a0, 0x68ab),
+	regmap_reg_range(0x68c1, 0x68e7),
+	regmap_reg_range(0x6900, 0x6907),
+	regmap_reg_range(0x6914, 0x6920),
+	regmap_reg_range(0x6923, 0x6936),
+	regmap_reg_range(0x6938, 0x693d),
+	regmap_reg_range(0x6940, 0x6941),
+	regmap_reg_range(0x6944, 0x6953),
+	regmap_reg_range(0x6a00, 0x6a1b),
+	regmap_reg_range(0x6b00, 0x6b04),
+	regmap_reg_range(0x6b08, 0x6b13),
+	regmap_reg_range(0x6c00, 0x6c05),
+	regmap_reg_range(0x6c08, 0x6c1b),
+
+	/* Port 7 */
+	regmap_reg_range(0x7000, 0x7001),
+	regmap_reg_range(0x7004, 0x700b),
+	regmap_reg_range(0x701b, 0x701b),
+	regmap_reg_range(0x701f, 0x7021),
+	regmap_reg_range(0x7030, 0x7030),
+	regmap_reg_range(0x7040, 0x7040),
+	regmap_reg_range(0x7100, 0x711f),
+	regmap_reg_range(0x7200, 0x720b),
+	regmap_reg_range(0x7300, 0x7307),
+	regmap_reg_range(0x7400, 0x7405),
+	regmap_reg_range(0x7408, 0x7409),
+	regmap_reg_range(0x7410, 0x7417),
+	regmap_reg_range(0x7420, 0x7427),
+	regmap_reg_range(0x7500, 0x7507),
+	regmap_reg_range(0x7600, 0x7665),
+	regmap_reg_range(0x7668, 0x768f),
+	regmap_reg_range(0x7694, 0x769b),
+	regmap_reg_range(0x76a0, 0x76a2),
+	regmap_reg_range(0x76c0, 0x76c3),
+	regmap_reg_range(0x76d0, 0x76d4),
+	regmap_reg_range(0x76e0, 0x76ef),
+	regmap_reg_range(0x7800, 0x7804),
+	regmap_reg_range(0x7808, 0x780b),
+	regmap_reg_range(0x7810, 0x781f),
+	regmap_reg_range(0x7850, 0x7857),
+	regmap_reg_range(0x7860, 0x786b),
+	regmap_reg_range(0x7870, 0x788c),
+	regmap_reg_range(0x7890, 0x7890),
+	regmap_reg_range(0x7894, 0x78a0),
+	regmap_reg_range(0x78a0, 0x78ab),
+	regmap_reg_range(0x78c1, 0x78e7),
+	regmap_reg_range(0x7900, 0x7907),
+	regmap_reg_range(0x7914, 0x7920),
+	regmap_reg_range(0x7923, 0x7936),
+	regmap_reg_range(0x7938, 0x793d),
+	regmap_reg_range(0x7940, 0x7941),
+	regmap_reg_range(0x7944, 0x7953),
+	regmap_reg_range(0x7a00, 0x7a1b),
+	regmap_reg_range(0x7b00, 0x7b04),
+	regmap_reg_range(0x7b08, 0x7b13),
+	regmap_reg_range(0x7c00, 0x7c05),
+	regmap_reg_range(0x7c08, 0x7c1b),
+
+	/* Port 8 */
+	regmap_reg_range(0x8000, 0x8001),
+	regmap_reg_range(0x8004, 0x800b),
+	regmap_reg_range(0x801b, 0x801b),
+	regmap_reg_range(0x801f, 0x8021),
+	regmap_reg_range(0x8030, 0x8030),
+	regmap_reg_range(0x8040, 0x8040),
+	regmap_reg_range(0x8100, 0x811f),
+	regmap_reg_range(0x8200, 0x820b),
+	regmap_reg_range(0x8300, 0x8307),
+	regmap_reg_range(0x8400, 0x8405),
+	regmap_reg_range(0x8408, 0x8409),
+	regmap_reg_range(0x8410, 0x8417),
+	regmap_reg_range(0x8420, 0x8427),
+	regmap_reg_range(0x8500, 0x8507),
+	regmap_reg_range(0x8600, 0x8665),
+	regmap_reg_range(0x8668, 0x868f),
+	regmap_reg_range(0x8694, 0x869b),
+	regmap_reg_range(0x86a0, 0x86a2),
+	regmap_reg_range(0x86c0, 0x86c3),
+	regmap_reg_range(0x86d0, 0x86d4),
+	regmap_reg_range(0x86e0, 0x86ef),
+	regmap_reg_range(0x8800, 0x8804),
+	regmap_reg_range(0x8808, 0x880b),
+	regmap_reg_range(0x8810, 0x881f),
+	regmap_reg_range(0x8850, 0x8857),
+	regmap_reg_range(0x8860, 0x886b),
+	regmap_reg_range(0x8870, 0x888c),
+	regmap_reg_range(0x8890, 0x8890),
+	regmap_reg_range(0x8894, 0x88a0),
+	regmap_reg_range(0x88a0, 0x88ab),
+	regmap_reg_range(0x88c1, 0x88e7),
+	regmap_reg_range(0x8900, 0x8907),
+	regmap_reg_range(0x8914, 0x8920),
+	regmap_reg_range(0x8923, 0x8936),
+	regmap_reg_range(0x8938, 0x893d),
+	regmap_reg_range(0x8940, 0x8941),
+	regmap_reg_range(0x8944, 0x8953),
+	regmap_reg_range(0x8a00, 0x8a1b),
+	regmap_reg_range(0x8b00, 0x8b04),
+	regmap_reg_range(0x8b08, 0x8b13),
+	regmap_reg_range(0x8c00, 0x8c05),
+	regmap_reg_range(0x8c08, 0x8c1b),
+};
+
+static const struct regmap_access_table lan9372_register_set = {
+	.yes_ranges = lan9372_valid_regs,
+	.n_yes_ranges = ARRAY_SIZE(lan9372_valid_regs),
+};
+
+static const struct regmap_range lan9373_valid_regs[] = {
+	regmap_reg_range(0x0000, 0x0003),
+	regmap_reg_range(0x0007, 0x0007),
+	regmap_reg_range(0x000f, 0x0027),
+	regmap_reg_range(0x0030, 0x0035),
+	regmap_reg_range(0x0050, 0x005f),
+	regmap_reg_range(0x0100, 0x011b),
+	regmap_reg_range(0x0120, 0x0123),
+	regmap_reg_range(0x0128, 0x0140),
+	regmap_reg_range(0x0142, 0x0159),
+	regmap_reg_range(0x0200, 0x0203),
+	regmap_reg_range(0x0210, 0x0217),
+	regmap_reg_range(0x0300, 0x0300),
+	regmap_reg_range(0x0302, 0x0307),
+	regmap_reg_range(0x030a, 0x0336),
+	regmap_reg_range(0x0338, 0x033b),
+	regmap_reg_range(0x033e, 0x033e),
+	regmap_reg_range(0x0340, 0x0367),
+	regmap_reg_range(0x0370, 0x0370),
+	regmap_reg_range(0x0374, 0x0378),
+	regmap_reg_range(0x037c, 0x037d),
+	regmap_reg_range(0x0380, 0x0383),
+	regmap_reg_range(0x0390, 0x039b),
+	regmap_reg_range(0x03a4, 0x03b7),
+	regmap_reg_range(0x03e0, 0x03e3),
+	regmap_reg_range(0x03e8, 0x03eb),
+	regmap_reg_range(0x0400, 0x040e),
+	regmap_reg_range(0x0410, 0x0437),
+	regmap_reg_range(0x0440, 0x046f),
+	regmap_reg_range(0x0500, 0x054b),
+	regmap_reg_range(0x0550, 0x05b7),
+	regmap_reg_range(0x0640, 0x0645),
+	regmap_reg_range(0x0648, 0x064d),
+	regmap_reg_range(0x0650, 0x0655),
+	regmap_reg_range(0x0700, 0x07ff),
+	regmap_reg_range(0x0800, 0x088b),
+	regmap_reg_range(0x0900, 0x09ff),
+
+	/* Port 1 */
+	regmap_reg_range(0x1000, 0x1001),
+	regmap_reg_range(0x1004, 0x100b),
+	regmap_reg_range(0x101b, 0x101b),
+	regmap_reg_range(0x101f, 0x1021),
+	regmap_reg_range(0x1030, 0x1030),
+	regmap_reg_range(0x1040, 0x1040),
+	regmap_reg_range(0x1100, 0x111f),
+	regmap_reg_range(0x1200, 0x120b),
+	regmap_reg_range(0x1300, 0x1307),
+	regmap_reg_range(0x1400, 0x1405),
+	regmap_reg_range(0x1408, 0x1409),
+	regmap_reg_range(0x1410, 0x1417),
+	regmap_reg_range(0x1420, 0x1427),
+	regmap_reg_range(0x1500, 0x1507),
+	regmap_reg_range(0x1600, 0x1665),
+	regmap_reg_range(0x1668, 0x168f),
+	regmap_reg_range(0x1694, 0x169b),
+	regmap_reg_range(0x16a0, 0x16a2),
+	regmap_reg_range(0x16c0, 0x16c3),
+	regmap_reg_range(0x16d0, 0x16d4),
+	regmap_reg_range(0x16e0, 0x16ef),
+	regmap_reg_range(0x1800, 0x1804),
+	regmap_reg_range(0x1808, 0x180b),
+	regmap_reg_range(0x1810, 0x181f),
+	regmap_reg_range(0x1850, 0x1857),
+	regmap_reg_range(0x1860, 0x186b),
+	regmap_reg_range(0x1870, 0x188c),
+	regmap_reg_range(0x1890, 0x1890),
+	regmap_reg_range(0x1894, 0x18a0),
+	regmap_reg_range(0x18a0, 0x18ab),
+	regmap_reg_range(0x18c1, 0x18e7),
+	regmap_reg_range(0x1900, 0x1907),
+	regmap_reg_range(0x1914, 0x1920),
+	regmap_reg_range(0x1923, 0x1936),
+	regmap_reg_range(0x1938, 0x193d),
+	regmap_reg_range(0x1940, 0x1941),
+	regmap_reg_range(0x1944, 0x1953),
+	regmap_reg_range(0x1a00, 0x1a1b),
+	regmap_reg_range(0x1b00, 0x1b04),
+	regmap_reg_range(0x1b08, 0x1b13),
+	regmap_reg_range(0x1c00, 0x1c05),
+	regmap_reg_range(0x1c08, 0x1c1b),
+
+	/* Port 2 */
+	regmap_reg_range(0x2000, 0x2001),
+	regmap_reg_range(0x2004, 0x200b),
+	regmap_reg_range(0x201b, 0x201b),
+	regmap_reg_range(0x201f, 0x2021),
+	regmap_reg_range(0x2030, 0x2030),
+	regmap_reg_range(0x2040, 0x2040),
+	regmap_reg_range(0x2100, 0x211f),
+	regmap_reg_range(0x2200, 0x220b),
+	regmap_reg_range(0x2300, 0x2307),
+	regmap_reg_range(0x2400, 0x2405),
+	regmap_reg_range(0x2408, 0x2409),
+	regmap_reg_range(0x2410, 0x2417),
+	regmap_reg_range(0x2420, 0x2427),
+	regmap_reg_range(0x2500, 0x2507),
+	regmap_reg_range(0x2600, 0x2665),
+	regmap_reg_range(0x2668, 0x268f),
+	regmap_reg_range(0x2694, 0x269b),
+	regmap_reg_range(0x26a0, 0x26a2),
+	regmap_reg_range(0x26c0, 0x26c3),
+	regmap_reg_range(0x26d0, 0x26d4),
+	regmap_reg_range(0x26e0, 0x26ef),
+	regmap_reg_range(0x2800, 0x2804),
+	regmap_reg_range(0x2808, 0x280b),
+	regmap_reg_range(0x2810, 0x281f),
+	regmap_reg_range(0x2850, 0x2857),
+	regmap_reg_range(0x2860, 0x286b),
+	regmap_reg_range(0x2870, 0x288c),
+	regmap_reg_range(0x2890, 0x2890),
+	regmap_reg_range(0x2894, 0x28a0),
+	regmap_reg_range(0x28a0, 0x28ab),
+	regmap_reg_range(0x28c1, 0x28e7),
+	regmap_reg_range(0x2900, 0x2907),
+	regmap_reg_range(0x2914, 0x2920),
+	regmap_reg_range(0x2923, 0x2936),
+	regmap_reg_range(0x2938, 0x293d),
+	regmap_reg_range(0x2940, 0x2941),
+	regmap_reg_range(0x2944, 0x2953),
+	regmap_reg_range(0x2a00, 0x2a1b),
+	regmap_reg_range(0x2b00, 0x2b04),
+	regmap_reg_range(0x2b08, 0x2b13),
+	regmap_reg_range(0x2c00, 0x2c05),
+	regmap_reg_range(0x2c08, 0x2c1b),
+
+	/* Port 3 */
+	regmap_reg_range(0x3000, 0x3001),
+	regmap_reg_range(0x3004, 0x300b),
+	regmap_reg_range(0x301b, 0x301b),
+	regmap_reg_range(0x301f, 0x3021),
+	regmap_reg_range(0x3030, 0x3030),
+	regmap_reg_range(0x3040, 0x3040),
+	regmap_reg_range(0x3100, 0x311f),
+	regmap_reg_range(0x3200, 0x320b),
+	regmap_reg_range(0x3300, 0x3307),
+	regmap_reg_range(0x3400, 0x3405),
+	regmap_reg_range(0x3408, 0x3409),
+	regmap_reg_range(0x3410, 0x3417),
+	regmap_reg_range(0x3420, 0x3427),
+	regmap_reg_range(0x3500, 0x3507),
+	regmap_reg_range(0x3600, 0x3665),
+	regmap_reg_range(0x3668, 0x368f),
+	regmap_reg_range(0x3694, 0x369b),
+	regmap_reg_range(0x36a0, 0x36a2),
+	regmap_reg_range(0x36c0, 0x36c3),
+	regmap_reg_range(0x36d0, 0x36d4),
+	regmap_reg_range(0x36e0, 0x36ef),
+	regmap_reg_range(0x3800, 0x3804),
+	regmap_reg_range(0x3808, 0x380b),
+	regmap_reg_range(0x3810, 0x381f),
+	regmap_reg_range(0x3850, 0x3857),
+	regmap_reg_range(0x3860, 0x386b),
+	regmap_reg_range(0x3870, 0x388c),
+	regmap_reg_range(0x3890, 0x3890),
+	regmap_reg_range(0x3894, 0x38a0),
+	regmap_reg_range(0x38a0, 0x38ab),
+	regmap_reg_range(0x38c1, 0x38e7),
+	regmap_reg_range(0x3900, 0x3907),
+	regmap_reg_range(0x3914, 0x3920),
+	regmap_reg_range(0x3923, 0x3936),
+	regmap_reg_range(0x3938, 0x393d),
+	regmap_reg_range(0x3940, 0x3941),
+	regmap_reg_range(0x3944, 0x3953),
+	regmap_reg_range(0x3a00, 0x3a1b),
+	regmap_reg_range(0x3b00, 0x3b04),
+	regmap_reg_range(0x3b08, 0x3b13),
+	regmap_reg_range(0x3c00, 0x3c05),
+	regmap_reg_range(0x3c08, 0x3c1b),
+
+	/* Port 4 */
+	regmap_reg_range(0x4000, 0x4001),
+	regmap_reg_range(0x4004, 0x400b),
+	regmap_reg_range(0x401b, 0x401b),
+	regmap_reg_range(0x401f, 0x4021),
+	regmap_reg_range(0x4030, 0x4030),
+	regmap_reg_range(0x4040, 0x4040),
+	regmap_reg_range(0x4200, 0x420b),
+	regmap_reg_range(0x4300, 0x4307),
+	regmap_reg_range(0x4400, 0x4405),
+	regmap_reg_range(0x4408, 0x4409),
+	regmap_reg_range(0x4410, 0x4417),
+	regmap_reg_range(0x4420, 0x4427),
+	regmap_reg_range(0x4500, 0x4507),
+	regmap_reg_range(0x4600, 0x4665),
+	regmap_reg_range(0x4668, 0x468f),
+	regmap_reg_range(0x4694, 0x469b),
+	regmap_reg_range(0x46a0, 0x46a2),
+	regmap_reg_range(0x46c0, 0x46c3),
+	regmap_reg_range(0x46d0, 0x46d4),
+	regmap_reg_range(0x46e0, 0x46ef),
+	regmap_reg_range(0x4800, 0x4804),
+	regmap_reg_range(0x4808, 0x480b),
+	regmap_reg_range(0x4810, 0x481f),
+	regmap_reg_range(0x4850, 0x4857),
+	regmap_reg_range(0x4860, 0x486b),
+	regmap_reg_range(0x4870, 0x488c),
+	regmap_reg_range(0x4890, 0x4890),
+	regmap_reg_range(0x4894, 0x48a0),
+	regmap_reg_range(0x48a0, 0x48ab),
+	regmap_reg_range(0x48c1, 0x48e7),
+	regmap_reg_range(0x4900, 0x4907),
+	regmap_reg_range(0x4914, 0x4920),
+	regmap_reg_range(0x4923, 0x4936),
+	regmap_reg_range(0x4938, 0x493d),
+	regmap_reg_range(0x4940, 0x4941),
+	regmap_reg_range(0x4944, 0x4953),
+	regmap_reg_range(0x4a00, 0x4a1b),
+	regmap_reg_range(0x4b00, 0x4b04),
+	regmap_reg_range(0x4b08, 0x4b13),
+	regmap_reg_range(0x4c00, 0x4c05),
+	regmap_reg_range(0x4c08, 0x4c1b),
+
+	/* Port 5 */
+	regmap_reg_range(0x5000, 0x5001),
+	regmap_reg_range(0x5004, 0x500b),
+	regmap_reg_range(0x501b, 0x501b),
+	regmap_reg_range(0x501f, 0x5021),
+	regmap_reg_range(0x5030, 0x5030),
+	regmap_reg_range(0x5040, 0x5040),
+	regmap_reg_range(0x5200, 0x520b),
+	regmap_reg_range(0x5300, 0x5307),
+	regmap_reg_range(0x5400, 0x5405),
+	regmap_reg_range(0x5408, 0x5409),
+	regmap_reg_range(0x5410, 0x5417),
+	regmap_reg_range(0x5420, 0x5427),
+	regmap_reg_range(0x5500, 0x5507),
+	regmap_reg_range(0x5600, 0x5665),
+	regmap_reg_range(0x5668, 0x568f),
+	regmap_reg_range(0x5694, 0x569b),
+	regmap_reg_range(0x56a0, 0x56a2),
+	regmap_reg_range(0x56c0, 0x56c3),
+	regmap_reg_range(0x56d0, 0x56d4),
+	regmap_reg_range(0x56e0, 0x56ef),
+	regmap_reg_range(0x5800, 0x5804),
+	regmap_reg_range(0x5808, 0x580b),
+	regmap_reg_range(0x5810, 0x581f),
+	regmap_reg_range(0x5850, 0x5857),
+	regmap_reg_range(0x5860, 0x586b),
+	regmap_reg_range(0x5870, 0x588c),
+	regmap_reg_range(0x5890, 0x5890),
+	regmap_reg_range(0x5894, 0x58a0),
+	regmap_reg_range(0x58a0, 0x58ab),
+	regmap_reg_range(0x58c1, 0x58e7),
+	regmap_reg_range(0x5900, 0x5907),
+	regmap_reg_range(0x5914, 0x5920),
+	regmap_reg_range(0x5923, 0x5936),
+	regmap_reg_range(0x5938, 0x593d),
+	regmap_reg_range(0x5940, 0x5941),
+	regmap_reg_range(0x5944, 0x5953),
+	regmap_reg_range(0x5a00, 0x5a1b),
+	regmap_reg_range(0x5b00, 0x5b04),
+	regmap_reg_range(0x5b08, 0x5b13),
+	regmap_reg_range(0x5c00, 0x5c05),
+	regmap_reg_range(0x5c08, 0x5c1b),
+
+	/* Port 6 */
+	regmap_reg_range(0x6000, 0x6001),
+	regmap_reg_range(0x6004, 0x600b),
+	regmap_reg_range(0x601b, 0x601b),
+	regmap_reg_range(0x601f, 0x6021),
+	regmap_reg_range(0x6030, 0x6030),
+	regmap_reg_range(0x6040, 0x6040),
+	regmap_reg_range(0x6200, 0x620b),
+	regmap_reg_range(0x6300, 0x6307),
+	regmap_reg_range(0x6400, 0x6405),
+	regmap_reg_range(0x6408, 0x6409),
+	regmap_reg_range(0x6410, 0x6417),
+	regmap_reg_range(0x6420, 0x6427),
+	regmap_reg_range(0x6500, 0x6507),
+	regmap_reg_range(0x6600, 0x6665),
+	regmap_reg_range(0x6668, 0x668f),
+	regmap_reg_range(0x6694, 0x669b),
+	regmap_reg_range(0x66a0, 0x66a2),
+	regmap_reg_range(0x66c0, 0x66c3),
+	regmap_reg_range(0x66d0, 0x66d4),
+	regmap_reg_range(0x66e0, 0x66ef),
+	regmap_reg_range(0x6800, 0x6804),
+	regmap_reg_range(0x6808, 0x680b),
+	regmap_reg_range(0x6810, 0x681f),
+	regmap_reg_range(0x6850, 0x6857),
+	regmap_reg_range(0x6860, 0x686b),
+	regmap_reg_range(0x6870, 0x688c),
+	regmap_reg_range(0x6890, 0x6890),
+	regmap_reg_range(0x6894, 0x68a0),
+	regmap_reg_range(0x68a0, 0x68ab),
+	regmap_reg_range(0x68c1, 0x68e7),
+	regmap_reg_range(0x6900, 0x6907),
+	regmap_reg_range(0x6914, 0x6920),
+	regmap_reg_range(0x6923, 0x6936),
+	regmap_reg_range(0x6938, 0x693d),
+	regmap_reg_range(0x6940, 0x6941),
+	regmap_reg_range(0x6944, 0x6953),
+	regmap_reg_range(0x6a00, 0x6a1b),
+	regmap_reg_range(0x6b00, 0x6b04),
+	regmap_reg_range(0x6b08, 0x6b13),
+	regmap_reg_range(0x6c00, 0x6c05),
+	regmap_reg_range(0x6c08, 0x6c1b),
+
+	/* Port 7 */
+	regmap_reg_range(0x7000, 0x7001),
+	regmap_reg_range(0x7004, 0x700b),
+	regmap_reg_range(0x701b, 0x701b),
+	regmap_reg_range(0x701f, 0x7021),
+	regmap_reg_range(0x7030, 0x7030),
+	regmap_reg_range(0x7040, 0x7040),
+	regmap_reg_range(0x7100, 0x711f),
+	regmap_reg_range(0x7200, 0x720b),
+	regmap_reg_range(0x7300, 0x7307),
+	regmap_reg_range(0x7400, 0x7405),
+	regmap_reg_range(0x7408, 0x7409),
+	regmap_reg_range(0x7410, 0x7417),
+	regmap_reg_range(0x7420, 0x7427),
+	regmap_reg_range(0x7500, 0x7507),
+	regmap_reg_range(0x7600, 0x7665),
+	regmap_reg_range(0x7668, 0x768f),
+	regmap_reg_range(0x7694, 0x769b),
+	regmap_reg_range(0x76a0, 0x76a2),
+	regmap_reg_range(0x76c0, 0x76c3),
+	regmap_reg_range(0x76d0, 0x76d4),
+	regmap_reg_range(0x76e0, 0x76ef),
+	regmap_reg_range(0x7800, 0x7804),
+	regmap_reg_range(0x7808, 0x780b),
+	regmap_reg_range(0x7810, 0x781f),
+	regmap_reg_range(0x7850, 0x7857),
+	regmap_reg_range(0x7860, 0x786b),
+	regmap_reg_range(0x7870, 0x788c),
+	regmap_reg_range(0x7890, 0x7890),
+	regmap_reg_range(0x7894, 0x78a0),
+	regmap_reg_range(0x78a0, 0x78ab),
+	regmap_reg_range(0x78c1, 0x78e7),
+	regmap_reg_range(0x7900, 0x7907),
+	regmap_reg_range(0x7914, 0x7920),
+	regmap_reg_range(0x7923, 0x7936),
+	regmap_reg_range(0x7938, 0x793d),
+	regmap_reg_range(0x7940, 0x7941),
+	regmap_reg_range(0x7944, 0x7953),
+	regmap_reg_range(0x7a00, 0x7a1b),
+	regmap_reg_range(0x7b00, 0x7b04),
+	regmap_reg_range(0x7b08, 0x7b13),
+	regmap_reg_range(0x7c00, 0x7c05),
+	regmap_reg_range(0x7c08, 0x7c1b),
+
+	/* Port 8 */
+	regmap_reg_range(0x8000, 0x8001),
+	regmap_reg_range(0x8004, 0x800b),
+	regmap_reg_range(0x801b, 0x801b),
+	regmap_reg_range(0x801f, 0x8021),
+	regmap_reg_range(0x8030, 0x8030),
+	regmap_reg_range(0x8040, 0x8040),
+	regmap_reg_range(0x8100, 0x811f),
+	regmap_reg_range(0x8200, 0x820b),
+	regmap_reg_range(0x8300, 0x8307),
+	regmap_reg_range(0x8400, 0x8405),
+	regmap_reg_range(0x8408, 0x8409),
+	regmap_reg_range(0x8410, 0x8417),
+	regmap_reg_range(0x8420, 0x8427),
+	regmap_reg_range(0x8500, 0x8507),
+	regmap_reg_range(0x8600, 0x8665),
+	regmap_reg_range(0x8668, 0x868f),
+	regmap_reg_range(0x8694, 0x869b),
+	regmap_reg_range(0x86a0, 0x86a2),
+	regmap_reg_range(0x86c0, 0x86c3),
+	regmap_reg_range(0x86d0, 0x86d4),
+	regmap_reg_range(0x86e0, 0x86ef),
+	regmap_reg_range(0x8800, 0x8804),
+	regmap_reg_range(0x8808, 0x880b),
+	regmap_reg_range(0x8810, 0x881f),
+	regmap_reg_range(0x8850, 0x8857),
+	regmap_reg_range(0x8860, 0x886b),
+	regmap_reg_range(0x8870, 0x888c),
+	regmap_reg_range(0x8890, 0x8890),
+	regmap_reg_range(0x8894, 0x88a0),
+	regmap_reg_range(0x88a0, 0x88ab),
+	regmap_reg_range(0x88c1, 0x88e7),
+	regmap_reg_range(0x8900, 0x8907),
+	regmap_reg_range(0x8914, 0x8920),
+	regmap_reg_range(0x8923, 0x8936),
+	regmap_reg_range(0x8938, 0x893d),
+	regmap_reg_range(0x8940, 0x8941),
+	regmap_reg_range(0x8944, 0x8953),
+	regmap_reg_range(0x8a00, 0x8a1b),
+	regmap_reg_range(0x8b00, 0x8b04),
+	regmap_reg_range(0x8b08, 0x8b13),
+	regmap_reg_range(0x8c00, 0x8c05),
+	regmap_reg_range(0x8c08, 0x8c1b),
+};
+
+static const struct regmap_access_table lan9373_register_set = {
+	.yes_ranges = lan9373_valid_regs,
+	.n_yes_ranges = ARRAY_SIZE(lan9373_valid_regs),
+};
+
+static const struct regmap_range lan9374_valid_regs[] = {
+	regmap_reg_range(0x0000, 0x0003),
+	regmap_reg_range(0x0007, 0x0007),
+	regmap_reg_range(0x000f, 0x0027),
+	regmap_reg_range(0x0030, 0x0035),
+	regmap_reg_range(0x0050, 0x005f),
+	regmap_reg_range(0x0100, 0x011b),
+	regmap_reg_range(0x0120, 0x0123),
+	regmap_reg_range(0x0128, 0x0140),
+	regmap_reg_range(0x0142, 0x0159),
+	regmap_reg_range(0x0200, 0x0203),
+	regmap_reg_range(0x0210, 0x0217),
+	regmap_reg_range(0x0300, 0x0300),
+	regmap_reg_range(0x0302, 0x0307),
+	regmap_reg_range(0x030a, 0x0336),
+	regmap_reg_range(0x0338, 0x033b),
+	regmap_reg_range(0x033e, 0x033e),
+	regmap_reg_range(0x0340, 0x0367),
+	regmap_reg_range(0x0370, 0x0370),
+	regmap_reg_range(0x0374, 0x0378),
+	regmap_reg_range(0x037c, 0x037d),
+	regmap_reg_range(0x0380, 0x0383),
+	regmap_reg_range(0x0390, 0x039b),
+	regmap_reg_range(0x03a4, 0x03b7),
+	regmap_reg_range(0x03e0, 0x03e3),
+	regmap_reg_range(0x03e8, 0x03eb),
+	regmap_reg_range(0x0400, 0x040e),
+	regmap_reg_range(0x0410, 0x0437),
+	regmap_reg_range(0x0440, 0x046f),
+	regmap_reg_range(0x0500, 0x054b),
+	regmap_reg_range(0x0550, 0x05b7),
+	regmap_reg_range(0x0640, 0x0645),
+	regmap_reg_range(0x0648, 0x064d),
+	regmap_reg_range(0x0650, 0x0655),
+	regmap_reg_range(0x0700, 0x07ff),
+	regmap_reg_range(0x0800, 0x088b),
+	regmap_reg_range(0x0900, 0x09ff),
+
+	/* Port 1 */
+	regmap_reg_range(0x1000, 0x1001),
+	regmap_reg_range(0x1004, 0x100b),
+	regmap_reg_range(0x101b, 0x101b),
+	regmap_reg_range(0x101f, 0x1021),
+	regmap_reg_range(0x1030, 0x1030),
+	regmap_reg_range(0x1040, 0x1040),
+	regmap_reg_range(0x1100, 0x111f),
+	regmap_reg_range(0x1200, 0x120b),
+	regmap_reg_range(0x1300, 0x1307),
+	regmap_reg_range(0x1400, 0x1405),
+	regmap_reg_range(0x1408, 0x1409),
+	regmap_reg_range(0x1410, 0x1417),
+	regmap_reg_range(0x1420, 0x1427),
+	regmap_reg_range(0x1500, 0x1507),
+	regmap_reg_range(0x1600, 0x1665),
+	regmap_reg_range(0x1668, 0x168f),
+	regmap_reg_range(0x1694, 0x169b),
+	regmap_reg_range(0x16a0, 0x16a2),
+	regmap_reg_range(0x16c0, 0x16c3),
+	regmap_reg_range(0x16d0, 0x16d4),
+	regmap_reg_range(0x16e0, 0x16ef),
+	regmap_reg_range(0x1800, 0x1804),
+	regmap_reg_range(0x1808, 0x180b),
+	regmap_reg_range(0x1810, 0x181f),
+	regmap_reg_range(0x1850, 0x1857),
+	regmap_reg_range(0x1860, 0x186b),
+	regmap_reg_range(0x1870, 0x188c),
+	regmap_reg_range(0x1890, 0x1890),
+	regmap_reg_range(0x1894, 0x18a0),
+	regmap_reg_range(0x18a0, 0x18ab),
+	regmap_reg_range(0x18c1, 0x18e7),
+	regmap_reg_range(0x1900, 0x1907),
+	regmap_reg_range(0x1914, 0x1920),
+	regmap_reg_range(0x1923, 0x1936),
+	regmap_reg_range(0x1938, 0x193d),
+	regmap_reg_range(0x1940, 0x1941),
+	regmap_reg_range(0x1944, 0x1953),
+	regmap_reg_range(0x1a00, 0x1a1b),
+	regmap_reg_range(0x1b00, 0x1b04),
+	regmap_reg_range(0x1b08, 0x1b13),
+	regmap_reg_range(0x1c00, 0x1c05),
+	regmap_reg_range(0x1c08, 0x1c1b),
+
+	/* Port 2 */
+	regmap_reg_range(0x2000, 0x2001),
+	regmap_reg_range(0x2004, 0x200b),
+	regmap_reg_range(0x201b, 0x201b),
+	regmap_reg_range(0x201f, 0x2021),
+	regmap_reg_range(0x2030, 0x2030),
+	regmap_reg_range(0x2040, 0x2040),
+	regmap_reg_range(0x2100, 0x211f),
+	regmap_reg_range(0x2200, 0x220b),
+	regmap_reg_range(0x2300, 0x2307),
+	regmap_reg_range(0x2400, 0x2405),
+	regmap_reg_range(0x2408, 0x2409),
+	regmap_reg_range(0x2410, 0x2417),
+	regmap_reg_range(0x2420, 0x2427),
+	regmap_reg_range(0x2500, 0x2507),
+	regmap_reg_range(0x2600, 0x2665),
+	regmap_reg_range(0x2668, 0x268f),
+	regmap_reg_range(0x2694, 0x269b),
+	regmap_reg_range(0x26a0, 0x26a2),
+	regmap_reg_range(0x26c0, 0x26c3),
+	regmap_reg_range(0x26d0, 0x26d4),
+	regmap_reg_range(0x26e0, 0x26ef),
+	regmap_reg_range(0x2800, 0x2804),
+	regmap_reg_range(0x2808, 0x280b),
+	regmap_reg_range(0x2810, 0x281f),
+	regmap_reg_range(0x2850, 0x2857),
+	regmap_reg_range(0x2860, 0x286b),
+	regmap_reg_range(0x2870, 0x288c),
+	regmap_reg_range(0x2890, 0x2890),
+	regmap_reg_range(0x2894, 0x28a0),
+	regmap_reg_range(0x28a0, 0x28ab),
+	regmap_reg_range(0x28c1, 0x28e7),
+	regmap_reg_range(0x2900, 0x2907),
+	regmap_reg_range(0x2914, 0x2920),
+	regmap_reg_range(0x2923, 0x2936),
+	regmap_reg_range(0x2938, 0x293d),
+	regmap_reg_range(0x2940, 0x2941),
+	regmap_reg_range(0x2944, 0x2953),
+	regmap_reg_range(0x2a00, 0x2a1b),
+	regmap_reg_range(0x2b00, 0x2b04),
+	regmap_reg_range(0x2b08, 0x2b13),
+	regmap_reg_range(0x2c00, 0x2c05),
+	regmap_reg_range(0x2c08, 0x2c1b),
+
+	/* Port 3 */
+	regmap_reg_range(0x3000, 0x3001),
+	regmap_reg_range(0x3004, 0x300b),
+	regmap_reg_range(0x301b, 0x301b),
+	regmap_reg_range(0x301f, 0x3021),
+	regmap_reg_range(0x3030, 0x3030),
+	regmap_reg_range(0x3040, 0x3040),
+	regmap_reg_range(0x3100, 0x311f),
+	regmap_reg_range(0x3200, 0x320b),
+	regmap_reg_range(0x3300, 0x3307),
+	regmap_reg_range(0x3400, 0x3405),
+	regmap_reg_range(0x3408, 0x3409),
+	regmap_reg_range(0x3410, 0x3417),
+	regmap_reg_range(0x3420, 0x3427),
+	regmap_reg_range(0x3500, 0x3507),
+	regmap_reg_range(0x3600, 0x3665),
+	regmap_reg_range(0x3668, 0x368f),
+	regmap_reg_range(0x3694, 0x369b),
+	regmap_reg_range(0x36a0, 0x36a2),
+	regmap_reg_range(0x36c0, 0x36c3),
+	regmap_reg_range(0x36d0, 0x36d4),
+	regmap_reg_range(0x36e0, 0x36ef),
+	regmap_reg_range(0x3800, 0x3804),
+	regmap_reg_range(0x3808, 0x380b),
+	regmap_reg_range(0x3810, 0x381f),
+	regmap_reg_range(0x3850, 0x3857),
+	regmap_reg_range(0x3860, 0x386b),
+	regmap_reg_range(0x3870, 0x388c),
+	regmap_reg_range(0x3890, 0x3890),
+	regmap_reg_range(0x3894, 0x38a0),
+	regmap_reg_range(0x38a0, 0x38ab),
+	regmap_reg_range(0x38c1, 0x38e7),
+	regmap_reg_range(0x3900, 0x3907),
+	regmap_reg_range(0x3914, 0x3920),
+	regmap_reg_range(0x3923, 0x3936),
+	regmap_reg_range(0x3938, 0x393d),
+	regmap_reg_range(0x3940, 0x3941),
+	regmap_reg_range(0x3944, 0x3953),
+	regmap_reg_range(0x3a00, 0x3a1b),
+	regmap_reg_range(0x3b00, 0x3b04),
+	regmap_reg_range(0x3b08, 0x3b13),
+	regmap_reg_range(0x3c00, 0x3c05),
+	regmap_reg_range(0x3c08, 0x3c1b),
+
+	/* Port 4 */
+	regmap_reg_range(0x4000, 0x4001),
+	regmap_reg_range(0x4004, 0x400b),
+	regmap_reg_range(0x401b, 0x401b),
+	regmap_reg_range(0x401f, 0x4021),
+	regmap_reg_range(0x4030, 0x4030),
+	regmap_reg_range(0x4040, 0x4040),
+	regmap_reg_range(0x4100, 0x411f),
+	regmap_reg_range(0x4200, 0x420b),
+	regmap_reg_range(0x4300, 0x4307),
+	regmap_reg_range(0x4400, 0x4405),
+	regmap_reg_range(0x4408, 0x4409),
+	regmap_reg_range(0x4410, 0x4417),
+	regmap_reg_range(0x4420, 0x4427),
+	regmap_reg_range(0x4500, 0x4507),
+	regmap_reg_range(0x4600, 0x4665),
+	regmap_reg_range(0x4668, 0x468f),
+	regmap_reg_range(0x4694, 0x469b),
+	regmap_reg_range(0x46a0, 0x46a2),
+	regmap_reg_range(0x46c0, 0x46c3),
+	regmap_reg_range(0x46d0, 0x46d4),
+	regmap_reg_range(0x46e0, 0x46ef),
+	regmap_reg_range(0x4800, 0x4804),
+	regmap_reg_range(0x4808, 0x480b),
+	regmap_reg_range(0x4810, 0x481f),
+	regmap_reg_range(0x4850, 0x4857),
+	regmap_reg_range(0x4860, 0x486b),
+	regmap_reg_range(0x4870, 0x488c),
+	regmap_reg_range(0x4890, 0x4890),
+	regmap_reg_range(0x4894, 0x48a0),
+	regmap_reg_range(0x48a0, 0x48ab),
+	regmap_reg_range(0x48c1, 0x48e7),
+	regmap_reg_range(0x4900, 0x4907),
+	regmap_reg_range(0x4914, 0x4920),
+	regmap_reg_range(0x4923, 0x4936),
+	regmap_reg_range(0x4938, 0x493d),
+	regmap_reg_range(0x4940, 0x4941),
+	regmap_reg_range(0x4944, 0x4953),
+	regmap_reg_range(0x4a00, 0x4a1b),
+	regmap_reg_range(0x4b00, 0x4b04),
+	regmap_reg_range(0x4b08, 0x4b13),
+	regmap_reg_range(0x4c00, 0x4c05),
+	regmap_reg_range(0x4c08, 0x4c1b),
+
+	/* Port 5 */
+	regmap_reg_range(0x5000, 0x5001),
+	regmap_reg_range(0x5004, 0x500b),
+	regmap_reg_range(0x501b, 0x501b),
+	regmap_reg_range(0x501f, 0x5021),
+	regmap_reg_range(0x5030, 0x5030),
+	regmap_reg_range(0x5040, 0x5040),
+	regmap_reg_range(0x5200, 0x520b),
+	regmap_reg_range(0x5300, 0x5307),
+	regmap_reg_range(0x5400, 0x5405),
+	regmap_reg_range(0x5408, 0x5409),
+	regmap_reg_range(0x5410, 0x5417),
+	regmap_reg_range(0x5420, 0x5427),
+	regmap_reg_range(0x5500, 0x5507),
+	regmap_reg_range(0x5600, 0x5665),
+	regmap_reg_range(0x5668, 0x568f),
+	regmap_reg_range(0x5694, 0x569b),
+	regmap_reg_range(0x56a0, 0x56a2),
+	regmap_reg_range(0x56c0, 0x56c3),
+	regmap_reg_range(0x56d0, 0x56d4),
+	regmap_reg_range(0x56e0, 0x56ef),
+	regmap_reg_range(0x5800, 0x5804),
+	regmap_reg_range(0x5808, 0x580b),
+	regmap_reg_range(0x5810, 0x581f),
+	regmap_reg_range(0x5850, 0x5857),
+	regmap_reg_range(0x5860, 0x586b),
+	regmap_reg_range(0x5870, 0x588c),
+	regmap_reg_range(0x5890, 0x5890),
+	regmap_reg_range(0x5894, 0x58a0),
+	regmap_reg_range(0x58a0, 0x58ab),
+	regmap_reg_range(0x58c1, 0x58e7),
+	regmap_reg_range(0x5900, 0x5907),
+	regmap_reg_range(0x5914, 0x5920),
+	regmap_reg_range(0x5923, 0x5936),
+	regmap_reg_range(0x5938, 0x593d),
+	regmap_reg_range(0x5940, 0x5941),
+	regmap_reg_range(0x5944, 0x5953),
+	regmap_reg_range(0x5a00, 0x5a1b),
+	regmap_reg_range(0x5b00, 0x5b04),
+	regmap_reg_range(0x5b08, 0x5b13),
+	regmap_reg_range(0x5c00, 0x5c05),
+	regmap_reg_range(0x5c08, 0x5c1b),
+
+	/* Port 6 */
+	regmap_reg_range(0x6000, 0x6001),
+	regmap_reg_range(0x6004, 0x600b),
+	regmap_reg_range(0x601b, 0x601b),
+	regmap_reg_range(0x601f, 0x6021),
+	regmap_reg_range(0x6030, 0x6030),
+	regmap_reg_range(0x6040, 0x6040),
+	regmap_reg_range(0x6200, 0x620b),
+	regmap_reg_range(0x6300, 0x6307),
+	regmap_reg_range(0x6400, 0x6405),
+	regmap_reg_range(0x6408, 0x6409),
+	regmap_reg_range(0x6410, 0x6417),
+	regmap_reg_range(0x6420, 0x6427),
+	regmap_reg_range(0x6500, 0x6507),
+	regmap_reg_range(0x6600, 0x6665),
+	regmap_reg_range(0x6668, 0x668f),
+	regmap_reg_range(0x6694, 0x669b),
+	regmap_reg_range(0x66a0, 0x66a2),
+	regmap_reg_range(0x66c0, 0x66c3),
+	regmap_reg_range(0x66d0, 0x66d4),
+	regmap_reg_range(0x66e0, 0x66ef),
+	regmap_reg_range(0x6800, 0x6804),
+	regmap_reg_range(0x6808, 0x680b),
+	regmap_reg_range(0x6810, 0x681f),
+	regmap_reg_range(0x6850, 0x6857),
+	regmap_reg_range(0x6860, 0x686b),
+	regmap_reg_range(0x6870, 0x688c),
+	regmap_reg_range(0x6890, 0x6890),
+	regmap_reg_range(0x6894, 0x68a0),
+	regmap_reg_range(0x68a0, 0x68ab),
+	regmap_reg_range(0x68c1, 0x68e7),
+	regmap_reg_range(0x6900, 0x6907),
+	regmap_reg_range(0x6914, 0x6920),
+	regmap_reg_range(0x6923, 0x6936),
+	regmap_reg_range(0x6938, 0x693d),
+	regmap_reg_range(0x6940, 0x6941),
+	regmap_reg_range(0x6944, 0x6953),
+	regmap_reg_range(0x6a00, 0x6a1b),
+	regmap_reg_range(0x6b00, 0x6b04),
+	regmap_reg_range(0x6b08, 0x6b13),
+	regmap_reg_range(0x6c00, 0x6c05),
+	regmap_reg_range(0x6c08, 0x6c1b),
+
+	/* Port 7 */
+	regmap_reg_range(0x7000, 0x7001),
+	regmap_reg_range(0x7004, 0x700b),
+	regmap_reg_range(0x701b, 0x701b),
+	regmap_reg_range(0x701f, 0x7021),
+	regmap_reg_range(0x7030, 0x7030),
+	regmap_reg_range(0x7040, 0x7040),
+	regmap_reg_range(0x7100, 0x711f),
+	regmap_reg_range(0x7200, 0x720b),
+	regmap_reg_range(0x7300, 0x7307),
+	regmap_reg_range(0x7400, 0x7405),
+	regmap_reg_range(0x7408, 0x7409),
+	regmap_reg_range(0x7410, 0x7417),
+	regmap_reg_range(0x7420, 0x7427),
+	regmap_reg_range(0x7500, 0x7507),
+	regmap_reg_range(0x7600, 0x7665),
+	regmap_reg_range(0x7668, 0x768f),
+	regmap_reg_range(0x7694, 0x769b),
+	regmap_reg_range(0x76a0, 0x76a2),
+	regmap_reg_range(0x76c0, 0x76c3),
+	regmap_reg_range(0x76d0, 0x76d4),
+	regmap_reg_range(0x76e0, 0x76ef),
+	regmap_reg_range(0x7800, 0x7804),
+	regmap_reg_range(0x7808, 0x780b),
+	regmap_reg_range(0x7810, 0x781f),
+	regmap_reg_range(0x7850, 0x7857),
+	regmap_reg_range(0x7860, 0x786b),
+	regmap_reg_range(0x7870, 0x788c),
+	regmap_reg_range(0x7890, 0x7890),
+	regmap_reg_range(0x7894, 0x78a0),
+	regmap_reg_range(0x78a0, 0x78ab),
+	regmap_reg_range(0x78c1, 0x78e7),
+	regmap_reg_range(0x7900, 0x7907),
+	regmap_reg_range(0x7914, 0x7920),
+	regmap_reg_range(0x7923, 0x7936),
+	regmap_reg_range(0x7938, 0x793d),
+	regmap_reg_range(0x7940, 0x7941),
+	regmap_reg_range(0x7944, 0x7953),
+	regmap_reg_range(0x7a00, 0x7a1b),
+	regmap_reg_range(0x7b00, 0x7b04),
+	regmap_reg_range(0x7b08, 0x7b13),
+	regmap_reg_range(0x7c00, 0x7c05),
+	regmap_reg_range(0x7c08, 0x7c1b),
+
+	/* Port 8 */
+	regmap_reg_range(0x8000, 0x8001),
+	regmap_reg_range(0x8004, 0x800b),
+	regmap_reg_range(0x801b, 0x801b),
+	regmap_reg_range(0x801f, 0x8021),
+	regmap_reg_range(0x8030, 0x8030),
+	regmap_reg_range(0x8040, 0x8040),
+	regmap_reg_range(0x8100, 0x811f),
+	regmap_reg_range(0x8200, 0x820b),
+	regmap_reg_range(0x8300, 0x8307),
+	regmap_reg_range(0x8400, 0x8405),
+	regmap_reg_range(0x8408, 0x8409),
+	regmap_reg_range(0x8410, 0x8417),
+	regmap_reg_range(0x8420, 0x8427),
+	regmap_reg_range(0x8500, 0x8507),
+	regmap_reg_range(0x8600, 0x8665),
+	regmap_reg_range(0x8668, 0x868f),
+	regmap_reg_range(0x8694, 0x869b),
+	regmap_reg_range(0x86a0, 0x86a2),
+	regmap_reg_range(0x86c0, 0x86c3),
+	regmap_reg_range(0x86d0, 0x86d4),
+	regmap_reg_range(0x86e0, 0x86ef),
+	regmap_reg_range(0x8800, 0x8804),
+	regmap_reg_range(0x8808, 0x880b),
+	regmap_reg_range(0x8810, 0x881f),
+	regmap_reg_range(0x8850, 0x8857),
+	regmap_reg_range(0x8860, 0x886b),
+	regmap_reg_range(0x8870, 0x888c),
+	regmap_reg_range(0x8890, 0x8890),
+	regmap_reg_range(0x8894, 0x88a0),
+	regmap_reg_range(0x88a0, 0x88ab),
+	regmap_reg_range(0x88c1, 0x88e7),
+	regmap_reg_range(0x8900, 0x8907),
+	regmap_reg_range(0x8914, 0x8920),
+	regmap_reg_range(0x8923, 0x8936),
+	regmap_reg_range(0x8938, 0x893d),
+	regmap_reg_range(0x8940, 0x8941),
+	regmap_reg_range(0x8944, 0x8953),
+	regmap_reg_range(0x8a00, 0x8a1b),
+	regmap_reg_range(0x8b00, 0x8b04),
+	regmap_reg_range(0x8b08, 0x8b13),
+	regmap_reg_range(0x8c00, 0x8c05),
+	regmap_reg_range(0x8c08, 0x8c1b),
+};
+
+static const struct regmap_access_table lan9374_register_set = {
+	.yes_ranges = lan9374_valid_regs,
+	.n_yes_ranges = ARRAY_SIZE(lan9374_valid_regs),
+};
+
 const struct ksz_chip_data ksz_switch_chips[] = {
 	[KSZ8563] = {
 		.chip_id = KSZ8563_CHIP_ID,
@@ -1334,6 +3084,8 @@  const struct ksz_chip_data ksz_switch_chips[] = {
 		.supports_rmii = {false, false, false, false, true},
 		.supports_rgmii = {false, false, false, false, true},
 		.internal_phy = {true, true, true, true, false},
+		.wr_table = &lan9370_register_set,
+		.rd_table = &lan9370_register_set,
 	},
 
 	[LAN9371] = {
@@ -1358,6 +3110,8 @@  const struct ksz_chip_data ksz_switch_chips[] = {
 		.supports_rmii = {false, false, false, false, true, true},
 		.supports_rgmii = {false, false, false, false, true, true},
 		.internal_phy = {true, true, true, true, false, false},
+		.wr_table = &lan9371_register_set,
+		.rd_table = &lan9371_register_set,
 	},
 
 	[LAN9372] = {
@@ -1386,6 +3140,8 @@  const struct ksz_chip_data ksz_switch_chips[] = {
 				   true, true, false, false},
 		.internal_phy	= {true, true, true, true,
 				   false, false, true, true},
+		.wr_table = &lan9372_register_set,
+		.rd_table = &lan9372_register_set,
 	},
 
 	[LAN9373] = {
@@ -1414,6 +3170,8 @@  const struct ksz_chip_data ksz_switch_chips[] = {
 				   true, true, false, false},
 		.internal_phy	= {true, true, true, false,
 				   false, false, true, true},
+		.wr_table = &lan9373_register_set,
+		.rd_table = &lan9373_register_set,
 	},
 
 	[LAN9374] = {
@@ -1442,6 +3200,8 @@  const struct ksz_chip_data ksz_switch_chips[] = {
 				   true, true, false, false},
 		.internal_phy	= {true, true, true, true,
 				   false, false, true, true},
+		.wr_table = &lan9374_register_set,
+		.rd_table = &lan9374_register_set,
 	},
 };
 EXPORT_SYMBOL_GPL(ksz_switch_chips);