rpi_hw.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) 2016-2024, Arm Limited and Contributors. All rights reserved.
  3. * Copyright (c) 2024, Mario Bălănică <mariobalanica02@gmail.com>
  4. *
  5. * SPDX-License-Identifier: BSD-3-Clause
  6. */
  7. #ifndef RPI_HW_H
  8. #define RPI_HW_H
  9. #include <lib/utils_def.h>
  10. /*
  11. * Peripherals
  12. */
  13. #define RPI_IO_BASE ULL(0x1000000000)
  14. #define RPI_IO_SIZE ULL(0x1000000000)
  15. /*
  16. * ARM <-> VideoCore mailboxes
  17. */
  18. #define RPI3_MBOX_BASE (RPI_IO_BASE + ULL(0x7c013880))
  19. /*
  20. * Power management, reset controller, watchdog.
  21. */
  22. #define RPI3_PM_BASE (RPI_IO_BASE + ULL(0x7d200000))
  23. /*
  24. * Hardware random number generator.
  25. */
  26. #define RPI3_RNG_BASE (RPI_IO_BASE + ULL(0x7d208000))
  27. /*
  28. * PL011 system serial port
  29. */
  30. #define RPI4_PL011_UART_BASE (RPI_IO_BASE + ULL(0x7d001000))
  31. #define RPI4_PL011_UART_CLOCK ULL(44000000)
  32. /*
  33. * GIC interrupt controller
  34. */
  35. #define RPI_HAVE_GIC
  36. #define RPI4_GIC_GICD_BASE (RPI_IO_BASE + ULL(0x7fff9000))
  37. #define RPI4_GIC_GICC_BASE (RPI_IO_BASE + ULL(0x7fffa000))
  38. #define RPI4_LOCAL_CONTROL_BASE_ADDRESS (RPI_IO_BASE + ULL(0x7c280000))
  39. #define RPI4_LOCAL_CONTROL_PRESCALER (RPI_IO_BASE + ULL(0x7c280008))
  40. #endif /* RPI_HW_H */