k2p_32m.patch 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dtsi
  2. similarity index 94%
  3. rename from target/linux/ramips/dts/mt7621_phicomm_k2p.dts
  4. rename to target/linux/ramips/dts/mt7621_phicomm_k2p.dtsi
  5. index b18d12608acc7..8f72ac2a48280 100644
  6. --- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
  7. +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dtsi
  8. @@ -4,9 +4,6 @@
  9. #include <dt-bindings/input/input.h>
  10. / {
  11. - compatible = "phicomm,k2p", "mediatek,mt7621-soc";
  12. - model = "Phicomm K2P";
  13. -
  14. aliases {
  15. led-boot = &led_blue;
  16. led-failsafe = &led_blue;
  17. @@ -47,7 +44,7 @@
  18. &spi0 {
  19. status = "okay";
  20. - flash@0 {
  21. + flash: flash@0 {
  22. compatible = "jedec,spi-nor";
  23. reg = <0>;
  24. spi-max-frequency = <50000000>;
  25. @@ -81,10 +78,9 @@
  26. read-only;
  27. };
  28. - partition@a0000 {
  29. + firmware: partition@a0000 {
  30. compatible = "denx,uimage";
  31. label = "firmware";
  32. - reg = <0xa0000 0xf60000>;
  33. };
  34. };
  35. };
  36. diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
  37. new file mode 100644
  38. index 0000000000000..5bad6f2d9562d
  39. --- /dev/null
  40. +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
  41. @@ -0,0 +1,10 @@
  42. +#include "mt7621_phicomm_k2p.dtsi"
  43. +
  44. +/ {
  45. + compatible = "phicomm,k2p", "mediatek,mt7621-soc";
  46. + model = "Phicomm K2P";
  47. +};
  48. +
  49. +&firmware {
  50. + reg = <0xa0000 0x1f60000>;
  51. +};
  52. diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p-32m.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p-32m.dts
  53. new file mode 100644
  54. index 0000000000000..5bad6f2d9562d
  55. --- /dev/null
  56. +++ b/target/linux/ramips/dts/mt7621_phicomm_k2p-32m.dts
  57. @@ -0,0 +1,14 @@
  58. +#include "mt7621_phicomm_k2p.dtsi"
  59. +
  60. +/ {
  61. + compatible = "phicomm,k2p-32m", "mediatek,mt7621-soc";
  62. + model = "Phicomm K2P (32M)";
  63. +};
  64. +
  65. +&firmware {
  66. + reg = <0xa0000 0x1f60000>;
  67. +};
  68. +
  69. +&flash {
  70. + broken-flash-reset;
  71. +};
  72. --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
  73. +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
  74. @@ -28,7 +28,8 @@ case "$board" in
  75. > /sys${DEVPATH}/macaddress
  76. ;;
  77. dlink,dir-853-r1|\
  78. - phicomm,k2p)
  79. + phicomm,k2p|\
  80. + phicomm,k2p-32m)
  81. if [ "$PHYNBR" = "0" ]; then
  82. base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1)
  83. macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress