Commit Graph

1597 Commits (c3e420f28cf1ed229753f94bafdb0d5851748af3)

Author SHA1 Message Date
Hauke Mehrtens 657a2457a6 ramips: fix build of target
Makes the patches apply again by fixing the white space broken patch.
This problem was introduced in r49212.

Closes #22248 and #22259

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49221
8 years ago
John Crispin 30fbc1a4d1 ramips: Add support for ZBT WG3526
The WG3526 is the follow-up to the 2626 and is mostly the same, with the
excaption that the mt7602 has been replaced with the mt7603. The internal wifi
setup has also changed slightly. Based on my tests, everything that worked on
the 2626 works on the 3526 and with roughly the same performance.

v1->v2:
* Remove some references to 2626 that I had missed in the dts.

v2->v3:
* Update patch to match new file structure.
* Removed SD driver to be consistent with other MT7621 targets.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>

SVN-Revision: 49213
8 years ago
John Crispin a6c7c0029e ramips: awake rt305x USB controller
Because of Ralink uboot set USB controller into sleep mode [1]
we check it and awake controller before any registers access.
Fix ticket #21396 [2]

[1] http://marc.info/?l=linux-usb&m=137398626102108&w=2
[2] https://dev.openwrt.org/ticket/21396

Signed-Off-By: Serge Vasilugin <vasilugin@yandex.ru>

SVN-Revision: 49212
8 years ago
John Crispin 37b50fdb92 ramips: add support for ELECOM WRH-300CR
ELECOM WRH-300CR is MT7620N based very small Wi-Fi router with 64MiB
DDR2 SDRAM, 16MiB SPI Flash, one fast ethernet port, and (internal but
easy-to-access) UART.

it also has internal USB hub and USB card reader which provide one USB
port, one SD card slot, and one microSD card slot.

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>
Signed-off-by: FUKAUMI Naoki <naobsd@gmail.com>

SVN-Revision: 49211
8 years ago
John Crispin d2654729ac ramips: update DTS file for Planex DB-WRT01
update DTS files to use jedec,spi-nor compatible string for m25p80 to fix probe issues.

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>

SVN-Revision: 49209
8 years ago
John Crispin 890eb0c126 ramips: fix support Planex MZK-750DHP.
fix script for Planex MZK-750DHP.
modification of the GPIO definition.
add Profile.

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>

SVN-Revision: 49205
8 years ago
John Crispin 4a5158bd2a ramips: rt3352 usbphy fix in dts-file
Add missing rt3352 usb phy. Fix ticket #20499.

Signed-Off-By:Serge Vasilugin <vasilugin@yandex.ru>

SVN-Revision: 49204
8 years ago
Hauke Mehrtens f0b3964f1b kernel: update kernel 4.4 to version 4.4.7
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49176
8 years ago
John Crispin 3bf88dc041 ramips: remove accidentally comitted code
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 49161
8 years ago
John Crispin 8b8dfeb027 ramips: Disable the SD driver by default on MT7621
The SD driver has been a long and dragging issue on the MT7621 platforms as it hasn't worked for
months resulting in unbootable devices. Until it's fixed, disable it in the default profiles.

Reports / Discussed here:

https://dev.openwrt.org/ticket/21392
https://dev.openwrt.org/ticket/21834
https://dev.openwrt.org/ticket/21995
https://forum.openwrt.org/viewtopic.php?id=59092

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>

SVN-Revision: 49131
8 years ago
John Crispin 0ffa58009a ramips: Fixes for LinkIt 7688
Misc fixes for LinkIt 7688 board:

- Copy the right wireless firmware for the mt7688
- Add back '0065-mt7688-fixes.patch', left out after the move to Linux 4.4.
- Remove SPI_DEV from linux config which otherwise causes a massive warning
- Add wmac to LINKIT7688.dts so wireless works

Signed-off-by: Adam Kent <adam@semicircular.net>

SVN-Revision: 49130
8 years ago
John Crispin 3ad1820e83 ramips: Adjust image size limit for the D-Link DIR-860L B1
Currently the maximum image size defaults to 8Mbyte even though this model has 16Mbyte of flash memory.

Tested and works on my device.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>

SVN-Revision: 49129
8 years ago
John Crispin 1eb8b0674d ramips: fix for Planex MZK-WDPR (lcd control gpio).
add lcd control gpio pin for Planex MZK-WDPR.
LCD board initial timming is GPIO control.

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>

SVN-Revision: 49128
8 years ago
John Crispin e626a0d877 ramips: mt7621: fix Ubiquiti EdgeRouter X profile
Remove unnecessary packages to reduce image size so it fits in initramfs (to enable upgrading from factory firmware).

Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 49127
8 years ago
John Crispin 37f1022d73 ramips: mt7621: sync MQmaker WiTi profile name to dts name
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 49126
8 years ago
John Crispin 14177319ea ramips: enable device profiling by dts
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 49125
8 years ago
John Crispin 133f890a12 ramips: mt7621: add a device to TARGET_DEVICES after it's definition
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 49124
8 years ago
John Crispin a9466914f5 ramips: mt7621: fix initramfs image for ubnt-erx
Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 49123
8 years ago
John Crispin 79d02229cc ramips: move different subtarget image generation to separate makefiles to improve maintainability
- all subtarget specific defines are in their own files
- common defines left in main Makefile
- each subtarget makefile idefed with SUBTARGET
- all subtargets compile tested
- few seems to be broken/unneeded things marked with FIXME

