map: add a legacymap option
[openwrt/staging/wigyori.git] / target / linux / bcm63xx / patches-5.4 / 518-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 @@ -774,6 +774,52 @@ 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 + .expected_cpu_id = 0x6368,
23 +
24 + .has_pci = 1,
25 + .has_ohci0 = 1,
26 + .has_ehci0 = 1,
27 +
28 + .has_usbd = 1,
29 + .usbd = {
30 + .use_fullspeed = 0,
31 + .port_no = 0,
32 + },
33 +
34 + .has_enetsw = 1,
35 + .enetsw = {
36 + .used_ports = {
37 + [1] = {
38 + .used = 1,
39 + .phy_id = 2,
40 + .name = "port1",
41 + },
42 + [2] = {
43 + .used = 1,
44 + .phy_id = 3,
45 + .name = "port2",
46 + },
47 + [4] = {
48 + .used = 1,
49 + .phy_id = 0x12,
50 + .name = "port0",
51 + },
52 + [5] = {
53 + .used = 1,
54 + .phy_id = 0x11,
55 + .name = "port3",
56 + },
57 + },
58 + },
59 +};
60 +#endif /* CONFIG_BCM63XX_CPU_6368 */
61 +
62 +/*
63 * all boards
64 */
65 static const struct board_info __initconst *bcm963xx_boards[] = {
66 @@ -824,6 +870,9 @@ static const struct board_info __initcon
67 &board_HW553,
68 &board_spw303v,
69 #endif /* CONFIG_BCM63XX_CPU_6358 */
70 +#ifdef CONFIG_BCM63XX_CPU_6368
71 + &board_96368mvwg,
72 +#endif /* CONFIG_BCM63XX_CPU_6368 */
73 };
74
75 static struct of_device_id const bcm963xx_boards_dt[] = {
76 @@ -888,6 +937,7 @@ static struct of_device_id const bcm963x
77 #ifdef CONFIG_BCM63XX_CPU_6362
78 #endif /* CONFIG_BCM63XX_CPU_6362 */
79 #ifdef CONFIG_BCM63XX_CPU_6368
80 + { .compatible = "brcm,bcm96368mvwg", .data = &board_96368mvwg, },
81 #endif /* CONFIG_BCM63XX_CPU_6368 */
82 #ifdef CONFIG_BCM63XX_CPU_63268
83 #endif /* CONFIG_BCM63XX_CPU_63268 */
84 --- a/arch/mips/bcm63xx/boards/board_common.c
85 +++ b/arch/mips/bcm63xx/boards/board_common.c
86 @@ -81,12 +81,25 @@ void __init board_early_setup(const stru
87 bcm63xx_pci_enabled = 1;
88 if (BCMCPU_IS_6348())
89 val |= GPIO_MODE_6348_G2_PCI;
90 +
91 + if (BCMCPU_IS_6368())
92 + val |= GPIO_MODE_6368_PCI_REQ1 |
93 + GPIO_MODE_6368_PCI_GNT1 |
94 + GPIO_MODE_6368_PCI_INTB |
95 + GPIO_MODE_6368_PCI_REQ0 |
96 + GPIO_MODE_6368_PCI_GNT0;
97 }
98 #endif
99
100 if (board.has_pccard) {
101 if (BCMCPU_IS_6348())
102 val |= GPIO_MODE_6348_G1_MII_PCCARD;
103 +
104 + if (BCMCPU_IS_6368())
105 + val |= GPIO_MODE_6368_PCMCIA_CD1 |
106 + GPIO_MODE_6368_PCMCIA_CD2 |
107 + GPIO_MODE_6368_PCMCIA_VS1 |
108 + GPIO_MODE_6368_PCMCIA_VS2;
109 }
110
111 if (board.has_enet0 && !board.enet0.use_internal_phy) {