Source
x
MODULE_AUTHOR("Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>");
// SPDX-License-Identifier: GPL-2.0
/*
* Maxim Integrated MAX2175 RF to Bits tuner driver
*
* This driver & most of the hard coded values are based on the reference
* application delivered by Maxim for this device.
*
* Copyright (C) 2016 Maxim Integrated Products
* Copyright (C) 2017 Renesas Electronics Corporation
*/
/* Rx mode */
struct max2175_rxmode {
enum max2175_band band; /* Associated band */
u32 freq; /* Default freq in Hz */
u8 i2s_word_size; /* Bit value */
};
/* Register map to define preset values */
struct max2175_reg_map {
u8 idx; /* Register index */
u8 val; /* Register value */
};
static const struct max2175_rxmode eu_rx_modes[] = {
/* EU modes */
[MAX2175_EU_FM_1_2] = { MAX2175_BAND_FM, 98256000, 1 },
[MAX2175_DAB_1_2] = { MAX2175_BAND_VHF, 182640000, 0 },
};
static const struct max2175_rxmode na_rx_modes[] = {
/* NA modes */
[MAX2175_NA_FM_1_0] = { MAX2175_BAND_FM, 98255520, 1 },
[MAX2175_NA_FM_2_0] = { MAX2175_BAND_FM, 98255520, 6 },
};
/*
* Preset values:
* Based on Maxim MAX2175 Register Table revision: 130p10
*/
static const u8 full_fm_eu_1p0[] = {
0x15, 0x04, 0xb8, 0xe3, 0x35, 0x18, 0x7c, 0x00,
0x00, 0x7d, 0x40, 0x08, 0x70, 0x7a, 0x88, 0x91,
0x61, 0x61, 0x61, 0x61, 0x5a, 0x0f, 0x34, 0x1c,
0x14, 0x88, 0x33, 0x02, 0x00, 0x09, 0x00, 0x65,
0x9f, 0x2b, 0x80, 0x00, 0x95, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x4a, 0x08, 0xa8, 0x0e, 0x0e, 0x2f, 0x7e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0x5e, 0xa9,
0xae, 0xbb, 0x57, 0x18, 0x3b, 0x03, 0x3b, 0x64,
0x40, 0x60, 0x00, 0x2a, 0xbf, 0x3f, 0xff, 0x9f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00,
0xff, 0xfc, 0xef, 0x1c, 0x40, 0x00, 0x00, 0x02,
0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x00, 0x00,
0x00, 0x47, 0x00, 0x00, 0x11, 0x3f, 0x22, 0x00,
0xf1, 0x00, 0x41, 0x03, 0xb0, 0x00, 0x00, 0x00,
0x1b,
};
static const u8 full_fm_na_1p0[] = {
0x13, 0x08, 0x8d, 0xc0, 0x35, 0x18, 0x7d, 0x3f,
0x7d, 0x75, 0x40, 0x08, 0x70, 0x7a, 0x88, 0x91,
0x61, 0x61, 0x61, 0x61, 0x5c, 0x0f, 0x34, 0x1c,
0x14, 0x88, 0x33, 0x02, 0x00, 0x01, 0x00, 0x65,
0x9f, 0x2b, 0x80, 0x00, 0x95, 0x05, 0x2c, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
0x4a, 0x08, 0xa8, 0x0e, 0x0e, 0xaf, 0x7e, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,