xref: /openbmc/linux/drivers/staging/vt6655/rf.h (revision a7ad322a)
15449c685SForest Bond /*
25449c685SForest Bond  * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
35449c685SForest Bond  * All rights reserved.
45449c685SForest Bond  *
55449c685SForest Bond  * This program is free software; you can redistribute it and/or modify
65449c685SForest Bond  * it under the terms of the GNU General Public License as published by
75449c685SForest Bond  * the Free Software Foundation; either version 2 of the License, or
85449c685SForest Bond  * (at your option) any later version.
95449c685SForest Bond  *
105449c685SForest Bond  * This program is distributed in the hope that it will be useful,
115449c685SForest Bond  * but WITHOUT ANY WARRANTY; without even the implied warranty of
125449c685SForest Bond  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
135449c685SForest Bond  * GNU General Public License for more details.
145449c685SForest Bond  *
155449c685SForest Bond  * You should have received a copy of the GNU General Public License along
165449c685SForest Bond  * with this program; if not, write to the Free Software Foundation, Inc.,
175449c685SForest Bond  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
185449c685SForest Bond  *
195449c685SForest Bond  *
205449c685SForest Bond  * File: rf.h
215449c685SForest Bond  *
225449c685SForest Bond  * Purpose:
235449c685SForest Bond  *
245449c685SForest Bond  * Author: Jerry Chen
255449c685SForest Bond  *
265449c685SForest Bond  * Date: Feb. 19, 2004
275449c685SForest Bond  *
285449c685SForest Bond  */
295449c685SForest Bond 
305449c685SForest Bond #ifndef __RF_H__
315449c685SForest Bond #define __RF_H__
325449c685SForest Bond 
335449c685SForest Bond #include "ttype.h"
345449c685SForest Bond #include "device.h"
35a7ad322aSJim Lieb 
365449c685SForest Bond /*---------------------  Export Definitions -------------------------*/
375449c685SForest Bond //
385449c685SForest Bond // Baseband RF pair definition in eeprom (Bits 6..0)
395449c685SForest Bond //
405449c685SForest Bond #define RF_RFMD2959             0x01
415449c685SForest Bond #define RF_MAXIMAG              0x02
425449c685SForest Bond #define RF_AIROHA               0x03
435449c685SForest Bond 
445449c685SForest Bond //#define RF_GCT5103              0x04
455449c685SForest Bond #define RF_UW2451               0x05
465449c685SForest Bond #define RF_MAXIMG               0x06
475449c685SForest Bond #define RF_MAXIM2829            0x07 // RobertYu: 20041118
485449c685SForest Bond #define RF_UW2452               0x08 // RobertYu: 20041210
495449c685SForest Bond #define RF_AIROHA7230           0x0a // RobertYu: 20050104
505449c685SForest Bond #define RF_UW2453               0x0b
515449c685SForest Bond 
525449c685SForest Bond #define RF_VT3226               0x09
535449c685SForest Bond #define RF_AL2230S              0x0e
545449c685SForest Bond 
555449c685SForest Bond #define RF_NOTHING              0x7E
565449c685SForest Bond #define RF_EMU                  0x80
575449c685SForest Bond #define RF_MASK                 0x7F
585449c685SForest Bond 
595449c685SForest Bond #define ZONE_FCC                0
605449c685SForest Bond #define ZONE_MKK1               1
615449c685SForest Bond #define ZONE_ETSI               2
625449c685SForest Bond #define ZONE_IC                 3
635449c685SForest Bond #define ZONE_SPAIN              4
645449c685SForest Bond #define ZONE_FRANCE             5
655449c685SForest Bond #define ZONE_MKK                6
665449c685SForest Bond #define ZONE_ISRAEL             7
675449c685SForest Bond 
685449c685SForest Bond //[20050104] CB_MAXIM2829_CHANNEL_5G_HIGH, CB_UW2452_CHANNEL_5G_HIGH: 40==>41
695449c685SForest Bond #define CB_MAXIM2829_CHANNEL_5G_HIGH    41 //Index41: channel = 100, Tf = 5500MHz, set the (A3:A0=0101) D6=1
705449c685SForest Bond #define CB_UW2452_CHANNEL_5G_HIGH       41 //[20041210] Index41: channel = 100, Tf = 5500MHz, change VCO2->VCO3
715449c685SForest Bond 
725449c685SForest Bond 
735449c685SForest Bond /*---------------------  Export Classes  ----------------------------*/
745449c685SForest Bond 
755449c685SForest Bond /*---------------------  Export Variables  --------------------------*/
765449c685SForest Bond 
775449c685SForest Bond /*---------------------  Export Functions  --------------------------*/
785449c685SForest Bond 
795449c685SForest Bond BOOL IFRFbWriteEmbeded(DWORD_PTR dwIoBase, DWORD dwData);
805449c685SForest Bond BOOL RFbSelectChannel(DWORD_PTR dwIoBase, BYTE byRFType, BYTE byChannel);
815449c685SForest Bond BOOL RFbInit (
825449c685SForest Bond     IN  PSDevice  pDevice
835449c685SForest Bond     );
845449c685SForest Bond BOOL RFvWriteWakeProgSyn(DWORD_PTR dwIoBase, BYTE byRFType, UINT uChannel);
855449c685SForest Bond BOOL RFbSetPower(PSDevice pDevice, UINT uRATE, UINT uCH);
865449c685SForest Bond BOOL RFbRawSetPower(
875449c685SForest Bond     IN  PSDevice  pDevice,
885449c685SForest Bond     IN  BYTE      byPwr,
895449c685SForest Bond     IN  UINT      uRATE
905449c685SForest Bond     );
915449c685SForest Bond 
925449c685SForest Bond VOID
935449c685SForest Bond RFvRSSITodBm(
945449c685SForest Bond     IN  PSDevice pDevice,
955449c685SForest Bond     IN  BYTE     byCurrRSSI,
96a884847aSJim Lieb     long    *pldBm
975449c685SForest Bond     );
985449c685SForest Bond 
995449c685SForest Bond //{{ RobertYu: 20050104
1005449c685SForest Bond BOOL RFbAL7230SelectChannelPostProcess(DWORD_PTR dwIoBase, BYTE byOldChannel, BYTE byNewChannel);
1015449c685SForest Bond //}} RobertYu
1025449c685SForest Bond 
1035449c685SForest Bond #endif // __RF_H__
1045449c685SForest Bond 
1055449c685SForest Bond 
1065449c685SForest Bond 
107