162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci/* Copyright(c) 2009-2010  Realtek Corporation.*/
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#include "../pwrseqcmd.h"
562306a36Sopenharmony_ci#include "pwrseq.h"
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/* drivers should parse below arrays and do the corresponding actions */
862306a36Sopenharmony_ci/* 3 Power on  Array */
962306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_power_on_flow[RTL8812_TRANS_CARDEMU_TO_ACT_STEPS +
1062306a36Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
1162306a36Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_ACT
1262306a36Sopenharmony_ci	RTL8812_TRANS_END
1362306a36Sopenharmony_ci};
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci/* 3Radio off GPIO Array */
1662306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_radio_off_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
1762306a36Sopenharmony_ci						RTL8812_TRANS_END_STEPS] = {
1862306a36Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
1962306a36Sopenharmony_ci	RTL8812_TRANS_END
2062306a36Sopenharmony_ci};
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci/* 3Card Disable Array */
2362306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_card_disable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS
2462306a36Sopenharmony_ci	+ RTL8812_TRANS_CARDEMU_TO_PDN_STEPS
2562306a36Sopenharmony_ci	+ RTL8812_TRANS_END_STEPS] = {
2662306a36Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
2762306a36Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_CARDDIS
2862306a36Sopenharmony_ci	RTL8812_TRANS_END
2962306a36Sopenharmony_ci};
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci/* 3 Card Enable Array */
3262306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_card_enable_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS
3362306a36Sopenharmony_ci	+ RTL8812_TRANS_CARDEMU_TO_PDN_STEPS
3462306a36Sopenharmony_ci	+ RTL8812_TRANS_END_STEPS] = {
3562306a36Sopenharmony_ci	RTL8812_TRANS_CARDDIS_TO_CARDEMU
3662306a36Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_ACT
3762306a36Sopenharmony_ci	RTL8812_TRANS_END
3862306a36Sopenharmony_ci};
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci/* 3Suspend Array */
4162306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_suspend_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
4262306a36Sopenharmony_ci					RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
4362306a36Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
4462306a36Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
4562306a36Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_SUS
4662306a36Sopenharmony_ci	RTL8812_TRANS_END
4762306a36Sopenharmony_ci};
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci/* 3 Resume Array */
5062306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_resume_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
5162306a36Sopenharmony_ci					RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
5262306a36Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
5362306a36Sopenharmony_ci	RTL8812_TRANS_SUS_TO_CARDEMU
5462306a36Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_ACT
5562306a36Sopenharmony_ci	RTL8812_TRANS_END
5662306a36Sopenharmony_ci};
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci/* 3HWPDN Array */
5962306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_hwpdn_flow[RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
6062306a36Sopenharmony_ci					RTL8812_TRANS_CARDEMU_TO_PDN_STEPS +
6162306a36Sopenharmony_ci					RTL8812_TRANS_END_STEPS] = {
6262306a36Sopenharmony_ci	RTL8812_TRANS_ACT_TO_CARDEMU
6362306a36Sopenharmony_ci	RTL8812_TRANS_CARDEMU_TO_PDN
6462306a36Sopenharmony_ci	RTL8812_TRANS_END
6562306a36Sopenharmony_ci};
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci/* 3 Enter LPS */
6862306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_enter_lps_flow[RTL8812_TRANS_ACT_TO_LPS_STEPS +
6962306a36Sopenharmony_ci						RTL8812_TRANS_END_STEPS] = {
7062306a36Sopenharmony_ci	/* FW behavior */
7162306a36Sopenharmony_ci	RTL8812_TRANS_ACT_TO_LPS
7262306a36Sopenharmony_ci	RTL8812_TRANS_END
7362306a36Sopenharmony_ci};
7462306a36Sopenharmony_ci
7562306a36Sopenharmony_ci/* 3 Leave LPS */
7662306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8812_leave_lps_flow[RTL8812_TRANS_LPS_TO_ACT_STEPS +
7762306a36Sopenharmony_ci						RTL8812_TRANS_END_STEPS] = {
7862306a36Sopenharmony_ci	/* FW behavior */
7962306a36Sopenharmony_ci	RTL8812_TRANS_LPS_TO_ACT
8062306a36Sopenharmony_ci	RTL8812_TRANS_END
8162306a36Sopenharmony_ci};
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ci/* drivers should parse below arrays and do the corresponding actions */
8462306a36Sopenharmony_ci/*3 Power on  Array*/
8562306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_power_on_flow[RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS
8662306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
8762306a36Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_ACT
8862306a36Sopenharmony_ci	RTL8821A_TRANS_END
8962306a36Sopenharmony_ci};
9062306a36Sopenharmony_ci
9162306a36Sopenharmony_ci/*3Radio off GPIO Array */
9262306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_radio_off_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
9362306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
9462306a36Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
9562306a36Sopenharmony_ci	RTL8821A_TRANS_END
9662306a36Sopenharmony_ci};
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci/*3Card Disable Array*/
9962306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_card_disable_flow
10062306a36Sopenharmony_ci					[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
10162306a36Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS
10262306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
10362306a36Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
10462306a36Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_CARDDIS
10562306a36Sopenharmony_ci	RTL8821A_TRANS_END
10662306a36Sopenharmony_ci};
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ci/*3 Card Enable Array*/
10962306a36Sopenharmony_ci/*RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS*/
11062306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_card_enable_flow
11162306a36Sopenharmony_ci					[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
11262306a36Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS
11362306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
11462306a36Sopenharmony_ci	RTL8821A_TRANS_CARDDIS_TO_CARDEMU
11562306a36Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_ACT
11662306a36Sopenharmony_ci	RTL8821A_TRANS_END
11762306a36Sopenharmony_ci};
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci/*3Suspend Array*/
12062306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_suspend_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
12162306a36Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS
12262306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
12362306a36Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
12462306a36Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_SUS
12562306a36Sopenharmony_ci	RTL8821A_TRANS_END
12662306a36Sopenharmony_ci};
12762306a36Sopenharmony_ci
12862306a36Sopenharmony_ci/*3 Resume Array*/
12962306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_resume_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
13062306a36Sopenharmony_ci					+ RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS
13162306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
13262306a36Sopenharmony_ci	RTL8821A_TRANS_SUS_TO_CARDEMU
13362306a36Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_ACT
13462306a36Sopenharmony_ci	RTL8821A_TRANS_END
13562306a36Sopenharmony_ci};
13662306a36Sopenharmony_ci
13762306a36Sopenharmony_ci/*3HWPDN Array*/
13862306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_hwpdn_flow[RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS
13962306a36Sopenharmony_ci				+ RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS
14062306a36Sopenharmony_ci				+ RTL8821A_TRANS_END_STEPS] = {
14162306a36Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_CARDEMU
14262306a36Sopenharmony_ci	RTL8821A_TRANS_CARDEMU_TO_PDN
14362306a36Sopenharmony_ci	RTL8821A_TRANS_END
14462306a36Sopenharmony_ci};
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci/*3 Enter LPS */
14762306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_enter_lps_flow[RTL8821A_TRANS_ACT_TO_LPS_STEPS
14862306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
14962306a36Sopenharmony_ci	/*FW behavior*/
15062306a36Sopenharmony_ci	RTL8821A_TRANS_ACT_TO_LPS
15162306a36Sopenharmony_ci	RTL8821A_TRANS_END
15262306a36Sopenharmony_ci};
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci/*3 Leave LPS */
15562306a36Sopenharmony_cistruct wlan_pwr_cfg rtl8821A_leave_lps_flow[RTL8821A_TRANS_LPS_TO_ACT_STEPS
15662306a36Sopenharmony_ci					+ RTL8821A_TRANS_END_STEPS] = {
15762306a36Sopenharmony_ci	/*FW behavior*/
15862306a36Sopenharmony_ci	RTL8821A_TRANS_LPS_TO_ACT
15962306a36Sopenharmony_ci	RTL8821A_TRANS_END
16062306a36Sopenharmony_ci};
161