HLKRM04.dts 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /dts-v1/;
  2. #include "rt5350.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "hilink,hlk-rm04", "ralink,rt5350-soc";
  7. model = "HILINK HLK-RM04";
  8. memory@0 {
  9. device_type = "memory";
  10. reg = <0x0 0x1000000>;
  11. };
  12. chosen {
  13. bootargs = "console=ttyS1,57600";
  14. };
  15. gpio-export {
  16. compatible = "gpio-export";
  17. #size-cells = <0>;
  18. /* I2C */
  19. gpio1 {
  20. /* I2C_I2C_SD */
  21. gpio-export,name = "hlk-rm04:gpio0";
  22. gpio-export,direction_may_change = <1>;
  23. gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
  24. };
  25. gpio2 {
  26. /* I2C_I2C_SCLK */
  27. gpio-export,name = "hlk-rm04:gpio1";
  28. gpio-export,direction_may_change = <1>;
  29. gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
  30. };
  31. };
  32. gpio-keys-polled {
  33. compatible = "gpio-keys-polled";
  34. poll-interval = <20>;
  35. reset {
  36. label = "reset";
  37. gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  38. linux,code = <KEY_RESTART>;
  39. };
  40. wps {
  41. label = "wps";
  42. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  43. linux,code = <KEY_WPS_BUTTON>;
  44. };
  45. };
  46. };
  47. &uart {
  48. status = "okay";
  49. };
  50. &spi0 {
  51. status = "okay";
  52. m25p80@0 {
  53. compatible = "jedec,spi-nor";
  54. reg = <0>;
  55. spi-max-frequency = <10000000>;
  56. partitions {
  57. compatible = "fixed-partitions";
  58. #address-cells = <1>;
  59. #size-cells = <1>;
  60. partition@0 {
  61. label = "u-boot";
  62. reg = <0x0 0x30000>;
  63. read-only;
  64. };
  65. partition@30000 {
  66. label = "u-boot-env";
  67. reg = <0x30000 0x10000>;
  68. read-only;
  69. };
  70. factory: partition@40000 {
  71. label = "factory";
  72. reg = <0x40000 0x10000>;
  73. read-only;
  74. };
  75. partition@50000 {
  76. label = "firmware";
  77. reg = <0x50000 0x3b0000>;
  78. };
  79. };
  80. };
  81. };
  82. &pinctrl {
  83. state_default: pinctrl0 {
  84. gpio {
  85. ralink,group = "i2c", "jtag";
  86. ralink,function = "gpio";
  87. };
  88. uartf_gpio {
  89. ralink,group = "uartf";
  90. ralink,function = "gpio uartf";
  91. };
  92. };
  93. };
  94. &ethernet {
  95. mtd-mac-address = <&factory 0x4>;
  96. };
  97. &wmac {
  98. ralink,mtd-eeprom = <&factory 0>;
  99. };
  100. &ehci {
  101. status = "okay";
  102. };
  103. &ohci {
  104. status = "okay";
  105. };