From: Andrius Štikonas Date: Sat, 14 Jul 2018 21:53:47 +0000 (+0000) Subject: brcm63xx: initial support for Sky SR102 router X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d591260407015d2c451ad8c9e114fe04cf3639bc;p=openwrt%2Fstaging%2Fneocturne.git brcm63xx: initial support for Sky SR102 router The sender domain has a DMARC Reject/Quarantine policy which disallows sending mailing list messages using the original "From" header. To mitigate this problem, the original message has been wrapped automatically by the mailing list software. SOC: BCM63168 (BMIPS4350 V8.0 @400MHz) Flash size: 16 MiB RAM size: 128 MiB Heavily based on patch for OpenWRT Chaos Chalmer. Original patch and more info can be found at: https://openwrt.org/toh/sky/sr102 Known issues: - Wireless and ADSL modem are not working. Signed-off-by: Andrius Štikonas --- diff --git a/target/linux/brcm63xx/base-files/etc/board.d/02_network b/target/linux/brcm63xx/base-files/etc/board.d/02_network index a7fd6f5d38..a2ca5a37b3 100755 --- a/target/linux/brcm63xx/base-files/etc/board.d/02_network +++ b/target/linux/brcm63xx/base-files/etc/board.d/02_network @@ -130,6 +130,12 @@ neufbox6) "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9t@eth0" ;; +sr102) + ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3:wan" "8t@eth0" + ;; + vg50) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8t@eth0" diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh index acb1795214..afb347818f 100644 --- a/target/linux/brcm63xx/base-files/etc/diag.sh +++ b/target/linux/brcm63xx/base-files/etc/diag.sh @@ -132,6 +132,10 @@ set_state() { rta770w) status_led="RTA770W:green:diag" ;; + sr102) + status_led="SR102:white:power" + status_led2="SR102:red:power" + ;; spw500v) status_led="SPW500V:green:power" ;; diff --git a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh index 82abd737ce..1676ae0abb 100755 --- a/target/linux/brcm63xx/base-files/lib/brcm63xx.sh +++ b/target/linux/brcm63xx/base-files/lib/brcm63xx.sh @@ -237,6 +237,9 @@ brcm63xx_dt_detect() { "SFR neufbox 6 (Sercomm)") board_name="neufbox6" ;; + "SKY SR102") + board_name="sr102" + ;; "T-Com Speedport W303 V") board_name="spw303v" ;; diff --git a/target/linux/brcm63xx/dts/sr102.dts b/target/linux/brcm63xx/dts/sr102.dts new file mode 100644 index 0000000000..4d8cbd3435 --- /dev/null +++ b/target/linux/brcm63xx/dts/sr102.dts @@ -0,0 +1,120 @@ +/dts-v1/; + +#include "bcm63268.dtsi" + +#include + +/ { + model = "SKY SR102"; + compatible = "sky,sr102", "brcm,bcm63268"; + + chosen { + bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200"; + stdout-path = "serial0:115200n8"; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + debounce-interval = <60>; + + wps { + label = "wps"; + gpios = <&pinctrl 33 0>; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + lan1_green { + label = "SR102:green:lan1"; + gpios = <&pinctrl 1 1>; + }; + power_red { + label = "SR102:red:power"; + gpios = <&pinctrl 2 1>; + }; + wifi_red { + label = "SR102:red:wifi"; + gpios = <&pinctrl 3 1>; + }; + inet_red { + label = "SR102:red:inet"; + gpios = <&pinctrl 4 1>; + }; + inet_white { + label = "SR102:white:inet"; + gpios = <&pinctrl 5 0>; + }; + power_white { + label = "SR102:white:power"; + gpios = <&pinctrl 6 0>; + default-state = "on"; + }; + wifi_white { + label = "SR102:white:wifi"; + gpios = <&pinctrl 8 0>; + }; + lan2_red { + label = "SR102:red:lan2"; + gpios = <&pinctrl 9 1>; + }; + lan3_red { + label = "SR102:red:lan3"; + gpios = <&pinctrl 10 1>; + }; + lan4_red { + label = "SR102:red:lan4"; + gpios = <&pinctrl 11 1>; + }; + lan1_red { + label = "SR102:red:lan1"; + gpios = <&pinctrl 12 1>; + }; + lan2_green { + label = "SR102:green:lan2"; + gpios = <&pinctrl 13 0>; + }; + lan3_green { + label = "SR102:green:lan3"; + gpios = <&pinctrl 14 1>; + }; + lan4_green { + label = "SR102:green:lan4"; + gpios = <&pinctrl 15 1>; + }; + hd_white { + label = "SR102:white:hd"; + gpios = <&pinctrl 18 0>; + }; + }; +}; + +&hsspi { + status = "ok"; + + flash@0 { + compatible = "jedec,spi-nor"; + spi-max-frequency = <16666667>; + spi-tx-bus-width = <2>; + spi-rx-bus-width = <2>; + reg = <0>; + + #address-cells = <1>; + #size-cells = <1>; + + linux,part-probe = "bcm63xxpart"; + + partitions { + compatible = "brcm,bcm963xx-cfe-nor-partitions"; + }; + }; +}; + +&uart0 { + status = "ok"; +}; diff --git a/target/linux/brcm63xx/image/bcm63xx.mk b/target/linux/brcm63xx/image/bcm63xx.mk index b9ecd54064..6a2a9bfb4a 100644 --- a/target/linux/brcm63xx/image/bcm63xx.mk +++ b/target/linux/brcm63xx/image/bcm63xx.mk @@ -1020,6 +1020,18 @@ define Device/NEUFBOX6 endef TARGET_DEVICES += NEUFBOX6 +define Device/SR102 + $(Device/bcm63xx) + DEVICE_TITLE := SKY-SR102 + DEVICE_DTS := sr102 + CFE_BOARD_ID := BSKYB_63168 + CFE_CHIP_ID := 63268 + CFE_EXTRAS += --rsa-signature "$(VERSION_DIST)-$(firstword $(subst -,$(space),$(REVISION)))" + DEVICE_PACKAGES := \ + $(B43_PACKAGES) $(USB2_PACKAGES) +endef +TARGET_DEVICES += SR102 + ### T-Com ### define Device/SPW303V $(Device/bcm63xx) diff --git a/target/linux/brcm63xx/patches-4.9/598-board_sr102.patch b/target/linux/brcm63xx/patches-4.9/598-board_sr102.patch new file mode 100644 index 0000000000..1a9578ead1 --- /dev/null +++ b/target/linux/brcm63xx/patches-4.9/598-board_sr102.patch @@ -0,0 +1,75 @@ +--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c ++++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c +@@ -2457,6 +2457,56 @@ + }, + }, + }; ++ ++static struct board_info __initdata board_BSKYB_63168 = { ++ .name = "BSKYB_63168", ++ .expected_cpu_id = 0x63268, ++ ++ .has_pci = 1, ++ .use_fallback_sprom = 0, ++ ++ .has_ehci0 = 1, ++ .has_ohci0 = 1, ++ .num_usbh_ports = 2, ++ ++ .has_enetsw = 1, ++ ++ .enetsw = { ++ .used_ports = { ++ [0] = { ++ .used = 1, ++ .phy_id = 1, ++ .name = "Port 1", ++ }, ++ ++ [1] = { ++ .used = 1, ++ .phy_id = 2, ++ .name = "Port 2", ++ }, ++ ++ [2] = { ++ .used = 1, ++ .phy_id = 3, ++ .name = "Port 3", ++ }, ++ ++ [3] = { ++ .used = 1, ++ .phy_id = 4, ++ .name = "Port 4", ++ }, ++ ++ }, ++ }, ++/* ++ .fallback_sprom = { ++ .type = SPROM_BCM435F, ++ .pci_bus = 0, ++ .pci_dev = 0, ++ }, ++*/ ++}; + #endif /* CONFIG_BCM63XX_CPU_63268 */ + + /* +@@ -2557,6 +2609,7 @@ + &board_963268bu_p300, + &board_963269bhr, + &board_vw6339gu, ++ &board_BSKYB_63168, + #endif + }; + +@@ -2661,6 +2714,7 @@ + { .compatible = "brcm,bcm963268bu_p300", .data = &board_963268bu_p300, }, + { .compatible = "brcm,bcm963269bhr", .data = &board_963269bhr, }, + { .compatible = "inteno,vg50", .data = &board_vw6339gu, }, ++ { .compatible = "sky,sr102", .data = &board_BSKYB_63168, }, + #endif + #endif /* CONFIG_OF */ + { }, diff --git a/target/linux/brcm63xx/profiles/sky.mk b/target/linux/brcm63xx/profiles/sky.mk new file mode 100644 index 0000000000..f209794800 --- /dev/null +++ b/target/linux/brcm63xx/profiles/sky.mk @@ -0,0 +1,16 @@ +# +# Copyright (C) 2015 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/SR102 + NAME:=SKY SR102 + PACKAGES:=kmod-b43 wpad-mini \ + kmod-usb2 kmod-usb-ohci +endef +define Profile/SR102/Description + Package set optimized for SKY SR102. +endef +$(eval $(call Profile,SR102))