Home

Porting Drivers

image

Contents

1. Cubieboard therefore we connect the 7inch capacitive LCD to the LCDO controller Configure the script fex dis_init setting for display device initialization and IcdO_para setting for LCD parameters depending on the specifications of concrete LCD as follows disp_init disp init enable 1 disp mode 0 screenO output type 1 Shenzhen Waveshare Electronics Co Ltd www waveshare com 7 screenO output mode 4 screen1 output type 0 screen1 output mode 4 fbO width 1024 fbO height 768 fbO framebuffer num 2 fbO format 10 fbO pixel sequence 0 fbO scaler mode enable 0 fb1 width 1024 fb1 height 768 fbi framebuffer num 2 fb1 format 10 fb1 pixel sequence 0 fb1 scaler mode enable 0 IcdO backlight 197 Icd1_backlight 197 IcdO_bright 50 IcdO contrast 50 IcdO_saturation 57 IcdO hue 50 Icd1 bright 50 lcd1 contrast 50 lcd1 saturation 57 Icd1 hue 50 IcdO para lcd used 1 lcd x 1024 lcd y 600 Icd dclk freq 51 Icd pwm not used 0 Icd pwm ch 0 Icd pwm freq 10000 Icd pwm pol 0 Icd max bright 240 Icd min bright 64 lcd if O lcd hbp 158 lcd ht 1344 lcd vbp 25 lcd vt 1270 lcd vspw 3 Icd hspw 20 Shenzhen Waveshare Electronics Co Ltd www waveshare com Icd_hv_if 0 Icd_hv_smode 0 Icd_hv_s888_if 0 Icd_hv_syuv_if 0 Icd_lvds_ch 0 Icd lvds mode 0 Icd lvds bitwidth 0 lcd Ivds io cross O lcd cpu i
2. 0 camera list para camera list para used 1 ov7670 1 gc0308 0 gt2005 0 hi704 0 sp0838 0 mt9m112 0 mt9m113 0 ov2655 0 hi253 0 gc0307 0 mt9d112 0 Shenzhen Waveshare Electronics Co Ltd www waveshare com 16 ov5640 0 gc2015 0 ov2643 0 gc0329 0 gc0309 0 tvp5150 0 s5k4ec 0 ov5650_mv9335 0 siv121d 0 gc2035 0 11 Porting USB Camera USB Camera has been includes in the kernel 12 Porting WIFI driver WIFI driver has been includes in the kernel 13 Porting VGA driver VAG driver has been includes in the kernel just configure screenO output type and screenO output mode setting in the script fex directly disp init screenO output type 4 screenO output mode 4 14 Porting HDMI driver HDMI driver has been includes in the kernel just configure screenO_output_type and screenO output mode setting in the script fex directly disp init screenO output type 3 screenO output mode 5 15 Porting CVBS driver CVBS driver has been includes in the kernel just configure disp_init and tvout_para setting in the script fex directly Shenzhen Waveshare Electronics Co Ltd www waveshare com 17 disp init screenO output type 22 screenO output mode 14 tvout para tvout used il tvout channel num 3 16 Updating system 1 Convert the modified script fex into script bin format by using fex2bin and replace the earlier script bin on the board for
3. 1 ctp name ft5x ts ctp twi id 1 ctp twi addr 0x38 ctp screen max x 1024 ctp screen max y 600 ctp revert x flag 0 ctp revert y flag 1 ctp exchange x y flag O ctp int port port PH7 lt 6 gt lt default gt ctp wakeup port PB13 lt 1 gt lt default gt lt default gt lt 1 gt ctp io port port PH7 0 default A20 ctp para ctp used 1 Shenzhen Waveshare Electronics Co Ltd www waveshare com 11 ctp name ft5x ts ctp twi id 1 ctp twi addr 0x38 ctp screen max x 1024 ctp screen max y 600 ctp revert x flag 0 ctp revert y flag 1 ctp exchange x y flag 0 ctp firm 1 ctp wakeup port PB13 lt 1 gt lt default gt lt default gt lt 1 gt ctp list para ctp det used 1 ftbx ts 1 gt82x 0 gslX680 0 gt9xx ts 0 gt811 0 gpio para gpio pin 3 port PHO7 6 default default default 9 Porting UART driver UART driver has been includes in the kernel just configure the script fex directly uart para3 uart used s l uart_port 3 uart_type 4 uart_tx port PG06 lt 4 gt lt 1 gt lt default gt lt default gt uart_rx port PG07 lt 4 gt lt 1 gt lt default gt lt default gt uart_rts port PG08 lt 4 gt lt 1 gt lt default gt lt default gt uart_cts port PG09 lt 4 gt lt 1 gt lt default gt lt default gt uart_para4 uart_used l uart_port 4 uart_type 2 uart_tx port PG10 lt 4 gt lt 1 gt lt default gt lt default gt uart_rx port P
4. make make C home waveshare cubieboard2 kernel linux sunxi sunxi 3 4 61 A20 M home waveshare cu bieboard2 waveshare demo driver io control dev modules make 1 Entering directory home waveshare cubieboard2 kernel linux sunxi sunxi 3 4 61 A20 CC M home waveshare cubieboard2 waveshare demo driver io control dev io control o home waveshare cubieboard2 waveshare demo driver io control dev io control c In function io control read home waveshare cubieboard2 waveshare demo driver io control dev io control c 138 2 warning passing argument 1 of copy to user discards const qualifier from pointer target type enabled by default home waveshare cubieboard2 kernel linux sunxi sunxi 3 4 61 A20 arch arm include asm uaccess h 427 42 note expected void but argument is of type const char home waveshare cubieboard2 waveshare demo driver io control dev io control c At top level home waveshare cubieboard2 waveshare demo driver io control dev io control c 247 2 warning initialization from incompatible pointer type enabled by default home waveshare cubieboard2 waveshare demo driver io control dev io control c 247 2 warning near initialization for open file read enabled by default Building modules stage 2 MODPOST 1 modules de home waveshare cubieboard2 waveshare demo driver io control dev io control mod o LD M home waveshare cubieboard2 waveshare demo driver io control dev io control ko make 1
5. on http dl cubieboard org parteners waveshare Source Code a20 cubieboard dvk dr iver 620source 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 Configure the Kernel to include touchscreen driver make menuconfig Device Drivers gt Input device support Touchscreens gt M __ ft5x touchscreen driver Device Drivers Shenzhen Waveshare Electronics Co Ltd www waveshare com 10 GPIO Support lt gt GPIO Support for sunxi platform 8 2 Configure 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 Configure the ctp para ctp list para and gpio para setting in script fex ctp name driver name ctp twi id I2C controller which is actually used ctp twi addr I2C device address 7bit ctp screen max x touch panel resolution ctp screen max y touch panel resolution ctp revert x flag set 1 to revert x axis ctp revert y flag set 1 to revert y axis ctp exchange x y flag set 1 to exchange x axis and y axis ctp int port touch interrupt pin ctp wakeup touch wakeup pin According to the specifications and hardware connection of our 7inch capacitive LCD configure as follows A10 ctp para ctp used
6. 2 Porting WIFI drive an C 17 13 Porting VGA driVer 5 ecce eoe eec ete aee oe eias ee Eiko eu SEACE eene urs DAEA EEE NETA NAER 17 14 Porting HDMI diiVer 5 e eere tno Seer et tr ERR ERN e soponeensasstsbovosensesspszrssesttenozszsasa 17 15 Porting CVBS driver issue so essere eter EE foro II REIR Se guGs UR oevokonsa vos os Gssepusssesesbetuegvebsasscuseko 17 16 Updating SySterm ooo TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTETTETTRETTEI 18 17 Compiling driver mod le sss eoe ceesuveversdusckssvesveeveesdessscevucectsesceststueveysressersceees 19 Shenzhen Waveshare Electronics Co Ltd www waveshare com Il Document formatting convention 1 Commands on PC ubuntu terminal preceding with here root user privileges is requested Commands on the board terminal preceding with S 2 This document is mainly for porting related linux driver of version 3 4 61 kernel 1 Porting LED driver LED driver has been includes in the kernel just configure the script fex directly Add the following configuration in setting leds para leds para leds used 1 leds num 10 leds pin 1 port PH20 lt 1 gt lt default gt lt default gt lt 0 gt leds name 1 green ph20 led1 leds default 121 leds pin 2 port PH21 1 default default 0 leds name 2 blue ph21 led2 leds default 2 0 leds trigger 2 heartbeat leds pin 3 port PE04 1 default default 0 leds name 3 ledO leds de
7. A mode select lt gt DesignWare SPI controller core support User mode SPI device driver support 6 2 Configure the script fex spiO para spi used 1 spi cs bitmap 1 spi csO port PI10 2 default default default spi sclk port PI11 2 default default default spi mosi port PI12 2 default default default spi miso port PI13 2 default default default spi devices spi dev num 1 spi boardO modalias spidev max speed hz 12000000 bus num 0 chip select 0 Shenzhen Waveshare Electronics Co Ltd www waveshare com mode 3 full duplex 0 manual_cs 0 7 Porting LCD driver 7 1 Configure the Kernel The LCD driver support has been included in linux sunxi sunxi 3 4 61 the driver file can be found on drivers video sunxi lcd Check the kernel configuration confirm that the driver is included make menuconfig Device Drivers gt Graphics support Support for frame buffer devices DISP Driver Support sunxi Reserve memory block for sunxi fb Enable FB UMP Integration lt gt LCD Driver Support sunxi lt gt HDMI Driver Support sunxi If you want to display the boot LOGO configuring as below Device Drivers gt Graphics support gt Bootuplogo gt Standard 224 color Linux logo 7 2 Configure the script fex The A10 supports two channel video output however only LCDO is available on
8. DVK522 Expansion Board Drivers Porting Manual 2014 06 17 V1 1 Waveshare Electronics www wvshare com Copyright Statement The ownership of this user manual is Shenzhen Waveshare Electronics Co Ltd Any manner or form of modifying distributing or copying any parts of this document without permission is forbidden otherwise offender will have to suffer all the consequences Version update records Version Date Description V1 1 2014 06 17 Initial Release Shenzhen Waveshare Electronics Co Ltd www waveshare com Content Copyright Statement d v l Version update records sese ecen 1 Porting LED driver 1 2 Porting PWM drivet 62s eere dj ann n n6 ko GR GESU K EER KR RR EVEN Ro KEE Kaa RENE RSEN SNRRNN RARE FE HR akeo 2 3 Porting Dallas s one wire driver e c sssssscssssssssssnssnsennesennsenseenessnesennennoo 2 3 1 Configure the Kernel sss ao 2 3 2 Configure the cript fex susesi stiaro ne Y ege n YS VES seo 2 3 3 Compile the driver module ccce eee eene eene 3 4 Porting AD key driver eua e Seren nau o irre RES EE EKK o Vene na apa EENES Y sena iu 1 SEVERE Va ERA MEE 3 4 1 Configure the Kerrnel erroe NADLO 3 4 2 Configure the sript fex eroe retten ere ee Year to
9. G11 lt 4 gt lt 1 gt lt default gt lt default gt uart_para6 uart_used 1 Shenzhen Waveshare Electronics Co Ltd www waveshare com 12 uart port 6 uart type 2 uart tx port P112 lt 3 gt lt 1 gt lt default gt lt default gt uart rx port PI13 3 1 default default 10 Porting CSI driver 10 1 Configure the kernel Here porting the OV7670 driver as example make menuconfig Device Drivers gt Multimedia support Video For Linux CSI Driver Configure for sun4i M OmniVision OV7670 sensor support Built the camera driver as module save and exit Comment out the print messages in the s32 img sw para to reg u8type u8 mode u8 value function in disp layer c file which is under drivers video sunxi disp directory Lines 95 to 99 95 else 96 DE WRN not supported yuv channel format 96d in 97 img_sw_para_to_reg n value 98 return 0 99 el Lines 125 to 129 125 else 126 DE WRN not supported yuv channel pixel sequence d 127 in img_sw_para_to_reg n value 128 return 0 129 by Lines 168 to 172 168 else 169 DE WRN not supported imageO pixel sequence d in 170 img sw para to regn value 171 return 0 172 12 Line 175 175 DE WRN not supported type d in img sw para to regn type Shenzhen Waveshare Electronics Co Ltd www waveshare com 13 Save re compile the kernel make ulmage Compile the kernel modu
10. Leaving directory home waveshare cubieboard2 kernel linux sunxi sunxi 3 4 61 A20 arm linux gnueabihf gcc o io control io control c io control c 1 23 fatal error linux init h No such file or directory compilation terminated nake modules Error 1 root ubuntu home waveshare cubieboard2 waveshare demo driver io control dev It is caused by the different kernel version can be just omitted root ubuntu home waveshare cubieboard2 waveshare demo driver io control dev ls io control mod c io control o modules order io control ko io control mod o Module symvers rootgubuntu nome waveshare cubieboard2 waveshare demo driver io control dev Copy the new generated io control ko file to your own system and load it Shenzhen Waveshare Electronics Co Ltd www waveshare com 20
11. configuration for module reset csi power en xx GPIO configuration for module power high active by default csi stby xx GPIO configuration for module standby csi af en xx GPIO configuration for module AF power csi1 para csi used 1 csi dev gty 1 Shenzhen Waveshare Electronics Co Ltd www waveshare com 15 csi stby mode 0 csi mname ov7670 csi if O csi iovdd axp20 pll csi avdd csi dvdd csi vol iovdd 2800 csi vol dvdd csi vol avdd csi vflip 1 csi hflip O csi flash pol 1 csi facing 1 csi twi id 1 csi twi addr 0x42 csi pck port PGOO 3 default default default csi ck port PGO1 3 default default default csi hsync port PGO2 3 default default default csi vsync port PG03 lt 3 gt lt default gt lt default gt lt default gt csi dO port PG04 lt 3 gt lt default gt lt default gt lt default gt csi d1 port PGO5 3 default default default csi d2 port PGO6 3 default default default csi d3 port PGO7 3 default default default csi d4 port PGO8 3 default default default csi d5 port PGO9 3 default default default csi d6 port PG10 3 default default default csi d7 port PG11 3 default default default csi reset port PH13 15 default default 0 csi power en port PH16 1 default default 0 csi stby port PH19 1 default default
12. eene EY Io SY eS ea ea ee aeg n Nea EN SS Ye E eae Ss 3 5 Porting2Cdrivef ser M 4 5 1 Config re the Kertiel 1 ve eroe rae noo e Yan Ye a8 oo Yo eo rne EYE Y ana Yon Ya any aee PEST 4 5 2 Configure the script fex sss 4 6 P rting SPI driVer eiie eec eee nana Pha Eae an aan a R43 VY Fe Nana Vana PERRO Ye rana eua 5 6 1 Configure the Kernel en eee eene eso ae xo YN Xo aa A Nen nue n vae SE enano 5 6 2 Config re the script fex oorr serie See Y Yn VPE aene vous 6 7 Porting LED driver susesi a aE aa aa 7 7 1 ienuldickndcul 7 7 2 Configure the script fex ooo eene oe E sess NENNEN NV NS E uS SEN NE 7 8 Porting CTP driver oreet rte toe ESI Spo iS ee SERE EN NE pao nen ER no roseubbessosspsersusosbersasrasss 10 8 1 Con figure the Kernel 10 8 2 Configure the script feX sa E e rio 11 9 Porting UART dEIVBr eseon noo erento eI ESRB soseo ero Eseo Sa suso Seks tu Ceo ENS EUNU ES c Due Ves een ue re eU EN ss ast Cu 12 10 Porting CSV IJ cioe CT 13 10 1 Configure the Kernel icc cecsceccnecsececessccecsscsuvsccnssssecccasesecevescsccsessssrdesbeec sess 13 10 2 Configure the script feX snssesnsosssooososseooressseeereosseoessssseeersssseesssssseesese 14 11 Porting USB Camera s sesessssssssssescsssssssssosnnonesessssssenennesessssssssenenasesesssssscncos 17 1
13. f O lcd frm 0 lcd io cfg0 0x00000000 Icd gamma correction en 0 Icd gamma tbl 0 0x00000000 Icd gamma tbl 1 0x10101 Icd gamma tbl 255 OxOOffffff Icd bl en used 1 Icd bl en port PHO7 lt 1 gt lt 0 gt lt default gt lt 1 gt Icd power used 1 Icd power port PHO8 lt 1 gt lt 0 gt lt default gt lt 1 gt Icd pwm used 1 Icd pwm port PB02 lt 2 gt lt 0 gt lt default gt lt default gt IcddO port PD00 lt 2 gt lt 0 gt lt default gt lt default gt Icdd1 port PD01 lt 2 gt lt 0 gt lt default gt lt default gt Icdd2 port PD02 lt 2 gt lt 0 gt lt default gt lt default gt Icdd3 port PD03 lt 2 gt lt 0 gt lt default gt lt default gt Icdd4 port PD04 lt 2 gt lt 0 gt lt default gt lt default gt Icdd5 port PD05 lt 2 gt lt 0 gt lt default gt lt default gt Icdd6 port PD06 lt 2 gt lt 0 gt lt default gt lt default gt Icdd7 port PD07 lt 2 gt lt 0 gt lt default gt lt default gt Icdd8 port PD08 lt 2 gt lt 0 gt lt default gt lt default gt Icdd9 port PD09 lt 2 gt lt 0 gt lt default gt lt default gt Icdd10 port PD10 lt 2 gt lt 0 gt lt default gt lt default gt Icdd11 port PD11 lt 2 gt lt 0 gt lt default gt lt default gt Icdd12 port PD12 lt 2 gt lt 0 gt lt default gt lt default gt Icdd13 port PD13 lt 2 gt lt 0 gt lt default gt lt default gt Icdd14 port PD14 lt 2 gt lt 0 gt lt default gt lt default gt Icdd15 port PD15 lt 2 gt lt 0 gt lt default gt lt defaul
14. fault 321 leds pin 4 port PEO5 15 default default 0 leds name 4 led1 leds default 4 1 leds pin 5 port PEO6 15 default default 0 leds name 5 led2 leds default 5 1 leds pin 6 port PE07 1 default default 0 leds name 6 led3 leds default 6 1 leds pin 7 port PE8 1 default default 0 leds name 7 led4 leds default 7 1 leds pin 8 port PEO9 lt 1 gt lt default gt lt default gt lt 0 gt leds name 8 led5 leds default 8 1 Shenzhen Waveshare Electronics Co Ltd www waveshare com leds pin 9 port PE10 15 default default 0 leds name 9 led6 leds default 9 1 leds pin 10 port PE11 1 default default 0 leds name 10 led7 leds default 10 1 2 Porting PWM driver PWM driver has been includes in the kernel just configure the script fex directly Add pwmoO para pwmO para pwm used 1 pwm period 20 pwm duty percent 50 3 Porting Dallas s one wire driver 3 1 Configure the Kernel make menuconfig Device Drivers gt lt gt Dallas s 1 wire support lt gt T wire sunxi support 1 wire Bus Masters gt GPIO 1 wire busmaster 1 wire Slaves gt Thermal family implementation 3 2 Configure the cript fex Add w1 para configuring as below w1 para w1 used 1 Shenzhen Waveshare Electronics Co Ltd www waveshare com 2 W1 pin port PB10 lt 1 gt lt default gt lt defaul
15. iver 5 1 Configure the Kernel The kernel supports I2C if not configure as below make menuconfig Device Drivers gt 12C support I2C Hardware Bus support Allwinner Technology SUNXI I2C interface Commenting out the code on line 914 to line 918 of document i2c sunxi c under directory of drivers i2c busses as below 914 else if ret num 915 printk incomplete xfer Ox x n ret 916 ret ECOMM 917 dev dbg i2c adap dev incomplete xfer d n ret 918 157 5 2 Configure the script fex twiO para twiO used 1 twiO scl port PBO 2 default default default twiO sda port PB1 2 default default default twi1 para twil used 1 twi1 scl port PB18 lt 2 gt lt default gt lt default gt lt default gt twi1 sda port PB19 lt 2 gt lt default gt lt default gt lt default gt twi2 para Shenzhen Waveshare Electronics Co Ltd www waveshare com 4 twi2 used 1 twi2 scl port PB20 lt 2 gt lt default gt lt default gt lt default gt twi2 sda port PB21 2 default default default 6 Porting SPI driver 6 1 Configure the Kernel A10 SPI driver has been included in the kernel of 3 4 61 version but SPI demo need to control the pins of CS the driver document is ctl ioc clickhttp dl cubieboard org parteners waveshare Source Code a20 cubieboard dvk driver 620source to download and copy to directory of drivers char modify Ma
16. kefile and Kconfig under this directory Add below to Makefile obj S CONFIGURE CTL IO ctl io o Add below to Kconfig config CTL IO tristate CTL IO Controller depends on ARCH SUNAI help Ctl io controller present on SUNAI chips Configure the Kernel make menuconfig Device Drivers gt SPI support gt lt gt SUN4I SPI Controller Device Drivers Character devices gt lt gt CTL IO Controller A20 Kernel of 3 4 61 version on Cubieboard A20 does not get support from SPI you need to add SPI driver download spi sun7i c from http dl cubieboard org parteners waveshare Source Code a20 cubieboard dv k driver 620source copy to directory of drivers spi modify Makefile and Kconfig under directory drivers spi Shenzhen Waveshare Electronics Co Ltd www waveshare com 5 ctl io c driver is also needed please refer to operation of A10 above Add below to document Makefile obj S CONFIGURE SPI SUNTI spi sun7i o Add below to document Kconfig config SPI SUN7I tristate SUN7I SPI Controller depends on ARCH SUNTI help Allwinner Soc SPI controller present on SUN7I chips config SUN7ZI SPI NDMA bool SUN7I SPI Normal DMA mode select depends on SPI SUN7I help This selects SPI DMA mode with DMA transfer Y select NDMA mode and N select DDMA mode Configuring as the following make menuconfig Device Drivers gt SPI support gt lt gt SUNTI SPI Controller SUN7I SPI Normal DM
17. les make modules Compile the kernel modules make modules install The installation copies the compiled kernel module from the kernel source code to the ubuntu lib modules directory The related driver module files include videobuf core ko videobuf dma contig ko sun4i csi1 ko ov7670 ko which are located respectively in videobuf core ko videobuf dma contig ko lib modules 3 4 61 kernel drivers media video ov7670 ko ib modules 3 4 61 kernel drivers media video sun4i_csi device sundi csi1 ko ib modules 3 4 61 kernel drivers media video sun4i_csi csi1 Copy the above 4 driver files to the board and install them in order Sinsmod videobuf core ko Sinsmod videobuf dma contig ko Sinsmod ov7670 ko Sinsmod sundi csi1 ko Note please pay attention to the installing order camera driver should be installed before sun4i csi1 ko e rer ear ene 10 2 Configure the script fex Since our OV7670 camera is connected to the CSI1 controller configure the csil 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 csi used xx enable disable csiO or csi1 csi mode xx CSI receiver buffer mode 0 astand alone buffer for each CSI receiver 1 ashared buffer for both CSI receiver csi dev qty xx CSI device quantity 1 or 2 Shenzhen Waveshare Electronics Co Ltd www waveshare com 14 csi s
18. more info refer to the document 4 Prepare for Kernel and Drivers Porting gt 2 The ported kernel need to be recompiled and update the compiled ulmage and driver module to the system The driver module can be loaded automatically when the board is connected to the power by adding corresponding modules to etc modules vi etc modules 4 etc modules kernel modules to load at boot time This file contains the names of kernel modules that should be loaded at boot time one per line Lines beginning with are ignored For SATA Support gpio_sunxi pwm_sunxi sunxi_gmac disp Icd hdmi ump mali sunxi_cedar_mod ft5x_ts sun4i keyboard rtc pcf8563 Hvideobuf core Hvideobuf dma contig Hov7670 Hsundi csi1 Users can add driver module to this list 3 Driver modules compiled by yourself can add via etc profile Shenzhen Waveshare Electronics Co Ltd www waveshare com 18 vi etc profile insmod home waveshare_demo driver ds18b20_dev w1 sun4i ko 4 Reboot the system after updating 17 Compiling driver module Compiling driver modules under http dl cubieboard org parteners waveshare Source Code a10 cubieboard dvk Dr iver 20and 20API Driver need to modify the related Makefile according to your actual kernel path Compiling io control dev ko for example 1 Copy the source code to ubuntu assume the target directory is home waveshare cubieboard2 waveshare demo driver cd home waveshare cubieboard2
19. t gt Icdd16 port PD16 lt 2 gt lt 0 gt lt default gt lt default gt Icdd17 port PD17 lt 2 gt lt 0 gt lt default gt lt default gt Icdd18 port PD18 lt 2 gt lt 0 gt lt default gt lt default gt Icdd19 port PD19 lt 2 gt lt 0 gt lt default gt lt default gt Icdd20 port PD20 lt 2 gt lt 0 gt lt default gt lt default gt Icdd21 port PD21 lt 2 gt lt 0 gt lt default gt lt default gt Icdd22 port PD22 lt 2 gt lt 0 gt lt default gt lt default gt Shenzhen Waveshare Electronics Co Ltd www waveshare com Icdd23 port PD23 lt 2 gt lt 0 gt lt default gt lt default gt Icdclk port PD24 lt 2 gt lt 0 gt lt default gt lt default gt Icdde port PD25 lt 2 gt lt 0 gt lt default gt lt default gt Icdhsync port PD26 lt 2 gt lt 0 gt lt default gt lt default gt Icdvsync port PD27 lt 2 gt lt 0 gt lt default gt lt default gt 8 Porting CTP driver Here take capacitive touch LCD with FT5x06 MCU controller as example 8 1 Con figure the Kernel A10 Kernel of version 3 4 61 included driver document ft5x ts c in its source code which is under directory of drivers input touchscreen make menuconfig Device Drivers gt Input device support gt Touchscreens gt M ft5x touchscreen driver Here compile it as mode of module A20 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 which can be downloaded
20. t gt lt default gt 3 3 Compile the driver module Click http dl cubieboard org parteners waveshare Source Code a10 cubieboard dvk Dr iver 20and 20API Driver to download ds18b20 dev to your own ubuntu system compiling by enter into source code Detail please refer to Chapter17 Compiling driver module Copy w1 sun4i ko to the board after compiling execute the below command to download Sinsmod wl1 sun4i ko After connect the DS18B20 board correctly navigate into directory sys bus w1 devices w1 bus master1 there is directory begin with 28 under this directory this is your DS18B20 device 28 represent that your temperature sensor is DS18B20 the following figures and letters are its ID It is unique and used to identify different devices navigate into this directory the inside w1 slave document is its device document Enter this command cat w1 slave on the console terminal 4 Porting AD key driver 4 1 Configure the Kernel make menuconfig Device Drivers gt Input device support Keyboards gt M sunxi tablet keys on adcO support sunxi tablet keys on adcO controlled throuh fex 4 2 Configure the sript fex Add section tabletkeys para configure as below tabletkeys para tabletkeys used 1 keyO code 115 key1 code 114 Shenzhen Waveshare Electronics Co Ltd www waveshare com 3 key2 code 139 key3 code 217 key4 code 102 key5 code 1 key6 code 28 5 Porting I2C dr
21. tby mode xx standby power status 0 power on when standby 1 power off when standby csi mname xxx CSI module name matches with the driver valid option includes 0v7670 gc0308 8gt2005 hi704 sp0338 mt9m112 gc0307 mt9m113 mt9d112 hi253 ov5640 csi twi id xx I2C csi twi addr xx I2C address csi if xx interface timing 0 8bit data line with Hsync Vsync 1 16bit data line with Hsync Vsync 2 24bit data line with Hsync Vsync 3 8bit data line BT656 embedded sync single channel 4 8bit data line BT656 embedded sync dual channels 5 8bit data line BT656 embedded sync four channels csi vflip xx video vertical flip 0 normal 1 flip csi hflip xx video horizontal flip 0 normal 1 flip csi avdd and csi dvdd power supply of the camera module s IO Analog and Core axp20 pll powering from AXP20 LDO3 axp20 hdmi powering from AXP20 LDO4 powering from other source csi flash pol xx flash polarity for cameras that feature flash IO control 0 flash lights when IO low level 1 flash lights when IO high level csi pck xx GPIO configuration for clock signal from module to CSI csi ck xx GPIO configuration for clock signal from CSI to module csi hsync xx GPIO configuration for clock signal from CSI to module csi vsync xx GPIO configuration for vertical sync signal from module to CSI csi dO xx to csi d15 xx GPIO configuration for vertical sync signal from module to CSI csi reset xx GPIO
22. waveshare demo driver io control dev root ubuntu home waveshare cubieboard2 waveshare demo driver io control devi ls i io control mod c io control o modules order io control ko io control mod o Module symvers root ubuntu home waveshare cubieboard2 waveshare demo driver io control dev l Modify the files permission chmod 777 2 Modify the Makefile vi Makefile KERNELDIR home waveshare cubieboard2 kernel linux sunxi sunxi 3 4 61 A20 PWD obj m io control o Assign the KERNELDIR according to your actual kernel path 3 Clear the old files make clean root ubuntu home waveshare cubieboard2 waveshare demo driver io control devi ls i io control mod c io control o modules order io control ko io control mod o Module symvers root ubuntu home waveshare cubieboard2 waveshare demo driver io control dev make clean rm rf o ko tmp versions mod c modules order Module symvers root ubuntu home waveshare cubieboard2 waveshare demo driver io control dev ls root ubuntu home waveshare cubieboard2 waveshare demo driver io control dev fi 4 Compile make An error might occur while compiling io_control c 1 23 fatal error linux init h No such file or directory Shenzhen Waveshare Electronics Co Ltd www waveshare com 19 compilation terminated make modules Error 1 As shown in the picture below root ubuntu home waveshare cubieboard2 waveshare demo driver io control dev

Download Pdf Manuals

image

Related Search

Related Contents

DSC-W180  3208 Monocolor LED 3mm (5mm) Dot Matrix Display    healing HSS852 Owners Manual: CONTENTS 1  Airstream 2007 Safari Automobile User Manual  Wetrok Speedmatic Zyklon  User's Manual  Q-Barron vac trephine  Owner`s Manual for B092, B094, B095, B096 Series Console  PR6130/64S 型取扱説明書  

Copyright © All rights reserved.
Failed to retrieve file