Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rom 25547e69c92c4e0ad6cd74dc30432ed9190d58af Mon Sep 17 00:00:00 2001
- From: Russell Senior <[email protected]>
- Date: Fri, 3 Jan 2025 06:47:21 -0800
- Subject: [PATCH] lantiq: wild assed guess support for modified tdw8980 with
- 16meg flash
- Signed-off-by: Russell Senior <[email protected]>
- ---
- .../dts/lantiq/vr9_tplink_tdw8980-16m.dts | 78 +++++++++++++++++++
- target/linux/lantiq/image/tp-link_legacy.mk | 14 ++++
- .../base-files/etc/board.d/02_network | 6 +-
- 3 files changed, 96 insertions(+), 2 deletions(-)
- create mode 100644 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980-16m.dts
- diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980-16m.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980-16m.dts
- new file mode 100644
- index 000000000000..ed0a070077a7
- --- /dev/null
- +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980-16m.dts
- @@ -0,0 +1,78 @@
- +#include "vr9_tplink_tdw89x0.dtsi"
- +
- +/ {
- + compatible = "tplink,tdw8980-16m", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
- + model = "TP-LINK TD-W8980 16M";
- +};
- +
- +&leds {
- + wifi2 {
- + label = "green:wlan5ghz";
- + gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
- + };
- +};
- +
- +&gpio {
- + state_default: pinmux {
- + pci_rst {
- + lantiq,pins = "io21";
- + lantiq,output = <1>;
- + lantiq,open-drain;
- + };
- + };
- +};
- +
- +&spi {
- + status = "okay";
- +
- + flash@4 {
- + partitions {
- + partition@20000 {
- + reg = <0x20000 0xfa0000>;
- + label = "firmware";
- + };
- +
- + partition@7c0000 {
- + reg = <0xfc0000 0x10000>;
- + label = "config";
- + read-only;
- + };
- +
- + partition@7d0000 {
- + reg = <0xfd0000 0x30000>;
- + label = "boardconfig";
- + read-only;
- +
- + boardconfig: nvmem-layout {
- + compatible = "fixed-layout";
- + #address-cells = <1>;
- + #size-cells = <1>;
- +
- + macaddr_ath9k_cal_f100: macaddr@f100 {
- + compatible = "mac-base";
- + reg = <0xf100 0x6>;
- + #nvmem-cell-cells = <1>;
- + };
- + };
- + };
- + };
- + };
- +};
- +
- +&pci0 {
- + status = "okay";
- +
- + reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
- +};
- +
- +&boardconfig {
- + cal_boardconfig_21000: calibration@21000 {
- + reg = <0x21000 0x3d8>;
- + };
- +};
- +
- +&ath9k {
- + compatible = "pci168c,002e";
- + nvmem-cells = <&macaddr_ath9k_cal_f100 2>, <&cal_boardconfig_21000>;
- + nvmem-cell-names = "mac-address", "calibration";
- +};
- diff --git a/target/linux/lantiq/image/tp-link_legacy.mk b/target/linux/lantiq/image/tp-link_legacy.mk
- index d9bcd35d10f0..891b9af73212 100644
- --- a/target/linux/lantiq/image/tp-link_legacy.mk
- +++ b/target/linux/lantiq/image/tp-link_legacy.mk
- @@ -44,3 +44,17 @@ define Device/tplink_tdw8980
- SUPPORTED_DEVICES += TDW8980
- endef
- TARGET_DEVICES += tplink_tdw8980
- +
- +define Device/tplink_tdw8980-16m
- + $(Device/dsa-migration)
- + $(Device/lantiqTpLink)
- + DEVICE_MODEL := TD-W8980
- + DEVICE_VARIANT := v1
- + TPLINK_FLASHLAYOUT := 16Mltq
- + TPLINK_HWID := 0x89800001
- + TPLINK_HWREV := 14
- + IMAGE_SIZE := 15872k
- + DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
- + SUPPORTED_DEVICES += TDW8980-16M
- +endef
- +TARGET_DEVICES += tplink_tdw8980-16m
- diff --git a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network
- index 9088de86b10c..25d10aa79288 100644
- --- a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network
- +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network
- @@ -16,7 +16,8 @@ lantiq_setup_interfaces()
- ucidef_set_interface_lan "lan1 lan2"
- ;;
- tplink,tdw8970|\
- - tplink,tdw8980)
- + tplink,tdw8980|\
- + tplink,tdw8980-16m)
- ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
- ;;
- netgear,dm200)
- @@ -56,7 +57,8 @@ lantiq_setup_macs()
- wan_mac=$(macaddr_add "$lan_mac" 1)
- ;;
- tplink,tdw8970|\
- - tplink,tdw8980)
- + tplink,tdw8980|\
- + tplink,tdw8980-16m)
- wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1)
- ;;
- esac
- --
- 2.47.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement