/* SPDX-License-Identifier: GPL-2.0 */ /* * Driver for the MaxLinear MxL69x family of combo tuners/demods * * Copyright (C) 2020 Brad Love <[email protected]> * * based on code: * Copyright (c) 2016 MaxLinear, Inc. All rights reserved * which was released under GPL V2 */ /***************************************************************************** * Defines ***************************************************************************** */ #define MXL_EAGLE_HOST_MSG_HEADER_SIZE … #define MXL_EAGLE_FW_MAX_SIZE_IN_KB … #define MXL_EAGLE_QAM_FFE_TAPS_LENGTH … #define MXL_EAGLE_QAM_SPUR_TAPS_LENGTH … #define MXL_EAGLE_QAM_DFE_TAPS_LENGTH … #define MXL_EAGLE_ATSC_FFE_TAPS_LENGTH … #define MXL_EAGLE_ATSC_DFE_TAPS_LENGTH … #define MXL_EAGLE_VERSION_SIZE … #define MXL_EAGLE_FW_LOAD_TIME … #define MXL_EAGLE_FW_MAX_SIZE_IN_KB … #define MXL_EAGLE_FW_HEADER_SIZE … #define MXL_EAGLE_FW_SEGMENT_HEADER_SIZE … #define MXL_EAGLE_MAX_I2C_PACKET_SIZE … #define MXL_EAGLE_I2C_MHEADER_SIZE … #define MXL_EAGLE_I2C_PHEADER_SIZE … /* Enum of Eagle family devices */ enum MXL_EAGLE_DEVICE_E { … }; #define VER_A … #define VER_B … #define VER_C … #define VER_D … #define VER_E … /* Enum of Host to Eagle I2C protocol opcodes */ enum MXL_EAGLE_OPCODE_E { … }; /* Enum of Host to Eagle I2C protocol opcodes */ static const char * const MXL_EAGLE_OPCODE_STRING[] = …; /* Enum of Callabck function types */ enum MXL_EAGLE_CB_TYPE_E { … }; /* Enum of power supply types */ enum MXL_EAGLE_POWER_SUPPLY_SOURCE_E { … }; /* Enum of I/O pad drive modes */ enum MXL_EAGLE_IO_MUX_DRIVE_MODE_E { … }; /* Enum of demodulator types. Used for selection of demodulator * type in relevant devices, e.g. ATSC vs. QAM in Mxl691 */ enum MXL_EAGLE_DEMOD_TYPE_E { … }; /* Enum of power modes. Used for initial * activation, or for activating sleep mode */ enum MXL_EAGLE_POWER_MODE_E { … }; /* Enum of GPIOs, used in device GPIO APIs */ enum MXL_EAGLE_GPIO_NUMBER_E { … }; /* Enum of GPIO directions, used in GPIO direction configuration API */ enum MXL_EAGLE_GPIO_DIRECTION_E { … }; /* Enum of GPIO level, used in device GPIO APIs */ enum MXL_EAGLE_GPIO_LEVEL_E { … }; /* Enum of I/O Mux function, used in device I/O mux configuration API */ enum MXL_EAGLE_IOMUX_FUNCTION_E { … }; /* Enum of MPEG Data format, used in MPEG and OOB output configuration */ enum MXL_EAGLE_MPEG_DATA_FORMAT_E { … }; /* Enum of MPEG Clock format, used in MPEG and OOB output configuration */ enum MXL_EAGLE_MPEG_CLOCK_FORMAT_E { … }; /* Enum of MPEG Clock speeds, used in MPEG output configuration */ enum MXL_EAGLE_MPEG_CLOCK_RATE_E { … }; /* Enum of Interrupt mask bit, used in host interrupt configuration */ enum MXL_EAGLE_INTR_MASK_BITS_E { … }; /* Enum of QAM Demodulator type, used in QAM configuration */ enum MXL_EAGLE_QAM_DEMOD_ANNEX_TYPE_E { … }; /* Enum of QAM Demodulator modulation, used in QAM configuration and status */ enum MXL_EAGLE_QAM_DEMOD_QAM_TYPE_E { … }; /* Enum of Demodulator IQ setup, used in QAM, OOB configuration and status */ enum MXL_EAGLE_IQ_FLIP_E { … }; /* Enum of OOB Demodulator symbol rates, used in OOB configuration */ enum MXL_EAGLE_OOB_DEMOD_SYMB_RATE_E { … }; /* Enum of tuner channel tuning mode */ enum MXL_EAGLE_TUNER_CHANNEL_TUNE_MODE_E { … }; /* Enum of tuner bandwidth */ enum MXL_EAGLE_TUNER_BW_E { … }; /* Enum of tuner bandwidth */ enum MXL_EAGLE_JUNCTION_TEMPERATURE_E { … }; /* Struct passed in optional callback used during FW download */ struct MXL_EAGLE_FW_DOWNLOAD_CB_PAYLOAD_T { … }; /* Struct used of I2C protocol between host and Eagle, internal use only */ struct __packed MXL_EAGLE_HOST_MSG_HEADER_T { … }; /* Device version information struct */ struct __packed MXL_EAGLE_DEV_VER_T { … }; /* Xtal configuration struct */ struct __packed MXL_EAGLE_DEV_XTAL_T { … }; /* GPIO direction struct, internally used in GPIO configuration API */ struct __packed MXL_EAGLE_DEV_GPIO_DIRECTION_T { … }; /* GPO level struct, internally used in GPIO configuration API */ struct __packed MXL_EAGLE_DEV_GPO_LEVEL_T { … }; /* Device Status struct */ struct MXL_EAGLE_DEV_STATUS_T { … }; /* Device interrupt configuration struct */ struct __packed MXL_EAGLE_DEV_INTR_CFG_T { … }; /* MPEG pad drive parameters, used on MPEG output configuration */ /* See MXL_EAGLE_IO_MUX_DRIVE_MODE_E */ struct MXL_EAGLE_MPEG_PAD_DRIVE_T { … }; /* MPEGOUT parameter struct, used in MPEG output configuration */ struct MXL_EAGLE_MPEGOUT_PARAMS_T { … }; /* QAM Demodulator parameters struct, used in QAM params configuration */ struct __packed MXL_EAGLE_QAM_DEMOD_PARAMS_T { … }; /* QAM Demodulator status */ struct MXL_EAGLE_QAM_DEMOD_STATUS_T { … }; /* QAM Demodulator error counters */ struct MXL_EAGLE_QAM_DEMOD_ERROR_COUNTERS_T { … }; /* QAM Demodulator constellation point */ struct MXL_EAGLE_QAM_DEMOD_CONSTELLATION_VAL_T { … }; /* QAM Demodulator equalizer filter taps */ struct MXL_EAGLE_QAM_DEMOD_EQU_FILTER_T { … }; /* OOB Demodulator parameters struct, used in OOB params configuration */ struct __packed MXL_EAGLE_OOB_DEMOD_PARAMS_T { … }; /* OOB Demodulator error counters */ struct MXL_EAGLE_OOB_DEMOD_ERROR_COUNTERS_T { … }; /* OOB status */ struct __packed MXL_EAGLE_OOB_DEMOD_STATUS_T { … }; /* ATSC Demodulator status */ struct __packed MXL_EAGLE_ATSC_DEMOD_STATUS_T { … }; /* ATSC Demodulator error counters */ struct MXL_EAGLE_ATSC_DEMOD_ERROR_COUNTERS_T { … }; /* ATSC Demodulator equalizers filter taps */ struct __packed MXL_EAGLE_ATSC_DEMOD_EQU_FILTER_T { … }; /* Tuner AGC Status */ struct __packed MXL_EAGLE_TUNER_AGC_STATUS_T { … }; /* Tuner channel tune parameters */ struct __packed MXL_EAGLE_TUNER_CHANNEL_PARAMS_T { … }; /* Tuner channel lock indications */ struct __packed MXL_EAGLE_TUNER_LOCK_STATUS_T { … }; /* Smart antenna parameters used in Smart antenna params configuration */ struct __packed MXL_EAGLE_SMA_PARAMS_T { … }; /* Smart antenna message format */ struct __packed MXL_EAGLE_SMA_MESSAGE_T { … };