/*
 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
 *              http://www.samsung.com
 *
 * Author: Sung-Hyun Na <sunghyun.na@samsung.com>
 *
 * USBPHY configuration definitions for Samsung USB PHY CAL
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef __PHY_SAMSUNG_USB_FW_CAL_H__
#define __PHY_SAMSUNG_USB_FW_CAL_H__

#define EXYNOS_USBCON_VER_01_0_0	0x0100	/* Istor	*/
#define EXYNOS_USBCON_VER_01_0_1	0x0101	/* JF 3.0	*/
#define EXYNOS_USBCON_VER_01_1_1	0x0111	/* KC		*/
#define EXYNOS_USBCON_VER_01_MAX	0x01FF

#define EXYNOS_USBCON_VER_02_0_0	0x0200	/* Insel-D, Island	*/
#define EXYNOS_USBCON_VER_02_0_1	0x0201	/* JF EVT0 2.0 Host	*/
#define EXYNOS_USBCON_VER_02_1_0	0x0210
#define EXYNOS_USBCON_VER_02_1_1	0x0211	/* JF EVT1 2.0 Host	*/
#define EXYNOS_USBCON_VER_02_1_2	0x0212  /* Katmai EVT0 */
#define EXYNOS_USBCON_VER_02_MAX	0x02FF

#define EXYNOS_USBCON_VER_03_0_0	0x0300	/* Lhotse, Lassen HS */
#define EXYNOS_USBCON_VER_03_0_1	0x0301	/* Super Speed			*/
#define EXYNOS_USBCON_VER_03_MAX	0x03FF
#define EXYNOS_USBCON_VER_04_0_0	0x0400	/* Lhotse - USB/DP  */
#define EXYNOS_USBCON_VER_04_MAX	0x04FF
#define EXYNOS_USBCON_VER_05_0_0	0x0500	/* High Speed Only	*/
#define EXYNOS_USBCON_VER_05_1_0	0x0510	/* Super Speed		*/
#define EXYNOS_USBCON_VER_05_3_0	0x0530	/* Super Speed Dual PHY	*/
#define EXYNOS_USBCON_VER_05_MAX	0x05FF
#define EXYNOS_USBCON_VER_F2_0_0	0xF200
#define EXYNOS_USBCON_VER_F2_MAX	0xF2FF

#define EXYNOS_USBCON_VER_MAJOR_VER_MASK	0xFF00
#define EXYNOS_USBCON_VER_SS_CAP			0x0010

enum exynos_usbphy_mode {
	USBPHY_MODE_DEV = 0,
	USBPHY_MODE_HOST = 1,

	/* usb phy for uart bypass mode */
	USBPHY_MODE_BYPASS = 0x10,
};

enum exynos_usbphy_refclk {
	USBPHY_REFCLK_DIFF_100MHZ = 0x80 | 0x27,
	USBPHY_REFCLK_DIFF_52MHZ = 0x80 | 0x02 | 0x40,
	USBPHY_REFCLK_DIFF_26MHZ = 0x80 | 0x02,
	USBPHY_REFCLK_DIFF_24MHZ = 0x80 | 0x2a,
	USBPHY_REFCLK_DIFF_20MHZ = 0x80 | 0x31,
	USBPHY_REFCLK_DIFF_19_2MHZ = 0x80 | 0x38,

	USBPHY_REFCLK_EXT_50MHZ = 0x07,
	USBPHY_REFCLK_EXT_26MHZ = 0x06,
	USBPHY_REFCLK_EXT_24MHZ = 0x05,
	USBPHY_REFCLK_EXT_20MHZ = 0x04,
	USBPHY_REFCLK_EXT_12MHZ = 0x02,
};

enum exynos_usbphy_refsel {
	USBPHY_REFSEL_CLKCORE = 0x2,
	USBPHY_REFSEL_EXT_OSC = 0x1,
	USBPHY_REFSEL_EXT_XTAL = 0x0,

	USBPHY_REFSEL_DIFF_PAD = 0x6,
	USBPHY_REFSEL_DIFF_INTERNAL = 0x4,
	USBPHY_REFSEL_DIFF_SINGLE = 0x3,
};

enum exynos_usbphy_utmi {
	USBPHY_UTMI_FREECLOCK, USBPHY_UTMI_PHYCLOCK,
};

enum exynos_usbphy_tune_para {
	USBPHY_TUNE_HS_COMPDIS = 0x0,
	USBPHY_TUNE_HS_OTG = 0x1,
	USBPHY_TUNE_HS_SQRX = 0x2,
	USBPHY_TUNE_HS_TXFSLS = 0x3,
	USBPHY_TUNE_HS_TXHSXV = 0x4,
	USBPHY_TUNE_HS_TXPREEMP = 0x5,
	USBPHY_TUNE_HS_TXPREEMP_PLUS = 0x6,
	USBPHY_TUNE_HS_TXRES = 0x7,
	USBPHY_TUNE_HS_TXRISE = 0x8,
	USBPHY_TUNE_HS_TXVREF = 0x9,