Signed-off-by: Roman Yeryomin <roman@advem.lv>

SVN-Revision: 49104
8 years ago
Gabor Juhos fc5c19f45b ramips: lzma-loader: fix O32 ABI conformance
According to the calling convention of the o32 ABI the
caller function must reserve stack space for $a0-$a3
registers in case the callee needs to save its arguments.

The assembly startup code does not reserve stack space
for these registers thus when the main C function needs
to save its arguments, that will cause a stack overflow.

Fix the assembly code to reserve stack space for the
registers to avoid that.

Untested. It seems that the lzma-loader is not used at all?

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

SVN-Revision: 49062
8 years ago
John Crispin cc82da0bc1 ramips: MiWifi-Nano - change gpios to leds, add to default build group
1) Use leds to indicate:
Red - Power
Amber - Radio On
Blue - Wifi associated
2) Add profile to default build group for MT7628 subtarget

Signed-off-by: Noble Pepper <openwrtmail@noblepepper.com>

SVN-Revision: 49045
8 years ago
John Crispin 99414dbcf1 ramips: Add support for Xiaomi MiWiFi Nano
Xiaomi MiWiFi Nano is based on Mediatek MT7628 with 64MB ram 16MB flash

Signed-off-by: Noble Pepper <openwrtmail@noblepepper.com>

v3  includes changes suggested by L. D. Pinney & Karl Palsson-
Eliminate en25q64 (4MB) flash chip
Alphabetization
Remove hyphen in model
Rename profile from miwifinano.mk to xiaomi.mk
Add gpios that are attached to leds

SVN-Revision: 49024
8 years ago
John Crispin be79629259 ramips: Add support for GL-MT750
This patch adds support for GL-MT750.
GL-MT750 is powered by MT7620A and MT7610e, dual band 802.11ac, 2.4G 300Mbps and 5G 450Mbps.
It has 5 LANs, MMC interface, USB, a lot of IOs and PoE support.

SVN-Revision: 48994
8 years ago
John Crispin be53e5a154 ramips: Add support for GL-MT300N
This patch adds support for GL-MT300N.
GL-MT300N is powered by MT7620N with 16MB flash, 64MB RAM,
2 LANs, USB, UART, GPIO and PoE support.

SVN-Revision: 48993
8 years ago
John Crispin 96ee39b184 ramips: Add support for GL-MT300A
This patches adds support for GL-MT300A.
GL-MT300A is powered by MT7620A. It has 16MB flash, 128MB RAM,
Two LANs, USB, UART and MMC daughter board.

SVN-Revision: 48992
8 years ago
John Crispin 1b9985cfe2 ramips: add support for Planex MZK-WDPR.
add support for Planex MZK-WDPR.
MZK-WDPR(MZK-WDPR-R01) is internet radio tuner.
This patch is "network board" in MZK-WDPR.
LCD board is non OpenWrt Platform.

Signed-off-by: YuheiOKAWA <tochiro.srchack@gmail.com>

SVN-Revision: 48968
8 years ago
Felix Fietkau 3abf5ce656 ramips: convert the remaining subtargets to 4.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48954
8 years ago
Felix Fietkau f73d8fb81b ramips: fix subtarget kernel version assignment (only mt7621 is ready for now)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48953
8 years ago
Felix Fietkau d041e8b44b ramips: add linux 4.4 support, update mt7621 subtarget to 4.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48951
8 years ago
John Crispin 77da9390da ramips: mt7621: fix WF-2881 for ubi split
This patch fix firmware split for WF-2881 which was previously manually partitioned.

Signed-off-by: YounJae Rho <luxflow@live.com>

SVN-Revision: 48908
8 years ago
John Crispin 9d828931f1 ramips: Add profiles for JCG routers
This patch adds profiles and support for building factory and
sysupgrade images for JHR-N805R, JHR-N825R and JHR-N926R.

Signed-off-by: Reinhard Max <reinhard@m4x.de>
Reviewed-by: Torsten Duwe <duwe@lst.de>

SVN-Revision: 48906
8 years ago
John Crispin 43dd2b9965 ramips: Add JCG routers to base-files
This patch adds support for JHR-N805R, JHR-N825R and JHR-N926R to
various scripts in the base-files directory.

Signed-off-by: Reinhard Max <reinhard@m4x.de>
Reviewed-by: Torsten Duwe <duwe@lst.de>

SVN-Revision: 48905
8 years ago
John Crispin ca64f498f0 ramips: Add device tree for JCG JHR-N926R
Add a device tree for JCG JHR-N825R

