ar71xx: register rtl8366-smi device on the DIR-825 B1 board
SVN-Revision: 18710
This commit is contained in:
parent
2bff4bf4e5
commit
2b988fa855
@ -19,6 +19,7 @@
|
|||||||
#include <linux/pci.h>
|
#include <linux/pci.h>
|
||||||
#include <linux/ath9k_platform.h>
|
#include <linux/ath9k_platform.h>
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
#include <linux/rtl8366_smi.h>
|
||||||
|
|
||||||
#include <asm/mips_machine.h>
|
#include <asm/mips_machine.h>
|
||||||
#include <asm/mach-ar71xx/ar71xx.h>
|
#include <asm/mach-ar71xx/ar71xx.h>
|
||||||
@ -36,6 +37,9 @@
|
|||||||
#define DIR825B1_GPIO_BTN_RESET 3
|
#define DIR825B1_GPIO_BTN_RESET 3
|
||||||
#define DIR825B1_GPIO_BTN_POWERSAVE 8
|
#define DIR825B1_GPIO_BTN_POWERSAVE 8
|
||||||
|
|
||||||
|
#define DIR825B1_GPIO_RTL8366_SDA 5
|
||||||
|
#define DIR825B1_GPIO_RTL8366_SCK 7
|
||||||
|
|
||||||
#define DIR825B1_BUTTONS_POLL_INTERVAL 20
|
#define DIR825B1_BUTTONS_POLL_INTERVAL 20
|
||||||
|
|
||||||
#define DIR825B1_CAL_LOCATION_0 0x1f661000
|
#define DIR825B1_CAL_LOCATION_0 0x1f661000
|
||||||
@ -137,6 +141,19 @@ static struct gpio_button dir825b1_gpio_buttons[] __initdata = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct rtl8366_smi_platform_data dir825b1_rtl8366_smi_data = {
|
||||||
|
.gpio_sda = DIR825B1_GPIO_RTL8366_SDA,
|
||||||
|
.gpio_sck = DIR825B1_GPIO_RTL8366_SCK,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct platform_device dir825b1_rtl8366_smi_device = {
|
||||||
|
.name = "rtl8366-smi",
|
||||||
|
.id = -1,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &dir825b1_rtl8366_smi_data,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
static struct ar71xx_pci_irq dir825b1_pci_irqs[] __initdata = {
|
static struct ar71xx_pci_irq dir825b1_pci_irqs[] __initdata = {
|
||||||
{
|
{
|
||||||
@ -267,16 +284,15 @@ static void __init dir825b1_setup(void)
|
|||||||
|
|
||||||
ar71xx_add_device_mdio(0x0);
|
ar71xx_add_device_mdio(0x0);
|
||||||
|
|
||||||
|
ar71xx_eth0_data.mii_bus_dev = &dir825b1_rtl8366_smi_device.dev;
|
||||||
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
|
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
|
||||||
ar71xx_eth0_data.phy_mask = 0x1e;
|
|
||||||
ar71xx_eth0_data.speed = SPEED_1000;
|
ar71xx_eth0_data.speed = SPEED_1000;
|
||||||
ar71xx_eth0_data.duplex = DUPLEX_FULL;
|
ar71xx_eth0_data.duplex = DUPLEX_FULL;
|
||||||
ar71xx_eth0_pll_data.pll_1000 = 0x11110000;
|
ar71xx_eth0_pll_data.pll_1000 = 0x11110000;
|
||||||
|
|
||||||
|
ar71xx_eth1_data.mii_bus_dev = &dir825b1_rtl8366_smi_device.dev;
|
||||||
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
|
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
|
||||||
ar71xx_eth1_data.phy_mask = 0xc0;
|
ar71xx_eth1_data.phy_mask = 0x10;
|
||||||
ar71xx_eth1_data.speed = SPEED_1000;
|
|
||||||
ar71xx_eth1_data.duplex = DUPLEX_FULL;
|
|
||||||
ar71xx_eth1_pll_data.pll_1000 = 0x11110000;
|
ar71xx_eth1_pll_data.pll_1000 = 0x11110000;
|
||||||
|
|
||||||
ar71xx_add_device_eth(0);
|
ar71xx_add_device_eth(0);
|
||||||
@ -294,6 +310,7 @@ static void __init dir825b1_setup(void)
|
|||||||
|
|
||||||
ar71xx_add_device_usb();
|
ar71xx_add_device_usb();
|
||||||
|
|
||||||
|
platform_device_register(&dir825b1_rtl8366_smi_device);
|
||||||
dir825b1_pci_init();
|
dir825b1_pci_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user