k210-maix-bit.dts 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (C) 2019-20 Sean Anderson <seanga2@gmail.com>
  4. */
  5. /dts-v1/;
  6. #include "k210.dtsi"
  7. #include <dt-bindings/gpio/gpio.h>
  8. #include <dt-bindings/input/input.h>
  9. / {
  10. model = "Sipeed Maix Bit 2.0";
  11. compatible = "sipeed,maix-bitm", "sipeed,maix-bit", "kendryte,k210";
  12. chosen {
  13. stdout-path = "serial0:115200";
  14. };
  15. gpio-leds {
  16. compatible = "gpio-leds";
  17. green {
  18. gpios = <&gpio1_0 4 GPIO_ACTIVE_LOW>;
  19. };
  20. red {
  21. gpios = <&gpio1_0 5 GPIO_ACTIVE_LOW>;
  22. };
  23. blue {
  24. gpios = <&gpio1_0 6 GPIO_ACTIVE_LOW>;
  25. };
  26. };
  27. gpio-keys {
  28. compatible = "gpio-keys";
  29. boot {
  30. label = "BOOT";
  31. linux,code = <BTN_0>;
  32. gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  33. };
  34. };
  35. sound {
  36. compatible = "simple-audio-card";
  37. simple-audio-card,format = "i2s";
  38. status = "disabled";
  39. simple-audio-card,cpu {
  40. sound-dai = <&i2s0 0>;
  41. };
  42. simple-audio-card,codec {
  43. sound-dai = <&mic>;
  44. };
  45. };
  46. mic: mic {
  47. #sound-dai-cells = <0>;
  48. compatible = "memsensing,msm61s4030h0";
  49. status = "disabled";
  50. };
  51. };
  52. &uarths0 {
  53. pinctrl-0 = <&fpioa_uarths>;
  54. pinctrl-names = "default";
  55. status = "okay";
  56. };
  57. &gpio0 {
  58. pinctrl-0 = <&fpioa_gpiohs>;
  59. pinctrl-names = "default";
  60. status = "okay";
  61. };
  62. &gpio1 {
  63. pinctrl-0 = <&fpioa_gpio>;
  64. pinctrl-names = "default";
  65. status = "okay";
  66. };
  67. &i2s0 {
  68. #sound-dai-cells = <1>;
  69. pinctrl-0 = <&fpioa_i2s0>;
  70. pinctrl-names = "default";
  71. };
  72. &fpioa {
  73. status = "okay";
  74. fpioa_uarths: uarths {
  75. pinmux = <K210_FPIOA(4, K210_PCF_UARTHS_RX)>,
  76. <K210_FPIOA(5, K210_PCF_UARTHS_TX)>;
  77. };
  78. fpioa_gpio: gpio {
  79. pinmux = <K210_FPIOA(8, K210_PCF_GPIO0)>,
  80. <K210_FPIOA(9, K210_PCF_GPIO1)>,
  81. <K210_FPIOA(10, K210_PCF_GPIO2)>,
  82. <K210_FPIOA(11, K210_PCF_GPIO3)>,
  83. <K210_FPIOA(12, K210_PCF_GPIO4)>,
  84. <K210_FPIOA(13, K210_PCF_GPIO5)>,
  85. <K210_FPIOA(14, K210_PCF_GPIO6)>,
  86. <K210_FPIOA(15, K210_PCF_GPIO7)>;
  87. };
  88. fpioa_gpiohs: gpiohs {
  89. pinmux = <K210_FPIOA(16, K210_PCF_GPIOHS0)>,
  90. <K210_FPIOA(17, K210_PCF_GPIOHS1)>,
  91. <K210_FPIOA(21, K210_PCF_GPIOHS5)>,
  92. <K210_FPIOA(22, K210_PCF_GPIOHS6)>,
  93. <K210_FPIOA(23, K210_PCF_GPIOHS7)>,
  94. <K210_FPIOA(24, K210_PCF_GPIOHS8)>,
  95. <K210_FPIOA(25, K210_PCF_GPIOHS9)>,
  96. <K210_FPIOA(30, K210_PCF_GPIOHS14)>,
  97. <K210_FPIOA(31, K210_PCF_GPIOHS15)>,
  98. <K210_FPIOA(32, K210_PCF_GPIOHS16)>,
  99. <K210_FPIOA(33, K210_PCF_GPIOHS17)>,
  100. <K210_FPIOA(34, K210_PCF_GPIOHS18)>,
  101. <K210_FPIOA(35, K210_PCF_GPIOHS19)>;
  102. };
  103. fpioa_i2s0: i2s0 {
  104. pinmux = <K210_FPIOA(18, K210_PCF_I2S0_SCLK)>,
  105. <K210_FPIOA(19, K210_PCF_I2S0_WS)>,
  106. <K210_FPIOA(20, K210_PCF_I2S0_IN_D0)>;
  107. };
  108. fpioa_dvp: dvp {
  109. pinmux = <K210_FPIOA(40, K210_PCF_SCCB_SDA)>,
  110. <K210_FPIOA(41, K210_PCF_SCCB_SCLK)>,
  111. <K210_FPIOA(42, K210_PCF_DVP_RST)>,
  112. <K210_FPIOA(43, K210_PCF_DVP_VSYNC)>,
  113. <K210_FPIOA(44, K210_PCF_DVP_PWDN)>,
  114. <K210_FPIOA(45, K210_PCF_DVP_HSYNC)>,
  115. <K210_FPIOA(46, K210_PCF_DVP_XCLK)>,
  116. <K210_FPIOA(47, K210_PCF_DVP_PCLK)>;
  117. };
  118. fpioa_spi0: spi0 {
  119. pinmux = <K210_FPIOA(36, K210_PCF_GPIOHS20)>, /* cs */
  120. <K210_FPIOA(37, K210_PCF_GPIOHS21)>, /* rst */
  121. <K210_FPIOA(38, K210_PCF_GPIOHS22)>, /* dc */
  122. <K210_FPIOA(39, K210_PCF_SPI0_SCLK)>; /* wr */
  123. };
  124. fpioa_spi1: spi1 {
  125. pinmux = <K210_FPIOA(26, K210_PCF_SPI1_D1)>,
  126. <K210_FPIOA(27, K210_PCF_SPI1_SCLK)>,
  127. <K210_FPIOA(28, K210_PCF_SPI1_D0)>,
  128. <K210_FPIOA(29, K210_PCF_GPIOHS13)>; /* cs */
  129. };
  130. };
  131. &dvp0 {
  132. pinctrl-0 = <&fpioa_dvp>;
  133. pinctrl-names = "default";
  134. };
  135. &spi0 {
  136. pinctrl-0 = <&fpioa_spi0>;
  137. pinctrl-names = "default";
  138. num-cs = <1>;
  139. cs-gpios = <&gpio0 20 0>;
  140. panel@0 {
  141. compatible = "sitronix,st7789v";
  142. reg = <0>;
  143. reset-gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
  144. dc-gpios = <&gpio0 22 0>;
  145. spi-max-frequency = <15000000>;
  146. status = "disabled";
  147. };
  148. };
  149. &spi1 {
  150. pinctrl-0 = <&fpioa_spi1>;
  151. pinctrl-names = "default";
  152. num-cs = <1>;
  153. cs-gpios = <&gpio0 13 0>;
  154. status = "okay";
  155. slot@0 {
  156. compatible = "mmc-spi-slot";
  157. reg = <0>;
  158. spi-max-frequency = <25000000>;
  159. voltage-ranges = <3300 3300>;
  160. broken-cd;
  161. };
  162. };
  163. &spi3 {
  164. status = "okay";
  165. spi-flash@0 {
  166. compatible = "jedec,spi-nor";
  167. reg = <0>;
  168. spi-max-frequency = <50000000>;
  169. spi-tx-bus-width = <4>;
  170. spi-rx-bus-width = <4>;
  171. m25p,fast-read;
  172. broken-flash-reset;
  173. };
  174. };