1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
4 #define NB4_SPI_GPIO_CLK 6
5 #define NB4_74HC64_GPIO(X) (NB4_74X164_GPIO_BASE + (X))
7 +#define CT6373_PID_OFFSET 0xff80
8 +#define CT6373_74X164_GPIO_BASE 64
9 +#define CT6373_SPI_GPIO_MOSI 7
10 +#define CT6373_SPI_GPIO_CLK 6
11 +#define CT6373_74HC64_GPIO(X) (CT6373_74X164_GPIO_BASE + (X))
16 @@ -2035,6 +2041,124 @@ static struct board_info __initdata boar
17 .num_spis = ARRAY_SIZE(nb4_spi_devices),
21 +struct spi_gpio_platform_data ct6373_spi_gpio_data = {
22 + .sck = CT6373_SPI_GPIO_CLK,
23 + .mosi = CT6373_SPI_GPIO_MOSI,
24 + .miso = SPI_GPIO_NO_MISO,
25 + .num_chipselect = 1,
28 +static struct platform_device ct6373_spi_gpio = {
32 + .platform_data = &ct6373_spi_gpio_data,
36 +static struct platform_device * __initdata ct6373_devices[] = {
40 +#if 0 /* FIXME: 3.14 dropped non-DT support */
41 +const struct gen_74x164_chip_platform_data ct6373_74x164_platform_data = {
42 + .base = CT6373_74X164_GPIO_BASE
46 +static struct spi_board_info ct6373_spi_devices[] = {
47 +#if 0 /* FIXME: 3.14 dropped non-DT support */
49 + .modalias = "74x164",
50 + .max_speed_hz = 781000,
52 + .controller_data = (void *) SPI_GPIO_NO_CHIPSELECT,
54 + .platform_data = &ct6373_74x164_platform_data
59 +static struct board_info __initdata board_ct6373_1 = {
61 + .expected_cpu_id = 0x6358,
65 + .use_fallback_sprom = 1,
73 + .force_speed_100 = 1,
74 + .force_duplex_full = 1,
79 + .name = "CT6373-1:green:power",
81 + .default_trigger = "default-on",
84 + .name = "CT6373-1:green:usb",
89 + .name = "CT6373-1:green:wlan",
94 + .name = "CT6373-1:green:adsl",
95 + .gpio = CT6373_74HC64_GPIO(0),
99 + .name = "CT6373-1:green:line",
100 + .gpio = CT6373_74HC64_GPIO(1),
104 + .name = "CT6373-1:green:fxs1",
105 + .gpio = CT6373_74HC64_GPIO(2),
109 + .name = "CT6373-1:green:fxs2",
110 + .gpio = CT6373_74HC64_GPIO(3),
121 + .code = KEY_RESTART,
122 + .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL,
126 + .fallback_sprom = {
127 + .type = SPROM_BCM4318,
132 + .devs = ct6373_devices,
133 + .num_devs = ARRAY_SIZE(ct6373_devices),
134 + .spis = ct6373_spi_devices,
135 + .num_spis = ARRAY_SIZE(ct6373_spi_devices),
138 static struct board_info __initdata board_HW553 = {
140 .expected_cpu_id = 0x6358,
141 @@ -2376,6 +2500,7 @@ static const struct board_info __initcon
142 &board_dsl_274xb_rev_c,
149 @@ -2419,6 +2544,7 @@ static struct of_device_id const bcm963x
150 #ifdef CONFIG_BCM63XX_CPU_6358
151 { .compatible = "brcm,bcm96358vw", .data = &board_96358vw, },
152 { .compatible = "brcm,bcm96358vw2", .data = &board_96358vw2, },
153 + { .compatible = "comtrend,ct-6373", .data = &board_ct6373_1, },
154 { .compatible = "d-link,dsl-274xb-c2", .data = &board_dsl_274xb_rev_c, },
155 { .compatible = "huawei,hg553", .data = &board_HW553, },
156 { .compatible = "pirelli,a226g", .data = &board_DWVS0, },