This router is based on a RT3052 and has 4MB of CFI flash and 32MB of
SDRAM. As a special feature, it comes with a two digit seven segment
display that is connected to a pair of daisy-chained 74164 shift
registers that can be controlled via GPIOs.

For details, see https://wikidevi.com/wiki/JCG_JHR-N825R .

Signed-off-by: Reinhard Max <reinhard@m4x.de>
Reviewed-by: Torsten Duwe <duwe@lst.de>

SVN-Revision: 48904
8 years ago
John Crispin 97ca4cbc94 ramips: Add device tree for JCG JHR-N825R
Add a device tree for JCG JHR-N825R

This router is based on a RT3052 and has 4MB of CFI flash and 32MB of
SDRAM. For details, see https://wikidevi.com/wiki/JCG_JHR-N825R .

Signed-off-by: Reinhard Max <reinhard@m4x.de>
Reviewed-by: Torsten Duwe <duwe@lst.de>

SVN-Revision: 48903
8 years ago
John Crispin 73f4c3f2ab ramips: Add device tree for JCG JHR-N805R
Add a device tree for JCG JHR-N805R

This router is based on a RT3050 and has 4MB of SPI flash and 16MB of
SDRAM. For details, see https://wikidevi.com/wiki/JCG_JHR-N805R .

Signed-off-by: Reinhard Max <reinhard@m4x.de>
Reviewed-by: Torsten Duwe <duwe@lst.de>

SVN-Revision: 48902
8 years ago
John Crispin e4dc6acd31 ramips: Incorrect file mode change
Commit d0f5ab6d95a1 ("ramips: Added support for ZBT-826 / ZBT-1026")
incorrectly changed the mode of the ramips shell scripts from 755 to 644.
I.e., they are not excutable any more and for example devices will be left
with broken configs.

Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com>

SVN-Revision: 48893
8 years ago
Felix Fietkau 15517811e4 ramips: enable mt76 on mt7688 by default
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48886
8 years ago
John Crispin 96eb5c6fa8 ramips: Added support for ZBT-826 / ZBT-1026
Support for these MT7620-based routers: https://wiki.openwrt.org/toh/zbt/we-826
Based on Oskari’s patches found here: https://dev.openwrt.org/ticket/19996

Signed-off-by: Jamie Stuart <jamie@onebillion.org>

SVN-Revision: 48865
8 years ago
Felix Fietkau 28458bd057 ramips: add sysupgrade support for mt7628
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48813
8 years ago
Felix Fietkau dc6533d982 ramips: create device tree node for MT7628 WMAC in preparation for future work on driver support in mt76
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48812
8 years ago
John Crispin f998540e80 ramips: fix GPIO names for RT5350F-OLinuXino-EVB
Hi,

the board in subject (RT5350F-OLinuXino-EVB) still ships from vendor
with a RC3 image built upon a .dts file which declares GPIO12 and GPIO14
as relay2 and relay1 respectively, as you can see from their rt5350f
branch on GitHub.

For some reason in the official stable build both the GPIOs are swapped
and the wrong names are declared in the gpio-export directive.

I'm submitting this patch which should roll back the wrong changes, so
that we get backward compatibility with any script developed on RC3
which controls the relays.

After patching correct operation is restored:

root@OpenWrt:/# cat /sys/kernel/debug/gpio
GPIOs 0-21, platform/10000600.gpio, 10000600.gpio:
 gpio-0   (button              ) in  hi
 gpio-12  (relay2              ) out lo
 gpio-14  (relay1              ) out lo

Thank you,

Signed-off-by: Lorenzo Cafaro <lorenzo@ibisco.net>

SVN-Revision: 48796
8 years ago
John Crispin 074cc7ac38 ramips: mt7620: fix failsafe switch config
As indicated in the bug tracker[1], failsafe mode is broken on at least some
devices using the mt7620 switch (and possibly mt7621). The thread explicitly
mentions the Xiaomi MiWifi, and the Nexx WT3020, and an unspecified device
using the mt7621 switch; the issue also applies to the Netgear EX2700.

The problem is that failsafe mode uses eth0, but enable_vlan is always set to 1
by the switch driver. Connecting to and/or pinging the device fails. This patch
fixes the failsafe preinit config, by making sure that vlan support is disabled.
It currently only fixes the switch config on mt7620, but might apply to the
mt7621 as well, so the patch has been designed with this in mind.

A similar (line wrapped) patch was submitted in December by Simon Peter, but never
accepted and/or discussed.

This patch applies to both Chaos Calmer and trunk.

[1] https://dev.openwrt.org/ticket/18768

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>

SVN-Revision: 48772
8 years ago
John Crispin cb49742f99 ramips: build factory images for Netgear EX2700
This patch adds support for building factory and sysupgrade images
for the Netgear EX2700 that don't require modification of u-boot
environment variables.

The bootloader on this device expects the kernel partition to end
on a 64k block boundary. The last 64 byte of the kernel partition
must contain a valid uImage header - in the stock firmware, this is
the uImage header of the root filesystem. For this patch, we're using
the uImage header of a 0 byte partition (ex2700-fakeroot.uImage).

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>

SVN-Revision: 48771
8 years ago
Felix Fietkau 0ec9253b9d ramips: fix WSR-1166 partition table
- Fix typo in board_data partition start address
- Increase board_data partition size in order to exploit all flash size

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>

SVN-Revision: 48751
8 years ago
John Crispin fc47eb0794 ralink: fix mt7628 ehci support
the u2_phy init was missing

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48747
8 years ago
John Crispin 1e218001b5 ralink: unbreak port4 on mt7620
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48746
8 years ago
John Crispin 8b38a9450b ramips: Add support for Phicomm PSG1208
This patch adds support for Phicomm PSG1208.This is a router with MT7620A SoC with 8M flash and 64M ram.
The WPS led is uesd as status_led because the power light can't be controlled with GPIO.
It seems that the 5g wifi led is connected to MT7612E and it can't be controlled with GPIO too.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>

SVN-Revision: 48721
8 years ago
John Crispin ba53b33453 ramips: Support LEDs on D-Link DIR-860L B1
Adds the required gpio definitions.

Signed-off-by: Johannes Wienke <languitar@semipol.de>

SVN-Revision: 48715
8 years ago
John Crispin 9f9682a79b ramips: Add support for Netgear EX2700
This patch adds support for the Netgear EX2700 and builds an approriate
sysupgrade image.

What's missing is the option to build a factory image flashable via the
router's stock web interface, but this approach is hindered by the fact
that u-boot operforms an additional integrity check, which expects a
uImage header in the last 64 bytes of the "kernel" partition, which
the bootloader expects to be 960k, a size exceeded by the standard
OpenWrt kernel.

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>

SVN-Revision: 48698
8 years ago
Felix Fietkau 6b73b7a8ec ramips: fix build error on oversized images by putting the dir-860l-b1 size check at the end of the chain
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48681
8 years ago
John Crispin 6801c4e33e ramips: HLK-RM04 - Enable GPIO14 for WPS button
The top half of UARTF on the HLK-RM04 is used for GPIO.

  mode 1   mode 2
   RIN     GPIO14
   DSR_N   GPIO13
   DCD_N   GPIO12
   DTR_N   GPIO11
   RXD     GPIO10
   CTS_N   GPIO09
   TXD     GPIO08
   RTS_N   GPIO07

This patch applies 3'b101 mode to UARTF:

   GPIO14
   GPIO13
   GPIO12
   GPIO11
   RXD
   CTS_N
   TXD
   RTS_N

Because the base rt5350.dtsi file forces 3'b000 mode, remove the pin setting from this file and apply it directly to the files that inherit from it (WIZFI630A.dts and WT1520.dtsi).  This change makes the rt5350.dtsi file consistent with the mt7620a.dtsi file.

Signed-off-by: John Clark <inindev@gmail.com>

SVN-Revision: 48665
8 years ago
John Crispin 7f672e66f8 rampis: HLK-RM04 - Setup I2C as GPIO
The I2C function of the RT5350 SoC on the HLK-RM04 is used for GPIO1 and GPIO2.

Take note that the I2C_SD pin is GPIO1 on the RT5350 and is exposed on the HLK-RM04 as GPIO0
Likewise the I2C_SCLK pin is GPIO2 on the RT5350 and is exposed on the HLK-RM04 as GPIO1

 group   mode 1    mode 2   hlk-rm04 pin & export
  i2c    i2c_sd    gpio1   (pin 8, hlk-rm04:gpio0)
  i2c    i2c_sclk  gpio2   (pin 9, hlk-rm04:gpio1)

reference:
  http://www.hlktech.net/product_detail.php?ProId=39
  http://cdn.sparkfun.com/datasheets/Wireless/WiFi/RT5350.pdf

Signed-off-by: John Clark <inindev@gmail.com>

SVN-Revision: 48664
8 years ago
John Crispin 480e15f2ce ramips: HLK-RM04 - Fix push button functions
The RESET button of the HLK-RM04 is connected to GPIO0, linux function 0x198
The WPS button of the HLK-RM04 is connected to GPIO14, linux function 0x211

Signed-off-by: John Clark <inindev@gmail.com>

SVN-Revision: 48663
8 years ago
John Crispin 1f26091242 ramips: HLK-RM04 - Remove power LED config
The power LED on the HLK-RM04 is hard wired to the power bus and is not under GPIO control, remove the bogus config for it.
(Note that GPIO0 is actually connected to the RESET button.)

Signed-off-by: John Clark <inindev@gmail.com>

