aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add support for Buffalo BHR-4GRV2INAGAKI Hiroshi2018-08-095-0/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Buffalo BHR-4GRV2 is a wired router, based on Qualcomm Atheros QCA9558. Ported from ar71xx target. Specification: - Qualcomm Atheros QCA9558 - 64 MB of RAM - 16 MB of Flash - 5x 10/100/1000 Ethernet - QCA8337N - 4x LEDs, 2x keys - UART header on PCB - Vcc, TX, RX, GND from LED side - 115200n8 Flash instruction using factory image: 1. Connect the computer to the LAN port of BHR-4GRV2 2. Connect power cable to BHR-4GRV2 and turn on it 3. Access to "http://192.168.12.1/" and open firmware update page ("ファームウェア更新") 4. Select the OpenWrt factory image and click update ("更新実行") button 5. Wait ~120 seconds to complete flashing Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
* ath79: fix PLL settings for QCA955xDavid Bauer2018-08-093-2/+10
| | | | | | | | | | | | | | This adds PLL settings for the ethernet ports of the TP-Link TL-WR1043 v2/v3 and the Openmesh OM5P-AC-v2. We also change the PLL-settings in the qca9557.dtsi to match the ones used as default on the ar71xx target. As of 4b9680f138 those devices have broken ethernet ports as the default PLL settings defined in the QCA9557.dtsi are applied which are off for those devices. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add pll for archer c7Kevin Darbyshire-Bryant2018-08-091-0/+2
| | | | | | | | | | | | | | | | | | commit 4b9680f fixed pll settings and the correct pll set by bootloader is overrided by value in qca9557.dtsi which is incorrect for Archer C7 and breaks ethernet. Add pll values for archer c7 to fix ethernet connection. This individual pll tweak has been cherry picked from github pr 1260 which changes a couple of things in a single commit and should be ideally split. This commit get archer v7 back and working. Tested: archer c7 v2 Original combined commit authored by: Signed-off-by: Chuanhong Guo <gch981213@gmail.com> c7 fix only split out by: Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
* ath79: fix QCA9557 eth PLL settingsDavid Bauer2018-08-081-1/+7
| | | | | | | | The QCA9557 dtsi is currently missing pll-handle and pll-regs for both eth0 and eth1, therefore PLL settings won't be applied. This commit fixes this behavior. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: don't include tl-wdr3600 image build code for tl-wdr4300Mathias Kresin2018-08-081-1/+3
| | | | | | | | | | Including the tl-wdr3600 image build code just to overwrite most of it doesn't make much sense and only makes it hard to read. Furthermore, the tl-wdr4300 image will be marked as compatible with the tl-wdr3600 this way. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: cleanup netgear wnr612-v2 supported devicesMathias Kresin2018-08-081-1/+1
| | | | | | | The netgear,wnr612-v2 is included by default based on the device define. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: mark netgear variables as device specificMathias Kresin2018-08-081-0/+2
| | | | | | | | The variables are used in image build recipes and need to be marked as per devices vars to be stored individual per image define. Otherwise the last defined variable will be used for all boards. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: Fix led nodes for TL-WR740N v2 and add its clonesChuanhong Guo2018-08-0811-28/+138
| | | | | | | | | | | | | | | | This patch did the following things: 1. Separate ath9k-leds out of gpio leds so that all other leds will work before ath9k loded (e.g. during preinit/init stage). 2. Rename wps led to qss since that's how TP-Link mark it. 3. Rename LED prefix to tp-link because that dts is shared by many devices. 4. Rename to wr740n-v1 because v1 is the first and v2 just use the fw of v1. (This will require a forced sysupgrade if you comes from the previous wr740n v2 image.) 5. Remove SUPPORTED_DEVICES. (tl-wr740n-v2 doesn't exist anywhere so it's useless.) 6. Add all WR741ND v1 clones found in ar71xx. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: fix dts warningsMathias Kresin2018-08-0845-188/+90
| | | | | | | Fix all issues found by the devicetree compiler like wrong address/size cells as well as wrong/missing/superfluous unit addresses. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: fix node namesMathias Kresin2018-08-089-9/+9
| | | | | | Use the standardized node names from the devicetree specification. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: fix compatible stringsMathias Kresin2018-08-085-5/+5
| | | | | | | Use only the jedec,spi-nor compatible string. Everything else either never worked or is only support to keep compatibility. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: fix whitespace issue in dts filesMathias Kresin2018-08-088-24/+24
| | | | | | Fixes spaces vs. tabs issues and remove indentation on blank lines. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: rename tl-archer-c7 to archer-c7Chuanhong Guo2018-08-065-9/+9
| | | | | | | | This router is called Archer C7 and the tl was used to identify TP-LINK. Since we have added tplink in dts/board name, the tl prefix is useless now. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: alphabetical order image/generic.mkChuanhong Guo2018-08-061-9/+9
| | | | | | Move the wzr-hp-g450h in image/generic.mk to keep alphabetical order. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: rename dts/image using manufacturer_board schemeChuanhong Guo2018-08-0636-84/+79
| | | | | | | This helps getting rid of SUPPORTED_DEVICES which can be auto-generated in image/Makefile. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: remove quotes for boardname in scriptsChuanhong Guo2018-08-064-74/+74
| | | | | | Quotes are not required in case statements. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: put all devices in alphabetical order in scriptsChuanhong Guo2018-08-063-51/+38
| | | | | | | And remove specifying lan interfaces as eth1.1 because this is handled by ucidef_add_switch. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: fix support for TL-MR3020 v1Chuanhong Guo2018-08-062-6/+2
| | | | | | | | Change lan and it's LED to eth0 It's broken since c7c807cb8c3fd6538101de885f66d4681785defe where I changed the dts but forgot to change default configurations. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: fix support for TL-WR740N/WR741N v4Chuanhong Guo2018-08-064-5/+5
| | | | | | | | | | | 1. Swap eth0/eth1 Both devices are using AR9331, the builtin switch on AR9331 is connected to gmac1 and gmac1 is named as eth1 in ath79. PS: gmac1 is eth0 and gmac0 is eth1 in ar71xx because of the reversed initialization order. 2. Fix the incorrect compatible string in dts Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: remove useless phy-handle nodesChuanhong Guo2018-08-062-20/+1
| | | | | | | phy-handle is used to poll link status. They are useless when we need fixed-link on these interfaces. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* treewide: convert gpio-export to platform driverRené van Dorst2018-08-041-7/+4
| | | | | | | | | | | | Without this patch you will get an error "gpio-export probe deferral not supported" when you try to export i2c expander gpio pins. gpio-export is probed long before i2c-bus and i2c expander are created and it doesn't retry it so none pins are exported. Signed-off-by: René van Dorst <opensource@vdorst.com> apply the change to all instances of the gpio exports patch Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: really fix TP-Link Archer C7 v2 MAC addressMathias Kresin2018-08-042-2/+1
| | | | | | | | | | | | | | | | | | | | Revert 290c54473ead ("ath79: fix TP-Link Archer C7 v2 wlan1 MAC address") which obviously aims to have a distinct MAC address per interface. Unfortunally it doesn't match what is used by the stock firmware and we shouldn'z use MAC Adresses not reserverd for/assigned to a particular board. The correct MAC adress increments for this board are: wlan0 (5GHz) : -1 wlan1 (2.4GHz) : 0 eth1 (LAN) : 0 eth0 (WAN) : 1 Fixes: FS#408 Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: bump 4.14 to 4.14.60Koen Vandeputte2018-08-031-1/+1
| | | | | | | | | | | | Refreshed all patches Removed upstreamed patches: - 500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch Compile-tested on: cns3xxx, imx6, x86_64 Runtime-tested on: cns3xxx, imx6, x86_64 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: Forward port support for CR3000Daniel F. Dickinson2018-08-014-3/+194
| | | | | | | | | | | | | | | | | | | | | | | | The PowerCloud Systems CR3000 was a cloud-managed CPE for a now defunct NaaS offering. It was previously supported under the ar71xx branch and this forward ports that support with some notable differences: 1) Since reverting to stock firmware is now irrelevant there is is only a single openwrt image generated which uses the entire flash rather than preserving PowerCloud-specific partitions that are unneeded to openwrt-- those partitions will be erased and used by the openwrt image. 2) Rather than use a non-standard probe order for the ethernet devices, this image uses a set of 'ip link set ethX name ethY' commands very early in preinit (before the network is used at all), in order to have the the switch and Wan use the same ethernet names as in previous images. 3) /etc/config/wireless will need to be regenerated as the path to the wireless device has changed due to differences in ath79 DT for ar93x compared to ar71xx images. 4) eth0 is wan and eth1 is lan (switch) Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* kernel: bump 4.14 to 4.14.59Stijn Tintel2018-07-312-32/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop patch that was superseded upstream: ramips/0036-mtd-fix-cfi-cmdset-0002-erase-status-check.patch Drop upstreamed patches: - apm821xx/020-0001-crypto-crypto4xx-remove-bad-list_del.patch - apm821xx/020-0011-crypto-crypto4xx-fix-crypto4xx_build_pdr-crypto4xx_b.patch - ath79/0011-MIPS-ath79-fix-register-address-in-ath79_ddr_wb_flus.patch - brcm63xx/001-4.15-08-bcm63xx_enet-correct-clock-usage.patch - brcm63xx/001-4.15-09-bcm63xx_enet-do-not-write-to-random-DMA-channel-on-B.patch - generic/backport/080-net-convert-sock.sk_wmem_alloc-from-atomic_t-to-refc.patch - generic/pending/170-usb-dwc2-Fix-DMA-alignment-to-start-at-allocated-boun.patch - generic/pending/900-gen_stats-fix-netlink-stats-padding.patch In 4.14.55, a patch was introduced that breaks ext4 images in some cases. The newly introduced patch backport-4.14/500-ext4-fix-check-to-prevent-initializing-reserved-inod.patch addresses this breakage. Fixes the following CVEs: - CVE-2018-10876 - CVE-2018-10877 - CVE-2018-10879 - CVE-2018-10880 - CVE-2018-10881 - CVE-2018-10882 - CVE-2018-10883 Compile-tested: ath79, octeon, x86/64 Runtime-tested: ath79, octeon, x86/64 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ath79: fix irq assignment for pci-ar71xx driverMatt Merhar2018-07-301-3/+7
| | | | | | | | | | | | | | | | | | In the new DT-based pci-ar71xx driver, ar71xx_pci_irq_init() was being called before populating the PCI controller's device_node struct member. This led to no IRQ being assigned to connected PCI devices (e.g. ath9k cards) and caused them to be non-functional aside from simply being detected. The previous errors encountered in dmesg were: "irq: no irq domain found for /ahb/apb/pcie-controller@180c0000 !". /proc/interrupts listed an IRQ of 0 for the cards. While this has been only been tested on a yet-to-be-merged RouterStation Pro target, it should also fix the broken wifi people have reported for the ath79 WNDR3800 target. Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
* ath79: add support for tl-wr841n-v9Lucian Cristian2018-07-305-1/+175
| | | | Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
* ath79: Add switch reset definition in dtsChuanhong Guo2018-07-307-0/+14
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: assert a switch reset if defined in dts.Chuanhong Guo2018-07-301-0/+9
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ar724x: Fix reset definition for gmac0/gmac1Chuanhong Guo2018-07-303-12/+12
| | | | | | reset bit 8 is for builtin switch and bit 12 is marked 'reserved' on datasheet. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ar7240: Update dts for current ag71xx driverChuanhong Guo2018-07-303-26/+20
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: Explicitly register mdio bus after ag71xx_hw_init() for ar7240Chuanhong Guo2018-07-301-0/+8
| | | | | | | | | | mdio bus isn't a standalone device on ar7240. (and maybe older SoCs?) Use simple-mfd for ar7241 and later SoCs to get mdio1 ready before gmac0 For ar7240 and older chips, manually create platform device after ag71xx_hw_init() in ag71xx_probe()to get mdio0 ready between ag71xx_hw_init() and ag71xx_phy_connect(). Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: Rework mdio clock settingsChuanhong Guo2018-07-302-26/+63
| | | | | | | Allow specifying desired mdio clock frequency in dts. Use default frequency around 5MHz for builtin switch and 2MHz for other mdio bus. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ar7242: Update dts for current ag71xx driverChuanhong Guo2018-07-301-2/+16
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ar7241: Update dts for current ag71xx driverChuanhong Guo2018-07-306-44/+23
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: Fix support for TP-LINK Archer C7 v2Chuanhong Guo2018-07-303-46/+41
| | | | | | | | | | | | | | | | Remove mdio1 and phy1 handle. AR8327N is controlled through mdio0. Add gmac-config for Archer C7. Remove ucidef_set_interfaces_lan_wan. They can be determined by config_generate automatically. The following are for adding support for WDR4900 v2/Archer C7 v1 and other devices that shared the same machine file in ar71xx: Move mtd partitions to archer-c7-v2.dts. Only Archer C7 v2 has 16M flash. Flash on Archer C7 v1/TL-WDR4900 v2 is 8M. Add label for wlan leds. The default trigger for archer c7/wdr4900 is different. Move wlan5g led to archer-c7-v2.dts. 5G led on WDR4900 is connected to ar9380. Move rfkill definition to archer-c7-v2.dts. There is no such a button on wdr4900 v2. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: qca955x: Update dts for current ag71xx driverChuanhong Guo2018-07-301-2/+2
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: qca956x: Update dts for current ag71xx driverChuanhong Guo2018-07-302-4/+31
| | | | | | | | enable mdio1 by default because mdio1 node is a subnode of eth1 and eth1 node is a "simple-mfd", which makes mdio1 disabled when eth1 isn't enabled. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: qca953x: Add chosen node and specify console in bootargsChuanhong Guo2018-07-301-0/+4
| | | | | | | Most qca devices use 115200n8 as it's default uart baudrate. Add 'chosen' node for qca953x like other SoCs in ath79 target. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: qca953x: Update dts for current ag71xx driverChuanhong Guo2018-07-302-30/+36
| | | | Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: update qca9533 to new irq driverLucian Cristian2018-07-302-24/+28
| | | | | | | | | | | | | | | | Commit c7efc93 renamed controller name to qca,ar9340-intc and added some functions but qca9533.dtsi was overlooked. Correct the dtsi and adust it to the new format Add gmac and correct reset for cascaded irq and build-in switch Also add the reference clock to soc dtsi so we don't have to have it in every dts Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com> Remove switch reset definition Fix gmac compatible string (We only need SW_PHY_SWAP and SW_PHY_ADDR_SWAP on qca953x so use ar9330-gmac instead of ar9340-gmac.) Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ar933x: Update dts for current ag71xx driverChuanhong Guo2018-07-307-81/+42
| | | | | | | | gmac0 is always connected to switch phy4 and mdio1 is always needed. So add phy handle for eth0 and enable mdio1 by default. Move fixed-link for gmac1 from device dts to ar9331.dtsi because gmac1 is always connected to builtin switch. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ar934x: Update dts for current ag71xx driverChuanhong Guo2018-07-303-4/+42
| | | | | | | | | Enable mdio1 by default because mdio1 is needed when eth1 is enabled. PS: If a ar9341 device has only one port and you only want to use gmac0, change compatible of gmac1 to "syscon", "simple-mfd" in dts. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: Make builtin switch driver a separated moduleChuanhong Guo2018-07-302-68/+84
| | | | | | | | | This patch did several things: 1. Probe the builtin switch as a separated mdio device. 2. Register a separated mdio bus for builtin switch. 3. Use generic mdio read/write function instead of calling ag71xx_mdio_mii_read/write directly. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: Split mdio driver into an independent platform device.Chuanhong Guo2018-07-304-84/+78
| | | | | | | We need to have mdio1 belonging to gmac1 initialized before gmac0. Split it into a separated mdio device to get both mdios ready before probing gmac. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: Remove ar7240_set_addr and ag71xx_ar7240_startChuanhong Guo2018-07-303-29/+1
| | | | | | | | The builtin switch has it's initial valid mac address(00:00:01:00:00:00). Since the builtin switch is an independent device, setting mac address of gmac1 to builtin switch isn't a good idea and this makes it impossilbe to split builtin switch apart as an independent platform device. Remove these functions and apply default VLAN during initialization as a preparation for further driver splitting. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: ag71xx: Split gmac config into separated file and add support for ↵Chuanhong Guo2018-07-305-58/+121
| | | | | | ar934x/qca955x. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: Fix mac reset and gmac compatible in ar934x.dtsiChuanhong Guo2018-07-301-5/+11
| | | | | | | Also add phy-mode and fixed-link as gmac1 is always connected to the builtin switch. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: Port PowerCloud Systems CAP324 supportDaniel F. Dickinson2018-07-305-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CAP324 was an AP for a NaaS offering that is now defunct. While previously supported in the ar71xx arch, there were some errata (to be fixed shortly). Notable differences from ar71xx support: 1) The method of getting the ath9k firmware for the PCIe 2ghz wifi has changed (due to changes in how the arch handles this), since this device doesn't use the EEPROM except to get the MAC address of the wifi. 2) /etc/config/wireless will need to be regenerated as the path(s) to the wireless device(s) have changed. 3) ath79 OpenWrt firmware no longer supports build an image that allows reverting to stock firmware (as the cloud service no longer exists, the stock firmware is useless), instead using all of the flash for image and overlay (less u-boot/env and art). 4) Initial network config treats the ethernet port as a Lan port with the standard default address (192.168.1.1 unless changed in .config --e.g. via menuconfig) instead of using DHCP (this was the default for the stock firmware, however for openwrt use this is rather confusion and counter-productive as the user has a harder time finding the device on the network. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
* ath79: Port PowerCloud Systems CR5000 supportDaniel F. Dickinson2018-07-304-0/+246
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ath79 arch support for PowerCloud Systems CR5000. Previously supported under ar71xx (however there are some errors in that support; to be fixed shortly). Info: * This board is based on the Atheros DB120 reference design, but doesn't use the on-board switch. Instead it attachs GMAC0 to an AR8327 switch. * It only uses GMAC0 and the WAN is simply a VLAN in the stock firmware. * It has 64MB RAM and 8MB flash. * In the dts version we get rid of using 'open-drain' for the AR8327 LED controls. * As with the platform data version we disable JTAG as this conflicts with one of the pair of GPIO's required for the power/status LED (GPIO2 and GPIO4 are used for this LED). * The pcie card wifi has an EEPROM but gets it's MAC address from the ART partition. * The SoC wifi (2.4 GHz) is all from the ART. * The USB is support comes from the SoC. NB. This is actually an AR9342 rather than AR9344 but we use the 9344 definitions because there are no relevant differences for this board. NB: Building only images that don't support reverting to the old cloud-based firmware as the Skydog cloud service for the CR5000 no longer exists. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>