xref: /linux/drivers/net/dsa/microchip/lan937x.h (revision c9cd961c0d43a22eb704aa92e1f8fb33e3d286e8)
155ab6ffaSArun Ramadoss /* SPDX-License-Identifier: GPL-2.0 */
255ab6ffaSArun Ramadoss /* Microchip lan937x dev ops headers
355ab6ffaSArun Ramadoss  * Copyright (C) 2019-2022 Microchip Technology Inc.
455ab6ffaSArun Ramadoss  */
555ab6ffaSArun Ramadoss 
655ab6ffaSArun Ramadoss #ifndef __LAN937X_CFG_H
755ab6ffaSArun Ramadoss #define __LAN937X_CFG_H
855ab6ffaSArun Ramadoss 
955ab6ffaSArun Ramadoss int lan937x_reset_switch(struct ksz_device *dev);
1055ab6ffaSArun Ramadoss int lan937x_setup(struct dsa_switch *ds);
11*c9cd961cSArun Ramadoss void lan937x_teardown(struct dsa_switch *ds);
1255ab6ffaSArun Ramadoss void lan937x_port_setup(struct ksz_device *dev, int port, bool cpu_port);
1355ab6ffaSArun Ramadoss void lan937x_config_cpu_port(struct dsa_switch *ds);
1455ab6ffaSArun Ramadoss int lan937x_switch_init(struct ksz_device *dev);
1555ab6ffaSArun Ramadoss void lan937x_switch_exit(struct ksz_device *dev);
168f420456SOleksij Rempel int lan937x_r_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 *data);
178f420456SOleksij Rempel int lan937x_w_phy(struct ksz_device *dev, u16 addr, u16 reg, u16 val);
18ab882368SArun Ramadoss int lan937x_change_mtu(struct ksz_device *dev, int port, int new_mtu);
19c14e878dSArun Ramadoss void lan937x_phylink_get_caps(struct ksz_device *dev, int port,
20c14e878dSArun Ramadoss 			      struct phylink_config *config);
21b19ac41fSArun Ramadoss void lan937x_setup_rgmii_delay(struct ksz_device *dev, int port);
2255ab6ffaSArun Ramadoss #endif
23