This shows you the differences between two versions of the page.
|
tutorials:dvk521:documentations:a20:driver_porting_and_configuration [2013/12/10 15:34] waveshare created |
tutorials:dvk521:documentations:a20:driver_porting_and_configuration [2014/03/13 14:44] (current) waveshare |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| The I/O control driver is built as a module, can be used for controlling common peripherals, such as LED, push button, buzzer. | The I/O control driver is built as a module, can be used for controlling common peripherals, such as LED, push button, buzzer. | ||
| - | Copy [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/A20/Driver%20and%20API/Driver/|io_control_dev]] to your ubuntu system, compile it with your own system setting (refer to Appendix 1 "Compiling Driver Module"), and copy the generated io_control.ko file to the board, use the following command to load the driver module: | + | Copy [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/a20-cubieboard-dvk/Driver%20and%20API/driver/|io_control_dev]] to your ubuntu system, compile it with your own system setting (refer to Appendix 1 "Compiling Driver Module"), and copy the generated io_control.ko file to the board, use the following command to load the driver module: |
| $insmod io_control.ko | $insmod io_control.ko | ||
| Now you can start to try the I/O control API demo (refer to Appendix 2 "Running API Demo"). | Now you can start to try the I/O control API demo (refer to Appendix 2 "Running API Demo"). | ||
| Line 41: | Line 41: | ||
| Reboot the system, insert the DS18B20 device. | Reboot the system, insert the DS18B20 device. | ||
| - | Copy [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/A20/Driver%20and%20API/Driver/|ds18b20l_dev]] to your ubuntu system, compile it with your own system setting (refer to Appendix 1 "Compiling Driver Module"), and copy the generated w1-sun4i.ko file to the board, use the following command to load the driver: | + | Copy [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/a20-cubieboard-dvk/Driver%20and%20API/driver/|ds18b20_dev]] to your ubuntu system, compile it with your own system setting (refer to Appendix 1 "Compiling Driver Module"), and copy the generated w1-sun4i.ko file to the board, use the following command to load the driver: |
| $insmod w1-sun4i.ko | $insmod w1-sun4i.ko | ||
| Line 49: | Line 49: | ||
| {{..:Documentations-6_1.jpg}} | {{..:Documentations-6_1.jpg}} | ||
| + | |||
| ==== Porting I2C Bus Driver ==== | ==== Porting I2C Bus Driver ==== | ||
| Line 74: | Line 75: | ||
| twi1_scl = port:PB18<2><default><default><default> | twi1_scl = port:PB18<2><default><default><default> | ||
| twi1_sda = port:PB19<2><default><default><default> | twi1_sda = port:PB19<2><default><default><default> | ||
| - | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:DVK521:Documentations:A10:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] | + | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:DVK521:Documentations:A20:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] |
| Reboot the system. | Reboot the system. | ||
| - | For more info about testing the AT24/FM24 module, like reading/writing data, please refer to the document [[tutorials:DVK521:Documentations:A10:DVK521 User Manual|DVK521 User Manual]] and Appendix 2 "Running API Demo". | + | For more info about testing the AT24/FM24 module, like reading/writing data, please refer to the document [[tutorials:DVK521:Documentations:A20:DVK521 User Manual|DVK521 User Manual]] and Appendix 2 "Running API Demo". |
| Line 92: | Line 93: | ||
| depends on ARCH_SUN7I | depends on ARCH_SUN7I | ||
| help | help | ||
| - | Allwinner Soc SPI controller,present on SUN7I chips. | + | Allwinner Soc SPI controller,present on SUN7I chips. |
| - | + | | |
| config SUN7I_SPI_NDMA | config SUN7I_SPI_NDMA | ||
| - | bool "SUN7I SPI Normal DMA mode select" | + | bool "SUN7I SPI Normal DMA mode select" |
| - | depends on SPI_SUN7I | + | depends on SPI_SUN7I |
| - | help | + | help |
| - | This selects SPI DMA mode with DMA transfer | + | This selects SPI DMA mode with DMA transfer |
| - | Y select NDMA mode and N select DDMA mode | + | Y select NDMA mode and N select DDMA mode |
| #make menuconfig | #make menuconfig | ||
| Line 189: | Line 190: | ||
| lcd0_saturation = 57 | lcd0_saturation = 57 | ||
| lcd0_hue = 50 | lcd0_hue = 50 | ||
| - | lcd1_bright = 50 | + | lcd1_bright = 50 |
| lcd1_contrast = 50 | lcd1_contrast = 50 | ||
| - | lcd1_saturation = 57 | + | lcd1_saturation = 57 |
| - | lcd1_hue = 50 | + | lcd1_hue = 50 |
| - | [lcd0_para] | + | [lcd0_para] |
| - | lcd_used = 1 | + | lcd_used = 1 |
| - | lcd_x = 800 | + | lcd_x = 800 |
| - | lcd_y = 480 | + | lcd_y = 480 |
| - | lcd_dclk_freq = 33 | + | lcd_dclk_freq = 33 |
| - | lcd_pwm_not_used = 0 | + | lcd_pwm_not_used = 0 |
| - | lcd_pwm_ch = 0 | + | lcd_pwm_ch = 0 |
| - | lcd_pwm_freq = 10000 | + | lcd_pwm_freq = 10000 |
| - | lcd_pwm_pol = 0 | + | lcd_pwm_pol = 0 |
| - | lcd_max_bright = 240 | + | lcd_max_bright = 240 |
| - | lcd_min_bright = 64 | + | lcd_min_bright = 64 |
| - | lcd_if = 0 | + | lcd_if = 0 |
| - | lcd_hbp = 215 | + | lcd_hbp = 215 |
| - | lcd_ht = 1055 | + | lcd_ht = 1055 |
| - | lcd_vbp = 34 | + | lcd_vbp = 34 |
| - | lcd_vt = 1050 | + | lcd_vt = 1050 |
| - | lcd_vspw = 3 | + | lcd_vspw = 3 |
| - | lcd_hspw = 20 | + | lcd_hspw = 20 |
| - | lcd_hv_if = 0 | + | lcd_hv_if = 0 |
| - | lcd_hv_smode = 0 | + | lcd_hv_smode = 0 |
| - | lcd_hv_s888_if = 0 | + | lcd_hv_s888_if = 0 |
| - | lcd_hv_syuv_if = 0 | + | lcd_hv_syuv_if = 0 |
| - | lcd_lvds_ch = 0 | + | lcd_lvds_ch = 0 |
| - | lcd_lvds_mode = 0 | + | lcd_lvds_mode = 0 |
| - | lcd_lvds_bitwidth = 0 | + | lcd_lvds_bitwidth = 0 |
| - | lcd_lvds_io_cross = 0 | + | lcd_lvds_io_cross = 0 |
| - | lcd_cpu_if = 0 | + | lcd_cpu_if = 0 |
| - | lcd_frm = 1 | + | lcd_frm = 1 |
| - | lcd_io_cfg0 = 0 | + | lcd_io_cfg0 = 0 |
| - | lcd_gamma_correction_en = 0 | + | lcd_gamma_correction_en = 0 |
| - | lcd_gamma_tbl_0 = 0x0 | + | lcd_gamma_tbl_0 = 0x0 |
| - | lcd_gamma_tbl_1 = 0x10101 | + | lcd_gamma_tbl_1 = 0x10101 |
| - | lcd_gamma_tbl_255 = 0xffffff | + | lcd_gamma_tbl_255 = 0xffffff |
| - | lcd_bl_en_used = 1 | + | lcd_bl_en_used = 1 |
| - | lcd_bl_en = port:PH07<1><0><default><1> | + | lcd_bl_en = port:PH07<1><0><default><1> |
| - | lcd_power_used = 1 | + | lcd_power_used = 1 |
| - | lcd_power = port:PH08<1><0><default><1> | + | lcd_power = port:PH08<1><0><default><1> |
| - | lcd_pwm_used = 1 | + | lcd_pwm_used = 1 |
| - | lcd_pwm = port:PB02<2><0><default><default> | + | lcd_pwm = port:PB02<2><0><default><default> |
| - | lcd_gpio_0 = port:PH15<0><0><default><default> | + | lcd_gpio_0 = port:PH15<0><0><default><default> |
| - | lcd_gpio_1 = | + | lcd_gpio_1 = |
| - | lcd_gpio_2 = | + | lcd_gpio_2 = |
| - | lcd_gpio_3 = | + | lcd_gpio_3 = |
| - | lcdd0 = port:PD00<2><0><default><default> | + | lcdd0 = port:PD00<2><0><default><default> |
| - | lcdd1 = port:PD01<2><0><default><default> | + | lcdd1 = port:PD01<2><0><default><default> |
| - | lcdd2 = port:PD02<2><0><default><default> | + | lcdd2 = port:PD02<2><0><default><default> |
| - | lcdd3 = port:PD03<2><0><default><default> | + | lcdd3 = port:PD03<2><0><default><default> |
| - | lcdd4 = port:PD04<2><0><default><default> | + | lcdd4 = port:PD04<2><0><default><default> |
| - | lcdd5 = port:PD05<2><0><default><default> | + | lcdd5 = port:PD05<2><0><default><default> |
| - | lcdd6 = port:PD06<2><0><default><default> | + | lcdd6 = port:PD06<2><0><default><default> |
| - | lcdd7 = port:PD07<2><0><default><default> | + | lcdd7 = port:PD07<2><0><default><default> |
| - | lcdd8 = port:PD08<2><0><default><default> | + | lcdd8 = port:PD08<2><0><default><default> |
| - | lcdd9 = port:PD09<2><0><default><default> | + | lcdd9 = port:PD09<2><0><default><default> |
| - | lcdd10 = port:PD10<2><0><default><default> | + | lcdd10 = port:PD10<2><0><default><default> |
| - | lcdd11 = port:PD11<2><0><default><default> | + | lcdd11 = port:PD11<2><0><default><default> |
| - | lcdd12 = port:PD12<2><0><default><default> | + | lcdd12 = port:PD12<2><0><default><default> |
| - | lcdd13 = port:PD13<2><0><default><default> | + | lcdd13 = port:PD13<2><0><default><default> |
| - | lcdd14 = port:PD14<2><0><default><default> | + | lcdd14 = port:PD14<2><0><default><default> |
| - | lcdd15 = port:PD15<2><0><default><default> | + | lcdd15 = port:PD15<2><0><default><default> |
| - | lcdd16 = port:PD16<2><0><default><default> | + | lcdd16 = port:PD16<2><0><default><default> |
| - | lcdd17 = port:PD17<2><0><default><default> | + | lcdd17 = port:PD17<2><0><default><default> |
| - | lcdd18 = port:PD18<2><0><default><default> | + | lcdd18 = port:PD18<2><0><default><default> |
| - | lcdd19 = port:PD19<2><0><default><default> | + | lcdd19 = port:PD19<2><0><default><default> |
| - | lcdd20 = port:PD20<2><0><default><default> | + | lcdd20 = port:PD20<2><0><default><default> |
| - | lcdd21 = port:PD21<2><0><default><default> | + | lcdd21 = port:PD21<2><0><default><default> |
| - | lcdd22 = port:PD22<2><0><default><default> | + | lcdd22 = port:PD22<2><0><default><default> |
| - | lcdd23 = port:PD23<2><0><default><default> | + | lcdd23 = port:PD23<2><0><default><default> |
| - | lcdclk = port:PD24<2><0><default><default> | + | lcdclk = port:PD24<2><0><default><default> |
| - | lcdde = port:PD25<2><0><default><default> | + | lcdde = port:PD25<2><0><default><default> |
| - | lcdhsync = port:PD26<2><0><default><default> | + | lcdhsync = port:PD26<2><0><default><default> |
| - | lcdvsync = port:PD27<2><0><default><default> | + | lcdvsync = port:PD27<2><0><default><default> |
| Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document <4. Prepare for Kernel and Drivers Porting>) | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document <4. Prepare for Kernel and Drivers Porting>) | ||
| Line 273: | Line 274: | ||
| ==== Porting CTP Driver ==== | ==== Porting CTP Driver ==== | ||
| === Config the Kernel === | === Config the Kernel === | ||
| - | linux-sunxi-sunxi-3.4.61 includes several capacitive touch panel drivers, such as FT5206/FT5406 driver, Goodix driver. The driver file can be found on drivers/input/touchscreen. | + | Our capacitive touch screen integrates FT5206 as the touch controller, and the related driver file is ft5x_ts.c. Unfortunately the original ft5x_ts.c in linux-sunxi-sunxi-3.4.61 kernel doesn’t support A20, therefore, copy the new ft5x_ts.c [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/A20/driver%20source/|ft5x_ts.c]] to the drivers/input/touchscreen directory in kernel and replace the original one. Besides, the touch screen interrupt pin ctp_int_port requires GPIO interrupts, make sure the GPIO driver is included when configuring. |
| Config the Kernel to include touchscreen driver: | Config the Kernel to include touchscreen driver: | ||
| Line 281: | Line 282: | ||
| [*] Touchscreens ---> | [*] Touchscreens ---> | ||
| <*> ft5x touchscreen driver | <*> ft5x touchscreen driver | ||
| + | | ||
| + | Device Drivers ---> | ||
| + | [*] GPIO Support ---> | ||
| + | <*> GPIO Support for sunxi platform | ||
| + | |||
| Re-compile the kernel: | Re-compile the kernel: | ||
| #make uImage | #make uImage | ||
| - | Replace the earlier uImage on the board with the new generated uImage under arch/arm/boot/ directory via NFS. (for more info, refer to the document [[tutorials:DVK521:Documentations:A10:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] | + | Replace the earlier uImage on the board with the new generated uImage under arch/arm/boot/ directory via NFS. (for more info, refer to the document [[tutorials:DVK521:Documentations:A20:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] |
| === Config the script.fex === | === Config the script.fex === | ||
| Since the touch screen is connected to I2C1 controller, make sure the I2C driver has been ported (refer to the previous section "Porting I2C Bus Driver"). | Since the touch screen is connected to I2C1 controller, make sure the I2C driver has been ported (refer to the previous section "Porting I2C Bus Driver"). | ||
| - | Config the [ctp_para] setting in script.fex. | + | Config the [ctp_para],[ctp_list_para],and[gpio_para] setting in script.fex. |
| ctp_name:driver name | ctp_name:driver name | ||
| ctp_twi_id:I2C controller which is actually used | ctp_twi_id:I2C controller which is actually used | ||
| Line 311: | Line 317: | ||
| ctp_revert_y_flag = 1 | ctp_revert_y_flag = 1 | ||
| ctp_exchange_x_y_flag = 0 | ctp_exchange_x_y_flag = 0 | ||
| - | ctp_int_port = port:PH7<6><default> | + | ctp_firm = 1 |
| ctp_wakeup = port:PB13<1><default><default><1> | ctp_wakeup = port:PB13<1><default><default><1> | ||
| - | ctp_io_port = port:PH7<0><default> | + | |
| - | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:DVK521:Documentations:A10:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] | + | [ctp_list_para] |
| + | ctp_det_used = 1 | ||
| + | ft5x_ts = 1 | ||
| + | gt82x = 0 | ||
| + | gslX680 = 0 | ||
| + | gt9xx_ts = 0 | ||
| + | gt811 = 0 | ||
| + | |||
| + | [gpio_para] | ||
| + | gpio_pin_3 = port:PH07<6><default><default><default> | ||
| + | |||
| + | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:DVK521:Documentations:A20:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] | ||
| Connect the 7inch capacitive LCD, reboot the system, try to touch the icons on the screen. | Connect the 7inch capacitive LCD, reboot the system, try to touch the icons on the screen. | ||
| Line 322: | Line 339: | ||
| [disp_init] | [disp_init] | ||
| disp_init_enable = 1 | disp_init_enable = 1 | ||
| - | disp_mode = 0 | + | disp_mode = 0 |
| screen0_output_type = 4 | screen0_output_type = 4 | ||
| - | screen0_output_mode = 4 | + | screen0_output_mode = 4 |
| - | + | screen1_output_type = 0 | |
| - | screen1_output_type = 2 | + | screen1_output_mode = 4 |
| - | screen1_output_mode = 14 | + | fb0_width = 1024 |
| + | fb0_height = 768 | ||
| fb0_framebuffer_num = 2 | fb0_framebuffer_num = 2 | ||
| fb0_format = 10 | fb0_format = 10 | ||
| fb0_pixel_sequence = 0 | fb0_pixel_sequence = 0 | ||
| - | fb0_scaler_mode_enable = 1 | + | fb0_scaler_mode_enable = 0 |
| + | fb1_width = 1024 | ||
| + | fb1_height = 768 | ||
| fb1_framebuffer_num = 2 | fb1_framebuffer_num = 2 | ||
| fb1_format = 10 | fb1_format = 10 | ||
| fb1_pixel_sequence = 0 | fb1_pixel_sequence = 0 | ||
| - | fb1_scaler_mode_enable = 1 | + | fb1_scaler_mode_enable = 0 |
| + | lcd0_backlight = 197 | ||
| + | lcd1_backlight = 197 | ||
| + | lcd0_bright = 50 | ||
| + | lcd0_contrast = 50 | ||
| + | lcd0_saturation = 57 | ||
| + | lcd0_hue = 50 | ||
| + | lcd1_bright = 50 | ||
| + | lcd1_contrast = 50 | ||
| + | lcd1_saturation = 57 | ||
| + | lcd1_hue = 50 | ||
| Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document <4. Prepare for Kernel and Drivers Porting>) | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document <4. Prepare for Kernel and Drivers Porting>) | ||
| Line 349: | Line 377: | ||
| screen0_output_type = 3 | screen0_output_type = 3 | ||
| screen0_output_mode = 5 | screen0_output_mode = 5 | ||
| - | screen1_output_type = 1 | + | screen1_output_type = 0 |
| screen1_output_mode = 4 | screen1_output_mode = 4 | ||
| + | fb0_width = 1024 | ||
| + | fb0_height = 768 | ||
| + | fb0_framebuffer_num = 2 | ||
| + | fb0_format = 10 | ||
| + | fb0_pixel_sequence = 0 | ||
| + | fb0_scaler_mode_enable = 0 | ||
| + | fb1_width = 1024 | ||
| + | fb1_height = 768 | ||
| + | fb1_framebuffer_num = 2 | ||
| + | fb1_format = 10 | ||
| + | fb1_pixel_sequence = 0 | ||
| + | fb1_scaler_mode_enable = 0 | ||
| + | lcd0_backlight = 197 | ||
| + | lcd1_backlight = 197 | ||
| + | lcd0_bright = 50 | ||
| + | lcd0_contrast = 50 | ||
| + | lcd0_saturation = 57 | ||
| + | lcd0_hue = 50 | ||
| + | lcd1_bright = 50 | ||
| + | lcd1_contrast = 50 | ||
| + | lcd1_saturation = 57 | ||
| + | lcd1_hue = 50 | ||
| + | |||
| Reboot the system, now the HDMI can be used for displaying. | Reboot the system, now the HDMI can be used for displaying. | ||
| Line 401: | Line 452: | ||
| sun4i_csi1.ko: | sun4i_csi1.ko: | ||
| /lib/modules/3.4.61+/kernel/drivers/media/video/sun4i_csi/csi1 | /lib/modules/3.4.61+/kernel/drivers/media/video/sun4i_csi/csi1 | ||
| - | Replace the earlier uImage on the board with the new generated uImage under arch/arm/boot/ directory via NFS. (for more info, refer to the document [[tutorials:DVK521:Documentations:A10:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] | + | Replace the earlier uImage on the board with the new generated uImage under arch/arm/boot/ directory via NFS. (for more info, refer to the document [[tutorials:DVK521:Documentations:A20:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] |
| Copy the above 4 driver files to the board, and install them in order: | Copy the above 4 driver files to the board, and install them in order: | ||
| Line 411: | Line 462: | ||
| === Config the script.fex === | === Config the script.fex === | ||
| - | Since our OV7670 camera is connected to the CSI1 controller, config the [csi1_para] setting in script.fex. The suffix _b in the parameter name indicates that this is a secondary camera parameter while two cameras were connected to the same CSI. | + | Since our OV7670 camera is connected to the CSI1 controller, config the [csi1_para] and [camera_list_para] setting in script.fex. The suffix _b in the parameter name indicates that this is a secondary camera parameter while two cameras were connected to the same CSI. |
| The parameters are interpreted as follows: | The parameters are interpreted as follows: | ||
| Line 458: | Line 509: | ||
| [csi1_para] | [csi1_para] | ||
| csi_used = 1 | csi_used = 1 | ||
| - | csi_mode = 0 | ||
| csi_dev_qty = 1 | csi_dev_qty = 1 | ||
| csi_stby_mode = 0 | csi_stby_mode = 0 | ||
| csi_mname = "ov7670" | csi_mname = "ov7670" | ||
| - | csi_twi_id = 1 | ||
| - | csi_twi_addr = 0x42 | ||
| csi_if = 0 | csi_if = 0 | ||
| - | csi_vflip = 1 | + | csi_iovdd = "axp20_pll" |
| - | csi_hflip = 0 | + | |
| - | csi_iovdd = "" | + | |
| csi_avdd = "" | csi_avdd = "" | ||
| csi_dvdd = "" | csi_dvdd = "" | ||
| + | csi_vol_iovdd = 2800 | ||
| + | csi_vol_dvdd = | ||
| + | csi_vol_avdd = | ||
| + | csi_vflip = 1 | ||
| + | csi_hflip = 0 | ||
| csi_flash_pol = 1 | csi_flash_pol = 1 | ||
| - | csi_mname_b = "" | + | csi_facing = 1 |
| - | csi_twi_id_b = 0 | + | csi_twi_id = 1 |
| - | csi_twi_addr_b = 0x78 | + | csi_twi_addr = 0x42 |
| - | csi_if_b = 0 | + | |
| - | csi_vflip_b = 1 | + | |
| - | csi_hflip_b = 0 | + | |
| - | csi_iovdd_b = "" | + | |
| - | csi_avdd_b = "" | + | |
| - | csi_dvdd_b = "" | + | |
| - | csi_flash_pol_b = 1 | + | |
| csi_pck = port:PG00<3><default><default><default> | csi_pck = port:PG00<3><default><default><default> | ||
| csi_ck = port:PG01<3><default><default><default> | csi_ck = port:PG01<3><default><default><default> | ||
| csi_hsync = port:PG02<3><default><default><default> | csi_hsync = port:PG02<3><default><default><default> | ||
| csi_vsync = port:PG03<3><default><default><default> | csi_vsync = port:PG03<3><default><default><default> | ||
| - | csi_field = | ||
| csi_d0 = port:PG04<3><default><default><default> | csi_d0 = port:PG04<3><default><default><default> | ||
| csi_d1 = port:PG05<3><default><default><default> | csi_d1 = port:PG05<3><default><default><default> | ||
| Line 494: | Line 537: | ||
| csi_d6 = port:PG10<3><default><default><default> | csi_d6 = port:PG10<3><default><default><default> | ||
| csi_d7 = port:PG11<3><default><default><default> | csi_d7 = port:PG11<3><default><default><default> | ||
| - | csi_d8 = | + | csi_reset = port:PH13<1><default><default><0> |
| - | csi_d9 = | + | csi_power_en = port:PH16<1><default><default><0> |
| - | csi_d10 = | + | csi_stby = port:PH19<1><default><default><0> |
| - | csi_d11 = | + | |
| - | csi_d12 = | + | [camera_list_para] |
| - | csi_d13 = | + | camera_list_para_used = 1 |
| - | csi_d14 = | + | ov7670 = 1 |
| - | csi_d15 = | + | gc0308 = 0 |
| - | csi_d16 = | + | gt2005 = 0 |
| - | csi_d17 = | + | hi704 = 0 |
| - | csi_d18 = | + | sp0838 = 0 |
| - | csi_d19 = | + | mt9m112 = 0 |
| - | csi_d20 = | + | mt9m113 = 0 |
| - | csi_d21 = | + | ov2655 = 0 |
| - | csi_d22 = | + | hi253 = 0 |
| - | csi_d23 = | + | gc0307 = 0 |
| - | csi_reset = port:PH14<1><default><default><0> | + | mt9d112 = 0 |
| - | csi_power_en = | + | ov5640 = 0 |
| - | csi_stby = port:PH17<1><default><default><0> | + | gc2015 = 0 |
| - | csi_flash = | + | ov2643 = 0 |
| - | csi_af_en = | + | gc0329 = 0 |
| - | csi_reset_b = | + | gc0309 = 0 |
| - | csi_power_en_b = | + | tvp5150 = 0 |
| - | csi_stby_b = | + | s5k4ec = 0 |
| - | csi_flash_b = | + | ov5650_mv9335 = 0 |
| - | csi_af_en_b = | + | siv121d = 0 |
| - | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:DVK521:Documentations:A10:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] | + | gc2035 = 0 |
| + | |||
| + | Then convert it into script.bin format by using fex2bin, and replace the earlier script.bin on the board. (for more info, refer to the document [[tutorials:DVK521:Documentations:A20:Prepare for Kernel and Drivers Porting|Prepare for Kernel and Drivers Porting]] | ||
| Connect the OV7670 camera module and the LCD to the board, reboot the system. | Connect the OV7670 camera module and the LCD to the board, reboot the system. | ||
| Line 527: | Line 572: | ||
| ==== Appendix 1: Compiling Driver Module ==== | ==== Appendix 1: Compiling Driver Module ==== | ||
| - | The provided xx.ko files under [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/A10/Driver%20and%20API/Driver/|Driver]] is compiled to run on our system image only. | + | The provided xx.ko files under [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/a20-cubieboard-dvk/Driver%20and%20API/driver/|Driver]] is compiled to run on our system image only. |
| If the drivers are going to being loaded on your own system, they need to be re-compiled according to you system kernel path. | If the drivers are going to being loaded on your own system, they need to be re-compiled according to you system kernel path. | ||
| Line 533: | Line 578: | ||
| Use the io_control_dev.ko for demonstration. | Use the io_control_dev.ko for demonstration. | ||
| - | 1.1 Copy the [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/A10/Driver%20and%20API/Driver/|io_control_dev]] to ubuntu, assume the target directory is /home/waveshare/cubieboard/waveshare_demo/driver . | + | 1.1 Copy the [[http://dl.cubieboard.org/parteners/waveshare/Source_Code/a20-cubieboard-dvk/Driver%20and%20API/driver/|io_control_dev]] to ubuntu, assume the target directory is /home/waveshare/cubieboard2/waveshare_demo/driver . |
| Modify the files permission: | Modify the files permission: | ||
| - | #cd /home/waveshare/cubieboard/waveshare_demo/driver/io_control_dev | + | #cd /home/waveshare/cubieboard2/waveshare_demo/driver/io_control_dev |
| - | {{..:Documentations-6_2.jpg}} | + | {{:tutorials:dvk521:documentations:a20:a20_6_1.jpg}} |
| #chmod 777 ./* | #chmod 777 ./* | ||
| | | ||
| 1.2 Modify the Makefile | 1.2 Modify the Makefile | ||
| #vi Makefile | #vi Makefile | ||
| - | {{..:Documentations-6_3.jpg}} | + | {{:tutorials:dvk521:documentations:a20:a20_6_2.jpg}} |
| Assign the KERNELDIR according to your actual kernel path. | Assign the KERNELDIR according to your actual kernel path. | ||
| 1.3 Clear the old files | 1.3 Clear the old files | ||
| #make clean | #make clean | ||
| - | {{..:Documentations-6_4.jpg}} | + | {{:tutorials:dvk521:documentations:a20:a20_6_3.jpg}} |
| 1.4 Compile | 1.4 Compile | ||
| Line 556: | Line 602: | ||
| make: *** [modules] Error 1 | make: *** [modules] Error 1 | ||
| As shown in the picture below: | As shown in the picture below: | ||
| - | {{..:Documentations-6_5.jpg}} | + | |
| + | {{:tutorials:dvk521:documentations:a20:a20_6_4.jpg}} | ||
| It is caused by the different kernel version, can be just omitted. | It is caused by the different kernel version, can be just omitted. | ||
| - | {{..:Documentations-6_6.jpg}} | + | {{:tutorials:dvk521:documentations:a20:a20_6_5.jpg}} |
| Copy the new generated io_control.ko file to your own system and load it. | Copy the new generated io_control.ko file to your own system and load it. | ||