[OpenWrt-Devel] [PATCH] brcm63xx: add Comtrend VR-3032u support
Jonas Gorski
jogo at openwrt.org
Mon Mar 16 13:16:59 EDT 2015
Hi,
On Mon, Mar 16, 2015 at 5:24 PM, Álvaro Fernández Rojas
<noltari at gmail.com> wrote:
> - Avoid bin image generation (only initramfs)
> - NAND/WiFi not working
>
> Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
> ---
> target/linux/brcm63xx/base-files/etc/diag.sh | 3 +
> .../base-files/etc/uci-defaults/02_network | 3 +-
> target/linux/brcm63xx/base-files/lib/brcm63xx.sh | 3 +
> target/linux/brcm63xx/dts/vr-3032u.dts | 142 +++++++++++++++++++++
> target/linux/brcm63xx/image/Makefile | 6 +
> .../brcm63xx/patches-3.18/569-board_VR-3032u.patch | 65 ++++++++++
> target/linux/brcm63xx/profiles/comtrend.mk | 9 ++
> 7 files changed, 230 insertions(+), 1 deletion(-)
> create mode 100644 target/linux/brcm63xx/dts/vr-3032u.dts
> create mode 100644 target/linux/brcm63xx/patches-3.18/569-board_VR-3032u.patch
>
> diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh
> index 928c02b..3d6531a 100644
> --- a/target/linux/brcm63xx/base-files/etc/diag.sh
> +++ b/target/linux/brcm63xx/base-files/etc/diag.sh
> @@ -39,6 +39,9 @@ set_state() {
> vr-3025u)
> status_led="VR-3025u:green:power"
> ;;
> + vr-3032u)
> + status_led="VR-3032u:green:power"
> + ;;
> wap-5813n)
> status_led="WAP-5813n:green:power"
> ;;
> 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 df4e293..f320d4d 100644
> --- a/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/brcm63xx/base-files/etc/uci-defaults/02_network
> @@ -93,7 +93,8 @@ fast2504n |\
> fast2704v2 |\
> p870hw-51a_v2 |\
> vr-3025un |\
> -vr-3025u)
> +vr-3025u |\
> +vr-3032u)
> ucidef_set_interface_lan "eth0.1"
> ucidef_add_switch "eth0" "1" "1"
> ucidef_add_switch_vlan "eth0" "1" "0 1 2 3 8t"
> diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
> index 2c18762..b64cb9e 100755
> --- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
> +++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh
> @@ -84,6 +84,9 @@ brcm63xx_dt_detect() {
> "Comtrend VR-3025un")
> board_name="vr-3025un"
> ;;
> + "Comtrend VR-3032u")
> + board_name="vr-3032u"
> + ;;
> "Comtrend WAP-5813n")
> board_name="wap-5813n"
> ;;
> diff --git a/target/linux/brcm63xx/dts/vr-3032u.dts b/target/linux/brcm63xx/dts/vr-3032u.dts
> new file mode 100644
> index 0000000..0d56394
> --- /dev/null
> +++ b/target/linux/brcm63xx/dts/vr-3032u.dts
> @@ -0,0 +1,142 @@
> +/dts-v1/;
> +
> +/include/ "bcm63268.dtsi"
> +
> +/ {
> + model = "Comtrend VR-3032u";
> + compatible = "comtrend,vr-3032u", "brcm,bcm63268";
> +
> + gpio-keys-polled {
> + compatible = "gpio-keys-polled";
> + #address-cells = <1>;
> + #size-cells = <0>;
> + poll-interval = <20>;
> + debounce-interval = <60>;
> +
> + reset {
> + label = "reset";
> + gpios = <&gpio1 0 1>;
> + linux,code = <0x198>;
> + };
> + wps {
> + label = "wps";
> + gpios = <&gpio1 1 1>;
> + linux,code = <0x211>;
> + };
> + };
> +};
> +
> +&leds0 {
> + status = "ok";
> + brcm,serial-leds;
> +
> + hw_gphy_spd0 {
These leds have an address, so please use
hw_gphy_spd0 at 0 {
etc
> + compatible = "bcm6328-hw-led";
> + reg = <0>;
> + act-low = <16>;
> + label = "gphy-spd0";
> + };
> + hw_gphy_spd1 {
> + compatible = "bcm6328-hw-led";
> + reg = <1>;
> + act-low = <20>;
> + label = "gphy-spd1";
> + };
> + hw_ephy0_act {
> + compatible = "bcm6328-hw-led";
> + reg = <9>;
> + label = "ephy0-act";
> + };
> + hw_ephy1_act {
> + compatible = "bcm6328-hw-led";
> + reg = <10>;
> + label = "ephy1-act";
> + };
> + hw_ephy2_act {
> + compatible = "bcm6328-hw-led";
> + reg = <11>;
> + label = "ephy2-act";
> + };
> + hw_gphy0_act {
> + compatible = "bcm6328-hw-led";
> + reg = <12>;
> + label = "gphy0-act";
> + };
> + hw_ephy0_spd {
> + compatible = "bcm6328-hw-led";
> + reg = <13>;
> + label = "ephy0-spd";
> + };
> + hw_ephy1_spd {
> + compatible = "bcm6328-hw-led";
> + reg = <14>;
> + label = "ephy1-spd";
> + };
> + hw_ephy2_spd {
> + compatible = "bcm6328-hw-led";
> + reg = <15>;
> + label = "ephy2-spd";
> + };
> +
> + inet_red {
> + compatible = "bcm6328-led";
> + reg = <2>;
> + active-low;
> + label = "VR-3032u:red:inet";
> + };
> + dsl_green {
> + compatible = "bcm6328-led";
> + reg = <3>;
> + active-low;
> + label = "VR-3032u:green:dsl";
> + };
> + usb_green {
> + compatible = "bcm6328-led";
> + reg = <4>;
> + active-low;
> + label = "VR-3032u:green:usb";
> + };
> + wps_green {
> + compatible = "bcm6328-led";
> + reg = <7>;
> + active-low;
> + label = "VR-3032u:green:wps";
> + };
> + inet_green {
> + compatible = "bcm6328-led";
> + reg = <8>;
> + active-low;
> + label = "VR-3032u:green:inet";
> + };
> + lan2_green {
> + compatible = "bcm6328-led";
> + reg = <9>;
> + active-low;
> + label = "VR-3032u:green:lan2";
> + };
> + lan3_green {
> + compatible = "bcm6328-led";
> + reg = <10>;
> + active-low;
> + label = "VR-3032u:green:lan3";
> + };
> + lan4_green {
> + compatible = "bcm6328-led";
> + reg = <11>;
> + active-low;
> + label = "VR-3032u:green:lan4";
> + };
> + lan1_green {
> + compatible = "bcm6328-led";
> + reg = <12>;
> + active-low;
> + label = "VR-3032u:green:lan1";
> + };
> + power_green {
> + compatible = "bcm6328-led";
> + reg = <20>;
> + active-low;
> + label = "VR-3032u:green:power";
> + default-state = "on";
> + };
> +};
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