devices.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. /*
  2. * Copyright (C) 2010,2011 Google, Inc.
  3. *
  4. * Author:
  5. * Colin Cross <ccross@android.com>
  6. * Erik Gilling <ccross@android.com>
  7. *
  8. * This software is licensed under the terms of the GNU General Public
  9. * License version 2, as published by the Free Software Foundation, and
  10. * may be copied, distributed, and modified under those terms.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. */
  18. #include <linux/resource.h>
  19. #include <linux/platform_device.h>
  20. #include <linux/dma-mapping.h>
  21. #include <linux/fsl_devices.h>
  22. #include <linux/serial_8250.h>
  23. #include <linux/i2c-tegra.h>
  24. #include <asm/pmu.h>
  25. #include <mach/irqs.h>
  26. #include <mach/iomap.h>
  27. #include <mach/dma.h>
  28. #include <mach/usb_phy.h>
  29. #include "gpio-names.h"
  30. #include "devices.h"
  31. static struct resource gpio_resource[] = {
  32. [0] = {
  33. .start = TEGRA_GPIO_BASE,
  34. .end = TEGRA_GPIO_BASE + TEGRA_GPIO_SIZE-1,
  35. .flags = IORESOURCE_MEM,
  36. },
  37. [1] = {
  38. .start = INT_GPIO1,
  39. .end = INT_GPIO1,
  40. .flags = IORESOURCE_IRQ,
  41. },
  42. [2] = {
  43. .start = INT_GPIO2,
  44. .end = INT_GPIO2,
  45. .flags = IORESOURCE_IRQ,
  46. },
  47. [3] = {
  48. .start = INT_GPIO3,
  49. .end = INT_GPIO3,
  50. .flags = IORESOURCE_IRQ,
  51. },
  52. [4] = {
  53. .start = INT_GPIO4,
  54. .end = INT_GPIO4,
  55. .flags = IORESOURCE_IRQ,
  56. },
  57. [5] = {
  58. .start = INT_GPIO5,
  59. .end = INT_GPIO5,
  60. .flags = IORESOURCE_IRQ,
  61. },
  62. [6] = {
  63. .start = INT_GPIO6,
  64. .end = INT_GPIO6,
  65. .flags = IORESOURCE_IRQ,
  66. },
  67. [7] = {
  68. .start = INT_GPIO7,
  69. .end = INT_GPIO7,
  70. .flags = IORESOURCE_IRQ,
  71. },
  72. };
  73. struct platform_device tegra_gpio_device = {
  74. .name = "tegra-gpio",
  75. .id = -1,
  76. .resource = gpio_resource,
  77. .num_resources = ARRAY_SIZE(gpio_resource),
  78. };
  79. static struct resource pinmux_resource[] = {
  80. [0] = {
  81. /* Tri-state registers */
  82. .start = TEGRA_APB_MISC_BASE + 0x14,
  83. .end = TEGRA_APB_MISC_BASE + 0x20 + 3,
  84. .flags = IORESOURCE_MEM,
  85. },
  86. [1] = {
  87. /* Mux registers */
  88. .start = TEGRA_APB_MISC_BASE + 0x80,
  89. .end = TEGRA_APB_MISC_BASE + 0x9c + 3,
  90. .flags = IORESOURCE_MEM,
  91. },
  92. [2] = {
  93. /* Pull-up/down registers */
  94. .start = TEGRA_APB_MISC_BASE + 0xa0,
  95. .end = TEGRA_APB_MISC_BASE + 0xb0 + 3,
  96. .flags = IORESOURCE_MEM,
  97. },
  98. [3] = {
  99. /* Pad control registers */
  100. .start = TEGRA_APB_MISC_BASE + 0x868,
  101. .end = TEGRA_APB_MISC_BASE + 0x90c + 3,
  102. .flags = IORESOURCE_MEM,
  103. },
  104. };
  105. struct platform_device tegra_pinmux_device = {
  106. .name = "tegra20-pinctrl",
  107. .id = -1,
  108. .resource = pinmux_resource,
  109. .num_resources = ARRAY_SIZE(pinmux_resource),
  110. };
  111. static struct resource i2c_resource1[] = {
  112. [0] = {
  113. .start = INT_I2C,
  114. .end = INT_I2C,
  115. .flags = IORESOURCE_IRQ,
  116. },
  117. [1] = {
  118. .start = TEGRA_I2C_BASE,
  119. .end = TEGRA_I2C_BASE + TEGRA_I2C_SIZE-1,
  120. .flags = IORESOURCE_MEM,
  121. },
  122. };
  123. static struct resource i2c_resource2[] = {
  124. [0] = {
  125. .start = INT_I2C2,
  126. .end = INT_I2C2,
  127. .flags = IORESOURCE_IRQ,
  128. },
  129. [1] = {
  130. .start = TEGRA_I2C2_BASE,
  131. .end = TEGRA_I2C2_BASE + TEGRA_I2C2_SIZE-1,
  132. .flags = IORESOURCE_MEM,
  133. },
  134. };
  135. static struct resource i2c_resource3[] = {
  136. [0] = {
  137. .start = INT_I2C3,
  138. .end = INT_I2C3,
  139. .flags = IORESOURCE_IRQ,
  140. },
  141. [1] = {
  142. .start = TEGRA_I2C3_BASE,
  143. .end = TEGRA_I2C3_BASE + TEGRA_I2C3_SIZE-1,
  144. .flags = IORESOURCE_MEM,
  145. },
  146. };
  147. static struct resource i2c_resource4[] = {
  148. [0] = {
  149. .start = INT_DVC,
  150. .end = INT_DVC,
  151. .flags = IORESOURCE_IRQ,
  152. },
  153. [1] = {
  154. .start = TEGRA_DVC_BASE,
  155. .end = TEGRA_DVC_BASE + TEGRA_DVC_SIZE-1,
  156. .flags = IORESOURCE_MEM,
  157. },
  158. };
  159. static struct tegra_i2c_platform_data tegra_i2c1_platform_data = {
  160. .bus_clk_rate = 400000,
  161. };
  162. static struct tegra_i2c_platform_data tegra_i2c2_platform_data = {
  163. .bus_clk_rate = 400000,
  164. };
  165. static struct tegra_i2c_platform_data tegra_i2c3_platform_data = {
  166. .bus_clk_rate = 400000,
  167. };
  168. static struct tegra_i2c_platform_data tegra_dvc_platform_data = {
  169. .bus_clk_rate = 400000,
  170. };
  171. struct platform_device tegra_i2c_device1 = {
  172. .name = "tegra-i2c",
  173. .id = 0,
  174. .resource = i2c_resource1,
  175. .num_resources = ARRAY_SIZE(i2c_resource1),
  176. .dev = {
  177. .platform_data = &tegra_i2c1_platform_data,
  178. },
  179. };
  180. struct platform_device tegra_i2c_device2 = {
  181. .name = "tegra-i2c",
  182. .id = 1,
  183. .resource = i2c_resource2,
  184. .num_resources = ARRAY_SIZE(i2c_resource2),
  185. .dev = {
  186. .platform_data = &tegra_i2c2_platform_data,
  187. },
  188. };
  189. struct platform_device tegra_i2c_device3 = {
  190. .name = "tegra-i2c",
  191. .id = 2,
  192. .resource = i2c_resource3,
  193. .num_resources = ARRAY_SIZE(i2c_resource3),
  194. .dev = {
  195. .platform_data = &tegra_i2c3_platform_data,
  196. },
  197. };
  198. struct platform_device tegra_i2c_device4 = {
  199. .name = "tegra-i2c",
  200. .id = 3,
  201. .resource = i2c_resource4,
  202. .num_resources = ARRAY_SIZE(i2c_resource4),
  203. .dev = {
  204. .platform_data = &tegra_dvc_platform_data,
  205. },
  206. };
  207. static struct resource spi_resource1[] = {
  208. [0] = {
  209. .start = INT_S_LINK1,
  210. .end = INT_S_LINK1,
  211. .flags = IORESOURCE_IRQ,
  212. },
  213. [1] = {
  214. .start = TEGRA_SPI1_BASE,
  215. .end = TEGRA_SPI1_BASE + TEGRA_SPI1_SIZE-1,
  216. .flags = IORESOURCE_MEM,
  217. },
  218. };
  219. static struct resource spi_resource2[] = {
  220. [0] = {
  221. .start = INT_SPI_2,
  222. .end = INT_SPI_2,
  223. .flags = IORESOURCE_IRQ,
  224. },
  225. [1] = {
  226. .start = TEGRA_SPI2_BASE,
  227. .end = TEGRA_SPI2_BASE + TEGRA_SPI2_SIZE-1,
  228. .flags = IORESOURCE_MEM,
  229. },
  230. };
  231. static struct resource spi_resource3[] = {
  232. [0] = {
  233. .start = INT_SPI_3,
  234. .end = INT_SPI_3,
  235. .flags = IORESOURCE_IRQ,
  236. },
  237. [1] = {
  238. .start = TEGRA_SPI3_BASE,
  239. .end = TEGRA_SPI3_BASE + TEGRA_SPI3_SIZE-1,
  240. .flags = IORESOURCE_MEM,
  241. },
  242. };
  243. static struct resource spi_resource4[] = {
  244. [0] = {
  245. .start = INT_SPI_4,
  246. .end = INT_SPI_4,
  247. .flags = IORESOURCE_IRQ,
  248. },
  249. [1] = {
  250. .start = TEGRA_SPI4_BASE,
  251. .end = TEGRA_SPI4_BASE + TEGRA_SPI4_SIZE-1,
  252. .flags = IORESOURCE_MEM,
  253. },
  254. };
  255. struct platform_device tegra_spi_device1 = {
  256. .name = "spi_tegra",
  257. .id = 0,
  258. .resource = spi_resource1,
  259. .num_resources = ARRAY_SIZE(spi_resource1),
  260. .dev = {
  261. .coherent_dma_mask = 0xffffffff,
  262. },
  263. };
  264. struct platform_device tegra_spi_device2 = {
  265. .name = "spi_tegra",
  266. .id = 1,
  267. .resource = spi_resource2,
  268. .num_resources = ARRAY_SIZE(spi_resource2),
  269. .dev = {
  270. .coherent_dma_mask = 0xffffffff,
  271. },
  272. };
  273. struct platform_device tegra_spi_device3 = {
  274. .name = "spi_tegra",
  275. .id = 2,
  276. .resource = spi_resource3,
  277. .num_resources = ARRAY_SIZE(spi_resource3),
  278. .dev = {
  279. .coherent_dma_mask = 0xffffffff,
  280. },
  281. };
  282. struct platform_device tegra_spi_device4 = {
  283. .name = "spi_tegra",
  284. .id = 3,
  285. .resource = spi_resource4,
  286. .num_resources = ARRAY_SIZE(spi_resource4),
  287. .dev = {
  288. .coherent_dma_mask = 0xffffffff,
  289. },
  290. };
  291. static struct resource sdhci_resource1[] = {
  292. [0] = {
  293. .start = INT_SDMMC1,
  294. .end = INT_SDMMC1,
  295. .flags = IORESOURCE_IRQ,
  296. },
  297. [1] = {
  298. .start = TEGRA_SDMMC1_BASE,
  299. .end = TEGRA_SDMMC1_BASE + TEGRA_SDMMC1_SIZE-1,
  300. .flags = IORESOURCE_MEM,
  301. },
  302. };
  303. static struct resource sdhci_resource2[] = {
  304. [0] = {
  305. .start = INT_SDMMC2,
  306. .end = INT_SDMMC2,
  307. .flags = IORESOURCE_IRQ,
  308. },
  309. [1] = {
  310. .start = TEGRA_SDMMC2_BASE,
  311. .end = TEGRA_SDMMC2_BASE + TEGRA_SDMMC2_SIZE-1,
  312. .flags = IORESOURCE_MEM,
  313. },
  314. };
  315. static struct resource sdhci_resource3[] = {
  316. [0] = {
  317. .start = INT_SDMMC3,
  318. .end = INT_SDMMC3,
  319. .flags = IORESOURCE_IRQ,
  320. },
  321. [1] = {
  322. .start = TEGRA_SDMMC3_BASE,
  323. .end = TEGRA_SDMMC3_BASE + TEGRA_SDMMC3_SIZE-1,
  324. .flags = IORESOURCE_MEM,
  325. },
  326. };
  327. static struct resource sdhci_resource4[] = {
  328. [0] = {
  329. .start = INT_SDMMC4,
  330. .end = INT_SDMMC4,
  331. .flags = IORESOURCE_IRQ,
  332. },
  333. [1] = {
  334. .start = TEGRA_SDMMC4_BASE,
  335. .end = TEGRA_SDMMC4_BASE + TEGRA_SDMMC4_SIZE-1,
  336. .flags = IORESOURCE_MEM,
  337. },
  338. };
  339. /* board files should fill in platform_data register the devices themselvs.
  340. * See board-harmony.c for an example
  341. */
  342. struct platform_device tegra_sdhci_device1 = {
  343. .name = "sdhci-tegra",
  344. .id = 0,
  345. .resource = sdhci_resource1,
  346. .num_resources = ARRAY_SIZE(sdhci_resource1),
  347. };
  348. struct platform_device tegra_sdhci_device2 = {
  349. .name = "sdhci-tegra",
  350. .id = 1,
  351. .resource = sdhci_resource2,
  352. .num_resources = ARRAY_SIZE(sdhci_resource2),
  353. };
  354. struct platform_device tegra_sdhci_device3 = {
  355. .name = "sdhci-tegra",
  356. .id = 2,
  357. .resource = sdhci_resource3,
  358. .num_resources = ARRAY_SIZE(sdhci_resource3),
  359. };
  360. struct platform_device tegra_sdhci_device4 = {
  361. .name = "sdhci-tegra",
  362. .id = 3,
  363. .resource = sdhci_resource4,
  364. .num_resources = ARRAY_SIZE(sdhci_resource4),
  365. };
  366. static struct resource tegra_usb1_resources[] = {
  367. [0] = {
  368. .start = TEGRA_USB_BASE,
  369. .end = TEGRA_USB_BASE + TEGRA_USB_SIZE - 1,
  370. .flags = IORESOURCE_MEM,
  371. },
  372. [1] = {
  373. .start = INT_USB,
  374. .end = INT_USB,
  375. .flags = IORESOURCE_IRQ,
  376. },
  377. };
  378. static struct resource tegra_usb2_resources[] = {
  379. [0] = {
  380. .start = TEGRA_USB2_BASE,
  381. .end = TEGRA_USB2_BASE + TEGRA_USB2_SIZE - 1,
  382. .flags = IORESOURCE_MEM,
  383. },
  384. [1] = {
  385. .start = INT_USB2,
  386. .end = INT_USB2,
  387. .flags = IORESOURCE_IRQ,
  388. },
  389. };
  390. static struct resource tegra_usb3_resources[] = {
  391. [0] = {
  392. .start = TEGRA_USB3_BASE,
  393. .end = TEGRA_USB3_BASE + TEGRA_USB3_SIZE - 1,
  394. .flags = IORESOURCE_MEM,
  395. },
  396. [1] = {
  397. .start = INT_USB3,
  398. .end = INT_USB3,
  399. .flags = IORESOURCE_IRQ,
  400. },
  401. };
  402. static struct tegra_ulpi_config tegra_ehci2_ulpi_phy_config = {
  403. /* All existing boards use GPIO PV0 for phy reset */
  404. .reset_gpio = TEGRA_GPIO_PV0,
  405. .clk = "cdev2",
  406. };
  407. struct tegra_ehci_platform_data tegra_ehci1_pdata = {
  408. .operating_mode = TEGRA_USB_OTG,
  409. .power_down_on_bus_suspend = 1,
  410. .vbus_gpio = -1,
  411. };
  412. struct tegra_ehci_platform_data tegra_ehci2_pdata = {
  413. .phy_config = &tegra_ehci2_ulpi_phy_config,
  414. .operating_mode = TEGRA_USB_HOST,
  415. .power_down_on_bus_suspend = 1,
  416. .vbus_gpio = -1,
  417. };
  418. struct tegra_ehci_platform_data tegra_ehci3_pdata = {
  419. .operating_mode = TEGRA_USB_HOST,
  420. .power_down_on_bus_suspend = 1,
  421. .vbus_gpio = -1,
  422. };
  423. static u64 tegra_ehci_dmamask = DMA_BIT_MASK(32);
  424. struct platform_device tegra_ehci1_device = {
  425. .name = "tegra-ehci",
  426. .id = 0,
  427. .dev = {
  428. .dma_mask = &tegra_ehci_dmamask,
  429. .coherent_dma_mask = DMA_BIT_MASK(32),
  430. .platform_data = &tegra_ehci1_pdata,
  431. },
  432. .resource = tegra_usb1_resources,
  433. .num_resources = ARRAY_SIZE(tegra_usb1_resources),
  434. };
  435. struct platform_device tegra_ehci2_device = {
  436. .name = "tegra-ehci",
  437. .id = 1,
  438. .dev = {
  439. .dma_mask = &tegra_ehci_dmamask,
  440. .coherent_dma_mask = DMA_BIT_MASK(32),
  441. .platform_data = &tegra_ehci2_pdata,
  442. },
  443. .resource = tegra_usb2_resources,
  444. .num_resources = ARRAY_SIZE(tegra_usb2_resources),
  445. };
  446. struct platform_device tegra_ehci3_device = {
  447. .name = "tegra-ehci",
  448. .id = 2,
  449. .dev = {
  450. .dma_mask = &tegra_ehci_dmamask,
  451. .coherent_dma_mask = DMA_BIT_MASK(32),
  452. .platform_data = &tegra_ehci3_pdata,
  453. },
  454. .resource = tegra_usb3_resources,
  455. .num_resources = ARRAY_SIZE(tegra_usb3_resources),
  456. };
  457. static struct resource tegra_pmu_resources[] = {
  458. [0] = {
  459. .start = INT_CPU0_PMU_INTR,
  460. .end = INT_CPU0_PMU_INTR,
  461. .flags = IORESOURCE_IRQ,
  462. },
  463. [1] = {
  464. .start = INT_CPU1_PMU_INTR,
  465. .end = INT_CPU1_PMU_INTR,
  466. .flags = IORESOURCE_IRQ,
  467. },
  468. };
  469. struct platform_device tegra_pmu_device = {
  470. .name = "arm-pmu",
  471. .id = ARM_PMU_DEVICE_CPU,
  472. .num_resources = ARRAY_SIZE(tegra_pmu_resources),
  473. .resource = tegra_pmu_resources,
  474. };
  475. static struct resource tegra_uarta_resources[] = {
  476. [0] = {
  477. .start = TEGRA_UARTA_BASE,
  478. .end = TEGRA_UARTA_BASE + TEGRA_UARTA_SIZE - 1,
  479. .flags = IORESOURCE_MEM,
  480. },
  481. [1] = {
  482. .start = INT_UARTA,
  483. .end = INT_UARTA,
  484. .flags = IORESOURCE_IRQ,
  485. },
  486. };
  487. static struct resource tegra_uartb_resources[] = {
  488. [0] = {
  489. .start = TEGRA_UARTB_BASE,
  490. .end = TEGRA_UARTB_BASE + TEGRA_UARTB_SIZE - 1,
  491. .flags = IORESOURCE_MEM,
  492. },
  493. [1] = {
  494. .start = INT_UARTB,
  495. .end = INT_UARTB,
  496. .flags = IORESOURCE_IRQ,
  497. },
  498. };
  499. static struct resource tegra_uartc_resources[] = {
  500. [0] = {
  501. .start = TEGRA_UARTC_BASE,
  502. .end = TEGRA_UARTC_BASE + TEGRA_UARTC_SIZE - 1,
  503. .flags = IORESOURCE_MEM,
  504. },
  505. [1] = {
  506. .start = INT_UARTC,
  507. .end = INT_UARTC,
  508. .flags = IORESOURCE_IRQ,
  509. },
  510. };
  511. static struct resource tegra_uartd_resources[] = {
  512. [0] = {
  513. .start = TEGRA_UARTD_BASE,
  514. .end = TEGRA_UARTD_BASE + TEGRA_UARTD_SIZE - 1,
  515. .flags = IORESOURCE_MEM,
  516. },
  517. [1] = {
  518. .start = INT_UARTD,
  519. .end = INT_UARTD,
  520. .flags = IORESOURCE_IRQ,
  521. },
  522. };
  523. static struct resource tegra_uarte_resources[] = {
  524. [0] = {
  525. .start = TEGRA_UARTE_BASE,
  526. .end = TEGRA_UARTE_BASE + TEGRA_UARTE_SIZE - 1,
  527. .flags = IORESOURCE_MEM,
  528. },
  529. [1] = {
  530. .start = INT_UARTE,
  531. .end = INT_UARTE,
  532. .flags = IORESOURCE_IRQ,
  533. },
  534. };
  535. struct platform_device tegra_uarta_device = {
  536. .name = "tegra_uart",
  537. .id = 0,
  538. .num_resources = ARRAY_SIZE(tegra_uarta_resources),
  539. .resource = tegra_uarta_resources,
  540. .dev = {
  541. .coherent_dma_mask = DMA_BIT_MASK(32),
  542. },
  543. };
  544. struct platform_device tegra_uartb_device = {
  545. .name = "tegra_uart",
  546. .id = 1,
  547. .num_resources = ARRAY_SIZE(tegra_uartb_resources),
  548. .resource = tegra_uartb_resources,
  549. .dev = {
  550. .coherent_dma_mask = DMA_BIT_MASK(32),
  551. },
  552. };
  553. struct platform_device tegra_uartc_device = {
  554. .name = "tegra_uart",
  555. .id = 2,
  556. .num_resources = ARRAY_SIZE(tegra_uartc_resources),
  557. .resource = tegra_uartc_resources,
  558. .dev = {
  559. .coherent_dma_mask = DMA_BIT_MASK(32),
  560. },
  561. };
  562. struct platform_device tegra_uartd_device = {
  563. .name = "tegra_uart",
  564. .id = 3,
  565. .num_resources = ARRAY_SIZE(tegra_uartd_resources),
  566. .resource = tegra_uartd_resources,
  567. .dev = {
  568. .coherent_dma_mask = DMA_BIT_MASK(32),
  569. },
  570. };
  571. struct platform_device tegra_uarte_device = {
  572. .name = "tegra_uart",
  573. .id = 4,
  574. .num_resources = ARRAY_SIZE(tegra_uarte_resources),
  575. .resource = tegra_uarte_resources,
  576. .dev = {
  577. .coherent_dma_mask = DMA_BIT_MASK(32),
  578. },
  579. };
  580. static struct resource i2s_resource1[] = {
  581. [0] = {
  582. .start = INT_I2S1,
  583. .end = INT_I2S1,
  584. .flags = IORESOURCE_IRQ
  585. },
  586. [1] = {
  587. .start = TEGRA_DMA_REQ_SEL_I2S_1,
  588. .end = TEGRA_DMA_REQ_SEL_I2S_1,
  589. .flags = IORESOURCE_DMA
  590. },
  591. [2] = {
  592. .start = TEGRA_I2S1_BASE,
  593. .end = TEGRA_I2S1_BASE + TEGRA_I2S1_SIZE - 1,
  594. .flags = IORESOURCE_MEM
  595. }
  596. };
  597. static struct resource i2s_resource2[] = {
  598. [0] = {
  599. .start = INT_I2S2,
  600. .end = INT_I2S2,
  601. .flags = IORESOURCE_IRQ
  602. },
  603. [1] = {
  604. .start = TEGRA_DMA_REQ_SEL_I2S2_1,
  605. .end = TEGRA_DMA_REQ_SEL_I2S2_1,
  606. .flags = IORESOURCE_DMA
  607. },
  608. [2] = {
  609. .start = TEGRA_I2S2_BASE,
  610. .end = TEGRA_I2S2_BASE + TEGRA_I2S2_SIZE - 1,
  611. .flags = IORESOURCE_MEM
  612. }
  613. };
  614. struct platform_device tegra_i2s_device1 = {
  615. .name = "tegra20-i2s",
  616. .id = 0,
  617. .resource = i2s_resource1,
  618. .num_resources = ARRAY_SIZE(i2s_resource1),
  619. };
  620. struct platform_device tegra_i2s_device2 = {
  621. .name = "tegra20-i2s",
  622. .id = 1,
  623. .resource = i2s_resource2,
  624. .num_resources = ARRAY_SIZE(i2s_resource2),
  625. };
  626. static struct resource tegra_das_resources[] = {
  627. [0] = {
  628. .start = TEGRA_APB_MISC_DAS_BASE,
  629. .end = TEGRA_APB_MISC_DAS_BASE + TEGRA_APB_MISC_DAS_SIZE - 1,
  630. .flags = IORESOURCE_MEM,
  631. },
  632. };
  633. struct platform_device tegra_das_device = {
  634. .name = "tegra20-das",
  635. .id = -1,
  636. .num_resources = ARRAY_SIZE(tegra_das_resources),
  637. .resource = tegra_das_resources,
  638. };