1*fbb35286SLarry Finger /* SPDX-License-Identifier: GPL-2.0 */ 2*fbb35286SLarry Finger /* Copyright(c) 2009-2013 Realtek Corporation.*/ 3f1d2b4d3SLarry Finger 4f1d2b4d3SLarry Finger #ifndef __RTL8723E_PWRSEQ_H__ 5f1d2b4d3SLarry Finger #define __RTL8723E_PWRSEQ_H__ 6f1d2b4d3SLarry Finger 7f1d2b4d3SLarry Finger #include "../pwrseqcmd.h" 8f1d2b4d3SLarry Finger /* Check document WM-20110607-Paul-RTL8188EE_Power_Architecture-R02.vsd 9f1d2b4d3SLarry Finger * There are 6 HW Power States: 10f1d2b4d3SLarry Finger * 0: POFF--Power Off 11f1d2b4d3SLarry Finger * 1: PDN--Power Down 12f1d2b4d3SLarry Finger * 2: CARDEMU--Card Emulation 13f1d2b4d3SLarry Finger * 3: ACT--Active Mode 14f1d2b4d3SLarry Finger * 4: LPS--Low Power State 15f1d2b4d3SLarry Finger * 5: SUS--Suspend 16f1d2b4d3SLarry Finger * 17f1d2b4d3SLarry Finger * The transision from different states are defined below 18f1d2b4d3SLarry Finger * TRANS_CARDEMU_TO_ACT 19f1d2b4d3SLarry Finger * TRANS_ACT_TO_CARDEMU 20f1d2b4d3SLarry Finger * TRANS_CARDEMU_TO_SUS 21f1d2b4d3SLarry Finger * TRANS_SUS_TO_CARDEMU 22f1d2b4d3SLarry Finger * TRANS_CARDEMU_TO_PDN 23f1d2b4d3SLarry Finger * TRANS_ACT_TO_LPS 24f1d2b4d3SLarry Finger * TRANS_LPS_TO_ACT 25f1d2b4d3SLarry Finger * 26f1d2b4d3SLarry Finger * TRANS_END 27f1d2b4d3SLarry Finger * PWR SEQ Version: rtl8188ee_PwrSeq_V09.h 28f1d2b4d3SLarry Finger */ 29f1d2b4d3SLarry Finger 30f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDEMU_TO_ACT_STEPS 10 31f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_ACT_TO_CARDEMU_STEPS 10 32f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDEMU_TO_SUS_STEPS 10 33f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_SUS_TO_CARDEMU_STEPS 10 34f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDEMU_TO_PDN_STEPS 10 35f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_PDN_TO_CARDEMU_STEPS 10 36f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_ACT_TO_LPS_STEPS 15 37f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_LPS_TO_ACT_STEPS 15 38f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_END_STEPS 1 39f1d2b4d3SLarry Finger 40f1d2b4d3SLarry Finger /* The following macros have the following format: 41f1d2b4d3SLarry Finger * { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value 42f1d2b4d3SLarry Finger * comments }, 43f1d2b4d3SLarry Finger */ 44f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDEMU_TO_ACT \ 45f1d2b4d3SLarry Finger {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 46f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT(1), BIT(1) \ 47f1d2b4d3SLarry Finger /* wait till 0x04[17] = 1 power ready*/}, \ 48f1d2b4d3SLarry Finger {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 49f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0)|BIT(1), 0 \ 50f1d2b4d3SLarry Finger /* 0x02[1:0] = 0 reset BB*/}, \ 51f1d2b4d3SLarry Finger {0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 52f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(7), BIT(7) \ 53f1d2b4d3SLarry Finger /*0x24[23] = 2b'01 schmit trigger */}, \ 54f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 55f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(7), 0 \ 56f1d2b4d3SLarry Finger /* 0x04[15] = 0 disable HWPDN (control by DRV)*/}, \ 57f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 58f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4)|BIT(3), 0 \ 59f1d2b4d3SLarry Finger /*0x04[12:11] = 2b'00 disable WL suspend*/}, \ 60f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 61f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), BIT(0) \ 62f1d2b4d3SLarry Finger /*0x04[8] = 1 polling until return 0*/}, \ 63f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 64f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT(0), 0 \ 65f1d2b4d3SLarry Finger /*wait till 0x04[8] = 0*/}, \ 66f1d2b4d3SLarry Finger {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 67f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), 0 \ 68f1d2b4d3SLarry Finger /*LDO normal mode*/}, \ 69f1d2b4d3SLarry Finger {0x0074, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 70f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), BIT(4) \ 71f1d2b4d3SLarry Finger /*SDIO Driving*/}, 72f1d2b4d3SLarry Finger 73f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_ACT_TO_CARDEMU \ 74f1d2b4d3SLarry Finger {0x001F, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 75f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \ 76f1d2b4d3SLarry Finger /*0x1F[7:0] = 0 turn off RF*/}, \ 77f1d2b4d3SLarry Finger {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 78f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), BIT(4) \ 79f1d2b4d3SLarry Finger /*LDO Sleep mode*/}, \ 80f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 81f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(1), BIT(1) \ 82f1d2b4d3SLarry Finger /*0x04[9] = 1 turn off MAC by HW state machine*/}, \ 83f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 84f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT(1), 0 \ 85f1d2b4d3SLarry Finger /*wait till 0x04[9] = 0 polling until return 0 to disable*/}, 86f1d2b4d3SLarry Finger 87f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDEMU_TO_SUS \ 88f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ 89f1d2b4d3SLarry Finger PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, \ 90f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(3)|BIT(4), BIT(3) \ 91f1d2b4d3SLarry Finger /*0x04[12:11] = 2b'01enable WL suspend*/}, \ 92f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, \ 93f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(3)|BIT(4), BIT(3)|BIT(4) \ 94f1d2b4d3SLarry Finger /*0x04[12:11] = 2b'11enable WL suspend for PCIe*/}, \ 95f1d2b4d3SLarry Finger {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ 96f1d2b4d3SLarry Finger PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, \ 97f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, BIT(7) \ 98f1d2b4d3SLarry Finger /* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */},\ 99f1d2b4d3SLarry Finger {0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ 100f1d2b4d3SLarry Finger PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, \ 101f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), 0 \ 102f1d2b4d3SLarry Finger /*Clear SIC_EN register 0x40[12] = 1'b0 */}, \ 103f1d2b4d3SLarry Finger {0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ 104f1d2b4d3SLarry Finger PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, \ 105f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), BIT(4) \ 106f1d2b4d3SLarry Finger /*Set USB suspend enable local register 0xfe10[4]=1 */}, \ 107f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 108f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT(0), BIT(0) \ 109f1d2b4d3SLarry Finger /*Set SDIO suspend local register*/}, \ 110f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 111f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT(1), 0 \ 112f1d2b4d3SLarry Finger /*wait power state to suspend*/}, 113f1d2b4d3SLarry Finger 114f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_SUS_TO_CARDEMU \ 115f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 116f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT(0), 0 \ 117f1d2b4d3SLarry Finger /*Set SDIO suspend local register*/}, \ 118f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 119f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT(1), BIT(1) \ 120f1d2b4d3SLarry Finger /*wait power state to suspend*/}, \ 121f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 122f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(3) | BIT(4), 0 \ 123692f5decSKevin Lo /*0x04[12:11] = 2b'00 disable WL suspend*/}, 124f1d2b4d3SLarry Finger 125f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDEMU_TO_CARDDIS \ 126f1d2b4d3SLarry Finger {0x0026, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 127f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(7), BIT(7) \ 128f1d2b4d3SLarry Finger /*0x24[23] = 2b'01 schmit trigger */}, \ 129f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ 130f1d2b4d3SLarry Finger PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, \ 131f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(3) | BIT(4), BIT(3) \ 132f1d2b4d3SLarry Finger /*0x04[12:11] = 2b'01 enable WL suspend*/}, \ 133f1d2b4d3SLarry Finger {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ 134f1d2b4d3SLarry Finger PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, \ 135f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \ 136f1d2b4d3SLarry Finger /* 0x04[31:30] = 2b'10 enable enable bandgap mbias in suspend */},\ 137f1d2b4d3SLarry Finger {0x0041, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \ 138f1d2b4d3SLarry Finger PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, \ 139f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), 0 \ 140f1d2b4d3SLarry Finger /*Clear SIC_EN register 0x40[12] = 1'b0 */}, \ 141f1d2b4d3SLarry Finger {0xfe10, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, \ 142f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), BIT(4) \ 143f1d2b4d3SLarry Finger /*Set USB suspend enable local register 0xfe10[4]=1 */}, \ 144f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 145f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT(0), BIT(0) \ 146f1d2b4d3SLarry Finger /*Set SDIO suspend local register*/}, \ 147f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 148f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT(1), 0 \ 149f1d2b4d3SLarry Finger /*wait power state to suspend*/}, 150f1d2b4d3SLarry Finger 151f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDDIS_TO_CARDEMU \ 152f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 153f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT(0), 0 \ 154f1d2b4d3SLarry Finger /*Set SDIO suspend local register*/}, \ 155f1d2b4d3SLarry Finger {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 156f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT(1), BIT(1) \ 157f1d2b4d3SLarry Finger /*wait power state to suspend*/}, \ 158f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 159f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(3)|BIT(4), 0 \ 160692f5decSKevin Lo /*0x04[12:11] = 2b'00 disable WL suspend*/}, 161f1d2b4d3SLarry Finger 162f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_CARDEMU_TO_PDN \ 163f1d2b4d3SLarry Finger {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 164f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), 0/* 0x04[16] = 0*/}, \ 165f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 166f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(7), BIT(7) \ 167f1d2b4d3SLarry Finger /* 0x04[15] = 1*/}, 168f1d2b4d3SLarry Finger 169f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_PDN_TO_CARDEMU \ 170f1d2b4d3SLarry Finger {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 171f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(7), 0/* 0x04[15] = 0*/}, 172f1d2b4d3SLarry Finger 173f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_ACT_TO_LPS \ 174f1d2b4d3SLarry Finger {0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 175f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x7F \ 176f1d2b4d3SLarry Finger /*Tx Pause*/}, \ 177f1d2b4d3SLarry Finger {0x05F8, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 178f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \ 179f1d2b4d3SLarry Finger /*Should be zero if no packet is transmitting*/}, \ 180f1d2b4d3SLarry Finger {0x05F9, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 181f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \ 182f1d2b4d3SLarry Finger /*Should be zero if no packet is transmitting*/}, \ 183f1d2b4d3SLarry Finger {0x05FA, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 184f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \ 185f1d2b4d3SLarry Finger /*Should be zero if no packet is transmitting*/}, \ 186f1d2b4d3SLarry Finger {0x05FB, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 187f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \ 188f1d2b4d3SLarry Finger /*Should be zero if no packet is transmitting*/}, \ 189f1d2b4d3SLarry Finger {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 190f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(0), 0 \ 191f1d2b4d3SLarry Finger /*CCK and OFDM are disabled,and clock are gated*/}, \ 192f1d2b4d3SLarry Finger {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 193f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_US \ 194f1d2b4d3SLarry Finger /*Delay 1us*/}, \ 195f1d2b4d3SLarry Finger {0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 196f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x3F \ 197f1d2b4d3SLarry Finger /*Reset MAC TRX*/}, \ 198f1d2b4d3SLarry Finger {0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 199f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(1), 0 \ 200f1d2b4d3SLarry Finger /*check if removed later*/}, \ 201f1d2b4d3SLarry Finger {0x0553, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 202f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(5), BIT(5) \ 203f1d2b4d3SLarry Finger /*Respond TxOK to scheduler*/}, 204f1d2b4d3SLarry Finger 205f1d2b4d3SLarry Finger 206f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_LPS_TO_ACT \ 207f1d2b4d3SLarry Finger {0x0080, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, \ 208f1d2b4d3SLarry Finger PWR_BASEADDR_SDIO, PWR_CMD_WRITE, 0xFF, 0x84 \ 209f1d2b4d3SLarry Finger /*SDIO RPWM*/}, \ 210f1d2b4d3SLarry Finger {0xFE58, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, \ 211f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84 \ 212f1d2b4d3SLarry Finger /*USB RPWM*/}, \ 213f1d2b4d3SLarry Finger {0x0361, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, \ 214f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84 \ 215f1d2b4d3SLarry Finger /*PCIe RPWM*/}, \ 216f1d2b4d3SLarry Finger {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 217f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_MS \ 218f1d2b4d3SLarry Finger /*Delay*/}, \ 219f1d2b4d3SLarry Finger {0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 220f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(4), 0 \ 221f1d2b4d3SLarry Finger /*. 0x08[4] = 0 switch TSF to 40M*/}, \ 222f1d2b4d3SLarry Finger {0x0109, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 223f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT(7), 0 \ 224f1d2b4d3SLarry Finger /*Polling 0x109[7]=0 TSF in 40M*/}, \ 225f1d2b4d3SLarry Finger {0x0029, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 226f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(6)|BIT(7), 0 \ 227f1d2b4d3SLarry Finger /*. 0x29[7:6] = 2b'00 enable BB clock*/}, \ 228f1d2b4d3SLarry Finger {0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 229f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(1), BIT(1) \ 230f1d2b4d3SLarry Finger /*. 0x101[1] = 1*/}, \ 231f1d2b4d3SLarry Finger {0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 232f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF \ 233f1d2b4d3SLarry Finger /*. 0x100[7:0] = 0xFF enable WMAC TRX*/}, \ 234f1d2b4d3SLarry Finger {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 235f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT(1)|BIT(0), BIT(1)|BIT(0) \ 236f1d2b4d3SLarry Finger /*. 0x02[1:0] = 2b'11 enable BB macro*/}, \ 237f1d2b4d3SLarry Finger {0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \ 238f1d2b4d3SLarry Finger PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \ 239f1d2b4d3SLarry Finger /*. 0x522 = 0*/}, 240f1d2b4d3SLarry Finger 241f1d2b4d3SLarry Finger #define RTL8188EE_TRANS_END \ 242f1d2b4d3SLarry Finger {0xFFFF, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\ 243f1d2b4d3SLarry Finger 0, PWR_CMD_END, 0, 0} 244f1d2b4d3SLarry Finger 245f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_power_on_flow 246f1d2b4d3SLarry Finger [RTL8188EE_TRANS_CARDEMU_TO_ACT_STEPS + 247f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 248f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_radio_off_flow 249f1d2b4d3SLarry Finger [RTL8188EE_TRANS_ACT_TO_CARDEMU_STEPS + 250f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 251f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_card_disable_flow 252f1d2b4d3SLarry Finger [RTL8188EE_TRANS_ACT_TO_CARDEMU_STEPS + 253f1d2b4d3SLarry Finger RTL8188EE_TRANS_CARDEMU_TO_PDN_STEPS + 254f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 255f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_card_enable_flow 256f1d2b4d3SLarry Finger [RTL8188EE_TRANS_ACT_TO_CARDEMU_STEPS + 257f1d2b4d3SLarry Finger RTL8188EE_TRANS_CARDEMU_TO_PDN_STEPS + 258f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 259f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_suspend_flow 260f1d2b4d3SLarry Finger [RTL8188EE_TRANS_ACT_TO_CARDEMU_STEPS + 261f1d2b4d3SLarry Finger RTL8188EE_TRANS_CARDEMU_TO_SUS_STEPS + 262f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 263f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_resume_flow 264f1d2b4d3SLarry Finger [RTL8188EE_TRANS_ACT_TO_CARDEMU_STEPS + 265f1d2b4d3SLarry Finger RTL8188EE_TRANS_CARDEMU_TO_SUS_STEPS + 266f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 267f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_hwpdn_flow 268f1d2b4d3SLarry Finger [RTL8188EE_TRANS_ACT_TO_CARDEMU_STEPS + 269f1d2b4d3SLarry Finger RTL8188EE_TRANS_CARDEMU_TO_PDN_STEPS + 270f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 271f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_enter_lps_flow 272f1d2b4d3SLarry Finger [RTL8188EE_TRANS_ACT_TO_LPS_STEPS + 273f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 274f1d2b4d3SLarry Finger extern struct wlan_pwr_cfg rtl8188ee_leave_lps_flow 275f1d2b4d3SLarry Finger [RTL8188EE_TRANS_LPS_TO_ACT_STEPS + 276f1d2b4d3SLarry Finger RTL8188EE_TRANS_END_STEPS]; 277f1d2b4d3SLarry Finger 278f1d2b4d3SLarry Finger /* RTL8723 Power Configuration CMDs for PCIe interface */ 279f1d2b4d3SLarry Finger #define RTL8188EE_NIC_PWR_ON_FLOW rtl8188ee_power_on_flow 280f1d2b4d3SLarry Finger #define RTL8188EE_NIC_RF_OFF_FLOW rtl8188ee_radio_off_flow 281f1d2b4d3SLarry Finger #define RTL8188EE_NIC_DISABLE_FLOW rtl8188ee_card_disable_flow 282f1d2b4d3SLarry Finger #define RTL8188EE_NIC_ENABLE_FLOW rtl8188ee_card_enable_flow 283f1d2b4d3SLarry Finger #define RTL8188EE_NIC_SUSPEND_FLOW rtl8188ee_suspend_flow 284f1d2b4d3SLarry Finger #define RTL8188EE_NIC_RESUME_FLOW rtl8188ee_resume_flow 285f1d2b4d3SLarry Finger #define RTL8188EE_NIC_PDN_FLOW rtl8188ee_hwpdn_flow 286f1d2b4d3SLarry Finger #define RTL8188EE_NIC_LPS_ENTER_FLOW rtl8188ee_enter_lps_flow 287f1d2b4d3SLarry Finger #define RTL8188EE_NIC_LPS_LEAVE_FLOW rtl8188ee_leave_lps_flow 288f1d2b4d3SLarry Finger 289f1d2b4d3SLarry Finger #endif 290