linux/include/linux/mfd/wm831x/otp.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * include/linux/mfd/wm831x/otp.h -- OTP interface for WM831x
 *
 * Copyright 2009 Wolfson Microelectronics PLC.
 *
 * Author: Mark Brown <[email protected]>
 */

#ifndef __MFD_WM831X_OTP_H__
#define __MFD_WM831X_OTP_H__

int wm831x_otp_init(struct wm831x *wm831x);
void wm831x_otp_exit(struct wm831x *wm831x);

/*
 * R30720 (0x7800) - Unique ID 1
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30721 (0x7801) - Unique ID 2
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30722 (0x7802) - Unique ID 3
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30723 (0x7803) - Unique ID 4
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30724 (0x7804) - Unique ID 5
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30725 (0x7805) - Unique ID 6
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30726 (0x7806) - Unique ID 7
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30727 (0x7807) - Unique ID 8
 */
#define WM831X_UNIQUE_ID_MASK
#define WM831X_UNIQUE_ID_SHIFT
#define WM831X_UNIQUE_ID_WIDTH

/*
 * R30728 (0x7808) - Factory OTP ID
 */
#define WM831X_OTP_FACT_ID_MASK
#define WM831X_OTP_FACT_ID_SHIFT
#define WM831X_OTP_FACT_ID_WIDTH
#define WM831X_OTP_FACT_FINAL
#define WM831X_OTP_FACT_FINAL_MASK
#define WM831X_OTP_FACT_FINAL_SHIFT
#define WM831X_OTP_FACT_FINAL_WIDTH

/*
 * R30729 (0x7809) - Factory OTP 1
 */
#define WM831X_DC3_TRIM_MASK
#define WM831X_DC3_TRIM_SHIFT
#define WM831X_DC3_TRIM_WIDTH
#define WM831X_DC2_TRIM_MASK
#define WM831X_DC2_TRIM_SHIFT
#define WM831X_DC2_TRIM_WIDTH
#define WM831X_DC1_TRIM_MASK
#define WM831X_DC1_TRIM_SHIFT
#define WM831X_DC1_TRIM_WIDTH

/*
 * R30730 (0x780A) - Factory OTP 2
 */
#define WM831X_CHIP_ID_MASK
#define WM831X_CHIP_ID_SHIFT
#define WM831X_CHIP_ID_WIDTH

/*
 * R30731 (0x780B) - Factory OTP 3
 */
#define WM831X_OSC_TRIM_MASK
#define WM831X_OSC_TRIM_SHIFT
#define WM831X_OSC_TRIM_WIDTH
#define WM831X_BG_TRIM_MASK
#define WM831X_BG_TRIM_SHIFT
#define WM831X_BG_TRIM_WIDTH
#define WM831X_LPBG_TRIM_MASK
#define WM831X_LPBG_TRIM_SHIFT
#define WM831X_LPBG_TRIM_WIDTH

/*
 * R30732 (0x780C) - Factory OTP 4
 */
#define WM831X_CHILD_I2C_ADDR_MASK
#define WM831X_CHILD_I2C_ADDR_SHIFT
#define WM831X_CHILD_I2C_ADDR_WIDTH
#define WM831X_CH_AW
#define WM831X_CH_AW_MASK
#define WM831X_CH_AW_SHIFT
#define WM831X_CH_AW_WIDTH

/*
 * R30733 (0x780D) - Factory OTP 5
 */
#define WM831X_CHARGE_TRIM_MASK
#define WM831X_CHARGE_TRIM_SHIFT
#define WM831X_CHARGE_TRIM_WIDTH

/*
 * R30736 (0x7810) - Customer OTP ID
 */
#define WM831X_OTP_AUTO_PROG
#define WM831X_OTP_AUTO_PROG_MASK
#define WM831X_OTP_AUTO_PROG_SHIFT
#define WM831X_OTP_AUTO_PROG_WIDTH
#define WM831X_OTP_CUST_ID_MASK
#define WM831X_OTP_CUST_ID_SHIFT
#define WM831X_OTP_CUST_ID_WIDTH
#define WM831X_OTP_CUST_FINAL
#define WM831X_OTP_CUST_FINAL_MASK
#define WM831X_OTP_CUST_FINAL_SHIFT
#define WM831X_OTP_CUST_FINAL_WIDTH

/*
 * R30759 (0x7827) - DBE CHECK DATA
 */
#define WM831X_DBE_VALID_DATA_MASK
#define WM831X_DBE_VALID_DATA_SHIFT
#define WM831X_DBE_VALID_DATA_WIDTH


#endif