SVN-Revision: 48662
8 years ago
Felix Fietkau afdb24e3ae ramips: add IMAGE_SIZE to DEVICE_VARS, it is used by build templates
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48611
8 years ago
Felix Fietkau 705ddc9bb9 ramips: make tp-link firmware size errors non-fatal
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48526
8 years ago
Felix Fietkau 81e8e02289 ramips: fix image size checks for Buffalo WSR-1166 and WSR-600
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48508
9 years ago
Hauke Mehrtens a29c7ca3d9 kernel: update kernel 4.3 to version 4.3.4
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48498
9 years ago
Felix Fietkau 57776e68ce base-files: remove default /etc/config/network, generate it via board.d instead
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48493
9 years ago
Felix Fietkau 6f8d647778 ramips: re-enable highmem support for MT7621 now that it's fixed
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48469
9 years ago
John Crispin f51f92d7e9 ramips: fix serial baudrate for final version of ZBT-WG2626 board
The bootloader was updated and now uses 115200 instead of 57600 baud
for the serial console. Change this also in OpenWrt's DTS, so the rate
is consistent for bootloader and linux kernel output.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 48359
9 years ago
John Crispin 9f7bbc649c ramips: HiLink HLK-RM04 image name typo (RM02 -> RM04)
The image name for the HiLink HLK-RM04 module has a typo and should read "RM04" rather than "RM02"

Signed-off-by: John Clark <inindev@gmail.com>

SVN-Revision: 48355
9 years ago
Felix Fietkau 3c3fb1dfc0 ramips: delete the broken sound driver
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48318
9 years ago
Felix Fietkau 63aa7023d8 ramips: mark kmod-sound-mtk as broken, it does not compile properly
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48317
9 years ago
Felix Fietkau fa61e3fbba ramips: fix kernel config handling for mt7620/mt7628 sound module
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48316
9 years ago
Hauke Mehrtens cdb83aaf5f kernel/4.3: update to version 4.3.3
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de

SVN-Revision: 48224
9 years ago
Felix Fietkau 471a567a88 ramips: do not rely on $(BIN_DIR) installed files during image build (for ubnt-erx)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48147
9 years ago
Felix Fietkau 2499a57d92 targets: add kernel image dependencies on device tree files
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48146
9 years ago
Felix Fietkau 947eac1803 ramips: do not attempt to build ubnt-erx initramfs image if initramfs support is disabled
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48144
9 years ago
Felix Fietkau 56608a777e ramips: fix duplicate /dts-v1/ line for WRTNODE2
Signed-off-by: Noble Pepper <openwrtmail@noblepepper.com>

SVN-Revision: 48138
9 years ago
Felix Fietkau 48a57b1ead ramips: set mips16 support
Signed-off-by: Cristian Morales Vega <cristian@samknows.com>

SVN-Revision: 48131
9 years ago
John Crispin e85230ce2e ralink: add a few mt7688 fixes that got lost in the v4.3 bump
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48115
9 years ago
John Crispin eb9fccc440 ralink: update the usb phy driver to the version sent upstream
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48114
9 years ago
John Crispin 9b675a2a33 ralink: fix USB compatible strings
switch to the upstream compatible strings for ehci and ohci support.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48113
9 years ago
Felix Fietkau c69ffda546 ramips: clean up and refresh kernel patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48070
9 years ago
Felix Fietkau 140be9f1a5 ramips: fix performance counters on mt7621
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48069
9 years ago
John Crispin fb2d204ce4 ralink: more esw_rt3050 fixes
the IRQ was not setup properly causing an oops

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48064
9 years ago
John Crispin 6ca6a98622 ramips: Remove LED GPIO definitions in MQmaker WiTi device tree
LED's were defined wrong in the device tree file, they are hardware driven because they are connected directly to the switch chip and wireless chips respectively, thus no GPIO addresses are assigned to them. It is safe to remove them from the device tree file to stop confusion.

Signed-off-by: Sebastian Careba <nitroshift@yahoo.com>

SVN-Revision: 48055
9 years ago
John Crispin de7dce21a3 ralink: add WRTnode2 platform and led support
Signed-off-by: xzmu <xzmu@wrtnode.com>

SVN-Revision: 48049
9 years ago
John Crispin 6b95386fd3 ralink: fix rt3050/5350 ethernet switch support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 48030
9 years ago
Felix Fietkau c55d8d4253 ramips: set the wifi mac address to the same as LAN on witi
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48029
9 years ago
Felix Fietkau eaf8889cf8 ramips: add a script to fix up the broken mac address on the witi board
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48027
9 years ago
Felix Fietkau 46519964ff kernel: fold of_get_mac_address_mtd into of_get_mac_address
This makes it easier to keep drivers in sync with upstream

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48026
9 years ago
Felix Fietkau 22693a9086 ramips: fix kernel configuration for mt7628
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48025
9 years ago
Felix Fietkau f3bbb73a20 ramips: add missing clk_round_rate function to fix buildbot errors
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48024
9 years ago
Felix Fietkau 28ec4e0e71 ramips: fix inverted LEDs for RE6500
Signed-off-by: Bjoern Dobe <bjoern@dobecom.de>

SVN-Revision: 48022
9 years ago
Felix Fietkau 2c4faaed74 ramips: add mac address assignment for eth0 on RE6500
Signed-off-by: Bjoern Dobe <bjoern@dobecom.de>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48021
9 years ago
Felix Fietkau d65eda48b7 ramips: fix firmware partition size
Signed-off-by: Bjoern Dobe <bjoern@dobecom.de>

