一直沒有official的Openwrt 所以就自己搞了。
Step 1: GPIO Table.
三色LED分別是GPIO14(RED), GPIO15(GREEN), GPIO16(BLUE)
兩個按鈕是GPIO2 WPS, GPIO5 RESET
還有兩個OUTPUT 應該是AR3012的Power與Reset. GPIO7, GPIO8
Step 2: Flash Layout
使用的是MX25L25645G,是32MByte的Flash,在19.07下需要修改m25p80.c才能正常reboot。若是選擇使用21.04的應該就不用,因為Flash本身支援4B OPCODE,21.04有一定的判斷機制應該會判斷到支援就不用使用EN4B/EX4B。但19.07沒有實作…
Serial Flash MX25L25645G
MTD0: 0x00000000 ~ 0x00040000 uboot
MTD1: 0x00040000 ~ 0x00050000 uboot-env
MTD2: 0x00050000 ~ 0x00060000 factory
MTD3: 0x00060000 ~ 0x01d00000 firmwarey
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT/dts-v1/;
#include "qca956x.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
model = "ASUS Lyra Trio MAP-AC1750";
compatible = "asus,map-ac1750", "qca,qca9563";
aliases {
led-boot = &led_blue;
led-failsafe = &led_red;
led-running = &led_blue;
led-upgrade = &led_green;
};
leds {
compatible = "gpio-leds";
led_red: led_red {
label = "red";
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
};
led_blue: led_blue {
label = "blue";
gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
};
led_green: led_green {
label = "green";
gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
};
};
keys {
compatible = "gpio-keys";
wps {
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
gpio-export {
compatible = "gpio-export";
gpio_ar3012_power {
gpio-export,name = "asus:power:ar3012";
gpio-export,output = <1>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
};
gpio_ar3012_reset {
gpio-export,name = "asus:reset:ar3012";
gpio-export,output = <1>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
};
};
};
&uart {
status = "okay";
};
&gpio {
status = "okay";
};
&pcie {
status = "okay";
};
&spi {
status = "okay";
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 = "u-boot";
reg = <0x000000 0x40000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x10000>;
read-only;
};
art: partition@50000 {
label = "art";
reg = <0x050000 0x10000>;
read-only;
};
partition@60000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x060000 0x1ca0000>;
};
partition@1d00000 {
compatible = "denx,uimage";
label = "jffs2";
reg = <0x1d00000 0x300000>;
};
};
};
};
&usb_phy0 {
status = "okay";
};
&usb0 {
status = "okay";
};
&usb_phy1 {
status = "okay";
};
&usb1 {
status = "okay";
};
&mdio0 {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "sgmii";
qca,ar8327-initvals = <
0x04 0x00080080 /* PORT0 PAD MODE CTRL */
0x7c 0x0000007e /* PORT0_STATUS */
>;
};
};
ð0 {
status = "okay";
mtd-mac-address = <&art 0x0>;
phy-handle = <&phy0>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&art 0x1002>;
};
define Device/asus_map-ac1750DEVICE_VENDOR := ASUSATH_SOC := qca9563DEVICE_TITLE := ASUS Lyra Trio MAP-AC1750ASUS_PRODUCTID := MAP-AC1750IMAGE_SIZE := 16000kDEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct-htt kmod-usb-core kmod-usb2SUPPORTED_DEVICES += map-ac1750endefTARGET_DEVICES += asus_map-ac1750
asus,map-ac1750)ucidef_add_switch "switch0" \"0@eth0" "2:wan" "3:lan";;
case "$FIRMWARE" in"ath10k/cal-pci-0000:00:00.0.bin")case $board inasus,map-ac1750)ath10kcal_extract "art" 20480 2116ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary art 20486) );;devolo,dvl1200e|\
config interface 'lan'option type 'bridge'option ifname 'eth0'option proto 'dhcp'config switchoption name 'switch0'option reset '1'config switch_vlanoption device 'switch0'option vlan '1'option vid '1'option ports '0 3 2'
service network restart
opkg updateopkg install kmod-usb2 ath10k-firmware-qca988x-ct-htt kmod-ath10k-ct
reboot
沒有留言:
張貼留言