	USBPHY_TUNE_SS_TX_BOOST = 0x0 | 0x10000,
	USBPHY_TUNE_SS_TX_SWING = 0x1 | 0x10000,
	USBPHY_TUNE_SS_TX_DEEMPHASIS = 0x2 | 0x10000,
	USBPHY_TUNE_SS_LOS_BIAS = 0x3 | 0x10000,
	USBPHY_TUNE_SS_LOS_MASK_VAL = 0x4 | 0x10000,
	USBPHY_TUNE_SS_FIX_EQ = 0x5 | 0x10000,
	USBPHY_TUNE_SS_RX_EQ = 0x6 | 0x10000,
	USBPHY_TUNE_COMBO = 0x20000,
	USBPHY_TUNE_COMBO_TX_AMP	= USBPHY_TUNE_COMBO | 0x0,
	USBPHY_TUNE_COMBO_TX_EMPHASIS	= USBPHY_TUNE_COMBO | 0x1,
	USBPHY_TUNE_COMBO_TX_IDRV	= USBPHY_TUNE_COMBO | 0x2,
	USBPHY_TUNE_COMBO_TX_ACCDRV	= USBPHY_TUNE_COMBO | 0x3,
};

struct exynos_usb_tune_param {
	char name[16];
	int value;
};
#define EXYNOS_USB_TUNE_LAST	0x4C415354
/* HS PHY tune parameter */
struct exynos_usbphy_hs_tune {
	u8 tx_vref;
	u8 tx_pre_emp;
	u8 tx_pre_emp_puls;
	u8 tx_res;
	u8 tx_rise;
	u8 tx_hsxv;
	u8 tx_fsls;
	u8 rx_sqrx;
	u8 compdis;
	u8 otg;
	bool enable_user_imp;
	u8 user_imp_value;
	enum exynos_usbphy_utmi utmi_clk;
};

/* SS PHY tune parameter */
struct exynos_usbphy_ss_tune {
	/* TX Swing Level*/
	u8 tx_boost_level;
	u8 tx_swing_level;
	u8 tx_swing_full;
	u8 tx_swing_low;
	/* TX De-Emphasis */
	u8 tx_deemphasis_mode;
	u8 tx_deemphasis_3p5db;
	u8 tx_deemphasis_6db;
	/* SSC Operation*/
	u8 enable_ssc;
	u8 ssc_range;
	/* Loss-of-Signal detector threshold level */
	u8 los_bias;
	/* Loss-of-Signal mask width */
	u16 los_mask_val;
	/* RX equalizer mode */
	u8 enable_fixed_rxeq_mode;
	u8 fix_rxeq_value;
	u8 decrease_ss_tx_imp;

	u8 set_crport_level_en;
	u8 set_crport_mpll_charge_pump;
	/* RX LFPS(decode) mode */
	u8 rx_decode_mode;
};

/**
 * struct exynos_usbphy_info : USBPHY information to share USBPHY CAL code
 * @version: PHY controller version
 *	     0x0100 - for EXYNOS_USB3 : EXYNOS7420, EXYNOS7890
 *	     0x0101 -			EXYNOS8890
 *	     0x0111 -			EXYNOS8895
 *	     0x0200 - for EXYNOS_USB2 : EXYNOS7580, EXYNOS3475
 *	     0x0210 -			EXYNOS8890_EVT1
 *	     0xF200 - for EXT	      : EXYNOS7420_HSIC
 * @refclk: reference clock frequency for USBPHY
 * @refsrc: reference clock source path for USBPHY
 * @use_io_for_ovc: use over-current notification io for USBLINK
 * @regs_base: base address of PHY control register *
 */

struct exynos_usbphy_info {
	struct device *dev;
	u32	version;
	enum exynos_usbphy_refclk refclk;
	enum exynos_usbphy_refsel refsel;

	bool use_io_for_ovc;
	bool common_block_disable;
	bool not_used_vbus_pad;

	void __iomem *regs_base;

	/* HS PHY tune parameter */
	struct exynos_usbphy_hs_tune *hs_tune;

	/* SS PHY tune parameter */
	struct exynos_usbphy_ss_tune *ss_tune;

	struct exynos_usb_tune_param *tune_param;
	/* multiple phy */
	int	hw_version;
	void __iomem *regs_base_2nd;
	int	used_phy_port;

	/* Alternative PHY REF_CLK source */
	bool alt_ref_clk;
	unsigned hs_rewa :1;
	bool dual_phy;
};



#endif	/* __PHY_SAMSUNG_USB_FW_CAL_H__ */