SVN-Revision: 48020
9 years ago
Felix Fietkau 11c697015f ramips: fix memory size for RE6500
Signed-off-by: Bjoern Dobe <bjoern@dobecom.de>

SVN-Revision: 48019
9 years ago
Felix Fietkau 3e807886d0 ramips: disable NAND device in mt7621.dtsi to fix boot errors on many devices
Enable it from .dts files that need it, also remove redundant properties

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47936
9 years ago
Felix Fietkau 32877b31dc ramips: update DTS files to use jedec,spi-nor compatible string for m25p80 to fix probe issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47935
9 years ago
John Crispin 4afe0fc2b2 ralink: update the mt7621 ethernet support patch
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47929
9 years ago
John Crispin 7de7bd0201 ramips: mt7621: fix error message when initramfs is too large
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47908
9 years ago
John Crispin 1c5136c4c3 ramips: remove unwanted change from patch
Remove unwanted change to irq-mips-gic.c from mt7621 support patch

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47907
9 years ago
John Crispin 43422a634b ramips: change CM_GCR_BASE_CMDEFTGT_MEM value to match datasheet
Zero config value for default memory region means 'memory', not
not 'disabled' according to 'Control Registers Of The Coherency
Manager' manual.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47906
9 years ago
John Crispin acbed0eff3 ramips: mt7621: undo mips-cm probe hack to not wipe out memory regions
Since now we hopefully setup memory regions properly we no longer need this hack.

Tested and works on ubnt-erx.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47905
9 years ago
John Crispin 622e268710 ramips: mt7621: setup memory region for pcie controller memory
Only compile tested since I do not have any hardware with
devices on pcie bus.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47904
9 years ago
John Crispin e8890c6be0 ramips: mt7621: add patch to setup CM memory region for palmbus
This is tested and works on ubnt-erx.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47903
9 years ago
John Crispin b4bb10b3a0 ralink: update config files to build the cleaned up ethernet driver
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47902
9 years ago
John Crispin 402db12f1a ralink: drop dummy profile from mt7688
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47901
9 years ago
John Crispin 651e620de5 ralink: fixup devicetree files to work with new ethernet driver
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47900
9 years ago
John Crispin fa854a02a1 ralink: drop old ethernet driver
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47899
9 years ago
John Crispin 31116661ff ralink: add reworked ethernet driver
update to the version of the driver that is on its way upstream

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47898
9 years ago
John Crispin 5d4f5689fd ramips: add missing kernel symbols
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47884
9 years ago
John Crispin 4e31b2e869 ramips: add support for Ubiquiti EdgeRouter X (UBNT-ERX)
This router is based on MT7621 SoC, no wifi, no usb, nand.

Works:
* Boots.
* Ethernet.
* Switch.
* Button (reset).
* Flashing OpenWrt from stock firmware.
* Upgrading OpenWrt.

Doesn't work:
* No GPIO leds. All leds are controlled by switch,
  but stock firmware was able to control them.
* SoC has crypto engine but no open driver.
* SoC has nat acceleration, but no open driver.
* This router has 2MB spi flash soldered in but MT
  nand/spi drivers do not support pin sharing,
  so it is not accessable and disabled. Stock
  firmware could read it and it was empty.
* PoE out.

Router has serial pins populated. If looking at the top
of the router, then counting from Eth sockets pins go as:
'GND, RX, TX, GND'. 3.3v, 57600.

U-boot bootloader supports tftpboot, controlled from serial.
This router has two kernel partitions: 'live' and 'backup'.
They are swapped during flashing (on both stock and OpenWrt).
Active partition is controlled by a flag in a factory partition.
U-boot has custom command to switch active kernel partition.
Kernel partitions are 'bare flash' 3MB. Stock bootloader has
no UBI support. Stock rootfs is UBIFS.

Flashing procedure.
Stock firmware uses custom kernel patch to mount squashfs
from a file that is located on UBIFS volume. This makes wiping
out this volume from within stock firmware difficult.
Instead this patch builds image that is flashable by stock firmware
and contains initrams image (with minimal set of packages
to fit into kernel partition). Once this is flashed one can reboot
into initramfs OpenWrt and use sysupgrade to flash OpenWrt including
rootfs into nand.
Note: factory image is only built if initramfs image is enabled.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47881
9 years ago
John Crispin 1c6c9549d6 ramips: add support for Spansion S34ML0[24]G2 flash
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47880
9 years ago
John Crispin 9e5044926b ralink: remove stray "+" from ethernet driver
this is what you get if you manually apply patches with c&p

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47877
9 years ago
John Crispin 8470e30a76 ramips: move partition definitions out of mt7621.dtsi file
Partitions defined in parent dtsi cannot be undefined in children.
This moves partitions defined in mt7621.dtsi into board's device tree.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47876
9 years ago
John Crispin e610cdfc8a ramips: use gic timer as clocksource for mt7621
* Switches clocksource to gic timer.
* Moves frequency definitions to dtsi since frequency was hardcoded anyway
  Will work on proper frequency detection later.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47875
