<div dir="ltr">Sorry, I forgot to add the the target. I'll send again the patch<div><br></div><div>Thanks very much.<br><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El dom., 27 oct. 2019 a las 14:05, John Crispin (<<a href="mailto:john@phrozen.org">john@phrozen.org</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 22/09/2019 22:05, Daniel Gonzalez Cabanelas wrote:<br>
> Add support for the Inventel DV4210 router.<br>
> <br>
> This is an Inventel Livebox 1 board. The patch supports the board with a CFE bootloader, and<br>
> a RAM mod (64 MB, tested).  The board originally comes with 8 MB flash.  Under this conditions<br>
> this old BCM6348 based board still runs quite fine with current snapshots.<br>
> <br>
<br>
Hi,<br>
thanks for the patch, the subject line needs to start with "brcm63xx:"<br>
        John<br>
<br>
> Signed-off-by: Daniel Gonzalez Cabanelas <<a href="mailto:dgcbueu@gmail.com" target="_blank">dgcbueu@gmail.com</a>><br>
> ---<br>
>   .../brcm63xx/base-files/etc/board.d/01_leds   |   1 +<br>
>   .../base-files/etc/board.d/02_network         |   2 +-<br>
>   target/linux/brcm63xx/base-files/etc/diag.sh  |   1 +<br>
>   .../linux/brcm63xx/base-files/lib/brcm63xx.sh |   3 +<br>
>   target/linux/brcm63xx/dts/dv4210.dts          | 102 ++++++++++++++++++<br>
>   target/linux/brcm63xx/image/<a href="http://bcm63xx.mk" rel="noreferrer" target="_blank">bcm63xx.mk</a>        |  13 +++<br>
>   .../patches-4.14/599-board_DV4210.patch       |  50 +++++++++<br>
>   7 files changed, 171 insertions(+), 1 deletion(-)<br>
>   create mode 100644 target/linux/brcm63xx/dts/dv4210.dts<br>
>   create mode 100644 target/linux/brcm63xx/patches-4.14/599-board_DV4210.patch<br>
> <br>
> diff --git a/target/linux/brcm63xx/base-files/etc/board.d/01_leds b/target/linux/brcm63xx/base-files/etc/board.d/01_leds<br>
> index d25d37e847..00109ba112 100755<br>
> --- a/target/linux/brcm63xx/base-files/etc/board.d/01_leds<br>
> +++ b/target/linux/brcm63xx/base-files/etc/board.d/01_leds<br>
> @@ -69,6 +69,7 @@ homehub2a)<br>
>       ucidef_set_led_usbdev "usb1" "USB1" "HOMEHUB2A:blue:phone" "1-1"<br>
>       ucidef_set_led_usbdev "usb2" "USB2" "HOMEHUB2A:green:phone" "2-1"<br>
>       ;;<br>
> +dv4210|\<br>
>   livebox1)<br>
>       ucidef_set_led_netdev "lan" "LAN" "Livebox1:red:traffic" "eth0"<br>
>       ucidef_set_led_netdev "wan" "WAN" "Livebox1:red:adsl" "eth1"<br>
> diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network b/target/linux/brcm63xx/base-files/etc/board.d/02_network<br>
> index a2ca5a37b3..0e384f82f6 100755<br>
> --- a/target/linux/brcm63xx/base-files/etc/board.d/02_network<br>
> +++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network<br>
> @@ -145,8 +145,8 @@ bcm963268bu_p300)<br>
>       ucidef_add_switch "switch0" \<br>
>               "0:lan" "3:lan" "4:lan" "5:lan" "6:lan" "7:lan" "8t@eth0"<br>
>       ;;<br>
> -<br>
>   cpva502p |\<br>
> +dv4210 |\<br>
>   livebox1)<br>
>       ucidef_set_interfaces_lan_wan "eth0" "eth1"<br>
>       ;;<br>
> diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh<br>
> index 34464ec44a..c673a75e40 100644<br>
> --- a/target/linux/brcm63xx/base-files/etc/diag.sh<br>
> +++ b/target/linux/brcm63xx/base-files/etc/diag.sh<br>
> @@ -114,6 +114,7 @@ set_state() {<br>
>       hg655b)<br>
>               status_led="HW65x:green:power"<br>
>               ;;<br>
> +     dv4210|\<br>
>       livebox1)<br>
>               status_led="Livebox1:red:adsl-fail-power"<br>
>               ;;<br>
> diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh<br>
> index 1676ae0abb..9c0c33cc31 100755<br>
> --- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh<br>
> +++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh<br>
> @@ -177,6 +177,9 @@ brcm63xx_dt_detect() {<br>
>       "Inteno VG50")<br>
>               board_name="vg50"<br>
>               ;;<br>
> +     "Inventel DV4210")<br>
> +             board_name="dv4210"<br>
> +             ;;<br>
>       "Inventel Livebox 1")<br>
>               board_name="livebox1"<br>
>               ;;<br>
> diff --git a/target/linux/brcm63xx/dts/dv4210.dts b/target/linux/brcm63xx/dts/dv4210.dts<br>
> new file mode 100644<br>
> index 0000000000..02975fe3b6<br>
> --- /dev/null<br>
> +++ b/target/linux/brcm63xx/dts/dv4210.dts<br>
> @@ -0,0 +1,102 @@<br>
> +/dts-v1/;<br>
> +<br>
> +#include "bcm6348.dtsi"<br>
> +<br>
> +#include <dt-bindings/input/input.h><br>
> +<br>
> +/ {<br>
> +     model = "Inventel DV4210";<br>
> +     compatible = "inventel,dv4210", "brcm,bcm6348";<br>
> +<br>
> +     chosen {<br>
> +             bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";<br>
> +             stdout-path = "serial0:115200n8";<br>
> +     };<br>
> +<br>
> +     keys {<br>
> +             compatible = "gpio-keys-polled";<br>
> +             #address-cells = <1>;<br>
> +             #size-cells = <0>;<br>
> +             poll-interval = <20>;<br>
> +<br>
> +             button1 {<br>
> +                     label = "1";<br>
> +                     gpios = <&pinctrl 36 1>;<br>
> +                     linux,code = <KEY_RESTART>;<br>
> +                     debounce-interval = <60>;<br>
> +             };<br>
> +<br>
> +             button2 {<br>
> +                     label = "2";<br>
> +                     gpios = <&pinctrl 7 1>;<br>
> +                     linux,code = <BTN_2>;<br>
> +                     debounce-interval = <60>;<br>
> +             };<br>
> +     };<br>
> +<br>
> +     leds {<br>
> +             compatible = "gpio-leds";<br>
> +<br>
> +             red_adsl_fail {<br>
> +                     label = "Livebox1:red:adsl-fail-power";<br>
> +                     gpios = <&pinctrl 0 0>;<br>
> +                     default-state = "on";<br>
> +             };<br>
> +<br>
> +             red_adsl {<br>
> +                     label = "Livebox1:red:adsl";<br>
> +                     gpios = <&pinctrl 1 0>;<br>
> +             };<br>
> +<br>
> +             red_traffic {<br>
> +                     label = "Livebox1:red:traffic";<br>
> +                     gpios = <&pinctrl 2 0>;<br>
> +             };<br>
> +<br>
> +             red_phone {<br>
> +                     label = "Livebox1:red:phone";<br>
> +                     gpios = <&pinctrl 3 0>;<br>
> +             };<br>
> +<br>
> +             red_wifi {<br>
> +                     label = "Livebox1:red:wifi";<br>
> +                     gpios = <&pinctrl 4 0>;<br>
> +             };<br>
> +     };<br>
> +};<br>
> +<br>
> +&pflash {<br>
> +     reg = <0x1f400000 0x800000>;<br>
> +     status = "ok";<br>
> +<br>
> +     partitions {<br>
> +             compatible = "fixed-partitions";<br>
> +             #address-cells = <1>;<br>
> +             #size-cells = <1>;<br>
> +<br>
> +             cfe@0 {<br>
> +                     reg = <0x000000 0x010000>;<br>
> +                     label = "cfe";<br>
> +             };<br>
> +<br>
> +             linux@10000 {<br>
> +                     reg = <0x010000 0x7e0000>;<br>
> +                     label = "linux";<br>
> +                     compatible = "brcm,bcm963xx-imagetag";<br>
> +             };<br>
> +<br>
> +             nvram@7f0000 {<br>
> +                     reg = <0x7f0000 0x010000>;<br>
> +                     label = "nvram";<br>
> +             };<br>
> +     };<br>
> +};<br>
> +<br>
> +&pinctrl {<br>
> +     pinctrl-names = "default";<br>
> +     pinctrl-0 = <&pinctrl_pci &pinctrl_ext_mii &pinctrl_mii_pccard>;<br>
> +};<br>
> +<br>
> +&uart0 {<br>
> +     status = "ok";<br>
> +};<br>
> diff --git a/target/linux/brcm63xx/image/<a href="http://bcm63xx.mk" rel="noreferrer" target="_blank">bcm63xx.mk</a> b/target/linux/brcm63xx/image/<a href="http://bcm63xx.mk" rel="noreferrer" target="_blank">bcm63xx.mk</a><br>
> index 212960e972..690ffb49fa 100644<br>
> --- a/target/linux/brcm63xx/image/<a href="http://bcm63xx.mk" rel="noreferrer" target="_blank">bcm63xx.mk</a><br>
> +++ b/target/linux/brcm63xx/image/<a href="http://bcm63xx.mk" rel="noreferrer" target="_blank">bcm63xx.mk</a><br>
> @@ -769,6 +769,19 @@ define Device/livebox<br>
>   endef<br>
>   TARGET_DEVICES += livebox<br>
>   <br>
> +define Device/DV4210<br>
> +  $(Device/bcm63xx)<br>
> +  DEVICE_TITLE := Inventel DV4210<br>
> +  DEVICE_DESCRIPTION = Build firmware images for the Inventel DV4210. Board with CFE bootloader and >32MB RAM<br>
> +  DEVICE_DTS := dv4210<br>
> +  CFE_BOARD_ID := DV4210<br>
> +  CFE_CHIP_ID := 6348<br>
> +  DEVICE_PACKAGES := \<br>
> +    $(B43_PACKAGES) $(USB1_PACKAGES)<br>
> +  DEFAULT := y<br>
> +endef<br>
> +TARGET_DEVICES += DV4210<br>
> +<br>
>   ### Netgear ###<br>
>   define Device/CVG834G<br>
>     $(Device/bcm33xx)<br>
> diff --git a/target/linux/brcm63xx/patches-4.14/599-board_DV4210.patch b/target/linux/brcm63xx/patches-4.14/599-board_DV4210.patch<br>
> new file mode 100644<br>
> index 0000000000..618a214d63<br>
> --- /dev/null<br>
> +++ b/target/linux/brcm63xx/patches-4.14/599-board_DV4210.patch<br>
> @@ -0,0 +1,50 @@<br>
> +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c<br>
> ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c<br>
> +@@ -1058,6 +1058,31 @@<br>
> +     },<br>
> + };<br>
> +<br>
> ++static struct board_info __initdata board_DV4210 = {<br>
> ++    .name                           = "DV4210",<br>
> ++    .expected_cpu_id                = 0x6348,<br>
> ++<br>
> ++    .has_enet0                      = 1,<br>
> ++    .has_enet1                      = 1,<br>
> ++    .has_pci                        = 1,<br>
> ++<br>
> ++    .enet0 = {<br>
> ++            .has_phy                = 1,<br>
> ++            .use_internal_phy       = 1,<br>
> ++    },<br>
> ++<br>
> ++    .enet1 = {<br>
> ++              .has_phy              = 1,<br>
> ++              .phy_id               = 31,<br>
> ++    },<br>
> ++<br>
> ++    .ephy_reset_gpio                = 6,<br>
> ++    .ephy_reset_gpio_flags  = GPIO_ACTIVE_LOW,<br>
> ++<br>
> ++    .has_ohci0                      = 1,<br>
> ++    .has_pccard                     = 0,<br>
> ++};<br>
> ++<br>
> + static struct board_info __initdata board_96348A_122 = {<br>
> +     .name                           = "96348A-122",<br>
> +     .expected_cpu_id                = 0x6348,<br>
> +@@ -2746,6 +2771,7 @@<br>
> +     &board_FAST2404,<br>
> +     &board_FAST2604,<br>
> +     &board_DV201AMR,<br>
> ++    &board_DV4210,<br>
> +     &board_96348gw_a,<br>
> +     &board_rta1025w_16,<br>
> +     &board_96348_D4PW,<br>
> +@@ -2859,6 +2885,7 @@<br>
> +     { .compatible = "d-link,dsl-2640b-b", .data = &board_96348_D4PW, },<br>
> +     { .compatible = "davolink,dv-201amr", .data = &board_DV201AMR, },<br>
> +     { .compatible = "dynalink,rta1025w", .data = &board_rta1025w_16, },<br>
> ++    { .compatible = "inventel,dv4210", .data = &board_DV4210, },<br>
> +     { .compatible = "netgear,dg834gtpn", .data = &board_96348gw_10, },<br>
> +     { .compatible = "netgear,dg834g-v4", .data = &board_96348W3, },<br>
> +     { .compatible = "sagem,f@st2404", .data = &board_FAST2404, },<br>
> <br>
<br>
</blockquote></div>