Add Support For KT-AR06-012H

​​Thanks to @baalwy for his contributions.​

Link: https://github.com/LiBwrt/openwrt-6.x/issues/201
This commit is contained in:
Roc Lai 2025-09-17 23:07:35 +08:00
parent 556d899324
commit 6fe92d97f9
10 changed files with 433 additions and 0 deletions

View File

@ -15,6 +15,7 @@ cambiumnetworks,xe3-4)
ubootenv_add_mtd "0:APPSBLENV" "0x0" "0x10000" "0x10000"
;;
cmiot,ax18|\
kt,ar06-012h|\
qihoo,360v6|\
redmi,ax5|\
xiaomi,ax1800|\

View File

@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \
dynalink_dl-wrx36 \
edgecore_eap102 \
edimax_cax1800 \
kt_ar06-012h \
elecom_wrc-x3000gs2 \
glinet_gl-ax1800 \
glinet_gl-axt1800 \
@ -221,6 +222,7 @@ $(eval $(call generate-ipq-wifi-package,compex_wpq873,Compex WPQ-873))
$(eval $(call generate-ipq-wifi-package,dynalink_dl-wrx36,Dynalink DL-WRX36))
$(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
$(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
$(eval $(call generate-ipq-wifi-package,kt_ar06-012h,KT AR06-012H))
$(eval $(call generate-ipq-wifi-package,elecom_wrc-x3000gs2,ELECOM WRC-X3000GS2))
$(eval $(call generate-ipq-wifi-package,glinet_gl-ax1800,GL.iNet GL-AX1800))
$(eval $(call generate-ipq-wifi-package,glinet_gl-axt1800,GL.iNet GL-AXT1800))

View File

@ -0,0 +1,399 @@
// SPDX-License-Identifier: (GPL-2.0+)
/* Copyright (c) 2025, Mohammed baalawi <baalwy2009@gmail.com> */
/dts-v1/;
#include "ipq6018-512m.dtsi"
#include "ipq6018-ess.dtsi"
#include "ipq6018-nss.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
model = "KT-AR06-012H";
compatible = "kt,ar06-012h", "qcom,ipq6018";
aliases {
serial0 = &blsp1_uart3;
label-mac-device = &dp3;
led-boot = &led_wan_blue;
led-failsafe = &led_wan_blue;
led-running = &led_wan_blue;
led-upgrade = &led_wan_blue;
ethernet0 = &dp1;
ethernet1 = &dp2;
ethernet2 = &dp3;
ethernet3 = &dp4;
ethernet4 = &dp5;
};
chosen {
stdout-path = "serial0:115200n8";
bootargs-append = " root=/dev/ubiblock0_1 swiotlb=1";
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&tlmm 55 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
};
leds {
compatible = "gpio-leds";
led_wan_blue: wan_blue {
label = "blue:wan";
gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>;
default-state = "on";
};
wan_green {
label = "green:wan";
gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
};
wifi_green {
label = "green:wifi";
gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
};
};
reg_usb_vbus: regulator-usb-vbus {
compatible = "regulator-fixed";
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>;
regulator-boot-on;
// regulator-always-on;
};
output-usb0-power {
compatible = "regulator-output";
vout-supply = <&reg_usb_vbus>;
};
};
&tlmm {
gpio-reserved-ranges = <20 1>;
mdio_pins: mdio-pins {
mdc {
pins = "gpio64";
function = "mdc";
drive-strength = <8>;
bias-pull-up;
};
mdio {
pins = "gpio65";
function = "mdio";
drive-strength = <8>;
bias-pull-up;
};
};
i2c_1_pins: i2c-1-state {
pins = "gpio42", "gpio43";
function = "blsp2_i2c";
drive-strength = <8>;
};
spi_0_pins: spi-0-state {
pins = "gpio38", "gpio39", "gpio40", "gpio41";
function = "blsp0_spi";
drive-strength = <8>;
bias-pull-down;
};
};
&mdio {
status = "okay";
pinctrl-0 = <&mdio_pins>;
pinctrl-names = "default";
reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
ethernet-phy-package@0 {
compatible = "qcom,qca8075-package";
#address-cells = <1>;
#size-cells = <0>;
reg = <0>;
qca8075_0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
};
qca8075_1: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <1>;
leds {
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
};
};
qca8075_2: ethernet-phy@2 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <2>;
leds {
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
};
};
qca8075_3: ethernet-phy@3 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <3>;
leds {
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
};
};
qca8075_4: ethernet-phy@4 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <4>;
leds {
#address-cells = <1>;
#size-cells = <0>;
led@1 {
reg = <1>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
};
};
};
};
&dp1 {
status = "okay";
label = "wan";
phy-handle = <&qca8075_0>;
};
&dp2 {
status = "okay";
label = "lan4";
phy-handle = <&qca8075_1>;
};
&dp3 {
status = "okay";
label = "lan3";
phy-handle = <&qca8075_2>;
};
&dp4 {
status = "okay";
label = "lan2";
phy-handle = <&qca8075_3>;
};
&dp5 {
status = "okay";
label = "lan1";
phy-handle = <&qca8075_4>;
};
&edma {
status = "okay";
};
&switch {
status = "okay";
switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>;
switch_wan_bmp = <ESS_PORT5>;
switch_mac_mode = <MAC_MODE_PSGMII>;
qcom,port_phyinfo {
port@1 {
port_id = <1>;
phy_address = <0>;
};
port@2 {
port_id = <2>;
phy_address = <1>;
};
port@3 {
port_id = <3>;
phy_address = <2>;
};
port@4 {
port_id = <4>;
phy_address = <3>;
};
port@5 {
port_id = <5>;
phy_address = <4>;
};
};
};
&blsp1_i2c3 {
status = "okay";
pinctrl-0 = <&i2c_1_pins>;
pinctrl-names = "default";
};
&blsp1_spi1 {
status = "okay";
pinctrl-0 = <&spi_0_pins>;
pinctrl-names = "default";
};
&blsp1_uart3 {
status = "okay";
pinctrl-0 = <&serial_3_pins>;
pinctrl-names = "default";
};
&rpm {
status = "disabled";
};
&nss_crypto {
status = "ok";
};
&qpic_bam {
status = "okay";
};
&qpic_nand {
status = "okay";
nand@0 {
reg = <0>;
nand-ecc-strength = <4>;
nand-ecc-step-size = <512>;
nand-bus-width = <8>;
partitions {
compatible = "qcom,smem-part";
};
};
};
&qusb_phy_0 {
status = "okay";
vdd-supply = <&reg_usb_vbus>;
};
&qusb_phy_1 {
status = "okay";
};
&ssphy_0 {
status = "okay";
};
&usb2 {
status = "okay";
};
&usb3 {
status = "okay";
vbus-supply = <&reg_usb_vbus>;
};
&rpm {
status = "disabled";
};
&crypto {
status = "okay";
};
&cryptobam {
status = "okay";
};
&pcie_phy {
status = "okay";
};
&prng {
status = "okay";
};
&qpic_bam {
status = "okay";
};
&wifi {
status = "okay";
qcom,ath11k-fw-memory-mode = <1>;
qcom,ath11k-calibration-variant = "KT-AR06-012H";
};
&cpu_opp_table {
opp-864000000 {
opp-supported-hw = <0xf>;
};
opp-1056000000 {
opp-supported-hw = <0xf>;
};
opp-1200000000 {
opp-supported-hw = <0xf>;
};
opp-1320000000 {
opp-supported-hw = <0xf>;
};
opp-1440000000 {
opp-supported-hw = <0xf>;
};
opp-1512000000 {
opp-supported-hw = <0xf>;
};
opp-1608000000 {
opp-supported-hw = <0x1>;
};
opp-1800000000 {
opp-supported-hw = <0x1>;
};
};

