Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Bock-W board support |
| 3 | * |
| 4 | * Copyright (C) 2013 Renesas Solutions Corp. |
| 5 | * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
Vladimir Barinov | 9c43952 | 2013-08-22 17:38:50 -0300 | [diff] [blame] | 6 | * Copyright (C) 2013 Cogent Embedded, Inc. |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; version 2 of the License. |
| 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 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ |
| 21 | |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 22 | #include <linux/mfd/tmio.h> |
| 23 | #include <linux/mmc/host.h> |
Kuninori Morimoto | fc55190 | 2013-07-26 00:34:58 -0700 | [diff] [blame] | 24 | #include <linux/mmc/sh_mobile_sdhi.h> |
Kuninori Morimoto | a66c974 | 2013-07-26 00:33:48 -0700 | [diff] [blame] | 25 | #include <linux/mmc/sh_mmcif.h> |
Kuninori Morimoto | c06a164 | 2013-06-11 19:11:41 -0700 | [diff] [blame] | 26 | #include <linux/mtd/partitions.h> |
Kuninori Morimoto | 111ea17 | 2013-04-12 05:38:03 +0000 | [diff] [blame] | 27 | #include <linux/pinctrl/machine.h> |
Kuninori Morimoto | 044e212 | 2013-07-26 15:54:44 +0900 | [diff] [blame] | 28 | #include <linux/platform_data/usb-rcar-phy.h> |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 29 | #include <linux/platform_device.h> |
Kuninori Morimoto | 741440e | 2013-04-09 02:37:15 -0700 | [diff] [blame] | 30 | #include <linux/regulator/fixed.h> |
| 31 | #include <linux/regulator/machine.h> |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 32 | #include <linux/smsc911x.h> |
Kuninori Morimoto | c06a164 | 2013-06-11 19:11:41 -0700 | [diff] [blame] | 33 | #include <linux/spi/spi.h> |
| 34 | #include <linux/spi/flash.h> |
Vladimir Barinov | 9c43952 | 2013-08-22 17:38:50 -0300 | [diff] [blame] | 35 | #include <media/soc_camera.h> |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 36 | #include <mach/common.h> |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 37 | #include <mach/irqs.h> |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 38 | #include <mach/r8a7778.h> |
| 39 | #include <asm/mach/arch.h> |
| 40 | |
Kuninori Morimoto | 71d7472 | 2013-08-26 01:52:23 -0700 | [diff] [blame^] | 41 | #define FPGA 0x18200000 |
| 42 | #define IRQ0MR 0x30 |
| 43 | static void __iomem *fpga; |
| 44 | |
Kuninori Morimoto | d998cef | 2013-04-08 23:54:16 -0700 | [diff] [blame] | 45 | /* |
| 46 | * CN9(Upper side) SCIF/RCAN selection |
| 47 | * |
| 48 | * 1,4 3,6 |
| 49 | * SW40 SCIF RCAN |
| 50 | * SW41 SCIF RCAN |
| 51 | */ |
| 52 | |
Kuninori Morimoto | 1e0edb7 | 2013-06-11 19:12:06 -0700 | [diff] [blame] | 53 | /* |
| 54 | * MMC (CN26) pin |
| 55 | * |
| 56 | * SW6 (D2) 3 pin |
| 57 | * SW7 (D5) ON |
| 58 | * SW8 (D3) 3 pin |
| 59 | * SW10 (D4) 1 pin |
| 60 | * SW12 (CLK) 1 pin |
| 61 | * SW13 (D6) 3 pin |
| 62 | * SW14 (CMD) ON |
| 63 | * SW15 (D6) 1 pin |
| 64 | * SW16 (D0) ON |
| 65 | * SW17 (D1) ON |
| 66 | * SW18 (D7) 3 pin |
| 67 | * SW19 (MMC) 1 pin |
| 68 | */ |
| 69 | |
Kuninori Morimoto | 741440e | 2013-04-09 02:37:15 -0700 | [diff] [blame] | 70 | /* Dummy supplies, where voltage doesn't matter */ |
| 71 | static struct regulator_consumer_supply dummy_supplies[] = { |
| 72 | REGULATOR_SUPPLY("vddvario", "smsc911x"), |
| 73 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), |
| 74 | }; |
| 75 | |
Kuninori Morimoto | 8c23c7c | 2013-08-01 18:34:09 -0700 | [diff] [blame] | 76 | static struct smsc911x_platform_config smsc911x_data __initdata = { |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 77 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
| 78 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 79 | .flags = SMSC911X_USE_32BIT, |
| 80 | .phy_interface = PHY_INTERFACE_MODE_MII, |
| 81 | }; |
| 82 | |
Kuninori Morimoto | 8c23c7c | 2013-08-01 18:34:09 -0700 | [diff] [blame] | 83 | static struct resource smsc911x_resources[] __initdata = { |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 84 | DEFINE_RES_MEM(0x18300000, 0x1000), |
| 85 | DEFINE_RES_IRQ(irq_pin(0)), /* IRQ 0 */ |
| 86 | }; |
| 87 | |
Linus Torvalds | 40e71e7 | 2013-07-02 14:10:26 -0700 | [diff] [blame] | 88 | /* USB */ |
Kuninori Morimoto | 044e212 | 2013-07-26 15:54:44 +0900 | [diff] [blame] | 89 | static struct resource usb_phy_resources[] __initdata = { |
| 90 | DEFINE_RES_MEM(0xffe70800, 0x100), |
| 91 | DEFINE_RES_MEM(0xffe76000, 0x100), |
| 92 | }; |
| 93 | |
Sergei Shtylyov | 1a87b01 | 2013-06-09 00:38:41 +0400 | [diff] [blame] | 94 | static struct rcar_phy_platform_data usb_phy_platform_data __initdata; |
| 95 | |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 96 | /* SDHI */ |
Kuninori Morimoto | 8c23c7c | 2013-08-01 18:34:09 -0700 | [diff] [blame] | 97 | static struct sh_mobile_sdhi_info sdhi0_info __initdata = { |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 98 | .tmio_caps = MMC_CAP_SD_HIGHSPEED, |
| 99 | .tmio_ocr_mask = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
| 100 | .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT, |
| 101 | }; |
| 102 | |
Kuninori Morimoto | fc55190 | 2013-07-26 00:34:58 -0700 | [diff] [blame] | 103 | static struct resource sdhi0_resources[] __initdata = { |
| 104 | DEFINE_RES_MEM(0xFFE4C000, 0x100), |
| 105 | DEFINE_RES_IRQ(gic_iid(0x77)), |
| 106 | }; |
| 107 | |
Sergei Shtylyov | 9aa3853 | 2013-06-02 02:40:55 +0400 | [diff] [blame] | 108 | static struct sh_eth_plat_data ether_platform_data __initdata = { |
| 109 | .phy = 0x01, |
| 110 | .edmac_endian = EDMAC_LITTLE_ENDIAN, |
Sergei Shtylyov | 9aa3853 | 2013-06-02 02:40:55 +0400 | [diff] [blame] | 111 | .phy_interface = PHY_INTERFACE_MODE_RMII, |
| 112 | /* |
| 113 | * Although the LINK signal is available on the board, it's connected to |
| 114 | * the link/activity LED output of the PHY, thus the link disappears and |
| 115 | * reappears after each packet. We'd be better off ignoring such signal |
| 116 | * and getting the link state from the PHY indirectly. |
| 117 | */ |
| 118 | .no_ether_link = 1, |
| 119 | }; |
| 120 | |
Kuninori Morimoto | ed17be9 | 2013-06-11 19:11:17 -0700 | [diff] [blame] | 121 | /* I2C */ |
| 122 | static struct i2c_board_info i2c0_devices[] = { |
| 123 | { |
| 124 | I2C_BOARD_INFO("rx8581", 0x51), |
| 125 | }, |
| 126 | }; |
| 127 | |
Kuninori Morimoto | c06a164 | 2013-06-11 19:11:41 -0700 | [diff] [blame] | 128 | /* HSPI*/ |
| 129 | static struct mtd_partition m25p80_spi_flash_partitions[] = { |
| 130 | { |
| 131 | .name = "data(spi)", |
| 132 | .size = 0x0100000, |
| 133 | .offset = 0, |
| 134 | }, |
| 135 | }; |
| 136 | |
| 137 | static struct flash_platform_data spi_flash_data = { |
| 138 | .name = "m25p80", |
| 139 | .type = "s25fl008k", |
| 140 | .parts = m25p80_spi_flash_partitions, |
| 141 | .nr_parts = ARRAY_SIZE(m25p80_spi_flash_partitions), |
| 142 | }; |
| 143 | |
| 144 | static struct spi_board_info spi_board_info[] __initdata = { |
| 145 | { |
| 146 | .modalias = "m25p80", |
| 147 | .max_speed_hz = 104000000, |
| 148 | .chip_select = 0, |
| 149 | .bus_num = 0, |
| 150 | .mode = SPI_MODE_0, |
| 151 | .platform_data = &spi_flash_data, |
| 152 | }, |
| 153 | }; |
| 154 | |
Kuninori Morimoto | 1e0edb7 | 2013-06-11 19:12:06 -0700 | [diff] [blame] | 155 | /* MMC */ |
Kuninori Morimoto | a66c974 | 2013-07-26 00:33:48 -0700 | [diff] [blame] | 156 | static struct resource mmc_resources[] __initdata = { |
| 157 | DEFINE_RES_MEM(0xffe4e000, 0x100), |
| 158 | DEFINE_RES_IRQ(gic_iid(0x5d)), |
| 159 | }; |
| 160 | |
Kuninori Morimoto | 8c23c7c | 2013-08-01 18:34:09 -0700 | [diff] [blame] | 161 | static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = { |
Kuninori Morimoto | 1e0edb7 | 2013-06-11 19:12:06 -0700 | [diff] [blame] | 162 | .sup_pclk = 0, |
| 163 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
| 164 | .caps = MMC_CAP_4_BIT_DATA | |
| 165 | MMC_CAP_8_BIT_DATA | |
| 166 | MMC_CAP_NEEDS_POLL, |
| 167 | }; |
| 168 | |
Vladimir Barinov | 9c43952 | 2013-08-22 17:38:50 -0300 | [diff] [blame] | 169 | static struct rcar_vin_platform_data vin_platform_data __initdata = { |
| 170 | .flags = RCAR_VIN_BT656, |
| 171 | }; |
| 172 | |
| 173 | /* In the default configuration both decoders reside on I2C bus 0 */ |
| 174 | #define BOCKW_CAMERA(idx) \ |
| 175 | static struct i2c_board_info camera##idx##_info = { \ |
| 176 | I2C_BOARD_INFO("ml86v7667", 0x41 + 2 * (idx)), \ |
| 177 | }; \ |
| 178 | \ |
| 179 | static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = { \ |
| 180 | .bus_id = idx, \ |
| 181 | .i2c_adapter_id = 0, \ |
| 182 | .board_info = &camera##idx##_info, \ |
| 183 | } |
| 184 | |
| 185 | BOCKW_CAMERA(0); |
| 186 | BOCKW_CAMERA(1); |
| 187 | |
Kuninori Morimoto | 111ea17 | 2013-04-12 05:38:03 +0000 | [diff] [blame] | 188 | static const struct pinctrl_map bockw_pinctrl_map[] = { |
Sergei Shtylyov | 9aa3853 | 2013-06-02 02:40:55 +0400 | [diff] [blame] | 189 | /* Ether */ |
Sergei Shtylyov | 2c83322 | 2013-06-17 23:39:44 +0400 | [diff] [blame] | 190 | PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", |
Sergei Shtylyov | 9aa3853 | 2013-06-02 02:40:55 +0400 | [diff] [blame] | 191 | "ether_rmii", "ether"), |
Kuninori Morimoto | c06a164 | 2013-06-11 19:11:41 -0700 | [diff] [blame] | 192 | /* HSPI0 */ |
| 193 | PIN_MAP_MUX_GROUP_DEFAULT("sh-hspi.0", "pfc-r8a7778", |
| 194 | "hspi0_a", "hspi0"), |
Kuninori Morimoto | 1e0edb7 | 2013-06-11 19:12:06 -0700 | [diff] [blame] | 195 | /* MMC */ |
| 196 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", |
| 197 | "mmc_data8", "mmc"), |
| 198 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif", "pfc-r8a7778", |
| 199 | "mmc_ctrl", "mmc"), |
Kuninori Morimoto | 111ea17 | 2013-04-12 05:38:03 +0000 | [diff] [blame] | 200 | /* SCIF0 */ |
| 201 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", |
| 202 | "scif0_data_a", "scif0"), |
| 203 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.0", "pfc-r8a7778", |
| 204 | "scif0_ctrl", "scif0"), |
Linus Torvalds | 40e71e7 | 2013-07-02 14:10:26 -0700 | [diff] [blame] | 205 | /* USB */ |
Sergei Shtylyov | 1a87b01 | 2013-06-09 00:38:41 +0400 | [diff] [blame] | 206 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778", |
| 207 | "usb0", "usb0"), |
| 208 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform", "pfc-r8a7778", |
| 209 | "usb1", "usb1"), |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 210 | /* SDHI0 */ |
| 211 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", |
Sergei Shtylyov | fa3e0ce | 2013-07-27 03:46:33 +0400 | [diff] [blame] | 212 | "sdhi0_data4", "sdhi0"), |
| 213 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", |
| 214 | "sdhi0_ctrl", "sdhi0"), |
| 215 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", |
| 216 | "sdhi0_cd", "sdhi0"), |
| 217 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", |
| 218 | "sdhi0_wp", "sdhi0"), |
Vladimir Barinov | 9c43952 | 2013-08-22 17:38:50 -0300 | [diff] [blame] | 219 | /* VIN0 */ |
| 220 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778", |
| 221 | "vin0_clk", "vin0"), |
| 222 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778", |
| 223 | "vin0_data8", "vin0"), |
| 224 | /* VIN1 */ |
| 225 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778", |
| 226 | "vin1_clk", "vin1"), |
| 227 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778", |
| 228 | "vin1_data8", "vin1"), |
Kuninori Morimoto | 111ea17 | 2013-04-12 05:38:03 +0000 | [diff] [blame] | 229 | }; |
| 230 | |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 231 | #define PFC 0xfffc0000 |
| 232 | #define PUPR4 0x110 |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 233 | static void __init bockw_init(void) |
| 234 | { |
Kuninori Morimoto | 44bfe68 | 2013-04-16 22:17:42 -0700 | [diff] [blame] | 235 | void __iomem *base; |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 236 | |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 237 | r8a7778_clock_init(); |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 238 | r8a7778_init_irq_extpin(1); |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 239 | r8a7778_add_standard_devices(); |
Sergei Shtylyov | 9aa3853 | 2013-06-02 02:40:55 +0400 | [diff] [blame] | 240 | r8a7778_add_ether_device(ðer_platform_data); |
Vladimir Barinov | 9c43952 | 2013-08-22 17:38:50 -0300 | [diff] [blame] | 241 | r8a7778_add_vin_device(0, &vin_platform_data); |
| 242 | /* VIN1 has a pin conflict with Ether */ |
| 243 | if (!IS_ENABLED(CONFIG_SH_ETH)) |
| 244 | r8a7778_add_vin_device(1, &vin_platform_data); |
| 245 | platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0, |
| 246 | &iclink0_ml86v7667, |
| 247 | sizeof(iclink0_ml86v7667)); |
| 248 | platform_device_register_data(&platform_bus, "soc-camera-pdrv", 1, |
| 249 | &iclink1_ml86v7667, |
| 250 | sizeof(iclink1_ml86v7667)); |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 251 | |
Kuninori Morimoto | ed17be9 | 2013-06-11 19:11:17 -0700 | [diff] [blame] | 252 | i2c_register_board_info(0, i2c0_devices, |
| 253 | ARRAY_SIZE(i2c0_devices)); |
Kuninori Morimoto | c06a164 | 2013-06-11 19:11:41 -0700 | [diff] [blame] | 254 | spi_register_board_info(spi_board_info, |
| 255 | ARRAY_SIZE(spi_board_info)); |
Kuninori Morimoto | 111ea17 | 2013-04-12 05:38:03 +0000 | [diff] [blame] | 256 | pinctrl_register_mappings(bockw_pinctrl_map, |
| 257 | ARRAY_SIZE(bockw_pinctrl_map)); |
| 258 | r8a7778_pinmux_init(); |
| 259 | |
Kuninori Morimoto | a66c974 | 2013-07-26 00:33:48 -0700 | [diff] [blame] | 260 | platform_device_register_resndata( |
| 261 | &platform_bus, "sh_mmcif", -1, |
| 262 | mmc_resources, ARRAY_SIZE(mmc_resources), |
| 263 | &sh_mmcif_plat, sizeof(struct sh_mmcif_plat_data)); |
| 264 | |
Kuninori Morimoto | 044e212 | 2013-07-26 15:54:44 +0900 | [diff] [blame] | 265 | platform_device_register_resndata( |
| 266 | &platform_bus, "rcar_usb_phy", -1, |
| 267 | usb_phy_resources, |
| 268 | ARRAY_SIZE(usb_phy_resources), |
| 269 | &usb_phy_platform_data, |
| 270 | sizeof(struct rcar_phy_platform_data)); |
| 271 | |
| 272 | |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 273 | /* for SMSC */ |
Kuninori Morimoto | 71d7472 | 2013-08-26 01:52:23 -0700 | [diff] [blame^] | 274 | fpga = ioremap_nocache(FPGA, SZ_1M); |
| 275 | if (fpga) { |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 276 | /* |
| 277 | * CAUTION |
| 278 | * |
| 279 | * IRQ0/1 is cascaded interrupt from FPGA. |
| 280 | * it should be cared in the future |
| 281 | * Now, it is assuming IRQ0 was used only from SMSC. |
| 282 | */ |
Kuninori Morimoto | 71d7472 | 2013-08-26 01:52:23 -0700 | [diff] [blame^] | 283 | u16 val = ioread16(fpga + IRQ0MR); |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 284 | val &= ~(1 << 4); /* enable SMSC911x */ |
Kuninori Morimoto | 71d7472 | 2013-08-26 01:52:23 -0700 | [diff] [blame^] | 285 | iowrite16(val, fpga + IRQ0MR); |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 286 | |
Kuninori Morimoto | 741440e | 2013-04-09 02:37:15 -0700 | [diff] [blame] | 287 | regulator_register_fixed(0, dummy_supplies, |
| 288 | ARRAY_SIZE(dummy_supplies)); |
Kuninori Morimoto | 27d5f27e | 2013-04-01 21:20:02 -0700 | [diff] [blame] | 289 | |
| 290 | platform_device_register_resndata( |
| 291 | &platform_bus, "smsc911x", -1, |
| 292 | smsc911x_resources, ARRAY_SIZE(smsc911x_resources), |
| 293 | &smsc911x_data, sizeof(smsc911x_data)); |
| 294 | } |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 295 | |
| 296 | /* for SDHI */ |
| 297 | base = ioremap_nocache(PFC, 0x200); |
| 298 | if (base) { |
| 299 | /* |
| 300 | * FIXME |
| 301 | * |
| 302 | * SDHI CD/WP pin needs pull-up |
| 303 | */ |
| 304 | iowrite32(ioread32(base + PUPR4) | (3 << 26), base + PUPR4); |
| 305 | iounmap(base); |
| 306 | |
Kuninori Morimoto | fc55190 | 2013-07-26 00:34:58 -0700 | [diff] [blame] | 307 | platform_device_register_resndata( |
| 308 | &platform_bus, "sh_mobile_sdhi", 0, |
| 309 | sdhi0_resources, ARRAY_SIZE(sdhi0_resources), |
| 310 | &sdhi0_info, sizeof(struct sh_mobile_sdhi_info)); |
Kuninori Morimoto | ca7bb30 | 2013-04-17 05:17:56 +0000 | [diff] [blame] | 311 | } |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 312 | } |
| 313 | |
| 314 | static const char *bockw_boards_compat_dt[] __initdata = { |
| 315 | "renesas,bockw", |
| 316 | NULL, |
| 317 | }; |
| 318 | |
| 319 | DT_MACHINE_START(BOCKW_DT, "bockw") |
| 320 | .init_early = r8a7778_init_delay, |
| 321 | .init_irq = r8a7778_init_irq_dt, |
| 322 | .init_machine = bockw_init, |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 323 | .dt_compat = bockw_boards_compat_dt, |
Sergei Shtylyov | 1a87b01 | 2013-06-09 00:38:41 +0400 | [diff] [blame] | 324 | .init_late = r8a7778_init_late, |
Kuninori Morimoto | 53e42c2 | 2013-03-21 03:03:38 -0700 | [diff] [blame] | 325 | MACHINE_END |