aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx/files
Commit message (Collapse)AuthorAgeFilesLines
...
* ipq40xx: glinet-b1300: fix LAN and WAN MAC address assigmentsPetr Štetiar2022-10-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When testing the DSA changes with 5.15.60 kernel, I've noticed, that the MAC addresses are not properly configured, there is single MAC being used for LAN and WAN interfaces: eth0: 94:83:c4:XX:YY:4a (MAC on sticker) lan1@eth0: 94:83:c4:XX:YY:4a lan2@eth0: 94:83:c4:XX:YY:4a wan@eth0: 94:83:c4:XX:YY:4a wlan0: 94:83:c4:XX:YY:4a wlan1: 94:83:c4:XX:YY:4b The same config, prior to the DSA conversion: lan/eth0: 94:83:c4:XX:YY:4a (MAC on sticker) wan/eth1: 94:83:c4:XX:YY:4b wlan0: 94:83:c4:XX:YY:4a wlan1: 94:83:c4:XX:YY:4b Settings in ART partition: root@OpenWrt:/# hexdump -C /dev/mtd7 | grep '94 83' 00000000 94 83 c4 XX YY 4a 94 83 c4 0e YY 4b ff ff ff ff |.....J.....K....| 00001000 20 2f 8d 8c 01 01 94 83 c4 XX YY 4a 00 00 20 00 | /.........J.. .| 00005000 20 2f 5a 3a 01 01 94 83 c4 XX YY 4b 00 00 20 00 | /Z:.......K.. .| So let's fix it by keeping same MAC address assigment as was done before DSA conversion and while at it, define `label-mac-device` as well. Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq40xx: ipqess: enable threaded NAPIRobert Marko2022-10-021-2/+4
| | | | | | | | Enable threaded NAPI by default in IPQESS driver as it significantly improves network perfromance, in my testing about 100+ Mbps in WAN-LAN routing. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: Meraki MR33: convert MAC addresses to nvmemLech Perczak2022-10-021-1/+19
| | | | | | | | This fixes assigning random MAC to br-lan interface upon boot. While at that, rename at24@50 node to eeprom@50, to align with upstream device tree style. Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* ipq40xx: convert some boards to DSARobert Marko2022-10-0226-14/+679
| | | | | | | | | | | | Convert IPQ40xx boards to DSA setup. Signed-off-by: Leon M. George <leon@georgemail.eu> Signed-off-by: Lech Perczak <lech.perczak@gmail.com> Signed-off-by: Nick Hainke <vincent@systemli.org> Signed-off-by: ChunAm See <z1250747241@gmail.com> Signed-off-by: Jeff Kletsky <git-commits@allycomm.com> Signed-off-by: Andrew Sim <andrewsimz@gmail.com> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: qca8k: introduce proper PSGMII calibrationSerhii Serhieiev2022-10-022-12/+331
| | | | | | | | | | | | Serhii and others have experienced PSGMII link degradation up to point that it actually does not pass packets at all or packets arrive as zeros. This usually happened after a couple of hot reboots. Serhii has managed to track it down to PSGMII calibration not being done properly and has fixed it, so all of the code is Serhii-s work. Signed-off-by: Serhii Serhieiev <adron@mstnt.com> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: qca807x: drop kernel version checksRobert Marko2022-10-021-16/+0
| | | | | | | Since kernel 5.4 has been droppped from IPQ40xx, there is no need to keep the version checks for kernels older than 5.10. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: qca807x: add suspend and resume opsSerhii Serhieiev2022-10-021-0/+4
| | | | | | | | | | Currently, suspend and resume ops are not present, this means that if user disables a DSA interface that the PHY-s remain alive and the link is up. Fix it by using generic PHY suspend and resume ops. Signed-off-by: Serhii Serhieiev <adron@mstnt.com> Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: sxtsq-5-ac: correct TCSR ESS typeRobert Marko2022-10-021-1/+1
| | | | | | | SXTsq 5 ac uses RGMII on the port 5 and not PSGMII, so correct the TCSR interface type property. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: add DSA switch driverRobert Marko2022-10-022-1188/+371
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Qualcomm IPQ40xx SoC-s have a variant of QCA8337N switch built-in. It shares most of the stuff with its external counterpart, however it is modified for the SoC. Namely, it doesn't have second CPU port (Port 6), so it has 6 ports instead of 7. It also has no built-in PHY-s but rather requires external PSGMII based companion PHY-s (QCA8072 and QCA8075) for which it first needs to carry out calibration before using them. PSGMII has a SoC built-in PHY that is used to connect to the PHY-s which unfortunately requires some magic values as the datasheet doesnt document the bits that are being set or the register at all. Since its built-in it is MMIO like other peripherals and doesn't have its own MDIO bus but depends on the SoC provided one. CPU connection is at Port 0 and it uses some kind of a internal connection and no traditional RGMII/SGMII. It also doesn't use in-band tagging like other qca8k switches so a shinfo based tagger is used. This is based on the current OpenWrt qca8k version that has been imported from generic target. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: import qca8k from genericRobert Marko2022-10-022-0/+2500
| | | | | | | | This is just importing the qca8k driver from the generic target. It will be used as the based for IPQ40xx version, this is just to be able to see the diff. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: add IPQESS ethernet driverRobert Marko2022-10-024-0/+2047
| | | | | | | | | IPQESS is the EDMA replacement driver for the IPQ40xx SoC built-in ethernet controller. Unlike EDMA it is Phylink based and doesnt touch PHY-s directly. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: qca807x: always set PSGMII AZ WARRobert Marko2022-10-021-9/+6
| | | | | | | | | | | | There is no point in using a DT property to trigger setting the PSGMII PHY AZ transmitting ability. Especially since EEE can be disabled using ethtool anyway. Fixup the mask for setting the workaround as only BIT(0) is actually being changed and use the phy_clear_bits_mmd helper instead of reading, then clearing the bit and writing back as it does everything for us. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: disable nodes instead of deleting themRobert Marko2022-10-025-26/+88
| | | | | | | There is no reason to delete the DT PHY nodes as you can just disable them. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: qca807x: add SFP improvementsRobert Marko2022-10-021-66/+74
| | | | | | | | | | | | | | | | | | | Currently, QCA807x doesnt do any kind of validation to see whether it actually supports the inserted module. So lets add checks to allow only 1000BaseX and 100BaseFX based modules. While adding validation, move fiber configuration to insert/remove events instead of always doing it at config time. This allows getting rid of the DT property for fiber enable and now only the upstream sfp phandle is required. Since we are refactoring fiber related code, lets heavily simplify the status polling as the current logic is overcomplicated due to previous wish to support non standard SFP cages that dont have pins properly connected, that is removed now and only proper SFP cages will work. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: drop ESSEDMA + AR40xx DTS nodesRobert Marko2022-10-0259-1096/+0
| | | | | | | In order to start working on IPQESS + DSA drop the old ESSEDMA + AR40xx DTS nodes. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: drop ESSEDMA + AR40xxRobert Marko2022-10-028-6961/+0
| | | | | | | | | | In order to start working on IPQESS + DSA drop the old ESSEDMA + AR40xx driver combo. Remove the kernel symbols, disable swconfig and drop swconfig package as they are not needed anymore. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: Add ZTE MF289FGiammarco Marzano2022-09-241-0/+438
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a 4G Cat.20 router used by Vodafone Italy (called Vodafone FWA) and Vodafone DE\T-Mobile PL (called GigaCube). Modem is a MiniPCIe-to-USB based on Snapdragon X24, it supports 4CA aggregation. There are currently two hardware revisions, which differ on the 5Ghz radio: AT1 = QCA9984 5Ghz Radio on PCI-E bus AT2 = IPQ4019 5Ghz Radio inside IPQ4019 like 2.4Ghz Device specification -------------------- SoC Type: Qualcomm IPQ4019 RAM: 256 MiB Flash: 128 MiB SPI NAND (Winbond W25N01GV) ROM: 2MiB SPI Flash (GD25Q16) Wireless 2.4 GHz (IP4019): b/g/n, 2x2 Wireless 5 GHz: (QCA9984): a/n/ac, 4x4 HW REV AT1 (IPA4019): a/n/ac, 2x2 HW REV AT2 Ethernet: 2xGbE (WAN/LAN1, LAN2) USB ports: No Button: 2 (Reset/WPS) LEDs: 3 external leds: Network (white or red), Wifi, Power and 1 internal (blue) Power: 12 VDC, 1 A Connector type: Barrel Bootloader: U-Boot Installation ------------ 1. Place OpenWrt initramfs image for the device on a TFTP in the server's root. This example uses Server IP: 192.168.0.2 2. Connect serial console (115200,8n1) to serial connector GND (which is right next to the thing with MF289F MIMO-V1.0), RX, TX (refer to this image: https://ibb.co/31Gngpr). 3. Connect TFTP server to RJ-45 port (WAN/LAN1). 4. Stop in u-Boot (using ESC button) and run u-Boot commands: setenv serverip 192.168.0.2 setenv ipaddr 192.168.0.1 set fdt_high 0x85000000 tftp openwrt-ipq40xx-generic-zte_mf289f-initramfs-fit-zImage.itb bootm $loadaddr 5. Please make backup of original partitions, if you think about revert to stock, specially mtd16 (Web UI) and mtd17 (rootFS). Use /tmp as temporary storage and do: WEB PARITION -------------------------------------- cat /dev/mtd16 > /tmp/mtd16.bin scp /tmp/mtd16.bin root@YOURSERVERIP:/ rm /tmp/mtd16.bin ROOT PARITION -------------------------------------- cat /dev/mtd17 > /tmp/mtd17.bin scp /tmp/mtd17.bin root@YOURSERVERIP:/ rm /tmp/mtd17.bin 6. Login via ssh or serial and remove stock partitions (default IP 192.168.0.1): # this can return an error, if ubi was attached before # or rootfs part was erased before. ubiattach -m 17 # it could return error if rootfs part was erased before ubirmvol /dev/ubi0 -N ubi_rootfs # some devices doesn't have it ubirmvol /dev/ubi0 -N ubi_rootfs_data 7. download and install image via sysupgrade -n (either use wget/scp to copy the mf289f's squashfs-sysupgrade.bin to the device's /tmp directory) sysupgrade -n /tmp/openwrt-...-zte_mf289f-squashfs-sysupgrade.bin Sometimes it could print ubi attach error, but please ignore it if process goes forward. Flash Layout NAND: mtd8: 000a0000 00020000 "fota-flag" mtd9: 00080000 00020000 "0:ART" mtd10: 00080000 00020000 "mac" mtd11: 000c0000 00020000 "reserved2" mtd12: 00400000 00020000 "cfg-param" mtd13: 00400000 00020000 "log" mtd14: 000a0000 00020000 "oops" mtd15: 00500000 00020000 "reserved3" mtd16: 00800000 00020000 "web" mtd17: 01d00000 00020000 "rootfs" mtd18: 01900000 00020000 "data" mtd19: 03200000 00020000 "fota" mtd20: 0041e000 0001f000 "kernel" mtd21: 0101b000 0001f000 "ubi_rootfs" SPI: mtd0: 00040000 00010000 "0:SBL1" mtd1: 00020000 00010000 "0:MIBIB" mtd2: 00060000 00010000 "0:QSEE" mtd3: 00010000 00010000 "0:CDT" mtd4: 00010000 00010000 "0:DDRPARAMS" mtd5: 00010000 00010000 "0:APPSBLENV" mtd6: 000c0000 00010000 "0:APPSBL" mtd7: 00050000 00010000 "0:reserved1" Back to Stock (!!! need original dump taken from initramfs !!!) ------------- 1. Place mtd16.bin and mtd17.bin initramfs image for the device on a TFTP in the server's root. This example uses Server IP: 192.168.0.2 2. Connect serial console (115200,8n1) to serial console connector (refer to the pin-out from above). 3. Connect TFTP server to RJ-45 port (WAN/LAN1). 4. rename mtd16.bin to web.img and mtd17.bin to root_uImage_s 5. Stop in u-Boot (using ESC button) and run u-Boot commands: This will erase RootFS+Web: nand erase 0x1000000 0x800000 nand erase 0x1800000 0x1D00000 This will restore RootFS: tftpboot 0x84000000 ${dir}root_uImage_s nand erase 0x1800000 0x1D00000 nand write $fileaddr 0x1800000 $filesize This will restore Web Interface: tftpboot 0x84000000 ${dir}web.img nand erase 0x1000000 0x800000 nand write $fileaddr 0x1000000 $filesize After first boot on stock firwmare, do a factory reset. Push reset button for 5 seconds so all parameters will be reverted to the one printed on label on bottom of the router Signed-off-by: Giammarco Marzano <stich86@gmail.com> Reviewed-by: Lech Perczak <lech.perczak@gmail.com> (Warning: commit message did not conform to UTF-8 - hopefully fixed?, added description of the pin-out if image goes down, reformatted commit message to be hopefully somewhat readable on git-web, redid some of the gpio-buttons & leds DT nodes, etc.) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for Sony NCP-HG100/CellularINAGAKI Hiroshi2022-09-241-0/+631
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sony NCP-HG100/Cellular is a IoT Gateway with 2.4/5 GHz band 11ac (WiFi-5) wireless function, based on IPQ4019. Specification: - SoC : Qualcomm IPQ4019 - RAM : DDR3 512 MiB (H5TC4G63EFR) - Flash : eMMC 4 GiB (THGBMNG5D1LBAIT) - WLAN : 2.4/5 GHz 2T2R (IPQ4019) - Ethernet : 10/100/1000 Mbps x2 - Transceiver : Qualcomm QCA8072 - WWAN : Telit LN940A9 - Z-Wave : Silicon Labs ZM5101 - Bluetooth : Qualcomm CSR8811 - Audio DAC : Realtek ALC5629 - Audio Amp. : Realtek ALC1304 - Voice Input Processor : Conexant CX20924 - Micro Controller Unit : Nuvoton MINI54FDE - RGB LED, Fan, Temp. sensors - Touch Sensor : Cypress CY8C4014LQI - RGB LED driver : TI LP55231 (2x) - LEDs/Keys : 11x, 6x - UART : through-hole on PCB - J1: 3.3V, TX, RX, GND from tri-angle marking - 115200n8 - Power : 12 VDC, 2.5 A Flash instruction using initramfs image: 1. Prepare TFTP server with the IP address 192.168.132.100 and place the initramfs image to TFTP directory with the name "C0A88401.img" 2. Boot NCP-HG100/Cellular and interrupt after the message "Hit any key to stop autoboot: 2" 3. Perform the following commands and set bootcmd to allow booting from eMMC setenv bootcmd "mmc read 0x84000000 0x2e22 0x4000 && bootm 0x84000000" saveenv 4. Perform the following command to load/boot the OpenWrt initramfs image tftpboot && bootm 5. On the initramfs image, perform sysupgrade with the sysupgrade image (if needed, backup eMMC partitions by dd command and download to other place before performing sysupgrade) 6. Wait for ~120 seconds to complete flashing Known issues: - There are no drivers for audio-related chips/functions in Linux Kernel and OpenWrt, they cannot be used. - There is no driver for MINI54FDE Micro-Controller Unit, customized for this device by the firmware in the MCU. This chip controls the following functions, but they cannot be controlled in OpenWrt. - RGB LED - Fan this fan is controlled automatically by MCU by default, without driver - Thermal Sensors (2x) - Currently, there is no driver or tool for CY8C4014LQI and cannot be controlled. It cannot be exited from "booting mode" and moved to "normal op mode" after booting. And also, the 4x buttons (mic mute, vol down, vol up, alexa trigger) connected to the IC cannot be controlled. - it can be exited from "booting mode" by installing and executing i2cset command: opkg update opkg install i2c-tools i2cset -y 1 0x14 0xf 1 - There is a connection issue on the control by uqmi for the WWAN module. But modemmanager can be used without any issues and the use of it is recommended. - With the F2FS format, too many errors are reported on erasing eMMC partition "rootfs_data" while booting: [ 1.360270] sdhci: Secure Digital Host Controller Interface driver [ 1.363636] sdhci: Copyright(c) Pierre Ossman [ 1.369730] sdhci-pltfm: SDHCI platform and OF driver helper [ 1.374729] sdhci_msm 7824900.sdhci: Got CD GPIO ... [ 1.413552] mmc0: SDHCI controller on 7824900.sdhci [7824900.sdhci] using ADMA 64-bit [ 1.528325] mmc0: new HS200 MMC card at address 0001 [ 1.530627] mmcblk0: mmc0:0001 004GA0 3.69 GiB [ 1.533530] mmcblk0boot0: mmc0:0001 004GA0 partition 1 2.00 MiB [ 1.537831] mmcblk0boot1: mmc0:0001 004GA0 partition 2 2.00 MiB [ 1.542918] mmcblk0rpmb: mmc0:0001 004GA0 partition 3 512 KiB, chardev (247:0) [ 1.550323] Alternate GPT is invalid, using primary GPT. [ 1.561669] mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 ... [ 8.841400] mount_root: loading kmods from internal overlay [ 8.860241] kmodloader: loading kernel modules from //etc/modules-boot.d/* [ 8.863746] kmodloader: done loading kernel modules from //etc/modules-boot.d/* [ 9.240465] block: attempting to load /etc/config/fstab [ 9.246722] block: unable to load configuration (fstab: Entry not found) [ 9.246863] block: no usable configuration [ 9.254883] mount_root: overlay filesystem in /dev/mmcblk0p17 has not been formatted yet [ 9.438915] urandom_read: 5 callbacks suppressed [ 9.438924] random: mkfs.f2fs: uninitialized urandom read (16 bytes read) [ 12.243332] mmc_erase: erase error -110, status 0x800 [ 12.246638] mmc0: cache flush error -110 [ 15.134585] mmc_erase: erase error -110, status 0x800 [ 15.135891] mmc_erase: group start error -110, status 0x0 [ 15.139850] mmc_erase: group start error -110, status 0x0 ...(too many the same errors)... [ 17.350811] mmc_erase: group start error -110, status 0x0 [ 17.356197] mmc_erase: group start error -110, status 0x0 [ 17.439498] sdhci_msm 7824900.sdhci: Card stuck in wrong state! card_busy_detect status: 0xe00 [ 17.446910] mmc0: tuning execution failed: -5 [ 17.447111] mmc0: cache flush error -110 [ 18.012440] F2FS-fs (mmcblk0p17): Found nat_bits in checkpoint [ 18.062652] F2FS-fs (mmcblk0p17): Mounted with checkpoint version = 428fa16b [ 18.198691] block: attempting to load /etc/config/fstab [ 18.198972] block: unable to load configuration (fstab: Entry not found) [ 18.203029] block: no usable configuration [ 18.211371] mount_root: overlay filesystem has not been fully initialized yet [ 18.214487] mount_root: switching to f2fs overlay So, this support uses ext4 format instead which has no errors. Note: - The primary uart is shared for debug console and Z-Wave chip. The function is switched by GPIO15 (Linux: 427). value: 1: debug console 0: Z-Wave - NCP-HG100/Cellular has 2x os-image pairs in eMMC. - 0:HLOS, rootfs - 0:HLOS_1, rootfs_1 In OpenWrt, the first image pair is used. - "bootipq" command in U-Boot requires authentication with signed-image by default. To boot unsigned image of OpenWrt, use "mmc read" and "bootm" command instead. - This support is for "Cellular" variant of NCP-HG100 and not tested on "WLAN" (non-cellular) variant. - The board files of ipq-wifi may also be used in "WLAN" variant of NCP-HG100, but unconfirmed and add files as for "Cellular" variant. - "NET" LED is used to indicate WWAN status in stock firmware. - There is no MAC address information in the label on the case, use the address included in UUID in the label as "label-MAC" instead. - The "CLOUD" LEDs are partially used for indication of system status in stock firmware, use they as status LEDs in OpenWrt instead of RGB LED connected to the MCU. MAC addresses: LAN : 5C:FF:35:**:**:ED (ART, 0x6 (hex)) WAN : 5C:FF:35:**:**:EF (ART, 0x0 (hex)) 2.4 GHz: 5C:FF:35:**:**:ED (ART, 0x1006 (hex)) 5 GHz : 5C:FF:35:**:**:EE (ART, 0x5006 (hex)) partition layout in eMMC (by fdisk, GPT): Disk /dev/mmcblk0: 7733248 sectors, 3776M Logical sector size: 512 Disk identifier (GUID): **** Partition table holds up to 20 entries First usable sector is 34, last usable sector is 7634910 Number Start (sector) End (sector) Size Name 1 34 1057 512K 0:SBL1 2 1058 2081 512K 0:BOOTCONFIG 3 2082 3105 512K 0:QSEE 4 3106 4129 512K 0:QSEE_1 5 4130 4641 256K 0:CDT 6 4642 5153 256K 0:CDT_1 7 5154 6177 512K 0:BOOTCONFIG1 8 6178 6689 256K 0:APPSBLENV 9 6690 8737 1024K 0:APPSBL 10 8738 10785 1024K 0:APPSBL_1 11 10786 11297 256K 0:ART 12 11298 11809 256K 0:HSEE 13 11810 28193 8192K 0:HLOS 14 28194 44577 8192K 0:HLOS_1 15 44578 306721 128M rootfs 16 306722 568865 128M rootfs_1 17 568866 3958065 1654M rootfs_data [initial work] Signed-off-by: Iwao Yuki <dev.clef@gmail.com> Co-developed-by: Iwao Yuki <dev.clef@gmail.com> [adjustments, cleanups, commit message, sending patch] Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com> (dropped clk_unused_ignore, dropped 901-* patches, renamed key nodes, changed LEDs chan/labels to match func-en, made :net -> (w)wan leds) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: luma_wrtq-329acn: differentiate ethernet mac addressesTomasz Maciej Nowak2022-09-241-0/+12
| | | | | | | | On OEM firmware both addresses for In and Out ports are different. Set them as such also in OpenWrt. Fixes: e24635710c7e (" ipq40xx: add support for Luma Home WRTQ-329ACN") Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* ipq40xx: fix RUTX10 Wi-Fi woesKasparas Elzbutas2022-09-241-30/+0
| | | | | | | | | | | | | This partially reverts: commit cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data") U-Boot on these devices mangles the device tree, so nvmem-cell type calibration doesn't work. Fixes: cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data") Signed-off-by: Kasparas Elzbutas <elzkas@gmail.com> (added reference to commit, rewrote commit message) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: fix power LED colour ID in Netgear WAC510 dtsAndrew Sim2022-09-191-1/+1
| | | | | | | led_power_green color ID in dts is mistakenly set to amber so correct it by setting it to green Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
* ipq40xx: add GL-AP1300 label-mac-deviceDavid Bauer2022-09-111-0/+1
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq-wifi: add Pakedge WR-1 supportTomasz Maciej Nowak2022-09-071-0/+4
| | | | | | | | | | Calibration variants: Pakedge-WR-1 ETSI, FCC and IC-2.4GHz Pakedge-WR-1-ACMA ACMA Pakedge-WR-1-IC IC-5GHz Pakedge-WR-1-SRRC SRRC Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* ipq40xx: add support for Pakedge WR-1Tomasz Maciej Nowak2022-09-071-0/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pakedge WR-1 is a dual-band wireless router. Specification SoC: Qualcomm Atheros IPQ4018 RAM: 256 MB DDR3 Flash: 32 MB SPI NOR WIFI: 2.4 GHz 2T2R integrated 5 GHz 2T2R integrated Ethernet: 5x 10/100/1000 Mbps QCA8075 USB: 1x 2.0 LEDS: 8x (3 GPIO controlled, 5 connected to switch) Buttons: 1x GPIO controlled UART: pin header J5 1. 3.3V, 2. GND, 3. TX, 4. RX baud: 115200, parity: none, flow control: none Installation 1. Rename initramfs image to: openwrt-ipq806x-qcom-ipq40xx-ap.dk01.1-c1-fit-uImage-initramfs.itb and copy it to USB flash drive with FAT32 file system. 2. Connect USB flash drive to the router and apply power while pressing reset button. Hold the button, on the lates bootloader version, when Power and WiFi-5 LEDs will start blinking release it. For the older bootloader holding it for 15 seconds should suffice. 3. Now the router boots the initramfs image, at some point (close to one minute) the Power LED will start blinking, when stops, router is fully booted. 4. Connect to one of LAN ports and use SSH to open the shell at 192.168.1.1. 5. ATTENTION! now backup the mtd8 and mtd9 partitions, it's necessary if, at some point, You want to go back to original firmware. The firmware provided by manufacturer on its site is encrypted and U-Boot accepts only decrypted factory images, so there's no way to restore original firmware. 6. If the backup is prepared, transfer the sysupgrade image to the router and use 'sysupgrade' command to flash it. 7. After successful flashing router will reboot. At some point the Power LED will start blinking, wait till it stops, then router is ready for configuration. Additional information U-Boot command line is password protected. Password is unknown. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* ipq40xx: add support for Extreme Networks WS-AP3915iDavid Bauer2022-09-061-0/+272
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- Qualcomm IPQ4029 WiSoC 2T2R 802.11 abgn 2T2R 802.11 nac Macronix MX25L25635E SPI-NOR (32M) 512M DDR3 RAM 1x Gigabit LAN 1x Cisco RJ-45 Console port Settings: 115200 8N1 Installation ------------ 1. Attach to the Console port. Power up the device and press the s key to interrupt autoboot. 2. The default username / password to the bootloader is admin / new2day 3. Update the bootcommand to allow loading OpenWrt. $ setenv ramboot_openwrt "setenv serverip 192.168.1.66; setenv ipaddr 192.168.1.1; tftpboot 0x86000000 openwrt-3915.bin; bootm" $ setenv boot_openwrt "sf probe; sf read 0x88000000 0x280000 0xc00000; bootm 0x88000000" $ setenv bootcmd "run boot_openwrt" $ saveenv 4. Download the OpenWrt initramfs image. Serve it using a TFTP server as "openwrt-3915.bin" at 192.1681.66. 5. Download & boot the OpenWrt initramfs image on the access point. $ run ramboot_openwrt 6. Wait for OpenWrt to start. 7. Download and transfer the sysupgrade image to the device using e.g. SCP. 8. Install OpenWrt to the device using "sysupgrade" $ sysupgrade -n /path/to/openwrt.bin Signed-off-by: David Bauer <mail@david-bauer.net>
* ipq40xx: add MikroTik wAP ac (RBwAPG-5HacD2HnD) supportMark Mentovai2022-07-181-0/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik wAP ac (RBwAPG-5HacD2HnD) is a dual-band dual-radio 802.11ac wireless access point with integrated antenna and two Ethernet ports in a weatherproof enclosure. See https://mikrotik.com/product/wap_ac for more information. Important: this is the new ipq40xx-based wAP ac, not the older ath79-based wAP ac (RBwAPG-5HacT2HnD), already supported in OpenWrt. Specifications: - SoC: Qualcomm Atheros IPQ4018 - CPU: 4x ARM Cortex A7 - RAM: 128MB - Storage: 16MB NOR flash - Wireless - 2.4GHz: Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 2.5 dBi antennae - 5GHz: Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 2.5 dBi antennae - Ethernet: Built-in IPQ4018 (SoC, QCA8075), 2x 1000/100/10Mb/s ports, one with 802.3af/at PoE in Installation: Boot the initramfs image via TFTP, then flash the sysupgrade image using sysupgrade. Details at https://openwrt.org/toh/mikrotik/common. Notes: This preserves the MAC addresses of the physical Ethernet ports: - eth0 corresponds to the physical port labeled ETH1 and has the base MAC address. This port can be used to power the device. - eth1 corresponds to the physical port labeled ETH2 and has a MAC address one greater than the base. MAC addresses are set from /lib/preinit/05_set_iface_mac_ipq40xx.sh rather than /etc/board.d/02_network so that they are in effect for preinit. This should likely be done for other MikroTik devices and possibly other non-MikroTik devices as well. As this device has 2 physical ports, they are each connected to their respective PHYs, allowing the link status to be visible to software. Since they are not marked on the case with any role (such as LAN or WAN), both are bridged to the lan network by default, although this can easily be changed if needed. Signed-off-by: Mark Mentovai <mark@mentovai.com>
* ipq40xx: R619AC: replace space with - separator in variant stringChristian Lamparter2022-07-151-2/+2
| | | | | | | | | | | | | Kalle: "I see that variant has a space in it, does that work it correctly? My original idea was that spaces would not be allowed, but didn't realise to add a check for that." Is this an easy change? Because the original author (Tim Davis) noted: "You may substitute the & and space with something else saner if they prove to be problematic." Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: mikrotik: make RouterBoot partition writeableThibaut VARÈNE2022-06-295-5/+0
| | | | | | | | | Linux MTD requires the parent partition be writable for a child partition to be allowed write permission. In order for soft_config to be writeable (and modifiable via sysfs), the parent RouterBoot partition must be writeable Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
* ipq40xx: add support for Meraki MR74Matthew Hagan2022-06-193-402/+424
| | | | | | | | | | | | The Meraki MR74 is part of the "Insect" series. This device is essentially an outdoor variant of the MR33 with identical hardware, but requiring a config@3 DTS option to be set to allow booting with the stock u-boot. The install procedure is replicated from the MR33, with the exception being that the MR74 sysupgrade image must be used. Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
* ipq40xx: add support for Linksys WHW01 v1Peter Adkins2022-06-051-0/+330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for Linksys WHW01 v1 ("Velop") [FCC ID Q87-03331]. Specification ------------- SOC: Qualcomm IPQ4018 WiFi 1: Qualcomm QCA4019 IEEE 802.11b/g/n WiFi 2: Qualcomm QCA4019 IEEE 802.11a/n/ac Bluetooth: Qualcomm CSR8811 (A12U) Ethernet: Qualcomm QCA8072 (2-port) SPI Flash 1: Mactronix MX25L1605D (2MB) SPI Flash 2: Winbond W25M02GV (256MB) DRAM: Nanya NT5CC128M16IP-DI (256MB) LED Controller: NXP PCA963x (I2C) Buttons: Single reset button (GPIO). Notes ----- There does not appear to be a way to trigger TFTP recovery without entering U-Boot. The device must be opened to access the serial console in order to first flash OpenWrt onto a device from factory. The device has automatic recovery backed by a second set of partitions on the larger of the two SPI flash ICs. Both the primary and secondary must be flashed to prevent accidental rollback to "factory" after 3 failed boot attempts. Serial console -------------- A serial console is available on the following pins of the populated J2 connector on the device mainboard (115200 8n1). (<-- Top of PCB / Device) J2 [o o o o o o] | | | | | `-- GND | `---- TX `--------- RX Installation instructions ------------------------- 1. Setup TFTP server with server IP set to 192.168.1.236. 2. Copy compiled `...squashfs-factory.bin` to `nodes-jr.img` in tftp root. 3. Connect to console using pinout detailed in the serial console section. 4. Power on device and press enter when prompted to drop into U-Boot. 5. Flash first partition device via `run flashimg`. 6. Once complete, reset device and allow to power up completely. 7. Once comfortable with device upgrade reboot and drop back into U-Boot. 8. Flash the second partition (recovery) via `run flashimg2`. Revert to "factory" ------------------- 1. Download latest firmware update from vendor support site. 2. Copy extracted `.img` file to `nodes-jr.img` in tftp root. 3. Connect to console using pinout detailed in the serial console section. 4. Power on device and press enter when prompted to drop into U-Boot. 5. Flash first partition device via `run flashimg`. 6. Once complete, reset device and allow to power up completely. 7. Once comfortable with device upgrade reboot and drop back into U-Boot. 8. Flash the second partition (recovery) via `run flashimg2`. Link: https://github.com/openwrt/openwrt/pull/3682 Signed-off-by: Peter Adkins <peter@sunkenlab.com> (calibration from nvmem, updated to 5.10+5.15) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add Aruba AP-365 specific BDFDavid Bauer2022-06-021-0/+9
| | | | | | | | | | | | | Aruba deploys a BDF in the root filesystem, however this matches the one used for the DK04 reference board. The board-specific BDFs are built into the kernel. The AP-365 shows sinificant degraded performance with increased range when used with the reference BDF. Replace the BDF with the one extracted from Arubas kernel. Signed-off-by: David Bauer <mail@david-bauer.net>
* IPQ4019: AVM FRITZ!Box 7530: Remove NAND ECC restrictions from DTSAndreas Böhler2022-05-151-0/+3
| | | | | | | | | Some revisions of the FRITZ!7530 use a Toshiba NAND with 8 bit ECC in contrast to the Macronix NAND with 4 bit ECC. This removes the hardcoded ECC strength and step size as set in qcom-ipq4019.dtsi, thus relying on the kernel NAND detection routines to correclty set up the ECC parameters. Signed-off-by: Andreas Böhler <dev@aboehler.at>
* ipq40xx: revert Cell-C RTL30VW to legacy caldata extractionPawel Dembicki2022-05-151-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data"). After switching to nvmem RTL30VW, wifi was broken: [ 19.118319] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000 [ 19.118377] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0 [ 19.130285] ath10k_ahb a000000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b [ 19.159092] ath10k_ahb a000000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=cellc,rtl30vw from ath10k/QCA4019/hw1.0/board-2.bin [ 19.238764] ath10k_ahb a000000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0 [ 19.238847] ath10k_ahb a000000.wifi: failed to fetch board file: -12 [ 19.247362] ath10k_ahb a000000.wifi: could not probe fw (-12) [ 20.190797] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000 [ 20.190853] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0 [ 20.202893] ath10k_ahb a800000.wifi: firmware ver 10.4b-ct-4019-fW-13-5ae337bb1 api 5 features mfp,peer-flow-ctrl,txstatus-noack,wmi-10.x-CT,ratemask-CT,regdump-CT,txrate-CT,flush-all-CT,pingpong-CT,ch-regs-CT,nop-CT,set-special-CT,tx-rc-CT,cust-stats-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT,wmi-bcn-rc-CT crc32 6b2b5c5b [ 20.231357] ath10k_ahb a800000.wifi: failed to fetch board data for bus=ahb,vendor=0000,device=0000,subsystem-vendor=0000,subsystem-device=0000,variant=cellc,rtl30vw from ath10k/QCA4019/hw1.0/board-2.bin [ 20.317318] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0 [ 20.317399] ath10k_ahb a800000.wifi: failed to fetch board file: -12 [ 20.326098] ath10k_ahb a800000.wifi: could not probe fw (-12) Bootloader mangles in NAND partitions and removes precal@X nodes in working system: root@OpenWrt:~# echo $(cat /sys/firmware/devicetree/base/soc/spi@78b5000/flash@0/partitions/partition@170000/label) 0:ART root@OpenWrt:~# ls /sys/firmware/devicetree/base/soc/spi@78b5000/flash@0/partitions/partition@170000/ label name reg Revert to legacy method fixed the problem. Fixes: cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data") Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* ipq40xx: Lyra: update RGB LED-Controller node for 5.10+Christian Lamparter2022-05-141-47/+75
| | | | | | | | | | | | | | | | | | | | | | Add the reg and color property to each channel node. This update is to accommodate the multicolor framework. Refer to: <https://lore.kernel.org/all/20200622185919.2131-9-dmurphy@ti.com> <https://lore.kernel.org/all/20210818070209.1540451-1-michal.vokac@ysoft.com> Note: There is only a single extremely bright RGB-LED. The RGB-color channels (i.e.: blue-0, blue-1 and blue-2) are running in parallel to increase the current delivery beyond what a single PWM-output on the LED controller could do. BugLink: https://github.com/openwrt/openwrt/issues/9851 Reported-By: Thomas Bøge <thomas@boegenielsen.dk> Tested-By: Thomas Bøge <thomas@boegenielsen.dk> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: consolidate ar40xx driver filesSungbo Eo2022-05-052-0/+2235
| | | | | | | | | | Commit f4fb63d2ab4f ("ipq40xx: 5.10: move AR40xx to MDIO drivers") moved the ar40xx driver files to kernel version specific directories to place them in different subdirectory in kernel tree. But now kernel 5.4 is gone and there is no reason to keep them separate. Move them back to common files/ directory. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq40xx: refresh ess driver and phy with new apiAnsuel Smith2022-05-012-0/+48
| | | | | | | | Kernel 5.15 have some new api for ethtool and phy. Add ifdef to fix compilation error. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> Reviewed-by: Robert Marko <robert.marko@sartura.hr>
* ipq40xx: fix wrong nand definition for wpj419Ansuel Smith2022-05-011-6/+6
| | | | | | | Fix wrong nand definition for wpj419 that differ from the upstream node name. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq40xx: WAC510: device-tree overhaulingChristian Lamparter2022-03-261-40/+30
| | | | | | | | | removes usb-port remains as neither the WAC510 nor the WAC505 come with a USB port. Update the LED properties to phase out labels and introduce generic node-names as well as adding the color, function and function-enumerator properties. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: update E2600AC c1/c2 board张 鹏2022-03-253-14/+26
| | | | | | | | Modified the radio frequency hardware part of e2600ac c1/c2, need to cooperate with the modified board.bin file, the device can work normally. Signed-off-by: 张 鹏 <sd20@qxwlan.com>
* ipq40xx: Add subtarget for Google WiFi (Gale)Brian Norris2022-03-251-0/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Google WiFi (codename: Gale) is an IPQ4019-based AP, with 2 Ethernet ports, 2x2 2.4+5GHz WiFi, 512 MB RAM, 4 GB eMMC, and a USB type C port. In its stock configuration, it runs a Chromium OS-based system, but you wouldn't know it, since you can only manage it via a "cloud" + mobile-app system. The "v2" label is coded into the bootloader, which prefers the "google,gale-v2" compatible string. I believe "v1" must have been pre-release hardware. Note: this is *not* the Google Nest WiFi, released in 2019. I include "factory.bin" support, where we generate a GPT-based disk image with 2 partitions -- a kernel partition (using the custom "Chrome OS kernel" GUID type) and a root filesystem partition. See below for flashing instructions. Sysupgrade is supported via recent emmc_do_upgrade() helper. This is a subtarget because it enables different features (FEATURES=boot-part rootfs-part) whose configurations don't make sense in the "generic" target, and because it builds in a few USB drivers, which are necessary for installation (installation is performed by booting from USB storage, and so these drivers cannot be built as modules, since we need to load modules from USB storage). Flashing instructions ===================== Documented here: https://openwrt.org/inbox/toh/google/google_wifi Note this requires booting from USB storage. Features ======== I've tested: * Ethernet, both WAN and LAN ports * eMMC * USB-C (hub, power-delivery, peripherals) * LED0 (R/G/B) * WiFi (limited testing) * SPI flash * Serial console: once in developer mode, console can be accessed via the USB-C port with SuzyQable, or other similar "Closed Case Debugging" tools: https://chromium.googlesource.com/chromiumos/third_party/hdctools/+/master/docs/ccd.md#suzyq-suzyqable * Sysupgrade Not tested: * TPM Known not working: * Reboot: this requires some additional TrustZone / SCM configuration to disable Qualcomm's SDI. I have a proposal upstream, and based on IRC chats, this might be acceptable with additional DT logic: [RFC PATCH] firmware: qcom_scm: disable SDI at boot https://lore.kernel.org/linux-arm-msm/20200721080054.2803881-1-computersforpeace@gmail.com/ * SMP: enabling secondary CPUs doesn't currently work using the stock bootloader, as the qcom_scm driver assumes newer features than this TrustZone firmware has. I posted notes here: [RFC] qcom_scm: IPQ4019 firmware does not support atomic API? https://lore.kernel.org/linux-arm-msm/20200913201608.GA3162100@bDebian/ * There's a single external button, and a few useful internal GPIO switches. I haven't hooked them up. The first two are fixed with subsequent commits. Additional notes ================ Much of the DTS is pulled from the Chrome OS kernel 3.18 branch, which the manufacturer image uses. Note: the manufacturer bootloader knows how to patch in calibration data via the wifi{0,1} aliases in the DTB, so while these properties aren't present in the DTS, they are available at runtime: # ls -l /sys/firmware/devicetree/base/soc/wifi@a*/qcom,ath10k-pre-calibration-data -r--r--r-- 1 root root 12064 Jul 15 19:11 /sys/firmware/devicetree/base/soc/wifi@a000000/qcom,ath10k-pre-calibration-data -r--r--r-- 1 root root 12064 Jul 15 19:11 /sys/firmware/devicetree/base/soc/wifi@a800000/qcom,ath10k-pre-calibration-data Ethernet MAC addresses are similarly patched in via the ethernet{0,1} aliases. Signed-off-by: Brian Norris <computersforpeace@gmail.com> (updated 901 - x1pro moved in the process) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for Telco X1 ProNicholas Smith2022-03-192-0/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | Telco X1 Pro is a Cat12 LTE-A Pro modem router. Vendor firmware is based on a recent version of OpenWrt. Flashing is possible via CLI using sysupgrade -F -n The serial headers allow bootloader and console access Serial setting: 115200 8N1 Brief Specifications: IPQ4019 SoC 32MB flash 512MB RAM 4x gigabit LAN 1x gigabit WAN Dual-band Wave-2 wifi 2x SMA LTE antenna connectors 2x RP-SMA wifi antennas 1x USB 2.0 port 1x Reset button Serial headers installed 1x Nano SIM tray 1x Quectel EM-12G LTE-A Pro modem 1x M.2 slot attached to USB 3.0 1x internal micro SD card slot Signed-off-by: Nicholas Smith <nicholas@nbembedded.com>
* ipq40xx: document pcie wifi chip on the GL.Inet GL-B2200Christian Lamparter2022-02-191-4/+4
| | | | | | | | | | | | | | | | | | Enrico provided a bootlog that shows the chip is a WAVE-2 QCA9888v2: > pci 0000:01:00.0: [168c:0056] type 00 class 0x028000 > [...] > ath10k 5.15 driver, optimized for CT firmware, probing pci device: 0x56. > ath10k_pci 0000:01:00.0: qca9888 hw2.0 target 0x01000000 [...] chip_id 0x00000000 sub 0000:0000 > ath10k_pci 0000:01:00.0: firmware ver 10.4b-ct-9888-fW-13-5ae337bb1 api 5 features mfp,[...] > ath10k_pci 0000:01:00.0: board_file api 2 bmi_id N/A crc32 6535d835 > ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 32 raw 0 hwcrypto 1 this patch switches the device over to pre-calibration. (this is more or less cosmetic) Reported-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: limit available radio channels for GL.iNet GL-B2200Enrico Mioso2022-02-191-0/+2
| | | | | | | | | The PCIe and built-in 5GHZ radios are meant to operate on different frequency bands. The hardware enforces this via RF filters. Add this information to allow software enforcing it as well. Credits to Piotr Dymacz for the invaluable help. Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
* ipq40xx: add support for ZTE MF286DPawel Dembicki2022-02-051-0/+435
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ZTE MF286D is a LTE router with four gigabit ethernet ports and integrated QMI mPCIE modem. Hardware specification: - CPU: IPQ4019 - RAM: 256MB - Flash: NAND 128MB + NOR 2MB - WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2x2:2 - WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11anac 2x2:2 - LTE: mPCIe cat 12 card (Modem chipset MDM9250) - LAN: 4 Gigabit Ports - USB: 1x USB2.0 (regular port). 1x USB3.0 (mpcie - used by the modem) - Serial console: X8 connector 115200 8n1 Known issues: - Many LEDs are driven by the modem. Only internal LEDs and wifi LEDs are driven by cpu. - Wifi LED is triggered by phy0tpt only - No VoIP support - LAN1/WAN port is configured as WAN - ZTE gives only one MAC per device. Use +1/+2/+3 increment for WAN and WLAN0/1 Opening the case: 1. Take of battery lid (no battery support for this model, battery cage is dummy). 2. Unscrew screw placed behind battery lid. 3. Take off back cover. It attached with multiple plastic clamps. 4. Unscrew four more screws hidden behind back case. 5. Remove front panel from blue chassis. There are more plastic clamps. 6. Unscrew two boards, which secures the PCB in the chassis. 7. Extract board from blue chassis. Console connection (X8 connector): 1. Parameters: 115200 8N1 2. Pin description: (from closest pin to X8 descriptor to farthest) - VCC (3.3V) - TX - RX - GND Install Instructions: Serial + initramfs: 1. Place OpenWrt initramfs image for the device on a TFTP in the server's root. This example uses Server IP: 192.168.1.3 2. Connect serial console (115200,8n1) to X8 connector. 3. Connect TFTP server to RJ-45 port. 4. Stop in u-Boot and run u-Boot commands: setenv serverip 192.168.1.3 setenv ipaddr 192.168.1.72 set fdt_high 0x85000000 tftp openwrt-ipq40xx-generic-zte_mf286d-initramfs-fit-zImage.itb bootm $loadaddr 5. Please make backup of original partitions, if you think about revert to stock. 6. Login via ssh or serial and remove stock partitions: ubiattach -m 9 ubirmvol /dev/ubi0 -N ubi_rootfs ubirmvol /dev/ubi0 -N ubi_rootfs_data 7. Install image via "sysupgrade -n". Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> (cosmetic changes to the commit message) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add MikroTik cAP ac supportAlar Aun2022-02-011-0/+250
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the MikroTik RouterBOARD RBcAPGi-5acD2nD (cAP ac), a indoor dual band, dual-radio 802.11ac wireless AP, two 10/100/1000 Mbps Ethernet ports. See https://mikrotik.com/product/cap_ac for more info. Specifications: - SoC: Qualcomm Atheros IPQ4018 - RAM: 128 MB - Storage: 16 MB NOR - Wireless: · Built-in IPQ4018 (SoC) 802.11b/g/n 2x2:2, 2.5 dBi antennae · Built-in IPQ4018 (SoC) 802.11a/n/ac 2x2:2, 2.5 dBi antennae - Ethernet: Built-in IPQ4018 (SoC, QCA8075) , 2x 1000/100/10 port, PoE in and passive PoE out Unsupported: - PoE out Installation: Boot the initramfs image via TFTP and then flash the sysupgrade image using "sysupgrade -n" Signed-off-by: Alar Aun <alar.aun@gmail.com>
* ipq40xx: rename RT-AC42U WLAN/LAN LEDsSungbo Eo2022-01-171-4/+6
| | | | | | | | | | Assign LED numbers properly by adding function-enumerator property in DTS. While at it, remove default trigger of LAN LEDs as it will be handled in 01_leds anyway. Fixes: 51b9aef553a8 ("ipq40xx: add support for ASUS RT-ACRH17/RT-AC42U") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq40xx: AP-365: fix non-existent node or label "macaddr_mfginfo_1d"Christian Lamparter2022-01-161-0/+7
| | | | | | | | | | | | | | | | | | | Chen Minqiang reported on github: | DTC arch/arm/boot/dts/qcom-ipq4029-ap-365.dtb |qcom-ipq4019.dtsi:520.23-560.5: ERROR (phandle_references): /soc/wifi@a000000: |Reference to non-existent node or label "macaddr_mfginfo_1d" | | also defined at qcom-ipq4029-aruba-glenmorangie.dtsi:243.8-248.3 |qcom-ipq4019.dtsi:562.23-602.5: ERROR (phandle_references): /soc/wifi@a800000: |Reference to non-existent node or label "macaddr_mfginfo_1d" | | also defined at qcom-ipq4029-aruba-glenmorangie.dtsi:250.8-256.3 |ERROR: Input tree has errors, aborting (use -f to force output) |scripts/Makefile.lib:326: recipe for target 'qcom-ipq4029-ap-365.dtb' failed Fixes: cfc13c44595d ("ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data") Reported-by: Chen Minqiang <ptpt52@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: utilize nvmem-cells for macs & (pre-)calibration dataChristian Lamparter2022-01-1530-36/+482
| | | | | | | | | | | | | | | moves extraction entries out of 11-ath10k-caldata and into the individual board's device-tree. Some notes: - mmc could work as well (not tested) - devices that pass the partitions via mtdparts bootargs are kept as is - gl-b2200 has a weird pcie wifi device (vendor claims 9886 wave 2. But firmware-extraction was for a wave 1 device?!) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: add support for ASUS RT-ACRH17/RT-AC42UJoshua Roys2022-01-152-10/+308
| | | | | | | | | | | | | | | | | | | | | SOC: IPQ4019 CPU: Quad-core ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d DRAM: 256 MB NAND: 128 MiB Macronix MX30LF1G18AC ETH: Qualcomm Atheros QCA8075 Gigabit Switch (4x LAN, 1x WAN) USB: 1x 3.0 (via Synopsys DesignWare DWC3 controller in the SoC) WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11bgn 2x2:2 WLAN2: Qualcomm Atheros QCA9984 5GHz 802.11nac 4x4:4 INPUT: 1x WPS, 1x Reset LEDS: Status, WIFI1, WIFI2, WAN (red & blue), 4x LAN This board is very similar to the RT-ACRH13/RT-AC58U. It must be flashed with an intermediary initramfs image, the jffs2 ubi volume deleted, and then finally a sysupgrade with the final image performed. Signed-off-by: Joshua Roys <roysjosh@gmail.com> (added ALT0) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq40xx: fix reset button GPIO for GL.iNet GL-B2200Enrico Mioso2021-12-121-1/+1
| | | | | | | | | GL.iNet's U-Boot checks for GPIO 40, not 43. Changing this allows the RESET button to work as expected. Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com> CC: Daniel Golle <daniel@makrotopia.org> CC: Li Zhang <li.zhang@gl-inet.com>