K2P.dts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. /dts-v1/;
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "phicomm,k2p", "mediatek,mt7621-soc";
  7. model = "Phicomm K2P";
  8. aliases {
  9. led-boot = &led_blue;
  10. led-failsafe = &led_blue;
  11. led-running = &led_blue;
  12. led-upgrade = &led_blue;
  13. };
  14. memory@0 {
  15. device_type = "memory";
  16. reg = <0x0 0x8000000>;
  17. };
  18. chosen {
  19. bootargs = "console=ttyS0,57600";
  20. };
  21. leds {
  22. compatible = "gpio-leds";
  23. stat_r {
  24. label = "k2p:red:status";
  25. gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
  26. };
  27. stat_y {
  28. label = "k2p:yellow:status";
  29. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  30. };
  31. led_blue: stat_b {
  32. label = "k2p:blue:status";
  33. gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  34. };
  35. };
  36. keys {
  37. compatible = "gpio-keys-polled";
  38. poll-interval = <20>;
  39. reset {
  40. label = "reset";
  41. gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
  42. linux,code = <KEY_RESTART>;
  43. };
  44. };
  45. };
  46. &spi0 {
  47. status = "okay";
  48. m25p80@0 {
  49. compatible = "jedec,spi-nor";
  50. reg = <0>;
  51. spi-max-frequency = <10000000>;
  52. m25p,chunked-io = <32>;
  53. partitions {
  54. compatible = "fixed-partitions";
  55. #address-cells = <1>;
  56. #size-cells = <1>;
  57. partition@0 {
  58. label = "u-boot";
  59. reg = <0x0 0x30000>;
  60. read-only;
  61. };
  62. partition@30000 {
  63. label = "u-boot-env";
  64. reg = <0x30000 0x10000>;
  65. read-only;
  66. };
  67. factory: partition@40000 {
  68. label = "factory";
  69. reg = <0x40000 0x10000>;
  70. read-only;
  71. };
  72. partition@50000 {
  73. label = "permanent_config";
  74. reg = <0x50000 0x50000>;
  75. read-only;
  76. };
  77. partition@a0000 {
  78. compatible = "denx,uimage";
  79. label = "firmware";
  80. reg = <0xa0000 0xf60000>;
  81. };
  82. };
  83. };
  84. };
  85. &pcie {
  86. status = "okay";
  87. };
  88. &pcie0 {
  89. mt76@0,0 {
  90. reg = <0x0000 0 0 0 0>;
  91. mediatek,mtd-eeprom = <&factory 0x0>;
  92. };
  93. };
  94. &ethernet {
  95. mtd-mac-address = <&factory 0xe006>;
  96. };
  97. &pinctrl {
  98. state_default: pinctrl0 {
  99. gpio {
  100. ralink,group = "i2c", "jtag";
  101. ralink,function = "gpio";
  102. };
  103. };
  104. };