hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/net/wireless/mediatek/mt76/mt76x0/phy.h
....@@ -1,21 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * (c) Copyright 2002-2010, Ralink Technology, Inc.
34 * Copyright (C) 2018 Stanislaw Gruszka <stf_xl@wp.pl>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2
7
- * as published by the Free Software Foundation
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
135 */
146 #ifndef _MT76X0_PHY_H_
157 #define _MT76X0_PHY_H_
168
17
-#define RF_G_BAND 0x0100
18
-#define RF_A_BAND 0x0200
9
+#define RF_G_BAND 0x0100
10
+#define RF_A_BAND 0x0200
1911 #define RF_A_BAND_LB 0x0400
2012 #define RF_A_BAND_MB 0x0800
2113 #define RF_A_BAND_HB 0x1000
....@@ -26,9 +18,26 @@
2618 #define RF_BW_10 4
2719 #define RF_BW_80 8
2820
29
-#define MT_RF(bank, reg) ((bank) << 16 | (reg))
30
-#define MT_RF_BANK(offset) (offset >> 16)
31
-#define MT_RF_REG(offset) (offset & 0xff)
21
+#define MT_RF(bank, reg) ((bank) << 16 | (reg))
22
+#define MT_RF_BANK(offset) ((offset) >> 16)
23
+#define MT_RF_REG(offset) ((offset) & 0xff)
24
+
25
+#define MT_RF_VCO_BP_CLOSE_LOOP BIT(3)
26
+#define MT_RF_VCO_BP_CLOSE_LOOP_MASK GENMASK(3, 0)
27
+#define MT_RF_VCO_CAL_MASK GENMASK(2, 0)
28
+#define MT_RF_START_TIME 0x3
29
+#define MT_RF_START_TIME_MASK GENMASK(2, 0)
30
+#define MT_RF_SETTLE_TIME_MASK GENMASK(6, 4)
31
+
32
+#define MT_RF_PLL_DEN_MASK GENMASK(4, 0)
33
+#define MT_RF_PLL_K_MASK GENMASK(4, 0)
34
+#define MT_RF_SDM_RESET_MASK BIT(7)
35
+#define MT_RF_SDM_MASH_PRBS_MASK GENMASK(6, 2)
36
+#define MT_RF_SDM_BP_MASK BIT(1)
37
+#define MT_RF_ISI_ISO_MASK GENMASK(7, 6)
38
+#define MT_RF_PFD_DLY_MASK GENMASK(5, 4)
39
+#define MT_RF_CLK_SEL_MASK GENMASK(3, 2)
40
+#define MT_RF_XO_DIV_MASK GENMASK(1, 0)
3241
3342 struct mt76x0_bbp_switch_item {
3443 u16 bw_band;