Source
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) 2018 Theobroma Systems Design und Consulting GmbH
*/
/**
* struct ic_types - definition of fan53555-family devices
*
* @die_id: Identifies the DIE_ID (lower nibble of the ID1 register)
* @die_rev: Identifies the DIE_REV (lower nibble of the ID2 register)
* @vsel_min: starting voltage (step 0) in uV
* @vsel_step: increment of the voltage in uV
*
* The voltage ramp (i.e. minimum voltage and step) is selected from the
* combination of 2 nibbles: DIE_ID and DIE_REV.
*
* See http://www.onsemi.com/pub/Collateral/FAN53555-D.pdf for details.
*/
static const struct {
u8 die_id;
u8 die_rev;
u32 vsel_min;
u32 vsel_step;
} ic_types[] = {
{ 0x0, 0x3, 600000, 10000 }, /* Option 00 */
{ 0x0, 0xf, 800000, 10000 }, /* Option 13 */
{ 0x0, 0xc, 600000, 12500 }, /* Option 23 */
{ 0x1, 0x3, 600000, 10000 }, /* Option 01 */
{ 0x3, 0x3, 600000, 10000 }, /* Option 03 */
{ 0x4, 0xf, 603000, 12826 }, /* Option 04 */
{ 0x5, 0x3, 600000, 10000 }, /* Option 05 */
{ 0x8, 0x1, 600000, 10000 }, /* Option 08 */
{ 0x8, 0xf, 600000, 10000 }, /* Option 08 */
{ 0xc, 0xf, 603000, 12826 }, /* Option 09 */
};
/* I2C-accessible byte-sized registers */
enum {
/* Voltage setting */
FAN53555_VSEL0 = 0x00,
FAN53555_VSEL1,
/* Control register */
FAN53555_CONTROL,
/* IC Type */
FAN53555_ID1,
/* IC mask version */
FAN53555_ID2,
/* Monitor register */
FAN53555_MONITOR,
};
struct fan53555_platdata {
/* Voltage setting register */