The Livebox 1 support is currently broken. Fixed with this patch Fixes: - Redboot partitioning broken: fixed - Replaced custom ephy reset with platform code - USB code breaks the building process: fixed - Led colors - Removed unneded EHCI code since bcm6348 only has OHCI
Signed-off-by: Daniel Gonzalez <[email protected]> Index: target/linux/brcm63xx/patches-3.10/400-bcm963xx_flashmap.patch =================================================================== --- target/linux/brcm63xx/patches-3.10/400-bcm963xx_flashmap.patch (revision 40774) +++ target/linux/brcm63xx/patches-3.10/400-bcm963xx_flashmap.patch (working copy) @@ -40,7 +40,7 @@ + } else { + for (i = 0; i < numslots; i++) { + if (!strncmp(buf[i].name, "RedBoot", 8)) { -+ fis_origin = ((buf[i].flash_base & (master->size << 1)) - 1); ++ fis_origin = (buf[i].flash_base & (master->size << 1) - 1); + } + } + } Index: target/linux/brcm63xx/patches-3.10/513-board_livebox.patch =================================================================== --- target/linux/brcm63xx/patches-3.10/513-board_livebox.patch (revision 40774) +++ target/linux/brcm63xx/patches-3.10/513-board_livebox.patch (working copy) @@ -18,7 +18,7 @@ +obj-$(CONFIG_BOARD_LIVEBOX) += board_livebox.o --- /dev/null +++ b/arch/mips/bcm63xx/boards/board_livebox.c -@@ -0,0 +1,369 @@ +@@ -0,0 +1,371 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive @@ -78,7 +78,6 @@ + .has_phy = 1, + .use_internal_phy = 1, + }, -+ + .enet1 = { + .has_phy = 1, + .phy_id = 31, @@ -89,7 +88,7 @@ + + .has_dsp = 0, /*TODO some Liveboxes have dsp*/ + .dsp = { -+ .gpio_rst = 6, /*FIXME eth1 shares gpio6 with dsp?*/ ++ .gpio_rst = 6, + .gpio_int = 35, + .cs = 2, + .ext_irq = 2, @@ -97,25 +96,25 @@ + + .leds = { + { -+ .name = "Livebox-blue-5g::adsl-fail", ++ .name = "Livebox-blue-5g:red:adsl-fail", + .gpio = 0, + .active_low = 0, + .default_trigger = "default-on", + }, + { -+ .name = "Livebox-blue-5g::adsl", ++ .name = "Livebox-blue-5g:red:adsl", + .gpio = 1, + }, + { -+ .name = "Livebox-blue-5g::traffic", ++ .name = "Livebox-blue-5g:red:traffic", + .gpio = 2, + }, + { -+ .name = "Livebox-blue-5g::phone", ++ .name = "Livebox-blue-5g:red:phone", + .gpio = 3, + }, + { -+ .name = "Livebox-blue-5g::wifi", ++ .name = "Livebox-blue-5g:red:wifi", + .gpio = 4, + }, + }, @@ -139,6 +138,9 @@ + }, + + }, ++ ++ .ephy_reset_gpio = 6, ++ .ephy_reset_gpio_flags = GPIOF_INIT_HIGH, +}; +#endif + @@ -248,10 +250,6 @@ + if (BCMCPU_IS_6348()) + val |= GPIO_MODE_6348_G3_EXT_MII | + GPIO_MODE_6348_G0_EXT_MII; -+ printk(KERN_INFO PFX "resetting gpio6 for eth1...\n"); -+ gpio_request(6, "dsp_eth_rst"); -+ gpio_direction_output(6, 0); -+ gpio_set_value(6, 1); + } + + bcm_gpio_writel(val, GPIO_MODE_REG); @@ -317,8 +315,9 @@ +int __init board_register_devices(void) +{ + u32 val; ++ int button_count = 0; + int led_count = 0; -+ int button_count = 0; ++ int usbh_ports = 0; + + if (board.has_uart0) + bcm63xx_uart_register(0); @@ -337,11 +336,8 @@ + !board_get_mac_address(board.enet1.mac_addr)) + bcm63xx_enet_register(1, &board.enet1); + -+ if (board.has_ehci0) -+ bcm63xx_ehci_register(); -+ + if (board.has_ohci0) -+ bcm63xx_ohci_register(); ++ bcm63xx_ohci_register(usbh_ports); + + if (board.has_dsp) + bcm63xx_dsp_register(&board.dsp); @@ -370,11 +366,17 @@ + while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name) + led_count++; + -+ bcm63xx_led_data.num_leds = led_count; -+ bcm63xx_led_data.leds = board.leds; ++ if (led_count) { ++ bcm63xx_led_data.num_leds = led_count; ++ bcm63xx_led_data.leds = board.leds; + -+ platform_device_register(&bcm63xx_gpio_leds); ++ platform_device_register(&bcm63xx_gpio_leds); ++ } + ++ if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) ++ gpio_request_one(board.ephy_reset_gpio, ++ board.ephy_reset_gpio_flags, "ephy-reset"); ++ + /* count number of BUTTONs defined by this device */ + while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc) + button_count++; Index: target/linux/brcm63xx/patches-3.14/400-bcm963xx_flashmap.patch =================================================================== --- target/linux/brcm63xx/patches-3.14/400-bcm963xx_flashmap.patch (revision 40774) +++ target/linux/brcm63xx/patches-3.14/400-bcm963xx_flashmap.patch (working copy) @@ -40,7 +40,7 @@ + } else { + for (i = 0; i < numslots; i++) { + if (!strncmp(buf[i].name, "RedBoot", 8)) { -+ fis_origin = ((buf[i].flash_base & (master->size << 1)) - 1); ++ fis_origin = (buf[i].flash_base & (master->size << 1) - 1); + } + } + } Index: target/linux/brcm63xx/patches-3.14/513-board_livebox.patch =================================================================== --- target/linux/brcm63xx/patches-3.14/513-board_livebox.patch (revision 40774) +++ target/linux/brcm63xx/patches-3.14/513-board_livebox.patch (working copy) @@ -18,7 +18,7 @@ +obj-$(CONFIG_BOARD_LIVEBOX) += board_livebox.o --- /dev/null +++ b/arch/mips/bcm63xx/boards/board_livebox.c -@@ -0,0 +1,369 @@ +@@ -0,0 +1,371 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive @@ -78,7 +78,6 @@ + .has_phy = 1, + .use_internal_phy = 1, + }, -+ + .enet1 = { + .has_phy = 1, + .phy_id = 31, @@ -89,7 +88,7 @@ + + .has_dsp = 0, /*TODO some Liveboxes have dsp*/ + .dsp = { -+ .gpio_rst = 6, /*FIXME eth1 shares gpio6 with dsp?*/ ++ .gpio_rst = 6, + .gpio_int = 35, + .cs = 2, + .ext_irq = 2, @@ -97,25 +96,25 @@ + + .leds = { + { -+ .name = "Livebox-blue-5g::adsl-fail", ++ .name = "Livebox-blue-5g:red:adsl-fail", + .gpio = 0, + .active_low = 0, + .default_trigger = "default-on", + }, + { -+ .name = "Livebox-blue-5g::adsl", ++ .name = "Livebox-blue-5g:red:adsl", + .gpio = 1, + }, + { -+ .name = "Livebox-blue-5g::traffic", ++ .name = "Livebox-blue-5g:red:traffic", + .gpio = 2, + }, + { -+ .name = "Livebox-blue-5g::phone", ++ .name = "Livebox-blue-5g:red:phone", + .gpio = 3, + }, + { -+ .name = "Livebox-blue-5g::wifi", ++ .name = "Livebox-blue-5g:red:wifi", + .gpio = 4, + }, + }, @@ -139,6 +138,9 @@ + }, + + }, ++ ++ .ephy_reset_gpio = 6, ++ .ephy_reset_gpio_flags = GPIOF_INIT_HIGH, +}; +#endif + @@ -248,10 +250,6 @@ + if (BCMCPU_IS_6348()) + val |= GPIO_MODE_6348_G3_EXT_MII | + GPIO_MODE_6348_G0_EXT_MII; -+ printk(KERN_INFO PFX "resetting gpio6 for eth1...\n"); -+ gpio_request(6, "dsp_eth_rst"); -+ gpio_direction_output(6, 0); -+ gpio_set_value(6, 1); + } + + bcm_gpio_writel(val, GPIO_MODE_REG); @@ -317,8 +315,9 @@ +int __init board_register_devices(void) +{ + u32 val; ++ int button_count = 0; + int led_count = 0; -+ int button_count = 0; ++ int usbh_ports = 0; + + if (board.has_uart0) + bcm63xx_uart_register(0); @@ -337,11 +336,8 @@ + !board_get_mac_address(board.enet1.mac_addr)) + bcm63xx_enet_register(1, &board.enet1); + -+ if (board.has_ehci0) -+ bcm63xx_ehci_register(); -+ + if (board.has_ohci0) -+ bcm63xx_ohci_register(); ++ bcm63xx_ohci_register(usbh_ports); + + if (board.has_dsp) + bcm63xx_dsp_register(&board.dsp); @@ -370,11 +366,17 @@ + while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name) + led_count++; + -+ bcm63xx_led_data.num_leds = led_count; -+ bcm63xx_led_data.leds = board.leds; ++ if (led_count) { ++ bcm63xx_led_data.num_leds = led_count; ++ bcm63xx_led_data.leds = board.leds; + -+ platform_device_register(&bcm63xx_gpio_leds); ++ platform_device_register(&bcm63xx_gpio_leds); ++ } + ++ if (board.ephy_reset_gpio && board.ephy_reset_gpio_flags) ++ gpio_request_one(board.ephy_reset_gpio, ++ board.ephy_reset_gpio_flags, "ephy-reset"); ++ + /* count number of BUTTONs defined by this device */ + while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc) + button_count++; _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
