rt288x.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. *
  4. * Parts of this file are based on Ralink's 2.6.21 BSP
  5. *
  6. * Copyright (C) 2008-2011 Gabor Juhos <[email protected]>
  7. * Copyright (C) 2008 Imre Kaloz <[email protected]>
  8. * Copyright (C) 2013 John Crispin <[email protected]>
  9. */
  10. #ifndef _RT288X_REGS_H_
  11. #define _RT288X_REGS_H_
  12. #define RT2880_SYSC_BASE 0x00300000
  13. #define SYSC_REG_CHIP_NAME0 0x00
  14. #define SYSC_REG_CHIP_NAME1 0x04
  15. #define SYSC_REG_CHIP_ID 0x0c
  16. #define SYSC_REG_SYSTEM_CONFIG 0x10
  17. #define SYSC_REG_CLKCFG 0x30
  18. #define RT2880_CHIP_NAME0 0x38325452
  19. #define RT2880_CHIP_NAME1 0x20203038
  20. #define CHIP_ID_ID_MASK 0xff
  21. #define CHIP_ID_ID_SHIFT 8
  22. #define CHIP_ID_REV_MASK 0xff
  23. #define SYSTEM_CONFIG_CPUCLK_SHIFT 20
  24. #define SYSTEM_CONFIG_CPUCLK_MASK 0x3
  25. #define SYSTEM_CONFIG_CPUCLK_250 0x0
  26. #define SYSTEM_CONFIG_CPUCLK_266 0x1
  27. #define SYSTEM_CONFIG_CPUCLK_280 0x2
  28. #define SYSTEM_CONFIG_CPUCLK_300 0x3
  29. #define CLKCFG_SRAM_CS_N_WDT BIT(9)
  30. #define RT2880_SDRAM_BASE 0x08000000
  31. #define RT2880_MEM_SIZE_MIN 2
  32. #define RT2880_MEM_SIZE_MAX 128
  33. #endif