9 years ago
Felix Fietkau 77bedbe80d Revert "ramips: use gic timer as clocksource for mt7621"
This reverts commit 270a2afcc544ca14e79198346e7e186033472ae7.

SVN-Revision: 47872
9 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
John Crispin 9f14006809 ramips: add additional support for MQmaker WiTi board
The board is based on mt7621AT cpu, and has 16mb nor flash, 256mb of ram,
2 sata ports, microsd card slot, 1 USB 3.0 port and at least one 2.4 and
one 5 ghz antenna.

This is the 6th submission that adds support for XHCI in the device tree
file, along with switching the location of the 2 radio's and addition of
the kmod-i2c-mt7621 in the default packages of the profile.

Signed-off-by: Sebastian Careba <nitroshift@yahoo.com>

SVN-Revision: 47845
9 years ago
John Crispin 6cbb1be464 ramips: Fix support for PBR-M1 board
The PBR-M1 support in current OpenWrt is for the early demo board and it doesn't work on the final board.This patch fixes the support for it.

The LED called pbr-m1:buzzer is a beeper connected to GPIO26 so I used gpio-beeper instead of gpio-leds.

Signed-off-by: 郭传鈜 <gch981213@gmail.com>

SVN-Revision: 47844
9 years ago
John Crispin abd11be13c ramips: use gic timer as clocksource for mt7621
* Switches clocksource to gic timer.
* Moves frequency definitions to dtsi since frequency was hardcoded anyway
  Will work on proper frequency detection later.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47843
9 years ago
John Crispin a87272ebfb ramips: enable CPS for mt7621
Enables CPS multiprocessing instead ob obsoleted CMP for mt7621.

This patch fixes a few issues currently existing on 4.3 kernel with at least ubnt-erx:
* iperf shows only 50Mbits on direct gigabit connection to desktop,
* ping times jump to 5-6ms to dorectly connected desktop
* /proc/interrupts shows spurious interrups (ERR)

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47842
9 years ago
John Crispin fbc1624d6a ramips: irq handlers do not get irq in 4.3 kernel, update patches
This resolves compilation warnings like this:
drivers/gpio/gpio-mt7621.c: In function 'mediatek_gpio_probe':
drivers/gpio/gpio-mt7621.c:328:46: warning: passing argument 2 of 'irq_set_chained_handler' from incompatible pointer type [-Wincompatible-pointer-types]
   irq_set_chained_handler(mediatek_gpio_irq, mediatek_gpio_irq_handler);

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47841
9 years ago
John Crispin 4076d12f41 ramips: Fix CM_GCR_CPC_BASE_CPCBASE_{MSK, SHF} values
Update CM_GCR_CPC_BASE_CPCBASE_{MSK,SHF} to match datasheet

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47840
9 years ago
John Crispin e4ee2402cb ramips: fold gic patch into mt7621 support patch
All gic patch was doing is removing code added by mt7621 support patch.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47839
9 years ago
John Crispin ed8775d3c3 ramips: backport series of patches that ensure GCRs of other CPUs are accessed properly
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47838
9 years ago
John Crispin e0d77e68ce ramips: backport batch fixing illegal instruction when booting secodnary CPUs in CPS mode
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47837
9 years ago
John Crispin 81c999bbda ramips: mt7621: use symbolic names of gic interrupt settings
This also adds dts nodes for cpc and mc for documentation purposes

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47836
9 years ago
John Crispin 6df4426245 ralink: bump to the target to v4.3
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47831
9 years ago
Felix Fietkau 09335a0a2f build: fix arch used during dts compilation
Use kernel arch for dts compilation.
Also use Image/BuildDTB to build dts for ramips.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

SVN-Revision: 47823
9 years ago
Jo-Philipp Wich 527ec2af59 all: remove dummy ucidef_set_interface_loopback() from board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47744
9 years ago
Jo-Philipp Wich 8f8b702f85 board.d: remove redundant ucidef_set_interfaces_lan_wan() calls
This removes calls to ucidef_set_interfaces_lan_wan() and
ucidef_set_interfaces_lan() on boards where all relevant info can be
inferred from the switch definition.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47722
9 years ago
Jo-Philipp Wich 9b02e73188 board.d: merge ucidef_add_switch() and ucidef_add_switch_ports()
This changes uci-defaults-new.sh, config_generate and all relevant board.d
files in order combine ucidef_add_switch() and ucidef_add_switch_ports() into
a single function.

Also removes now superfluous enable and reset arguments.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47721
9 years ago
Jo-Philipp Wich d17a64c7c0 base-files: uci-defaults-new: remove reset/enable args of ucidef_add_switch()
Out of 69 switch definitions, only 3 pass something different than "1" as
values for reset and enable, with one of those three being invalid.

