ramips: add support for UniElec U7621-06-512M-64M variant
authorNishant Sharma <nishant@unmukti.in>
Wed, 24 Oct 2018 14:23:20 +0000 (19:53 +0530)
committerMathias Kresin <dev@kresin.me>
Wed, 28 Nov 2018 00:11:38 +0000 (01:11 +0100)
Add support for UniElec U7621-06 variant with 512MB RAM and 64MB flash.

Additional specs are below:

CPU: MT7621 (880Mhz)
Bootloader: Ralink U-Boot
Flash: 64MB
 - U-Boot identifies as Macronix MX66L51235F
 - kernel identifies as MX66L51235l (65536 Kbytes)
RAM: 512MB

Rest of the details as per commit 46ab81e405d2 ("ramips add support for
UniElec U7621-06")

Signed-off-by: Nishant Sharma <nishant@unmukti.in>
[use generic board detection, add firmware partition compatible, extend
firmware partition to use all of the remaining flash space, add a
maximum image size matching the firmware partition size]
Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ramips/base-files/etc/board.d/02_network
target/linux/ramips/base-files/lib/upgrade/platform.sh
target/linux/ramips/dts/U7621-06-512M-64M.dts [new file with mode: 0644]
target/linux/ramips/image/mt7621.mk

index bb7069a77a591357be07f12be77b757e3670261e..ff8a0db6f325aa4f070a239b93c66dc047b5f387 100755 (executable)
@@ -116,6 +116,7 @@ ramips_setup_interfaces()
        sap-g3200u3|\
        sk-wb8|\
        unielec,u7621-06-256m-16m|\
+       unielec,u7621-06-512m-64m|\
        vr500|\
        wavlink,wl-wn570ha1|\
        wf-2881|\
index 8c720192976c8afa9403e42e9349e95e66aee5a3..e28f066658c89dd78b6f15be8222f5dfb1d39f3f 100755 (executable)
@@ -163,6 +163,7 @@ platform_check_image() {
        tiny-ac|\
        u25awf-h1|\
        unielec,u7621-06-256m-16m|\
+       unielec,u7621-06-512m-64m|\
        u7628-01-128M-16M|\
        ur-326n4g|\
        ur-336un|\
diff --git a/target/linux/ramips/dts/U7621-06-512M-64M.dts b/target/linux/ramips/dts/U7621-06-512M-64M.dts
new file mode 100644 (file)
index 0000000..4b064b2
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ *  BSD LICENSE
+ *
+ *  Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
+ *  Copyright(c) 2017 Piotr Dymacz <pepe2k@gmail.com>.
+ *  Copyright(c) 2018 Nishant Sharma <codemarauder@gmail.com>.
+ *  All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions
+ *  are met:
+ *
+ *    * Redistributions of source code must retain the above copyright
+ *      notice, this list of conditions and the following disclaimer.
+ *    * Redistributions in binary form must reproduce the above copyright
+ *      notice, this list of conditions and the following disclaimer in
+ *      the documentation and/or other materials provided with the
+ *      distribution.
+ *    * Neither the name of Broadcom Corporation nor the names of its
+ *      contributors may be used to endorse or promote products derived
+ *      from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/dts-v1/;
+
+#include "U7621-06.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+       compatible = "unielec,u7621-06-512m-64m", "unielec,u7621-06", "mediatek,mt7621-soc";
+       model = "UniElec U7621-06 (512M RAM/64M flash)";
+
+       memory@0 {
+               device_type = "memory";
+               reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
+       };
+};
+
+&spi0 {
+       status = "okay";
+
+       flash@0 {
+               compatible = "jedec,spi-nor";
+               reg = <0>;
+               spi-max-frequency = <10000000>;
+               m25p,chunked-io = <32>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "bootloader";
+                               reg = <0x0 0x30000>;
+                               read-only;
+                       };
+
+                       partition@30000 {
+                               label = "config";
+                               reg = <0x30000 0x10000>;
+                               read-only;
+                       };
+
+                       factory: partition@40000 {
+                               label = "factory";
+                               reg = <0x40000 0x10000>;
+                               read-only;
+                       };
+
+                       firmware: partition@50000 {
+                               compatible = "denx,uimage";
+                               label = "firmware";
+                               reg = <0x50000 0x3fb0000>;
+                       };
+               };
+       };
+};
index e6059e6977cf9ac4d159af49f697e9dc22f033a6..47ff85f2419568e1b40b6ed7ed63755f2037f001 100644 (file)
@@ -395,6 +395,14 @@ define Device/unielec_u7621-06-256m-16m
 endef
 TARGET_DEVICES += unielec_u7621-06-256m-16m
 
+define Device/unielec_u7621-06-512m-64m
+  DTS := U7621-06-512M-64M
+  IMAGE_SIZE := 65216k
+  DEVICE_TITLE := UniElec U7621-06 (512M RAM/64M flash)
+  DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3
+endef
+TARGET_DEVICES += unielec_u7621-06-512m-64m
+
 define Device/vr500
   DTS := VR500
   IMAGE_SIZE := 66453504