2014-02-24 15:54:12 +00:00
|
|
|
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
|
|
|
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
|
2014-07-08 12:27:55 +00:00
|
|
|
@@ -47,6 +47,12 @@
|
2014-02-24 15:54:12 +00:00
|
|
|
#define NB4_SPI_GPIO_CLK 6
|
|
|
|
#define NB4_74HC64_GPIO(X) (NB4_74X164_GPIO_BASE + (X))
|
|
|
|
|
|
|
|
+#define CT6373_PID_OFFSET 0xff80
|
|
|
|
+#define CT6373_74X164_GPIO_BASE 64
|
|
|
|
+#define CT6373_SPI_GPIO_MOSI 7
|
|
|
|
+#define CT6373_SPI_GPIO_CLK 6
|
|
|
|
+#define CT6373_74HC64_GPIO(X) (CT6373_74X164_GPIO_BASE + (X))
|
|
|
|
+
|
2014-07-08 12:27:55 +00:00
|
|
|
/*
|
|
|
|
* known 3368 boards
|
|
|
|
*/
|
2014-08-01 21:56:38 +00:00
|
|
|
@@ -2347,6 +2353,117 @@ static struct board_info __initdata boar
|
2014-02-24 15:54:12 +00:00
|
|
|
.num_spis = ARRAY_SIZE(nb4_spi_devices),
|
|
|
|
};
|
|
|
|
|
|
|
|
+
|
|
|
|
+struct spi_gpio_platform_data ct6373_spi_gpio_data = {
|
|
|
|
+ .sck = CT6373_SPI_GPIO_CLK,
|
|
|
|
+ .mosi = CT6373_SPI_GPIO_MOSI,
|
|
|
|
+ .miso = SPI_GPIO_NO_MISO,
|
|
|
|
+ .num_chipselect = 1,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device ct6373_spi_gpio = {
|
|
|
|
+ .name = "spi_gpio",
|
|
|
|
+ .id = 1,
|
|
|
|
+ .dev = {
|
|
|
|
+ .platform_data = &ct6373_spi_gpio_data,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device * __initdata ct6373_devices[] = {
|
|
|
|
+ &ct6373_spi_gpio,
|
|
|
|
+};
|
|
|
|
+
|
2014-04-04 10:17:08 +00:00
|
|
|
+#if 0 /* FIXME: 3.14 dropped non-DT support */
|
2014-02-24 15:54:12 +00:00
|
|
|
+const struct gen_74x164_chip_platform_data ct6373_74x164_platform_data = {
|
|
|
|
+ .base = CT6373_74X164_GPIO_BASE
|
|
|
|
+};
|
2014-04-04 10:17:08 +00:00
|
|
|
+#endif
|
2014-02-24 15:54:12 +00:00
|
|
|
+
|
|
|
|
+static struct spi_board_info ct6373_spi_devices[] = {
|
2014-04-04 10:17:08 +00:00
|
|
|
+#if 0 /* FIXME: 3.14 dropped non-DT support */
|
2014-02-24 15:54:12 +00:00
|
|
|
+ {
|
|
|
|
+ .modalias = "74x164",
|
|
|
|
+ .max_speed_hz = 781000,
|
|
|
|
+ .bus_num = 1,
|
|
|
|
+ .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
|
|
|
|
+ .mode = SPI_MODE_0,
|
|
|
|
+ .platform_data = &ct6373_74x164_platform_data
|
|
|
|
+ }
|
2014-04-04 10:17:08 +00:00
|
|
|
+#endif
|
2014-02-24 15:54:12 +00:00
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct board_info __initdata board_ct6373_1 = {
|
|
|
|
+ .name = "CT6373-1",
|
|
|
|
+ .expected_cpu_id = 0x6358,
|
|
|
|
+
|
|
|
|
+ .has_uart0 = 1,
|
|
|
|
+ .has_pci = 1,
|
|
|
|
+ .has_ohci0 = 1,
|
|
|
|
+ .has_ehci0 = 1,
|
|
|
|
+
|
|
|
|
+ .has_enet1 = 1,
|
|
|
|
+ .enet1 = {
|
|
|
|
+ .has_phy = 1,
|
|
|
|
+ .phy_id = 0,
|
|
|
|
+ .force_speed_100 = 1,
|
|
|
|
+ .force_duplex_full = 1,
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ .leds = {
|
|
|
|
+ {
|
|
|
|
+ .name = "CT6373-1:green:power",
|
|
|
|
+ .gpio = 0,
|
|
|
|
+ .default_trigger = "default-on",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "CT6373-1:green:usb",
|
|
|
|
+ .gpio = 3,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "CT6373-1:green:wlan",
|
|
|
|
+ .gpio = 9,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "CT6373-1:green:adsl",
|
|
|
|
+ .gpio = CT6373_74HC64_GPIO(0),
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "CT6373-1:green:line",
|
|
|
|
+ .gpio = CT6373_74HC64_GPIO(1),
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "CT6373-1:green:fxs1",
|
|
|
|
+ .gpio = CT6373_74HC64_GPIO(2),
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .name = "CT6373-1:green:fxs2",
|
|
|
|
+ .gpio = CT6373_74HC64_GPIO(3),
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ .buttons = {
|
|
|
|
+ {
|
|
|
|
+ .desc = "reset",
|
|
|
|
+ .gpio = 35,
|
|
|
|
+ .active_low = 1,
|
|
|
|
+ .type = EV_KEY,
|
|
|
|
+ .code = KEY_RESTART,
|
|
|
|
+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ .devs = ct6373_devices,
|
|
|
|
+ .num_devs = ARRAY_SIZE(ct6373_devices),
|
|
|
|
+ .spis = ct6373_spi_devices,
|
|
|
|
+ .num_spis = ARRAY_SIZE(ct6373_spi_devices),
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
static struct board_info __initdata board_HW553 = {
|
|
|
|
.name = "HW553",
|
|
|
|
.expected_cpu_id = 0x6358,
|
2014-08-01 21:56:38 +00:00
|
|
|
@@ -2684,6 +2801,7 @@ static const struct board_info __initcon
|
2014-02-24 15:54:12 +00:00
|
|
|
&board_nb4_ser_r2,
|
|
|
|
&board_nb4_fxc_r1,
|
|
|
|
&board_nb4_fxc_r2,
|
|
|
|
+ &board_ct6373_1,
|
|
|
|
&board_HW553,
|
|
|
|
&board_spw303v,
|
|
|
|
#endif
|