mopv

dts - default-mac partition

May 31st, 2022 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2.  
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5.  
  6. #include "qca956x.dtsi"
  7.  
  8. / {
  9. compatible = "tplink,deco-m4r-v1", "qca,qca9563";
  10. model = "TP-Link Deco M4R v1";
  11.  
  12. aliases {
  13. led-boot = &led_power;
  14. led-failsafe = &led_power;
  15. led-running = &led_power;
  16. led-upgrade = &led_power;
  17. };
  18.  
  19. leds {
  20. compatible = "gpio-leds";
  21.  
  22. wlan2g {
  23. label = "red:wlan2g";
  24. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  25. linux,default-trigger = "phy1tpt";
  26. };
  27.  
  28. led_power: power {
  29. label = "green:power";
  30. gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
  31. default-state = "on";
  32. };
  33.  
  34. wlan5g {
  35. label = "blue:wlan5g";
  36. gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
  37. linux,default-trigger = "phy0tpt";
  38. };
  39. };
  40.  
  41.  
  42. keys {
  43. compatible = "gpio-keys";
  44.  
  45. reset {
  46. label = "Reset button";
  47. linux,code = <KEY_RESTART>;
  48. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  49. debounce-interval = <60>;
  50. };
  51. };
  52. };
  53.  
  54. &pcie {
  55. status = "okay";
  56. };
  57.  
  58. &mdio0 {
  59. status = "okay";
  60. phy-mask = <0>;
  61.  
  62. phy0: ethernet-phy@0 {
  63. reg = <0>;
  64. phy-mode = "sgmii";
  65. qca,mib-poll-interval = <500>;
  66.  
  67. qca,ar8327-initvals = <
  68. 0x04 0x00080080 /* PORT0 PAD MODE CTRL */
  69. 0x7c 0x0000007e /* PORT0_STATUS */
  70. >;
  71. };
  72. };
  73.  
  74. &spi {
  75. status = "okay";
  76. num-cs = <1>;
  77.  
  78. flash@0 {
  79. compatible = "jedec,spi-nor";
  80. reg = <0>;
  81. spi-max-frequency = <25000000>;
  82.  
  83. partitions {
  84. compatible = "fixed-partitions";
  85. #address-cells = <1>;
  86. #size-cells = <1>;
  87.  
  88. uboot: partition@0 {
  89. label = "u-boot";
  90. reg = <0x000000 0x080000>;
  91. read-only;
  92. };
  93.  
  94. partition@80000 {
  95. label = "product-info";
  96. reg = <0x080000 0x05000>;
  97. read-only;
  98. };
  99.  
  100. config: partition@85000 {
  101. label = "config";
  102. reg = <0x085000 0x16b000>;
  103. read-only;
  104. };
  105.  
  106. art: partition@1f0000 {
  107. label = "art";
  108. reg = <0x1f0000 0x10000>;
  109. read-only;
  110. };
  111.  
  112. partition@200000 {
  113. label = "kernel";
  114. reg = <0x200000 0x200000>;
  115. };
  116.  
  117. partition@400000 {
  118. label = "rootfs";
  119. reg = <0x400000 0xc00000>;
  120. };
  121. };
  122. };
  123. };
  124.  
  125. &eth0 {
  126. status = "okay";
  127.  
  128. phy-mode = "sgmii";
  129. phy-handle = <&phy0>;
  130.  
  131. nvmem-cells = <&macaddr_config_8>;
  132. nvmem-cell-names = "mac-address";
  133. };
  134.  
  135. &wmac {
  136. status = "okay";
  137.  
  138. mtd-cal-data = <&art 0x1000>;
  139. nvmem-cells = <&macaddr_config_8>;
  140. nvmem-cell-names = "mac-address";
  141. };
  142.  
  143. &config {
  144. compatible = "nvmem-cells";
  145. #address-cells = <1>;
  146. #size-cells = <1>;
  147.  
  148. macaddr_config_8: macaddr@8 {
  149. reg = <0x8 0x6>;
  150. };
  151. };
  152.  
Add Comment
Please, Sign In to add comment