Root/target/linux/generic/files/include/linux/rtl8367.h

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

Archive Download this file



interactive