bcm63xx: refactor board patches
[openwrt/openwrt.git] / target / linux / bcm63xx / patches-5.4 / 536-board_96318ref.patch
1 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
2 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
3 @@ -50,6 +50,52 @@ static struct board_info __initdata boar
4 #endif /* CONFIG_BCM63XX_CPU_3368 */
5
6 /*
7 + * known 6318 boards
8 + */
9 +#ifdef CONFIG_BCM63XX_CPU_6318
10 +static struct board_info __initdata board_96318ref = {
11 + .name = "96318REF",
12 + .expected_cpu_id = 0x6318,
13 +
14 + .has_pci = 1,
15 + .has_ehci0 = 1,
16 + .num_usbh_ports = 1,
17 +
18 + .has_usbd = 1,
19 + .usbd = {
20 + .use_fullspeed = 0,
21 + .port_no = 0,
22 + },
23 +
24 + .has_enetsw = 1,
25 + .enetsw = {
26 + .used_ports = {
27 + [0] = {
28 + .used = 1,
29 + .phy_id = 1,
30 + .name = "Port 1",
31 + },
32 + [1] = {
33 + .used = 1,
34 + .phy_id = 2,
35 + .name = "Port 2",
36 + },
37 + [2] = {
38 + .used = 1,
39 + .phy_id = 3,
40 + .name = "Port 3",
41 + },
42 + [3] = {
43 + .used = 1,
44 + .phy_id = 4,
45 + .name = "Port 4",
46 + },
47 + },
48 + },
49 +};
50 +#endif /* CONFIG_BCM63XX_CPU_6318 */
51 +
52 +/*
53 * known 6328 boards
54 */
55 #ifdef CONFIG_BCM63XX_CPU_6328
56 @@ -1429,6 +1475,9 @@ static const struct board_info __initcon
57 #ifdef CONFIG_BCM63XX_CPU_3368
58 &board_cvg834g,
59 #endif /* CONFIG_BCM63XX_CPU_3368 */
60 +#ifdef CONFIG_BCM63XX_CPU_6318
61 + &board_96318ref,
62 +#endif /* CONFIG_BCM63XX_CPU_6318 */
63 #ifdef CONFIG_BCM63XX_CPU_6328
64 &board_96328avng,
65 &board_AR5381u,
66 @@ -1503,6 +1552,9 @@ static struct of_device_id const bcm963x
67 #ifdef CONFIG_BCM63XX_CPU_3368
68 { .compatible = "netgear,cvg834g", .data = &board_cvg834g, },
69 #endif
70 +#ifdef CONFIG_BCM63XX_CPU_6318
71 + { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, },
72 +#endif
73 #ifdef CONFIG_BCM63XX_CPU_6328
74 { .compatible = "adb,a4001n1", .data = &board_A4001N1, },
75 { .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, },