1 /* 2 * drivers/usb/sunxi_usb/usbc/usbc_i.h 3 * (C) Copyright 2010-2015 4 * Allwinner Technology Co., Ltd. <www.allwinnertech.com> 5 * daniel, 2009.09.15 6 * 7 * usb common ops. 8 * 9 * This program is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU General Public License as 11 * published by the Free Software Foundation; either version 2 of 12 * the License, or (at your option) any later version. 13 * 14 */ 15 16 #ifndef __USBC_I_H__ 17 #define __USBC_I_H__ 18 19 #include "../include/sunxi_usb_config.h" 20 21 #define USBC_MAX_OPEN_NUM 1 22 23 void __iomem *get_otgc_vbase(void); 24 25 /* record USB common info */ 26 typedef struct __fifo_info { 27 void __iomem *port0_fifo_addr; 28 __u32 port0_fifo_size; 29 30 void __iomem *port1_fifo_addr; 31 __u32 port1_fifo_size; 32 33 void __iomem *port2_fifo_addr; 34 __u32 port2_fifo_size; 35 } __fifo_info_t; 36 37 /* record current USB port's all hardware info */ 38 typedef struct __usbc_otg { 39 __u32 port_num; 40 void __iomem *base_addr; /* usb base address */ 41 42 __u32 used; /* is used or not */ 43 __u32 no; /* index in manager table */ 44 } __usbc_otg_t; 45 46 47 /* PHYS EFUSE offest */ 48 #define EFUSE_OFFSET 0x18 //esuse offset 49 #define SUNXI_USB_PHY_EFUSE_ADJUST 0x10000 //bit16 50 #define SUNXI_USB_PHY_EFUSE_MODE 0x20000 //bit17 51 #define SUNXI_USB_PHY_EFUSE_RES 0x3C0000 //bit18-21 52 #define SUNXI_USB_PHY_EFUSE_COM 0x1C00000 //bit22-24 53 #define SUNXI_USB_PHY_EFUSE_USB0TX 0x1C00000 //bit22-24 54 #define SUNXI_USB_PHY_EFUSE_USB1TX 0xE000000 //bit25-27 55 56 #endif /* __USBC_I_H__ */ 57 58