[OpenWrt-Devel] [PATCH] [brcm63xx] Add support for Plusnet 2704N

Jonas Gorski jogo at openwrt.org
Sat Jul 25 08:48:46 EDT 2015


Hi,

I just noticed that you sent this to the wrong address
(openwrt-devel-request@ instead of openwrt-devel), thus it never made
it to the mailing list.

On 20.07.2015 10:40, Matt Goring wrote:
> BCM6318: will also support Sagem 2704N (V1) and probably the TP-Link-TD-W8960N (V5) because its the same hardware.
> Signed-off-by: Matt Goring <matt.goring at googlemail.com>

Please shorten your commitlog lines to <=72 chars.

Also please rebase onto the new image building code.

> ---
> I have learnt and made the changes.  about the USB comment, its comes in 2 favours.  Either way they still have the PCB layout for the USB socket.  I hope that is OK?
> Also tested with kernel 4.1.

Yeah, if this is the only difference that's fine.

> This is a resubmit.
> ---
>  target/linux/brcm63xx/base-files/etc/diag.sh       |    3 +
>  .../brcm63xx/base-files/etc/uci-defaults/01_leds   |    3 +
>  .../base-files/etc/uci-defaults/02_network         |    7 ++
>  target/linux/brcm63xx/base-files/lib/brcm63xx.sh   |    3 +
>  target/linux/brcm63xx/dts/fast2704n.dts            |   82 ++++++++++++++++++++
>  target/linux/brcm63xx/image/Makefile               |    2 +
>  .../patches-3.18/571-board_fast2704n.patch         |   65 ++++++++++++++++
>  .../brcm63xx/patches-4.1/571-board_fast2704n.patch |   65 ++++++++++++++++
>  target/linux/brcm63xx/profiles/sagem.mk            |   10 +++
>  9 files changed, 240 insertions(+)
>  create mode 100644 target/linux/brcm63xx/dts/fast2704n.dts
>  create mode 100644 target/linux/brcm63xx/patches-3.18/571-board_fast2704n.patch
>  create mode 100644 target/linux/brcm63xx/patches-4.1/571-board_fast2704n.patch
> 
> diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh
> index 1b0d26d..7916ac2 100644
> --- a/target/linux/brcm63xx/base-files/etc/diag.sh
> +++ b/target/linux/brcm63xx/base-files/etc/diag.sh
> @@ -70,6 +70,9 @@ set_state() {
>  	fast2504n)
>  		status_led="fast2504n:green:ok"
>  		;;
> +	fast2704n)
> +		status_led2="F at ST2704N:red:power"
> +		;;
>  	fast2704v2)
>  		status_led="F at ST2704V2:green:power"
>  		;;
> diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds b/target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds
> index b964bdb..bdb3dad 100644
> --- a/target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds
> +++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/01_leds
> @@ -22,6 +22,9 @@ dgnd3700v1_dgnd3800b)
>  	ucidef_set_led_usbdev "usb1" "USB1" "DGND3700v1_3800B:green:usb-back" "1-1"
>  	ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2"
>  	;;
> +fast2704n)
> +	ucidef_set_led_netdev "wan" "WAN" "F at ST2704N:green:inet" "eth0.2"
> +	;;
>  fast2704v2)
>  	ucidef_set_led_usbdev "usb" "USB" "F at ST2704V2:green:usb" "1-1"
>  	;;
> diff --git a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network b/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
> index e5880eb..d6bd43e 100644
> --- a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
> @@ -141,6 +141,13 @@ bcm963268bu_p300)
>  	ucidef_add_switch_vlan "switch0" "1" "0 3 4 5 6 7 8t"
>  	;;
>  
> +fast2704n)
> +	ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
> +	ucidef_add_switch "eth0" "1" "1"
> +	ucidef_add_switch_vlan "eth0" "1" "1 2 3 8t"
> +	ucidef_add_switch_vlan "eth0" "2" "0 8t" 

That's the same setup as dgnd3700v1_dgnd3800b, so just add this board id to the case instead of adding its own case.

> +	;;
> +
>  *)
>  	ucidef_set_interfaces_lan_wan "eth1" "eth0"
>  	;;
> diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
> index 0eb9a75..92fa5f2 100755
> --- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
> +++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
> @@ -198,6 +198,9 @@ brcm63xx_dt_detect() {
>  	"Sagem F at ST2604")
>  		board_name="fast2604"
>  		;;
> +	"Sagem F at ST2704N")
> +		board_name="fast2704n"
> +		;;
>  	"Sagem F at ST2704V2")
>  		board_name="fast2704v2"
>  		;;
> diff --git a/target/linux/brcm63xx/dts/fast2704n.dts b/target/linux/brcm63xx/dts/fast2704n.dts
> new file mode 100644
> index 0000000..19e027b
> --- /dev/null
> +++ b/target/linux/brcm63xx/dts/fast2704n.dts
> @@ -0,0 +1,82 @@
> +/dts-v1/;
> +
> +/include/ "bcm6318.dtsi"
> +
> +/ {
> +	model = "Sagem F at ST2704N";
> +	compatible = "sagem,f at st2704n", "brcm,bcm6318";
> +
> +	gpio-keys-polled {
> +		compatible = "gpio-keys-polled";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		poll-interval = <20>;
> +		debounce-interval = <60>;
> +
> +		rfkill {
> +			label = "rfkill";
> +			gpios = <&gpio0 1 0>;
> +			linux,code = <0xee>;
> +		};
> +		wps {
> +			label = "wps";
> +			gpios = <&gpio1 1 1>;
> +			linux,code = <0x211>;
> +		};
> +		reset {
> +			label = "reset";
> +			gpios = <&gpio1 2 1>;
> +			linux,code = <0x198>;

Please make use of the dt-includes as done in r46391.


the rest looks fine.


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