aboutsummaryrefslogtreecommitdiff
path: root/target/linux/qualcommax
Commit message (Collapse)AuthorAge
...
* qualcommax: convert qca807x PHY to PHY package implementationChristian Marangi2024-02-11
| | | | | | | | Convert every qca807x PHY definition in DT to new PHY package implementation to correctly support applying fixup for the correct PHY mode. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: set correct PHY mode for port 0-4Christian Marangi2024-02-11
| | | | | | | | | | | | Port 0-4 have the mode set to SGMII instead of PSGMII. Now that we use the upstream qca807x driver, this conflicts with the qca SSDK driver that expects the mode to be PSGMII as for not integrated driver, it does refer to the real PHY mode. Update the entry for port 0-4 to PSGMII to solve warning from qca SSDK in ipq8074-ess.dtsi. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: enable qca807x PHY driverChristian Marangi2024-02-11
| | | | | | | | IPQ807x have integrated qca8074 PHY supported by the upstream qca807x driver. Enable it to use it instead of the downstream qca SSDK variant. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12Christian Marangi2024-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit d737ae99cb36 ("qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS") reverted the switch bmp to the original OEM definition and added the malibu_first_phy_addr property. Problem is that OEM bmp definition is wrong and actually doesn't make sense, probably caused by copy-paste of the QCOM reference DTS without actually setting real values. What actually fixed the regression was adding the malibu_first_phy_addr as without it the MALIBU PHY was actually not correctly configured and the Aquantia PHY were actually configured as MALIBU PHY. Fix all these wrong PHY definition. The BPM is reverted and the following fixes are applied: - Drop ESS_PORT1 as it's not actually attached in HW. - Move ESS_PORT5 AGAIN from lan to wan. This refer to the first Aquantia PHY that is labelled "wan" - Move ESS_PORT6 AGAIN from wan to lan. This refer to the second Aquantia PHY that is labelled "lan1". Also PHY tag in MDIO node are renumbered to start from 0 following the tagging standard used also in other dts and the not attached one (reg 0x18 and reg 0x1c) are correctly dropped. Definition for port@1 in phyinfo is dropped as it doesn't exist. dp nodes are updated to reference the new PHY tag numbering. Fixes: d737ae99cb36 ("qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: refresh kernel patchesChristian Marangi2024-02-09
| | | | | | | | | Refresh kernel patches changed from the just introduced ipq60xx new subtarget. Patch automatically refreshed with make target/linux/refresh. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: move generic image recipes to target MakefileRobert Marko2024-02-09
| | | | | | | These recipes are generic and will be used for other subtargets, so lets move them to the target Makefile so they can reused. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: add ipq60xx supportMantas Pucka2024-02-09
| | | | | | | | | | | | | Introduce support for the Qualcomm IPQ60xx SoC. WiFi support still has to be handled and correctly fix hence this is currently marked as source-only to have a solid base to progress on correct support of this and hope Upstream QUIC publish newers ath11k drivers for this SoC. Co-developed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Mantas Pucka <mantas@8devices.com> [ improve commit description, add SoB for Robert, make it source-only ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: convert to new LED color/function format where possibleChristian Marangi2024-02-07
| | | | | | | | Initial conversion to new LED color/function format and drop label format where possible. The same label is composed at runtime. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: drop redundant label with new LED color/function formatChristian Marangi2024-02-07
| | | | | | | | | Drop redundant label with new LED color/function format declared. This was needed previously when the new format wasn't supported by leds.sh functions script. Now that is supported this property can be removed in favor of the new format. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: enable PHYLIB LED supportRobert Marko2024-02-05
| | | | | | | | CONFIG_PHYLIB_LEDS is required in order for phylib to probe the DT for LEDs attached to PHY-s. Fixes: 75ad5c2 ("qualcommax: switch to qca8081 upstream PHY driver") Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: enable back QCA808X PHY driverChristian Marangi2024-02-02
| | | | | | | | | Commit 997acc7f86ca ("generic: 6.1: backport at803x split patches") didn't enable back QCA808x PHY driver after the introduction of the at803x driver split. Fixes: 997acc7f86ca ("generic: 6.1: backport at803x split patches") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: dts: add reset delay to qca8081 phyChukun Pan2024-01-30
| | | | | | | | The qca8081 phy needs to set the reset delay time, otherwise it will not be detected by the mdio bus. Fixes: 75ad5c2 ("qualcommax: switch to qca8081 upstream PHY driver") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* qualcommax: switch to qca8081 upstream PHY driverChristian Marangi2024-01-27
| | | | | | | | Switch to qca8081 upstream PHY. Update every device that have LEDs attached to the qca8081 PHY to follow new way of defining the LEDs and add original OEM configuration. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: 301w: provide AQR FW via NVMEM cellsRobert Marko2024-01-26
| | | | | | | | | In order to get rid of having to modify U-boot bootcmd and having U-boot load the Aquantia PHY-s firmware lets use some of the free space on SPI-NOR to add a second ethphyfw partition and be able to load AQR FW via NVMEM cells. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: 301w: correct AQR reset GPIO-sRobert Marko2024-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that the reset GPIO-s defined for the two AQR PHY-s are actually reversed. Manually testing confirmed that GPIO44 is actually reset GPIO of AQR at 0, while GPIO59 is reset of AQR at 8: root@OpenWrt:~# mdio 9* DEV PHY-ID LINK 0x00 0x00000000 down 0x08 0x00000000 down 0x10 0x004dd0b1 down 0x11 0x004dd0b1 down 0x12 0x004dd0b1 down 0x13 0x004dd0b1 up 0x14 0x004dd0b1 down 0x15 0x04820a05 down root@OpenWrt:~# gpioset gpiochip0 44=0 root@OpenWrt:~# mdio 9* DEV PHY-ID LINK 0x08 0x00000000 down 0x10 0x004dd0b1 down 0x11 0x004dd0b1 down 0x12 0x004dd0b1 down 0x13 0x004dd0b1 up 0x14 0x004dd0b1 down 0x15 0x04820a05 down root@OpenWrt:~# gpioset gpiochip0 44=1 root@OpenWrt:~# mdio 9* DEV PHY-ID LINK 0x00 0x00000000 down 0x08 0x00000000 down 0x10 0x004dd0b1 down 0x11 0x004dd0b1 down 0x12 0x004dd0b1 down 0x13 0x004dd0b1 up 0x14 0x004dd0b1 down 0x15 0x04820a05 down root@OpenWrt:~# gpioset gpiochip0 59=0 root@OpenWrt:~# mdio 9* DEV PHY-ID LINK 0x00 0x00000000 down 0x10 0x004dd0b1 down 0x11 0x004dd0b1 down 0x12 0x004dd0b1 down 0x13 0x004dd0b1 up 0x14 0x004dd0b1 down 0x15 0x04820a05 down root@OpenWrt:~# gpioset gpiochip0 59=1 root@OpenWrt:~# mdio 9* DEV PHY-ID LINK 0x00 0x00000000 down 0x08 0x00000000 down 0x10 0x004dd0b1 down 0x11 0x004dd0b1 down 0x12 0x004dd0b1 down 0x13 0x004dd0b1 up 0x14 0x004dd0b1 down 0x15 0x04820a05 down Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: 301w: populate AQR firmware nameRobert Marko2024-01-26
| | | | | | | | | | Now that we have support for firmware loading via the kernel driver, it makes sense to populate the firmware name as well, so if its present the driver can load it. In later patches, loading the FW via NVMEM will be added as well. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: refresh 6.1 patchesÁlvaro Fernández Rojas2024-01-26
| | | | | | | | Refresh patches for Linux 6.1 which no longer apply cleanly after adding ipq4019 MDIO MDC rate fix pending patches. Fixes: 53f338be43e0 ("generic: 6.1: add pending patch for ipq4019 MDIO MDC rate fix") Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
* ipq807x: add support for loading Aquantia FW from NVMEM for NBG7815Christian Marangi2024-01-25
| | | | | | | Add support for loading Aquantia FW from NVMEM for Zyxel NBG7815 restoring correct functionality of the 10g port. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: add SMP affinity scriptRobert Marko2024-01-22
| | | | | | | | | By default Linux will default to most IRQ-s being mapped to core 0 which during high loads will completely swamp the core 0, so lets add the widely used script that has been floating around forums for a long time to try and optimize the IRQ mapping a bit. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq807x: prpl-haze: enable LED driver on device treeCheWei Chien2024-01-15
| | | | | | | Enable LED driver LP5562 on HAZE device tree and include its kernel module package on default package for HAZE. Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
* ipq807x: use devinfo MAC for Linksys MX4200Paweł Owoc2024-01-15
| | | | | | Some devices (MX42CF) have a wrong MAC address configuration. The correct one is located only on the devinfo partition. Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
* ipq807x: fix whitespace usagePaweł Owoc2024-01-15
| | | | | | Replace with tab and remove unused whitespaces Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
* qualcommax: Fix Buffalo WXR-5950AX12 wifi MACSamir Ibradžić2024-01-06
| | | | | | | | | | | | | | | | | | | | | Currently, WiFi interfaces on WXR-5950AX12 / WXR-6000AX12 devices come up with some MAC addresses inconsistent with vendor and Ethernet addresses. This adds a hotplug override in order to make it consistent with what is in u-boot env as well as OAM firmware where 1st radio MAC is set at Ethernet MAC + 8, and 2nd radio mac at Ethernet MAC + 16. fw_printenv | grep addr ethaddr=68:e1:dc:xx:xx:d8 ipaddr=192.168.11.1 wlan0addr=68:e1:dc:xx:xx:e0 wlan1addr=68:e1:dc:xx:xx:e8 wlan2addr=00:00:00:00:00:00 For OEM bootlog and MAC assagnment check https://openwrt.org/toh/buffalo/wxr-5950ax12#openwrt_uimage_tftp_bootlog Tested-by: Samir Ibradžić <sibradzic@gmail.com> # Buffalo WXR-6000AX12P Signed-off-by: Samir Ibradžić <sibradzic@gmail.com>
* ipq807x: add support for Linksys MX4200 V1 and V2Mohammad Sayful Islam2024-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linksys MX4200 is a 802.11ax Tri-band router/AP. Specifications: * CPU: Qualcomm IPQ8174 Quad core Cortex-A53 1.4GHz * RAM: 512MB of DDR3 * Storage: 512Mb NAND * Ethernet: 4x1G RJ45 ports (QCA8075) * WLAN: * 2.4GHz: Qualcomm QCN5024 2x2 802.11b/g/n/ax 574 Mbps PHY rate * 5GHz: Qualcomm QCN5054 2x2@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate * 5GHz: Qualcomm QCN5054 4x4@80MHz or 2x2@160MHz 802.11a/b/g/n/ac/ax 2402 PHY rate * LED-s: * RGB system led * Buttons: 1x Soft reset 1x WPS * Power: 12V DC Jack Installation instructions: Open Linksys Web UI - http://192.168.1.1/ca or http://10.65.1.1/ca depending on your setup. Login with your admin password. The default password can be found on a sticker under the device. To enter into the support mode, click on the “CA” link and the bottom of the page. Open the “Connectivity” menu and upload the squash-factory image with the “Choose file” button. Click start. Ignore all the prompts and warnings by click “yes” in all the popups. The Wifi radios are turned off by default. To configure the router, you will need to connect your computer to the LAN port of the device. Then you would need to write openwrt to the other partition for it to work - First Check booted partition fw_printenv -n boot_part - Then install Openwrt to the other partition if booted in slot 1: mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4200v(X)-squashfs-factory.bin alt_kernel - If in slot 2: mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4200v(X)-squashfs-factory.bin kernel Replace (X) with your model version either 1 or 2 Signed-off-by: Mohammad Sayful Islam <sayf.mohammad01@gmail.com> Reviewed-by: Robert Marko <robimarko@gmail.com>
* ipq807x: cax1800: fix blsp1_spi1 status with okayPetr Štetiar2024-01-03
| | | | | | | | `ok` status is obsolete and thus `okay` should be used instead: spi@78b9000: status:0: 'ok' is not one of ['okay', 'disabled', 'reserved'] Signed-off-by: Petr Štetiar <ynezz@true.cz>
* qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTSSamir Ibradžić2023-12-25
| | | | | | | | | | | | * Revert the switch_lan_bmp and switch_wan_bmp to match the values from the original device support DTS * Add specific malibu_first_phy_addr, as it differs from default for this device Fixes: #14234 Reviewed-by: Robert Marko <robimarko@gmail.com> Tested-by: Samir Ibradžić <sibradzic@gmail.com> # Buffalo WXR-6000AX12P Signed-off-by: Samir Ibradžić <sibradzic@gmail.com>
* ipq807x: add support for ZTE MF269Chukun Pan2023-12-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specifications: SoC: Qualcomm IPQ8071A RAM: 512MB of DDR3 Flash1: Eon EN25S64 8MB Flash2: MX30UF2G18AC 256MB Ethernet: 2x 2.5G RJ45 port Phone: 1x RJ11 port (SPI) USB: 1x Type-C 2.0 port WiFi1: QCN5024 2.4GHz WiFi2: QCN5054 5GHz Button: Reset, WPS Flash instructions: 1. Connect the router via serial port (115200 8N1 1.8V) 2. Download the initramfs image, rename it to initramfs.bin, and host it with the tftp server. 3. Interrupt U-Boot and run these commands: tftpboot initramfs.bin bootm 4. After openwrt boots up, use scp or luci web to upload sysupgrade.bin to upgrade. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Robert Marko <robimarko@gmail.com>
* ipq807x: fix edgecore EAP102 lan/wanDirk Buchwalder2023-12-13
| | | | | | | | | | | | | | | We have a report in the forum, that lan/wan is non-functional on the EAP102 (https://forum.openwrt.org/t/edgecore-eap102/178449) Fixing that by swapping label and phy-handle of the dp-nodes and updating the lan/wan bmp. Note: the original commiter of the device support seems absent for a long time in the forum and on the OpenWrt github group. Tested-by: Antonio Della Selva <antonio.dellaselva@uniurb.it> Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de> Reviewed-by: Robert Marko <robimarko@gmail.com>
* ipq807x: add Arcadyan AW1000 supportChukun Pan2023-12-13
| | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specification: SoC: Qualcomm IPQ8072A Flash: Toshiba NAND 1GiB RAM: 1 GiB of DDR3 466 MHz Ethernet: 4x 1Gbps + 1x 2.5Gbps WiFi1: QCN5024 2.4GHz ax 4x4 WiFi2: QCN5054 5GHz ax 4x4 Button: WiFi, WPS, Reset Modem: RG500Q-EA USB: 1 x USB 3.0 Power: DC 12V 4A Flash instructions: 1. Download the initramfs image, rename it to initramfs.bin, and host it with tftp server. 2. Interrupt U-Boot and run these commands: tftpboot initramfs.bin bootm 3. After openwrt boots up, use scp or luci web to upload sysupgrade.bin to upgrade. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Robert Marko <robimarko@gmail.com>
* qualcommax: cleanup whitespace and sort-orderChukun Pan2023-12-13
| | | | | | | Replace blanks with tabs, also sort base-files alphabetically. Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Robert Marko <robimarko@gmail.com>
* kernel: add support for Toshiba TH58NYG3S0HBAI4Chukun Pan2023-12-13
| | | | | | | | | | | | | | | | | | | | | | Correct oob size from 128 to 256 for Toshiba TH58NYG3S0HBAI4 flash. Since it is not ONFI compliant NAND, the model name cannot be read from anywhere, add a static NAND ID entry to correct this. However, the NAND ID of this flash is inconsistent with the datasheet. The actual NAND ID is only 4 ID bytes, the last ID byte is missing.[1] Maybe this flash is counterfeit, or maybe it's another problem. Another Toshiba flash had the same problem before. Refer to commit a83dc6b ("kernel: move Toshiba-TC58NVG0S3H patch to ipq40xx"), put the patch into qualcommax target to avoid affecting other devices. The patch is verified on Arcadyan AW1000. [1] Datasheet available at (the ID table is on page 50): https://europe.kioxia.com/content/dam/kioxia/newidr/productinfo/datasheet/201910/DST_TH58NYG3S0HBAI4-TDE_EN_31565.pdf Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Robert Marko <robimarko@gmail.com>
* kernel: bump 6.1 to 6.1.64John Audia2023-11-29
| | | | | | | | | | | | | | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.64 Removed upstreamed: ixp4xx/patches-6.1/0001-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch[1] mvebu/patches-6.1/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch[2] qualcommax/patches-6.1/0026-v6.7-clk-qcom-ipq8074-drop-the-CLK_SET_RATE_PARENT-flag-f.patch[3] Manually rebased: bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=3b93096d29c5b9ca2af94be4ee9949c1767acf17 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=b3fd9db79e30d5eb5f76ef1f5b7e4f444af574ea 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=877080a3490102da26b8d969588159b2385f739e Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
* qualcommax: convert to nvmem-layoutRosen Penev2023-11-25
| | | | | | nvmem-cells is deprecated Signed-off-by: Rosen Penev <rosenp@gmail.com>
* kernel: bump 6.1 to 6.1.63John Audia2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.63 Removed upstreamed: generic/backport-6.1/815-v6.6-2-leds-turris-omnia-Drop-unnecessary-mutex-locking.patch generic/backport-6.1/815-v6.7-1-leds-turris-omnia-Do-not-use-SMBUS-calls.patch ixp4xx/patches-6.1/0007-watchdog-ixp4xx-Make-sure-restart-always-works.patch Manually rebased: bcm27xx/patches-6.1/950-0606-hwrng-bcm2835-sleep-more-intelligently.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=7d0e60e4ff840e97fb18afb2a7344442c10a6fdf 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=63cdeb20ee3bfef820b045b8d3b8395f9f815a74 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.63&id=8803da01fe1b4ca3d37745283f7e73c6c2558c0c Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
* qualcommax: add addresses to DP nodesRobert Marko2023-11-18
| | | | | | | | | | | | | | | | | DP nodes live under the soc node, and since soc is a simple bus it requires node adresses to be present. So, simply add the node addreses to avoid the following dtc warning: Warning (unit_address_vs_reg): /soc/dp1: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp2: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp3: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp4: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp5: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp6: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp5-syn: node has a reg or ranges property, but no unit name Warning (unit_address_vs_reg): /soc/dp6-syn: node has a reg or ranges property, but no unit name Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: fix line endings in ESS dt-bindingsRobert Marko2023-11-15
| | | | | | | It seems that ESS dt-bindings somehow ended up with Windows line endings, this is obviously incorrect, so lets convert it to UNIX endings. Signed-off-by: Robert Marko <robimarko@gmail.com>
* ipq807x: fix typo in WAX630 for switch lan bmpChristian Marangi2023-11-15
| | | | | | | | In fixing ipq8074 WAX630 dts, there was a typo in the switch lan bmp. Fix it to fix compilarion error. Fixes: f3cd4bfb7f69 ("ipq807x: fix multiple error on ESS switch port define") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq807x: fix multiple error on ESS switch port defineChristian Marangi2023-11-15
| | | | | | | | | | | Fix multiple error on ESS switch port define. - Fix wrong switch CPU and WAN bmp define. (many times wan port are actually set in lan mask and lan port in wan mask) - Renumber phyinfo port, use port_id instead of phy_address as it doesn't make sense using that for port enumeration - Drop additional port for devices that have them not connected. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* qualcommax: move switch tick mode setting to ESS DTSIRobert Marko2023-11-14
| | | | | | | | Every board in qualcommax is using the same BM and TM switch tick modes, so instead of specifying them in each board lets just set them in the ESS DTSI directly. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: use defines for MAC mode settingRobert Marko2023-11-14
| | | | | | | | | | Now that we have the MAC modes defined in DT bindings, lets replace all of the raw hex values with defines. While we are here, we can drop the disabled UNIPHY-s as that is the default value in the ESS DTSI. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: set default switch MAC modesRobert Marko2023-11-14
| | | | | | | | | | Every board that has the switch enabled needs to have MAC modes defined for all 3 UNIPHY instances. So, instead of having to at least put the disabled MAC mode for UNIPHY-s let disable them by default and then boards can override it. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: add bindings for MAC modesRobert Marko2023-11-14
| | | | | | | | | | Since every board needs to define the correct MAC modes, it makes sense to document the allowed hex values with a humanly readable name. So, lets document all of the allowed MAC modes from SSDK 12.4 as bindings, so later we can replace all of the hex values in DTS-es with these. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qca-ssdk: fix unsupported scenario with PORT1 not declared in switch bmpChristian Marangi2023-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 947b44d ("ipq807x: fix wrong define for LAN and WAN ess mask") started fixing wrong switch_lan_bmp that defined lan there weren't actually present. This displayed a fragility in the malibu phy init code in qca-ssdk. Add patch to fix this. Also update each DTS with the new required property if needed. The new binding malibu_phy_start_addr is required with devices that place the malibu first PHY referring port1 on a different PHY addres than 0. The most common configuration is 0 but some device (for example Qnap 301W) place the malibu PHY at an offset to address 16. Refer to ipq8074-ess dtsi for extensive description on how to derive this value. Quoting the patch detailed description: The usage of first_phy_addr is EXTREMELY FRAGILE and results in dangerous results if the OEM (or anyone that by chance try to implement things in a logical manner) deviates from the default values from the "magical template". To be in more details. With QSDK 12.4, some tweaks were done to improve autoneg and now on every call of port status, the phydev is tried to add. This resulted in the call and log spam of an error with ports that are actually not present on the system with qsdk reporting phydev is NULL. This itself is not an error and printing the error is correct. What is actually an error from ages is setting generic bitmap reporting presence of port that are actually not present. This is very common on OEM where the switch_lan_bmp is always a variant of 0x1e (that on bitmap results in PORT1 PORT2 PORT3 PORT4 present) or 0x3e (PORT1 PORT2 PORT3 PORT4 PORT5). Reality is that many device are used as AP with one LAN port or one WAN port. (or even exotic configuration with PORT1 not present and PORT2 PORT3 PORT4 present (Xiaomi 3600) With this finding one can say... ok nice, then lets update the DT and set the correct bitmap... Again world is a bad place and reality is that this cause wonderful regression in some case of by extreme luck the first ever connected port working and the rest of the switch dead. The problem has been bisected to all the device that doesn't have the PORT1 declared in any of the bitmap. With this prefaction in mind, on to the REAL problem. malibu_phy_hw_init FOR SOME REASON, set a global variable first_phy_addr to the first detected PHY addr that coincidentally is always PORT1. PORT1 addr is 0x0. The entire code in malibu_phy use this variable to derive the phy addrs in some function. Declaring a bitmap where the PORT1 is missing (or worse PORT4 the only one connected) result in first_phy_addr set to 1 or whatever phy addr is detected first setting wrong value all over the init stage. To fix this, introduce a new binding malibu_first_phy_addr to manually declare the first phy that the malibu PHY driver should use and permit to detach it from port bmp detection. The legacy detection is kept for compatibility reason. Fixes: #13945 Fixes: 947b44d9ae17 ("ipq807x: fix wrong define for LAN and WAN ess mask") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Tested-by: Robert Marko <robimarko@gmail.com> # Qnap 301W Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* ipq807x: fix wrong define for LAN and WAN ess maskChristian Marangi2023-11-10
| | | | | | | | | | | | | | | switch_lan_bmp and switch_wan_bmp have wrong values and now cause problems with the new version of the qca-ssdk. Fix the wrong entry and drop the redundant switch_cpu_bmp. Also introduce some convenient define to better understand values in this map. Fixes: eea264feadcf ("kernel: qca-ssdk: update to 12.4") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Tested-by: Robert Marko <robimarko@gmail.com> # Dynalink AX3600 and Qnap 301W Reviewed by: Robert Marko <robimarko@gmail.com>
* ipq807x: add support for Yuncore AX880Isaev Ruslan2023-11-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPECIFICATION: - Chipset: IPQ8072A +QCN5054+QCN5024+QCA8081*2 - Flash NOR-8MB AND NAND-128MB - RAM 1Gb DDR - IEEE 802.11: 802.11ax/ac/b/g/n - 4*4 2.4G Wi-Fi standard 802.11b/g/n/ax - 4*4 5.8G Wi-Fi Standard 802.11 a/n/ac/ax - 2x 1 Gbps Ethernet (QCA8081) with 802.3at PoE input support - 1x Reset - 1x Bluetooth(optional) - 1x DC Port 12V 3A - 4x Antenna IPEX Connector, 3dBi omni antennas - Data Rate: 3657Mbps ( 2.4G: 1182Mbps (11ax 4x4); 5.8G: 2475Mbps (11ax 4x4)) - RF Power: 2.4g ≤ 20dBm; 5.8g ≤ 19dBm - LED light: Sys; 5.8G wifi; 2.4G wifi; WAN; LAN - Max Power Consumption: ≤ 22W - Size: 198mm * 198mm * 41.02mm BACKUP YOUR STOCK FIRMWARE: ``` export device=ax880 mkdir -p /tmp/fw_dump_$device cd /tmp/fw_dump_$device dmesg > dmesg_$device.log dtc -I fs /sys/firmware/devicetree/base > $device.dts cat /proc/device-tree/model > model cat /proc/mtd > proc_mtd while read p; do mtd_dev=$(echo $p | cut -d: -f1) echo $mtd_dev dd if=/dev/$mtd_dev of=$mtd_dev done < proc_mtd md5sum * > md5sum.log tar -cvzf ../$device.tar.gz . export sum=$(md5sum /tmp/$device.tar.gz | cut -d' ' -f1) mv ../$device.tar.gz /tmp/${device}_${sum}.tar.gz echo fw backup saved to: /tmp/${device}_${sum}.tar.gz ``` Upload your backup via tftp to the safe place. INSTALLATION: 1. stock firmware web ui Rename factory.bin fw image file to factory.ubin. Flash this image like ordinary stock fw upgrade. 2. stock firmware telnet method Enter telnet cli (login: root, password: 476t*_f0%g09y) and upload factory.bin fw image and rename it to factory.ubin `cd /tmp && wget <your_web_server_ip>/factory.ubin` `sysupgrade factory.ubin 3. initramfs method Put openwrt-ipq807x-generic-yuncore_ax880-initramfs-uImage.itb to your TFTP server and rename it to ax880.initram Enable serial console and enter to the u-boot cli. Exec these commands: `tftpboot <your_tftp_server_ip>:ax880.initram` `dhcp` When downloading is finished: `bootm` After booting the device, you need to upload to the device factory.ubi fw image. ``` cd /tmp && wget <your_web_server_ip>/factory.ubi` export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1) export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1) ubiformat /dev/${rootfs} -y -f factory.ubi ubiformat /dev/${rootfs_1} -y -f factory.ubi reboot ``` 4. u-boot factory.ubi image method Put openwrt-ipq807x-generic-yuncore_ax880-squashfs-factory.ubi to your TFTP server and rename it to ax880.ubi Enter u-boot cli and exec these commands: `tftpboot <your_tftp_server_ip>:ax880.ubi` `dhcp` After downloading is finished: `flash rootfs` `flash rootfs_1` `reset` 5. u-boot factory.bin method Put openwrt-ipq807x-generic-yuncore_ax880-squashfs-factory.bin to your TFTP server and rename it to ax880.bin Enter u-boot cli and exec these commands: `tftpboot <your_tftp_server_ip>:ax880.bin` `dhcp` After downloading is finished: `imgaddr=$fileaddr && nand device 0` Erase rootfs memory: `nand erase 0x00000000 0x03400000` Write rootfs: `nand write $fileaddr 0x00000000 $filesize` Erase rootfs_1 memory: `nand erase 0x3c00000 0x3400000` Write rootfs_1 `nand write $fileaddr 0x3c00000 $filesize` `reset` STOCK FIRMWARE RECOVERY: Boot initramfs image. Upload your rootfs mtd partition to the device using scp or download it from the device using wget. Enter device ssh cli and exec: ``` cd /tmp && wget <your_web_server_ip>/mtd21` export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1) export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1) ubiformat /dev/${rootfs} -y -f /tmp/mtd21 ubiformat /dev/${rootfs_1} -y -f /tmp/mtd21 reboot ``` Signed-off-by: Isaev Ruslan <legale.legale@gmail.com> Reviewed-by: Robert Marko <robimarko@gmail.com>
* qualcommax: backport missing SMEM ID-s for SSDKRobert Marko2023-11-09
| | | | | | | | SSDK has switched to using the upstream SMEM helper to get the SoC ID and then look it up in the QCA SMEM ID header, so we need these in order for SSDK to compile as they are currently undefined. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: refresh patchesRobert Marko2023-11-08
| | | | | | | It seems that patches were not refreshed during last kernel bump, so lets refresh them. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: fixup patch numberingRobert Marko2023-11-08
| | | | | | | It seems that I forgot one zero in the patch numbering while marking these as backports, so lets fix it. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: ipq807x: move subtarget specific kernel optionsRobert Marko2023-11-02
| | | | | | | | | | | | | | Currently, qualcommax target contains the full kernel config for the ipq807x subtarget, but since I am working on ipq60xx as well it makes sense to split out the ipq807x specific kernel options to subtarget config. ipq60xx will use the same approach and use subtarget config. Should result in the same end kernel config, verified by comparing the generated kernel .config. Signed-off-by: Robert Marko <robimarko@gmail.com>
* qualcommax: only build initramfs if CONFIG_TARGET_ROOTFS_INITRAMFS is setFlorian Maurer2023-10-29
| | | | | | This makes it possible to build the ipq807x netgear-wax218 without initramfs - which is required for downstream projects (gluon) Signed-off-by: Florian Maurer <f.maurer@outlook.de>