Search Linux Wireless

[RFC v1 085/256] cl8k: add fem_common.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Viktor Barna <viktor.barna@xxxxxxxxxx>

(Part of the split. Please, take a look at the cover letter for more
details).

Signed-off-by: Viktor Barna <viktor.barna@xxxxxxxxxx>
---
 drivers/net/wireless/celeno/cl8k/fem_common.h | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)
 create mode 100644 drivers/net/wireless/celeno/cl8k/fem_common.h

diff --git a/drivers/net/wireless/celeno/cl8k/fem_common.h b/drivers/net/wireless/celeno/cl8k/fem_common.h
new file mode 100644
index 000000000000..9c0d165fb6b8
--- /dev/null
+++ b/drivers/net/wireless/celeno/cl8k/fem_common.h
@@ -0,0 +1,79 @@
+/* SPDX-License-Identifier: MIT */
+/* Copyright(c) 2019-2021, Celeno Communications Ltd. */
+
+#ifndef CL_FEM_COMMON_H
+#define CL_FEM_COMMON_H
+
+#define FEM_LUTS_PER_REGISTER  2
+#define FEM_LUT_AMOUNT_PER_MAC 6
+#define FEM_REGISTERS_AMOUNT   (FEM_LUT_AMOUNT_PER_MAC / FEM_LUTS_PER_REGISTER)
+
+/* Also needed for iw (e2p.c) in utils, so needed to be separated from the other definitions. */
+enum fem_wiring_id {
+       /* TCV0 - 6 FEMs 3 wires, TCV1 - 6 FEMs 2 wires */
+       FEM_WIRING_0_TCV0_6_TCV1_6           = 0,
+       /* TCV0 - 6 FEMs 2 wires, TCV1 - 6 FEMs 2 wires */
+       FEM_WIRING_1_TCV0_6_TCV1_6           = 1,
+       /* TCV0 - 6 FEMs 2 wires, TCV1 - 6 FEMs 3 wires */
+       FEM_WIRING_2_TCV0_6_TCV1_6           = 2,
+       /* TCV0 - 2 FEMs 3 wires, Elastic - 4 FEMs 3 wires, TCV1 - 2 FEMs 2 wires */
+       FEM_WIRING_3_TCV0_2_ELASTIC_4_TCV1_2 = 3,
+       /* TCV0 - 2 FEMs 2 wires, Elastic - 4 FEMs 3 wires, TCV1 - 2 FEMs 2 wires */
+       FEM_WIRING_4_TCV0_2_ELASTIC_4_TCV1_2 = 4,
+       /* TCV0 - 2 FEMs 3 wires, Elastic - 4 FEMs 3 wires, TCV1 - 2 FEMs 3 wires */
+       FEM_WIRING_5_TCV0_2_ELASTIC_4_TCV1_2 = 5,
+       /* TCV0 - 2 FEMs 2 wires, Elastic - 4 FEMs 3 wires, TCV1 - 2 FEMs 3 wires */
+       FEM_WIRING_6_TCV0_2_ELASTIC_4_TCV1_2 = 6,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 4 FEMs 2 wires */
+       FEM_WIRING_7_TCV0_4_TCV1_4           = 7,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 4 FEMs 3 wires */
+       FEM_WIRING_8_TCV0_4_TCV1_4           = 8,
+       /* TCV0 - 4 FEMs 2 wires, TCV1 - 4 FEMs 2 wires */
+       FEM_WIRING_9_TCV0_4_TCV1_4           = 9,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 4 FEMs 3 wires */
+       FEM_WIRING_10_TCV0_4_TCV1_4          = 10,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 4 LNAs (RX only) */
+       FEM_WIRING_11_TCV0_4_TCV1_4_RX_ONLY  = 11,
+       /* TCV0 - 4 FEMs 2 wires, TCV1 - 4 LNAs (RX only) */
+       FEM_WIRING_12_TCV0_4_TCV1_4_RX_ONLY  = 12,
+       /* TCV0 - 6 FEMs 3 wires, TCV1 - 6 FEMs 2 wires (not active), 2 LNAs 1 wire (not active) */
+       FEM_WIRING_13_SENSING_4RX_2TX        = 13,
+       /* TCV0 - 6 FEMs 3 wires (4 active), TCV1 - 6 FEMs 2 wires (not active), 2 LNAs 1 wire */
+       FEM_WIRING_14_SENSING_4TX_2RX        = 14,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 4 FEMs (RX only) */
+       FEM_WIRING_15_CHAMELEON_4TX_4RX      = 15,
+       /* TCV0 - 2 FEMs 3 wires, TCV1 - 2 FEMs 2 wires (CL8040) */
+       FEM_WIRING_16_TCV0_2_TCV1_2          = 16,
+       /* TCV0 - 4 FEMs 2 wires, TCV1 - 0 FEMs (CL8046) */
+       FEM_WIRING_17_TCV0_4_TCV1_0          = 17,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 4 FEMs 3 wires */
+       FEM_WIRING_18_TCV0_4_TCV1_4          = 18,
+       /* TCV0 - 2 FEMs 3 wires, TCV1 - 2 FEMs 3 wires (EVB swapped) */
+       FEM_WIRING_19_TCV0_2_TCV1_2_SWAPPED  = 19,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 2 FEMs 2 wires (CL8060 4+2) */
+       FEM_WIRING_20_TCV0_4_TCV1_2          = 20,
+       /* TCV0 - 4 FEMs 3 wires, TCV1 - 2 LNAs (RX only) (CL8066 4+2) */
+       FEM_WIRING_21_TCV0_4_TCV1_2          = 21,
+
+       FEM_WIRING_MAX,
+       FEM_WIRING_DEFAULT = 255
+};
+
+enum fem_type {
+       FEM_TYPE_TCV0    = 0,
+       FEM_TYPE_TCV1    = 1,
+       FEM_TYPE_ELASTIC = 2,
+       FEM_TYPE_SENSING = 3,
+
+       FEM_TYPE_MAX,
+};
+
+#define FEM_LUT_EMPTY 0x0
+
+#define FEM_TYPE_STR(type) \
+       ((type == FEM_TYPE_TCV0) ? "TCV0" : \
+       ((type == FEM_TYPE_TCV1) ? "TCV1" : \
+       ((type == FEM_TYPE_ELASTIC) ? "ELASTIC" : \
+       ((type == FEM_TYPE_SENSING) ? "SENSING" : "ERROR"))))
+
+#endif /* CL_FEM_COMMON_H */
--
2.30.0

________________________________
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose.
________________________________






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux