lantiq_soc.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. * Copyright (C) 2010 John Crispin <blogic@openwrt.org>
  7. */
  8. #ifndef _LTQ_XWAY_H__
  9. #define _LTQ_XWAY_H__
  10. #ifdef CONFIG_SOC_TYPE_XWAY
  11. #include <lantiq.h>
  12. /* Chip IDs */
  13. #define SOC_ID_DANUBE1 0x129
  14. #define SOC_ID_DANUBE2 0x12B
  15. #define SOC_ID_TWINPASS 0x12D
  16. #define SOC_ID_AMAZON_SE_1 0x152 /* 50601 */
  17. #define SOC_ID_AMAZON_SE_2 0x153 /* 50600 */
  18. #define SOC_ID_ARX188 0x16C
  19. #define SOC_ID_ARX168_1 0x16D
  20. #define SOC_ID_ARX168_2 0x16E
  21. #define SOC_ID_ARX182 0x16F
  22. #define SOC_ID_GRX188 0x170
  23. #define SOC_ID_GRX168 0x171
  24. #define SOC_ID_VRX288 0x1C0 /* v1.1 */
  25. #define SOC_ID_VRX282 0x1C1 /* v1.1 */
  26. #define SOC_ID_VRX268 0x1C2 /* v1.1 */
  27. #define SOC_ID_GRX268 0x1C8 /* v1.1 */
  28. #define SOC_ID_GRX288 0x1C9 /* v1.1 */
  29. #define SOC_ID_VRX288_2 0x00B /* v1.2 */
  30. #define SOC_ID_VRX268_2 0x00C /* v1.2 */
  31. #define SOC_ID_GRX288_2 0x00D /* v1.2 */
  32. #define SOC_ID_GRX282_2 0x00E /* v1.2 */
  33. /* SoC Types */
  34. #define SOC_TYPE_DANUBE 0x01
  35. #define SOC_TYPE_TWINPASS 0x02
  36. #define SOC_TYPE_AR9 0x03
  37. #define SOC_TYPE_VR9 0x04 /* v1.1 */
  38. #define SOC_TYPE_VR9_2 0x05 /* v1.2 */
  39. #define SOC_TYPE_AMAZON_SE 0x06
  40. /* BOOT_SEL - find what boot media we have */
  41. #define BS_EXT_ROM 0x0
  42. #define BS_FLASH 0x1
  43. #define BS_MII0 0x2
  44. #define BS_PCI 0x3
  45. #define BS_UART1 0x4
  46. #define BS_SPI 0x5
  47. #define BS_NAND 0x6
  48. #define BS_RMII0 0x7
  49. /* helpers used to access the cgu */
  50. #define ltq_cgu_w32(x, y) ltq_w32((x), ltq_cgu_membase + (y))
  51. #define ltq_cgu_r32(x) ltq_r32(ltq_cgu_membase + (x))
  52. extern __iomem void *ltq_cgu_membase;
  53. /*
  54. * during early_printk no ioremap is possible
  55. * lets use KSEG1 instead
  56. */
  57. #define LTQ_ASC1_BASE_ADDR 0x1E100C00
  58. #define LTQ_EARLY_ASC KSEG1ADDR(LTQ_ASC1_BASE_ADDR)
  59. /* EBU - external bus unit */
  60. #define LTQ_EBU_BUSCON0 0x0060
  61. #define LTQ_EBU_PCC_CON 0x0090
  62. #define LTQ_EBU_PCC_IEN 0x00A4
  63. #define LTQ_EBU_PCC_ISTAT 0x00A0
  64. #define LTQ_EBU_BUSCON1 0x0064
  65. #define LTQ_EBU_ADDRSEL1 0x0024
  66. #define EBU_WRDIS 0x80000000
  67. /* WDT */
  68. #define LTQ_RST_CAUSE_WDTRST 0x20
  69. /* MPS - multi processor unit (voice) */
  70. #define LTQ_MPS_BASE_ADDR (KSEG1 + 0x1F107000)
  71. #define LTQ_MPS_CHIPID ((u32 *)(LTQ_MPS_BASE_ADDR + 0x0344))
  72. /* allow booting xrx200 phys */
  73. int xrx200_gphy_boot(struct device *dev, unsigned int id, dma_addr_t dev_addr);
  74. /* request a non-gpio and set the PIO config */
  75. #define PMU_PPE BIT(13)
  76. extern void ltq_pmu_enable(unsigned int module);
  77. extern void ltq_pmu_disable(unsigned int module);
  78. #endif /* CONFIG_SOC_TYPE_XWAY */
  79. #endif /* _LTQ_XWAY_H__ */