rt288x.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * This program is free software; you can redistribute it and/or modify it
  3. * under the terms of the GNU General Public License version 2 as published
  4. * by the Free Software Foundation.
  5. *
  6. * Parts of this file are based on Ralink's 2.6.21 BSP
  7. *
  8. * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
  9. * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
  10. * Copyright (C) 2013 John Crispin <john@phrozen.org>
  11. */
  12. #ifndef _RT288X_REGS_H_
  13. #define _RT288X_REGS_H_
  14. #define RT2880_SYSC_BASE 0x00300000
  15. #define SYSC_REG_CHIP_NAME0 0x00
  16. #define SYSC_REG_CHIP_NAME1 0x04
  17. #define SYSC_REG_CHIP_ID 0x0c
  18. #define SYSC_REG_SYSTEM_CONFIG 0x10
  19. #define SYSC_REG_CLKCFG 0x30
  20. #define RT2880_CHIP_NAME0 0x38325452
  21. #define RT2880_CHIP_NAME1 0x20203038
  22. #define CHIP_ID_ID_MASK 0xff
  23. #define CHIP_ID_ID_SHIFT 8
  24. #define CHIP_ID_REV_MASK 0xff
  25. #define SYSTEM_CONFIG_CPUCLK_SHIFT 20
  26. #define SYSTEM_CONFIG_CPUCLK_MASK 0x3
  27. #define SYSTEM_CONFIG_CPUCLK_250 0x0
  28. #define SYSTEM_CONFIG_CPUCLK_266 0x1
  29. #define SYSTEM_CONFIG_CPUCLK_280 0x2
  30. #define SYSTEM_CONFIG_CPUCLK_300 0x3
  31. #define RT2880_GPIO_MODE_I2C BIT(0)
  32. #define RT2880_GPIO_MODE_UART0 BIT(1)
  33. #define RT2880_GPIO_MODE_SPI BIT(2)
  34. #define RT2880_GPIO_MODE_UART1 BIT(3)
  35. #define RT2880_GPIO_MODE_JTAG BIT(4)
  36. #define RT2880_GPIO_MODE_MDIO BIT(5)
  37. #define RT2880_GPIO_MODE_SDRAM BIT(6)
  38. #define RT2880_GPIO_MODE_PCI BIT(7)
  39. #define CLKCFG_SRAM_CS_N_WDT BIT(9)
  40. #define RT2880_SDRAM_BASE 0x08000000
  41. #define RT2880_MEM_SIZE_MIN 2
  42. #define RT2880_MEM_SIZE_MAX 128
  43. #endif