1
0
Fork 0
forked from mirror/openwrt

ipq50xx: ad support for MikroTik SXTsq 5 ax

This commit is contained in:
Arne Zachlod 2025-06-04 11:51:34 +02:00
parent f1862ad8e9
commit 60527a9a95
5 changed files with 196 additions and 2 deletions

View file

@ -0,0 +1,23 @@
#!/bin/bash
IFNAME=enp101s0f4u1
IP="192.168.88.10"
BOOTFILE="mikrotik.initramfs"
/sbin/ip addr replace $IP/24 dev $IFNAME
/sbin/ip link set dev $IFNAME up
/usr/sbin/dnsmasq \
--no-daemon \
--listen-address $IP \
--bind-interfaces \
-p0 \
--dhcp-authoritative \
--dhcp-range=192.168.88.100,192.168.88.200 \
--bootp-dynamic \
--dhcp-boot=mikrotik.initramfs \
--log-dhcp \
--enable-tftp \
--tftp-root=$(pwd)

View file

@ -3,8 +3,8 @@ include $(TOPDIR)/rules.mk
ARCH:=aarch64
BOARD:=qualcommax
BOARDNAME:=Qualcomm Atheros 802.11ax WiSoC-s
FEATURES:=squashfs ramdisk fpu nand rtc emmc
KERNELNAME:=Image
FEATURES:=squashfs ramdisk fpu nand rtc emmc minor
KERNELNAME:=vmlinux
CPU_TYPE:=cortex-a53
SUBTARGETS:=ipq807x ipq60xx ipq50xx

View file

@ -0,0 +1,150 @@
// 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 = "MikroTik SXTsq 5 ax";
compatible = "mikrotik,sxtsq-5-ax", "qcom,ipq5018";
aliases {
led-boot = &led_power;
led-failsafe = &led_power;
led-running = &led_power;
led-upgrade = &led_power;
};
chosen {
bootargs-append = " netconsole=@/,@10.0.0.2/";
};
leds {
compatible = "gpio-leds";
pinctrl-0 = <&led_pins>;
pinctrl-names = "default";
led_user: user {
gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
};
led_power: power {
gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_BLUE>;
function = LED_FUNCTION_POWER;
panic-indicator;
};
led_eth {
gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
};
rssilow {
label = "green:rssilow";
gpios = <&tlmm 17 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
rssimediumlow {
label = "green:rssimediumlow";
gpios = <&tlmm 19 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
rssimedium {
label = "green:rssimedium";
gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
rssimediumhigh {
label = "green:rssimediumhigh";
gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
rssihigh {
label = "green:rssihigh";
gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
color = <LED_COLOR_ID_GREEN>;
};
};
reserved-memory {
q6_mem_regions: q6_mem_regions@4b000000 {
no-map;
reg = <0x0 0x4b000000 0x0 0x3000000>;
status = "disabled";
};
};
};
&sleep_clk {
clock-frequency = <32000>;
};
&xo_board_clk {
clock-frequency = <24000000>;
};
&crypto {
status = "okay";
};
&cryptobam {
status = "okay";
};
&prng {
status = "okay";
};
&qfprom {
status = "okay";
};
&qpic_bam {
status = "okay";
};
&tlmm {
led_pins: led-pins {
pins = "gpio46", "gpio20", "gpio30", "gpio17",
"gpio19", "gpio25", "gpio26", "gpio34";
function = "gpio";
drive-strength = <8>;
bias-pull-down;
};
};
&switch {
status = "okay";
switch_mac_mode = <MAC_MODE_SGMII_CHANNEL0>;
qcom,port_phyinfo {
port@0 {
port_id = <1>;
mdiobus = <&mdio0>;
phy_address = <7>;
};
};
};
&mdio0 {
status = "okay";
};
&tsens {
status = "okay";
};

View file

@ -36,6 +36,26 @@ define Device/elecom_wrc-x3000gs2
endef
TARGET_DEVICES += elecom_wrc-x3000gs2
define Device/mikrotik_nor
DEVICE_VENDOR := MikroTik
BLOCKSIZE := 64k
KERNEL_NAME := vmlinux.elf
KERNEL_INITRAMFS_NAME = vmlinux-initramfs.elf
KERNEL := kernel-bin
IMAGES = sysupgrade-v7.bin
IMAGE/sysupgrade-v7.bin := append-kernel | kernel-pack-npk | \
yaffs-filesystem -L | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | check-size | append-metadata
endef
define Device/mikrotik_sxtsq-5-ax
$(call Device/mikrotik_nor)
DEVICE_VENDOR := MikroTik
DEVICE_MODEL := SXTsq 5 ax
SOC := ipq5018
endef
TARGET_DEVICES += mikrotik_sxtsq-5-ax
define Device/glinet_gl-b3000
$(call Device/FitImage)
DEVICE_VENDOR := GL.iNet

View file

@ -1,6 +1,7 @@
SUBTARGET:=ipq50xx
BOARDNAME:=Qualcomm Atheros IPQ50xx
DEFAULT_PACKAGES += ath11k-firmware-ipq5018
IMAGES_DIR:=compressed
define Target/Description
Build firmware images for Qualcomm Atheros IPQ50xx based boards.