mirror of
https://github.com/openwrt/openwrt.git
synced 2026-11-27 19:00:39 +04:00
qualcommax: ipq50xx: add support for Ubiquiti UniFi 6 Pro
Specification:
- SoC Qualcomm IPQ5018, dual-core Cortex-A53
- RAM 1 GiB
- Flash 8 MiB SPI-NOR (Macronix MX25U6435F)
4 GiB eMMC
- WLAN 2.4 GHz 2x2 802.11ax, IPQ5018 (SoC)
5 GHz 4x4 802.11ax, Qualcomm QCN9074 (PCIe)
- Ethernet 1x 10/100/1000 Mbps, IPQ5018 internal GE PHY
- Buttons 1x reset
- LEDs 1x white, 1x blue (GPIO)
- UART J8 next to the reset button, pin order (starting at the
button): GND, TX, RX, VCC; 1.8 V logic, VCC pin 3.3 V;
115200 8N1
- Power 802.3at PoE
eMMC layout (GPT):
p1 0:HLOS 64 MiB kernel0
p2 0:HLOS_1 64 MiB kernel1
p3 bs 1 KiB boot select
p4 cfg 1 MiB config
p5 log 2 GiB
"bs" selects the boot slot:
00 00 00 00 2b e8 4d a3 slot 0 (0:HLOS)
ff ff ff ff 2b e8 4d a3 slot 1 (0:HLOS_1)
Tested with stock firmware BZ.6.6.65 and BZ.6.8.2, both with U-Boot
v1.0.25.152.
The default boot command "bootubnt" verifies images against the RSA key
"uap_ipq50xx" in the U-Boot control FDT. OpenWrt is therefore started
with "bootm" after removing /signature from the control FDT.
Flash instructions:
1. SSH into the stock firmware (ubnt:ubnt by default) via its DHCP
assigned address, or the default 192.168.1.20
2. Copy the sysupgrade image over:
scp -O openwrt-qualcommax-ipq50xx-ubnt_unifi-6-pro-squashfs-sysupgrade.bin \
ubnt@<ap>:/tmp/openwrt.bin
3. Check the partition names:
grep PARTNAME /sys/block/mmcblk0/mmcblk0p2/uevent # 0:HLOS_1
grep PARTNAME /sys/block/mmcblk0/mmcblk0p3/uevent # bs
grep PARTNAME /sys/block/mmcblk0/mmcblk0p5/uevent # log
4. Unlock the partitions and unmount the log partition:
[ -e /proc/ubnthal/.uf ] && echo 5edfacbf > /proc/ubnthal/.uf
until umount /tmp/log 2>/dev/null; do
kill $(lsof | grep "\t/tmp/log/" | cut -f1)
done
5. Write kernel and rootfs:
tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-pro/kernel -O | \
dd of=/dev/mmcblk0p2
tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-pro/root -O | \
dd of=/dev/mmcblk0p5
6. Set up the U-Boot environment:
a='fdt addr ${fdtcontroladdr}; fdt rm /signature;'
b='mmc read 0x50000000 0x20022 0x20000; bootm 0x50000000#config@a650'
fw_setenv boot_openwrt "$a $b"
a='mmc read 0x44000000 0x40022 1; if itest.l *0x44000000 == 0xffffffff;'
b='then run boot_openwrt; else bootubnt; fi'
fw_setenv bootcmd_real "$a $b"
7. Boot from slot 1:
printf '\xff\xff\xff\xff\x2b\xe8\x4d\xa3' | dd of=/dev/mmcblk0p3
reboot
OpenWrt should now be reachable at its DHCP assigned address.
Reverting to stock firmware from OpenWrt:
printf '\x00\x00\x00\x00\x2b\xe8\x4d\xa3' > /dev/mmcblk0p3
fw_setenv bootcmd_real bootubnt
fw_setenv boot_openwrt
reboot
The stock firmware reformats the log partition as ext4 on its first
boot, which removes the OpenWrt rootfs.
Notes:
- Ubiquiti filed two FCC IDs, SWX-U6PRO (2020) and SWX-U6PROR (2021, which
adds Bluetooth LE). My unit (PCBA 113-00963-48) has GPIO-driven
white/blue LEDs and an unpopulated footprint for an LED MCU, so a
revision with an MCU-driven LED (like the U6-LR v1) may exist.
MAC addresses:
LAN : EEPROM 0x0 (label)
2.4GHz: label + 1
5GHz : label + 2
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Daniel Plank <tyrolyean@escpe.net>
Link: https://github.com/openwrt/openwrt/pull/26562
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
1 parent
b7afc4baab
commit
6d802f6148
6 files changed
+359
-1
No files matched your search
@@ -34,6 +34,9 @@ linksys,mx6200|\
|
||||
linksys,spnmx56)
|
||||
ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x20000"
|
||||
;;
|
||||
ubnt,unifi-6-pro)
|
||||
ubootenv_add_mtd "u-boot-env" "0x0" "0x10000" "0x1000"
|
||||
;;
|
||||
wallys,dr5018s|\
|
||||
yuncore,ax830|\
|
||||
yuncore,ax850)
|
||||
|
||||
@@ -116,6 +116,7 @@ ALLWIFIBOARDS:= \
|
||||
tplink_eap660hd-v1 \
|
||||
tplink_re700x \
|
||||
tplink_tl-wa1201-v2 \
|
||||
ubnt_unifi-6-pro \
|
||||
ubnt_utr \
|
||||
wallys_dr40x9 \
|
||||
wallys_dr5018s \
|
||||
@@ -335,6 +336,7 @@ $(eval $(call generate-ipq-wifi-package,tplink_eap650-outdoor-v1,TP-Link EAP650-
|
||||
$(eval $(call generate-ipq-wifi-package,tplink_eap660hd-v1,TP-Link EAP660 HD v1))
|
||||
$(eval $(call generate-ipq-wifi-package,tplink_re700x,TP-Link RE700X))
|
||||
$(eval $(call generate-ipq-wifi-package,tplink_tl-wa1201-v2,TP-Link TL-WA1201 V2))
|
||||
$(eval $(call generate-ipq-wifi-package,ubnt_unifi-6-pro,Ubiquiti UniFi 6 Pro))
|
||||
$(eval $(call generate-ipq-wifi-package,ubnt_utr,Ubiquiti UniFi Travel Router))
|
||||
$(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
|
||||
$(eval $(call generate-ipq-wifi-package,wallys_dr5018s,Wallys DR5018S))
|
||||
|
||||
@@ -0,0 +1,320 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
|
||||
/dts-v1/;
|
||||
|
||||
#include "ipq5018.dtsi"
|
||||
#include "ipq5018-ess.dtsi"
|
||||
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
model = "Ubiquiti UniFi 6 Pro";
|
||||
compatible = "ubnt,unifi-6-pro", "qcom,ipq5018";
|
||||
|
||||
aliases {
|
||||
label-mac-device = &gmac0;
|
||||
serial0 = &blsp1_uart1;
|
||||
led-boot = &led_white;
|
||||
led-failsafe = &led_white;
|
||||
led-running = &led_blue;
|
||||
led-upgrade = &led_blue;
|
||||
};
|
||||
|
||||
chosen {
|
||||
/* kernel in slot 1 (0:HLOS_1), rootfs in the "log"
|
||||
* partition; U-Boot passes no root=
|
||||
*/
|
||||
bootargs-append = " root=/dev/mmcblk0p5 rootwait coherent_pool=2M";
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
/* DDR is 1 GiB but U-Boot clamps the memory reg to 512 MiB
|
||||
* (same U-Boot v1.0.25.152 in BZ.6.6.65 and BZ.6.8.2);
|
||||
* linux,usable-memory is read before reg and overrides it.
|
||||
*/
|
||||
memory@40000000 {
|
||||
linux,usable-memory = <0x0 0x40000000 0x0 0x3ff00000>;
|
||||
};
|
||||
|
||||
keys {
|
||||
compatible = "gpio-keys";
|
||||
|
||||
pinctrl-0 = <&button_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
reset-button {
|
||||
label = "reset";
|
||||
gpios = <&tlmm 24 GPIO_ACTIVE_LOW>;
|
||||
linux,code = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
pinctrl-0 = <&led_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
led_white: led-0 {
|
||||
function = LED_FUNCTION_STATUS;
|
||||
color = <LED_COLOR_ID_WHITE>;
|
||||
gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_blue: led-1 {
|
||||
function = LED_FUNCTION_STATUS;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sleep_clk {
|
||||
clock-frequency = <32000>;
|
||||
};
|
||||
|
||||
&xo_board_clk {
|
||||
clock-div = <4>;
|
||||
clock-mult = <1>;
|
||||
};
|
||||
|
||||
&blsp1_uart1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&serial_0_pins>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&prng {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&qfprom {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&blsp1_spi1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&spi_pins>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
/* Macronix MX25U6435F, 8 MiB */
|
||||
flash@0 {
|
||||
compatible = "jedec,spi-nor";
|
||||
reg = <0>;
|
||||
spi-max-frequency = <50000000>;
|
||||
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
partition@0 {
|
||||
label = "SBL1";
|
||||
reg = <0x000000 0x030000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@30000 {
|
||||
label = "MIBIB";
|
||||
reg = <0x030000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@40000 {
|
||||
label = "BOOTCONFIG";
|
||||
reg = <0x040000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@50000 {
|
||||
label = "QSEE";
|
||||
reg = <0x050000 0x0a0000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@f0000 {
|
||||
label = "DEVCFG";
|
||||
reg = <0x0f0000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@100000 {
|
||||
label = "CDT";
|
||||
reg = <0x100000 0x010000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@110000 {
|
||||
label = "u-boot-env";
|
||||
reg = <0x110000 0x010000>;
|
||||
};
|
||||
|
||||
partition@120000 {
|
||||
label = "u-boot";
|
||||
reg = <0x120000 0x0a0000>;
|
||||
read-only;
|
||||
};
|
||||
|
||||
partition@1c0000 {
|
||||
label = "ART";
|
||||
reg = <0x1c0000 0x070000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
caldata_ipq5018: calibration@1000 {
|
||||
reg = <0x1000 0x20000>;
|
||||
};
|
||||
|
||||
caldata_qcn9074: calibration@26800 {
|
||||
reg = <0x26800 0x20000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
partition@230000 {
|
||||
label = "EEPROM";
|
||||
reg = <0x230000 0x010000>;
|
||||
read-only;
|
||||
|
||||
nvmem-layout {
|
||||
compatible = "fixed-layout";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
macaddr_eeprom_0: macaddr@0 {
|
||||
compatible = "mac-base";
|
||||
reg = <0x0 0x6>;
|
||||
#nvmem-cell-cells = <1>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sdhc_1 {
|
||||
status = "okay";
|
||||
|
||||
pinctrl-0 = <&sdc_default_state>;
|
||||
pinctrl-names = "default";
|
||||
mmc-ddr-1_8v;
|
||||
mmc-hs200-1_8v;
|
||||
max-frequency = <192000000>;
|
||||
bus-width = <4>;
|
||||
};
|
||||
|
||||
&mdio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
/* single RJ45 port with PoE input, IPQ5018 MAC0 -> internal GE PHY */
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
|
||||
label = "lan";
|
||||
|
||||
nvmem-cells = <&macaddr_eeprom_0 0>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
};
|
||||
|
||||
&tlmm {
|
||||
button_pins: button-state {
|
||||
pins = "gpio24";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
sdc_default_state: sdc-default-state {
|
||||
clk-pins {
|
||||
pins = "gpio9";
|
||||
function = "sdc1_clk";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
cmd-pins {
|
||||
pins = "gpio8";
|
||||
function = "sdc1_cmd";
|
||||
drive-strength = <8>;
|
||||
bias-pull-up;
|
||||
};
|
||||
|
||||
data-pins {
|
||||
pins = "gpio4", "gpio5", "gpio6", "gpio7";
|
||||
function = "sdc1_data";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
led_pins: led-state {
|
||||
pins = "gpio2", "gpio3";
|
||||
function = "gpio";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
serial_0_pins: uart0-state {
|
||||
pins = "gpio20", "gpio21";
|
||||
function = "blsp0_uart0";
|
||||
bias-disable;
|
||||
};
|
||||
|
||||
spi_pins: spi-state {
|
||||
pins = "gpio10", "gpio11", "gpio12", "gpio13";
|
||||
function = "blsp0_spi";
|
||||
drive-strength = <8>;
|
||||
bias-disable;
|
||||
};
|
||||
};
|
||||
|
||||
/* QCN9074, 5 GHz 4x4 */
|
||||
&pcie0_phy {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pcie0 {
|
||||
status = "okay";
|
||||
|
||||
perst-gpios = <&tlmm 15 GPIO_ACTIVE_LOW>;
|
||||
|
||||
pcie@0 {
|
||||
wifi@0,0 {
|
||||
status = "okay";
|
||||
|
||||
/* QCN9074: ath11k lacks DT compatible for PCI cards */
|
||||
compatible = "pci17cb,1104";
|
||||
reg = <0x00010000 0 0 0 0>;
|
||||
|
||||
qcom,calibration-variant = "Ubiquiti-U6-Pro";
|
||||
|
||||
nvmem-cells = <&caldata_qcn9074>, <&macaddr_eeprom_0 2>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* IPQ5018 internal radio, 2.4 GHz 2x2 */
|
||||
&q6v5_wcss {
|
||||
firmware-name = "ath11k/IPQ5018/hw1.0/q6_fw.mdt",
|
||||
"ath11k/IPQ5018/hw1.0/m3_fw.mdt";
|
||||
};
|
||||
|
||||
&wifi {
|
||||
status = "okay";
|
||||
|
||||
qcom,rproc = <&q6v5_wcss>;
|
||||
qcom,calibration-variant = "Ubiquiti-U6-Pro";
|
||||
qcom,ath11k-fw-memory-mode = <1>;
|
||||
|
||||
nvmem-cells = <&caldata_ipq5018>, <&macaddr_eeprom_0 1>;
|
||||
nvmem-cell-names = "calibration", "mac-address";
|
||||
};
|
||||
@@ -397,6 +397,23 @@ define Device/tplink_re700x
|
||||
endef
|
||||
TARGET_DEVICES += tplink_re700x
|
||||
|
||||
define Device/ubnt_unifi-6-pro
|
||||
$(call Device/FitImage)
|
||||
$(call Device/EmmcImage)
|
||||
DEVICE_VENDOR := Ubiquiti
|
||||
DEVICE_MODEL := UniFi 6 Pro
|
||||
DEVICE_ALT0_VENDOR := Ubiquiti
|
||||
DEVICE_ALT0_MODEL := U6-Pro
|
||||
SOC := ipq5018
|
||||
DEVICE_DTS_CONFIG := config@a650
|
||||
DEVICE_PACKAGES := ath11k-firmware-ipq5018 \
|
||||
kmod-ath11k-pci \
|
||||
ath11k-firmware-qcn9074 \
|
||||
ipq-wifi-ubnt_unifi-6-pro \
|
||||
kmod-fs-f2fs f2fs-tools
|
||||
endef
|
||||
TARGET_DEVICES += ubnt_unifi-6-pro
|
||||
|
||||
define Device/wallys_dr5018s
|
||||
$(call Device/FitImage)
|
||||
$(call Device/UbiFit)
|
||||
|
||||
@@ -50,7 +50,8 @@ ipq50xx_setup_interfaces()
|
||||
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
|
||||
;;
|
||||
tplink,eap650-outdoor-v1|\
|
||||
tplink,re700x)
|
||||
tplink,re700x|\
|
||||
ubnt,unifi-6-pro)
|
||||
ucidef_set_interface_lan "lan" "dhcp"
|
||||
;;
|
||||
zte,t5400)
|
||||
|
||||
@@ -311,6 +311,13 @@ platform_do_upgrade() {
|
||||
remove_oem_ubi_volume tp_data
|
||||
nand_do_upgrade "$1"
|
||||
;;
|
||||
ubnt,unifi-6-pro)
|
||||
# OpenWrt boots from slot 1, slot 0 (0:HLOS) keeps the
|
||||
# signed stock image
|
||||
CI_KERNPART="0:HLOS_1"
|
||||
CI_ROOTPART="log"
|
||||
emmc_do_upgrade "$1"
|
||||
;;
|
||||
wallys,dr5018s)
|
||||
CI_UBIPART="rootfs"
|
||||
remove_oem_ubi_volume debug
|
||||
@@ -357,3 +364,11 @@ platform_do_upgrade() {
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
platform_copy_config() {
|
||||
case "$(board_name)" in
|
||||
ubnt,unifi-6-pro)
|
||||
emmc_copy_config
|
||||
;;
|
||||
esac
|
||||
}
|
||||
Reference in new issue
Block a user