Advertisement
hugh_1977

10049_bb_i2c

Apr 24th, 2013
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.06 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. /*
  6. * Copyright 2012 Free Electrons
  7. *
  8. * The code contained herein is licensed under the GNU General Public
  9. * License. You may obtain a copy of the GNU General Public License
  10. * Version 2 or later at the following locations:
  11. *
  12. * http://www.opensource.org/licenses/gpl-license.html
  13. * http://www.gnu.org/copyleft/gpl.html
  14. */
  15.  
  16. /*
  17. * The CFA-10049 is an expansion board for the CFA-10036 module, thus we
  18. * need to include the CFA-10036 DTS.
  19. */
  20. /include/ "imx28-cfa10036.dts"
  21.  
  22. / {
  23. model = "Crystalfontz CFA-10049 Board";
  24. compatible = "crystalfontz,cfa10049", "crystalfontz,cfa10036", "fsl,imx28";
  25.  
  26. apb@80000000 {
  27. apbh@80000000 {
  28. pinctrl@80018000 {
  29. pinctrl-names = "default", "default";
  30. pinctrl-1 = <&hog_pins_cfa10049
  31. &hog_pins_cfa10049_pullup>;
  32.  
  33. hog_pins_cfa10049: hog-10049@0 {
  34. reg = <0>;
  35. fsl,pinmux-ids = <
  36. 0x0073 /* MX28_PAD_GPMI_D7__GPIO_0_7 */
  37. 0x1163 /* MX28_PAD_LCD_D22__GPIO_1_22 */
  38. 0x1173 /* MX28_PAD_LCD_D22__GPIO_1_23 */
  39. 0x2153 /* MX28_PAD_SSP2_D5__GPIO_2_21 */
  40. 0x3173 /* MX28_PAD_LCD_RESET__GPIO_3_23 */
  41. >;
  42. fsl,drive-strength = <0>;
  43. fsl,voltage = <1>;
  44. fsl,pull-up = <0>;
  45. };
  46.  
  47. hog_pins_cfa10049_pullup: hog-10049-pullup@0 {
  48. reg = <0>;
  49. fsl,pinmux-ids = <
  50. 0x2133 /* MX28_PAD_SSP2_D3__GPIO_2_19 */
  51. 0x3183 /* MX28_PAD_I2C0_SCL__GPIO_3_24 */
  52. 0x3193 /* MX28_PAD_I2C0_SDA__GPIO_3_25 */
  53. 0x31a3 /* MX28_PAD_SAIF_SDATA0__GPIO_3_26 */
  54. 0x31e3 /* MX28_PAD_LCD_RESET__GPIO_3_30 */
  55. >;
  56. fsl,drive-strength = <0>;
  57. fsl,voltage = <1>;
  58. fsl,pull-up = <1>;
  59. };
  60.  
  61. spi2_pins_cfa10049: spi2-cfa10049@0 {
  62. reg = <0>;
  63. fsl,pinmux-ids = <
  64. 0x2103 /* MX28_PAD_SSP2_SCK__GPIO_2_16 */
  65. 0x2113 /* MX28_PAD_SSP2_CMD__GPIO_2_17 */
  66. 0x2123 /* MX28_PAD_SSP2_D0__GPIO_2_18 */
  67. >;
  68. fsl,drive-strength = <1>;
  69. fsl,voltage = <1>;
  70. fsl,pull-up = <1>;
  71. };
  72.  
  73. spi3_pins_cfa10049: spi3-cfa10049@0 {
  74. reg = <0>;
  75. fsl,pinmux-ids = <
  76. 0x0183 /* MX28_PAD_GPMI_RDN__GPIO_0_24 */
  77. 0x01c3 /* MX28_PAD_GPMI_RESETN__GPIO_0_28 */
  78. 0x0113 /* MX28_PAD_GPMI_CE1N__GPIO_0_17 */
  79. 0x01a3 /* MX28_PAD_GPMI_ALE__GPIO_0_26 */
  80. 0x01b3 /* MX28_PAD_GPMI_CLE__GPIO_0_27 */
  81. >;
  82. fsl,drive-strength = <1>;
  83. fsl,voltage = <1>;
  84. fsl,pull-up = <1>;
  85. };
  86.  
  87. lcdif_18bit_pins_cfa10049: lcdif-18bit@0 {
  88. reg = <0>;
  89. fsl,pinmux-ids = <
  90. 0x1000 /* MX28_PAD_LCD_D00__LCD_D0 */
  91. 0x1010 /* MX28_PAD_LCD_D01__LCD_D1 */
  92. 0x1020 /* MX28_PAD_LCD_D02__LCD_D2 */
  93. 0x1030 /* MX28_PAD_LCD_D03__LCD_D3 */
  94. 0x1040 /* MX28_PAD_LCD_D04__LCD_D4 */
  95. 0x1050 /* MX28_PAD_LCD_D05__LCD_D5 */
  96. 0x1060 /* MX28_PAD_LCD_D06__LCD_D6 */
  97. 0x1070 /* MX28_PAD_LCD_D07__LCD_D7 */
  98. 0x1080 /* MX28_PAD_LCD_D08__LCD_D8 */
  99. 0x1090 /* MX28_PAD_LCD_D09__LCD_D9 */
  100. 0x10a0 /* MX28_PAD_LCD_D10__LCD_D10 */
  101. 0x10b0 /* MX28_PAD_LCD_D11__LCD_D11 */
  102. 0x10c0 /* MX28_PAD_LCD_D12__LCD_D12 */
  103. 0x10d0 /* MX28_PAD_LCD_D13__LCD_D13 */
  104. 0x10e0 /* MX28_PAD_LCD_D14__LCD_D14 */
  105. 0x10f0 /* MX28_PAD_LCD_D15__LCD_D15 */
  106. 0x1100 /* MX28_PAD_LCD_D16__LCD_D16 */
  107. 0x1110 /* MX28_PAD_LCD_D17__LCD_D17 */
  108. >;
  109. fsl,drive-strength = <0>;
  110. fsl,voltage = <1>;
  111. fsl,pull-up = <0>;
  112. };
  113.  
  114. lcdif_pins_cfa10049: lcdif-evk@0 {
  115. reg = <0>;
  116. fsl,pinmux-ids = <
  117. 0x1181 /* MX28_PAD_LCD_RD_E__LCD_VSYNC */
  118. 0x1191 /* MX28_PAD_LCD_WR_RWN__LCD_HSYNC */
  119. 0x11a1 /* MX28_PAD_LCD_RS__LCD_DOTCLK */
  120. 0x11b1 /* MX28_PAD_LCD_CS__LCD_ENABLE */
  121. >;
  122. fsl,drive-strength = <0>;
  123. fsl,voltage = <1>;
  124. fsl,pull-up = <0>;
  125. };
  126.  
  127. w1_gpio_pins: w1-gpio@0 {
  128. reg = <0>;
  129. fsl,pinmux-ids = <
  130. 0x1153 /* MX28_PAD_LCD_D21__GPIO_1_21 */
  131. >;
  132. fsl,drive-strength = <1>;
  133. fsl,voltage = <1>;
  134. fsl,pull-up = <0>; /* 0 will enable the keeper */
  135. };
  136.  
  137. i2c1_pins_cfa10049: i2c1@0 {
  138. reg = <0>;
  139. fsl,pinmux-ids = <
  140. 0x3103 /* MX28_PAD_PWM0__GPIO */
  141. 0x3113 /* MX28_PAD_PWM1__I2C1_SDA */
  142. >;
  143. fsl,drive-strength = <1>;
  144. fsl,voltage = <1>;
  145. fsl,pull-up = <1>;
  146. };
  147. };
  148.  
  149. lcdif@80030000 {
  150. pinctrl-names = "default";
  151. pinctrl-0 = <&lcdif_18bit_pins_cfa10049
  152. &lcdif_pins_cfa10049>;
  153. status = "okay";
  154. };
  155. };
  156.  
  157. apbx@80040000 {
  158. pwm: pwm@80064000 {
  159. pinctrl-names = "default";
  160. pinctrl-0 = <&pwm3_pins_b>;
  161. status = "okay";
  162. };
  163.  
  164. usbphy1: usbphy@8007e000 {
  165. status = "okay";
  166. };
  167.  
  168. lradc@80050000 {
  169. status = "okay";
  170. fsl,lradc-touchscreen-wires = <4>;
  171. };
  172. };
  173. };
  174.  
  175. ahb@80080000 {
  176. usb1: usb@80090000 {
  177. vbus-supply = <&reg_usb1_vbus>;
  178. pinctrl-0 = <&usbphy1_pins_a>;
  179. pinctrl-names = "default";
  180. status = "okay";
  181. };
  182. };
  183.  
  184. regulators {
  185. compatible = "simple-bus";
  186.  
  187. reg_usb1_vbus: usb1_vbus {
  188. compatible = "regulator-fixed";
  189. regulator-name = "usb1_vbus";
  190. regulator-min-microvolt = <5000000>;
  191. regulator-max-microvolt = <5000000>;
  192. gpio = <&gpio0 7 1>;
  193. };
  194. };
  195.  
  196. ahb@80080000 {
  197. mac0: ethernet@800f0000 {
  198. phy-mode = "rmii";
  199. pinctrl-names = "default";
  200. pinctrl-0 = <&mac0_pins_a>;
  201. phy-reset-gpios = <&gpio2 21 0>;
  202. phy-reset-duration = <100>;
  203. status = "okay";
  204. };
  205. };
  206.  
  207. spi2 {
  208. compatible = "spi-gpio";
  209. pinctrl-names = "default";
  210. pinctrl-0 = <&spi2_pins_cfa10049>;
  211. status = "okay";
  212. gpio-sck = <&gpio2 16 0>;
  213. gpio-mosi = <&gpio2 17 0>;
  214. gpio-miso = <&gpio2 18 0>;
  215. cs-gpios = <&gpio3 23 0>;
  216. num-chipselects = <1>;
  217. #address-cells = <1>;
  218. #size-cells = <0>;
  219.  
  220. hx8357: hx8357@0 {
  221. compatible = "himax,hx8357b", "himax,hx8357";
  222. reg = <0>;
  223. spi-max-frequency = <100000>;
  224. spi-cpol;
  225. spi-cpha;
  226. gpios-reset = <&gpio3 30 0>;
  227. im-gpios = <&gpio5 4 0 &gpio5 5 0 &gpio5 6 0>;
  228. };
  229. };
  230.  
  231. spi3 {
  232. compatible = "spi-gpio";
  233. pinctrl-names = "default";
  234. pinctrl-0 = <&spi3_pins_cfa10049>;
  235. status = "okay";
  236. gpio-sck = <&gpio0 24 0>;
  237. gpio-mosi = <&gpio0 28 0>;
  238. cs-gpios = <&gpio0 17 0 &gpio0 26 0 &gpio0 27 0>;
  239. num-chipselects = <3>;
  240. #address-cells = <1>;
  241. #size-cells = <0>;
  242.  
  243. gpio5: gpio5@0 {
  244. compatible = "fairchild,74hc595";
  245. gpio-controller;
  246. #gpio-cells = <2>;
  247. reg = <0>;
  248. registers-number = <2>;
  249. spi-max-frequency = <100000>;
  250. };
  251.  
  252. gpio6: gpio6@1 {
  253. compatible = "fairchild,74hc595";
  254. gpio-controller;
  255. #gpio-cells = <2>;
  256. reg = <1>;
  257. registers-number = <4>;
  258. spi-max-frequency = <100000>;
  259. };
  260.  
  261. dac0: dh2228@2 {
  262. compatible = "rohm,dh2228fv";
  263. reg = <2>;
  264. spi-max-frequency = <100000>;
  265. };
  266. };
  267.  
  268. gpio_keys {
  269. compatible = "gpio-keys";
  270. #address-cells = <1>;
  271. #size-cells = <0>;
  272.  
  273. rotary_button {
  274. label = "rotary_button";
  275. gpios = <&gpio3 26 1>;
  276. debounce-interval = <10>;
  277. linux,code = <28>;
  278. };
  279. };
  280.  
  281. rotary {
  282. compatible = "rotary-encoder";
  283. gpios = <&gpio3 24 1>, <&gpio3 25 1>;
  284. linux,axis = <1>; /* REL_Y */
  285. rotary-encoder,relative-axis;
  286. };
  287.  
  288. i2c1gpio: i2c@0 {
  289. compatible = "i2c-gpio";
  290. pinctrl-0 = <&i2c1_pins_cfa10049>;
  291. pinctrl-names = "default";
  292. gpios = <
  293. &gpio3 17 0 /* sda */
  294. &gpio3 16 0 /* scl */
  295. >;
  296. i2c-gpio,delay-us = <2>; /* ~100 kHz */
  297. };
  298.  
  299. i2cmux {
  300. compatible = "i2c-mux-gpio";
  301. #address-cells = <1>;
  302. #size-cells = <0>;
  303. mux-gpios = <&gpio1 22 0 &gpio1 23 0>;
  304. i2c-parent = <&i2c1gpio>;
  305.  
  306. i2c@0 {
  307. reg = <0>;
  308. #address-cells = <1>;
  309. #size-cells = <0>;
  310.  
  311. adc0: nau7802@2a {
  312. compatible = "nuvoton,nau7802";
  313. reg = <0x2a>;
  314. interrupt-parent = <&pca9555>;
  315. interrupts = <8 0x2>;
  316. };
  317. };
  318.  
  319. i2c@1 {
  320. reg = <1>;
  321. #address-cells = <1>;
  322. #size-cells = <0>;
  323.  
  324. adc1: nau7802@2a {
  325. compatible = "nuvoton,nau7802";
  326. reg = <0x2a>;
  327. interrupt-parent = <&pca9555>;
  328. interrupts = <9 0x2>;
  329. };
  330. };
  331.  
  332. i2c@2 {
  333. reg = <2>;
  334. #address-cells = <1>;
  335. #size-cells = <0>;
  336.  
  337. adc2: nau7802@2a {
  338. compatible = "nuvoton,nau7802";
  339. reg = <0x2a>;
  340. interrupt-parent = <&pca9555>;
  341. interrupts = <10 0x2>;
  342. };
  343. };
  344.  
  345. i2c@3 {
  346. reg = <3>;
  347. #address-cells = <1>;
  348. #size-cells = <0>;
  349.  
  350. pca9555: pca9555@20 {
  351. compatible = "nxp,pca9555";
  352. interrupt-parent = <&gpio2>;
  353. interrupts = <19 0x2>;
  354. gpio-controller;
  355. #gpio-cells = <2>;
  356. interrupt-controller;
  357. #interrupt-cells = <2>;
  358. reg = <0x20>;
  359. };
  360. };
  361. };
  362.  
  363. backlight {
  364. compatible = "pwm-backlight";
  365. pwms = <&pwm 3 5000000>;
  366. brightness-levels = <0 4 8 16 32 64 128 255>;
  367. default-brightness-level = <6>;
  368.  
  369. };
  370.  
  371. onewire@0 {
  372. compatible = "w1-gpio";
  373. pinctrl-names = "default";
  374. pinctrl-0 = <&w1_gpio_pins>;
  375. status = "okay";
  376. gpios = <&gpio1 21 0>;
  377. };
  378. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement