aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
* ramips: support IMAGE_SIZE in kiB for Build/trxAdrian Schmutzler2019-07-251-1/+1
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix ralink_default_fw_size_16MAdrian Schmutzler2019-07-255-6/+6
| | | | | | | | | | | | | | | | | | | | | | In ramips, there are the following predefined values for IMAGE_SIZE ralink_default_fw_size_4M 3866624 3776k 0x3B0000 ralink_default_fw_size_8M 8060928 7872k 0x7B0000 ralink_default_fw_size_16M 16121856 15744k 0xF60000 ralink_default_fw_size_32M 33226752 32448k 0x1FB0000 Out of those, the "16M" value is obviously odd, as it provides more room for the remaining partitions than the tree others. Of the devices in all subtargets, there are actually > 50 that have a firmware partition with 0xFB0000 size, while only 5 (!) have 0xF60000. From the former, many are set to ralink_default_fw_size_16M anyway, although it is wrong at the present point. Consequently, it makes sense to change ralink_default_fw_size_16M to 0xFB0000, and to update IMAGE_SIZE for the 5 devices with 0xF60000. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/rt305x: fix firmware partition size for some 4MB devicesAdrian Schmutzler2019-07-253-3/+3
| | | | | | | | | | | | | | | allnet_all0256n-4m, tenda_w150m and unbranded_wr512-3gn-4m have their firmware partition set to reg = <0x50000 0x3c8000>. However, based on the 4MB flash, the size should be 0x3b0000. After some research in the target's history, it looks like the changed size has been a mistake when transferring device partitions from Makefile to DTS in 770b28f146f. This patch changes the named three devices back to 0x3b0000. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix mac addresses used by Phicomm K2PChuanhong Guo2019-07-251-0/+4
| | | | | | | | | | | Like most mt7621 boards, Phicomm K2P stores LAN/WAN mac addresses at 0xe000/0xe006 of factory partition. Phicomm uses lan_mac-1 as wan_mac, while our default case in 02_network uses lan_mac+1. Add a special case reading lan/wan mac address for Phicomm K2P. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: add kmod-mt7615e to Phicomm K2P imagesRoger Pueyo Centelles2019-07-251-0/+1
| | | | | | | | | | | | Now that the mt76 driver supports the MT7615D chip found on these devices, use it. Also add the wpad-basic package. Note: the driver supports operation on both the 2.4 GHz and the 5 GHz bands, but not yet concurrently. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ramips: enable Newifi D1 SD slotDENG Qingfang2019-07-231-1/+1
| | | | | | | Newifi D1 is shipped with an 8GB microSD card in its SD slot Without SD driver users would not be able to use it unless manually installed Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* treewide: sysupgrade: get rid of platform_nand_pre_upgrade()Rafał Miłecki2019-07-222-13/+6
| | | | | | | | | | | 1) nand_do_upgrade() is always called by a target code 2) nand_do_upgrade() starts with calling platform_nand_pre_upgrade() It means there is no need for the platform_nand_pre_upgrade() callback at all. All code that was present there could bo moved & simplly called by a target right before the nand_do_upgrade(). Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ramips: add support for TP-Link RE650 v1Georgi Vlaev2019-07-174-9/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link RE650 v1 is a dual-band AC2600 range extender, based on MediaTek MT7621A and MT7615E. According to the wikidevi entry for RE650 this device is identical with TP-Link RE500 as hardware. This patch supports only RE650. Hardware specification: - SoC 880 MHz - MediaTek MT7621AT - 128 MB of DDR3 RAM - 16 MB - Winbond 25Q128FVSG - 4T4R 2.4 GHz - MediaTek MT7615E - 4T4R 5 GHz - MediaTek MT7615E - 1x 1 Gbps Ethernet - MT7621AT integrated - 7x LEDs (Power, 2G, 5G, WPS(x2), Lan(x2)) - 4x buttons (Reset, Power, WPS, LED) - UART header (J1) - 2:GND, 3:RX, 4:TX Serial console @ 57600,8n1 Flash instructions: Upload openwrt-ramips-mt7621-tplink_re650-v1-squashfs-factory.bin from the RE650 web interface. TFTP recovery to stock firmware: Unfortunately, I can't find an easy way to recover the RE without opening the device and using modified binaries. The TFTP upload will only work if selected from u-boot, which means you have to open the device and attach to the serial console. The TFTP update procedure does *not* accept the published vendor firmware binaries. However, it allows to flash kernel + rootfs binaries, and this works if you have a backup of the original contents of the flash. It's probably possible to create special image out of the vendor binaries and use that as recovery image. Signed-off-by: Georgi Vlaev <georgi.vlaev@gmail.com> [re-added variables for kernel header] Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: add MT7615 wireless support for ELECOM WRC-1167GHBK2-SINAGAKI Hiroshi2019-07-172-4/+12
| | | | | | | | | | | | | ELECOM WRC-1167GHBK2-S has a MediaTek MT7615D chip for 2.4/5 GHz wireless. A driver package for MT7615 chip is added to OpenWrt in a0e5ca4f3523b9eef96bff32e45f6fa8275b982f, so add preliminary MT7615 chip support for WRC-1167GHBK2-S. Note: Currently, DBDC mode for MT7615 is not supported in mt76 driver. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* treewide: sysupgrade: don't use $ARGV in platform_do_upgrade()Rafał Miłecki2019-07-171-4/+4
| | | | | | | stage2 passes image path to platform_do_upgrade() as an argument so it can be simply accessed using $1 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ramips: get rid of platform_pre_upgrade()Rafał Miłecki2019-07-161-12/+8
| | | | | | | | | | | The only step between platform_pre_upgrade() and platform_do_upgrade() is switching to ramdisk. It should be fine to "mtd erase firmware" from the later callback and get rid of the first one. This change wasn't tested on affected target but identical code logic was verified to work as expected on brcm47xx with initramfs firmware. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* ramips: Remove left-over mistyped device string from 02_networkAdrian Schmutzler2019-07-161-1/+0
| | | | | | | | | | | In 2011 (!), network setup for nexaira,bc2 was moved to network defaults script with a typo so it became b2c: 295e04084c ("ramips: setup bc2 mac addresses from the generic network script") This patch just removes the useless entry without replacement, since it seems to have worked for 8 years anyway. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: mtk-mmc: mt76x8: check ESD_MODE before applying AGPIO_CFGChuanhong Guo2019-07-161-8/+4
| | | | | | | | | | | | | | | | | | | | | | | Since mt76x8an ver1 eco2, SDXC pins can be switched to the following pinmap: sd_d1 -> PAD_I2S_SDI sd_d0 -> PAD_I2S_WS sd_cmd -> PAD_I2S_CLK sd_d3 -> PAD_I2C_SCLK sd_d2 -> PAD_I2C_SD sd_clk -> PAD_GPIO0 sd_wp -> PAD_TXD1 sd_cd -> PAD_RXD1 To use this pinmap, one would need to set ESD_MODE bit (bit 15) to 1 in GPIO1_MODE and switch other used pads into GPIO mode. In this mode, we don't need to switch ethernet pins to digital pad. Check ESD_MODE bit before applying AGPIO_CFG and use rt_sysc_m32 to set it. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: add support for ASUS RT-AC57UDavid Bauer2019-07-113-4/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoC: MediaTek MT7621AT RAM: 128M (Winbond W631GG6KB-15) FLASH: 16MB (Spansion S25FL128SA) WiFi: MediaTek MT7603EN bgn 2SS WiFi: MediaTek MT7612EN nac 2SS BTN: Reset - WPS LED: - Power - LAN {1-4} - WAN - WiFi 2.4 GHz - WiFi 5 GHz - USB UART: UART is present next to the Power LED. TX - RX - GND - 3V3 / 57600-8N1 3V3 is the nearest one to the Power LED. Installation ------------ Via TFTP: 1. Set your computers IP-Address to 192.168.1.75. 2. Power up the Router with the Reset button pressed. 3. Release the Reset button after 5 seconds. 4. Upload OpenWRT sysupgrade image via TFTP: > tftp -4 -v -m binary 192.168.1.1 -c put <IMAGE> Via SSH: Note: User/password for SSH is identical with the one used in the Web-interface. 1. Complete the initial setup wizard. 2. Activate SSH under "Administration" -> "System". 3. Transfer the OpenWrt sysupgrade image via scp: > scp owrt.bin admin@192.168.1.1:/tmp 4. Connect via SSH to the router. > ssh admin@192.168.1.1 5. Write the OpenWrt image to flash. > mtd-write -i /tmp/owrt.bin -d linux 6. Reboot the router > reboot Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: fix mqmaker witi case in fixup-mac-addressChuanhong Guo2019-07-111-2/+1
| | | | | | | This commit fixes a forgotten case in previous commit. Fixes: 087e14ab59 ("ramips: mt7621: merge two variants of MQmaker WiTi together") Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: merge two variants of MQmaker WiTi togetherChuanhong Guo2019-07-115-34/+5
| | | | | | | Since we can auto-detect memory now, we don't need 2 dts for two memory variants. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: dts: drop memory nodesChuanhong Guo2019-07-1188-441/+0
| | | | | | | | mt7621 and mt7628 now have the ability to detect memory size automatically. Drop memory nodes and let kernel determine memory size. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: add support for memory detectionChuanhong Guo2019-07-111-0/+125
| | | | | | | | | | | | | | | | | | | | | mt7621 has the following memory map: 0x0-0x1c000000: lower 448m memory 0x1c000000-0x2000000: peripheral registers 0x20000000-0x2400000: higher 64m memory detect_memory_region in arch/mips/kernel/setup.c only add the first memory region and isn't suitable for 512m memory detection because it may accidentally read the memory area for peripheral registers. This commit adds memory detection capability for mt7621: 1. add the highmem area when 512m is detected. 2. guard memcmp from accessing peripheral registers: This only happens when some weird user decided to change kernel load address to 256m or higher address. Since this is a quite unusual case, we just skip 512m testing and return 256m as memory size. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: fix bogus MTK_SOC (typo)Daniel Golle2019-07-102-1/+1
| | | | | | | | | | Belkin F7C027 is clearly Rt5350 SoC, as shown on internal photographs filed for FCC approval[1]. [1]: https://fcc.io/K7S/F7C027 Fixes commit 3b0264eddbc Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: Sort all subtarget MakefilesAdrian Schmutzler2019-07-106-1522/+1511
| | | | | | | | | This patch applies sorting to the definitions as whole blocks. Sorting has been performed fully automatic, line count differences originate from double empty lines removed. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: Reapply sorting to board.d filesAdrian Schmutzler2019-07-103-521/+521
| | | | | | | | This patch is cosmetical: It only applies sorting based on device names, whereas renames already took place in earlier patches. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: Remove base-files/lib/ramips.shAdrian Schmutzler2019-07-103-36/+0
| | | | | | | | | | Having converted the target to use device compatible, ramips.sh is obsolete now. The only remaining entry for the mt7688 evaluation board seems to be orphaned. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/rt305x: Name DTS files based on schemeAdrian Schmutzler2019-07-10116-126/+126
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/rt288x,rt3883: Name DTS files based on schemeAdrian Schmutzler2019-07-1022-21/+21
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mt76x8: Name DTS files based on schemeAdrian Schmutzler2019-07-1055-66/+55
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mt7621: Name DTS files based on schemeAdrian Schmutzler2019-07-1065-77/+74
| | | | | | | | As introduced with ath79, DTS files for ramips will now be labelled soc_vendor_device.dts(i). With this change, DTS files can be selected automatically without further manual links. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mt7620: Name DTS files based on schemeAdrian Schmutzler2019-07-1099-107/+104
| | | | | | | | As introduced with ath79, DTS files for ramips will now be labelled soc_vendor_device.dts(i). With this change, DTS files can be selected automatically without further manual links. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: Derive DTS name from device name in MakefileAdrian Schmutzler2019-07-101-1/+2
| | | | | | | | | | | | | | | This will automatically derive the DTS name as in ath79 and thus makes specifying DTS for every device obsolete. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> --- This patch only introduces the mechanism and is then followed by commits with renames and Makefile adjustments per subtarget. Eventually, those can be all squashed into a single commit or left as they are to enhance overview.
* ramips/rt305x: Synchronize Makefiles with DTS compatibleAdrian Schmutzler2019-07-1012-668/+460
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/rt288x,rt3883: Synchronize Makefiles with DTS compatibleAdrian Schmutzler2019-07-106-111/+79
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mt76x8: Synchronize Makefiles with DTS compatibleAdrian Schmutzler2019-07-105-130/+91
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mt7621: Synchronize Makefiles with DTS compatibleAdrian Schmutzler2019-07-108-191/+135
| | | | Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mt7620: Synchronize Makefiles with DTS compatibleAdrian Schmutzler2019-07-1010-470/+327
| | | | | | | | | | | | | | | This will "rename" devices in Makefiles to the pattern used in DTS compatible. This will systematize naming of devices enormously. As device names are used to for default SUPPORTED_DEVICES entries, we need to adjust the source for /tmp/sysinfo/board_name, too. So remove relevant entries from base-files/lib/ramips.sh and use device compatible for that. Despite that, base-files are updated, too. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: Improve compatible for TP-Link Archer devicesAdrian Schmutzler2019-07-1013-30/+35
| | | | | | | | Include "Archer" in compatible as it is part of the device name. Update Makefile device names where necessary to match compatible. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add missing DEVICE_VENDORDaniel Golle2019-07-101-1/+1
| | | | | Fixes commit ee66fe4ea9a6f5e3f47a063f850bac57e1fb411a Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: use upstream RAW_APPENDED_DTB instead of our OWRTDTBChuanhong Guo2019-07-089-86/+15
| | | | | | | | | | | | | | | | | Upstream kernel added support for RAW_APPENDED_DTB on ralink arch in the following commit: 02564fc89d3d ("ralink: Introduce fw_passed_dtb to arch/mips/ralink") Use upstream solution and get rid of our OWRTDTB hack. This commit set DEVICE_DTS to $$(DTS) instead of replacing DTS with DEVICE_DTS in device profile because DTS variable will be dropped in later commits. Signed-off-by: Chuanhong Guo <gch981213@gmail.com> [Tested on mt7621/mt76x8] Tested-by: Chuanhong Guo <gch981213@gmail.com> [Tested on rt305x/mt7620] Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ramips: Fix compatible for YUKAI Engineering BOCCOAdrian Schmutzler2019-07-071-1/+1
| | | | | | Looks like an undetected copy/paste error. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: convert DEVICE_TITLE to new variablesDaniel Golle2019-07-066-323/+704
| | | | | | Also unify naming and add details where they were missing. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* ramips: add support for TP-Link TL-WR841n v14Alexander Müller2019-07-024-0/+155
| | | | | | | | | | | | | | | | | | | | | | TP-Link TL-WR841n v14 is a router based on MediaTek MT7628N. - MediaTek MT7628NN - 32 MB of RAM - 4 MB of FLASH - 2T2R 2.4 GHz - 5x 10/100 Mbps Ethernet Installation: - copy the 'openwrt-ramips-mt76x8-tl-wr841n-v14-squashfs-tftp-recovery.bin' file to your tftp server root and rename it to 'tp_recovery.bin'. - configure your PC running the TFTP server with the static IP address 192.168.0.66/24 - push the reset button and plug in the power connector. Wait until the orange led starts blinking (~6sec) Signed-off-by: Alexander Müller <donothingloop@gmail.com> Signed-off-by: Alexander Couzens <lynxis@fe80.eu> [small modifications gpio-hog]
* ramips/leds: use devicetree alias led_wlanAlexander Couzens2019-07-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | Similiar to the lantiq target use a dts alias to define the wlan led instead of static mapping in /etc/board.d/01_leds. Reduce code duplication. A device tree must define the alias "led-wlan" similiar to "led-boot". / { aliases { led-wlan = &led_wlan; }; [..] led_wlan: wlan { label = "tl-wr841n-v14:green:wlan"; gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; }; Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* ramips: add support for TOTOLINK A7000RChuanhong Guo2019-06-263-0/+133
| | | | | | | | | | | | | | | Specifications: - SoC: MT7621AT - RAM: 128MB - Flash: 16M SPI NOR - Ethernet: 5x GE ports - WiFi: 2.4G: MT7615N 5G: MT7615N Flash instruction: Upload generated sysupgrade firmware through factory web interface. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: add IRQ for GPIO nodeChuanhong Guo2019-06-261-0/+3
| | | | | | This makes interrupt-based gpio-keys working. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ramips: mt7621: Add new device AsiaRF AP7621-001Daniel Danzberger2019-06-253-0/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specs: SoC: Mediatek MT7621A CPU: 4x 880Mhz Cache: 32 KB I-Cache and 32 KB D-Cach 256 KB L2 Cache (shared by Dual-Core) RAM: DDR3 512MB 16bits BUS FLASH: 16MB Switch: Mediatek Gigabit Switch (1 x LAN, 1 x WAN) USB: 1x 3.0 PCI: 3x Mini PCIe GPS: Quectel L70B BTN: Reset LED: - Power - Ethernet - Wifi - USB UART: UART is present as Pads with throughholes on the PCB. They are located on left side. 3.3V - RX - GND - TX / 57600-8N1 3.3V is the square pad Installation: The stock image is a modified openwrt and can be overflashed via # sysupgrade -F image.bin Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> [removed unused label, formatting]
* kernel: bump 4.14 to 4.14.128Koen Vandeputte2019-06-201-1/+1
| | | | | | | | | Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ramips: fix EW-7478AC model name in DTSPetr Štetiar2019-06-201-1/+1
| | | | | | | | This fixes lower case AC in the DTS model name. Fixes: 88f7a29f99fb ("ramips: add support for Edimax EW-7476RPC / EW-7478AC") Reported-by: Cezary Jackiewicz <cezary@eko.one.pl> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: fix GELAN port in D-Link DWR-118-A2Pawel Dembicki2019-06-202-5/+7
| | | | | | | This patch fix and enable GELAN port in D-LINK DWR-118-A2. Tested-by: Richard Toth <trtk1992@gmail.com> Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: mt7620: add EPHY base mdio address changing possibilityPawel Dembicki2019-06-202-46/+62
| | | | | | | | | | | In some boards is requred to change the ephy mdio base address. This patch add of property "mediatek,ephy-base-address" in gsw part, which allows to change ephy base address. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> [fixed indentation in header file] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ramips: mt7620: fix external PHY autopollingPawel Dembicki2019-06-201-4/+6
| | | | | | | | | | | | | | | | | The port initialisation is based on assumption that phy address and port number is the same. SoC allow different numbers and some board have it. Use phy address instead the port number to make sure that correct addresses are polled. In situation when only one PHY with address 0x0 is conected to port 4, autopolling is broken. This patch make autopolling correct when port number and phy address are different. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ramips: handle mdio address and switch port seperateMathias Kresin2019-06-204-11/+14
| | | | | | | | | | | | | | | The phy handling code forces a phy mdio address and the switch port to which a phy is attached to be the same. Albeit such a configuration is used for most boards, it isn't for all. Pass the switch port number to the ethernet phy connect functions, to ensure the correct list entry is edited and not the list entry that matches th phys mdio address. Use the mdio address with mdiobus_get_phy instead of the port number, to make sure the expected ethernet phy gets connected. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ramips: ignore already handled ethernet physMathias Kresin2019-06-201-2/+8
| | | | | | | | | | | | The whole logic in fe_phy_connect() is based on the asumption that mdio address and switch port id are equal. Albeit it is true for most boards, it doesn't is for all. It isn't yet clear which subtargets/boards require the devicetree less ethernet phy handling. Hence change the code in a way that it doesn't touch ethernet phys which were early attached and are already handled. Signed-off-by: Mathias Kresin <dev@kresin.me>