devices.c 15 KB

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