[OpenWrt-Devel] [PATCH] [brcm63xx] Add support for Plusnet 2704N
Jonas Gorski
jogo at openwrt.org
Mon May 25 07:20:22 EDT 2015
Hi,
On Mon, May 18, 2015 at 7:22 PM, Matt Goring <matt.goring at googlemail.com> wrote:
> Hello, this is my first submission, please excuse me if I have the wrong
> mailing list, or missed a mailing rule.
No need for formalities, just write it like you would write a commit log.
>
> This patch is to add support for the Plusnet 2704N Router (BCM6318), on the
> current trunk.
> This will most possibly add support for the Sagem 2704N (Ver 1) and the
> TP-Link-TD-W8960N (Ver 5) due to the same hardware, but unconfirmed.
> ADSL does not work (same with all Broadcom devices) and the Fibre (via
> copper) is purposely not configured. Otherwise you will loose a Ethernet
> port.
If it has a dedicated wan port (even if it is part of the switch), it
should be configured as a wan port by default IMHO.
> The openwrt image will not work out-the-box for this Plusnet router. So I
> will create a wiki page if this patch is accepted.
Put these after a tear-off line ("--- ") so they don't become part of
the commit log.
>
> Signed-off-by: Matt Goring <matt.goring at googlemail.com>
> diff --git a/build_dir/target-mips_mips32_uClibc-0.9.33.2/linux-brcm63xx_generic/linux-3.18.11/arch/mips/bcm63xx/boards/board_bcm963xx.c b/build_dir/target-mips_mips32_uClibc-0.9.33.2/linux-brcm63xx_generic/linux-3.18.11/arch/mips/bcm63xx/boards/board_bcm963xx.c
You seem to be using git, please consider using git send-email to send
the patch inline.
> index 6b6cfc0..a0ef569 100644
> --- a/build_dir/target-mips_mips32_uClibc-0.9.33.2/linux-brcm63xx_generic/linux-3.18.11/arch/mips/bcm63xx/boards/board_bcm963xx.c
> +++ b/build_dir/target-mips_mips32_uClibc-0.9.33.2/linux-brcm63xx_generic/linux-3.18.11/arch/mips/bcm63xx/boards/board_bcm963xx.c
This won't apply, you need to add a patch for the kernel, see
https://patchwork.ozlabs.org/patch/470305/ for an example.
> @@ -2401,6 +2401,7 @@ static struct of_device_id const bcm963xx_boards_dt[] = {
> { .compatible = "brcm,bcm96318ref", .data = &board_96318ref, },
> { .compatible = "brcm,bcm96318ref_p300", .data = &board_96318ref_p300, },
> { .compatible = "d-link,dsl-275xb-d", .data = &board_dsl_2751b_d1, },
> + { .compatible = "plusnet,f at st2704n", .data = &board_96318ref, },
If the OEM is sagem, it should stay sagem. Also this device does not
seem to have any USB ports, so don't reuse a random board_<foo> file,
add a new one.
> diff --git a/target/linux/brcm63xx/dts/fast2704n.dts b/target/linux/brcm63xx/dts/fast2704n.dts
> new file mode 100755
> index 0000000..08bc58b
> --- /dev/null
> +++ b/target/linux/brcm63xx/dts/fast2704n.dts
> @@ -0,0 +1,70 @@
> +/dts-v1/;
> +
> +/include/ "bcm6318.dtsi"
> +
> +/ {
> + model = "Plusnet F at ST2704N";
> + compatible = "plusnet,f at st2704n", "brcm,bcm6318";
> +
> + gpio-keys-polled {
> + compatible = "gpio-keys-polled";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + poll-interval = <20>;
> + debounce-interval = <60>;
> +
> + reset {
> + label = "reset";
> + gpios = <&gpio1 2 1>;
> + linux,code = <0x198>;
> + };
> + wps {
> + label = "wps";
> + gpios = <&gpio1 1 1>;
> + linux,code = <0x211>;
> + };
Please order these by their gpio numbers.
> + };
> +
> + /* Wireless LAN led is controlled independently */
Drop this comment, it doesn't really add much information.
> +
> + gpio-leds {
> + compatible = "gpio-leds";
> +
> + wps_green {
> + label = "F at ST2704N:green:wps";
> + gpios = <&gpio0 2 1>;
> + };
> + inet_red {
> + label = "F at ST2704N:red:inet";
> + gpios = <&gpio0 9 1>;
> + };
> + inet_green {
> + label = "F at ST2704N:green:inet";
> + gpios = <&gpio0 8 1>;
> + };
> + dsl_green {
> + label = "F at ST2704N:green:dsl";
> + gpios = <&gpio0 10 1>;
> + };
> + lan4_green {
> + label = "F at ST2704N:green:lan4";
> + gpios = <&gpio0 7 1>;
> + };
> + lan3_green {
> + label = "F at ST2704N:green:lan3";
> + gpios = <&gpio0 6 1>;
> + };
> + lan2_green {
> + label = "F at ST2704N:green:lan2";
> + gpios = <&gpio0 5 1>;
> + };
> + lan1_green {
> + label = "F at ST2704N:green:lan1";
> + gpios = <&gpio0 4 1>;
> + };
> + power_red {
> + label = "F at ST2704N:red:power";
> + gpios = <&gpio0 11 1>;
> + };
Please order these by their gpio numbers.
> + };
> +};
Regards
Jonas
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list