1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef ARCH_ARM_PLAT_OMAP4_ISS_H 2 #ifndef ARCH_ARM_PLAT_OMAP4_ISS_H 3 #define ARCH_ARM_PLAT_OMAP4_ISS_H 3 #define ARCH_ARM_PLAT_OMAP4_ISS_H 4 4 5 #include <linux/i2c.h> 5 #include <linux/i2c.h> 6 6 7 struct iss_device; 7 struct iss_device; 8 8 9 enum iss_interface_type { 9 enum iss_interface_type { 10 ISS_INTERFACE_CSI2A_PHY1, 10 ISS_INTERFACE_CSI2A_PHY1, 11 ISS_INTERFACE_CSI2B_PHY2, 11 ISS_INTERFACE_CSI2B_PHY2, 12 }; 12 }; 13 13 14 /** 14 /** 15 * struct iss_csiphy_lane: CSI2 lane position 15 * struct iss_csiphy_lane: CSI2 lane position and polarity 16 * @pos: position of the lane 16 * @pos: position of the lane 17 * @pol: polarity of the lane 17 * @pol: polarity of the lane 18 */ 18 */ 19 struct iss_csiphy_lane { 19 struct iss_csiphy_lane { 20 u8 pos; 20 u8 pos; 21 u8 pol; 21 u8 pol; 22 }; 22 }; 23 23 24 #define ISS_CSIPHY1_NUM_DATA_LANES 4 24 #define ISS_CSIPHY1_NUM_DATA_LANES 4 25 #define ISS_CSIPHY2_NUM_DATA_LANES 1 25 #define ISS_CSIPHY2_NUM_DATA_LANES 1 26 26 27 /** 27 /** 28 * struct iss_csiphy_lanes_cfg - CSI2 lane con 28 * struct iss_csiphy_lanes_cfg - CSI2 lane configuration 29 * @data: Configuration of one or two data lan 29 * @data: Configuration of one or two data lanes 30 * @clk: Clock lane configuration 30 * @clk: Clock lane configuration 31 */ 31 */ 32 struct iss_csiphy_lanes_cfg { 32 struct iss_csiphy_lanes_cfg { 33 struct iss_csiphy_lane data[ISS_CSIPHY 33 struct iss_csiphy_lane data[ISS_CSIPHY1_NUM_DATA_LANES]; 34 struct iss_csiphy_lane clk; 34 struct iss_csiphy_lane clk; 35 }; 35 }; 36 36 37 /** 37 /** 38 * struct iss_csi2_platform_data - CSI2 interf 38 * struct iss_csi2_platform_data - CSI2 interface platform data 39 * @crc: Enable the cyclic redundancy check 39 * @crc: Enable the cyclic redundancy check 40 * @vpclk_div: Video port output clock control 40 * @vpclk_div: Video port output clock control 41 */ 41 */ 42 struct iss_csi2_platform_data { 42 struct iss_csi2_platform_data { 43 unsigned crc:1; 43 unsigned crc:1; 44 unsigned vpclk_div:2; 44 unsigned vpclk_div:2; 45 struct iss_csiphy_lanes_cfg lanecfg; 45 struct iss_csiphy_lanes_cfg lanecfg; 46 }; 46 }; 47 47 48 struct iss_subdev_i2c_board_info { 48 struct iss_subdev_i2c_board_info { 49 struct i2c_board_info *board_info; 49 struct i2c_board_info *board_info; 50 int i2c_adapter_id; 50 int i2c_adapter_id; 51 }; 51 }; 52 52 53 struct iss_v4l2_subdevs_group { 53 struct iss_v4l2_subdevs_group { 54 struct iss_subdev_i2c_board_info *subd 54 struct iss_subdev_i2c_board_info *subdevs; 55 enum iss_interface_type interface; 55 enum iss_interface_type interface; 56 union { 56 union { 57 struct iss_csi2_platform_data 57 struct iss_csi2_platform_data csi2; 58 } bus; /* gcc < 4.6.0 chokes on anonym 58 } bus; /* gcc < 4.6.0 chokes on anonymous union initializers */ 59 }; 59 }; 60 60 61 struct iss_platform_data { 61 struct iss_platform_data { 62 struct iss_v4l2_subdevs_group *subdevs 62 struct iss_v4l2_subdevs_group *subdevs; 63 void (*set_constraints)(struct iss_dev 63 void (*set_constraints)(struct iss_device *iss, bool enable); 64 }; 64 }; 65 65 66 #endif 66 #endif 67 67
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.