1*4f4cfa6cSMauro Carvalho Chehab============= 2*4f4cfa6cSMauro Carvalho Chehabbtmrvl driver 3*4f4cfa6cSMauro Carvalho Chehab============= 4*4f4cfa6cSMauro Carvalho Chehab 5*4f4cfa6cSMauro Carvalho ChehabAll commands are used via debugfs interface. 6*4f4cfa6cSMauro Carvalho Chehab 7*4f4cfa6cSMauro Carvalho ChehabSet/get driver configurations 8*4f4cfa6cSMauro Carvalho Chehab============================= 9*4f4cfa6cSMauro Carvalho Chehab 10*4f4cfa6cSMauro Carvalho ChehabPath: /debug/btmrvl/config/ 11*4f4cfa6cSMauro Carvalho Chehab 12*4f4cfa6cSMauro Carvalho Chehabgpiogap=[n], hscfgcmd 13*4f4cfa6cSMauro Carvalho Chehab These commands are used to configure the host sleep parameters:: 14*4f4cfa6cSMauro Carvalho Chehab bit 8:0 -- Gap 15*4f4cfa6cSMauro Carvalho Chehab bit 16:8 -- GPIO 16*4f4cfa6cSMauro Carvalho Chehab 17*4f4cfa6cSMauro Carvalho Chehab where GPIO is the pin number of GPIO used to wake up the host. 18*4f4cfa6cSMauro Carvalho Chehab It could be any valid GPIO pin# (e.g. 0-7) or 0xff (SDIO interface 19*4f4cfa6cSMauro Carvalho Chehab wakeup will be used instead). 20*4f4cfa6cSMauro Carvalho Chehab 21*4f4cfa6cSMauro Carvalho Chehab where Gap is the gap in milli seconds between wakeup signal and 22*4f4cfa6cSMauro Carvalho Chehab wakeup event, or 0xff for special host sleep setting. 23*4f4cfa6cSMauro Carvalho Chehab 24*4f4cfa6cSMauro Carvalho Chehab Usage:: 25*4f4cfa6cSMauro Carvalho Chehab 26*4f4cfa6cSMauro Carvalho Chehab # Use SDIO interface to wake up the host and set GAP to 0x80: 27*4f4cfa6cSMauro Carvalho Chehab echo 0xff80 > /debug/btmrvl/config/gpiogap 28*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/hscfgcmd 29*4f4cfa6cSMauro Carvalho Chehab 30*4f4cfa6cSMauro Carvalho Chehab # Use GPIO pin #3 to wake up the host and set GAP to 0xff: 31*4f4cfa6cSMauro Carvalho Chehab echo 0x03ff > /debug/btmrvl/config/gpiogap 32*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/hscfgcmd 33*4f4cfa6cSMauro Carvalho Chehab 34*4f4cfa6cSMauro Carvalho Chehabpsmode=[n], pscmd 35*4f4cfa6cSMauro Carvalho Chehab These commands are used to enable/disable auto sleep mode 36*4f4cfa6cSMauro Carvalho Chehab 37*4f4cfa6cSMauro Carvalho Chehab where the option is:: 38*4f4cfa6cSMauro Carvalho Chehab 39*4f4cfa6cSMauro Carvalho Chehab 1 -- Enable auto sleep mode 40*4f4cfa6cSMauro Carvalho Chehab 0 -- Disable auto sleep mode 41*4f4cfa6cSMauro Carvalho Chehab 42*4f4cfa6cSMauro Carvalho Chehab Usage:: 43*4f4cfa6cSMauro Carvalho Chehab 44*4f4cfa6cSMauro Carvalho Chehab # Enable auto sleep mode 45*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/psmode 46*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/pscmd 47*4f4cfa6cSMauro Carvalho Chehab 48*4f4cfa6cSMauro Carvalho Chehab # Disable auto sleep mode 49*4f4cfa6cSMauro Carvalho Chehab echo 0 > /debug/btmrvl/config/psmode 50*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/pscmd 51*4f4cfa6cSMauro Carvalho Chehab 52*4f4cfa6cSMauro Carvalho Chehab 53*4f4cfa6cSMauro Carvalho Chehabhsmode=[n], hscmd 54*4f4cfa6cSMauro Carvalho Chehab These commands are used to enable host sleep or wake up firmware 55*4f4cfa6cSMauro Carvalho Chehab 56*4f4cfa6cSMauro Carvalho Chehab where the option is:: 57*4f4cfa6cSMauro Carvalho Chehab 58*4f4cfa6cSMauro Carvalho Chehab 1 -- Enable host sleep 59*4f4cfa6cSMauro Carvalho Chehab 0 -- Wake up firmware 60*4f4cfa6cSMauro Carvalho Chehab 61*4f4cfa6cSMauro Carvalho Chehab Usage:: 62*4f4cfa6cSMauro Carvalho Chehab 63*4f4cfa6cSMauro Carvalho Chehab # Enable host sleep 64*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/hsmode 65*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/hscmd 66*4f4cfa6cSMauro Carvalho Chehab 67*4f4cfa6cSMauro Carvalho Chehab # Wake up firmware 68*4f4cfa6cSMauro Carvalho Chehab echo 0 > /debug/btmrvl/config/hsmode 69*4f4cfa6cSMauro Carvalho Chehab echo 1 > /debug/btmrvl/config/hscmd 70*4f4cfa6cSMauro Carvalho Chehab 71*4f4cfa6cSMauro Carvalho Chehab 72*4f4cfa6cSMauro Carvalho ChehabGet driver status 73*4f4cfa6cSMauro Carvalho Chehab================= 74*4f4cfa6cSMauro Carvalho Chehab 75*4f4cfa6cSMauro Carvalho ChehabPath: /debug/btmrvl/status/ 76*4f4cfa6cSMauro Carvalho Chehab 77*4f4cfa6cSMauro Carvalho ChehabUsage:: 78*4f4cfa6cSMauro Carvalho Chehab 79*4f4cfa6cSMauro Carvalho Chehab cat /debug/btmrvl/status/<args> 80*4f4cfa6cSMauro Carvalho Chehab 81*4f4cfa6cSMauro Carvalho Chehabwhere the args are: 82*4f4cfa6cSMauro Carvalho Chehab 83*4f4cfa6cSMauro Carvalho Chehabcurpsmode 84*4f4cfa6cSMauro Carvalho Chehab This command displays current auto sleep status. 85*4f4cfa6cSMauro Carvalho Chehab 86*4f4cfa6cSMauro Carvalho Chehabpsstate 87*4f4cfa6cSMauro Carvalho Chehab This command display the power save state. 88*4f4cfa6cSMauro Carvalho Chehab 89*4f4cfa6cSMauro Carvalho Chehabhsstate 90*4f4cfa6cSMauro Carvalho Chehab This command display the host sleep state. 91*4f4cfa6cSMauro Carvalho Chehab 92*4f4cfa6cSMauro Carvalho Chehabtxdnldrdy 93*4f4cfa6cSMauro Carvalho Chehab This command displays the value of Tx download ready flag. 94*4f4cfa6cSMauro Carvalho Chehab 95*4f4cfa6cSMauro Carvalho ChehabIssuing a raw hci command 96*4f4cfa6cSMauro Carvalho Chehab========================= 97*4f4cfa6cSMauro Carvalho Chehab 98*4f4cfa6cSMauro Carvalho ChehabUse hcitool to issue raw hci command, refer to hcitool manual 99*4f4cfa6cSMauro Carvalho Chehab 100*4f4cfa6cSMauro Carvalho ChehabUsage:: 101*4f4cfa6cSMauro Carvalho Chehab 102*4f4cfa6cSMauro Carvalho Chehab Hcitool cmd <ogf> <ocf> [Parameters] 103*4f4cfa6cSMauro Carvalho Chehab 104*4f4cfa6cSMauro Carvalho ChehabInterface Control Command:: 105*4f4cfa6cSMauro Carvalho Chehab 106*4f4cfa6cSMauro Carvalho Chehab hcitool cmd 0x3f 0x5b 0xf5 0x01 0x00 --Enable All interface 107*4f4cfa6cSMauro Carvalho Chehab hcitool cmd 0x3f 0x5b 0xf5 0x01 0x01 --Enable Wlan interface 108*4f4cfa6cSMauro Carvalho Chehab hcitool cmd 0x3f 0x5b 0xf5 0x01 0x02 --Enable BT interface 109*4f4cfa6cSMauro Carvalho Chehab hcitool cmd 0x3f 0x5b 0xf5 0x00 0x00 --Disable All interface 110*4f4cfa6cSMauro Carvalho Chehab hcitool cmd 0x3f 0x5b 0xf5 0x00 0x01 --Disable Wlan interface 111*4f4cfa6cSMauro Carvalho Chehab hcitool cmd 0x3f 0x5b 0xf5 0x00 0x02 --Disable BT interface 112*4f4cfa6cSMauro Carvalho Chehab 113*4f4cfa6cSMauro Carvalho ChehabSD8688 firmware 114*4f4cfa6cSMauro Carvalho Chehab=============== 115*4f4cfa6cSMauro Carvalho Chehab 116*4f4cfa6cSMauro Carvalho ChehabImages: 117*4f4cfa6cSMauro Carvalho Chehab 118*4f4cfa6cSMauro Carvalho Chehab- /lib/firmware/sd8688_helper.bin 119*4f4cfa6cSMauro Carvalho Chehab- /lib/firmware/sd8688.bin 120*4f4cfa6cSMauro Carvalho Chehab 121*4f4cfa6cSMauro Carvalho Chehab 122*4f4cfa6cSMauro Carvalho ChehabThe images can be downloaded from: 123*4f4cfa6cSMauro Carvalho Chehab 124*4f4cfa6cSMauro Carvalho Chehabgit.infradead.org/users/dwmw2/linux-firmware.git/libertas/ 125