--- /dev/null
+#include "rk312x.dtsi"
+#include "rk312x-pinctrl.dtsi"
+#include "../../mach-rockchip/rk_camera_sensor_info.h"
+/{
+ rk3126_cif_sensor: rk3126_cif_sensor{
+ compatible = "rockchip,sensor";
+ status = "disabled";
+ CONFIG_SENSOR_POWER_IOCTL_USR = <1>;
+ CONFIG_SENSOR_RESET_IOCTL_USR = <0>;
+ CONFIG_SENSOR_POWERDOWN_IOCTL_USR = <0>;
+ CONFIG_SENSOR_FLASH_IOCTL_USR = <0>;
+ CONFIG_SENSOR_AF_IOCTL_USR = <0>;
+
+ ov2659{
+ is_front = <1>;
+ rockchip,powerdown = <&gpio3 GPIO_B3 GPIO_ACTIVE_HIGH>;
+ pwdn_active = <ov2659_PWRDN_ACTIVE>;
+ #rockchip,power = <>;
+ #pwr_active = <>;
+ #rockchip,reset = <>;
+ #rst_active = <>;
+ mir = <0>;
+ flash_attach = <0>;
+ resolution = <ov2659_FULL_RESOLUTION>;
+ powerup_sequence = <ov2659_PWRSEQ>;
+ orientation = <0>;
+ i2c_add = <ov2659_I2C_ADDR>;
+ i2c_rata = <100000>;
+ i2c_chl = <1>;
+ cif_chl = <0>;
+ mclk_rate = <24>;
+ };
+ gc0329{
+ is_front = <1>;
+ rockchip,powerdown = <&gpio3 GPIO_B3 GPIO_ACTIVE_HIGH>;
+ pwdn_active = <gc0329_PWRDN_ACTIVE>;
+ #rockchip,power = <>;
+ #pwr_active = <>;
+ #rockchip,reset = <>;
+ #rst_active = <>;
+ mir = <0>;
+ flash_attach = <0>;
+ resolution = <gc0329_FULL_RESOLUTION>;
+ powerup_sequence = <gc0329_PWRSEQ>;
+ orientation = <0>;
+ i2c_add = <gc0329_I2C_ADDR>;
+ i2c_rata = <100000>;
+ i2c_chl = <1>;
+ cif_chl = <0>;
+ mclk_rate = <24>;
+ };
+ };
+};
+
status = "disabled";
};
};
+
+&rk3126_cif_sensor{
+ status = "okay";
+};
--- /dev/null
+#include "rk312x.dtsi"
+#include "rk312x-pinctrl.dtsi"
+#include "../../mach-rockchip/rk_camera_sensor_info.h"
+/{
+ rk3128_cif_sensor: rk3128_cif_sensor{
+ compatible = "rockchip,sensor";
+ status = "disabled";
+ CONFIG_SENSOR_POWER_IOCTL_USR = <1>;
+ CONFIG_SENSOR_RESET_IOCTL_USR = <0>;
+ CONFIG_SENSOR_POWERDOWN_IOCTL_USR = <0>;
+ CONFIG_SENSOR_FLASH_IOCTL_USR = <0>;
+ CONFIG_SENSOR_AF_IOCTL_USR = <0>;
+
+ ov2659{
+ is_front = <1>;
+ rockchip,powerdown = <&gpio3 GPIO_D7 GPIO_ACTIVE_HIGH>;
+ pwdn_active = <ov2659_PWRDN_ACTIVE>;
+ #rockchip,power = <>;
+ #pwr_active = <>;
+ #rockchip,reset = <>;
+ #rst_active = <>;
+ mir = <0>;
+ flash_attach = <0>;
+ resolution = <ov2659_FULL_RESOLUTION>;
+ powerup_sequence = <ov2659_PWRSEQ>;
+ orientation = <0>;
+ i2c_add = <ov2659_I2C_ADDR>;
+ i2c_rata = <100000>;
+ i2c_chl = <0>;
+ cif_chl = <0>;
+ mclk_rate = <24>;
+ };
+ gc0329{
+ is_front = <1>;
+ rockchip,powerdown = <&gpio3 GPIO_D7 GPIO_ACTIVE_HIGH>;
+ pwdn_active = <gc0329_PWRDN_ACTIVE>;
+ #rockchip,power = <>;
+ #pwr_active = <>;
+ #rockchip,reset = <>;
+ #rst_active = <>;
+ mir = <0>;
+ flash_attach = <0>;
+ resolution = <gc0329_FULL_RESOLUTION>;
+ powerup_sequence = <gc0329_PWRSEQ>;
+ orientation = <0>;
+ i2c_add = <gc0329_I2C_ADDR>;
+ i2c_rata = <100000>;
+ i2c_chl = <0>;
+ cif_chl = <0>;
+ mclk_rate = <24>;
+ };
+ };
+};
+
gpio_debug = <1>;
codec_hp_det = <0>;
};
+
+&rk3128_cif_sensor{
+ status = "okay";
+};
+
+++ /dev/null
-#include "rk312x.dtsi"
-#include "rk312x-pinctrl.dtsi"
-#include "../../mach-rockchip/rk_camera_sensor_info.h"
-/{
- cif_sensor: cif_sensor{
- compatible = "rockchip,sensor";
- CONFIG_SENSOR_POWER_IOCTL_USR = <1>;
- CONFIG_SENSOR_RESET_IOCTL_USR = <0>;
- CONFIG_SENSOR_POWERDOWN_IOCTL_USR = <0>;
- CONFIG_SENSOR_FLASH_IOCTL_USR = <0>;
- CONFIG_SENSOR_AF_IOCTL_USR = <0>;
-
- ov2659{
- is_front = <1>;
- rockchip,powerdown = <&gpio3 GPIO_D7 GPIO_ACTIVE_HIGH>;
- #pwdn_active = <>;
- #rockchip,power = <>;
- #pwr_active = <>;
- #rockchip,reset = <>;
- #rst_active = <>;
- mir = <0>;
- flash_attach = <0>;
- resolution = <ov2659_FULL_RESOLUTION>;
- pwdn_info = <ov2659_PWRDN_ACTIVE>;
- powerup_sequence = <ov2659_PWRSEQ>;
- orientation = <0>;
- i2c_add = <ov2659_I2C_ADDR>;
- i2c_rata = <100000>;
- i2c_chl = <0>;
- cif_chl = <0>;
- mclk_rate = <24>;
- };
- gc0329{
- is_front = <1>;
- rockchip,powerdown = <&gpio3 GPIO_D7 GPIO_ACTIVE_HIGH>;
- #pwdn_active = <>;
- #rockchip,power = <>;
- #pwr_active = <>;
- #rockchip,reset = <>;
- #rst_active = <>;
- mir = <0>;
- flash_attach = <0>;
- resolution = <gc0329_FULL_RESOLUTION>;
- pwdn_info = <gc0329_PWRDN_ACTIVE>;
- powerup_sequence = <gc0329_PWRSEQ>;
- orientation = <0>;
- i2c_add = <gc0329_I2C_ADDR>;
- i2c_rata = <100000>;
- i2c_chl = <0>;
- cif_chl = <0>;
- mclk_rate = <24>;
- };
- };
-};
-
/dts-v1/;
#include "rk312x.dtsi"
+#include "rk3126-cif-sensor.dtsi"
+#include "rk3128-cif-sensor.dtsi"
-#include "rk312x-cif-sensor.dtsi"
/ {
fiq-debugger {
status = "okay";
status = "okay";
};
};
+&i2c1 {
+ status = "okay";
+};
+
&i2c2 {
status = "okay";
ts@55 {
status = "okay";
};
-&cif_sensor{
- status = "okay";
-};
for_each_child_of_node(np, cp) {\r
u32 flash_attach = 0,mir = 0,i2c_rata = 0,i2c_chl = 0,i2c_add = 0;\r
u32 cif_chl = 0, mclk_rate = 0, is_front = 0;\r
- u32 resolution = 0, pwdn_info = 0, powerup_sequence = 0;\r
+ u32 resolution = 0, powerup_sequence = 0;\r
\r
u32 powerdown = INVALID_GPIO,power = INVALID_GPIO,reset = INVALID_GPIO;\r
u32 af = INVALID_GPIO,flash = INVALID_GPIO;\r
if (of_property_read_u32(cp, "resolution", &resolution)) {\r
printk("%s:Get %s rockchip,resolution failed!\n",__func__, cp->name); \r
}\r
- if (of_property_read_u32(cp, "pwdn_info", &pwdn_info)) {\r
- printk("%s:Get %s rockchip,pwdn_info failed!\n",__func__, cp->name); \r
- }\r
if (of_property_read_u32(cp, "powerup_sequence", &powerup_sequence)) {\r
printk("%s:Get %s rockchip,powerup_sequence failed!\n",__func__, cp->name); \r
}\r
new_camera->mirror = mir;\r
new_camera->i2c_rate = i2c_rata;\r
new_camera->flash = flash_attach;\r
- new_camera->pwdn_info = ((pwdn_info&0x10)|0x01);\r
+ new_camera->pwdn_info = ((pwdn_active&0x10)|0x01);\r
new_camera->powerup_sequence = powerup_sequence;\r
new_camera->mclk_rate = mclk_rate;\r
new_camera->of_node = cp;\r
config GC0329
tristate "gc0329,support"
+ default y
config GC2015
tristate "gc2015,support"
*v0.1.1:
1. spin lock in struct rk_cif_clk is not neccessary,and scheduled func clk_get called in this spin lock scope
cause warning, so remove this spin lock .
+*v0.1.2:
+ 1. rk3126 and rk3128 use different dts file.
*/
-#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 1, 0x1)
+#define RK_CAM_VERSION_CODE KERNEL_VERSION(0, 1, 0x2)
static int version = RK_CAM_VERSION_CODE;
module_param(version, int, S_IRUGO);
int ctrl_reg,inten_reg,crop_reg,set_size_reg,for_reg,vir_line_width_reg,scl_reg,y_reg,uv_reg;
u32 RK_CRU_SOFTRST_CON = 0;
debug_printk( "/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: %s:%i-------%s()\n", __FILE__, __LINE__,__FUNCTION__);
- printk("&&&&&&&&&&&&&&&&&&&%s&&&&&&&&&&&&&&&\n",pcdev->pdata->rockchip_name);
if(strstr(pcdev->pdata->rockchip_name,"3128")||strstr(pcdev->pdata->rockchip_name,"3126"))
RK_CRU_SOFTRST_CON = RK312X_CRU_SOFTRSTS_CON(6);