rx62n.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * RX62N MCU Object
  3. *
  4. * Datasheet: RX62N Group, RX621 Group User's Manual: Hardware
  5. * (Rev.1.40 R01UH0033EJ0140)
  6. *
  7. * Copyright (c) 2019 Yoshinori Sato
  8. *
  9. * SPDX-License-Identifier: GPL-2.0-or-later
  10. *
  11. * This program is free software; you can redistribute it and/or modify it
  12. * under the terms and conditions of the GNU General Public License,
  13. * version 2 or later, as published by the Free Software Foundation.
  14. *
  15. * This program is distributed in the hope it will be useful, but WITHOUT
  16. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  17. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  18. * more details.
  19. *
  20. * You should have received a copy of the GNU General Public License along with
  21. * this program. If not, see <http://www.gnu.org/licenses/>.
  22. */
  23. #ifndef HW_RX_RX62N_H
  24. #define HW_RX_RX62N_H
  25. #include "target/rx/cpu.h"
  26. #include "hw/intc/rx_icu.h"
  27. #include "hw/timer/renesas_tmr.h"
  28. #include "hw/timer/renesas_cmt.h"
  29. #include "hw/char/renesas_sci.h"
  30. #include "qom/object.h"
  31. #define TYPE_RX62N_MCU "rx62n-mcu"
  32. typedef struct RX62NState RX62NState;
  33. DECLARE_INSTANCE_CHECKER(RX62NState, RX62N_MCU,
  34. TYPE_RX62N_MCU)
  35. #define TYPE_R5F562N7_MCU "r5f562n7-mcu"
  36. #define TYPE_R5F562N8_MCU "r5f562n8-mcu"
  37. #define EXT_CS_BASE 0x01000000
  38. #define VECTOR_TABLE_BASE 0xffffff80
  39. #define RX62N_CFLASH_BASE 0xfff80000
  40. #define RX62N_NR_TMR 2
  41. #define RX62N_NR_CMT 2
  42. #define RX62N_NR_SCI 6
  43. struct RX62NState {
  44. /*< private >*/
  45. DeviceState parent_obj;
  46. /*< public >*/
  47. RXCPU cpu;
  48. RXICUState icu;
  49. RTMRState tmr[RX62N_NR_TMR];
  50. RCMTState cmt[RX62N_NR_CMT];
  51. RSCIState sci[RX62N_NR_SCI];
  52. MemoryRegion *sysmem;
  53. bool kernel;
  54. MemoryRegion iram;
  55. MemoryRegion iomem1;
  56. MemoryRegion d_flash;
  57. MemoryRegion iomem2;
  58. MemoryRegion iomem3;
  59. MemoryRegion c_flash;
  60. /* Input Clock (XTAL) frequency */
  61. uint32_t xtal_freq_hz;
  62. /* Peripheral Module Clock frequency */
  63. uint32_t pclk_freq_hz;
  64. };
  65. #endif