This change ...

 * removes the reset and enable arguments from ucidef_add_switch()
 * unconditionally writes reset:1 and enable:1 to JSON
 * converts the three users of nonstandard values to ucidef_add_switch_attr()

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47720
9 years ago
Jo-Philipp Wich de51026515 ramips: switch ucidef_add_switch_vlan() to ucidef_add_switch_ports()
This migrates the final board.d user of ucidef_add_switch_vlan() to the new
ucidef_add_switch_ports() approach, fixing some logic errors for a few boards
along the way.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47717
9 years ago
John Crispin 06af966094 ramips: remove duplicate patch
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47670
9 years ago
John Crispin 82557aee85 ramips: adapt VoCore to new second spi device code
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 47667
9 years ago
John Crispin af14fa011c ramips: add second SPI clocks
These clocks were missing in the changes introduced in r47573-47580

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 47666
9 years ago
Jo-Philipp Wich ecf5b4fab7 ramips: hg255d: replace ucidef_set_led_interface() with ucidef_set_led_netdev()
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47657
9 years ago
John Crispin 7b4acdeff6 ralink: renable nand support
CONFIG_MTK_MTD_NAND was incorrectly disabled by r47619.

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47640
9 years ago
Felix Fietkau d8a62fdbc2 ramips: fix typo in image makefile (#18712)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47627
9 years ago
John Crispin 8c1f5141ce ralink: add support for netis WF-2881
netis WF-2881 is an MT7621AT based router with MT7602EN, MT7612EN.
It has 128MB DDR3, 128MB SLC NAND FLASH, 5-port Gbps switch and 1x USB 3.0.
The following patch adds support for this device.

this device only works on top of UBI.

Tested and working:
* ethernet
* both WiFi radios
* USB 3.0
* buttons (reset button)
* ethernet switch and USB diag LEDs
* UART
* GPIOs
* sysupgrade

Tested and not working
* failsafe

Signed-off-by: YounJae Rho <luxflow@live.com>

SVN-Revision: 47619
9 years ago
John Crispin e9baf8265b ramips: add support for Youku YK1
Changes since V1:
I resend this patch for current trunk.The former V1 patch is for CC branch.

Signed-off-by: Shonn Lu <countrysideboy@qq.com>

SVN-Revision: 47617
9 years ago
John Crispin 12b6f4cf71 ramips: add second spi master sysclk
for mt7620, rt3883 and rt5350

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47616
9 years ago
John Crispin c550ad3d3a ramips: update dtsi files to support second spi device
Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47580
9 years ago
John Crispin a941b34008 ramips: use transfer_one instead of transfer_one_message on rt2880 spi
* use kernel buildin transfer_one_message. we only need to implement
transfer_one and set_cs function
* should support use gpio as cs pin
* deselected the spi device when setup and add debug info
* only reset device when first driver probe

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47579
9 years ago
John Crispin 95aa28da81 ramips: move rt2880 spi clock and reset init code to spi_prepare_message
before spi transfer. use spi_prepare_message to setup spi hardware. it
will setup MSB, spi mode and speed
remove sys_freq member and speed check code

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47578
9 years ago
John Crispin a58dec6275 ramips: improve rt2880 spi setup
* check clock rate, SPI mode, and word sizes
* setup spi polarity
* enable spi1 hw if need

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47577
9 years ago
John Crispin 2ce886f149 ramips: clean up rt2880 spi probe/remove
* fill struct according to the member order
* add error clean up
* set min/max spi speed. so we don't need to check again

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47576
9 years ago
John Crispin bf89d139e1 ramips: improve rt2880 spi wait ready function
use loops_per_jiffy, spi clock speed and write bytes to get the
spi loop count. if loop to 0 than spi operation timeout.
remove usleep. we only write 1 byte to spi device. use busy loop
would be better.

Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47575
9 years ago
John Crispin 702c480dfe ramips: remove rt2880 spi lock and clean bit operation
Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47574
9 years ago
John Crispin 13fbd6fea7 ramips: add rt2880/mt7620 spi register defines
Signed-off-by: Michael Lee <igvtee@gmail.com>

SVN-Revision: 47573
9 years ago
John Crispin 55ee2e0ef7 ralink: add missing nand layer hack
It turned out that mtk_nand driver uses some sophisticated accounting and a
general nand code must be patched.

This patch adds required read and erase calls to a general nand code. I
used a  code  for re6500 released by Linksys as a reference.

All required operations (erase, write and read) are usable. However I found
that jffs2 filesystem can be created only on top of a ubi volume. I tried
to create jffs2 directly on mtd device but pages with clean markers are
became uncorrectable.

Signed-off-by: Kirill Berezin <fyiwdt@gmail.com>

SVN-Revision: 47565
9 years ago
John Crispin 40ddc71cc9 ramips: init usb power for Lenovo Y1S
Signed-off-by: Shonn Lu <countrysideboy@qq.com>

SVN-Revision: 47557
9 years ago
Felix Fietkau b95aed986a ramips: minor fixes for mt7621 profiles
* remove references to non-existing kmod-usb3-mt7621
 * ZTB WG2626 doesn't have an RTC (thanks to Piotr Dymacz!)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>

SVN-Revision: 47407
9 years ago
John Crispin aebf73f045 ramips: fix previous commit
r47388 accidentially changed 2 files too many

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47389
9 years ago
John Crispin dc699dd547 ramips: minor tweak to the lks7688 baord name
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 47388
9 years ago