aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/base-files
diff options
context:
space:
mode:
authorPawel Dembicki <paweldembicki@gmail.com>2020-03-09 21:16:43 +0100
committerChristian Lamparter <chunkeey@gmail.com>2020-04-10 15:22:26 +0200
commitc30220d458c0771013f21a16148baa4ea723027b (patch)
tree4866dd1e3420c800940521aa6423f014382de542 /target/linux/ipq40xx/base-files
parenta30abb1b6bb66d1caf08c331805163e6fef6f2a1 (diff)
downloadupstream-c30220d458c0771013f21a16148baa4ea723027b.tar.gz
upstream-c30220d458c0771013f21a16148baa4ea723027b.tar.bz2
upstream-c30220d458c0771013f21a16148baa4ea723027b.zip
ipq40xx: add support for Cell C RTL30VW
Cell C RTL30VW is a LTE router with tho gigabit ethernets and integrated QMI mPCIE modem. This is stripped version of ASKEY RTL0030VW. Hardware: Specification: -CPU: IPQ4019 -RAM: 256MB -Flash: NAND 128MB + NOR 16MB -WiFi: Integrated bgn/ac -LTE: mPCIe card (Modem chipset MDM9230) -LAN: 2 Gigabit Ports -USB: 2x USB2.0 -Serial console: RJ-45 115200 8n1 -Unsupported VoIP Known issues: None so far. Instruction install: There are two methods: Factory web-gui and serial + tftp. Web-gui: 1. Apply factory image via stock web-gui. Serial + initramfs: 1. Rename OpenWrt initramfs image to "image" 2. Connect serial console (115200,8n1) 3. Set IP to different than 192.168.1.11, but 24 bit mask, eg. 192.168.1.4. 4. U-Boot commands: sf probe && sf read 0x80000000 0x180000 0x10000 setenv serverip 192.168.1.4 set fdt_high 0x85000000 tftpboot 0x84000000 image bootm 0x84000000 5. Install sysupgrade image via "sysupgrade -n" Back to stock: All is needed is swap 0x4c byte in mtd8 from 0 to 1 or 1 to 0, do firstboot and factory reset with OFW: 1. read mtd8: dd if=/dev/mtd8 of=/tmp/mtd8 2. go to tmp: cd /tmp/ 3. write first part of partition: dd if=mtd8 of=mtd8.new bs=1 count=76 4. check which layout uses bootloader: cat /proc/mtd 5a. If first are kernel_1 and rootfs_1 write 0: echo -n -e '\x00' >> mtd8.new 5b. If first are kernel and rootfs write 1: echo -n -e '\x01' >> mtd8.new 6. fill with rest of data: dd if=mtd8 bs=1 skip=77 >> mtd8.new 7. CHECK IF mtd8.new HAVE CHANGED ONLY ONE BYTE! e.g with: hexdump mtd8.new 8. write new mtd8 to flash: mtd write mtd8.new /dev/mtd8 9. do firstboot 10.reboot 11. Do back to factory defaults in OFW GUI. Based on work: Cezary Jackiewicz <cezary@eko.one.pl> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Diffstat (limited to 'target/linux/ipq40xx/base-files')
-rwxr-xr-xtarget/linux/ipq40xx/base-files/etc/board.d/02_network5
-rwxr-xr-xtarget/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches6
-rw-r--r--target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata2
-rw-r--r--target/linux/ipq40xx/base-files/lib/upgrade/platform.sh15
4 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 13e2722f79..0e4b947c5f 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -63,6 +63,11 @@ ipq40xx_setup_interfaces()
engenius,eap2200)
ucidef_set_interface_lan "eth0 eth1"
;;
+ cellc,rtl30vw)
+ ucidef_set_interface_lan "eth0"
+ ucidef_add_switch "switch0" \
+ "0u@eth0" "3:lan" "4:lan"
+ ;;
ezviz,cs-w3-wd1200g-eup)
ucidef_set_interfaces_lan_wan "eth0" "eth1"
ucidef_add_switch "switch0" \
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
index e46a297ea7..c255707f91 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/ipq40xx/base-files/etc/board.d/03_gpio_switches
@@ -7,6 +7,12 @@ board_config_update
board=$(board_name)
case "$board" in
+cellc,rtl30vw)
+ ucidef_add_gpio_switch "w_disable" "W_DISABLE mPCIE pin" "398" "1"
+ ucidef_add_gpio_switch "pmd_resin_n" "PMD_RESIN_N pin" "399" "1"
+ ucidef_add_gpio_switch "mcpie_vcc" "LTE power" "400" "0"
+ ucidef_add_gpio_switch "usb_vcc" "USB power" "401" "0"
+ ;;
cilab,meshpoint-one)
ucidef_add_gpio_switch "poe_passtrough" "POE passtrough enable" "413" "1"
;;
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index dd301b1e30..814d5b0371 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -80,6 +80,7 @@ case "$FIRMWARE" in
/usr/bin/fritz_cal_extract -i 1 -s 0x3C800 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x207 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
;;
+ cellc,rtl30vw |\
compex,wpj419 |\
compex,wpj428 |\
engenius,eap1300 |\
@@ -162,6 +163,7 @@ case "$FIRMWARE" in
/usr/bin/fritz_cal_extract -i 1 -s 0x3D000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1") || \
/usr/bin/fritz_cal_extract -i 1 -s 0x3C000 -e 0x208 -l 12064 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader1")
;;
+ cellc,rtl30vw |\
compex,wpj419 |\
compex,wpj428 |\
engenius,eap1300 |\
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index 7aabeeeea0..d3effdf7e2 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -29,6 +29,17 @@ EOF
return 0;
}
+askey_do_upgrade() {
+ local tar_file="$1"
+
+ local board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
+ board_dir=${board_dir%/}
+
+ tar Oxf $tar_file ${board_dir}/root | mtd write - rootfs
+
+ nand_do_upgrade "$1"
+}
+
zyxel_do_upgrade() {
local tar_file="$1"
@@ -78,6 +89,10 @@ platform_do_upgrade() {
CI_KERNPART="linux"
nand_do_upgrade "$1"
;;
+ cellc,rtl30vw)
+ CI_UBIPART="ubifs"
+ askey_do_upgrade "$1"
+ ;;
compex,wpj419)
nand_do_upgrade "$1"
;;