xref: /openbmc/linux/drivers/net/ethernet/sfc/falcon/phy.h (revision 7effbd18)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /****************************************************************************
3  * Driver for Solarflare network controllers and boards
4  * Copyright 2007-2010 Solarflare Communications Inc.
5  */
6 
7 #ifndef EF4_PHY_H
8 #define EF4_PHY_H
9 
10 /****************************************************************************
11  * 10Xpress (SFX7101) PHY
12  */
13 extern const struct ef4_phy_operations falcon_sfx7101_phy_ops;
14 
15 void tenxpress_set_id_led(struct ef4_nic *efx, enum ef4_led_mode mode);
16 
17 /****************************************************************************
18  * AMCC/Quake QT202x PHYs
19  */
20 extern const struct ef4_phy_operations falcon_qt202x_phy_ops;
21 
22 /* These PHYs provide various H/W control states for LEDs */
23 #define QUAKE_LED_LINK_INVAL	(0)
24 #define QUAKE_LED_LINK_STAT	(1)
25 #define QUAKE_LED_LINK_ACT	(2)
26 #define QUAKE_LED_LINK_ACTSTAT	(3)
27 #define QUAKE_LED_OFF		(4)
28 #define QUAKE_LED_ON		(5)
29 #define QUAKE_LED_LINK_INPUT	(6)	/* Pin is an input. */
30 /* What link the LED tracks */
31 #define QUAKE_LED_TXLINK	(0)
32 #define QUAKE_LED_RXLINK	(8)
33 
34 void falcon_qt202x_set_led(struct ef4_nic *p, int led, int state);
35 
36 /****************************************************************************
37 * Transwitch CX4 retimer
38 */
39 extern const struct ef4_phy_operations falcon_txc_phy_ops;
40 
41 #define TXC_GPIO_DIR_INPUT	0
42 #define TXC_GPIO_DIR_OUTPUT	1
43 
44 void falcon_txc_set_gpio_dir(struct ef4_nic *efx, int pin, int dir);
45 void falcon_txc_set_gpio_val(struct ef4_nic *efx, int pin, int val);
46 
47 #endif
48