View File

@ -49,6 +49,20 @@ define Device/cambiumnetworks_xe3-4
endef
TARGET_DEVICES += cambiumnetworks_xe3-4
define Device/kt_ar06-012h
$(call Device/FitImage)
$(call Device/UbiFit)
DEVICE_VENDOR := KT
DEVICE_MODEL := AR06-012H
DEVICE_DTS := ipq6000-kt-ar06-012h
BLOCKSIZE := 128k
PAGESIZE := 2048
SOC := ipq6000
DEVICE_DTS_CONFIG := config@cp03-c1
DEVICE_PACKAGES := ipq-wifi-kt_ar06-012h kmod-usb3 kmod-usb-dwc3 kmod-usb-dwc3-qcom kmod-usb-storage kmod-usb2 kmod-ath11k-ahb
endef
TARGET_DEVICES += kt_ar06-012h
define Device/glinet_gl-common
$(call Device/FitImage)
$(call Device/UbiFit)

View File

@ -47,6 +47,15 @@ yuncore,fap650)
ucidef_set_led_netdev "wlan5ghz" "WLAN 5GHz LED" "blue:wlan-5ghz" "wlan0"
ucidef_set_led_netdev "wlan2ghz" "WLAN 2.4GHz LED" "green:wlan-2ghz" "wlan1"
;;
kt,ar06-012h)
ucidef_set_led_netdev "lan1-port-link" "LAN1-PORT-LINK-TRAFFIC" "90000.mdio-1:04:green:lan" "lan1" "link link_10 link_100 link_1000 half_duplex full_duplex tx rx"
ucidef_set_led_netdev "lan2-port-link" "LAN2-PORT-LINK-TRAFFIC" "90000.mdio-1:03:green:lan" "lan2" "link link_10 link_100 link_1000 half_duplex full_duplex tx rx"
ucidef_set_led_netdev "lan3-port-link" "LAN3-PORT-LINK-TRAFFIC" "90000.mdio-1:02:green:lan" "lan3" "link link_10 link_100 link_1000 half_duplex full_duplex tx rx"
ucidef_set_led_netdev "lan4-port-link" "LAN4-PORT-LINK-TRAFFIC" "90000.mdio-1:01:green:lan" "lan4" "link link_10 link_100 link_1000 half_duplex full_duplex tx rx"
ucidef_set_led_netdev "wan-port-link" "WAN-PORT-LINK-TRAFFIC" "green:wan" "wan" "link link_10 link_100 link_1000 half_duplex full_duplex tx rx"
ucidef_set_led_netdev "wlan" "WLAN5G" "green:wifi" "phy0-ap0" "link tx rx"
ucidef_set_led_netdev "wlan" "WLAN2G" "green:wifi" "phy1-ap0" "link tx rx"
;;
netgear,wax610|\
netgear,wax610y)
ucidef_set_led_netdev "lan-port-link" "LAN-PORT-LINK" "green:lan-0" "lan" "link_10 link_100 link_1000 link_2500"

View File

@ -27,6 +27,7 @@ ipq60xx_setup_interfaces()
glinet,gl-ax1800|\
linksys,mr7350|\
linksys,mr7500|\
kt,ar06-012h|\
yuncore,fap650)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;

View File

@ -28,6 +28,7 @@ case "$FIRMWARE" in
qihoo,360v6|\
redmi,ax5|\
xiaomi,ax1800|\
kt,ar06-012h|\
zn,m2)
caldata_extract "0:art" 0x1000 0x10000
;;

View File

@ -27,6 +27,11 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
;;
kt,ar06-012h)
label_mac=$(get_mac_label)
[ "$PHYNBR" = "0" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
;;
glinet,gl-ax1800|\
glinet,gl-axt1800)
label_mac=$(get_mac_label)

View File

@ -53,6 +53,7 @@ platform_do_upgrade() {
glinet,gl-ax1800|\
glinet,gl-axt1800|\
netgear,wax214|\
kt,ar06-012h|\
qihoo,360v6)
nand_do_upgrade "$1"
;;