Advertisement
Guest User

Untitled

a guest
Jan 3rd, 2025
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.16 KB | None | 0 0
  1. rom 25547e69c92c4e0ad6cd74dc30432ed9190d58af Mon Sep 17 00:00:00 2001
  2. From: Russell Senior <[email protected]>
  3. Date: Fri, 3 Jan 2025 06:47:21 -0800
  4. Subject: [PATCH] lantiq: wild assed guess support for modified tdw8980 with
  5. 16meg flash
  6.  
  7. Signed-off-by: Russell Senior <[email protected]>
  8. ---
  9. .../dts/lantiq/vr9_tplink_tdw8980-16m.dts | 78 +++++++++++++++++++
  10. target/linux/lantiq/image/tp-link_legacy.mk | 14 ++++
  11. .../base-files/etc/board.d/02_network | 6 +-
  12. 3 files changed, 96 insertions(+), 2 deletions(-)
  13. create mode 100644 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980-16m.dts
  14.  
  15. 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
  16. new file mode 100644
  17. index 000000000000..ed0a070077a7
  18. --- /dev/null
  19. +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw8980-16m.dts
  20. @@ -0,0 +1,78 @@
  21. +#include "vr9_tplink_tdw89x0.dtsi"
  22. +
  23. +/ {
  24. + compatible = "tplink,tdw8980-16m", "tplink,tdw89x0", "lantiq,xway", "lantiq,vr9";
  25. + model = "TP-LINK TD-W8980 16M";
  26. +};
  27. +
  28. +&leds {
  29. + wifi2 {
  30. + label = "green:wlan5ghz";
  31. + gpios = <&gpio 24 GPIO_ACTIVE_LOW>;
  32. + };
  33. +};
  34. +
  35. +&gpio {
  36. + state_default: pinmux {
  37. + pci_rst {
  38. + lantiq,pins = "io21";
  39. + lantiq,output = <1>;
  40. + lantiq,open-drain;
  41. + };
  42. + };
  43. +};
  44. +
  45. +&spi {
  46. + status = "okay";
  47. +
  48. + flash@4 {
  49. + partitions {
  50. + partition@20000 {
  51. + reg = <0x20000 0xfa0000>;
  52. + label = "firmware";
  53. + };
  54. +
  55. + partition@7c0000 {
  56. + reg = <0xfc0000 0x10000>;
  57. + label = "config";
  58. + read-only;
  59. + };
  60. +
  61. + partition@7d0000 {
  62. + reg = <0xfd0000 0x30000>;
  63. + label = "boardconfig";
  64. + read-only;
  65. +
  66. + boardconfig: nvmem-layout {
  67. + compatible = "fixed-layout";
  68. + #address-cells = <1>;
  69. + #size-cells = <1>;
  70. +
  71. + macaddr_ath9k_cal_f100: macaddr@f100 {
  72. + compatible = "mac-base";
  73. + reg = <0xf100 0x6>;
  74. + #nvmem-cell-cells = <1>;
  75. + };
  76. + };
  77. + };
  78. + };
  79. + };
  80. +};
  81. +
  82. +&pci0 {
  83. + status = "okay";
  84. +
  85. + reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
  86. +};
  87. +
  88. +&boardconfig {
  89. + cal_boardconfig_21000: calibration@21000 {
  90. + reg = <0x21000 0x3d8>;
  91. + };
  92. +};
  93. +
  94. +&ath9k {
  95. + compatible = "pci168c,002e";
  96. + nvmem-cells = <&macaddr_ath9k_cal_f100 2>, <&cal_boardconfig_21000>;
  97. + nvmem-cell-names = "mac-address", "calibration";
  98. +};
  99. diff --git a/target/linux/lantiq/image/tp-link_legacy.mk b/target/linux/lantiq/image/tp-link_legacy.mk
  100. index d9bcd35d10f0..891b9af73212 100644
  101. --- a/target/linux/lantiq/image/tp-link_legacy.mk
  102. +++ b/target/linux/lantiq/image/tp-link_legacy.mk
  103. @@ -44,3 +44,17 @@ define Device/tplink_tdw8980
  104. SUPPORTED_DEVICES += TDW8980
  105. endef
  106. TARGET_DEVICES += tplink_tdw8980
  107. +
  108. +define Device/tplink_tdw8980-16m
  109. + $(Device/dsa-migration)
  110. + $(Device/lantiqTpLink)
  111. + DEVICE_MODEL := TD-W8980
  112. + DEVICE_VARIANT := v1
  113. + TPLINK_FLASHLAYOUT := 16Mltq
  114. + TPLINK_HWID := 0x89800001
  115. + TPLINK_HWREV := 14
  116. + IMAGE_SIZE := 15872k
  117. + DEVICE_PACKAGES:= kmod-ath9k kmod-owl-loader wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
  118. + SUPPORTED_DEVICES += TDW8980-16M
  119. +endef
  120. +TARGET_DEVICES += tplink_tdw8980-16m
  121. 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
  122. index 9088de86b10c..25d10aa79288 100644
  123. --- a/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network
  124. +++ b/target/linux/lantiq/xrx200_legacy/base-files/etc/board.d/02_network
  125. @@ -16,7 +16,8 @@ lantiq_setup_interfaces()
  126. ucidef_set_interface_lan "lan1 lan2"
  127. ;;
  128. tplink,tdw8970|\
  129. - tplink,tdw8980)
  130. + tplink,tdw8980|\
  131. + tplink,tdw8980-16m)
  132. ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
  133. ;;
  134. netgear,dm200)
  135. @@ -56,7 +57,8 @@ lantiq_setup_macs()
  136. wan_mac=$(macaddr_add "$lan_mac" 1)
  137. ;;
  138. tplink,tdw8970|\
  139. - tplink,tdw8980)
  140. + tplink,tdw8980|\
  141. + tplink,tdw8980-16m)
  142. wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0xf100)" 1)
  143. ;;
  144. esac
  145. --
  146. 2.47.1
  147.  
  148.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement