board-marzen-reference.c 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * marzen board support - Reference DT implementation
  3. *
  4. * Copyright (C) 2011 Renesas Solutions Corp.
  5. * Copyright (C) 2011 Magnus Damm
  6. * Copyright (C) 2013 Simon Horman
  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. #include <linux/pinctrl/machine.h>
  22. #include <mach/r8a7779.h>
  23. #include <mach/common.h>
  24. #include <mach/irqs.h>
  25. #include <asm/irq.h>
  26. #include <asm/mach/arch.h>
  27. static const struct pinctrl_map marzen_pinctrl_map[] = {
  28. /* SCIF2 (CN18: DEBUG0) */
  29. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.2", "pfc-r8a7779",
  30. "scif2_data_c", "scif2"),
  31. /* SCIF4 (CN19: DEBUG1) */
  32. PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.4", "pfc-r8a7779",
  33. "scif4_data", "scif4"),
  34. /* SDHI0 */
  35. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779",
  36. "sdhi0_data4", "sdhi0"),
  37. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779",
  38. "sdhi0_ctrl", "sdhi0"),
  39. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779",
  40. "sdhi0_cd", "sdhi0"),
  41. PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7779",
  42. "sdhi0_wp", "sdhi0"),
  43. /* SMSC */
  44. PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779",
  45. "intc_irq1_b", "intc"),
  46. PIN_MAP_MUX_GROUP_DEFAULT("smsc911x", "pfc-r8a7779",
  47. "lbsc_ex_cs0", "lbsc"),
  48. };
  49. static void __init marzen_init(void)
  50. {
  51. pinctrl_register_mappings(marzen_pinctrl_map,
  52. ARRAY_SIZE(marzen_pinctrl_map));
  53. r8a7779_pinmux_init();
  54. r8a7779_add_standard_devices_dt();
  55. }
  56. static const char *marzen_boards_compat_dt[] __initdata = {
  57. "renesas,marzen-reference",
  58. NULL,
  59. };
  60. DT_MACHINE_START(MARZEN, "marzen")
  61. .smp = smp_ops(r8a7779_smp_ops),
  62. .map_io = r8a7779_map_io,
  63. .init_early = r8a7779_init_delay,
  64. .nr_irqs = NR_IRQS_LEGACY,
  65. .init_irq = r8a7779_init_irq_dt,
  66. .init_machine = marzen_init,
  67. .init_time = shmobile_timer_init,
  68. .dt_compat = marzen_boards_compat_dt,
  69. MACHINE_END