diff options
Diffstat (limited to 'target/linux/brcm63xx/patches-3.14/501-board-NB4.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.14/501-board-NB4.patch | 363 |
1 files changed, 4 insertions, 359 deletions
diff --git a/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch b/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch index d2a337be55..fa485d5f4d 100644 --- a/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch +++ b/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch @@ -26,7 +26,7 @@ /* * known 3368 boards */ -@@ -768,6 +780,605 @@ static struct board_info __initdata boar +@@ -768,6 +780,270 @@ static struct board_info __initdata boar .has_ohci0 = 1, }; @@ -72,6 +72,7 @@ + +static struct board_info __initdata board_nb4_ser_r0 = { + .name = "NB4-SER-r0", ++ .of_board_id = "sfr,nb4-ser-r0", + .expected_cpu_id = 0x6358, + + .has_uart0 = 1, @@ -184,236 +185,9 @@ + .num_spis = ARRAY_SIZE(nb4_spi_devices), +}; + -+static struct board_info __initdata board_nb4_ser_r1 = { -+ .name = "NB4-SER-r1", -+ .expected_cpu_id = 0x6358, -+ -+ .has_uart0 = 1, -+ .has_enet0 = 1, -+ .has_enet1 = 1, -+ .has_pci = 1, -+ -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ -+ .has_ohci0 = 1, -+ .has_pccard = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .leds = { -+ { -+ .name = "NB4-SER-r1:white:adsl", -+ .gpio = NB4_74HC64_GPIO(4), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:white:traffic", -+ .gpio = 2, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:white:tel", -+ .gpio = NB4_74HC64_GPIO(3), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:white:tv", -+ .gpio = NB4_74HC64_GPIO(2), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:white:wifi", -+ .gpio = 15, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:white:alarm", -+ .gpio = NB4_74HC64_GPIO(0), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:red:service", -+ .gpio = 29, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:green:service", -+ .gpio = 30, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r1:blue:service", -+ .gpio = 4, -+ .active_low = 1, -+ }, -+ }, -+ .buttons = { -+ { -+ .desc = "reset", -+ .gpio = 34, -+ .type = EV_KEY, -+ .code = KEY_RESTART, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "wps", -+ .gpio = 37, -+ .type = EV_KEY, -+ .code = KEY_WPS_BUTTON, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "service", -+ .gpio = 27, -+ .type = EV_KEY, -+ .code = BTN_0, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "clip", -+ .gpio = 31, -+ .type = EV_KEY, -+ .code = BTN_1, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ }, -+ .devs = nb4_devices, -+ .num_devs = ARRAY_SIZE(nb4_devices), -+ .spis = nb4_spi_devices, -+ .num_spis = ARRAY_SIZE(nb4_spi_devices), -+}; -+ -+static struct board_info __initdata board_nb4_ser_r2 = { -+ .name = "NB4-SER-r2", -+ .expected_cpu_id = 0x6358, -+ -+ .has_uart0 = 1, -+ .has_enet0 = 1, -+ .has_enet1 = 1, -+ .has_pci = 1, -+ -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ -+ .has_ohci0 = 1, -+ .has_pccard = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .leds = { -+ { -+ .name = "NB4-SER-r2:white:adsl", -+ .gpio = NB4_74HC64_GPIO(4), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:white:traffic", -+ .gpio = 2, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:white:tel", -+ .gpio = NB4_74HC64_GPIO(3), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:white:tv", -+ .gpio = NB4_74HC64_GPIO(2), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:white:wifi", -+ .gpio = 15, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:white:alarm", -+ .gpio = NB4_74HC64_GPIO(0), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:red:service", -+ .gpio = 29, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:green:service", -+ .gpio = 30, -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-SER-r2:blue:service", -+ .gpio = 4, -+ .active_low = 1, -+ }, -+ }, -+ .buttons = { -+ { -+ .desc = "reset", -+ .gpio = 34, -+ .type = EV_KEY, -+ .code = KEY_RESTART, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "wps", -+ .gpio = 37, -+ .type = EV_KEY, -+ .code = KEY_WPS_BUTTON, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "service", -+ .gpio = 27, -+ .type = EV_KEY, -+ .code = BTN_0, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "clip", -+ .gpio = 31, -+ .type = EV_KEY, -+ .code = BTN_1, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ }, -+ .devs = nb4_devices, -+ .num_devs = ARRAY_SIZE(nb4_devices), -+ .spis = nb4_spi_devices, -+ .num_spis = ARRAY_SIZE(nb4_spi_devices), -+}; -+ +static struct board_info __initdata board_nb4_fxc_r1 = { + .name = "NB4-FXC-r1", ++ .of_board_id = "sfr,nb4-fxc-r1", + .expected_cpu_id = 0x6358, + + .has_uart0 = 1, @@ -520,144 +294,15 @@ + .spis = nb4_spi_devices, + .num_spis = ARRAY_SIZE(nb4_spi_devices), +}; -+ -+static struct board_info __initdata board_nb4_fxc_r2 = { -+ .name = "NB4-FXC-r2", -+ .expected_cpu_id = 0x6358, -+ -+ .has_uart0 = 1, -+ .has_enet0 = 1, -+ .has_enet1 = 1, -+ .has_pci = 1, -+ -+ .enet0 = { -+ .has_phy = 1, -+ .use_internal_phy = 1, -+ }, -+ -+ .enet1 = { -+ .has_phy = 1, -+ .phy_id = 0, -+ .force_speed_100 = 1, -+ .force_duplex_full = 1, -+ }, -+ -+ -+ .has_ohci0 = 1, -+ .has_pccard = 1, -+ .has_ehci0 = 1, -+ .num_usbh_ports = 2, -+ -+ .leds = { -+ { -+ .name = "NB4-FXC-r2:white:adsl", -+ .gpio = NB4_74HC64_GPIO(4), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-FXC-r2:white:traffic", -+ .gpio = 2, -+ }, -+ { -+ .name = "NB4-FXC-r2:white:tel", -+ .gpio = NB4_74HC64_GPIO(3), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-FXC-r2:white:tv", -+ .gpio = NB4_74HC64_GPIO(2), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-FXC-r2:white:wifi", -+ .gpio = 15, -+ }, -+ { -+ .name = "NB4-FXC-r2:white:alarm", -+ .gpio = NB4_74HC64_GPIO(0), -+ .active_low = 1, -+ }, -+ { -+ .name = "NB4-FXC-r2:red:service", -+ .gpio = 29, -+ }, -+ { -+ .name = "NB4-FXC-r2:green:service", -+ .gpio = 30, -+ }, -+ { -+ .name = "NB4-FXC-r2:blue:service", -+ .gpio = 4, -+ }, -+ }, -+ .buttons = { -+ { -+ .desc = "reset", -+ .gpio = 34, -+ .type = EV_KEY, -+ .code = KEY_RESTART, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "wps", -+ .gpio = 37, -+ .type = EV_KEY, -+ .code = KEY_WPS_BUTTON, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "service", -+ .gpio = 27, -+ .type = EV_KEY, -+ .code = BTN_0, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ { -+ .desc = "clip", -+ .gpio = 31, -+ .type = EV_KEY, -+ .code = BTN_1, -+ .active_low = 1, -+ .debounce_interval = BCM963XX_KEYS_DEBOUNCE_INTERVAL, -+ }, -+ }, -+ .devs = nb4_devices, -+ .num_devs = ARRAY_SIZE(nb4_devices), -+ .spis = nb4_spi_devices, -+ .num_spis = ARRAY_SIZE(nb4_spi_devices), -+}; #endif /* CONFIG_BCM63XX_CPU_6358 */ /* -@@ -804,6 +1415,11 @@ static const struct board_info __initcon +@@ -804,6 +1080,8 @@ static const struct board_info __initcon &board_96358vw2, &board_AGPFS0, &board_DWVS0, + &board_nb4_ser_r0, -+ &board_nb4_ser_r1, -+ &board_nb4_ser_r2, + &board_nb4_fxc_r1, -+ &board_nb4_fxc_r2, #endif }; -@@ -812,6 +1428,16 @@ static void __init boardid_fixup(u8 *boo - struct bcm_tag *tag = (struct bcm_tag *)(boot_addr + CFE_OFFSET_64K); - char *board_name = (char *)bcm63xx_nvram_get_name(); - -+ if (BCMCPU_IS_6358() && (!strcmp(board_name, "96358VW"))) { -+ u8 *p = boot_addr + NB4_PID_OFFSET; -+ -+ /* Extract nb4 PID */ -+ if (!memcmp(p, "NB4-", 4)) { -+ memcpy(board_name, p, sizeof("NB4-XXX-rX")); -+ return; -+ } -+ } -+ - /* check if bcm_tag is at 64k offset */ - if (strncmp(board_name, tag->board_id, BOARDID_LEN) != 0) { - /* else try 128k */ |