k210-maix-bit.dts 4.2 KB

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