18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci/* Copyright(c) 2009-2010  Realtek Corporation.*/
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci#include "../pwrseqcmd.h"
58c2ecf20Sopenharmony_ci#include "pwrseq.h"
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci/* drivers should parse below arrays and do the corresponding actions */
88c2ecf20Sopenharmony_ci/* 3 Power on  Array */
98c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_power_on_flow[RTL8812_TRANS_CARDEMU_TO_ACT_STEPS +
108c2ecf20Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
118c2ecf20Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_ACT
128c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
138c2ecf20Sopenharmony_ci};
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci/* 3Radio off GPIO Array */
168c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_radio_off_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
178c2ecf20Sopenharmony_ci						RTL8812_TRANS_END_STEPS] = {
188c2ecf20Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
198c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
208c2ecf20Sopenharmony_ci};
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/* 3Card Disable Array */
238c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_card_disable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS
248c2ecf20Sopenharmony_ci	+ RTL8812_TRANS_CARDEMU_TO_PDN_STEPS
258c2ecf20Sopenharmony_ci	+ RTL8812_TRANS_END_STEPS] = {
268c2ecf20Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
278c2ecf20Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_CARDDIS
288c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci/* 3 Card Enable Array */
328c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_card_enable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS
338c2ecf20Sopenharmony_ci	+ RTL8812_TRANS_CARDEMU_TO_PDN_STEPS
348c2ecf20Sopenharmony_ci	+ RTL8812_TRANS_END_STEPS] = {
358c2ecf20Sopenharmony_ci	RTL8812_TRANS_CARDDIS_TO_CARDEMU
368c2ecf20Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_ACT
378c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
388c2ecf20Sopenharmony_ci};
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci/* 3Suspend Array */
418c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_suspend_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
428c2ecf20Sopenharmony_ci					RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
438c2ecf20Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
448c2ecf20Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
458c2ecf20Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_SUS
468c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
478c2ecf20Sopenharmony_ci};
488c2ecf20Sopenharmony_ci
498c2ecf20Sopenharmony_ci/* 3 Resume Array */
508c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_resume_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
518c2ecf20Sopenharmony_ci					RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
528c2ecf20Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
538c2ecf20Sopenharmony_ci	RTL8812_TRANS_SUS_TO_CARDEMU
548c2ecf20Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_ACT
558c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
568c2ecf20Sopenharmony_ci};
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci/* 3HWPDN Array */
598c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_hwpdn_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
608c2ecf20Sopenharmony_ci					RTL8812_TRANS_CARDEMU_TO_PDN_STEPS +
618c2ecf20Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
628c2ecf20Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
638c2ecf20Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_PDN
648c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
658c2ecf20Sopenharmony_ci};
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci/* 3 Enter LPS */
688c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_enter_lps_flow[RTL8812_TRANS_ACT_TO_LPS_STEPS +
698c2ecf20Sopenharmony_ci						RTL8812_TRANS_END_STEPS] = {
708c2ecf20Sopenharmony_ci	/* FW behavior */
718c2ecf20Sopenharmony_ci	RTL8812_TRANS_ACT_TO_LPS
728c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
738c2ecf20Sopenharmony_ci};
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ci/* 3 Leave LPS */
768c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8812_leave_lps_flow[RTL8812_TRANS_LPS_TO_ACT_STEPS +
778c2ecf20Sopenharmony_ci						RTL8812_TRANS_END_STEPS] = {
788c2ecf20Sopenharmony_ci	/* FW behavior */
798c2ecf20Sopenharmony_ci	RTL8812_TRANS_LPS_TO_ACT
808c2ecf20Sopenharmony_ci	RTL8812_TRANS_END
818c2ecf20Sopenharmony_ci};
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci/* drivers should parse below arrays and do the corresponding actions */
848c2ecf20Sopenharmony_ci/*3 Power on  Array*/
858c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_power_on_flow[RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS
868c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
878c2ecf20Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_ACT
888c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
898c2ecf20Sopenharmony_ci};
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_ci/*3Radio off GPIO Array */
928c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_radio_off_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
938c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
948c2ecf20Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
958c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
968c2ecf20Sopenharmony_ci};
978c2ecf20Sopenharmony_ci
988c2ecf20Sopenharmony_ci/*3Card Disable Array*/
998c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_card_disable_flow
1008c2ecf20Sopenharmony_ci					[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
1018c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS
1028c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
1038c2ecf20Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
1048c2ecf20Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_CARDDIS
1058c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
1068c2ecf20Sopenharmony_ci};
1078c2ecf20Sopenharmony_ci
1088c2ecf20Sopenharmony_ci/*3 Card Enable Array*/
1098c2ecf20Sopenharmony_ci/*RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS*/
1108c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_card_enable_flow
1118c2ecf20Sopenharmony_ci					[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
1128c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS
1138c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
1148c2ecf20Sopenharmony_ci	RTL8821A_TRANS_CARDDIS_TO_CARDEMU
1158c2ecf20Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_ACT
1168c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
1178c2ecf20Sopenharmony_ci};
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci/*3Suspend Array*/
1208c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_suspend_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
1218c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS
1228c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
1238c2ecf20Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
1248c2ecf20Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_SUS
1258c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
1268c2ecf20Sopenharmony_ci};
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci/*3 Resume Array*/
1298c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_resume_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
1308c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS
1318c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
1328c2ecf20Sopenharmony_ci	RTL8821A_TRANS_SUS_TO_CARDEMU
1338c2ecf20Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_ACT
1348c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
1358c2ecf20Sopenharmony_ci};
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci/*3HWPDN Array*/
1388c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_hwpdn_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
1398c2ecf20Sopenharmony_ci				+ RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS
1408c2ecf20Sopenharmony_ci				+ RTL8821A_TRANS_END_STEPS] = {
1418c2ecf20Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
1428c2ecf20Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_PDN
1438c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
1448c2ecf20Sopenharmony_ci};
1458c2ecf20Sopenharmony_ci
1468c2ecf20Sopenharmony_ci/*3 Enter LPS */
1478c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_enter_lps_flow[RTL8821A_TRANS_ACT_TO_LPS_STEPS
1488c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
1498c2ecf20Sopenharmony_ci	/*FW behavior*/
1508c2ecf20Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_LPS
1518c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
1528c2ecf20Sopenharmony_ci};
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ci/*3 Leave LPS */
1558c2ecf20Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_leave_lps_flow[RTL8821A_TRANS_LPS_TO_ACT_STEPS
1568c2ecf20Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
1578c2ecf20Sopenharmony_ci	/*FW behavior*/
1588c2ecf20Sopenharmony_ci	RTL8821A_TRANS_LPS_TO_ACT
1598c2ecf20Sopenharmony_ci	RTL8821A_TRANS_END
1608c2ecf20Sopenharmony_ci};
161