From: Nishant Sharma Date: Wed, 24 Oct 2018 14:23:20 +0000 (+0530) Subject: ramips: add support for UniElec U7621-06-512M-64M variant X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=df3e0b580644bd8434a690802e3c5c18a6e38098;p=openwrt%2Fstaging%2Fblocktrron.git ramips: add support for UniElec U7621-06-512M-64M variant 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 [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 --- 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 bb7069a77a..ff8a0db6f3 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -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|\ diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 8c72019297..e28f066658 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -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 index 0000000000..4b064b2b3b --- /dev/null +++ b/target/linux/ramips/dts/U7621-06-512M-64M.dts @@ -0,0 +1,92 @@ +/* + * BSD LICENSE + * + * Copyright(c) 2017 Kristian Evensen . + * Copyright(c) 2017 Piotr Dymacz . + * Copyright(c) 2018 Nishant Sharma . + * 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 +#include + +/ { + 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>; + }; + }; + }; +}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index e6059e6977..47ff85f241 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -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