From fa5a9199a77dd3af026bf2844ef34bfd381b3dac Mon Sep 17 00:00:00 2001 From: "L. D. Pinney" Date: Sat, 22 Jul 2017 16:04:12 +0800 Subject: [PATCH] ramips: GnuBee Personal Cloud One updates. The GnuBee Personal Cloud One crowdfunded on https://www.crowdsupply.com It is a low-cost, low-power, network-attached storage device. Specifications: - SoC: MediaTek MT7621AT - RAM: DDR3 512 MB - Flash: 32 MB - Six SATA ports for 2.5" Drives - One USB 3.0 - Two USB 2.0 - One micro SDcard - Gigabit Ethernet: 1 x WAN and 1 x LAN - UART 3.5mm Audio Jack or 3 pins on PCB - 57600 8N1 - Four GPIOs available on a pin header Flash instructions: The GnuBee Personal Cloud One ships with libreCMC installed. One can upgrade using the webinterface or sysupgrade. Das U-Boot has multiple options for recovery or updates including : - USB - http - tftp Signed-off-by: L. D. Pinney --- .../ramips/base-files/etc/board.d/01_leds | 5 +- target/linux/ramips/dts/GB-PC1.dts | 171 ++++++++++-------- target/linux/ramips/image/mt7621.mk | 2 +- 3 files changed, 101 insertions(+), 77 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 5b15a9617c..e687f4a6d2 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -171,8 +171,9 @@ fonera20n) set_usb_led "$board:orange:usb" set_wifi_led "$board:orange:wifi" ;; -gb-pc1|\ - ucidef_set_led_default "$board:green:status" +gb-pc1) + ucidef_set_led_netdev "lan" "lan" "$board:green:lan" "eth0.1" + ucidef_set_led_netdev "wan" "wan" "$board:green:wan" "eth0.2" ;; gl-mt300a|\ gl-mt300n|\ diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts index e36cf2605e..cdc3cd369d 100644 --- a/target/linux/ramips/dts/GB-PC1.dts +++ b/target/linux/ramips/dts/GB-PC1.dts @@ -6,7 +6,7 @@ #include / { - compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc"; + compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc"; model = "GB-PC1"; memory@0 { @@ -18,61 +18,12 @@ bootargs = "console=ttyS0,57600"; }; - sdhci@10130000 { - status = "okay"; - }; - - palmbus@1E000000 { - spi@b00 { - status = "okay"; - - m25p80@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "jedec,spi-nor"; - reg = <0 0>; - linux,modalias = "m25p80"; - 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>; - }; - - partition@40000 { - label = "firmware"; - reg = <0x50000 0x1fb0000>; - }; - - }; - }; - + palmbus: palmbus@1E000000 { i2c@900 { - compatible = "ralink,i2c-mt7621"; - reg = <0x900 0x100>; - #address-cells = <1>; - #size-cells = <0>; - pinctrl-names = "default"; - pinctrl-0 = <&i2c_pins>; status = "okay"; }; }; - pcie@1e140000 { - status = "okay"; - }; - - ethernet@1e100000 { - status = "okay"; - }; - gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; @@ -89,47 +40,119 @@ gpio-leds { compatible = "gpio-leds"; + system { + label = "gb-pc1:green:system"; + gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; + }; + status { - label = "gnubee:green:status"; - gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; + label = "gb-pc1:green:status"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; - system { - label = "gnubee:green:system"; - gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; + lan { + label = "gb-pc1:green:lan"; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "gb-pc1:green:wan"; + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; }; }; - gpio-power { - compatible = "gpio-power"; + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; - 26 { - label = "gnubee:power:gpio26"; - gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + gpio26 { + gpio-export,name = "gpio26"; + gpio-export,direction_may_change = <1>; + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>; }; - 28 { - label = "gnubee:power:gpio28"; + gpio28 { + gpio-export,name = "gpio28"; + gpio-export,direction_may_change = <1>; gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>; }; - 29 { - label = "gnubee:power:gpio29"; - gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; + gpio29 { + gpio-export,name = "gpio29"; + gpio-export,direction_may_change = <1>; + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; }; - 30 { - label = "gnubee:power:gpio30"; + gpio30 { + gpio-export,name = "gpio30"; + gpio-export,direction_may_change = <1>; gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; }; }; +}; + +&sdhci { + status = "okay"; +}; + +&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>; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; +}; + +&cpuclock { + compatible = "fixed-clock"; + clock-frequency = <2000000000>; +}; + +&sysclock { + compatible = "fixed-clock"; + clock-frequency = <80000000>; +}; + +&pcie { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; - pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "wdt", "rgmii2", "mdio"; - ralink,function = "gpio"; - }; +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "rgmii2", "uart3"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index b26cde9b5d..b899fd3970 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -5,7 +5,7 @@ define Device/gb-pc1 DTS := GB-PC1 DEVICE_TITLE := GnuBee Personal Cloud One - DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci + DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 kmod-sdhci-mt7620 uboot-envtools IMAGE_SIZE := $(ralink_default_fw_size_32M) endef -- 2.25.1