pic32mzda_sk.dts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /*
  2. * Copyright (C) 2015 Microchip Technology Inc. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. */
  9. /dts-v1/;
  10. #include <dt-bindings/gpio/gpio.h>
  11. #include <dt-bindings/interrupt-controller/irq.h>
  12. #include "pic32mzda.dtsi"
  13. / {
  14. compatible = "microchip,pic32mzda-sk", "microchip,pic32mzda";
  15. model = "Microchip PIC32MZDA Starter Kit";
  16. memory {
  17. device_type = "memory";
  18. reg = <0x08000000 0x08000000>;
  19. };
  20. chosen {
  21. bootargs = "earlyprintk=ttyPIC1,115200n8r console=ttyPIC1,115200n8";
  22. };
  23. leds0 {
  24. compatible = "gpio-leds";
  25. pinctrl-names = "default";
  26. pinctrl-0 = <&user_leds_s0>;
  27. led@1 {
  28. label = "pic32mzda_sk:red:led1";
  29. gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
  30. linux,default-trigger = "heartbeat";
  31. };
  32. led@2 {
  33. label = "pic32mzda_sk:yellow:led2";
  34. gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
  35. linux,default-trigger = "mmc0";
  36. };
  37. led@3 {
  38. label = "pic32mzda_sk:green:led3";
  39. gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
  40. default-state = "on";
  41. };
  42. };
  43. keys0 {
  44. compatible = "gpio-keys";
  45. pinctrl-0 = <&user_buttons_s0>;
  46. pinctrl-names = "default";
  47. #address-cells = <1>;
  48. #size-cells = <0>;
  49. button@sw1 {
  50. label = "ESC";
  51. linux,code = <1>;
  52. gpios = <&gpio1 12 0>;
  53. };
  54. button@sw2 {
  55. label = "Home";
  56. linux,code = <102>;
  57. gpios = <&gpio1 13 0>;
  58. };
  59. button@sw3 {
  60. label = "Menu";
  61. linux,code = <139>;
  62. gpios = <&gpio1 14 0>;
  63. };
  64. };
  65. };
  66. &uart2 {
  67. pinctrl-names = "default";
  68. pinctrl-0 = <&pinctrl_uart2>;
  69. status = "okay";
  70. };
  71. &uart4 {
  72. pinctrl-names = "default";
  73. pinctrl-0 = <&pinctrl_uart4>;
  74. status = "okay";
  75. };
  76. &sdhci {
  77. pinctrl-names = "default";
  78. pinctrl-0 = <&pinctrl_sdhc1>;
  79. status = "okay";
  80. assigned-clocks = <&rootclk REF2CLK>, <&rootclk REF4CLK>,
  81. <&rootclk REF5CLK>;
  82. assigned-clock-rates = <50000000>, <25000000>, <40000000>;
  83. };
  84. &pic32_pinctrl {
  85. pinctrl_sdhc1: sdhc1_pins0 {
  86. pins = "A6", "D4", "G13", "G12", "G14", "A7", "A0";
  87. microchip,digital;
  88. };
  89. user_leds_s0: user_leds_s0 {
  90. pins = "H0", "H1", "H2";
  91. output-low;
  92. microchip,digital;
  93. };
  94. user_buttons_s0: user_buttons_s0 {
  95. pins = "B12", "B13", "B14";
  96. microchip,digital;
  97. input-enable;
  98. bias-pull-up;
  99. };
  100. pinctrl_uart2: pinctrl_uart2 {
  101. uart2-tx {
  102. pins = "G9";
  103. function = "U2TX";
  104. microchip,digital;
  105. output-high;
  106. };
  107. uart2-rx {
  108. pins = "B0";
  109. function = "U2RX";
  110. microchip,digital;
  111. input-enable;
  112. };
  113. };
  114. pinctrl_uart4: uart4-0 {
  115. uart4-tx {
  116. pins = "C3";
  117. function = "U4TX";
  118. microchip,digital;
  119. output-high;
  120. };
  121. uart4-rx {
  122. pins = "E8";
  123. function = "U4RX";
  124. microchip,digital;
  125. input-enable;
  126. };
  127. };
  128. };