gp8psk-fe.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * gp8psk_fe driver
  4. */
  5. #ifndef GP8PSK_FE_H
  6. #define GP8PSK_FE_H
  7. #include <linux/types.h>
  8. /* gp8psk commands */
  9. #define GET_8PSK_CONFIG 0x80 /* in */
  10. #define SET_8PSK_CONFIG 0x81
  11. #define I2C_WRITE 0x83
  12. #define I2C_READ 0x84
  13. #define ARM_TRANSFER 0x85
  14. #define TUNE_8PSK 0x86
  15. #define GET_SIGNAL_STRENGTH 0x87 /* in */
  16. #define LOAD_BCM4500 0x88
  17. #define BOOT_8PSK 0x89 /* in */
  18. #define START_INTERSIL 0x8A /* in */
  19. #define SET_LNB_VOLTAGE 0x8B
  20. #define SET_22KHZ_TONE 0x8C
  21. #define SEND_DISEQC_COMMAND 0x8D
  22. #define SET_DVB_MODE 0x8E
  23. #define SET_DN_SWITCH 0x8F
  24. #define GET_SIGNAL_LOCK 0x90 /* in */
  25. #define GET_FW_VERS 0x92
  26. #define GET_SERIAL_NUMBER 0x93 /* in */
  27. #define USE_EXTRA_VOLT 0x94
  28. #define GET_FPGA_VERS 0x95
  29. #define CW3K_INIT 0x9d
  30. /* PSK_configuration bits */
  31. #define bm8pskStarted 0x01
  32. #define bm8pskFW_Loaded 0x02
  33. #define bmIntersilOn 0x04
  34. #define bmDVBmode 0x08
  35. #define bm22kHz 0x10
  36. #define bmSEL18V 0x20
  37. #define bmDCtuned 0x40
  38. #define bmArmed 0x80
  39. /* Satellite modulation modes */
  40. #define ADV_MOD_DVB_QPSK 0 /* DVB-S QPSK */
  41. #define ADV_MOD_TURBO_QPSK 1 /* Turbo QPSK */
  42. #define ADV_MOD_TURBO_8PSK 2 /* Turbo 8PSK (also used for Trellis 8PSK) */
  43. #define ADV_MOD_TURBO_16QAM 3 /* Turbo 16QAM (also used for Trellis 8PSK) */
  44. #define ADV_MOD_DCII_C_QPSK 4 /* Digicipher II Combo */
  45. #define ADV_MOD_DCII_I_QPSK 5 /* Digicipher II I-stream */
  46. #define ADV_MOD_DCII_Q_QPSK 6 /* Digicipher II Q-stream */
  47. #define ADV_MOD_DCII_C_OQPSK 7 /* Digicipher II offset QPSK */
  48. #define ADV_MOD_DSS_QPSK 8 /* DSS (DIRECTV) QPSK */
  49. #define ADV_MOD_DVB_BPSK 9 /* DVB-S BPSK */
  50. /* firmware revision id's */
  51. #define GP8PSK_FW_REV1 0x020604
  52. #define GP8PSK_FW_REV2 0x020704
  53. #define GP8PSK_FW_VERS(_fw_vers) \
  54. ((_fw_vers)[2]<<0x10 | (_fw_vers)[1]<<0x08 | (_fw_vers)[0])
  55. struct gp8psk_fe_ops {
  56. int (*in)(void *priv, u8 req, u16 value, u16 index, u8 *b, int blen);
  57. int (*out)(void *priv, u8 req, u16 value, u16 index, u8 *b, int blen);
  58. int (*reload)(void *priv);
  59. };
  60. struct dvb_frontend *gp8psk_fe_attach(const struct gp8psk_fe_ops *ops,
  61. void *priv, bool is_rev1);
  62. #endif