189ee7f4fSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
29a0bf528SMauro Carvalho Chehab /*
39a0bf528SMauro Carvalho Chehab  * drxd_firm.h
49a0bf528SMauro Carvalho Chehab  *
59a0bf528SMauro Carvalho Chehab  * Copyright (C) 2006-2007 Micronas
69a0bf528SMauro Carvalho Chehab  */
79a0bf528SMauro Carvalho Chehab 
89a0bf528SMauro Carvalho Chehab #ifndef _DRXD_FIRM_H_
99a0bf528SMauro Carvalho Chehab #define _DRXD_FIRM_H_
109a0bf528SMauro Carvalho Chehab 
119a0bf528SMauro Carvalho Chehab #include <linux/types.h>
129a0bf528SMauro Carvalho Chehab #include "drxd_map_firm.h"
139a0bf528SMauro Carvalho Chehab 
149a0bf528SMauro Carvalho Chehab #define VERSION_MAJOR 1
159a0bf528SMauro Carvalho Chehab #define VERSION_MINOR 4
169a0bf528SMauro Carvalho Chehab #define VERSION_PATCH 23
179a0bf528SMauro Carvalho Chehab 
189a0bf528SMauro Carvalho Chehab #define HI_TR_FUNC_ADDR HI_IF_RAM_USR_BEGIN__A
199a0bf528SMauro Carvalho Chehab 
209a0bf528SMauro Carvalho Chehab #define DRXD_MAX_RETRIES (1000)
219a0bf528SMauro Carvalho Chehab #define HI_I2C_DELAY     84
229a0bf528SMauro Carvalho Chehab #define HI_I2C_BRIDGE_DELAY   750
239a0bf528SMauro Carvalho Chehab 
249a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_UNKNOWN          0x00C0	/* Unknown configurations */
259a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QPSK             0x016a
269a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM16_ALPHAN     0x0195
279a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM16_ALPHA1     0x0195
289a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM16_ALPHA2     0x011E
299a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM16_ALPHA4     0x01CE
309a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM64_ALPHAN     0x019F
319a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM64_ALPHA1     0x019F
329a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM64_ALPHA2     0x00F8
339a0bf528SMauro Carvalho Chehab #define EQ_TD_TPS_PWR_QAM64_ALPHA4     0x014D
349a0bf528SMauro Carvalho Chehab 
359a0bf528SMauro Carvalho Chehab #define DRXD_DEF_AG_PWD_CONSUMER 0x000E
369a0bf528SMauro Carvalho Chehab #define DRXD_DEF_AG_PWD_PRO 0x0000
379a0bf528SMauro Carvalho Chehab #define DRXD_DEF_AG_AGC_SIO 0x0000
389a0bf528SMauro Carvalho Chehab 
399a0bf528SMauro Carvalho Chehab #define DRXD_FE_CTRL_MAX 1023
409a0bf528SMauro Carvalho Chehab 
419a0bf528SMauro Carvalho Chehab #define DRXD_OSCDEV_DO_SCAN  (16)
429a0bf528SMauro Carvalho Chehab 
439a0bf528SMauro Carvalho Chehab #define DRXD_OSCDEV_DONT_SCAN  (0)
449a0bf528SMauro Carvalho Chehab 
459a0bf528SMauro Carvalho Chehab #define DRXD_OSCDEV_STEP  (275)
469a0bf528SMauro Carvalho Chehab 
479a0bf528SMauro Carvalho Chehab #define DRXD_SCAN_TIMEOUT    (650)
489a0bf528SMauro Carvalho Chehab 
499a0bf528SMauro Carvalho Chehab #define DRXD_BANDWIDTH_8MHZ_IN_HZ  (0x8B8249L)
509a0bf528SMauro Carvalho Chehab #define DRXD_BANDWIDTH_7MHZ_IN_HZ  (0x7A1200L)
519a0bf528SMauro Carvalho Chehab #define DRXD_BANDWIDTH_6MHZ_IN_HZ  (0x68A1B6L)
529a0bf528SMauro Carvalho Chehab 
539a0bf528SMauro Carvalho Chehab #define IRLEN_COARSE_8K       (10)
549a0bf528SMauro Carvalho Chehab #define IRLEN_FINE_8K         (10)
559a0bf528SMauro Carvalho Chehab #define IRLEN_COARSE_2K       (7)
569a0bf528SMauro Carvalho Chehab #define IRLEN_FINE_2K         (9)
579a0bf528SMauro Carvalho Chehab #define DIFF_INVALID          (511)
589a0bf528SMauro Carvalho Chehab #define DIFF_TARGET           (4)
599a0bf528SMauro Carvalho Chehab #define DIFF_MARGIN           (1)
609a0bf528SMauro Carvalho Chehab 
619a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitAtomicRead[];
629a0bf528SMauro Carvalho Chehab extern u8 DRXD_HiI2cPatch_1[];
639a0bf528SMauro Carvalho Chehab extern u8 DRXD_HiI2cPatch_3[];
649a0bf528SMauro Carvalho Chehab 
659a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitSC[];
669a0bf528SMauro Carvalho Chehab 
679a0bf528SMauro Carvalho Chehab extern u8 DRXD_ResetCEFR[];
689a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitFEA2_1[];
699a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitFEA2_2[];
709a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitCPA2[];
719a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitCEA2[];
729a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitEQA2[];
739a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitECA2[];
749a0bf528SMauro Carvalho Chehab extern u8 DRXD_ResetECA2[];
759a0bf528SMauro Carvalho Chehab extern u8 DRXD_ResetECRAM[];
769a0bf528SMauro Carvalho Chehab 
779a0bf528SMauro Carvalho Chehab extern u8 DRXD_A2_microcode[];
789a0bf528SMauro Carvalho Chehab extern u32 DRXD_A2_microcode_length;
799a0bf528SMauro Carvalho Chehab 
809a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitFEB1_1[];
819a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitFEB1_2[];
829a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitCPB1[];
839a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitCEB1[];
849a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitEQB1[];
859a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitECB1[];
869a0bf528SMauro Carvalho Chehab 
879a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitDiversityFront[];
889a0bf528SMauro Carvalho Chehab extern u8 DRXD_InitDiversityEnd[];
899a0bf528SMauro Carvalho Chehab extern u8 DRXD_DisableDiversity[];
909a0bf528SMauro Carvalho Chehab extern u8 DRXD_StartDiversityFront[];
919a0bf528SMauro Carvalho Chehab extern u8 DRXD_StartDiversityEnd[];
929a0bf528SMauro Carvalho Chehab 
939a0bf528SMauro Carvalho Chehab extern u8 DRXD_DiversityDelay8MHZ[];
949a0bf528SMauro Carvalho Chehab extern u8 DRXD_DiversityDelay6MHZ[];
959a0bf528SMauro Carvalho Chehab 
969a0bf528SMauro Carvalho Chehab extern u8 DRXD_B1_microcode[];
979a0bf528SMauro Carvalho Chehab extern u32 DRXD_B1_microcode_length;
989a0bf528SMauro Carvalho Chehab 
999a0bf528SMauro Carvalho Chehab #endif
100