rpi_hw.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. /*
  41. * PCI Express
  42. */
  43. #define RPI_PCIE_RC_BASES RPI_IO_BASE + ULL(0x00100000), \
  44. RPI_IO_BASE + ULL(0x00110000), \
  45. RPI_IO_BASE + ULL(0x00120000)
  46. #endif /* RPI_HW_H */