4 * TI OMAP3 ISP - CSI PHY module
6 * Copyright (C) 2010 Nokia Corporation
7 * Copyright (C) 2009 Texas Instruments, Inc.
9 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
10 * Sakari Ailus <sakari.ailus@iki.fi>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
27 #ifndef OMAP3_ISP_CSI_PHY_H
28 #define OMAP3_ISP_CSI_PHY_H
30 struct isp_csi2_device
;
38 #define ISP_CSIPHY2_NUM_DATA_LANES 2
39 #define ISP_CSIPHY1_NUM_DATA_LANES 1
41 struct isp_csiphy_lanes_cfg
{
42 struct csiphy_lane data
[ISP_CSIPHY2_NUM_DATA_LANES
];
43 struct csiphy_lane clk
;
46 struct isp_csiphy_dphy_cfg
{
55 struct isp_device
*isp
;
56 struct mutex mutex
; /* serialize csiphy configuration */
58 struct isp_csi2_device
*csi2
;
59 struct regulator
*vdd
;
61 /* mem resources - enums as defined in enum isp_mem_resources */
62 unsigned int cfg_regs
;
63 unsigned int phy_regs
;
65 u8 num_data_lanes
; /* number of CSI2 Data Lanes supported */
66 struct isp_csiphy_lanes_cfg lanes
;
67 struct isp_csiphy_dphy_cfg dphy
;
70 int omap3isp_csiphy_acquire(struct isp_csiphy
*phy
);
71 void omap3isp_csiphy_release(struct isp_csiphy
*phy
);
72 int omap3isp_csiphy_init(struct isp_device
*isp
);
74 #endif /* OMAP3_ISP_CSI_PHY_H */