ARM: shmobile: Remove FSF address from copyright headers
[cascardo/linux.git] / arch / arm / mach-shmobile / board-koelsch.c
1 /*
2  * Koelsch board support
3  *
4  * Copyright (C) 2013  Renesas Electronics Corporation
5  * Copyright (C) 2013-2014  Renesas Solutions Corp.
6  * Copyright (C) 2013  Magnus Damm
7  * Copyright (C) 2014  Cogent Embedded, Inc.
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
19 #include <linux/dma-mapping.h>
20 #include <linux/gpio.h>
21 #include <linux/gpio_keys.h>
22 #include <linux/input.h>
23 #include <linux/irq.h>
24 #include <linux/kernel.h>
25 #include <linux/leds.h>
26 #include <linux/mfd/tmio.h>
27 #include <linux/mmc/host.h>
28 #include <linux/mmc/sh_mobile_sdhi.h>
29 #include <linux/mtd/mtd.h>
30 #include <linux/mtd/partitions.h>
31 #include <linux/phy.h>
32 #include <linux/pinctrl/machine.h>
33 #include <linux/platform_data/gpio-rcar.h>
34 #include <linux/platform_data/rcar-du.h>
35 #include <linux/platform_device.h>
36 #include <linux/regulator/driver.h>
37 #include <linux/regulator/fixed.h>
38 #include <linux/regulator/gpio-regulator.h>
39 #include <linux/regulator/machine.h>
40 #include <linux/sh_eth.h>
41 #include <linux/spi/flash.h>
42 #include <linux/spi/rspi.h>
43 #include <linux/spi/spi.h>
44
45 #include <asm/mach-types.h>
46 #include <asm/mach/arch.h>
47
48 #include "common.h"
49 #include "irqs.h"
50 #include "r8a7791.h"
51 #include "rcar-gen2.h"
52
53 /* DU */
54 static struct rcar_du_encoder_data koelsch_du_encoders[] = {
55         {
56                 .type = RCAR_DU_ENCODER_NONE,
57                 .output = RCAR_DU_OUTPUT_LVDS0,
58                 .connector.lvds.panel = {
59                         .width_mm = 210,
60                         .height_mm = 158,
61                         .mode = {
62                                 .pixelclock = 65000000,
63                                 .hactive = 1024,
64                                 .hfront_porch = 20,
65                                 .hback_porch = 160,
66                                 .hsync_len = 136,
67                                 .vactive = 768,
68                                 .vfront_porch = 3,
69                                 .vback_porch = 29,
70                                 .vsync_len = 6,
71                         },
72                 },
73         },
74 };
75
76 static const struct rcar_du_platform_data koelsch_du_pdata __initconst = {
77         .encoders = koelsch_du_encoders,
78         .num_encoders = ARRAY_SIZE(koelsch_du_encoders),
79 };
80
81 static const struct resource du_resources[] __initconst = {
82         DEFINE_RES_MEM(0xfeb00000, 0x40000),
83         DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
84         DEFINE_RES_IRQ(gic_spi(256)),
85         DEFINE_RES_IRQ(gic_spi(268)),
86 };
87
88 static void __init koelsch_add_du_device(void)
89 {
90         struct platform_device_info info = {
91                 .name = "rcar-du-r8a7791",
92                 .id = -1,
93                 .res = du_resources,
94                 .num_res = ARRAY_SIZE(du_resources),
95                 .data = &koelsch_du_pdata,
96                 .size_data = sizeof(koelsch_du_pdata),
97                 .dma_mask = DMA_BIT_MASK(32),
98         };
99
100         platform_device_register_full(&info);
101 }
102
103 /* Ether */
104 static const struct sh_eth_plat_data ether_pdata __initconst = {
105         .phy                    = 0x1,
106         .phy_irq                = irq_pin(0),
107         .edmac_endian           = EDMAC_LITTLE_ENDIAN,
108         .phy_interface          = PHY_INTERFACE_MODE_RMII,
109         .ether_link_active_low  = 1,
110 };
111
112 static const struct resource ether_resources[] __initconst = {
113         DEFINE_RES_MEM(0xee700000, 0x400),
114         DEFINE_RES_IRQ(gic_spi(162)),
115 };
116
117 static const struct platform_device_info ether_info __initconst = {
118         .name           = "r8a7791-ether",
119         .id             = -1,
120         .res            = ether_resources,
121         .num_res        = ARRAY_SIZE(ether_resources),
122         .data           = &ether_pdata,
123         .size_data      = sizeof(ether_pdata),
124         .dma_mask       = DMA_BIT_MASK(32),
125 };
126
127 /* LEDS */
128 static struct gpio_led koelsch_leds[] = {
129         {
130                 .name           = "led8",
131                 .gpio           = RCAR_GP_PIN(2, 21),
132                 .default_state  = LEDS_GPIO_DEFSTATE_ON,
133         }, {
134                 .name           = "led7",
135                 .gpio           = RCAR_GP_PIN(2, 20),
136                 .default_state  = LEDS_GPIO_DEFSTATE_ON,
137         }, {
138                 .name           = "led6",
139                 .gpio           = RCAR_GP_PIN(2, 19),
140                 .default_state  = LEDS_GPIO_DEFSTATE_ON,
141         },
142 };
143
144 static const struct gpio_led_platform_data koelsch_leds_pdata __initconst = {
145         .leds           = koelsch_leds,
146         .num_leds       = ARRAY_SIZE(koelsch_leds),
147 };
148
149 /* GPIO KEY */
150 #define GPIO_KEY(c, g, d, ...) \
151         { .code = c, .gpio = g, .desc = d, .active_low = 1, \
152           .wakeup = 1, .debounce_interval = 20 }
153
154 static struct gpio_keys_button gpio_buttons[] = {
155         GPIO_KEY(KEY_4,         RCAR_GP_PIN(5, 3),      "SW2-pin4"),
156         GPIO_KEY(KEY_3,         RCAR_GP_PIN(5, 2),      "SW2-pin3"),
157         GPIO_KEY(KEY_2,         RCAR_GP_PIN(5, 1),      "SW2-pin2"),
158         GPIO_KEY(KEY_1,         RCAR_GP_PIN(5, 0),      "SW2-pin1"),
159         GPIO_KEY(KEY_G,         RCAR_GP_PIN(7, 6),      "SW36"),
160         GPIO_KEY(KEY_F,         RCAR_GP_PIN(7, 5),      "SW35"),
161         GPIO_KEY(KEY_E,         RCAR_GP_PIN(7, 4),      "SW34"),
162         GPIO_KEY(KEY_D,         RCAR_GP_PIN(7, 3),      "SW33"),
163         GPIO_KEY(KEY_C,         RCAR_GP_PIN(7, 2),      "SW32"),
164         GPIO_KEY(KEY_B,         RCAR_GP_PIN(7, 1),      "SW31"),
165         GPIO_KEY(KEY_A,         RCAR_GP_PIN(7, 0),      "SW30"),
166 };
167
168 static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = {
169         .buttons        = gpio_buttons,
170         .nbuttons       = ARRAY_SIZE(gpio_buttons),
171 };
172
173 /* QSPI */
174 static const struct resource qspi_resources[] __initconst = {
175         DEFINE_RES_MEM(0xe6b10000, 0x1000),
176         DEFINE_RES_IRQ_NAMED(gic_spi(184), "mux"),
177 };
178
179 static const struct rspi_plat_data qspi_pdata __initconst = {
180         .num_chipselect = 1,
181 };
182
183 /* SPI Flash memory (Spansion S25FL512SAGMFIG11 64 MiB) */
184 static struct mtd_partition spi_flash_part[] = {
185         {
186                 .name           = "loader",
187                 .offset         = 0x00000000,
188                 .size           = 512 * 1024,
189                 .mask_flags     = MTD_WRITEABLE,
190         },
191         {
192                 .name           = "bootenv",
193                 .offset         = MTDPART_OFS_APPEND,
194                 .size           = 512 * 1024,
195                 .mask_flags     = MTD_WRITEABLE,
196         },
197         {
198                 .name           = "data",
199                 .offset         = MTDPART_OFS_APPEND,
200                 .size           = MTDPART_SIZ_FULL,
201         },
202 };
203
204 static const struct flash_platform_data spi_flash_data = {
205         .name           = "m25p80",
206         .parts          = spi_flash_part,
207         .nr_parts       = ARRAY_SIZE(spi_flash_part),
208         .type           = "s25fl512s",
209 };
210
211 static const struct spi_board_info spi_info[] __initconst = {
212         {
213                 .modalias       = "m25p80",
214                 .platform_data  = &spi_flash_data,
215                 .mode           = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
216                 .max_speed_hz   = 30000000,
217                 .bus_num        = 0,
218                 .chip_select    = 0,
219         },
220 };
221
222 /* SATA0 */
223 static const struct resource sata0_resources[] __initconst = {
224         DEFINE_RES_MEM(0xee300000, 0x2000),
225         DEFINE_RES_IRQ(gic_spi(105)),
226 };
227
228 static const struct platform_device_info sata0_info __initconst = {
229         .name           = "sata-r8a7791",
230         .id             = 0,
231         .res            = sata0_resources,
232         .num_res        = ARRAY_SIZE(sata0_resources),
233         .dma_mask       = DMA_BIT_MASK(32),
234 };
235
236 /* I2C */
237 static const struct resource i2c_resources[] __initconst = {
238         /* I2C0 */
239         DEFINE_RES_MEM(0xE6508000, 0x40),
240         DEFINE_RES_IRQ(gic_spi(287)),
241         /* I2C1 */
242         DEFINE_RES_MEM(0xE6518000, 0x40),
243         DEFINE_RES_IRQ(gic_spi(288)),
244         /* I2C2 */
245         DEFINE_RES_MEM(0xE6530000, 0x40),
246         DEFINE_RES_IRQ(gic_spi(286)),
247         /* I2C3 */
248         DEFINE_RES_MEM(0xE6540000, 0x40),
249         DEFINE_RES_IRQ(gic_spi(290)),
250         /* I2C4 */
251         DEFINE_RES_MEM(0xE6520000, 0x40),
252         DEFINE_RES_IRQ(gic_spi(19)),
253         /* I2C5 */
254         DEFINE_RES_MEM(0xE6528000, 0x40),
255         DEFINE_RES_IRQ(gic_spi(20)),
256 };
257
258 static void __init koelsch_add_i2c(unsigned idx)
259 {
260         unsigned res_idx = idx * 2;
261
262         BUG_ON(res_idx >= ARRAY_SIZE(i2c_resources));
263
264         platform_device_register_simple("i2c-rcar_gen2", idx,
265                                         i2c_resources + res_idx, 2);
266 }
267
268 #define SDHI_REGULATOR(idx, vdd_pin, vccq_pin)                          \
269 static struct regulator_consumer_supply vcc_sdhi##idx##_consumer =      \
270         REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx);               \
271                                                                         \
272 static struct regulator_init_data vcc_sdhi##idx##_init_data = {         \
273         .constraints = {                                                \
274                 .valid_ops_mask = REGULATOR_CHANGE_STATUS,              \
275         },                                                              \
276         .consumer_supplies      = &vcc_sdhi##idx##_consumer,            \
277         .num_consumer_supplies  = 1,                                    \
278 };                                                                      \
279                                                                         \
280 static const struct fixed_voltage_config vcc_sdhi##idx##_info __initconst = {\
281         .supply_name    = "SDHI" #idx "Vcc",                            \
282         .microvolts     = 3300000,                                      \
283         .gpio           = vdd_pin,                                      \
284         .enable_high    = 1,                                            \
285         .init_data      = &vcc_sdhi##idx##_init_data,                   \
286 };                                                                      \
287                                                                         \
288 static struct regulator_consumer_supply vccq_sdhi##idx##_consumer =     \
289         REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi." #idx);              \
290                                                                         \
291 static struct regulator_init_data vccq_sdhi##idx##_init_data = {        \
292         .constraints = {                                                \
293                 .input_uV       = 3300000,                              \
294                 .min_uV         = 1800000,                              \
295                 .max_uV         = 3300000,                              \
296                 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |            \
297                                   REGULATOR_CHANGE_STATUS,              \
298         },                                                              \
299         .consumer_supplies      = &vccq_sdhi##idx##_consumer,           \
300         .num_consumer_supplies  = 1,                                    \
301 };                                                                      \
302                                                                         \
303 static struct gpio vccq_sdhi##idx##_gpio =                              \
304         { vccq_pin, GPIOF_OUT_INIT_HIGH, "vccq-sdhi" #idx };            \
305                                                                         \
306 static struct gpio_regulator_state vccq_sdhi##idx##_states[] = {        \
307         { .value = 1800000, .gpios = 0 },                               \
308         { .value = 3300000, .gpios = 1 },                               \
309 };                                                                      \
310                                                                         \
311 static const struct gpio_regulator_config vccq_sdhi##idx##_info __initconst = {\
312         .supply_name    = "vqmmc",                                      \
313         .gpios          = &vccq_sdhi##idx##_gpio,                       \
314         .nr_gpios       = 1,                                            \
315         .states         = vccq_sdhi##idx##_states,                      \
316         .nr_states      = ARRAY_SIZE(vccq_sdhi##idx##_states),          \
317         .type           = REGULATOR_VOLTAGE,                            \
318         .init_data      = &vccq_sdhi##idx##_init_data,                  \
319 };
320
321 SDHI_REGULATOR(0, RCAR_GP_PIN(7, 17), RCAR_GP_PIN(2, 12));
322 SDHI_REGULATOR(1, RCAR_GP_PIN(7, 18), RCAR_GP_PIN(2, 13));
323 SDHI_REGULATOR(2, RCAR_GP_PIN(7, 19), RCAR_GP_PIN(2, 26));
324
325 /* SDHI0 */
326 static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
327         .tmio_caps      = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
328                           MMC_CAP_POWER_OFF_CARD,
329         .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT,
330 };
331
332 static struct resource sdhi0_resources[] __initdata = {
333         DEFINE_RES_MEM(0xee100000, 0x200),
334         DEFINE_RES_IRQ(gic_spi(165)),
335 };
336
337 /* SDHI1 */
338 static struct sh_mobile_sdhi_info sdhi1_info __initdata = {
339         .tmio_caps      = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
340                           MMC_CAP_POWER_OFF_CARD,
341         .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT,
342 };
343
344 static struct resource sdhi1_resources[] __initdata = {
345         DEFINE_RES_MEM(0xee140000, 0x100),
346         DEFINE_RES_IRQ(gic_spi(167)),
347 };
348
349 /* SDHI2 */
350 static struct sh_mobile_sdhi_info sdhi2_info __initdata = {
351         .tmio_caps      = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
352                           MMC_CAP_POWER_OFF_CARD,
353         .tmio_flags     = TMIO_MMC_HAS_IDLE_WAIT |
354                           TMIO_MMC_WRPROTECT_DISABLE,
355 };
356
357 static struct resource sdhi2_resources[] __initdata = {
358         DEFINE_RES_MEM(0xee160000, 0x100),
359         DEFINE_RES_IRQ(gic_spi(168)),
360 };
361
362 static const struct pinctrl_map koelsch_pinctrl_map[] = {
363         /* DU */
364         PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
365                                   "du_rgb666", "du"),
366         PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
367                                   "du_sync", "du"),
368         PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
369                                   "du_clk_out_0", "du"),
370         /* Ether */
371         PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
372                                   "eth_link", "eth"),
373         PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
374                                   "eth_mdio", "eth"),
375         PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
376                                   "eth_rmii", "eth"),
377         PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
378                                   "intc_irq0", "intc"),
379         /* QSPI */
380         PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791",
381                                   "qspi_ctrl", "qspi"),
382         PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791",
383                                   "qspi_data4", "qspi"),
384         /* SCIF0 (CN19: DEBUG SERIAL0) */
385         PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791",
386                                   "scif0_data_d", "scif0"),
387         /* SCIF1 (CN20: DEBUG SERIAL1) */
388         PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791",
389                                   "scif1_data_d", "scif1"),
390         /* I2C1 */
391         PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.1", "pfc-r8a7791",
392                                   "i2c1_e", "i2c1"),
393         /* I2C2 */
394         PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.2", "pfc-r8a7791",
395                                   "i2c2", "i2c2"),
396         /* I2C4 */
397         PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791",
398                                   "i2c4_c", "i2c4"),
399         /* SDHI0 */
400         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
401                                   "sdhi0_data4", "sdhi0"),
402         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
403                                   "sdhi0_ctrl", "sdhi0"),
404         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
405                                   "sdhi0_cd", "sdhi0"),
406         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
407                                   "sdhi0_wp", "sdhi0"),
408         /* SDHI2 */
409         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
410                                   "sdhi1_data4", "sdhi1"),
411         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
412                                   "sdhi1_ctrl", "sdhi1"),
413         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
414                                   "sdhi1_cd", "sdhi1"),
415         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
416                                   "sdhi1_wp", "sdhi1"),
417         /* SDHI2 */
418         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
419                                   "sdhi2_data4", "sdhi2"),
420         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
421                                   "sdhi2_ctrl", "sdhi2"),
422         PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
423                                   "sdhi2_cd", "sdhi2"),
424 };
425
426 static void __init koelsch_add_standard_devices(void)
427 {
428         r8a7791_clock_init();
429         pinctrl_register_mappings(koelsch_pinctrl_map,
430                                   ARRAY_SIZE(koelsch_pinctrl_map));
431         r8a7791_pinmux_init();
432         r8a7791_add_standard_devices();
433         platform_device_register_full(&ether_info);
434         platform_device_register_data(NULL, "leds-gpio", -1,
435                                       &koelsch_leds_pdata,
436                                       sizeof(koelsch_leds_pdata));
437         platform_device_register_data(NULL, "gpio-keys", -1,
438                                       &koelsch_keys_pdata,
439                                       sizeof(koelsch_keys_pdata));
440         platform_device_register_resndata(NULL, "qspi", 0,
441                                           qspi_resources,
442                                           ARRAY_SIZE(qspi_resources),
443                                           &qspi_pdata, sizeof(qspi_pdata));
444         spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
445
446         koelsch_add_du_device();
447
448         platform_device_register_full(&sata0_info);
449
450         koelsch_add_i2c(1);
451         koelsch_add_i2c(2);
452         koelsch_add_i2c(4);
453         koelsch_add_i2c(5);
454
455         platform_device_register_data(NULL, "reg-fixed-voltage", 0,
456                                       &vcc_sdhi0_info, sizeof(struct fixed_voltage_config));
457         platform_device_register_data(NULL, "reg-fixed-voltage", 1,
458                                       &vcc_sdhi1_info, sizeof(struct fixed_voltage_config));
459         platform_device_register_data(NULL, "reg-fixed-voltage", 2,
460                                       &vcc_sdhi2_info, sizeof(struct fixed_voltage_config));
461         platform_device_register_data(NULL, "gpio-regulator", 0,
462                                       &vccq_sdhi0_info, sizeof(struct gpio_regulator_config));
463         platform_device_register_data(NULL, "gpio-regulator", 1,
464                                       &vccq_sdhi1_info, sizeof(struct gpio_regulator_config));
465         platform_device_register_data(NULL, "gpio-regulator", 2,
466                                       &vccq_sdhi2_info, sizeof(struct gpio_regulator_config));
467
468         platform_device_register_resndata(NULL, "sh_mobile_sdhi", 0,
469                                           sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
470                                           &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
471
472         platform_device_register_resndata(NULL, "sh_mobile_sdhi", 1,
473                                           sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
474                                           &sdhi1_info, sizeof(struct sh_mobile_sdhi_info));
475
476         platform_device_register_resndata(NULL, "sh_mobile_sdhi", 2,
477                                           sdhi2_resources, ARRAY_SIZE(sdhi2_resources),
478                                           &sdhi2_info, sizeof(struct sh_mobile_sdhi_info));
479
480 }
481
482 /*
483  * Ether LEDs on the Koelsch board are named LINK and ACTIVE which corresponds
484  * to non-default 01 setting of the Micrel KSZ8041 PHY control register 1 bits
485  * 14-15. We have to set them back to 01 from the default 00 value each time
486  * the PHY is reset. It's also important because the PHY's LED0 signal is
487  * connected to SoC's ETH_LINK signal and in the PHY's default mode it will
488  * bounce on and off after each packet, which we apparently want to avoid.
489  */
490 static int koelsch_ksz8041_fixup(struct phy_device *phydev)
491 {
492         u16 phyctrl1 = phy_read(phydev, 0x1e);
493
494         phyctrl1 &= ~0xc000;
495         phyctrl1 |= 0x4000;
496         return phy_write(phydev, 0x1e, phyctrl1);
497 }
498
499 static void __init koelsch_init(void)
500 {
501         koelsch_add_standard_devices();
502
503         irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW);
504
505         if (IS_ENABLED(CONFIG_PHYLIB))
506                 phy_register_fixup_for_id("r8a7791-ether-ff:01",
507                                           koelsch_ksz8041_fixup);
508 }
509
510 static const char * const koelsch_boards_compat_dt[] __initconst = {
511         "renesas,koelsch",
512         NULL,
513 };
514
515 DT_MACHINE_START(KOELSCH_DT, "koelsch")
516         .smp            = smp_ops(r8a7791_smp_ops),
517         .init_early     = shmobile_init_delay,
518         .init_time      = rcar_gen2_timer_init,
519         .init_machine   = koelsch_init,
520         .init_late      = shmobile_init_late,
521         .reserve        = rcar_gen2_reserve,
522         .dt_compat      = koelsch_boards_compat_dt,
523 MACHINE_END