btmrvl.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. =======================================================================
  2. README for btmrvl driver
  3. =======================================================================
  4. All commands are used via debugfs interface.
  5. =====================
  6. Set/get driver configurations:
  7. Path: /debug/btmrvl/config/
  8. gpiogap=[n]
  9. hscfgcmd
  10. These commands are used to configure the host sleep parameters.
  11. bit 8:0 -- Gap
  12. bit 16:8 -- GPIO
  13. where GPIO is the pin number of GPIO used to wake up the host.
  14. It could be any valid GPIO pin# (e.g. 0-7) or 0xff (SDIO interface
  15. wakeup will be used instead).
  16. where Gap is the gap in milli seconds between wakeup signal and
  17. wakeup event, or 0xff for special host sleep setting.
  18. Usage:
  19. # Use SDIO interface to wake up the host and set GAP to 0x80:
  20. echo 0xff80 > /debug/btmrvl/config/gpiogap
  21. echo 1 > /debug/btmrvl/config/hscfgcmd
  22. # Use GPIO pin #3 to wake up the host and set GAP to 0xff:
  23. echo 0x03ff > /debug/btmrvl/config/gpiogap
  24. echo 1 > /debug/btmrvl/config/hscfgcmd
  25. psmode=[n]
  26. pscmd
  27. These commands are used to enable/disable auto sleep mode
  28. where the option is:
  29. 1 -- Enable auto sleep mode
  30. 0 -- Disable auto sleep mode
  31. Usage:
  32. # Enable auto sleep mode
  33. echo 1 > /debug/btmrvl/config/psmode
  34. echo 1 > /debug/btmrvl/config/pscmd
  35. # Disable auto sleep mode
  36. echo 0 > /debug/btmrvl/config/psmode
  37. echo 1 > /debug/btmrvl/config/pscmd
  38. hsmode=[n]
  39. hscmd
  40. These commands are used to enable host sleep or wake up firmware
  41. where the option is:
  42. 1 -- Enable host sleep
  43. 0 -- Wake up firmware
  44. Usage:
  45. # Enable host sleep
  46. echo 1 > /debug/btmrvl/config/hsmode
  47. echo 1 > /debug/btmrvl/config/hscmd
  48. # Wake up firmware
  49. echo 0 > /debug/btmrvl/config/hsmode
  50. echo 1 > /debug/btmrvl/config/hscmd
  51. ======================
  52. Get driver status:
  53. Path: /debug/btmrvl/status/
  54. Usage:
  55. cat /debug/btmrvl/status/<args>
  56. where the args are:
  57. curpsmode
  58. This command displays current auto sleep status.
  59. psstate
  60. This command display the power save state.
  61. hsstate
  62. This command display the host sleep state.
  63. txdnldrdy
  64. This command displays the value of Tx download ready flag.
  65. =====================
  66. Use hcitool to issue raw hci command, refer to hcitool manual
  67. Usage: Hcitool cmd <ogf> <ocf> [Parameters]
  68. Interface Control Command
  69. hcitool cmd 0x3f 0x5b 0xf5 0x01 0x00 --Enable All interface
  70. hcitool cmd 0x3f 0x5b 0xf5 0x01 0x01 --Enable Wlan interface
  71. hcitool cmd 0x3f 0x5b 0xf5 0x01 0x02 --Enable BT interface
  72. hcitool cmd 0x3f 0x5b 0xf5 0x00 0x00 --Disable All interface
  73. hcitool cmd 0x3f 0x5b 0xf5 0x00 0x01 --Disable Wlan interface
  74. hcitool cmd 0x3f 0x5b 0xf5 0x00 0x02 --Disable BT interface
  75. =======================================================================
  76. SD8688 firmware:
  77. /lib/firmware/sd8688_helper.bin
  78. /lib/firmware/sd8688.bin
  79. The images can be downloaded from:
  80. git.infradead.org/users/dwmw2/linux-firmware.git/libertas/