xref: /openbmc/linux/drivers/staging/vt6655/rf.h (revision 1d17faf5)
103f4a7b6SGanesh Biradar /* SPDX-License-Identifier: GPL-2.0+ */
25449c685SForest Bond /*
35449c685SForest Bond  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
45449c685SForest Bond  * All rights reserved.
55449c685SForest Bond  *
65449c685SForest Bond  * Purpose:
75449c685SForest Bond  *
85449c685SForest Bond  * Author: Jerry Chen
95449c685SForest Bond  *
105449c685SForest Bond  * Date: Feb. 19, 2004
115449c685SForest Bond  *
125449c685SForest Bond  */
135449c685SForest Bond 
145449c685SForest Bond #ifndef __RF_H__
155449c685SForest Bond #define __RF_H__
165449c685SForest Bond 
175449c685SForest Bond #include "device.h"
18a7ad322aSJim Lieb 
195449c685SForest Bond /*---------------------  Export Definitions -------------------------*/
20353710ceSNicholas Parkanyi /*
21353710ceSNicholas Parkanyi  * Baseband RF pair definition in eeprom (Bits 6..0)
22353710ceSNicholas Parkanyi  */
235449c685SForest Bond #define RF_RFMD2959             0x01
245449c685SForest Bond #define RF_MAXIMAG              0x02
255449c685SForest Bond #define RF_AIROHA               0x03
265449c685SForest Bond 
275449c685SForest Bond #define RF_UW2451               0x05
285449c685SForest Bond #define RF_MAXIMG               0x06
29353710ceSNicholas Parkanyi #define RF_MAXIM2829            0x07 /* RobertYu: 20041118 */
30353710ceSNicholas Parkanyi #define RF_UW2452               0x08 /* RobertYu: 20041210 */
31353710ceSNicholas Parkanyi #define RF_AIROHA7230           0x0a /* RobertYu: 20050104 */
325449c685SForest Bond #define RF_UW2453               0x0b
335449c685SForest Bond 
345449c685SForest Bond #define RF_VT3226               0x09
355449c685SForest Bond #define RF_AL2230S              0x0e
365449c685SForest Bond 
375449c685SForest Bond #define RF_NOTHING              0x7E
385449c685SForest Bond #define RF_EMU                  0x80
395449c685SForest Bond #define RF_MASK                 0x7F
405449c685SForest Bond 
415449c685SForest Bond #define ZONE_FCC                0
425449c685SForest Bond #define ZONE_MKK1               1
435449c685SForest Bond #define ZONE_ETSI               2
445449c685SForest Bond #define ZONE_IC                 3
455449c685SForest Bond #define ZONE_SPAIN              4
465449c685SForest Bond #define ZONE_FRANCE             5
475449c685SForest Bond #define ZONE_MKK                6
485449c685SForest Bond #define ZONE_ISRAEL             7
495449c685SForest Bond 
50353710ceSNicholas Parkanyi /* [20050104] CB_MAXIM2829_CHANNEL_5G_HIGH, CB_UW2452_CHANNEL_5G_HIGH: 40==>41 */
51353710ceSNicholas Parkanyi #define CB_MAXIM2829_CHANNEL_5G_HIGH    41 /* Index41: channel = 100, Tf = 5500MHz, set the (A3:A0=0101) D6=1 */
52353710ceSNicholas Parkanyi #define CB_UW2452_CHANNEL_5G_HIGH       41 /* [20041210] Index41: channel = 100, Tf = 5500MHz, change VCO2->VCO3 */
535449c685SForest Bond 
545449c685SForest Bond /*---------------------  Export Classes  ----------------------------*/
555449c685SForest Bond 
565449c685SForest Bond /*---------------------  Export Variables  --------------------------*/
575449c685SForest Bond 
585449c685SForest Bond /*---------------------  Export Functions  --------------------------*/
595449c685SForest Bond 
6024c8bd8fSDerek Robson bool IFRFbWriteEmbedded(struct vnt_private *priv, unsigned long dwData);
6124c8bd8fSDerek Robson bool RFbSelectChannel(struct vnt_private *priv, unsigned char byRFType, u16 byChannel);
6231d0c9d9SFrank A. Cancio Bello bool RFbInit(struct vnt_private *priv);
63*1d17faf5SKarolina Drobnik bool rf_write_wake_prog_syn(struct vnt_private *priv, unsigned char rf_type, u16 channel);
6424c8bd8fSDerek Robson bool RFbSetPower(struct vnt_private *priv, unsigned int rate, u16 uCH);
6531d0c9d9SFrank A. Cancio Bello bool RFbRawSetPower(struct vnt_private *priv, unsigned char byPwr,
6631d0c9d9SFrank A. Cancio Bello 		    unsigned int rate);
675449c685SForest Bond 
6831d0c9d9SFrank A. Cancio Bello void RFvRSSITodBm(struct vnt_private *priv, unsigned char byCurrRSSI,
6931d0c9d9SFrank A. Cancio Bello 		  long *pldBm);
705449c685SForest Bond 
71353710ceSNicholas Parkanyi /* {{ RobertYu: 20050104 */
7224c8bd8fSDerek Robson bool RFbAL7230SelectChannelPostProcess(struct vnt_private *priv, u16 byOldChannel, u16 byNewChannel);
73353710ceSNicholas Parkanyi /* }} RobertYu */
745449c685SForest Bond 
75353710ceSNicholas Parkanyi #endif /* __RF_H__ */
76