The VoCore2 Lite uses the same PCB as the Vocore2 with a MT7688A and 8M Flash/64M RAM https://www.indiegogo.com/projects/vocore2-4-coin-sized-linux-computer-with-wifi#/ http://vocore.io/ http://vonger.net/
This patch uses a common dtsi and includes minor corrections for the VoCore2. - Installing from the bootloader is recommended. - The original firmware is LEDE/OpenWrt, so both LuCI or sysupgrade can be used. - However you may need to edit /sys/sysinfo/board_name and /lib/upgrade/platform.sh - If using luci/sysupgrade use the -n option (do not keep settings) - Reverting to the factory firmware one may need to edit the same files or use the bootloader. Signed-off-by: L. D. Pinney <ldpin...@gmail.com> Tested-by: Noble Pepper <noblepep...@gmail.com> --- target/linux/ramips/base-files/etc/board.d/01_leds | 5 ++++- target/linux/ramips/base-files/etc/board.d/02_network | 3 ++- target/linux/ramips/base-files/etc/diag.sh | 5 ++++- target/linux/ramips/base-files/lib/ramips.sh | 3 +++ target/linux/ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/VOCORE2.dts | 79 ++++-------------------------------------------------------------- target/linux/ramips/dts/VOCORE2.dtsi | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ target/linux/ramips/dts/VOCORE2L.dts | 52 +++++++++++++++++++++++++++++++++++++++++++ target/linux/ramips/image/mt7688.mk | 9 ++++++++ 9 files changed, 158 insertions(+), 78 deletions(-) diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 52542ec265..c4d46cf31a 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -334,7 +334,10 @@ vocore-16M) set_wifi_led "vocore:green:status" ;; vocore2) - set_wifi_led "$board:fuchsia:status" + set_wifi_led "$board:pink:status" + ;; +vocore2l) + set_wifi_led "$board:green:status" ;; w502u) set_usb_led "$board:blue:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 80a3bc2c51..57245ef737 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -272,7 +272,8 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" ;; - vocore2) + vocore2|\ + vocore2l) ucidef_add_switch "switch0" \ "0:lan" "2:lan" "6t@eth0" ;; diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh index 461f46c26b..aff27cb3c0 100644 --- a/target/linux/ramips/base-files/etc/diag.sh +++ b/target/linux/ramips/base-files/etc/diag.sh @@ -228,7 +228,10 @@ get_status_led() { status_led="vocore:green:status" ;; vocore2) - status_led="$board:fuchsia:status" + status_led="$board:pink:status" + ;; + vocore2l) + status_led="$board:green:status" ;; w306r-v20|\ witi|\ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 87cb7ffb91..3738d8ead1 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -502,6 +502,9 @@ ramips_board_detect() { *"VoCore2") name="vocore2" ;; + *"VoCore2-Lite") + name="vocore2l" + ;; *"VR500") name="vr500" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index adad8dae75..a7958f3a19 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -147,6 +147,7 @@ platform_check_image() { vocore-8M|\ vocore-16M|\ vocore2|\ + vocore2l|\ vr500|\ w150m|\ w2914nsv2|\ diff --git a/target/linux/ramips/dts/VOCORE2.dts b/target/linux/ramips/dts/VOCORE2.dts index 297cd1bb99..087d16ea69 100644 --- a/target/linux/ramips/dts/VOCORE2.dts +++ b/target/linux/ramips/dts/VOCORE2.dts @@ -1,64 +1,18 @@ /dts-v1/; -#include "mt7628an.dtsi" - -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/input/input.h> +#include "VOCORE2.dtsi" / { - compatible = "vocore,VoCore2", "mediatek,mt7628an-soc"; model = "VoCore2"; - chosen { - bootargs = "console=ttyS2,115200"; - }; - memory@0 { device_type = "memory"; - reg = <0x0 0x4000000>; - }; - - gpio-leds { - compatible = "gpio-leds"; - - status { - label = "vocore2:fuchsia:status"; - gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; - }; + reg = <0x0 0x8000000>; }; }; -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "refclk", "gpio"; - ralink,function = "gpio"; - }; - - agpio { - ralink,group = "agpio"; - ralink,function = "uart2"; - }; - }; - - uart1_pins: uart1 { - uart1 { - ralink,group = "uart1"; - ralink,function = "uart1"; - }; - }; - - uart2_pins: uart2 { - uart2 { - ralink,group = "spis"; - ralink,function = "pwm"; - }; - }; -}; - -&wmac { - status = "okay"; - ralink,mtd-eeprom = <&factory 0x4>; +&wifi_led { + label = "vocore2:pink:wifi"; }; &spi0 { @@ -96,28 +50,3 @@ }; }; }; - -&esw { - mediatek,portmap = <0x7>; - mediatek,portdisable = <0x3a>; -}; - -&i2s { - status = "okay"; -}; - -&gdma { - status = "okay"; -}; - -&pwm { - status = "okay"; -}; - -&uart1 { - status = "okay"; -}; - -&uart2 { - status = "okay"; -}; diff --git a/target/linux/ramips/dts/VOCORE2.dtsi b/target/linux/ramips/dts/VOCORE2.dtsi new file mode 100644 index 0000000000..c9e7592219 --- /dev/null +++ b/target/linux/ramips/dts/VOCORE2.dtsi @@ -0,0 +1,79 @@ +#include "mt7628an.dtsi" + +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> + +/ { + compatible = "vocore,vocore2", "mediatek,mt7628an-soc"; + + chosen { + bootargs = "console=ttyS2,115200"; + }; + + gpio-leds { + compatible = "gpio-leds"; + + wifi_led: wifi { + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "gpio"; + ralink,function = "gpio"; + }; + + refclk { + ralink,group = "refclk"; + ralink,function = "gpio"; + }; + + agpio { + ralink,group = "agpio"; + ralink,function = "uart2"; + }; + + uart1 { + ralink,group = "uart1"; + ralink,function = "uart1"; + }; + + uart2 { + ralink,group = "spis"; + ralink,function = "pwm"; + }; + }; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0x4>; +}; + +&esw { + mediatek,portmap = <0x7>; + mediatek,portdisable = <0x3a>; +}; + +&i2s { + status = "okay"; +}; + +&gdma { + status = "okay"; +}; + +&pwm { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/VOCORE2L.dts b/target/linux/ramips/dts/VOCORE2L.dts new file mode 100644 index 0000000000..ba68b169ba --- /dev/null +++ b/target/linux/ramips/dts/VOCORE2L.dts @@ -0,0 +1,52 @@ +/dts-v1/; + +#include "VOCORE2.dtsi" + +/ { + model = "VoCore2-Lite"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; +}; + +&wifi_led { + label = "vocore2l:green:wifi"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7688.mk b/target/linux/ramips/image/mt7688.mk index 4a50275a8d..994c68533e 100644 --- a/target/linux/ramips/image/mt7688.mk +++ b/target/linux/ramips/image/mt7688.mk @@ -19,6 +19,15 @@ define Device/pbr-d1 endef TARGET_DEVICES += pbr-d1 +define Device/vocore2l + DTS := VOCORE2L + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := VoCore VoCore2-Lite + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport \ + kmod-sdhci kmod-sdhci-mt7620 +endef +TARGET_DEVICES += vocore2l + define Device/wrtnode2r DTS := WRTNODE2R IMAGE_SIZE := $(ralink_default_fw_size_16M) _______________________________________________ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev