blob: aab553e229fb88adda414d25f3c4b5734bdd0e7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
/*
* Platform data definition for the Realtek RTL8367 ethernet switch driver
*
* Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#ifndef _RTL8367_H
#define _RTL8367_H
#define RTL8367_DRIVER_NAME "rtl8367"
enum rtl8367_port_speed {
RTL8367_PORT_SPEED_10 = 0,
RTL8367_PORT_SPEED_100,
RTL8367_PORT_SPEED_1000,
};
struct rtl8367_port_ability {
int force_mode;
int nway;
int txpause;
int rxpause;
int link;
int duplex;
enum rtl8367_port_speed speed;
};
enum rtl8367_extif_mode {
RTL8367_EXTIF_MODE_DISABLED = 0,
RTL8367_EXTIF_MODE_RGMII,
RTL8367_EXTIF_MODE_MII_MAC,
RTL8367_EXTIF_MODE_MII_PHY,
RTL8367_EXTIF_MODE_TMII_MAC,
RTL8367_EXTIF_MODE_TMII_PHY,
RTL8367_EXTIF_MODE_GMII,
RTL8367_EXTIF_MODE_RGMII_33V,
};
struct rtl8367_extif_config {
unsigned int txdelay;
unsigned int rxdelay;
enum rtl8367_extif_mode mode;
struct rtl8367_port_ability ability;
};
struct rtl8367_platform_data {
unsigned gpio_sda;
unsigned gpio_sck;
struct rtl8367_extif_config *extif0_cfg;
struct rtl8367_extif_config *extif1_cfg;
};
#endif /* _RTL8367_H */
|