From: Sander Vanheule Date: Sun, 19 Mar 2023 09:14:40 +0000 (+0100) Subject: ath79: port TP-Link EAP120 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=904361d44391af28b01e45e2dfb6ad04a13fd8a1;p=openwrt%2Fstaging%2Fsvanheule.git ath79: port TP-Link EAP120 --- diff --git a/target/linux/ath79/dts/ar9344_tplink_eap120-v1.dts b/target/linux/ath79/dts/ar9344_tplink_eap120-v1.dts new file mode 100644 index 0000000000..86ef7b8e24 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_tplink_eap120-v1.dts @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344.dtsi" + +#include +#include + +/ { + compatible = "tplink,eap120-v1", "qca,ar9344"; + model = "TP-Link EAP120 v1.0"; + + aliases { + label-mac-device = &wmac; + led-boot = &status_green; + led-failsafe = &status_amber; + led-running = &status_green; + led-upgrade = &status_amber; + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + status_amber: status-amber { + label = "amber:status"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + status_green: status-green { + label = "green:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + status_red: status-red { + label = "red:status"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "partition-table"; + reg = <0x020000 0x010000>; + read-only; + }; + + partition@30000 { + label = "info"; + reg = <0x030000 0x010000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr: macaddr@8 { + reg = <0x8 0x6>; + }; + }; + + /* FIXME ELF image and size */ + partition@40000 { + label = "firmware"; + reg = <0x040000 0xf80000>; + }; + + partition@fc0000 { + label = "config"; + reg = <0xfc0000 0x030000>; + read-only; + }; + + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + calibration: calibration@1000 { + reg = <0x1000 0x440>; + }; + }; + }; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&macaddr>, <&calibration>; + nvmem-cell-names = "mac-address", "calibration"; +}; + +/* FIXME gpio mdio? */ +/* FIXME eth0 on MII addr 4 */ +&swphy4 { + phy-mode = "rgmii"; +}; + +ð0 { + status = "okay"; + + pll-data = <0x0e000000 0x00000101 0x00001313>; + + phy-handle = <&swphy4>; + + nvmem-cells = <&macaddr>; + nvmem-cell-names = "mac-address"; +}; diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index 8336189293..487cbda3ee 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -400,6 +400,16 @@ define Device/tplink-eap2x5 pad-extra 128 endef +define Device/tplink_eap120-v1 + $(Device/tplink-eap2x5) + SOC := ar9344 + IMAGE_SIZE := 15872k + DEVICE_MODEL := EAP120 + DEVICE_VARIANT := v1 + TPLINK_BOARD_ID := EAP120 +endef +TARGET_DEVICES += tplink_eap120-v1 + define Device/tplink_eap225-outdoor-v1 $(Device/tplink-eap2x5) SOC := qca9563