sdhci-pci-o2micro.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Copyright (C) 2013 BayHub Technology Ltd.
  3. *
  4. * Authors: Peter Guo <peter.guo@bayhubtech.com>
  5. * Adam Lee <adam.lee@canonical.com>
  6. *
  7. * This software is licensed under the terms of the GNU General Public
  8. * License version 2, as published by the Free Software Foundation, and
  9. * may be copied, distributed, and modified under those terms.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #ifndef __SDHCI_PCI_O2MICRO_H
  18. #define __SDHCI_PCI_O2MICRO_H
  19. #include "sdhci-pci.h"
  20. /*
  21. * O2Micro device IDs
  22. */
  23. #define PCI_DEVICE_ID_O2_SDS0 0x8420
  24. #define PCI_DEVICE_ID_O2_SDS1 0x8421
  25. #define PCI_DEVICE_ID_O2_FUJIN2 0x8520
  26. #define PCI_DEVICE_ID_O2_SEABIRD0 0x8620
  27. #define PCI_DEVICE_ID_O2_SEABIRD1 0x8621
  28. /*
  29. * O2Micro device registers
  30. */
  31. #define O2_SD_MISC_REG5 0x64
  32. #define O2_SD_LD0_CTRL 0x68
  33. #define O2_SD_DEV_CTRL 0x88
  34. #define O2_SD_LOCK_WP 0xD3
  35. #define O2_SD_TEST_REG 0xD4
  36. #define O2_SD_FUNC_REG0 0xDC
  37. #define O2_SD_MULTI_VCC3V 0xEE
  38. #define O2_SD_CLKREQ 0xEC
  39. #define O2_SD_CAPS 0xE0
  40. #define O2_SD_ADMA1 0xE2
  41. #define O2_SD_ADMA2 0xE7
  42. #define O2_SD_INF_MOD 0xF1
  43. #define O2_SD_MISC_CTRL4 0xFC
  44. #define O2_SD_TUNING_CTRL 0x300
  45. #define O2_SD_PLL_SETTING 0x304
  46. #define O2_SD_CLK_SETTING 0x328
  47. #define O2_SD_CAP_REG2 0x330
  48. #define O2_SD_CAP_REG0 0x334
  49. #define O2_SD_UHS1_CAP_SETTING 0x33C
  50. #define O2_SD_DELAY_CTRL 0x350
  51. #define O2_SD_UHS2_L1_CTRL 0x35C
  52. #define O2_SD_FUNC_REG3 0x3E0
  53. #define O2_SD_FUNC_REG4 0x3E4
  54. #define O2_SD_LED_ENABLE BIT(6)
  55. #define O2_SD_FREG0_LEDOFF BIT(13)
  56. #define O2_SD_FREG4_ENABLE_CLK_SET BIT(22)
  57. #define O2_SD_VENDOR_SETTING 0x110
  58. #define O2_SD_VENDOR_SETTING2 0x1C8
  59. extern int sdhci_pci_o2_probe_slot(struct sdhci_pci_slot *slot);
  60. extern int sdhci_pci_o2_probe(struct sdhci_pci_chip *chip);
  61. extern int sdhci_pci_o2_resume(struct sdhci_pci_chip *chip);
  62. #endif /* __SDHCI_PCI_O2MICRO_H */