linux/include/linux/usb/isp1301.h

// SPDX-License-Identifier: GPL-2.0
/*
 * NXP ISP1301 USB transceiver driver
 *
 * Copyright (C) 2012 Roland Stigge <[email protected]>
 */

#ifndef __LINUX_USB_ISP1301_H
#define __LINUX_USB_ISP1301_H

#include <linux/of.h>

/* I2C Register definitions: */

#define ISP1301_I2C_MODE_CONTROL_1

#define MC1_SPEED_REG
#define MC1_SUSPEND_REG
#define MC1_DAT_SE0
#define MC1_TRANSPARENT
#define MC1_BDIS_ACON_EN
#define MC1_OE_INT_EN
#define MC1_UART_EN
#define MC1_MASK

#define ISP1301_I2C_MODE_CONTROL_2

#define MC2_GLOBAL_PWR_DN
#define MC2_SPD_SUSP_CTRL
#define MC2_BI_DI
#define MC2_TRANSP_BDIR0
#define MC2_TRANSP_BDIR1
#define MC2_AUDIO_EN
#define MC2_PSW_EN
#define MC2_EN2V7

#define ISP1301_I2C_OTG_CONTROL_1

#define OTG1_DP_PULLUP
#define OTG1_DM_PULLUP
#define OTG1_DP_PULLDOWN
#define OTG1_DM_PULLDOWN
#define OTG1_ID_PULLDOWN
#define OTG1_VBUS_DRV
#define OTG1_VBUS_DISCHRG
#define OTG1_VBUS_CHRG

#define ISP1301_I2C_OTG_CONTROL_2

#define OTG_B_SESS_END
#define OTG_B_SESS_VLD

#define ISP1301_I2C_INTERRUPT_SOURCE
#define ISP1301_I2C_INTERRUPT_LATCH
#define ISP1301_I2C_INTERRUPT_FALLING
#define ISP1301_I2C_INTERRUPT_RISING

#define INT_VBUS_VLD
#define INT_SESS_VLD
#define INT_DP_HI
#define INT_ID_GND
#define INT_DM_HI
#define INT_ID_FLOAT
#define INT_BDIS_ACON
#define INT_CR_INT

#define ISP1301_I2C_REG_CLEAR_ADDR

struct i2c_client *isp1301_get_client(struct device_node *node);

#endif /* __LINUX_USB_ISP1301_H */