ramips: GnuBee Personal Cloud One updates. 9/head
authorL. D. Pinney <ldpinney@gmail.com>
Sat, 22 Jul 2017 08:04:12 +0000 (16:04 +0800)
committerL. D. Pinney <ldpinney@gmail.com>
Sun, 23 Jul 2017 00:26:57 +0000 (08:26 +0800)
    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
target/linux/ramips/base-files/etc/board.d/01_leds
target/linux/ramips/dts/GB-PC1.dts
target/linux/ramips/image/mt7621.mk

index 5b15a9617ce8f990d106d69bdd6da26ba08c2af5..e687f4a6d2f826b79f6b6eda834339fea0e9f158 100755 (executable)
@@ -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|\
index e36cf2605e1a9dddad9f13b63fa4b4afd36895e8..cdc3cd369d74b4fd1fc43fe1ad757035d07b747b 100644 (file)
@@ -6,7 +6,7 @@
 #include <dt-bindings/input/input.h>
 
 / {
-       compatible = "mediatek,mt7621-eval-board", "mediatek,mt7621-soc";
+       compatible = "gnubee,gb-pc1", "mediatek,mt7621-soc";
        model = "GB-PC1";
 
        memory@0 {
                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>;
        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";
+};
+
+&ethernet {
+       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";
                };
        };
 };
index b26cde9b5d519c43e141c4b3cec7689e7108f528..b899fd3970c8a9de1e99ec82a80f696fd05baeaf 100644 (file)
@@ -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