board-kota2.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553
  1. /*
  2. * kota2 board support
  3. *
  4. * Copyright (C) 2011 Renesas Solutions Corp.
  5. * Copyright (C) 2011 Magnus Damm
  6. * Copyright (C) 2010 Takashi Yoshii <yoshii.takashi.zj@renesas.com>
  7. * Copyright (C) 2009 Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; version 2 of the License.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  21. */
  22. #include <linux/kernel.h>
  23. #include <linux/init.h>
  24. #include <linux/interrupt.h>
  25. #include <linux/irq.h>
  26. #include <linux/pinctrl/machine.h>
  27. #include <linux/pinctrl/pinconf-generic.h>
  28. #include <linux/platform_device.h>
  29. #include <linux/delay.h>
  30. #include <linux/io.h>
  31. #include <linux/regulator/fixed.h>
  32. #include <linux/regulator/machine.h>
  33. #include <linux/smsc911x.h>
  34. #include <linux/gpio.h>
  35. #include <linux/input.h>
  36. #include <linux/input/sh_keysc.h>
  37. #include <linux/gpio_keys.h>
  38. #include <linux/leds.h>
  39. #include <linux/irqchip/arm-gic.h>
  40. #include <linux/platform_data/leds-renesas-tpu.h>
  41. #include <linux/mmc/host.h>
  42. #include <linux/mmc/sh_mmcif.h>
  43. #include <linux/mfd/tmio.h>
  44. #include <linux/mmc/sh_mobile_sdhi.h>
  45. #include <mach/hardware.h>
  46. #include <mach/irqs.h>
  47. #include <mach/sh73a0.h>
  48. #include <mach/common.h>
  49. #include <asm/mach-types.h>
  50. #include <asm/mach/arch.h>
  51. #include <asm/mach/time.h>
  52. #include <asm/hardware/cache-l2x0.h>
  53. #include <asm/traps.h>
  54. /* Dummy supplies, where voltage doesn't matter */
  55. static struct regulator_consumer_supply dummy_supplies[] = {
  56. REGULATOR_SUPPLY("vddvario", "smsc911x"),
  57. REGULATOR_SUPPLY("vdd33a", "smsc911x"),
  58. };
  59. /* SMSC 9220 */
  60. static struct resource smsc9220_resources[] = {
  61. [0] = {
  62. .start = 0x14000000, /* CS5A */
  63. .end = 0x140000ff, /* A1->A7 */
  64. .flags = IORESOURCE_MEM,
  65. },
  66. [1] = {
  67. .start = SH73A0_PINT0_IRQ(2), /* PINTA2 */
  68. .flags = IORESOURCE_IRQ,
  69. },
  70. };
  71. static struct smsc911x_platform_config smsc9220_platdata = {
  72. .flags = SMSC911X_USE_32BIT, /* 32-bit SW on 16-bit HW bus */
  73. .phy_interface = PHY_INTERFACE_MODE_MII,
  74. .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
  75. .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL,
  76. };
  77. static struct platform_device eth_device = {
  78. .name = "smsc911x",
  79. .id = 0,
  80. .dev = {
  81. .platform_data = &smsc9220_platdata,
  82. },
  83. .resource = smsc9220_resources,
  84. .num_resources = ARRAY_SIZE(smsc9220_resources),
  85. };
  86. /* KEYSC */
  87. static struct sh_keysc_info keysc_platdata = {
  88. .mode = SH_KEYSC_MODE_6,
  89. .scan_timing = 3,
  90. .delay = 100,
  91. .keycodes = {
  92. KEY_NUMERIC_STAR, KEY_NUMERIC_0, KEY_NUMERIC_POUND,
  93. 0, 0, 0, 0, 0,
  94. KEY_NUMERIC_7, KEY_NUMERIC_8, KEY_NUMERIC_9,
  95. 0, KEY_DOWN, 0, 0, 0,
  96. KEY_NUMERIC_4, KEY_NUMERIC_5, KEY_NUMERIC_6,
  97. KEY_LEFT, KEY_ENTER, KEY_RIGHT, 0, 0,
  98. KEY_NUMERIC_1, KEY_NUMERIC_2, KEY_NUMERIC_3,
  99. 0, KEY_UP, 0, 0, 0,
  100. 0, 0, 0, 0, 0, 0, 0, 0,
  101. 0, 0, 0, 0, 0, 0, 0, 0,
  102. 0, 0, 0, 0, 0, 0, 0, 0,
  103. 0, 0, 0, 0, 0, 0, 0, 0,
  104. },
  105. };
  106. static struct resource keysc_resources[] = {
  107. [0] = {
  108. .name = "KEYSC",
  109. .start = 0xe61b0000,
  110. .end = 0xe61b0098 - 1,
  111. .flags = IORESOURCE_MEM,
  112. },
  113. [1] = {
  114. .start = gic_spi(71),
  115. .flags = IORESOURCE_IRQ,
  116. },
  117. };
  118. static struct platform_device keysc_device = {
  119. .name = "sh_keysc",
  120. .id = 0,
  121. .num_resources = ARRAY_SIZE(keysc_resources),
  122. .resource = keysc_resources,
  123. .dev = {
  124. .platform_data = &keysc_platdata,
  125. },
  126. };
  127. /* GPIO KEY */
  128. #define GPIO_KEY(c, g, d) { .code = c, .gpio = g, .desc = d, .active_low = 1 }
  129. static struct gpio_keys_button gpio_buttons[] = {
  130. GPIO_KEY(KEY_VOLUMEUP, 56, "+"), /* S2: VOL+ [IRQ9] */
  131. GPIO_KEY(KEY_VOLUMEDOWN, 54, "-"), /* S3: VOL- [IRQ10] */
  132. GPIO_KEY(KEY_MENU, 27, "Menu"), /* S4: MENU [IRQ30] */
  133. GPIO_KEY(KEY_HOMEPAGE, 26, "Home"), /* S5: HOME [IRQ31] */
  134. GPIO_KEY(KEY_BACK, 11, "Back"), /* S6: BACK [IRQ0] */
  135. GPIO_KEY(KEY_PHONE, 238, "Tel"), /* S7: TEL [IRQ11] */
  136. GPIO_KEY(KEY_POWER, 239, "C1"), /* S8: CAM [IRQ13] */
  137. GPIO_KEY(KEY_MAIL, 224, "Mail"), /* S9: MAIL [IRQ3] */
  138. /* Omitted button "C3?": 223 - S10: CUST [IRQ8] */
  139. GPIO_KEY(KEY_CAMERA, 164, "C2"), /* S11: CAM_HALF [IRQ25] */
  140. /* Omitted button "?": 152 - S12: CAM_FULL [No IRQ] */
  141. };
  142. static struct gpio_keys_platform_data gpio_key_info = {
  143. .buttons = gpio_buttons,
  144. .nbuttons = ARRAY_SIZE(gpio_buttons),
  145. };
  146. static struct platform_device gpio_keys_device = {
  147. .name = "gpio-keys",
  148. .id = -1,
  149. .dev = {
  150. .platform_data = &gpio_key_info,
  151. },
  152. };
  153. /* GPIO LED */
  154. #define GPIO_LED(n, g) { .name = n, .gpio = g }
  155. static struct gpio_led gpio_leds[] = {
  156. GPIO_LED("G", 20), /* PORT20 [GPO0] -> LED7 -> "G" */
  157. GPIO_LED("H", 21), /* PORT21 [GPO1] -> LED8 -> "H" */
  158. GPIO_LED("J", 22), /* PORT22 [GPO2] -> LED9 -> "J" */
  159. };
  160. static struct gpio_led_platform_data gpio_leds_info = {
  161. .leds = gpio_leds,
  162. .num_leds = ARRAY_SIZE(gpio_leds),
  163. };
  164. static struct platform_device gpio_leds_device = {
  165. .name = "leds-gpio",
  166. .id = -1,
  167. .dev = {
  168. .platform_data = &gpio_leds_info,
  169. },
  170. };
  171. /* TPU LED */
  172. static struct led_renesas_tpu_config led_renesas_tpu12_pdata = {
  173. .name = "V2513",
  174. .pin_gpio_fn = GPIO_FN_TPU1TO2,
  175. .pin_gpio = 153,
  176. .channel_offset = 0x90,
  177. .timer_bit = 2,
  178. .max_brightness = 1000,
  179. };
  180. static struct resource tpu12_resources[] = {
  181. [0] = {
  182. .name = "TPU12",
  183. .start = 0xe6610090,
  184. .end = 0xe66100b5,
  185. .flags = IORESOURCE_MEM,
  186. },
  187. };
  188. static struct platform_device leds_tpu12_device = {
  189. .name = "leds-renesas-tpu",
  190. .id = 12,
  191. .dev = {
  192. .platform_data = &led_renesas_tpu12_pdata,
  193. },
  194. .num_resources = ARRAY_SIZE(tpu12_resources),
  195. .resource = tpu12_resources,
  196. };
  197. static struct led_renesas_tpu_config led_renesas_tpu41_pdata = {
  198. .name = "V2514",
  199. .pin_gpio_fn = GPIO_FN_TPU4TO1,
  200. .pin_gpio = 199,
  201. .channel_offset = 0x50,
  202. .timer_bit = 1,
  203. .max_brightness = 1000,
  204. };
  205. static struct resource tpu41_resources[] = {
  206. [0] = {
  207. .name = "TPU41",
  208. .start = 0xe6640050,
  209. .end = 0xe6640075,
  210. .flags = IORESOURCE_MEM,
  211. },
  212. };
  213. static struct platform_device leds_tpu41_device = {
  214. .name = "leds-renesas-tpu",
  215. .id = 41,
  216. .dev = {
  217. .platform_data = &led_renesas_tpu41_pdata,
  218. },
  219. .num_resources = ARRAY_SIZE(tpu41_resources),
  220. .resource = tpu41_resources,
  221. };
  222. static struct led_renesas_tpu_config led_renesas_tpu21_pdata = {
  223. .name = "V2515",
  224. .pin_gpio_fn = GPIO_FN_TPU2TO1,
  225. .pin_gpio = 197,
  226. .channel_offset = 0x50,
  227. .timer_bit = 1,
  228. .max_brightness = 1000,
  229. };
  230. static struct resource tpu21_resources[] = {
  231. [0] = {
  232. .name = "TPU21",
  233. .start = 0xe6620050,
  234. .end = 0xe6620075,
  235. .flags = IORESOURCE_MEM,
  236. },
  237. };
  238. static struct platform_device leds_tpu21_device = {
  239. .name = "leds-renesas-tpu",
  240. .id = 21,
  241. .dev = {
  242. .platform_data = &led_renesas_tpu21_pdata,
  243. },
  244. .num_resources = ARRAY_SIZE(tpu21_resources),
  245. .resource = tpu21_resources,
  246. };
  247. static struct led_renesas_tpu_config led_renesas_tpu30_pdata = {
  248. .name = "KEYLED",
  249. .pin_gpio_fn = GPIO_FN_TPU3TO0,
  250. .pin_gpio = 163,
  251. .channel_offset = 0x10,
  252. .timer_bit = 0,
  253. .max_brightness = 1000,
  254. };
  255. static struct resource tpu30_resources[] = {
  256. [0] = {
  257. .name = "TPU30",
  258. .start = 0xe6630010,
  259. .end = 0xe6630035,
  260. .flags = IORESOURCE_MEM,
  261. },
  262. };
  263. static struct platform_device leds_tpu30_device = {
  264. .name = "leds-renesas-tpu",
  265. .id = 30,
  266. .dev = {
  267. .platform_data = &led_renesas_tpu30_pdata,
  268. },
  269. .num_resources = ARRAY_SIZE(tpu30_resources),
  270. .resource = tpu30_resources,
  271. };
  272. /* Fixed 1.8V regulator to be used by MMCIF */
  273. static struct regulator_consumer_supply fixed1v8_power_consumers[] =
  274. {
  275. REGULATOR_SUPPLY("vmmc", "sh_mmcif.0"),
  276. REGULATOR_SUPPLY("vqmmc", "sh_mmcif.0"),
  277. };
  278. /* MMCIF */
  279. static struct resource mmcif_resources[] = {
  280. [0] = {
  281. .name = "MMCIF",
  282. .start = 0xe6bd0000,
  283. .end = 0xe6bd00ff,
  284. .flags = IORESOURCE_MEM,
  285. },
  286. [1] = {
  287. .start = gic_spi(140),
  288. .flags = IORESOURCE_IRQ,
  289. },
  290. [2] = {
  291. .start = gic_spi(141),
  292. .flags = IORESOURCE_IRQ,
  293. },
  294. };
  295. static struct sh_mmcif_plat_data mmcif_info = {
  296. .ocr = MMC_VDD_165_195,
  297. .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE,
  298. };
  299. static struct platform_device mmcif_device = {
  300. .name = "sh_mmcif",
  301. .id = 0,
  302. .dev = {
  303. .platform_data = &mmcif_info,
  304. },
  305. .num_resources = ARRAY_SIZE(mmcif_resources),
  306. .resource = mmcif_resources,
  307. };
  308. /* Fixed 3.3V regulator to be used by SDHI0 and SDHI1 */
  309. static struct regulator_consumer_supply fixed3v3_power_consumers[] =
  310. {
  311. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.0"),
  312. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.0"),
  313. REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi.1"),
  314. REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi.1"),
  315. };
  316. /* SDHI0 */
  317. static struct sh_mobile_sdhi_info sdhi0_info = {
  318. .tmio_caps = MMC_CAP_SD_HIGHSPEED,
  319. .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
  320. };
  321. static struct resource sdhi0_resources[] = {
  322. [0] = {
  323. .name = "SDHI0",
  324. .start = 0xee100000,
  325. .end = 0xee1000ff,
  326. .flags = IORESOURCE_MEM,
  327. },
  328. [1] = {
  329. .start = gic_spi(83),
  330. .flags = IORESOURCE_IRQ,
  331. },
  332. [2] = {
  333. .start = gic_spi(84),
  334. .flags = IORESOURCE_IRQ,
  335. },
  336. [3] = {
  337. .start = gic_spi(85),
  338. .flags = IORESOURCE_IRQ,
  339. },
  340. };
  341. static struct platform_device sdhi0_device = {
  342. .name = "sh_mobile_sdhi",
  343. .id = 0,
  344. .num_resources = ARRAY_SIZE(sdhi0_resources),
  345. .resource = sdhi0_resources,
  346. .dev = {
  347. .platform_data = &sdhi0_info,
  348. },
  349. };
  350. /* SDHI1 */
  351. static struct sh_mobile_sdhi_info sdhi1_info = {
  352. .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
  353. .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
  354. };
  355. static struct resource sdhi1_resources[] = {
  356. [0] = {
  357. .name = "SDHI1",
  358. .start = 0xee120000,
  359. .end = 0xee1200ff,
  360. .flags = IORESOURCE_MEM,
  361. },
  362. [1] = {
  363. .start = gic_spi(87),
  364. .flags = IORESOURCE_IRQ,
  365. },
  366. [2] = {
  367. .start = gic_spi(88),
  368. .flags = IORESOURCE_IRQ,
  369. },
  370. [3] = {
  371. .start = gic_spi(89),
  372. .flags = IORESOURCE_IRQ,
  373. },
  374. };
  375. static struct platform_device sdhi1_device = {
  376. .name = "sh_mobile_sdhi",
  377. .id = 1,
  378. .num_resources = ARRAY_SIZE(sdhi1_resources),
  379. .resource = sdhi1_resources,
  380. .dev = {
  381. .platform_data = &sdhi1_info,
  382. },
  383. };
  384. static struct platform_device *kota2_devices[] __initdata = {
  385. &eth_device,
  386. &keysc_device,
  387. &gpio_keys_device,
  388. &gpio_leds_device,
  389. &leds_tpu12_device,
  390. &leds_tpu41_device,
  391. &leds_tpu21_device,
  392. &leds_tpu30_device,
  393. &mmcif_device,
  394. &sdhi0_device,
  395. &sdhi1_device,
  396. };
  397. static unsigned long pin_pullup_conf[] = {
  398. PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_UP, 0),
  399. };
  400. static const struct pinctrl_map kota2_pinctrl_map[] = {
  401. /* KEYSC */
  402. PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0",
  403. "keysc_in8", "keysc"),
  404. PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0",
  405. "keysc_out04", "keysc"),
  406. PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0",
  407. "keysc_out5", "keysc"),
  408. PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0",
  409. "keysc_out6_0", "keysc"),
  410. PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0",
  411. "keysc_out7_0", "keysc"),
  412. PIN_MAP_MUX_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0",
  413. "keysc_out8_0", "keysc"),
  414. PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_keysc.0", "pfc-sh73a0",
  415. "keysc_in8", pin_pullup_conf),
  416. /* MMCIF */
  417. PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
  418. "mmc0_data8_0", "mmc0"),
  419. PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
  420. "mmc0_ctrl_0", "mmc0"),
  421. PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
  422. "PORT279", pin_pullup_conf),
  423. PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mmcif.0", "pfc-sh73a0",
  424. "mmc0_data8_0", pin_pullup_conf),
  425. /* SCIFA2 (UART2) */
  426. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh73a0",
  427. "scifa2_data_0", "scifa2"),
  428. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-sh73a0",
  429. "scifa2_ctrl_0", "scifa2"),
  430. /* SCIFA4 (UART1) */
  431. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0",
  432. "scifa4_data", "scifa4"),
  433. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-sh73a0",
  434. "scifa4_ctrl", "scifa4"),
  435. /* SCIFB (BT) */
  436. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.8", "pfc-sh73a0",
  437. "scifb_data_0", "scifb"),
  438. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.8", "pfc-sh73a0",
  439. "scifb_clk_0", "scifb"),
  440. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.8", "pfc-sh73a0",
  441. "scifb_ctrl_0", "scifb"),
  442. /* SDHI0 (microSD) */
  443. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
  444. "sdhi0_data4", "sdhi0"),
  445. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
  446. "sdhi0_ctrl", "sdhi0"),
  447. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
  448. "sdhi0_cd", "sdhi0"),
  449. PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
  450. "sdhi0_data4", pin_pullup_conf),
  451. PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
  452. "PORT256", pin_pullup_conf),
  453. PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mobile_sdhi.0", "pfc-sh73a0",
  454. "PORT251", pin_pullup_conf),
  455. /* SDHI1 (BCM4330) */
  456. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0",
  457. "sdhi1_data4", "sdhi1"),
  458. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0",
  459. "sdhi1_ctrl", "sdhi1"),
  460. PIN_MAP_CONFIGS_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0",
  461. "sdhi1_data4", pin_pullup_conf),
  462. PIN_MAP_CONFIGS_PIN_DEFAULT("sh_mobile_sdhi.1", "pfc-sh73a0",
  463. "PORT263", pin_pullup_conf),
  464. /* SMSC911X */
  465. PIN_MAP_MUX_GROUP_DEFAULT("smsc911x.0", "pfc-sh73a0",
  466. "bsc_data_0_7", "bsc"),
  467. PIN_MAP_MUX_GROUP_DEFAULT("smsc911x.0", "pfc-sh73a0",
  468. "bsc_data_8_15", "bsc"),
  469. PIN_MAP_MUX_GROUP_DEFAULT("smsc911x.0", "pfc-sh73a0",
  470. "bsc_cs5_a", "bsc"),
  471. PIN_MAP_MUX_GROUP_DEFAULT("smsc911x.0", "pfc-sh73a0",
  472. "bsc_we0", "bsc"),
  473. };
  474. static void __init kota2_init(void)
  475. {
  476. regulator_register_always_on(0, "fixed-1.8V", fixed1v8_power_consumers,
  477. ARRAY_SIZE(fixed1v8_power_consumers), 1800000);
  478. regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers,
  479. ARRAY_SIZE(fixed3v3_power_consumers), 3300000);
  480. regulator_register_fixed(2, dummy_supplies, ARRAY_SIZE(dummy_supplies));
  481. pinctrl_register_mappings(kota2_pinctrl_map,
  482. ARRAY_SIZE(kota2_pinctrl_map));
  483. sh73a0_pinmux_init();
  484. /* SMSC911X */
  485. gpio_request_one(144, GPIOF_IN, NULL); /* PINTA2 */
  486. gpio_request_one(145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */
  487. /* MMCIF */
  488. gpio_request_one(208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */
  489. #ifdef CONFIG_CACHE_L2X0
  490. /* Early BRESP enable, Shared attribute override enable, 64K*8way */
  491. l2x0_init(IOMEM(0xf0100000), 0x40460000, 0x82000fff);
  492. #endif
  493. sh73a0_add_standard_devices();
  494. platform_add_devices(kota2_devices, ARRAY_SIZE(kota2_devices));
  495. }
  496. MACHINE_START(KOTA2, "kota2")
  497. .smp = smp_ops(sh73a0_smp_ops),
  498. .map_io = sh73a0_map_io,
  499. .init_early = sh73a0_add_early_devices,
  500. .nr_irqs = NR_IRQS_LEGACY,
  501. .init_irq = sh73a0_init_irq,
  502. .init_machine = kota2_init,
  503. .init_late = shmobile_init_late,
  504. .init_time = sh73a0_earlytimer_init,
  505. MACHINE_END