brcm63xx: Add DT support for 96368MVWG
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.14 / 520-bcm63xx-add-support-for-96368MVWG-board.patch
1 From eeacc2529942051504bc957726aa178671344421 Mon Sep 17 00:00:00 2001
2 From: Maxime Bizon <mbizon@freebox.fr>
3 Date: Wed, 20 Jan 2010 16:21:30 +0100
4 Subject: [PATCH 32/63] bcm63xx: add support for 96368MVWG board.
5
6 ---
7 arch/mips/bcm63xx/boards/board_bcm963xx.c | 95 ++++++++++++++++++++
8 .../mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 +
9 2 files changed, 97 insertions(+), 0 deletions(-)
10
11 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
12 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
13 @@ -1936,6 +1936,86 @@ static struct board_info __initdata boar
14 #endif /* CONFIG_BCM63XX_CPU_6358 */
15
16 /*
17 + * known 6368 boards
18 + */
19 +#ifdef CONFIG_BCM63XX_CPU_6368
20 +static struct board_info __initdata board_96368mvwg = {
21 + .name = "96368MVWG",
22 + .of_board_id = "brcm,bcm96368mvwg",
23 + .expected_cpu_id = 0x6368,
24 +
25 + .has_uart0 = 1,
26 + .has_pci = 1,
27 +
28 + .has_usbd = 1,
29 +
30 + .usbd = {
31 + .use_fullspeed = 0,
32 + .port_no = 0,
33 + },
34 +
35 + .has_enetsw = 1,
36 +
37 + .enetsw = {
38 + .used_ports = {
39 + [1] = {
40 + .used = 1,
41 + .phy_id = 2,
42 + .name = "port1",
43 + },
44 +
45 + [2] = {
46 + .used = 1,
47 + .phy_id = 3,
48 + .name = "port2",
49 + },
50 +
51 + [4] = {
52 + .used = 1,
53 + .phy_id = 0x12,
54 + .name = "port0",
55 + },
56 +
57 + [5] = {
58 + .used = 1,
59 + .phy_id = 0x11,
60 + .name = "port3",
61 + },
62 + },
63 + },
64 +
65 + .leds = {
66 + {
67 + .name = "96368MVWG:green:adsl",
68 + .gpio = 2,
69 + .active_low = 1,
70 + },
71 + {
72 + .name = "96368MVWG:green:ppp",
73 + .gpio = 5,
74 + },
75 + {
76 + .name = "96368MVWG:green:power",
77 + .gpio = 22,
78 + .default_trigger = "default-on",
79 + },
80 + {
81 + .name = "96368MVWG:green:wps",
82 + .gpio = 23,
83 + .active_low = 1,
84 + },
85 + {
86 + .name = "96368MVWG:red:ppp-fail",
87 + .gpio = 31,
88 + },
89 + },
90 +
91 + .has_ohci0 = 1,
92 + .has_ehci0 = 1,
93 +};
94 +#endif /* CONFIG_BCM63XX_CPU_6368 */
95 +
96 +/*
97 * all boards
98 */
99 static const struct board_info __initconst *bcm963xx_boards[] = {
100 @@ -1987,6 +2067,10 @@ static const struct board_info __initcon
101 &board_HW553,
102 &board_spw303v,
103 #endif
104 +
105 +#ifdef CONFIG_BCM63XX_CPU_6368
106 + &board_96368mvwg,
107 +#endif
108 };
109
110 /*
111 --- a/arch/mips/bcm63xx/boards/board_common.c
112 +++ b/arch/mips/bcm63xx/boards/board_common.c
113 @@ -88,12 +88,25 @@ void __init board_early_setup(const stru
114 bcm63xx_pci_enabled = 1;
115 if (BCMCPU_IS_6348())
116 val |= GPIO_MODE_6348_G2_PCI;
117 +
118 + if (BCMCPU_IS_6368())
119 + val |= GPIO_MODE_6368_PCI_REQ1 |
120 + GPIO_MODE_6368_PCI_GNT1 |
121 + GPIO_MODE_6368_PCI_INTB |
122 + GPIO_MODE_6368_PCI_REQ0 |
123 + GPIO_MODE_6368_PCI_GNT0;
124 }
125 #endif
126
127 if (board.has_pccard) {
128 if (BCMCPU_IS_6348())
129 val |= GPIO_MODE_6348_G1_MII_PCCARD;
130 +
131 + if (BCMCPU_IS_6368())
132 + val |= GPIO_MODE_6368_PCMCIA_CD1 |
133 + GPIO_MODE_6368_PCMCIA_CD2 |
134 + GPIO_MODE_6368_PCMCIA_VS1 |
135 + GPIO_MODE_6368_PCMCIA_VS2;
136 }
137
138 if (board.has_enet0 && !board.enet0.use_internal_phy) {