K2P.dts 1.8 KB

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