Commit Graph

57 Commits

Author SHA1 Message Date
Paweł Owoc
879af72b48 qualcommax: ipq807x: Fix MAC addresses usage for RAX120v2
Currently, 6 MAC addresses are read from the "boarddata1" partition and set for network interfaces in sequence.
This partition only contains 3 MAC addresses:
1. lan mac
2. wan mac
3. wlan5g mac
As result only lan2, lan3 and lan4 have correct (OUI) MAC addresses.
lan1, lan5 and wan interfaces get MAC addresses with incorrect OUI from random data on "boarddata1" partition.

This commit fix this and use first MAC for lan and second MAC for wan interfaces.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
2024-03-18 22:19:42 +01:00
Chukun Pan
1388444f9b qualcommax: ipq60xx: set PHY mode to psgmii for port 5
The port 5 of most ipq60xx devices is connected to qca8075,
a few are connected to qca8081. So assume that the default
connection is qca8075 and set the phy mode to psgmii.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-18 22:17:20 +01:00
Chukun Pan
3075d56c4c qualcommax: set phy-mode to sgmii for QCA8081
The dp5 node uses psgmii by default, corrected
the phy-mode to sgmii for the qca8081 phy.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-18 22:17:20 +01:00
Chukun Pan
a75102bbbc qualcommax: dts: cleanup whitespace
Replace blanks with tabs, remove extra blank lines.
Also add new lines as appropriate.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2024-03-18 22:17:20 +01:00
INAGAKI Hiroshi
f7275dedd4 qualcommax: ipq807x: fix LEDs on Buffalo WXR-5950AX12
On Buffalo WXR-5590AX12, some LEDs don't have "function" property and
only "color" property is available for the newer binding of LED on
Linux Kernel.
2e659930d3 ("qualcommax: drop redundant label with new LED
color/function format") removes "label" property from LEDs, then,
multiple "<color>:" (ex.: "white:"/"red:") will be appeared as LED names
and renamed to "<color>:_<num>" ("ex.: "white:_1", "green:_2", ...) by
kernel.

logs:

[    5.372863] leds-gpio leds: Led white: renamed to white:_1 due to name collision
[    5.375796] leds-gpio leds: Led red: renamed to red:_1 due to name collision

/sys/class/leds:

root@OpenWrt:/# ls /sys/class/leds/
red:         red:power    white:       white:power
red:_1       red:wlan     white:_1     white:wlan

Fix this issue by adding missing "function" property to LEDs on Buffalo
WXR-5950AX12.
Note: there are no appropriate functions in dt-bindings/leds/common.h
for some LEDs, so use the hardcoded strings for them instead.

Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-17 17:31:02 +01:00
INAGAKI Hiroshi
5c1c823c4a qualcommax: ipq807x: fix LEDs on QNAP QHora-301W
On QNAP QHora-301W, all LEDs don't have "function" property and only
"color" property is available for the newer binding of LED on Linux
Kernel.
2e659930d3 ("qualcommax: drop redundant label with new LED
color/function format") removes "label" property from LEDs, then,
multiple "<color>:" (ex.: "amber:"/"green:"/"red:") will be appeared as
LED names and renamed to "<color>:_<num>" ("ex.: "green:_1", "green:_2",
...) by kernel.

logs:

[    4.246494] leds-gpio leds: Led green: renamed to green:_1 due to name collision
[    4.248978] leds-gpio leds: Led green: renamed to green:_2 due to name collision
[    4.256345] leds-gpio leds: Led green: renamed to green:_3 due to name collision
[    4.263770] leds-gpio leds: Led green: renamed to green:_4 due to name collision
[    4.271105] leds-gpio leds: Led amber: renamed to amber:_1 due to name collision
[    4.278487] leds-gpio leds: Led green: renamed to green:_5 due to name collision
[    4.285856] leds-gpio leds: Led amber: renamed to amber:_2 due to name collision
[    4.293257] leds-gpio leds: Led green: renamed to green:_6 due to name collision
[    4.300616] leds-gpio leds: Led amber: renamed to amber:_3 due to name collision
[    4.308002] leds-gpio leds: Led green: renamed to green:_7 due to name collision
[    4.315384] leds-gpio leds: Led amber: renamed to amber:_4 due to name collision
[    4.322760] leds-gpio leds: Led green: renamed to green:_8 due to name collision
[    4.330135] leds-gpio leds: Led amber: renamed to amber:_5 due to name collision

/sys/class/leds:

amber:          amber:_4        green:_2        green:_6
amber:_1        green:_5        green:_3        green:_7
amber:_2        green:          green:_4        green:_8
amber:_3        green:_1        green:_5        red:

Fix this issue by adding missing "function" (and "function-enumerator")
property to LEDs on QNAP QHora-301W.
Note: there are no appropriate functions in dt-bindings/leds/common.h
for some LEDs, so use the hardcoded strings for them instead.

Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2024-03-17 17:31:02 +01:00
Mantas Pucka
904aa43865 qualcommax: ipq60xx: mango-dvk: fix QCA8081 reset timings
Add missing reset delay properties for QCA8081 PHY.
Without delays PHY operation is unreliable.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
2024-03-15 09:13:46 +02:00
Dirk Buchwalder
93610492b6 qualcommax: ipq60xx: add support for netgear wax214
Netgear WAX214 is a 802.11 ax dual-band AP
    with PoE. (similar to Engenius EWS357APV3)

    Specifications:

        •     CPU: Qualcomm IPQ6010 Quad core Cortex-A53
        •     RAM: 512MB of DDR3
        •     Storage: 128MB NAND (Macronix MX30UF1G18AC)
        •     Ethernet: 1x 1G RJ45 port (QCA8072) PoE
        •     WIFI:
              2.4GHz: Qualcomm QCN5022 2x2 802.11b/g/n/ax 574 Mbps PHY rate
              5GHz: Qualcomm QCN5052 2x2 802.11a/b/g/n/ac/ax 1201 PHY rate

        •     LEDs:
              4 x GPIO-controlled LEDs
                - 1 Power LED (orange)
                - 1 LAN LED (blue)
                - 1 WIFI 5g LED (blue)
                - 1 WIFI 2g LED (blue)
                black_small_square  Buttons: 1x soft reset
                black_small_square  Power: 12V DC jack or PoE (802.3af )

            An populated serial header is onboard, format is
             1.25mm 4p (DF13A-4P-1.25H)
            RX/TX is working, bootwait is active, secure boot is not
            enabled.

            The root password of the stock firmware is unknown,
            but failsafe mode can be entered to reset the password.

            Installation Instructions:

                - obtain serial access
                - stop auto boot (press "4", Entr boot command line
		  interface)
                - setenv active_fw 0 (to boot from the primary rootfs,
                  or set to 1 to boot from the secondary rootfs
                  partition)
                - saveenv

                - tftpboot the initramfs image
                - bootm

                - copy
		  openwrt-qualcommax-ipq60xx-netgear_wax214-squashfs-factory.ubi
                  to the device
                - write the image to the NAND:
                   - cat /proc/mtd and look for rootfs partition (should
		     be mtd11,
                     or mtd12 if you choose active_fw 1)
                   - ubiformat /dev/mtd11 -f -y
		     openwrt-qualcommax-ipq60xx-netgear_wax214-squashfs-factory.ubi
                - reboot

            Note: the firmware is senao-based. But I was unable to build
                  a valid senao-header into the image.
                  Maybe they changed the header format and senaoFW isn't
                  working any more.

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
2024-03-05 06:34:35 +01:00
Paweł Owoc
70fd815e57 qualcommax: ipq807x: add support for Linksys MX5300
Hardware specification:
========
SoC: Qualcomm IPQ8072A
Flash: 512MB (Winbond W29N04GZBIBA)
RAM: 1GB (2x Nanya DDR3L NT5CC256M16ER-EK)
Ethernet: 5x 10/100/1000Mbps (Qualcomm QCA8075)
WiFi1: 5GHz ac 4x4 (Qualcomm QCA9984 + Skyworks SKY85746-11) - channels 100-169
WiFi2: 5GHz ax 4x4 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 36-64
WiFi3: 2.4GHz ax 4x4 (Qualcomm QCN5024 + Skyworks SKY8340-11)
IoT: Bluetooth 5, Zigbee and Thread (Qualcomm QCA4024 + Skyworks SE2433T-R)
IoT Flash: 4MB (Macronix MX25R3235F)
RTC: ST M41T00S
LED: 1x RGB status (NXP PCA9633)
USB: 1x USB 3.0
Button: WPS, Reset

Flash instructions:
========
1. Manually upgrade firmware using openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin image.
More details can be found here: https://www.linksys.com/hk/support-article?articleNum=274497
After first boot check actual partition:
- fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin kernel
and in case of 1:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin alt_kernel

2. Installation using serial connection from OEM firmware (default login: root, password: admin):
- fw_printenv -n boot_part
In case of 2:
- flash_erase /dev/mtd21 0 0
  nandwrite -p /dev/mtd21 openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin
or in case of 1:
- flash_erase /dev/mtd23 0 0
  nandwrite -p /dev/mtd23 openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin
After first boot install firmware on second partition:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin kernel
or:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin alt_kernel

3. Installation from initramfs image using USB FAT32 formatted drive:
Stop u-boot and run:
- usb start && fatload usb 0:1 $loadaddr openwrt-qualcommax-ipq807x-linksys_mx5300-initramfs-uImage.itb && bootm $loadaddr
Write firmware to the flash from initramfs:
- mtd -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin kernel
and:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx5300-squashfs-factory.bin alt_kernel

4. Back to the OEM firmware:
- mtd -e kernel -n write FW_MX5300_1.1.9.200251_prod.img kernel
and:
- mtd -r -e alt_kernel -n write FW_MX5300_1.1.9.200251_prod.img alt_kernel

5. USB recovery:
- fw_setenv usbimage 'openwrt-qualcommax-ipq807x-linksys_mx5300-initramfs-uImage.itb'
  fw_setenv bootusb 'usb start && fatload usb 0:1 $loadaddr $usbimage && bootm $loadaddr'
  fw_setenv bootcmd 'run bootusb; aq_load_fw && if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

Notes:
========
IoT device is accesible over spi. Not yet supported.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2024-02-23 13:34:59 +01:00
Mantas Pucka
44168fda78 qualcommax: ipq60xx: Add 8devices Mango DVK
8devices Mango DVK is a single board computer / devkit for 8devices Mango
system-on-module (SoM).

Specifications:
* CPU: Qualcomm IPQ6010 Quad core Cortex-A53 1.8GHz
* RAM: 512 MB
* Storage:
    * 32 MB serial NOR flash (on SoM)
    * 256 MB parallel NAND flash (on DVK)
* Ethernet:
    * 2x1G RJ45 ports(QCA8072 or QCA8075)
    * 1x2.5G RJ45 port (QCA8081)
    * 1xSFP (shares SGMII with QCA8081)
* Switch: Qualcomm Atheros IPQ6010
* WLAN:
    * 2.4GHz: QCN5121 2x2 802.11b/g/n/ax 574 Mbps PHY rate
    * 5GHz: QCN5152 2x2 802.11a/n/ac/ax 1201 Mbps PHY rate
* USB:
    * 1x USB3.0 Type-A port
    * 1x USB2.0 available at mini PCIe slot
* PCIe: 1x mini PCIe slot 1xLane Gen3 (8GT/s)
* SD/eMMC (on a single shared bus - only one can be active):
    * micro SD slot
    * eMMC module connector
* LEDs:
    * Green power led (not controllable)
    * Green 2.4GHz radio led (GPIO 67)
    * Green 5GHz radio led (GPIO 66)
* Buttons:
    * 1x (WPS GPIO79) button
* GPIOs: 2.54mm header brings out 18 GPIOs (1.8V level)
* UART: 4-pin UART header (3.3V level)
    * 115200 8N1, 3.3V-Tx-Rx-GND (3.3V is pin 1 close to boot-switch SW2)
* Power:
    * PoE IN on 2.5G port (passive 24-48V)
    * DC power terminal (12-58V)

Installation instructions:

Vendor image format is compatible with squashfs-sysupgrade image. Run:

sysupgrade -n -F openwrt-qualcommax-ipq60xx-8devices_mango-dvk-squashfs-sysupgrade.bin

Signed-off-by: Mantas Pucka <mantas@8devices.com>
2024-02-21 21:42:23 +01:00
Mantas Pucka
548c5935bf qualcommax: ipq60xx: set correct PHY mode for port 0-4
[port 8ed390a (qualcommax: set correct PHY mode for port 0-4) to ipq60xx]

Port 0-4 have the mode set to SGMII instead of PSGMII. Now that we use
he 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 ipq6018-ess.dtsi.

Signed-off-by: Mantas Pucka <mantas@8devices.com>
2024-02-21 21:42:23 +01:00
Robert Marko
3eb8782b49 qualcommax: ipq807x: wax630: correct UNIPHY2 MAC mode
UNIPHY2 on the WAX630 is connected to a QCA8081 PHY which is only 2.5G and
it does not support using USXGMII at all but rather only SGMII or SGMII+.

Tested-by: Kristian Skramstad <kristian+github@83.no>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-02-17 22:14:17 +01:00
Robert Marko
70498cb386 qualcommax: ipq807x: correct PHY mode for AQR
Interfaces that have AQR-s attached to them are using USXGMII and not just
the default SGMII.
This was fine until SSDK added some sanity checking and now on Qnap 301W it
would fail with:
[   24.740197] nss-dp 3a001800.dp5 10g-1 (uninitialized): failed to connect to phy device
[   24.740264] nss-dp: probe of 3a001800.dp5 failed with error -14

Since this is not Qnap 301W specific lets fix it subtarget wide by
declaring the correct PHY mode for 10G AQR-s.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-02-17 17:39:22 +01:00
Robert Marko
b38a1d6c65 qualcommax: ipq807x: 301w: correct PHY mode for AQR
Interfaces that have AQR-s attached to them are using USXGMII and not just
the default SGMII.
This was fine until SSDK added some sanity checking and now on Qnap 301W it
would fail with:
[   24.740197] nss-dp 3a001800.dp5 10g-1 (uninitialized): failed to connect to phy device
[   24.740264] nss-dp: probe of 3a001800.dp5 failed with error -14

So, lets fix 10G AQR ports by declaring the correct PHY mode.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-02-17 17:32:13 +01:00
Chukun Pan
ee047edd2a qualcommax: AW1000: add qca8081 PHY LED configuration
Since we can configure the PHY LED of the qca8081,
add a configuration for this device.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2024-02-16 13:50:19 +01:00
Chukun Pan
c38ffd45b9 qualcommax: AW1000: sync qca807x PHY dts changes
The dts of Arcadyan AW1000 forgot to convert qca807x PHY
to PHY package implementation. This commit fix it.

Fixes: 0ab4b92 ("qualcommax: convert qca807x PHY to PHY package implementation")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2024-02-16 13:50:19 +01:00
Chukun Pan
b61ecb7d75 ipq807x: add support for CMCC RM2-6
Hardware specifications:
  SoC: Qualcomm IPQ8070A
  RAM: 512MB of DDR3
  Flash: 256MB Micron NAND
  Ethernet: 2x 1G RJ45 port
  WiFi1: QCN5024 2x2 2.4GHz
  WiFi2: QCN5054 2x2 5GHz
  Fan: 1x GPIO controlled
  Button: Reset, WPS

Flash instructions:
  Upload factory.bin in stock firmware's upgrade page.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2024-02-15 18:44:35 +01:00
Paweł Owoc
3aae56a524 qualcommax: ipq807x: MX4200 convert qca807x PHY to new implementation
Convert qca807x PHY to new implementation like for other devices.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2024-02-15 18:30:23 +01:00
Robert Marko
deda92c16c qualcommax: remove usage of malibu_first_phy_addr
Now that Malibu (QCA807x) PHY is using the upstream driver, we dont need
support to define address of the first PHY in package, so remove the
malibu_first_phy_addr DTS property.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-02-15 18:25:48 +01:00
Christian Marangi
e4f438b9dd
qualcommax: apply special PHY LEDs configuration for Xiaomi AX9000
Xiaomi AX9000 apply a special PHY LEDs configuration where the unique
green LED for each qca807x PHY port is turned on also on 1000Mbps link.

Apply this special configuration to reflect original implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-02-11 21:15:22 +01:00
Christian Marangi
4d7b1f92a4
qualcommax: apply special PHY LEDs configuration for Xiaomi AX3600
Xiaomi AX3600 apply a special PHY LEDs configuration where the unique
green LED for each qca807x PHY port is turned on also on 1000Mbps link.

Apply this special configuration to reflect original implementation.

Also enable CONFIG_PHYLIB_LEDS to actually expose the PHY LEDs if
defined in DT.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-02-11 21:13:50 +01:00
Christian Marangi
0ab4b9201e
qualcommax: convert qca807x PHY to PHY package implementation
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>
2024-02-11 21:13:42 +01:00
Christian Marangi
8ed390ac76
qualcommax: set correct PHY mode for port 0-4
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>
2024-02-11 21:12:29 +01:00
Christian Marangi
0222e48d73
qualcommax: fix wrong PHY node definition for Buffalo WXR-5950AX12
Commit d737ae99cb ("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: d737ae99cb ("qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-02-11 16:08:05 +01:00
Mantas Pucka
23deb4ac90
qualcommax: add ipq60xx support
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>
2024-02-09 14:01:51 +01:00
Christian Marangi
b7a7a793b1
qualcommax: convert to new LED color/function format where possible
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>
2024-02-07 14:48:43 +01:00
Christian Marangi
2e659930d3
qualcommax: drop redundant label with new LED color/function format
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>
2024-02-07 14:48:42 +01:00
Chukun Pan
3a073a0212
qualcommax: dts: add reset delay to qca8081 phy
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>
2024-01-30 14:34:28 +01:00
Christian Marangi
75ad5c2414
qualcommax: switch to qca8081 upstream PHY driver
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>
2024-01-27 19:09:25 +01:00
Robert Marko
652d72260d
qualcommax: 301w: provide AQR FW via NVMEM cells
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>
2024-01-26 15:30:02 +01:00
Robert Marko
845caa8d46
qualcommax: 301w: correct AQR reset GPIO-s
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>
2024-01-26 15:30:02 +01:00
Robert Marko
137694eaff
qualcommax: 301w: populate AQR firmware name
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>
2024-01-26 15:29:54 +01:00
Christian Marangi
7ed1cca8d6
ipq807x: add support for loading Aquantia FW from NVMEM for NBG7815
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>
2024-01-25 22:20:27 +01:00
CheWei Chien
fb45194305
ipq807x: prpl-haze: enable LED driver on device tree
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>
2024-01-15 16:59:57 +01:00
Paweł Owoc
45f86a1278
ipq807x: fix whitespace usage
Replace with tab and remove unused whitespaces

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
2024-01-15 16:52:08 +01:00
Mohammad Sayful Islam
46a2490e8f ipq807x: add support for Linksys MX4200 V1 and V2
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>
2024-01-06 16:13:23 +01:00
Petr Štetiar
7ddd3abd27
ipq807x: cax1800: fix blsp1_spi1 status with okay
`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>
2024-01-03 08:04:53 +00:00
Samir Ibradžić
d737ae99cb qualcommax: Fix Buffalo WXR-5950AX12 Ethernet DTS
* 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>
2023-12-25 19:14:26 +01:00
Chukun Pan
c22aa0be3e ipq807x: add support for ZTE MF269
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>
2023-12-14 10:30:19 +08:00
Dirk Buchwalder
9b598ec8d5
ipq807x: fix edgecore EAP102 lan/wan
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>
2023-12-13 17:32:36 +01:00
Chukun Pan
fbcda3616e
ipq807x: add Arcadyan AW1000 support
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>
2023-12-13 17:29:15 +01:00
Rosen Penev
eadf2ead4e
qualcommax: convert to nvmem-layout
nvmem-cells is deprecated

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-11-25 22:51:32 +01:00
Robert Marko
9062e5faae
qualcommax: add addresses to DP nodes
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>
2023-11-18 12:23:54 +01:00
Robert Marko
6647e6d219 qualcommax: fix line endings in ESS dt-bindings
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>
2023-11-15 17:35:38 +01:00
Christian Marangi
76a981560a
ipq807x: fix typo in WAX630 for switch lan bmp
In fixing ipq8074 WAX630 dts, there was a typo in the switch lan bmp.
Fix it to fix compilarion error.

Fixes: f3cd4bfb7f ("ipq807x: fix multiple error on ESS switch port define")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-15 11:24:52 +01:00
Christian Marangi
f3cd4bfb7f
ipq807x: fix multiple error on ESS switch port define
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>
2023-11-15 11:02:30 +01:00
Robert Marko
c885169e02
qualcommax: move switch tick mode setting to ESS DTSI
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>
2023-11-14 05:21:28 +01:00
Robert Marko
cb1702041f
qualcommax: use defines for MAC mode setting
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>
2023-11-14 05:21:27 +01:00
Robert Marko
8e162868ab
qualcommax: set default switch MAC modes
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>
2023-11-14 05:21:27 +01:00
Robert Marko
878ef51b01
qualcommax: add bindings for MAC modes
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>
2023-11-14 05:21:24 +01:00