mt2701-evb.dts 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2015 MediaTek Inc.
  4. * Author: Erin Lo <[email protected]>
  5. *
  6. */
  7. /dts-v1/;
  8. #include <dt-bindings/gpio/gpio.h>
  9. #include "mt2701.dtsi"
  10. / {
  11. model = "MediaTek MT2701 evaluation board";
  12. compatible = "mediatek,mt2701-evb", "mediatek,mt2701";
  13. memory {
  14. device_type = "memory";
  15. reg = <0 0x80000000 0 0x40000000>;
  16. };
  17. sound:sound {
  18. compatible = "mediatek,mt2701-cs42448-machine";
  19. mediatek,platform = <&afe>;
  20. /* CS42448 Machine name */
  21. audio-routing =
  22. "Line Out Jack", "AOUT1L",
  23. "Line Out Jack", "AOUT1R",
  24. "Line Out Jack", "AOUT2L",
  25. "Line Out Jack", "AOUT2R",
  26. "Line Out Jack", "AOUT3L",
  27. "Line Out Jack", "AOUT3R",
  28. "Line Out Jack", "AOUT4L",
  29. "Line Out Jack", "AOUT4R",
  30. "AIN1L", "AMIC",
  31. "AIN1R", "AMIC",
  32. "AIN2L", "Tuner In",
  33. "AIN2R", "Tuner In",
  34. "AIN3L", "Satellite Tuner In",
  35. "AIN3R", "Satellite Tuner In",
  36. "AIN3L", "AUX In",
  37. "AIN3R", "AUX In";
  38. mediatek,audio-codec = <&cs42448>;
  39. mediatek,audio-codec-bt-mrg = <&bt_sco_codec>;
  40. pinctrl-names = "default";
  41. pinctrl-0 = <&aud_pins_default>;
  42. i2s1-in-sel-gpio1 = <&pio 53 0>;
  43. i2s1-in-sel-gpio2 = <&pio 54 0>;
  44. status = "okay";
  45. };
  46. bt_sco_codec:bt_sco_codec {
  47. compatible = "linux,bt-sco";
  48. };
  49. backlight_lcd: backlight_lcd {
  50. compatible = "pwm-backlight";
  51. pwms = <&bls 0 100000>;
  52. brightness-levels = <
  53. 0 16 32 48 64 80 96 112
  54. 128 144 160 176 192 208 224 240
  55. 255
  56. >;
  57. default-brightness-level = <9>;
  58. };
  59. usb_vbus: regulator@0 {
  60. compatible = "regulator-fixed";
  61. regulator-name = "usb_vbus";
  62. regulator-min-microvolt = <5000000>;
  63. regulator-max-microvolt = <5000000>;
  64. gpio = <&pio 45 GPIO_ACTIVE_HIGH>;
  65. enable-active-high;
  66. };
  67. };
  68. &auxadc {
  69. status = "okay";
  70. };
  71. &bls {
  72. status = "okay";
  73. pinctrl-names = "default";
  74. pinctrl-0 = <&pwm_bls_gpio>;
  75. };
  76. &i2c0 {
  77. pinctrl-names = "default";
  78. pinctrl-0 = <&i2c0_pins_a>;
  79. status = "okay";
  80. };
  81. &i2c1 {
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&i2c1_pins_a>;
  84. status = "okay";
  85. };
  86. &i2c2 {
  87. pinctrl-names = "default";
  88. pinctrl-0 = <&i2c2_pins_a>;
  89. status = "okay";
  90. cs42448: cs42448@48 {
  91. compatible = "cirrus,cs42448";
  92. reg = <0x48>;
  93. clocks = <&topckgen CLK_TOP_AUD_I2S1_MCLK>;
  94. clock-names = "mclk";
  95. };
  96. };
  97. &pio {
  98. i2c0_pins_a: i2c0@0 {
  99. pins1 {
  100. pinmux = <MT2701_PIN_75_SDA0__FUNC_SDA0>,
  101. <MT2701_PIN_76_SCL0__FUNC_SCL0>;
  102. bias-disable;
  103. };
  104. };
  105. i2c1_pins_a: i2c1@0 {
  106. pins1 {
  107. pinmux = <MT2701_PIN_57_SDA1__FUNC_SDA1>,
  108. <MT2701_PIN_58_SCL1__FUNC_SCL1>;
  109. bias-disable;
  110. };
  111. };
  112. i2c2_pins_a: i2c2@0 {
  113. pins1 {
  114. pinmux = <MT2701_PIN_77_SDA2__FUNC_SDA2>,
  115. <MT2701_PIN_78_SCL2__FUNC_SCL2>;
  116. bias-disable;
  117. };
  118. };
  119. pwm_bls_gpio: pwm_bls_gpio {
  120. pins_cmd_dat {
  121. pinmux = <MT2701_PIN_208_AUD_EXT_CK1__FUNC_DISP_PWM>;
  122. };
  123. };
  124. spi_pins_a: spi0@0 {
  125. pins_spi {
  126. pinmux = <MT2701_PIN_53_SPI0_CSN__FUNC_SPI0_CS>,
  127. <MT2701_PIN_54_SPI0_CK__FUNC_SPI0_CK>,
  128. <MT2701_PIN_55_SPI0_MI__FUNC_SPI0_MI>,
  129. <MT2701_PIN_56_SPI0_MO__FUNC_SPI0_MO>;
  130. bias-disable;
  131. };
  132. };
  133. aud_pins_default: audiodefault {
  134. pins_cmd_dat {
  135. pinmux = <MT2701_PIN_49_I2S0_DATA__FUNC_I2S0_DATA>,
  136. <MT2701_PIN_72_I2S0_DATA_IN__FUNC_I2S0_DATA_IN>,
  137. <MT2701_PIN_73_I2S0_LRCK__FUNC_I2S0_LRCK>,
  138. <MT2701_PIN_74_I2S0_BCK__FUNC_I2S0_BCK>,
  139. <MT2701_PIN_126_I2S0_MCLK__FUNC_I2S0_MCLK>,
  140. <MT2701_PIN_33_I2S1_DATA__FUNC_I2S1_DATA>,
  141. <MT2701_PIN_34_I2S1_DATA_IN__FUNC_I2S1_DATA_IN>,
  142. <MT2701_PIN_35_I2S1_BCK__FUNC_I2S1_BCK>,
  143. <MT2701_PIN_36_I2S1_LRCK__FUNC_I2S1_LRCK>,
  144. <MT2701_PIN_37_I2S1_MCLK__FUNC_I2S1_MCLK>,
  145. <MT2701_PIN_203_PWM0__FUNC_I2S2_DATA>,
  146. <MT2701_PIN_204_PWM1__FUNC_I2S3_DATA>,
  147. <MT2701_PIN_53_SPI0_CSN__FUNC_GPIO53>,
  148. <MT2701_PIN_54_SPI0_CK__FUNC_GPIO54>,
  149. <MT2701_PIN_18_PCM_CLK__FUNC_MRG_CLK>,
  150. <MT2701_PIN_19_PCM_SYNC__FUNC_MRG_SYNC>,
  151. <MT2701_PIN_20_PCM_RX__FUNC_MRG_TX>,
  152. <MT2701_PIN_21_PCM_TX__FUNC_MRG_RX>;
  153. drive-strength = <MTK_DRIVE_12mA>;
  154. bias-pull-down;
  155. };
  156. };
  157. spi_pins_b: spi1@0 {
  158. pins_spi {
  159. pinmux = <MT2701_PIN_7_SPI1_CSN__FUNC_SPI1_CS>,
  160. <MT2701_PIN_8_SPI1_MI__FUNC_SPI1_MI>,
  161. <MT2701_PIN_9_SPI1_MO__FUNC_SPI1_MO>,
  162. <MT2701_PIN_199_SPI1_CLK__FUNC_SPI1_CK>;
  163. bias-disable;
  164. };
  165. };
  166. spi_pins_c: spi2@0 {
  167. pins_spi {
  168. pinmux = <MT2701_PIN_101_SPI2_CSN__FUNC_SPI2_CS>,
  169. <MT2701_PIN_102_SPI2_MI__FUNC_SPI2_MI>,
  170. <MT2701_PIN_103_SPI2_MO__FUNC_SPI2_MO>,
  171. <MT2701_PIN_104_SPI2_CLK__FUNC_SPI2_CK>;
  172. bias-disable;
  173. };
  174. };
  175. };
  176. &spi0 {
  177. pinctrl-names = "default";
  178. pinctrl-0 = <&spi_pins_a>;
  179. status = "disabled";
  180. };
  181. &spi1 {
  182. pinctrl-names = "default";
  183. pinctrl-0 = <&spi_pins_b>;
  184. status = "disabled";
  185. };
  186. &spi2 {
  187. pinctrl-names = "default";
  188. pinctrl-0 = <&spi_pins_c>;
  189. status = "disabled";
  190. };
  191. &nor_flash {
  192. pinctrl-names = "default";
  193. pinctrl-0 = <&nor_pins_default>;
  194. status = "okay";
  195. flash@0 {
  196. compatible = "jedec,spi-nor";
  197. reg = <0>;
  198. };
  199. };
  200. &pio {
  201. nor_pins_default: nor {
  202. pins1 {
  203. pinmux = <MT2701_PIN_240_EXT_XCS__FUNC_EXT_XCS>,
  204. <MT2701_PIN_241_EXT_SCK__FUNC_EXT_SCK>,
  205. <MT2701_PIN_239_EXT_SDIO0__FUNC_EXT_SDIO0>,
  206. <MT2701_PIN_238_EXT_SDIO1__FUNC_EXT_SDIO1>,
  207. <MT2701_PIN_237_EXT_SDIO2__FUNC_EXT_SDIO2>,
  208. <MT2701_PIN_236_EXT_SDIO3__FUNC_EXT_SDIO3>;
  209. drive-strength = <MTK_DRIVE_4mA>;
  210. bias-pull-up;
  211. };
  212. };
  213. };
  214. &uart0 {
  215. status = "okay";
  216. };
  217. &usb2 {
  218. status = "okay";
  219. usb-role-switch;
  220. connector{
  221. compatible = "gpio-usb-b-connector", "usb-b-connector";
  222. type = "micro";
  223. id-gpios = <&pio 44 GPIO_ACTIVE_HIGH>;
  224. vbus-supply = <&usb_vbus>;
  225. };
  226. };