18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Support for Legend Silicon GB20600 (a.k.a DMB-TH) demodulator 48c2ecf20Sopenharmony_ci * LGS8913, LGS8GL5, LGS8G75 58c2ecf20Sopenharmony_ci * experimental support LGS8G42, LGS8G52 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (C) 2007-2009 David T.L. Wong <davidtlwong@gmail.com> 88c2ecf20Sopenharmony_ci * Copyright (C) 2008 Sirius International (Hong Kong) Limited 98c2ecf20Sopenharmony_ci * Timothy Lee <timothy.lee@siriushk.com> (for initial work on LGS8GL5) 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci#ifndef LGS8913_PRIV_H 138c2ecf20Sopenharmony_ci#define LGS8913_PRIV_H 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_cistruct lgs8gxx_state { 168c2ecf20Sopenharmony_ci struct i2c_adapter *i2c; 178c2ecf20Sopenharmony_ci /* configuration settings */ 188c2ecf20Sopenharmony_ci const struct lgs8gxx_config *config; 198c2ecf20Sopenharmony_ci struct dvb_frontend frontend; 208c2ecf20Sopenharmony_ci u16 curr_gi; /* current guard interval */ 218c2ecf20Sopenharmony_ci}; 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define SC_MASK 0x1C /* Sub-Carrier Modulation Mask */ 248c2ecf20Sopenharmony_ci#define SC_QAM64 0x10 /* 64QAM modulation */ 258c2ecf20Sopenharmony_ci#define SC_QAM32 0x0C /* 32QAM modulation */ 268c2ecf20Sopenharmony_ci#define SC_QAM16 0x08 /* 16QAM modulation */ 278c2ecf20Sopenharmony_ci#define SC_QAM4NR 0x04 /* 4QAM-NR modulation */ 288c2ecf20Sopenharmony_ci#define SC_QAM4 0x00 /* 4QAM modulation */ 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define LGS_FEC_MASK 0x03 /* FEC Rate Mask */ 318c2ecf20Sopenharmony_ci#define LGS_FEC_0_4 0x00 /* FEC Rate 0.4 */ 328c2ecf20Sopenharmony_ci#define LGS_FEC_0_6 0x01 /* FEC Rate 0.6 */ 338c2ecf20Sopenharmony_ci#define LGS_FEC_0_8 0x02 /* FEC Rate 0.8 */ 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#define TIM_MASK 0x20 /* Time Interleave Length Mask */ 368c2ecf20Sopenharmony_ci#define TIM_LONG 0x20 /* Time Interleave Length = 720 */ 378c2ecf20Sopenharmony_ci#define TIM_MIDDLE 0x00 /* Time Interleave Length = 240 */ 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci#define CF_MASK 0x80 /* Control Frame Mask */ 408c2ecf20Sopenharmony_ci#define CF_EN 0x80 /* Control Frame On */ 418c2ecf20Sopenharmony_ci 428c2ecf20Sopenharmony_ci#define GI_MASK 0x03 /* Guard Interval Mask */ 438c2ecf20Sopenharmony_ci#define GI_420 0x00 /* 1/9 Guard Interval */ 448c2ecf20Sopenharmony_ci#define GI_595 0x01 /* */ 458c2ecf20Sopenharmony_ci#define GI_945 0x02 /* 1/4 Guard Interval */ 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci 488c2ecf20Sopenharmony_ci#define TS_PARALLEL 0x00 /* Parallel TS Output a.k.a. SPI */ 498c2ecf20Sopenharmony_ci#define TS_SERIAL 0x01 /* Serial TS Output a.k.a. SSI */ 508c2ecf20Sopenharmony_ci#define TS_CLK_NORMAL 0x00 /* MPEG Clock Normal */ 518c2ecf20Sopenharmony_ci#define TS_CLK_INVERTED 0x02 /* MPEG Clock Inverted */ 528c2ecf20Sopenharmony_ci#define TS_CLK_GATED 0x00 /* MPEG clock gated */ 538c2ecf20Sopenharmony_ci#define TS_CLK_FREERUN 0x04 /* MPEG clock free running*/ 548c2ecf20Sopenharmony_ci 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci#endif 57