WhyCan Forum

本站无需注册,无需积分,无需回复可下载所有资料,如果真的喜欢小站,请您注册之后请至少回复一个帖子激活Id,谢谢支持! 站长QQ: 516333132 (挖坑网/填坑网) admin@whycan.cn

您尚未登录。

#76 2018-07-21 11:11:38

yangbo
会员
注册时间: 2018-06-22
累计积分: 11

Re: licheepi zero BSP 内核(linux3.4) 编译教程

请问,我编译 bsp时候出现下面错误,我编译主线很正常
In file included from include/linux/compiler.h:48:0,
                 from include/linux/stddef.h:4,
                 from include/linux/posix_types.h:4,
                 from include/linux/types.h:17,
                 from include/linux/page-flags.h:8,
                 from kernel/bounds.c:9:
include/linux/compiler-gcc.h:100:1: fatal error: linux/compiler-gcc7.h:没有那个文件或目录
#include gcc_header(__GNUC__)
^~~~
compilation terminated.
make[1]: *** [kernel/bounds.s] 错误 1
make: *** [prepare0] 错误 2
make: *** 正在等待未完成的任务....
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/genksyms/genksyms
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTLD  scripts/mod/modpost
misterlanbing@misterlanbing-virtual-machine:~/linux_v3s/lichee-v3s/lichee/linux-3.4$


这是什么原因呢,

离线

#77 2018-07-21 12:02:23

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

你的命令行呢?gcc 版本是多少?

离线

#78 2018-07-21 15:11:32

yangbo
会员
注册时间: 2018-06-22
累计积分: 11

Re: licheepi zero BSP 内核(linux3.4) 编译教程

版本号:gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11)
命令是make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage -j3

离线

#79 2018-07-21 16:36:12

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

其他工具链编译可能会有问题,
试一试换别的工具链,
或者你可以从这里面把工具链单独拿出来
https://whycan.cn/t_970.html

离线

#80 2018-07-21 17:39:12

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

;A23 PAD application
;---------------------------------------------------------------------------------------------------------
; port configuration:
; port_name = port:GPIO<mux><pull up/down><driver level><default value>
; mux: GPIO function configuration, 0-input, 1-output, 2+: special funciton for modules
; pull up/down: 1-pull up, 2-pull down
; driver level: 0,1,2,3. 2 is recommended
; default value: default output value when this IO is configured as an output IO
;---------------------------------------------------------------------------------------------------------

[product]
version = "100"
machine = "tiger-cdr"

[platform]
eraseflag   = 0

;----------------------------------------------------------------------------------
;[target]  system bootup configuration
;boot_clock	= CPU boot frequency, Unit: MHz
;storage_type	= boot medium, 0-nand, 1-card0, 2-card2, -1(defualt)auto scan
;speed_mod    0 : normal read ; 1 dual line fast read
;----------------------------------------------------------------------------------
[target]
boot_clock   	= 1008
storage_type  	= -1

[boot_spi_board0]
boot_spi_speed_hz = 60000000
speed_mod         = 1 

;----------------------------------------------------------------------------------
;dcdc1_vol	---set dcdc1 voltage,mV,1600-3400,100mV/step
;dcdc2_vol	---set dcdc2 voltage,mV,600-1540,20mV/step
;dcdc3_vol	---set dcdc3 voltage,mV,600-1860,20mV/step
;dcdc4_vol	---set dcdc4 voltage,mV,600-1540,20mV/step
;dcdc5_vol	---set dcdc5 voltage,mV,1000-2550,50mV/step
;aldo2_vol	---set aldo2 voltage,mV,700-3300,100mV/step
;aldo3_vol	---set aldo3 voltage,mV,700-3300,100mV/step
;----------------------------------------------------------------------------------
[power_sply]
dcdc2_vol       = 1200
dcdc3_vol       = 3300
aldo2_vol       = 2500
aldo3_vol       = 3000
ldo1_vol        = 3300
ldo2_vol        = 3000
;ldo3_vol        = 2800
;ldo4_vol        = 1800


;----------------------------------------------------------------------------------
;card boot
;----------------------------------------------------------------------------------
[card_boot]
logical_start   = 40960
spinor_verify   = 1
sprite_gpio0    =

;----------------------------------------------------------------------------------
;[cardx_boot_para] boot card configuration
;card_ctrl 	 = boot card NO. 0 or 2
;card_high_speed = speed mode, 0-normal mode(up to 25MHz), 1-high speed mode(up to 50MHz)
;card_line       = boot card buswidth(1 or 4)
;----------------------------------------------------------------------------------
[card0_boot_para]
card_ctrl       = 0
card_high_speed = 1
card_line       = 4
sdc_d1          = port:PF0<2><1><default><default>
sdc_d0          = port:PF1<2><1><default><default>
sdc_clk         = port:PF2<2><1><default><default>
sdc_cmd         = port:PF3<2><1><default><default>
sdc_d3          = port:PF4<2><1><default><default>
sdc_d2          = port:PF5<2><1><default><default>

;[card2_boot_para]
;card_ctrl       = 2
;card_high_speed = 1
;card_line       = 4
;sdc_cmd         = port:PC00<2><1><2><default>
;sdc_clk         = port:PC01<2><1><2><default>
;sdc_d0          = port:PC03<2><1><2><default>
;sdc_d1          = port:PC04<2><1><2><default>
;sdc_d2          = port:PC05<2><1><2><default>
;sdc_d3          = port:PC06<2><1><2><default>

;----------------------------------------------------------------------------------
;[twi_para] twi for boot code
;twi_port	= twi controller ID
;----------------------------------------------------------------------------------
[twi_para]
twi_port        = 0
twi_scl         = port:PB06<2><default><default><default>
twi_sda         = port:PB07<2><default><default><default>

;----------------------------------------------------------------------------------
;[uart_para] boot debug port configuration
;uart_debug_port = uart port ID for boot debug
;----------------------------------------------------------------------------------
;origin
;[uart_para]
;uart_debug_port = 1
;uart_debug_tx   = port:PE21<4><1><default><default>
;uart_debug_rx   = port:PE22<4><1><default><default>

[uart_para]
uart_debug_port = 2
uart_debug_tx   = port:PB00<3><1><default><default>
uart_debug_rx   = port:PB01<3><1><default><default>

;uart_debug_port = 2
;uart_debug_tx   = port:PB00<2><1><default><default>
;uart_debug_rx   = port:PB01<2><1><default><default>


;card print
;uart_debug_tx    = port:PF02<3><1><default><default>
;uart_debug_rx    = port:PF04<3><1><default><default>


;----------------------------------------------------------------------------------
;[jtag_para] jtag configuration
;jtag_enable     = 0-disable jtag, 1-enable jtag
;----------------------------------------------------------------------------------
[jtag_para]
jtag_enable     = 0
jtag_ms         = port:PF00<3><default><default><default>
jtag_ck         = port:PF05<3><default><default><default>
jtag_do         = port:PF03<3><default><default><default>
jtag_di         = port:PF01<3><default><default><default>

;----------------------------------------------------------------------------------
;[clock] pll configuration
;----------------------------------------------------------------------------------
[clock]
pll3            = 297
pll4            = 300
pll6            = 600
pll8            = 360
pll9            = 480
pll10           = 297

;---------------------------------------------------------------------------------------------------------
;[pm_para] power management
;standby_mode = 0-normal standby, 1-super standby
;---------------------------------------------------------------------------------------------------------
[pm_para]
standby_mode		= 1

;----------------------------------------------------------------------------------
;sys_pwr_dm_para
;this para is used to change default sys_pwr_dm config when necessary.
;   allowed sys_pwr_dm is such as follow:
;		vdd-cpua
; 		vdd-cpub
; 		vdd-gpu
; 		vcc-dram
; 		vdd-sys
; 		which is compatible with pmu regu config. see: [pmu1_regu] for more info.
;   value: 0: del the pwr_dm from sys_pwr_dm_mask;
;	   1: add the pwr_dm into sys_pwr_dm_mask;
;----------------------------------------------------------------------------------
[sys_pwr_dm_para]
;vdd-cpua = 1
;vdd-sys  = 1

;----------------------------------------------------------------------------------
;dynamic_standby_para
;   enable:
;	value: 0: all config is ignored.
;	       1: all config is effective.
;   dram_selfresh_flag:
;	value: 0: dram will not enter selfresh,
;		    this config is used for stop dram entering selfresh, in case of dram memory have bug.
;	       1: dram will enter slefresh.
;
;----------------------------------------------------------------------------------
[dynamic_standby_para]
enable = 0
dram_selfresh_flag = 1
vdd_cpua_vol     = 1200
vdd_sys_vol      = 1200

;*****************************************************************************
;sdram configuration
;
;*****************************************************************************
[dram_para]
dram_clk        = 360
dram_type       = 2
dram_zq         = 0x39bb
dram_odt_en     = 0
dram_para1      = 0x10E20000
dram_para2      = 0x0000
dram_mr0        = 0x1840
dram_mr1        = 0x4
dram_mr2        = 0x18
dram_mr3        = 0x4
dram_tpr0       = 0x00832087
dram_tpr1       = 0x01C24085
dram_tpr2       = 0x0002A01D
dram_tpr3       = 0x0
dram_tpr4       = 0x0
dram_tpr5       = 0x0
dram_tpr6       = 0x0
dram_tpr7       = 0x0
dram_tpr8       = 0x0
dram_tpr9       = 0x0
dram_tpr10      = 0x0
dram_tpr11      = 0x220000
dram_tpr12      = 0x78
dram_tpr13      = 0x0d000000

;---------------------------------------------------------------------------------------------------------
; if 1 == standby_mode, then support super standby;
; else, support normal standby.
;---------------------------------------------------------------------------------------------------------
[pm_para]
standby_mode		= 0

;---------------------------------------------------------------------------------------------------------
; wakeup_src_para:
;	sometimes, u would like to add more wakeup src in standby mode, these para will be
;	help;
;	u need to make sure the standby mode support the wakeup src. Also, some hw
;	condition must be guaranteed.
;	including:
;	cpu_en: power on or off.
;		1: mean power on
;		0: mean power off
;	cpu_freq: indicating lowest freq. unit is Mhz;
;	dram selfresh_en: selfresh or not.
;		1: enable enter selfresh
;		0: disable enter selfresh
;	dram_pll: if not enter selfresh, indicating lowest freq. unit is Mhz;
;	wakeup_src: to make the scenario work, the wakeup src is needed.
;---------------------------------------------------------------------------------------------------------
[wakeup_src_para]
cpu_en		= 0
cpu_freq	= 48
; (cpu:apb:ahb)
pll_ratio	= 0x111
dram_selfresh_en= 1
dram_freq	= 36
wakeup_src_wl 	= port:PL07<4><default><default><0>
wakeup_src_bt 	= port:PL09<4><default><default><0>
bb_wake_ap	= port:PL02<4><default><default><0>

;----------------------------------------------------------------------------------
;i2c configuration
; twi_used = twix enable    ;; twi0->use pmu axp209 ,  twi1->use gsenor
;----------------------------------------------------------------------------------
[twi0]
twi_used        = 1
twi_scl         = port:PB06<2><default><default><default>
twi_sda         = port:PB07<2><default><default><default>

[twi1]
twi_used        = 0
twi_scl         = port:PB08<2><default><default><default>
twi_sda         = port:PB09<2><default><default><default>

;----------------------------------------------------------------------------------
;uart configuration
;uart_used = uart x enable
;uart_port = x; x is order number of ttySx
;uart_type       = 2:2 wire,4:4 wire,8:8 wire, full function
;----------------------------------------------------------------------------------
[uart0]
uart_used       = 1
uart_port       = 0
uart_type       = 2
uart_tx         = port:PB08<3><1><default><default>
uart_rx         = port:PB09<3><1><default><default>
;card print
;uart_tx         = port:PF02<3><1><default><default>
;uart_rx         = port:PF04<3><1><default><default>

[uart1]
uart_used       = 1
uart_port	    = 1
uart_type       = 2
uart_tx         = port:PE21<4><1><default><default>
uart_rx         = port:PE22<4><1><default><default>

[uart2]
uart_used       = 1
uart_port	    = 2
uart_type       = 2
uart_tx         = port:PB00<2><1><default><default>
uart_rx         = port:PB01<2><1><default><default>

;----------------------------------------------------------------------------------
;SPI controller configuration
;spi_used       = SPIx enable
;spi_cs_bitmap  = SPI bit mapping
;----------------------------------------------------------------------------------
[spi0]
spi_used       = 1
spi_cs_bitmap  = 1
spi_mosi       = port:PC03<3><default><default><default>
spi_miso       = port:PC00<3><default><default><default>
spi_sclk       = port:PC01<3><default><default><default>
spi_cs0        = port:PC02<3><1><default><default>

;----------------------------------------------------------------------------------
;SPI device configuration
;spi_dev_num: number of spi devices
;----------------------------------------------------------------------------------
[spi_devices]
spi_dev_num = 1

;----------------------------------------------------------------------------------
;[spi_board0] spi device configuration
;modalias      = spi device name
;max_speed_hz  = max transfer speed
;bus_num       = bus ID
;chip_select   = chip select, 0,1
;mode          = SPI transfer mode
; sflash_size- 16 : 16M nor flash size , 8 : 8M nor flash size
;----------------------------------------------------------------------------------
[spi_board0]
modalias      = "w25q128"
max_speed_hz  = 50000000
bus_num       = 0
chip_select   = 0
mode          = 0
sflash_size   = 16


;----------------------------------------------------------------------------------
;capacitor tp configuration
;ctp_twi_id : twi controller ID
;ctp_twi_addr : I2C slave address, 7bit
;ctp_screen_max_x/_y : resolution of touch panel
;ctp_revert_x/_y_flag : whether need to revert x/y
;ctp_exchange_x_y_flag: whether need to exchange the value of x and y
;ctp_int_port : port for tp's interrupt signal
;ctp_wakeup : port for wakeup tp
;----------------------------------------------------------------------------------
[ctp_para]
ctp_used            = 1
ctp_name            = "gt911_m785q6"
ctp_twi_id          = 0
ctp_twi_addr        = 0x48
ctp_screen_max_x    = 800
ctp_screen_max_y    = 480
ctp_revert_x_flag   = 0
ctp_revert_y_flag   = 0
ctp_exchange_x_y_flag = 1

ctp_int_port        = port:PG04<6><default><default><default>
ctp_wakeup          = port:PG03<1><default><default><1>

;--------------------------------------------------------------------------------
; CTP automatic detection configuration
;ctp_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[ctp_list_para]
ctp_det_used              = 0
gt911_ts                  = 1
ft5x_ts                   = 1
gt82x                     = 1
gslX680                   = 1
gt9xx_ts                  = 1
gt811                     = 1
zet622x                   = 1
aw5306_ts                 = 1

;----------------------------------------------------------------------------------
;touch key configuration
;tkey_twi_id : twi controller ID
;tkey_twi_addr : I2C slave address, 7bit
;tkey_int : port for touch key's interrupt signal
;----------------------------------------------------------------------------------
[tkey_para]
tkey_used           = 0
tkey_twi_id         =
tkey_twi_addr       =
tkey_int            =

;----------------------------------------------------------------------------------
;motor configuration
;motor_shake : port for making the moto shaking
;----------------------------------------------------------------------------------
[motor_para]
motor_used          = 0
motor_shake         = port:power3<1><default><default><1>

;----------------------------------------------------------------------------------
;cooler_table  cooler_count <=32
;----------------------------------------------------------------------------------
[cooler_table]
cooler_count = 4
cooler0 = "1340000 4 4294967295 0"
cooler1 = "1200000 4 4294967295 0"
cooler2 = "1008000 4 4294967295 0"
cooler3 =  "648000 4 4294967295 0"

;----------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode             (0:screen0<screen0,fb0>)
;screenx_output_type   (0:none; 1:lcd; 3:hdmi;)
;screenx_output_mode   (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
;                      (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
;fbx format            (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
;fbx pixel sequence    (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
;fb0_scaler_mode_enable(scaler mode enable, used FE)
;fbx_width,fbx_height  (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
;lcdx_backlight        (lcd init backlight,the range:[0,256],default:197
;lcdx_yy               (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
;lcd0_contrast         (LCD contrast, 0~100)
;lcd0_saturation       (LCD saturation, 0~100)
;lcd0_hue              (LCD hue, 0~100)
;----------------------------------------------------------------------------------
[disp_init]
disp_init_enable         = 1
disp_mode                = 0

screen0_output_type      = 1
screen0_output_mode      = 4

screen1_output_type      = 1
screen1_output_mode      = 4

fb0_format               = 10
fb0_pixel_sequence       = 0
fb0_scaler_mode_enable   = 0
fb0_width                = 0
fb0_height               = 0

fb1_format               = 10
fb1_pixel_sequence       = 0
fb1_scaler_mode_enable   = 0
fb1_width                = 0
fb1_height               = 0

lcd0_backlight           = 102
lcd1_backlight           = 102

lcd0_bright              = 50
lcd0_contrast            = 50
lcd0_saturation          = 57
lcd0_hue                 = 50

lcd1_bright              = 50
lcd1_contrast            = 50
lcd1_saturation          = 57
lcd1_hue                 = 50

;----------------------------------------------------------------------------------
;lcd0 configuration

;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
;lcd_x:                lcd horizontal resolution
;lcd_y:                lcd vertical resolution
;lcd_width:            width of lcd in mm
;lcd_height:           height of lcd in mm
;lcd_dclk_freq:        in MHZ unit
;lcd_pwm_freq:         in HZ unit
;lcd_pwm_pol:          lcd backlight PWM polarity
;lcd_pwm_max_limit     lcd backlight PWM max limit(<=255)
;lcd_hbp:              hsync back porch
;lcd_ht:               hsync total cycle
;lcd_vbp:              vsync back porch
;lcd_vt:               vysnc total cycle
;lcd_hspw:             hsync plus width
;lcd_vspw:             vysnc plus width
;lcd_lvds_if:          0:single link;  1:dual link
;lcd_lvds_colordepth:  0:8bit; 1:6bit
;lcd_lvds_mode:        0:NS mode; 1:JEIDA mode
;lcd_frm:              0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
;lcd_io_phase:         0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
;                      8~11bit:dclk phase; 12~15bit:de phase)
;lcd_gamma_en          lcd gamma correction enable
;lcd_bright_curve_en   lcd bright curve correction enable
;lcd_cmap_en           lcd color map function enable
;deu_mode              0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
;                      decrease it while lcd is not bright enough; increase while lcd is too bright
;smart_color           90:normal lcd screen 65:retina lcd screen(9.7inch)
;----------------------------------------------------------------------------------
[lcd0_para]
lcd_used            = 1

lcd_driver_name     = "default_lcd"
lcd_if              = 0
lcd_x               = 800
lcd_y               = 480
lcd_width           =
lcd_height          =
lcd_dclk_freq       = 33
lcd_pwm_used        = 1
lcd_pwm_ch          = 0
lcd_pwm_freq        = 50000
lcd_pwm_pol         = 1
lcd_hbp             = 46
lcd_ht              = 1055
lcd_hspw            = 0
lcd_vbp             = 23
lcd_vt              = 525
lcd_vspw            = 5
lcd_lvds_if         = 0
lcd_lvds_colordepth = 0
lcd_lvds_mode       = 0
lcd_frm             = 1
lcd_io_phase        = 0x0100
lcd_gamma_en        = 0
lcd_bright_curve_en = 0
lcd_cmap_en         = 0

deu_mode            = 0
lcdgamma4iep        = 22
smart_color        = 90

lcd_bl_en           = port:PB4<1><0><default><1>
lcd_power           = ""

lcdd2               = port:PE04<3><0><default><default>
lcdd3               = port:PE05<3><0><default><default>
lcdd4               = port:PE06<3><0><default><default>
lcdd5               = port:PE07<3><0><default><default>
lcdd6               = port:PE08<3><0><default><default>
lcdd7               = port:PE09<3><0><default><default>
lcdd10              = port:PE10<3><0><default><default>
lcdd11              = port:PE11<3><0><default><default>
lcdd12              = port:PE12<3><0><default><default>
lcdd13              = port:PE13<3><0><default><default>
lcdd14              = port:PE14<3><0><default><default>
lcdd15              = port:PE15<3><0><default><default>
lcdd18              = port:PE16<3><0><default><default>
lcdd19              = port:PE17<3><0><default><default>
lcdd20              = port:PE18<3><0><default><default>
lcdd21              = port:PE19<3><0><default><default>

lcdd22              = port:PE23<3><0><default><default>
lcdd23              = port:PE24<3><0><default><default>

lcdclk              = port:PE00<3><0><3><default>
lcdde               = port:PE01<3><0><3><default>
lcdhsync            = port:PE02<3><0><3><default>
lcdvsync            = port:PE03<3><0><3><default>
;----------------------------------------------------------------------------------
;pwm config
;----------------------------------------------------------------------------------
[pwm0_para]
pwm_used            = 1
pwm_positive        = port:PB04<2><0><default><default>

[pwm1_para]
pwm_used            = 0
pwm_positive        = port:PH01<2><0><default><default>

;------------------------------------------------------------------------------;
; 10/100/100Mbps Ethernet MAC Controller Configure                             ;
;------------------------------------------------------------------------------;
;   Options:                                                                   ;
;   gmac_used  ---  0: not used, 1: external phy, 2: internal phy              ;
;   gmac_powerx --  A[:B] A: axp channel, B: voltage value                     ;
;       If set gamc_phy to use internal PHY, do not config port                ;
;------------------------------------------------------------------------------;
;         MII        RMII         MII        RMII         MII        RMII      ;
;   PD00  *                 PD06   *           *    PD12   *           *       ;
;   PD01  *                 PD07   *                PD13   *           *       ;
;   PD02  *            *    PD08   *                PD14   *                   ;
;   PD03  *            *    PD09   *           *    PD15   *                   ;
;   PD04  *                 PD10   *           *    PD16   *           *       ;
;   PD05  *                 PD11   *           *    PD17   *           *       ;
;------------------------------------------------------------------------------;
[gmac0]
gmac_used          = 2
gmac_power1        = 

;--------------------------------------------------------------------------------
;vip (video input port) configuration
;vip_used: 0:disable 1:enable
;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer
;vip_dev_qty: The quantity of devices linked to capture bus
;
;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and
;                                    verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured!
;
;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured!
;
;vip_dev(x)_isp_used 0:not use isp 1:use isp
;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb
;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby
;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable
;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable
;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply
;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply
;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply
;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply
;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply
;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply
;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply
;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply
;x indicates the index of the devices which are linked to the same capture bus
;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;--------------------------------------------------------------------------------

[csi0]
vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "h22_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x60
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = "csi-avdd"
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = "csi-dvdd"
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PG00<1><default><default><default>
vip_dev0_pwdn            = port:PG01<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;--------------------------------------------------------------------------------

[csi0]

vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "h22_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x60
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = "csi-avdd"
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = "csi-dvdd"
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PG00<1><default><default><default>
vip_dev0_pwdn            = port:PG01<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =

[csi1]
vip_used                 = 0
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_pck              = port:PE00<2><default><default><default>
vip_csi_mck              = port:PE01<2><default><default><default>
vip_csi_hsync            = port:PE02<2><default><default><default>
vip_csi_vsync            = port:PE03<2><default><default><default>
vip_csi_d0               = port:PE04<2><default><default><default>
vip_csi_d1               = port:PE05<2><default><default><default>
vip_csi_d2               = port:PE06<2><default><default><default>
vip_csi_d3               = port:PE07<2><default><default><default>
vip_csi_d4               = port:PE08<2><default><default><default>
vip_csi_d5               = port:PE09<2><default><default><default>
vip_csi_d6               = port:PE10<2><default><default><default>
vip_csi_d7               = port:PE11<2><default><default><default>
vip_csi_d8               = port:PE12<2><default><default><default>
;vip_csi_d9               = port:PE13<2><default><default><default>
vip_csi_d10               = port:PE14<2><default><default><default>
vip_csi_d11               = port:PE15<2><default><default><default>

vip_csi_sck               = port:PE21<2><default><default><default>
vip_csi_sda               = port:PE22<2><default><default><default>

vip_dev0_mname           = "ov5640"
vip_dev0_pos             = "front"
vip_dev0_twi_id          = 4
vip_dev0_twi_addr        = 0x78
vip_dev0_isp_used        = 0
vip_dev0_fmt             = 0
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 2800000
vip_dev0_avdd            = ""
vip_dev0_avdd_vol        = 2800000
vip_dev0_dvdd            = ""
vip_dev0_dvdd_vol        = 1500000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PE23<1><default><default><default>
vip_dev0_pwdn            = port:PE24<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =

vip_dev0_act_used        = 0
vip_dev0_act_name        = "ad5820_act"
vip_dev0_act_slave       = 0x18

vip_dev1_mname           = "gc2035"
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 4
vip_dev1_twi_addr        = 0x78
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =
;-------------------------------------------------------------------------------
;   mmc configuration
;
;   Config Guide
;   sdc_used:      1-enable card, 0-disable card
;   sdc_detmode:   card detect mode
;                  1-detect card by gpio polling
;                  2-detect card by gpio irq(must use IO with irq function)
;                  3-no detect, always in for boot card
;                  4-manually insert and remove by /proc/driver/sunxi-mmc.x/insert
;   sdc_buswidth:  card bus width, 1-1bit, 4-4bit, 8-8bit
;   sdc_use_wp:    1-with write protect IO, 0-no write protect IO
;   sdc_isio:      for sdio card
;   sdc_regulator: power control.if card supports UHS-I/DDR and HS200 timing for
;                  SD3.0 or eMMC4.5, regulator must be configured. the value is
;                  the ldo name of AXP221, eg: sdc_regulator = "axp22_eldo2"
;   other: GPIO Mapping configuration
;
;   Note:
;   1 if detmode=2, sdc_det's config=6
;     else if detmode=1, sdc_det's config=0
;     else sdc_det IO is not necessary
;   2 if the customer wants to support UHS-I and HS200 features, he must provide
;     an independent power supply for the card. This is only used in platforms
;     that supports SD3.0 cards and eMMC4.4+ flashes
;-------------------------------------------------------------------------------
[mmc0_para]
sdc_used          = 1
sdc_detmode       = 3
sdc_buswidth      = 4
sdc_d1            = port:PF00<2><1><2><default>
sdc_d0            = port:PF01<2><1><2><default>
sdc_clk           = port:PF02<2><1><2><default>
sdc_cmd           = port:PF03<2><1><2><default>
sdc_d3            = port:PF04<2><1><2><default>
sdc_d2            = port:PF05<2><1><2><default>
sdc_det           = port:PF06<0><1><default><default>
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 0
sdc_regulator     = "none"

[mmc1_para]
sdc_used          = 0
sdc_detmode       = 4
sdc_buswidth      = 4
sdc_clk           = port:PG00<2><1><1><default>
sdc_cmd           = port:PG01<2><1><1><default>
sdc_d0            = port:PG02<2><1><1><default>
sdc_d1            = port:PG03<2><1><1><default>
sdc_d2            = port:PG04<2><1><1><default>
sdc_d3            = port:PG05<2><1><1><default>
sdc_det           =
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 1
sdc_regulator     = "none"

[mmc2_para]
sdc_used          = 0
sdc_detmode       = 3
sdc_buswidth      = 8
sdc_clk           = port:PC00<2><1><2><default>
sdc_cmd           = port:PC01<2><1><2><default>
sdc_d0            = port:PC03<2><1><2><default>
sdc_d1            = port:PC04<2><1><2><default>
sdc_d2            = port:PC05<2><1><2><default>
sdc_d3            = port:PC06<2><1><2><default>
sdc_d4            = port:PC07<2><1><2><default>
sdc_d5            = port:PC08<2><1><2><default>
sdc_d6            = port:PC09<2><1><2><default>
sdc_d7            = port:PC10<2><1><2><default>
emmc_rst          = port:PC02<2><1><2><default>
sdc_det           =
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 0
sdc_regulator     = "none"

;----------------------------------------------------------------------------------
;usb configuration
;usb_used:          usb controller enable, 0-disable, 1-enable
;usb_port_type:     usb mode: 0-device, 1-host, 2-otg
;usb_detect_type:   usb hotplug detect mode, 0-none, 1-vbus/id detect, 2-id/dpdm detect
;usb_id_gpio:       usb id detect IO
;usb_det_vbus_gpio: usb vbus detect IO, "axp_ctrl" for axp
;usb_drv_vbus_gpio: usb dirve vbus IO
;usb_restrict_gpio: usb current restrict IO
;usb_restric_flag:  usb current restrict flag
;----------------------------------------------------------------------------------
[usbc0]
usb_used            = 1
usb_port_type       = 2
usb_detect_type     = 1
usb_id_gpio         = port:PF6<0><1><default><default>
usb_det_vbus_gpio   = port:PF6<0><1><default><default>
usb_drv_vbus_gpio   = port:PG3<1><0><default><0>
usb_restrict_gpio   =
usb_host_init_state = 0
usb_restric_flag    = 0
usb_restric_voltage = 3550000
usb_restric_capacity= 5
usb_regulator_io    = "nocare"
usb_regulator_vol   = 0
usb_not_suspend     = 0
;----------------------------------------------------------------------------------

; USB Device vendor Info.
;----------------------------------------------------------------------------------
[usb_feature]
vendor_id           = 0x18D1
mass_storage_id     = 0x0001
adb_id              = 0x0002

manufacturer_name   = "USB Developer"
product_name        = "Android"
serial_number       = "20080411"

[msc_feature]
vendor_name         = "USB 2.0"
product_name        = "USB Flash Driver"
release             = 100
luns                = 1

[serial_feature]
serial_unique       = 0

;--------------------------------------------------------------------------------
; G sensor configuration
; gs_twi_id	---  TWI ID for controlling Gsensor (0: TWI0, 1: TWI1, 2: TWI2)
;--------------------------------------------------------------------------------
[gsensor_para]
gsensor_used        = 0
gsensor_twi_id      = 0
;gsensor_twi_addr    = 0x18
gsensor_twi_addr    = 0x27
gsensor_int1        = 
gsensor_int2        =

;--------------------------------------------------------------------------------
; G sensor automatic detection configuration
;gsensor_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[gsensor_list_para]
gsensor_det_used          = 0
bma250                    = 1
da380					  = 1
mma8452                   = 1
mma7660                   = 1
mma865x                   = 1
afa750                    = 1
lis3de_acc                = 1
lis3dh_acc                = 1
kxtik                     = 1
dmard10                   = 0
dmard06                   = 1
mxc622x                   = 1
fxos8700                  = 1
lsm303d                   = 1

;--------------------------------------------------------------------------------
; gps gpio configuration
; gps_spi_id:     the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used
; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1
; gps_lradc:      the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc
;--------------------------------------------------------------------------------
[gps_para]

;--------------------------------------------------------------------------------
;wifi configuration
;wifi_sdc_id:    0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3
;wifi_usbc_id:   0- USB0, 1- USB1, 2- USB2
;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)
;wifi_mod_sel:   0- none, 1- ap6181, 2- ap6210(wifi+bt),
;                3 - rtl8188eu, 4- rtl8723au(wifi+bt)
;--------------------------------------------------------------------------------
[wifi_para]
wifi_used          = 0
wifi_sdc_id        = 1
wifi_usbc_id       = 1
wifi_usbc_type     = 1
wifi_mod_sel       = 2
wifi_power         = ""

; 1 - ap6181 sdio wifi gpio config
;ap6xxx_wl_regon      = port:PL06<1><default><default><0>
;ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>

; 2 - ap6210 sdio wifi gpio config
ap6xxx_wl_regon      = port:PL06<1><default><default><0>
ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>
ap6xxx_bt_regon      = port:PL08<1><default><default><0>
ap6xxx_bt_wake       = port:PL10<1><default><default><0>
ap6xxx_bt_host_wake  = port:PL09<4><default><default><0>
ap6xxx_lpo_use_apclk = 1

; 3 - rtl8188eu usb wifi gpio conifg

; 4 - rtl8723au usb wifi + bt

;--------------------------------------------------------------------------------
;light sensor
;--------------------------------------------------------------------------------
[ls_para]
ls_used             = 0
ls_twi_id           = 1
ls_twi_addr         = 0x23
ls_int              = port:PB07<4><1><default><default>

;--------------------------------------------------------------------------------
; lsensor automatic detection configuration
;ls_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[ls_list_para]
ls_det_used          = 0
ltr_501als           = 1
jsa1212              = 1

;--------------------------------------------------------------------------------
;compass
;--------------------------------------------------------------------------------
[compass_para]
compass_used        = 0
compass_twi_id      = 1
compass_twi_addr    = 0x0d
compass_int         =

;--------------------------------------------------------------------------------
;daudio_master:1: SND_SOC_DAIFMT_CBM_CFM(codec clk & FRM master)        use
;			2: SND_SOC_DAIFMT_CBS_CFM(codec clk slave & FRM master)  not use
;			3: SND_SOC_DAIFMT_CBM_CFS(codec clk master & frame slave) not use
;			4: SND_SOC_DAIFMT_CBS_CFS(codec clk & FRM slave)         use
;daudio_select:0 is pcm.1 is i2s
;audio_format: 1:SND_SOC_DAIFMT_I2S(standard i2s format).            use
;			   2:SND_SOC_DAIFMT_RIGHT_J(right justfied format).
;			   3:SND_SOC_DAIFMT_LEFT_J(left justfied format)
;			   4:SND_SOC_DAIFMT_DSP_A(pcm. MSB is available on 2nd BCLK rising edge after LRC rising edge). use
;			   5:SND_SOC_DAIFMT_DSP_B(pcm. MSB is available on 1nd BCLK rising edge after LRC rising edge)
;signal_inversion:1:SND_SOC_DAIFMT_NB_NF(normal bit clock + frame)  use
;				  2:SND_SOC_DAIFMT_NB_IF(normal BCLK + inv FRM)
;				  3:SND_SOC_DAIFMT_IB_NF(invert BCLK + nor FRM)  use
;				  4:SND_SOC_DAIFMT_IB_IF(invert BCLK + FRM)
;over_sample_rate: support 128fs/192fs/256fs/384fs/512fs/768fs
;sample_resolution	:16bits/20bits/24bits
;word_select_size 	:16bits/20bits/24bits/32bits
;pcm_sync_period 	:16/32/64/128/256
;msb_lsb_first 		:0: msb first; 1: lsb first
;sign_extend 		:0: zero pending; 1: sign extend
;slot_index 		:slot index: 0: the 1st slot - 3: the 4th slot
;slot_width 		:8 bit width / 16 bit width
;frame_width 		:0: long frame = 2 clock width;  1: short frame
;tx_data_mode 		:0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;rx_data_mode 		:0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;--------------------------------------------------------------------------------
[tdm0]
daudio_used         = 0
daudio_master       = 4
daudio_select       = 1
audio_format        = 1
signal_inversion    = 1
mclk_fs             = 512
sample_resolution   = 16
slot_width_select   = 16
pcm_lrck_period     = 32
pcm_lrckr_period    = 1
msb_lsb_first 	    = 0
sign_extend         = 0
slot_index          = 0
slot_width          = 16
frame_width         = 1
tx_data_mode        = 0
rx_data_mode        = 0
;i2s_mclk           = port:PB08<2><1><default><default>
i2s_bclk            = port:PG11<2><1><default><default>
i2s_lrclk           = port:PG10<2><1><default><default>
i2s_dout0           = port:PG12<2><1><default><default>
i2s_dout1           =
i2s_dout2           =
i2s_dout3           =
i2s_din             = port:PG13<2><1><default><default>

;--------------------------------------------------------------------------------------
;pa_single_vol,pa_double_vol: 31 level,1.5db/step.0x1f is the large volume.
;cap_val:use for system record,0x0--0db,0x1--24db,0x2--27db,0x3--30db,0x4--33db,0x5--36db,0x6--39db,0x7--42db
;headphone_vol,earpiece_vol: must least than 0x3b. 0x1 is a step.
;headset_mic_vol: headset mic(mic2) vol,use for phone headset mic call
;main_mic_vol: main mic(mic1) vol,use for phone main mic call
;version_v3_used : 1:v3,0:v3s
[audio0]
;audio_used           = 1
headphone_vol			= 0x3b

cap_vol					= 0x5
Differential_output    = 1
pa_single_vol			= 0x3d
pa_double_used			= 0
pa_double_vol			= 0x1f
headphone_direct_used	= 0
phone_mic_vol = 0x6
version_v3_used = 0
headphone_mute_used = 0
audio_hp_ldo       = 0
;v3s
audio_pa_ctrl         = port:PB05<1><default><default><0>

adcagc_used       = 0
adcdrc_used       = 0
dacdrc_used       = 0
adchpf_used       = 0
dachpf_used       = 0

;----------------------------------------------------------------------------------
;ir --- infra remote configuration
;----------------------------------------------------------------------------------
[s_ir0]
ir_used             = 0
ir_rx               = port:PL04<2><1><default><default>


;-------------------------------------------------------------------------------------
;pmu_used                    ---0:not used,1:used
;pmu_id                      ---0:axp19x,1:axp209,2:axp22x,3:axp806,4:axp808,5:axp809,6:axp803,7:axp813
;pmu_twi_addr                ---slave address
;pmu_twi_id                  ---i2c bus number (0 TWI0, 1 TWI2, 2 TWI3)
;pmu_irq_id		     ---irq number (0 irq0,1 irq1,…\E2\80?
;pmu_battery_rdc             ---battery initial resistance
;pmu_battery_cap             ---battery capability,mAh
;pmu_batdeten		     ---battery detect en;0:disable 1:enable
;pmu_runtime_chgcur          ---set initial charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_earlysuspend_chgcur     ---set earlysuspend charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_suspend_chgcur          ---set suspend charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_shutdown_chgcur         ---set shutdown charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_init_chgvol             ---set initial charing target voltage,mV,4100/4220/4200/4240
;pmu_init_chgend_rate        ---set initial charing end current  rate,10/15
;pmu_init_chg_enabled        ---set initial charing enabled,0:disable,1:enable
;pmu_init_adc_freq           ---set initial adc frequency,Hz,100/200/400/800
;pmu_init_adcts_freq         ---set initial adc TS,Hz,100/200/400/800
;pmu_init_chg_pretime        ---set initial pre-charging time,min,40/50/60/70
;pmu_init_chg_csttime        ---set initial constance-charging time,min,360/480/600/720
;pmu_batt_cap_correct	     ---correct the battery capacity or not when one charge cycle 0:not correct 1:correct
;pmu_bat_regu_en			 ---bat regulator is enable or not when charge done 0:disable 1:enable
;pmu_bat_para1 		     			 ---battery indication at 3.13V
;pmu_bat_para2               ---battery indication at 3.27V
;pmu_bat_para3               ---battery indication at 3.34V
;pmu_bat_para4               ---battery indication at 3.41V
;pmu_bat_para5               ---battery indication at 3.48V
;pmu_bat_para6               ---battery indication at 3.52V
;pmu_bat_para7               ---battery indication at 3.55V
;pmu_bat_para8               ---battery indication at 3.57V
;pmu_bat_para9               ---battery indication at 3.59V
;pmu_bat_para10              ---battery indication at 3.61V
;pmu_bat_para11              ---battery indication at 3.63V
;pmu_bat_para12              ---battery indication at 3.64V
;pmu_bat_para13              ---battery indication at 3.66V
;pmu_bat_para14              ---battery indication at 3.7V
;pmu_bat_para15              ---battery indication at 3.73V
;pmu_bat_para16              ---battery indication at 3.77V
;pmu_bat_para17              ---battery indication at 3.78V
;pmu_bat_para18              ---battery indication at 3.8V
;pmu_bat_para19              ---battery indication at 3.82V
;pmu_bat_para20              ---battery indication at 3.84V
;pmu_bat_para21              ---battery indication at 3.85V
;pmu_bat_para22              ---battery indication at 3.87V
;pmu_bat_para23              ---battery indication at 3.91V
;pmu_bat_para24              ---battery indication at 3.94V
;pmu_bat_para25              ---battery indication at 3.98V
;pmu_bat_para26              ---battery indication at 4.01V
;pmu_bat_para27              ---battery indication at 4.05V
;pmu_bat_para28              ---battery indication at 4.08V
;pmu_bat_para29              ---battery indication at 4.1V
;pmu_bat_para30              ---battery indication at 4.12V
;pmu_bat_para31              ---battery indication at 4.14V
;pmu_bat_para32              ---battery indication at 4.15V
;pmu_usbvol_limit            ---set usb-ac limited voltage enable,1:enable\EF\BC?:disable
;pmu_usbcur_limit            ---set usb-ac limited current enable,1:enable\EF\BC?:disable
;pmu_usbvol                  ---set usb-ac limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_usbcur                  ---set usb-ac limited current level,mA,500/900, 0 - not limite
;pmu_usbvol_pc	             ---set usb-pc limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_usbcur_pc               ---set usb-pc limited current level,mA,500/900, 0 - not limite
;pmu_pwroff_vol              ---set protect voltage when system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_pwron_vol               ---set protect voltage after system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_pekoff_time             ---set pek off time,ms, 4000/6000/8000/10000
;pmu_pekoff_func             ---set pek off func, 0:shutdown,1:restart
;pmu_pekoff_en		     ---set pek offlevel powerdown or not, 0:not powerdown,1:powerdown
;pmu_peklong_time            ---set pek pek long irq time,ms,1000/1500/2000/2500
;pmu_pekon_time              ---set pek on time,ms,128/1000/2000/3000
;pmu_pwrok_time              ---set pmu pwrok delay time,ms,8/16/32/64
;pmu_battery_warning_level1  ---low power warning high level,5%-20%,1%/step
;pmu_battery_warning_level2  ---low power warning low level,0%-15%,1%/step
;pmu_restvol_time            ---battery indicaton reflash time,30/60/120/
;pmu_ocv_cou_adjust_time     ---ocv battery indication reflash time,60/120/30
;pmu_chgled_func             ---CHGKED pin control\EF\BC?:controlled by pmu,1:controlled by Charger
;pmu_chgled_type             ---CHGLED Type select when pmu_chgled_func=0,0:Type A\EF\BC?:Type B
;pmu_vbusen_func	     ---N_VBUSEN function select,0:as an output,1:as an input
;pmu_reset                   ---when power key press longer than 16's,PMU reset or not.0:not reset 1:reset
;pmu_IRQ_wakeup		     ---press IRQ wakeup or not when sleep or power down.0:not wakeup 1:wakeup
;pmu_hot_shutdowm            ---when PMU over temperature protect or not;0:disable 1:enable
;pmu_inshort		     ---ACIN and VBUS inshort or not by software;0:auto detect 1:inshort
;pmu_temp_enable             ---temp detect enable
;pmu_charge_ltf              ---charge temp low threshold voltage
;pmu_charge_htf              ---charge temp high threshold voltage
;pmu_discharge_ltf           ---shutdown temp low threshold voltage
;pmu_discharge_htf           ---shutdown temp high threshold voltage
;pmu_temp_para1              --- temp -25 voltage
;pmu_temp_para2              --- temp -15 voltage
;pmu_temp_para3              --- temp -10 voltage
;pmu_temp_para4              --- temp -5  voltage
;pmu_temp_para5              --- temp  0  voltage
;pmu_temp_para6              --- temp  5  voltage
;pmu_temp_para7              --- temp  10 voltage
;pmu_temp_para8              --- temp  20 voltage
;pmu_temp_para9              --- temp  30 voltage
;pmu_temp_para10             --- temp  40 voltage
;pmu_temp_para11             --- temp  45 voltage
;pmu_temp_para12             --- temp  50 voltage
;pmu_temp_para13             --- temp  55 voltage
;pmu_temp_para14             --- temp  60 voltage
;pmu_temp_para15             --- temp  70 voltage
;pmu_temp_para16             --- temp  80 voltage
;--------------------------------------------------------------------------------------------------------
[pmu1_para]
pmu_used                   = 1
pmu_id                     = 1
pmu_twi_addr               = 0x34
pmu_twi_id                 = 0
pmu_irq_id                 = 0
pmu_irq_gpio			   = port:PG05<6><default><default><default>
pmu_battery_rdc            = 249
pmu_battery_cap            = 183
pmu_batdeten               = 1
pmu_runtime_chgcur         = 150
pmu_earlysuspend_chgcur    = 150
pmu_suspend_chgcur         = 150
pmu_shutdown_chgcur        = 150
pmu_init_chgvol            = 4200
pmu_init_chgend_rate       = 15
pmu_init_chg_enabled       = 1
pmu_init_adc_freq          = 100
pmu_init_chg_pretime       = 50
pmu_init_chg_csttime       = 720
pmu_battery_warning1        = 3650
pmu_battery_warning2       = 3600


pmu_bat_para1=0
pmu_bat_para2=0
pmu_bat_para3=0
pmu_bat_para4=0
pmu_bat_para5=8
pmu_bat_para6=16
pmu_bat_para7=25
pmu_bat_para8=37
pmu_bat_para9=47
pmu_bat_para10=55
pmu_bat_para11=61
pmu_bat_para12=68
pmu_bat_para13=79
pmu_bat_para14=87
pmu_bat_para15=94
pmu_bat_para16=100

pmu_usbvol_limit           = 1
pmu_usbcur_limit           = 0
pmu_usbvol                 = 4000
pmu_usbcur                 = 0
pmu_usbvol_pc            = 4000
pmu_usbcur_pc            = 0
pmu_pwroff_vol             = 3300
pmu_pwron_vol            = 2900
pmu_pekoff_time            = 6000
pmu_pekoff_en              = 1
pmu_peklong_time           = 1500
pmu_pekon_time             = 1000
pmu_pwrok_time             = 64
pmu_pwrnoe_time          = 2000
pmu_hot_shutdown            = 1
pmu_suspendpwroff_vol    = 3500
power_start              = 1

[pmu1_regu]
regulator_count = 7
regulator1      = "axp20_dcdc2 none vdd-sys vdd-cpu vdd-ephy"
regulator2      = "axp20_dcdc3 none vcc-io hpvcc vcc-pd vcc-usb vcc-ephy vcc-mcsi vcc-lcd vcc-wifi vcc-device vcc-csi vcc-ctp"
regulator3      = "axp20_ldo1 none vcc-rtc"
regulator4      = "axp20_ldo2 none  vcc-avcc vcc-pll"
regulator5      = "axp20_ldo3 none vcc-pe csi-avdd"
regulator6      = "axp20_ldo4 none csi-dvdd"
regulator7      = "axp20_ldoio0 none"

;----------------------------------------------------------------------------------
; dvfs voltage-frequency table configuration
;
; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk
;                     1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator
; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz
; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz
;
; LV_count: count of LV_freq/LV_volt, must be < 16
;
; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz,  1536Mhz]
; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz,  1296Mhz]
; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz,  1200Mhz]
; LV4: core vdd is 1.20v if cpu frequency is (816Mhz,   1008Mhz]
; LV5: core vdd is 1.10v if cpu frequency is (648Mhz,    816Mhz]
; LV6: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
; LV7: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
; LV8: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
;
;----------------------------------------------------------------------------------
[dvfs_table]
extremity_freq = 1008000000
max_freq = 1008000000
min_freq = 60000000

LV_count = 8

LV1_freq = 1008000000
LV1_volt = 1200

LV2_freq = 1008000000
LV2_volt = 1200

LV3_freq = 940000000
LV3_volt = 1200

LV4_freq = 940000000
LV4_volt = 1200

LV5_freq = 816000000
LV5_volt = 1100

LV6_freq = 648000000
LV6_volt = 1040

LV7_freq = 0
LV7_volt = 1040

LV8_freq = 0
LV8_volt = 1040

;----------------------------------------------------------------------------------
;virtual device
;virtual device for pinctrl testing
;device have pin PA1 PA2
;----------------------------------------------------------------------------------
[Vdevice]
Vdevice_used        = 1
Vdevice_0           = port:PA01<5><1><2><default>
Vdevice_1           = port:PA02<5><1><2><default>

;----------------------------------------------------------------------------------
; dram dvfs voltage-frequency table configuration
;
; LV_count: count of LV_freq/LV_volt
;
; LV1: core vdd is 1.1v if dram frequency is (360Mhz, 552Mhz]
; LV2: core vdd is 1.0v if dram frequency is (  0Mhz, 360Mhz]
; LV3: core vdd is 1.0v if dram frequency is (  0Mhz, 360Mhz]
;
;----------------------------------------------------------------------------------
[dram_dvfs_table]
LV_count = 3

LV1_freq = 552000000
LV1_volt = 1100

LV2_freq = 360000000
LV2_volt = 1000

LV3_freq = 0
LV3_volt = 1000


[fel_key]
fel_key_used =  1
fel_key_min  =  0
fel_key_max  = 	60

[leds_para]
leds_used = 1
led_0 = port:PG00<1><default><default><0>
led_0_active_low = 0
led_1 = port:PG01<1><default><default><0>
led_1_active_low = 0
led_2 = port:PG02<1><default><default><0>
led_2_active_low = 0
;led_3 = port:PA00<1><default><default><0>
;led_3_active_low = 0
;led_4 = port:PA00<1><default><default><0>
;led_4_active_low = 0
;led_5 = port:PA00<1><default><default><0>
;led_5_active_low = 0
;led_6 = port:PA00<1><default><default><0>
;led_6_active_low = 0
;led_7 = port:PA00<1><default><default><0>
;led_7_active_low = 0

把 sys_config.fex 改成这样, 然后执行 sunxi-tools/fex2bin sys_config.fex uart2.dtb

烧录设备树:

sudo sunxi-fel -p spiflash-write 0x100000 uart2.dtb

根据这个帖子,把默认的uart0 输出改成  uart2

修改启动默认参数:

#define CONFIG_BOOTCOMMAND "setenv bootm_boot_mode sec;" \
                       "setenv machid 1029;" \
                       "sf probe 0 108000000; " \
                       "sf read 0x41d00000 0x100000 0x010000;" \
                       "sf read 0x41000000 0x300000 0x300000;"\
                       "bootm 0x41000000"

#define CONFIG_BOOTARGS "console=ttyS2,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw;"

烧录u-boot:

sudo sunxi-fel -p spiflash-write 0 u-boot-sunxi-with-spl.bin



使用这个V3s主线u-boot引导官方linux,带Qt文件系统,网卡已测试.7z 文件里面的 uImage

烧录uImage:

sudo sunxi-fel -p spiflash-write 0x300000 uImage


经过上面的步骤, 可以运行在海豚派的开发板上面了,这个开发板使用的调试串口是uart2.

QQ20180717180404.jpeg

离线

#81 2018-07-21 22:01:16

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

ubuntu 16.04自带的两个 gcc 都不行:

root@ubuntu:~# arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabihf/5/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armhf-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armhf-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armhf-cross --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabihf --program-prefix=arm-linux-gnueabihf- --includedir=/usr/arm-linux-gnueabihf/include
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
root@ubuntu:~# arm-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/arm-linux-gnueabi/5/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-armel-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-armel-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-armel-cross --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv5t --with-float=soft --disable-werror --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=arm-linux-gnueabi --program-prefix=arm-linux-gnueabi- --includedir=/usr/arm-linux-gnueabi/include
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.9)
root@ubuntu:~#
root@ubuntu:~# cat /etc/issue
Ubuntu 16.04.2 LTS \n \l

也一样会出编译错误:

include/linux/compiler-gcc.h:100:30: fatal error: linux/compiler-gcc5.h: No such file or directory
compilation terminated.
/opt/linux-3.4/./Kbuild:35: recipe for target 'kernel/bounds.s' failed
make[1]: *** [kernel/bounds.s] Error 1
Makefile:985: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2

解决办法:

sudo apt remove *-arm-linux-gnueabi*   ###删除所有工具链包
sudo apt install gcc-4.7-arm-linux-gnueabihf    ###安装gcc 4.7 浮点数工具链包
ln -s /usr/bin/arm-linux-gnueabihf-gcc-4.7 /usr/bin/arm-linux-gnueabihf-gcc      ###建立gcc软连接
ln -s /usr/bin/arm-linux-gnueabihf-g++-4.7 /usr/bin/arm-linux-gnueabihf-g++  ###建立g++软连接

经过上面的折腾之后,药到病除.

离线

#82 2018-07-22 23:23:54

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

;A23 PAD application
;---------------------------------------------------------------------------------------------------------
; port configuration:
; port_name = port:GPIO<mux><pull up/down><driver level><default value>
; mux: GPIO function configuration, 0-input, 1-output, 2+: special funciton for modules
; pull up/down: 1-pull up, 2-pull down
; driver level: 0,1,2,3. 2 is recommended
; default value: default output value when this IO is configured as an output IO
;---------------------------------------------------------------------------------------------------------

[product]
version = "100"
machine = "tiger-cdr"

[platform]
eraseflag   = 0

;----------------------------------------------------------------------------------
;[target]  system bootup configuration
;boot_clock	= CPU boot frequency, Unit: MHz
;storage_type	= boot medium, 0-nand, 1-card0, 2-card2, -1(defualt)auto scan
;speed_mod    0 : normal read ; 1 dual line fast read
;----------------------------------------------------------------------------------
[target]
boot_clock   	= 1008
storage_type  	= -1

[boot_spi_board0]
boot_spi_speed_hz = 60000000
speed_mod         = 1 

;----------------------------------------------------------------------------------
;dcdc1_vol	---set dcdc1 voltage,mV,1600-3400,100mV/step
;dcdc2_vol	---set dcdc2 voltage,mV,600-1540,20mV/step
;dcdc3_vol	---set dcdc3 voltage,mV,600-1860,20mV/step
;dcdc4_vol	---set dcdc4 voltage,mV,600-1540,20mV/step
;dcdc5_vol	---set dcdc5 voltage,mV,1000-2550,50mV/step
;aldo2_vol	---set aldo2 voltage,mV,700-3300,100mV/step
;aldo3_vol	---set aldo3 voltage,mV,700-3300,100mV/step
;----------------------------------------------------------------------------------
[power_sply]
dcdc2_vol       = 1200
dcdc3_vol       = 3300
aldo2_vol       = 2500
aldo3_vol       = 3000
ldo1_vol        = 3300
ldo2_vol        = 3000
;ldo3_vol        = 2800
;ldo4_vol        = 1800


;----------------------------------------------------------------------------------
;card boot
;----------------------------------------------------------------------------------
[card_boot]
logical_start   = 40960
spinor_verify   = 1
sprite_gpio0    =

;----------------------------------------------------------------------------------
;[cardx_boot_para] boot card configuration
;card_ctrl 	 = boot card NO. 0 or 2
;card_high_speed = speed mode, 0-normal mode(up to 25MHz), 1-high speed mode(up to 50MHz)
;card_line       = boot card buswidth(1 or 4)
;----------------------------------------------------------------------------------
[card0_boot_para]
card_ctrl       = 0
card_high_speed = 1
card_line       = 4
sdc_d1          = port:PF0<2><1><default><default>
sdc_d0          = port:PF1<2><1><default><default>
sdc_clk         = port:PF2<2><1><default><default>
sdc_cmd         = port:PF3<2><1><default><default>
sdc_d3          = port:PF4<2><1><default><default>
sdc_d2          = port:PF5<2><1><default><default>

;[card2_boot_para]
;card_ctrl       = 2
;card_high_speed = 1
;card_line       = 4
;sdc_cmd         = port:PC00<2><1><2><default>
;sdc_clk         = port:PC01<2><1><2><default>
;sdc_d0          = port:PC03<2><1><2><default>
;sdc_d1          = port:PC04<2><1><2><default>
;sdc_d2          = port:PC05<2><1><2><default>
;sdc_d3          = port:PC06<2><1><2><default>

;----------------------------------------------------------------------------------
;[twi_para] twi for boot code
;twi_port	= twi controller ID
;----------------------------------------------------------------------------------
[twi_para]
twi_port        = 0
twi_scl         = port:PB06<2><default><default><default>
twi_sda         = port:PB07<2><default><default><default>

;----------------------------------------------------------------------------------
;[uart_para] boot debug port configuration
;uart_debug_port = uart port ID for boot debug
;----------------------------------------------------------------------------------
;origin
;[uart_para]
;uart_debug_port = 1
;uart_debug_tx   = port:PE21<4><1><default><default>
;uart_debug_rx   = port:PE22<4><1><default><default>

[uart_para]
uart_debug_port = 2
uart_debug_tx   = port:PB00<3><1><default><default>
uart_debug_rx   = port:PB01<3><1><default><default>

;uart_debug_port = 2
;uart_debug_tx   = port:PB00<2><1><default><default>
;uart_debug_rx   = port:PB01<2><1><default><default>


;card print
;uart_debug_tx    = port:PF02<3><1><default><default>
;uart_debug_rx    = port:PF04<3><1><default><default>


;----------------------------------------------------------------------------------
;[jtag_para] jtag configuration
;jtag_enable     = 0-disable jtag, 1-enable jtag
;----------------------------------------------------------------------------------
[jtag_para]
jtag_enable     = 0
jtag_ms         = port:PF00<3><default><default><default>
jtag_ck         = port:PF05<3><default><default><default>
jtag_do         = port:PF03<3><default><default><default>
jtag_di         = port:PF01<3><default><default><default>

;----------------------------------------------------------------------------------
;[clock] pll configuration
;----------------------------------------------------------------------------------
[clock]
pll3            = 297
pll4            = 300
pll6            = 600
pll8            = 360
pll9            = 480
pll10           = 297

;---------------------------------------------------------------------------------------------------------
;[pm_para] power management
;standby_mode = 0-normal standby, 1-super standby
;---------------------------------------------------------------------------------------------------------
[pm_para]
standby_mode		= 1

;----------------------------------------------------------------------------------
;sys_pwr_dm_para
;this para is used to change default sys_pwr_dm config when necessary.
;   allowed sys_pwr_dm is such as follow:
;		vdd-cpua
; 		vdd-cpub
; 		vdd-gpu
; 		vcc-dram
; 		vdd-sys
; 		which is compatible with pmu regu config. see: [pmu1_regu] for more info.
;   value: 0: del the pwr_dm from sys_pwr_dm_mask;
;	   1: add the pwr_dm into sys_pwr_dm_mask;
;----------------------------------------------------------------------------------
[sys_pwr_dm_para]
;vdd-cpua = 1
;vdd-sys  = 1

;----------------------------------------------------------------------------------
;dynamic_standby_para
;   enable:
;	value: 0: all config is ignored.
;	       1: all config is effective.
;   dram_selfresh_flag:
;	value: 0: dram will not enter selfresh,
;		    this config is used for stop dram entering selfresh, in case of dram memory have bug.
;	       1: dram will enter slefresh.
;
;----------------------------------------------------------------------------------
[dynamic_standby_para]
enable = 0
dram_selfresh_flag = 1
vdd_cpua_vol     = 1200
vdd_sys_vol      = 1200

;*****************************************************************************
;sdram configuration
;
;*****************************************************************************
[dram_para]
dram_clk        = 360
dram_type       = 2
dram_zq         = 0x39bb
dram_odt_en     = 0
dram_para1      = 0x10E20000
dram_para2      = 0x0000
dram_mr0        = 0x1840
dram_mr1        = 0x4
dram_mr2        = 0x18
dram_mr3        = 0x4
dram_tpr0       = 0x00832087
dram_tpr1       = 0x01C24085
dram_tpr2       = 0x0002A01D
dram_tpr3       = 0x0
dram_tpr4       = 0x0
dram_tpr5       = 0x0
dram_tpr6       = 0x0
dram_tpr7       = 0x0
dram_tpr8       = 0x0
dram_tpr9       = 0x0
dram_tpr10      = 0x0
dram_tpr11      = 0x220000
dram_tpr12      = 0x78
dram_tpr13      = 0x0d000000

;---------------------------------------------------------------------------------------------------------
; if 1 == standby_mode, then support super standby;
; else, support normal standby.
;---------------------------------------------------------------------------------------------------------
[pm_para]
standby_mode		= 0

;---------------------------------------------------------------------------------------------------------
; wakeup_src_para:
;	sometimes, u would like to add more wakeup src in standby mode, these para will be
;	help;
;	u need to make sure the standby mode support the wakeup src. Also, some hw
;	condition must be guaranteed.
;	including:
;	cpu_en: power on or off.
;		1: mean power on
;		0: mean power off
;	cpu_freq: indicating lowest freq. unit is Mhz;
;	dram selfresh_en: selfresh or not.
;		1: enable enter selfresh
;		0: disable enter selfresh
;	dram_pll: if not enter selfresh, indicating lowest freq. unit is Mhz;
;	wakeup_src: to make the scenario work, the wakeup src is needed.
;---------------------------------------------------------------------------------------------------------
[wakeup_src_para]
cpu_en		= 0
cpu_freq	= 48
; (cpu:apb:ahb)
pll_ratio	= 0x111
dram_selfresh_en= 1
dram_freq	= 36
wakeup_src_wl 	= port:PL07<4><default><default><0>
wakeup_src_bt 	= port:PL09<4><default><default><0>
bb_wake_ap	= port:PL02<4><default><default><0>

;----------------------------------------------------------------------------------
;i2c configuration
; twi_used = twix enable    ;; twi0->use pmu axp209 ,  twi1->use gsenor
;----------------------------------------------------------------------------------
[twi0]
twi_used        = 1
twi_scl         = port:PB06<2><default><default><default>
twi_sda         = port:PB07<2><default><default><default>

[twi1]
twi_used        = 0
twi_scl         = port:PB08<2><default><default><default>
twi_sda         = port:PB09<2><default><default><default>

;----------------------------------------------------------------------------------
;uart configuration
;uart_used = uart x enable
;uart_port = x; x is order number of ttySx
;uart_type       = 2:2 wire,4:4 wire,8:8 wire, full function
;----------------------------------------------------------------------------------
[uart0]
uart_used       = 1
uart_port       = 0
uart_type       = 2
uart_tx         = port:PB08<3><1><default><default>
uart_rx         = port:PB09<3><1><default><default>
;card print
;uart_tx         = port:PF02<3><1><default><default>
;uart_rx         = port:PF04<3><1><default><default>

[uart1]
uart_used       = 1
uart_port	    = 1
uart_type       = 2
uart_tx         = port:PE21<4><1><default><default>
uart_rx         = port:PE22<4><1><default><default>

[uart2]
uart_used       = 1
uart_port	    = 2
uart_type       = 2
uart_tx         = port:PB00<2><1><default><default>
uart_rx         = port:PB01<2><1><default><default>

;----------------------------------------------------------------------------------
;SPI controller configuration
;spi_used       = SPIx enable
;spi_cs_bitmap  = SPI bit mapping
;----------------------------------------------------------------------------------
[spi0]
spi_used       = 1
spi_cs_bitmap  = 1
spi_mosi       = port:PC03<3><default><default><default>
spi_miso       = port:PC00<3><default><default><default>
spi_sclk       = port:PC01<3><default><default><default>
spi_cs0        = port:PC02<3><1><default><default>

;----------------------------------------------------------------------------------
;SPI device configuration
;spi_dev_num: number of spi devices
;----------------------------------------------------------------------------------
[spi_devices]
spi_dev_num = 1

;----------------------------------------------------------------------------------
;[spi_board0] spi device configuration
;modalias      = spi device name
;max_speed_hz  = max transfer speed
;bus_num       = bus ID
;chip_select   = chip select, 0,1
;mode          = SPI transfer mode
; sflash_size- 16 : 16M nor flash size , 8 : 8M nor flash size
;----------------------------------------------------------------------------------
[spi_board0]
modalias      = "w25q128"
max_speed_hz  = 50000000
bus_num       = 0
chip_select   = 0
mode          = 0
sflash_size   = 16


;----------------------------------------------------------------------------------
;capacitor tp configuration
;ctp_twi_id : twi controller ID
;ctp_twi_addr : I2C slave address, 7bit
;ctp_screen_max_x/_y : resolution of touch panel
;ctp_revert_x/_y_flag : whether need to revert x/y
;ctp_exchange_x_y_flag: whether need to exchange the value of x and y
;ctp_int_port : port for tp's interrupt signal
;ctp_wakeup : port for wakeup tp
;----------------------------------------------------------------------------------
[ctp_para]
ctp_used            = 1
ctp_name            = "gt911_m785q6"
ctp_twi_id          = 0
ctp_twi_addr        = 0x48
ctp_screen_max_x    = 800
ctp_screen_max_y    = 480
ctp_revert_x_flag   = 0
ctp_revert_y_flag   = 0
ctp_exchange_x_y_flag = 1

ctp_int_port        = port:PG04<6><default><default><default>
ctp_wakeup          = port:PG03<1><default><default><1>

;--------------------------------------------------------------------------------
; CTP automatic detection configuration
;ctp_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[ctp_list_para]
ctp_det_used              = 0
gt911_ts                  = 1
ft5x_ts                   = 1
gt82x                     = 1
gslX680                   = 1
gt9xx_ts                  = 1
gt811                     = 1
zet622x                   = 1
aw5306_ts                 = 1

;----------------------------------------------------------------------------------
;touch key configuration
;tkey_twi_id : twi controller ID
;tkey_twi_addr : I2C slave address, 7bit
;tkey_int : port for touch key's interrupt signal
;----------------------------------------------------------------------------------
[tkey_para]
tkey_used           = 0
tkey_twi_id         =
tkey_twi_addr       =
tkey_int            =

;----------------------------------------------------------------------------------
;motor configuration
;motor_shake : port for making the moto shaking
;----------------------------------------------------------------------------------
[motor_para]
motor_used          = 0
motor_shake         = port:power3<1><default><default><1>

;----------------------------------------------------------------------------------
;cooler_table  cooler_count <=32
;----------------------------------------------------------------------------------
[cooler_table]
cooler_count = 4
cooler0 = "1340000 4 4294967295 0"
cooler1 = "1200000 4 4294967295 0"
cooler2 = "1008000 4 4294967295 0"
cooler3 =  "648000 4 4294967295 0"

;----------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode             (0:screen0<screen0,fb0>)
;screenx_output_type   (0:none; 1:lcd; 3:hdmi;)
;screenx_output_mode   (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
;                      (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
;fbx format            (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
;fbx pixel sequence    (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
;fb0_scaler_mode_enable(scaler mode enable, used FE)
;fbx_width,fbx_height  (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
;lcdx_backlight        (lcd init backlight,the range:[0,256],default:197
;lcdx_yy               (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
;lcd0_contrast         (LCD contrast, 0~100)
;lcd0_saturation       (LCD saturation, 0~100)
;lcd0_hue              (LCD hue, 0~100)
;----------------------------------------------------------------------------------
[disp_init]
disp_init_enable         = 1
disp_mode                = 0

screen0_output_type      = 1
screen0_output_mode      = 4

screen1_output_type      = 1
screen1_output_mode      = 4

fb0_format               = 10
fb0_pixel_sequence       = 0
fb0_scaler_mode_enable   = 0
fb0_width                = 0
fb0_height               = 0

fb1_format               = 10
fb1_pixel_sequence       = 0
fb1_scaler_mode_enable   = 0
fb1_width                = 0
fb1_height               = 0

lcd0_backlight           = 102
lcd1_backlight           = 102

lcd0_bright              = 50
lcd0_contrast            = 50
lcd0_saturation          = 57
lcd0_hue                 = 50

lcd1_bright              = 50
lcd1_contrast            = 50
lcd1_saturation          = 57
lcd1_hue                 = 50

;----------------------------------------------------------------------------------
;lcd0 configuration

;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
;lcd_x:                lcd horizontal resolution
;lcd_y:                lcd vertical resolution
;lcd_width:            width of lcd in mm
;lcd_height:           height of lcd in mm
;lcd_dclk_freq:        in MHZ unit
;lcd_pwm_freq:         in HZ unit
;lcd_pwm_pol:          lcd backlight PWM polarity
;lcd_pwm_max_limit     lcd backlight PWM max limit(<=255)
;lcd_hbp:              hsync back porch
;lcd_ht:               hsync total cycle
;lcd_vbp:              vsync back porch
;lcd_vt:               vysnc total cycle
;lcd_hspw:             hsync plus width
;lcd_vspw:             vysnc plus width
;lcd_lvds_if:          0:single link;  1:dual link
;lcd_lvds_colordepth:  0:8bit; 1:6bit
;lcd_lvds_mode:        0:NS mode; 1:JEIDA mode
;lcd_frm:              0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
;lcd_io_phase:         0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
;                      8~11bit:dclk phase; 12~15bit:de phase)
;lcd_gamma_en          lcd gamma correction enable
;lcd_bright_curve_en   lcd bright curve correction enable
;lcd_cmap_en           lcd color map function enable
;deu_mode              0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
;                      decrease it while lcd is not bright enough; increase while lcd is too bright
;smart_color           90:normal lcd screen 65:retina lcd screen(9.7inch)
;----------------------------------------------------------------------------------
[lcd0_para]
lcd_used            = 1
lcd_driver_name     = "wtq05027d01"
lcd_if              = 0
lcd_x               = 480
lcd_y               = 272
lcd_width           = 0
lcd_height          = 0
lcd_dclk_freq       = 9
lcd_pwm_used        = 0
lcd_pwm_ch          = 0
lcd_pwm_freq        = 50000
lcd_pwm_pol         = 1
lcd_pwm_max_limit   = 255
lcd_hbp             = 37
lcd_ht              = 531
lcd_hspw            = 6
lcd_vbp             = 12
lcd_vt              = 288
lcd_vspw            = 10
lcd_frm             = 0
lcd_hv_clk_phase    = 0
lcd_hv_sync_polarity = 0
lcd_gamma_en        = 0
lcd_bright_curve_en = 1
lcd_cmap_en         = 0

lcd_hv_if	    	= 0
lcd_hv_srgb_seq	    = 0
lcd_rb_swap			= 0


lcdgamma4iep        = 22
smart_color        = 90

lcd_bl_en           = port:PB9<1><0><default><1>
lcd_power           = ""

lcdd2               = port:PE04<3><0><default><default>
lcdd3               = port:PE05<3><0><default><default>
lcdd4               = port:PE06<3><0><default><default>
lcdd5               = port:PE07<3><0><default><default>
lcdd6               = port:PE08<3><0><default><default>
lcdd7               = port:PE09<3><0><default><default>
lcdd10              = port:PE10<3><0><default><default>
lcdd11              = port:PE11<3><0><default><default>
lcdd12              = port:PE12<3><0><default><default>
lcdd13              = port:PE13<3><0><default><default>
lcdd14              = port:PE14<3><0><default><default>
lcdd15              = port:PE15<3><0><default><default>
lcdd18              = port:PE16<3><0><default><default>
lcdd19              = port:PE17<3><0><default><default>
lcdd20              = port:PE18<3><0><default><default>
lcdd21              = port:PE19<3><0><default><default>

lcdd22              = port:PE23<3><0><default><default>
lcdd23              = port:PE24<3><0><default><default>

lcdclk              = port:PE00<3><0><3><default>
lcdde               = port:PE01<3><0><3><default>
lcdhsync            = port:PE02<3><0><3><default>
lcdvsync            = port:PE03<3><0><3><default>
;----------------------------------------------------------------------------------
;pwm config
;----------------------------------------------------------------------------------
[pwm0_para]
pwm_used            = 1
pwm_positive        = port:PB04<2><0><default><default>

[pwm1_para]
pwm_used            = 0
pwm_positive        = port:PH01<2><0><default><default>

;------------------------------------------------------------------------------;
; 10/100/100Mbps Ethernet MAC Controller Configure                             ;
;------------------------------------------------------------------------------;
;   Options:                                                                   ;
;   gmac_used  ---  0: not used, 1: external phy, 2: internal phy              ;
;   gmac_powerx --  A[:B] A: axp channel, B: voltage value                     ;
;       If set gamc_phy to use internal PHY, do not config port                ;
;------------------------------------------------------------------------------;
;         MII        RMII         MII        RMII         MII        RMII      ;
;   PD00  *                 PD06   *           *    PD12   *           *       ;
;   PD01  *                 PD07   *                PD13   *           *       ;
;   PD02  *            *    PD08   *                PD14   *                   ;
;   PD03  *            *    PD09   *           *    PD15   *                   ;
;   PD04  *                 PD10   *           *    PD16   *           *       ;
;   PD05  *                 PD11   *           *    PD17   *           *       ;
;------------------------------------------------------------------------------;
[gmac0]
gmac_used          = 2
gmac_power1        = 

;--------------------------------------------------------------------------------
;vip (video input port) configuration
;vip_used: 0:disable 1:enable
;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer
;vip_dev_qty: The quantity of devices linked to capture bus
;
;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and
;                                    verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured!
;
;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured!
;
;vip_dev(x)_isp_used 0:not use isp 1:use isp
;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb
;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby
;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable
;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable
;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply
;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply
;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply
;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply
;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply
;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply
;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply
;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply
;x indicates the index of the devices which are linked to the same capture bus
;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;--------------------------------------------------------------------------------

[csi0]
vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "h22_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x60
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = "csi-avdd"
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = "csi-dvdd"
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PG00<1><default><default><default>
vip_dev0_pwdn            = port:PG01<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;--------------------------------------------------------------------------------

[csi0]

vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "h22_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x60
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = "csi-avdd"
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = "csi-dvdd"
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PG00<1><default><default><default>
vip_dev0_pwdn            = port:PG01<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =

[csi1]
vip_used                 = 0
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_pck              = port:PE00<2><default><default><default>
vip_csi_mck              = port:PE01<2><default><default><default>
vip_csi_hsync            = port:PE02<2><default><default><default>
vip_csi_vsync            = port:PE03<2><default><default><default>
vip_csi_d0               = port:PE04<2><default><default><default>
vip_csi_d1               = port:PE05<2><default><default><default>
vip_csi_d2               = port:PE06<2><default><default><default>
vip_csi_d3               = port:PE07<2><default><default><default>
vip_csi_d4               = port:PE08<2><default><default><default>
vip_csi_d5               = port:PE09<2><default><default><default>
vip_csi_d6               = port:PE10<2><default><default><default>
vip_csi_d7               = port:PE11<2><default><default><default>
vip_csi_d8               = port:PE12<2><default><default><default>
;vip_csi_d9               = port:PE13<2><default><default><default>
vip_csi_d10               = port:PE14<2><default><default><default>
vip_csi_d11               = port:PE15<2><default><default><default>

vip_csi_sck               = port:PE21<2><default><default><default>
vip_csi_sda               = port:PE22<2><default><default><default>

vip_dev0_mname           = "ov5640"
vip_dev0_pos             = "front"
vip_dev0_twi_id          = 4
vip_dev0_twi_addr        = 0x78
vip_dev0_isp_used        = 0
vip_dev0_fmt             = 0
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 2800000
vip_dev0_avdd            = ""
vip_dev0_avdd_vol        = 2800000
vip_dev0_dvdd            = ""
vip_dev0_dvdd_vol        = 1500000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PE23<1><default><default><default>
vip_dev0_pwdn            = port:PE24<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =

vip_dev0_act_used        = 0
vip_dev0_act_name        = "ad5820_act"
vip_dev0_act_slave       = 0x18

vip_dev1_mname           = "gc2035"
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 4
vip_dev1_twi_addr        = 0x78
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =
;-------------------------------------------------------------------------------
;   mmc configuration
;
;   Config Guide
;   sdc_used:      1-enable card, 0-disable card
;   sdc_detmode:   card detect mode
;                  1-detect card by gpio polling
;                  2-detect card by gpio irq(must use IO with irq function)
;                  3-no detect, always in for boot card
;                  4-manually insert and remove by /proc/driver/sunxi-mmc.x/insert
;   sdc_buswidth:  card bus width, 1-1bit, 4-4bit, 8-8bit
;   sdc_use_wp:    1-with write protect IO, 0-no write protect IO
;   sdc_isio:      for sdio card
;   sdc_regulator: power control.if card supports UHS-I/DDR and HS200 timing for
;                  SD3.0 or eMMC4.5, regulator must be configured. the value is
;                  the ldo name of AXP221, eg: sdc_regulator = "axp22_eldo2"
;   other: GPIO Mapping configuration
;
;   Note:
;   1 if detmode=2, sdc_det's config=6
;     else if detmode=1, sdc_det's config=0
;     else sdc_det IO is not necessary
;   2 if the customer wants to support UHS-I and HS200 features, he must provide
;     an independent power supply for the card. This is only used in platforms
;     that supports SD3.0 cards and eMMC4.4+ flashes
;-------------------------------------------------------------------------------
[mmc0_para]
sdc_used          = 1
sdc_detmode       = 3
sdc_buswidth      = 4
sdc_d1            = port:PF00<2><1><2><default>
sdc_d0            = port:PF01<2><1><2><default>
sdc_clk           = port:PF02<2><1><2><default>
sdc_cmd           = port:PF03<2><1><2><default>
sdc_d3            = port:PF04<2><1><2><default>
sdc_d2            = port:PF05<2><1><2><default>
sdc_det           = port:PF06<0><1><default><default>
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 0
sdc_regulator     = "none"

[mmc1_para]
sdc_used          = 0
sdc_detmode       = 4
sdc_buswidth      = 4
sdc_clk           = port:PG00<2><1><1><default>
sdc_cmd           = port:PG01<2><1><1><default>
sdc_d0            = port:PG02<2><1><1><default>
sdc_d1            = port:PG03<2><1><1><default>
sdc_d2            = port:PG04<2><1><1><default>
sdc_d3            = port:PG05<2><1><1><default>
sdc_det           =
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 1
sdc_regulator     = "none"

[mmc2_para]
sdc_used          = 0
sdc_detmode       = 3
sdc_buswidth      = 8
sdc_clk           = port:PC00<2><1><2><default>
sdc_cmd           = port:PC01<2><1><2><default>
sdc_d0            = port:PC03<2><1><2><default>
sdc_d1            = port:PC04<2><1><2><default>
sdc_d2            = port:PC05<2><1><2><default>
sdc_d3            = port:PC06<2><1><2><default>
sdc_d4            = port:PC07<2><1><2><default>
sdc_d5            = port:PC08<2><1><2><default>
sdc_d6            = port:PC09<2><1><2><default>
sdc_d7            = port:PC10<2><1><2><default>
emmc_rst          = port:PC02<2><1><2><default>
sdc_det           =
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 0
sdc_regulator     = "none"

;----------------------------------------------------------------------------------
;usb configuration
;usb_used:          usb controller enable, 0-disable, 1-enable
;usb_port_type:     usb mode: 0-device, 1-host, 2-otg
;usb_detect_type:   usb hotplug detect mode, 0-none, 1-vbus/id detect, 2-id/dpdm detect
;usb_id_gpio:       usb id detect IO
;usb_det_vbus_gpio: usb vbus detect IO, "axp_ctrl" for axp
;usb_drv_vbus_gpio: usb dirve vbus IO
;usb_restrict_gpio: usb current restrict IO
;usb_restric_flag:  usb current restrict flag
;----------------------------------------------------------------------------------
[usbc0]
usb_used            = 1
usb_port_type       = 2
usb_detect_type     = 1
usb_id_gpio         = port:PF6<0><1><default><default>
usb_det_vbus_gpio   = port:PF6<0><1><default><default>
usb_drv_vbus_gpio   = port:PG3<1><0><default><0>
usb_restrict_gpio   =
usb_host_init_state = 0
usb_restric_flag    = 0
usb_restric_voltage = 3550000
usb_restric_capacity= 5
usb_regulator_io    = "nocare"
usb_regulator_vol   = 0
usb_not_suspend     = 0
;----------------------------------------------------------------------------------

; USB Device vendor Info.
;----------------------------------------------------------------------------------
[usb_feature]
vendor_id           = 0x18D1
mass_storage_id     = 0x0001
adb_id              = 0x0002

manufacturer_name   = "USB Developer"
product_name        = "Android"
serial_number       = "20080411"

[msc_feature]
vendor_name         = "USB 2.0"
product_name        = "USB Flash Driver"
release             = 100
luns                = 1

[serial_feature]
serial_unique       = 0

;--------------------------------------------------------------------------------
; G sensor configuration
; gs_twi_id	---  TWI ID for controlling Gsensor (0: TWI0, 1: TWI1, 2: TWI2)
;--------------------------------------------------------------------------------
[gsensor_para]
gsensor_used        = 0
gsensor_twi_id      = 0
;gsensor_twi_addr    = 0x18
gsensor_twi_addr    = 0x27
gsensor_int1        = 
gsensor_int2        =

;--------------------------------------------------------------------------------
; G sensor automatic detection configuration
;gsensor_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[gsensor_list_para]
gsensor_det_used          = 0
bma250                    = 1
da380					  = 1
mma8452                   = 1
mma7660                   = 1
mma865x                   = 1
afa750                    = 1
lis3de_acc                = 1
lis3dh_acc                = 1
kxtik                     = 1
dmard10                   = 0
dmard06                   = 1
mxc622x                   = 1
fxos8700                  = 1
lsm303d                   = 1

;--------------------------------------------------------------------------------
; gps gpio configuration
; gps_spi_id:     the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used
; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1
; gps_lradc:      the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc
;--------------------------------------------------------------------------------
[gps_para]

;--------------------------------------------------------------------------------
;wifi configuration
;wifi_sdc_id:    0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3
;wifi_usbc_id:   0- USB0, 1- USB1, 2- USB2
;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)
;wifi_mod_sel:   0- none, 1- ap6181, 2- ap6210(wifi+bt),
;                3 - rtl8188eu, 4- rtl8723au(wifi+bt)
;--------------------------------------------------------------------------------
[wifi_para]
wifi_used          = 0
wifi_sdc_id        = 1
wifi_usbc_id       = 1
wifi_usbc_type     = 1
wifi_mod_sel       = 2
wifi_power         = ""

; 1 - ap6181 sdio wifi gpio config
;ap6xxx_wl_regon      = port:PL06<1><default><default><0>
;ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>

; 2 - ap6210 sdio wifi gpio config
ap6xxx_wl_regon      = port:PL06<1><default><default><0>
ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>
ap6xxx_bt_regon      = port:PL08<1><default><default><0>
ap6xxx_bt_wake       = port:PL10<1><default><default><0>
ap6xxx_bt_host_wake  = port:PL09<4><default><default><0>
ap6xxx_lpo_use_apclk = 1

; 3 - rtl8188eu usb wifi gpio conifg

; 4 - rtl8723au usb wifi + bt

;--------------------------------------------------------------------------------
;light sensor
;--------------------------------------------------------------------------------
[ls_para]
ls_used             = 0
ls_twi_id           = 1
ls_twi_addr         = 0x23
ls_int              = port:PB07<4><1><default><default>

;--------------------------------------------------------------------------------
; lsensor automatic detection configuration
;ls_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[ls_list_para]
ls_det_used          = 0
ltr_501als           = 1
jsa1212              = 1

;--------------------------------------------------------------------------------
;compass
;--------------------------------------------------------------------------------
[compass_para]
compass_used        = 0
compass_twi_id      = 1
compass_twi_addr    = 0x0d
compass_int         =

;--------------------------------------------------------------------------------
;daudio_master:1: SND_SOC_DAIFMT_CBM_CFM(codec clk & FRM master)        use
;			2: SND_SOC_DAIFMT_CBS_CFM(codec clk slave & FRM master)  not use
;			3: SND_SOC_DAIFMT_CBM_CFS(codec clk master & frame slave) not use
;			4: SND_SOC_DAIFMT_CBS_CFS(codec clk & FRM slave)         use
;daudio_select:0 is pcm.1 is i2s
;audio_format: 1:SND_SOC_DAIFMT_I2S(standard i2s format).            use
;			   2:SND_SOC_DAIFMT_RIGHT_J(right justfied format).
;			   3:SND_SOC_DAIFMT_LEFT_J(left justfied format)
;			   4:SND_SOC_DAIFMT_DSP_A(pcm. MSB is available on 2nd BCLK rising edge after LRC rising edge). use
;			   5:SND_SOC_DAIFMT_DSP_B(pcm. MSB is available on 1nd BCLK rising edge after LRC rising edge)
;signal_inversion:1:SND_SOC_DAIFMT_NB_NF(normal bit clock + frame)  use
;				  2:SND_SOC_DAIFMT_NB_IF(normal BCLK + inv FRM)
;				  3:SND_SOC_DAIFMT_IB_NF(invert BCLK + nor FRM)  use
;				  4:SND_SOC_DAIFMT_IB_IF(invert BCLK + FRM)
;over_sample_rate: support 128fs/192fs/256fs/384fs/512fs/768fs
;sample_resolution	:16bits/20bits/24bits
;word_select_size 	:16bits/20bits/24bits/32bits
;pcm_sync_period 	:16/32/64/128/256
;msb_lsb_first 		:0: msb first; 1: lsb first
;sign_extend 		:0: zero pending; 1: sign extend
;slot_index 		:slot index: 0: the 1st slot - 3: the 4th slot
;slot_width 		:8 bit width / 16 bit width
;frame_width 		:0: long frame = 2 clock width;  1: short frame
;tx_data_mode 		:0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;rx_data_mode 		:0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;--------------------------------------------------------------------------------
[tdm0]
daudio_used         = 0
daudio_master       = 4
daudio_select       = 1
audio_format        = 1
signal_inversion    = 1
mclk_fs             = 512
sample_resolution   = 16
slot_width_select   = 16
pcm_lrck_period     = 32
pcm_lrckr_period    = 1
msb_lsb_first 	    = 0
sign_extend         = 0
slot_index          = 0
slot_width          = 16
frame_width         = 1
tx_data_mode        = 0
rx_data_mode        = 0
;i2s_mclk           = port:PB08<2><1><default><default>
i2s_bclk            = port:PG11<2><1><default><default>
i2s_lrclk           = port:PG10<2><1><default><default>
i2s_dout0           = port:PG12<2><1><default><default>
i2s_dout1           =
i2s_dout2           =
i2s_dout3           =
i2s_din             = port:PG13<2><1><default><default>

;--------------------------------------------------------------------------------------
;pa_single_vol,pa_double_vol: 31 level,1.5db/step.0x1f is the large volume.
;cap_val:use for system record,0x0--0db,0x1--24db,0x2--27db,0x3--30db,0x4--33db,0x5--36db,0x6--39db,0x7--42db
;headphone_vol,earpiece_vol: must least than 0x3b. 0x1 is a step.
;headset_mic_vol: headset mic(mic2) vol,use for phone headset mic call
;main_mic_vol: main mic(mic1) vol,use for phone main mic call
;version_v3_used : 1:v3,0:v3s
[audio0]
;audio_used           = 1
headphone_vol			= 0x3b

cap_vol					= 0x5
Differential_output    = 1
pa_single_vol			= 0x3d
pa_double_used			= 0
pa_double_vol			= 0x1f
headphone_direct_used	= 0
phone_mic_vol = 0x6
version_v3_used = 0
headphone_mute_used = 0
audio_hp_ldo       = 0
;v3s
audio_pa_ctrl         = port:PB05<1><default><default><0>

adcagc_used       = 0
adcdrc_used       = 0
dacdrc_used       = 0
adchpf_used       = 0
dachpf_used       = 0

;----------------------------------------------------------------------------------
;ir --- infra remote configuration
;----------------------------------------------------------------------------------
[s_ir0]
ir_used             = 0
ir_rx               = port:PL04<2><1><default><default>


;-------------------------------------------------------------------------------------
;pmu_used                    ---0:not used,1:used
;pmu_id                      ---0:axp19x,1:axp209,2:axp22x,3:axp806,4:axp808,5:axp809,6:axp803,7:axp813
;pmu_twi_addr                ---slave address
;pmu_twi_id                  ---i2c bus number (0 TWI0, 1 TWI2, 2 TWI3)
;pmu_irq_id		     ---irq number (0 irq0,1 irq1,…\E2\80?
;pmu_battery_rdc             ---battery initial resistance
;pmu_battery_cap             ---battery capability,mAh
;pmu_batdeten		     ---battery detect en;0:disable 1:enable
;pmu_runtime_chgcur          ---set initial charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_earlysuspend_chgcur     ---set earlysuspend charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_suspend_chgcur          ---set suspend charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_shutdown_chgcur         ---set shutdown charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_init_chgvol             ---set initial charing target voltage,mV,4100/4220/4200/4240
;pmu_init_chgend_rate        ---set initial charing end current  rate,10/15
;pmu_init_chg_enabled        ---set initial charing enabled,0:disable,1:enable
;pmu_init_adc_freq           ---set initial adc frequency,Hz,100/200/400/800
;pmu_init_adcts_freq         ---set initial adc TS,Hz,100/200/400/800
;pmu_init_chg_pretime        ---set initial pre-charging time,min,40/50/60/70
;pmu_init_chg_csttime        ---set initial constance-charging time,min,360/480/600/720
;pmu_batt_cap_correct	     ---correct the battery capacity or not when one charge cycle 0:not correct 1:correct
;pmu_bat_regu_en			 ---bat regulator is enable or not when charge done 0:disable 1:enable
;pmu_bat_para1 		     			 ---battery indication at 3.13V
;pmu_bat_para2               ---battery indication at 3.27V
;pmu_bat_para3               ---battery indication at 3.34V
;pmu_bat_para4               ---battery indication at 3.41V
;pmu_bat_para5               ---battery indication at 3.48V
;pmu_bat_para6               ---battery indication at 3.52V
;pmu_bat_para7               ---battery indication at 3.55V
;pmu_bat_para8               ---battery indication at 3.57V
;pmu_bat_para9               ---battery indication at 3.59V
;pmu_bat_para10              ---battery indication at 3.61V
;pmu_bat_para11              ---battery indication at 3.63V
;pmu_bat_para12              ---battery indication at 3.64V
;pmu_bat_para13              ---battery indication at 3.66V
;pmu_bat_para14              ---battery indication at 3.7V
;pmu_bat_para15              ---battery indication at 3.73V
;pmu_bat_para16              ---battery indication at 3.77V
;pmu_bat_para17              ---battery indication at 3.78V
;pmu_bat_para18              ---battery indication at 3.8V
;pmu_bat_para19              ---battery indication at 3.82V
;pmu_bat_para20              ---battery indication at 3.84V
;pmu_bat_para21              ---battery indication at 3.85V
;pmu_bat_para22              ---battery indication at 3.87V
;pmu_bat_para23              ---battery indication at 3.91V
;pmu_bat_para24              ---battery indication at 3.94V
;pmu_bat_para25              ---battery indication at 3.98V
;pmu_bat_para26              ---battery indication at 4.01V
;pmu_bat_para27              ---battery indication at 4.05V
;pmu_bat_para28              ---battery indication at 4.08V
;pmu_bat_para29              ---battery indication at 4.1V
;pmu_bat_para30              ---battery indication at 4.12V
;pmu_bat_para31              ---battery indication at 4.14V
;pmu_bat_para32              ---battery indication at 4.15V
;pmu_usbvol_limit            ---set usb-ac limited voltage enable,1:enable\EF\BC?:disable
;pmu_usbcur_limit            ---set usb-ac limited current enable,1:enable\EF\BC?:disable
;pmu_usbvol                  ---set usb-ac limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_usbcur                  ---set usb-ac limited current level,mA,500/900, 0 - not limite
;pmu_usbvol_pc	             ---set usb-pc limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_usbcur_pc               ---set usb-pc limited current level,mA,500/900, 0 - not limite
;pmu_pwroff_vol              ---set protect voltage when system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_pwron_vol               ---set protect voltage after system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_pekoff_time             ---set pek off time,ms, 4000/6000/8000/10000
;pmu_pekoff_func             ---set pek off func, 0:shutdown,1:restart
;pmu_pekoff_en		     ---set pek offlevel powerdown or not, 0:not powerdown,1:powerdown
;pmu_peklong_time            ---set pek pek long irq time,ms,1000/1500/2000/2500
;pmu_pekon_time              ---set pek on time,ms,128/1000/2000/3000
;pmu_pwrok_time              ---set pmu pwrok delay time,ms,8/16/32/64
;pmu_battery_warning_level1  ---low power warning high level,5%-20%,1%/step
;pmu_battery_warning_level2  ---low power warning low level,0%-15%,1%/step
;pmu_restvol_time            ---battery indicaton reflash time,30/60/120/
;pmu_ocv_cou_adjust_time     ---ocv battery indication reflash time,60/120/30
;pmu_chgled_func             ---CHGKED pin control\EF\BC?:controlled by pmu,1:controlled by Charger
;pmu_chgled_type             ---CHGLED Type select when pmu_chgled_func=0,0:Type A\EF\BC?:Type B
;pmu_vbusen_func	     ---N_VBUSEN function select,0:as an output,1:as an input
;pmu_reset                   ---when power key press longer than 16's,PMU reset or not.0:not reset 1:reset
;pmu_IRQ_wakeup		     ---press IRQ wakeup or not when sleep or power down.0:not wakeup 1:wakeup
;pmu_hot_shutdowm            ---when PMU over temperature protect or not;0:disable 1:enable
;pmu_inshort		     ---ACIN and VBUS inshort or not by software;0:auto detect 1:inshort
;pmu_temp_enable             ---temp detect enable
;pmu_charge_ltf              ---charge temp low threshold voltage
;pmu_charge_htf              ---charge temp high threshold voltage
;pmu_discharge_ltf           ---shutdown temp low threshold voltage
;pmu_discharge_htf           ---shutdown temp high threshold voltage
;pmu_temp_para1              --- temp -25 voltage
;pmu_temp_para2              --- temp -15 voltage
;pmu_temp_para3              --- temp -10 voltage
;pmu_temp_para4              --- temp -5  voltage
;pmu_temp_para5              --- temp  0  voltage
;pmu_temp_para6              --- temp  5  voltage
;pmu_temp_para7              --- temp  10 voltage
;pmu_temp_para8              --- temp  20 voltage
;pmu_temp_para9              --- temp  30 voltage
;pmu_temp_para10             --- temp  40 voltage
;pmu_temp_para11             --- temp  45 voltage
;pmu_temp_para12             --- temp  50 voltage
;pmu_temp_para13             --- temp  55 voltage
;pmu_temp_para14             --- temp  60 voltage
;pmu_temp_para15             --- temp  70 voltage
;pmu_temp_para16             --- temp  80 voltage
;--------------------------------------------------------------------------------------------------------
[pmu1_para]
pmu_used                   = 1
pmu_id                     = 1
pmu_twi_addr               = 0x34
pmu_twi_id                 = 0
pmu_irq_id                 = 0
pmu_irq_gpio			   = port:PG05<6><default><default><default>
pmu_battery_rdc            = 249
pmu_battery_cap            = 183
pmu_batdeten               = 1
pmu_runtime_chgcur         = 150
pmu_earlysuspend_chgcur    = 150
pmu_suspend_chgcur         = 150
pmu_shutdown_chgcur        = 150
pmu_init_chgvol            = 4200
pmu_init_chgend_rate       = 15
pmu_init_chg_enabled       = 1
pmu_init_adc_freq          = 100
pmu_init_chg_pretime       = 50
pmu_init_chg_csttime       = 720
pmu_battery_warning1        = 3650
pmu_battery_warning2       = 3600


pmu_bat_para1=0
pmu_bat_para2=0
pmu_bat_para3=0
pmu_bat_para4=0
pmu_bat_para5=8
pmu_bat_para6=16
pmu_bat_para7=25
pmu_bat_para8=37
pmu_bat_para9=47
pmu_bat_para10=55
pmu_bat_para11=61
pmu_bat_para12=68
pmu_bat_para13=79
pmu_bat_para14=87
pmu_bat_para15=94
pmu_bat_para16=100

pmu_usbvol_limit           = 1
pmu_usbcur_limit           = 0
pmu_usbvol                 = 4000
pmu_usbcur                 = 0
pmu_usbvol_pc            = 4000
pmu_usbcur_pc            = 0
pmu_pwroff_vol             = 3300
pmu_pwron_vol            = 2900
pmu_pekoff_time            = 6000
pmu_pekoff_en              = 1
pmu_peklong_time           = 1500
pmu_pekon_time             = 1000
pmu_pwrok_time             = 64
pmu_pwrnoe_time          = 2000
pmu_hot_shutdown            = 1
pmu_suspendpwroff_vol    = 3500
power_start              = 1

[pmu1_regu]
regulator_count = 7
regulator1      = "axp20_dcdc2 none vdd-sys vdd-cpu vdd-ephy"
regulator2      = "axp20_dcdc3 none vcc-io hpvcc vcc-pd vcc-usb vcc-ephy vcc-mcsi vcc-lcd vcc-wifi vcc-device vcc-csi vcc-ctp"
regulator3      = "axp20_ldo1 none vcc-rtc"
regulator4      = "axp20_ldo2 none  vcc-avcc vcc-pll"
regulator5      = "axp20_ldo3 none vcc-pe csi-avdd"
regulator6      = "axp20_ldo4 none csi-dvdd"
regulator7      = "axp20_ldoio0 none"

;----------------------------------------------------------------------------------
; dvfs voltage-frequency table configuration
;
; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk
;                     1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator
; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz
; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz
;
; LV_count: count of LV_freq/LV_volt, must be < 16
;
; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz,  1536Mhz]
; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz,  1296Mhz]
; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz,  1200Mhz]
; LV4: core vdd is 1.20v if cpu frequency is (816Mhz,   1008Mhz]
; LV5: core vdd is 1.10v if cpu frequency is (648Mhz,    816Mhz]
; LV6: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
; LV7: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
; LV8: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
;
;----------------------------------------------------------------------------------
[dvfs_table]
extremity_freq = 1008000000
max_freq = 1008000000
min_freq = 60000000

LV_count = 8

LV1_freq = 1008000000
LV1_volt = 1200

LV2_freq = 1008000000
LV2_volt = 1200

LV3_freq = 940000000
LV3_volt = 1200

LV4_freq = 940000000
LV4_volt = 1200

LV5_freq = 816000000
LV5_volt = 1100

LV6_freq = 648000000
LV6_volt = 1040

LV7_freq = 0
LV7_volt = 1040

LV8_freq = 0
LV8_volt = 1040

;----------------------------------------------------------------------------------
;virtual device
;virtual device for pinctrl testing
;device have pin PA1 PA2
;----------------------------------------------------------------------------------
[Vdevice]
Vdevice_used        = 1
Vdevice_0           = port:PA01<5><1><2><default>
Vdevice_1           = port:PA02<5><1><2><default>

;----------------------------------------------------------------------------------
; dram dvfs voltage-frequency table configuration
;
; LV_count: count of LV_freq/LV_volt
;
; LV1: core vdd is 1.1v if dram frequency is (360Mhz, 552Mhz]
; LV2: core vdd is 1.0v if dram frequency is (  0Mhz, 360Mhz]
; LV3: core vdd is 1.0v if dram frequency is (  0Mhz, 360Mhz]
;
;----------------------------------------------------------------------------------
[dram_dvfs_table]
LV_count = 3

LV1_freq = 552000000
LV1_volt = 1100

LV2_freq = 360000000
LV2_volt = 1000

LV3_freq = 0
LV3_volt = 1000


[fel_key]
fel_key_used =  1
fel_key_min  =  0
fel_key_max  = 	60

[leds_para]
leds_used = 1
led_0 = port:PG00<1><default><default><0>
led_0_active_low = 0
led_1 = port:PG01<1><default><default><0>
led_1_active_low = 0
led_2 = port:PG02<1><default><default><0>
led_2_active_low = 0
;led_3 = port:PA00<1><default><default><0>
;led_3_active_low = 0
;led_4 = port:PA00<1><default><default><0>
;led_4_active_low = 0
;led_5 = port:PA00<1><default><default><0>
;led_5_active_low = 0
;led_6 = port:PA00<1><default><default><0>
;led_6_active_low = 0
;led_7 = port:PA00<1><default><default><0>
;led_7_active_low = 0

QQ20180722232422.jpeg

背光配置改为了 PB9, LCD改为 4.3寸到 480x272, 跑起来了.

固件下载: v3s_linux_3_4_with_rootfs_mx25l128.7z

离线

#83 2018-08-01 16:24:09

yangbo
会员
注册时间: 2018-06-22
累计积分: 11

Re: licheepi zero BSP 内核(linux3.4) 编译教程

BSP内核也没有声音驱动,我以为只是主线没有声音,好郁闷 而且mplayer播放速度很慢,我建议给出的SDK都把这些问题解决了,收到板都快两个月了,板子还是无法工作,有没有搞好最新的sdk下载?

离线

#84 2018-08-01 16:59:07

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

主线和camdroid, 我都试过, 有声音的, 你要用 tinymix/amixer 设置一下混音器寄存器.

参考链接: https://whycan.cn/t_489.html

离线

#85 2018-08-01 17:20:10

yangbo
会员
注册时间: 2018-06-22
累计积分: 11

Re: licheepi zero BSP 内核(linux3.4) 编译教程

tinymix/amixer 设置一下混音器寄存器 这一步好像没有做,播放速度慢要怎么设置?

离线

#86 2018-08-01 18:52:05

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

yangbo 说:

tinymix/amixer 设置一下混音器寄存器 这一步好像没有做,播放速度慢要怎么设置?

https://whycan.cn/t_489.html
照7楼做

播放速度是指什么?

离线

#87 2018-08-01 19:31:01

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

楼上是主线linux步骤,

bsp linux3.4 按这个步骤(一楼最末):
https://whycan.cn/t_855.html

离线

#88 2018-10-19 09:43:28

chc6688
会员
注册时间: 2018-10-12
累计积分: 8

Re: licheepi zero BSP 内核(linux3.4) 编译教程

谢谢分享,刚好买了个板子

离线

#89 2019-03-24 17:20:51

artificer
会员
注册时间: 2019-03-24
累计积分: 1

Re: licheepi zero BSP 内核(linux3.4) 编译教程

CC      lib/smbios.o
  CC      lib/display_options.o
  LD      lib/built-in.o
  LD      u-boot
*** Your dtc is too old, please upgrade to dtc 1.4 or newer
make: *** [checkdtc] Error 1



编译uboot报错,重装dtc,升级dtc等都试了,还是同样错误。
虚拟机版本ubuntu 12.04  64bit

离线

#90 2019-03-24 18:12:01

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

那你的 dtc 版本是多少呢?

估计是 1.4 以下,
可能要手动编译安装新版 dtc

离线

#91 2019-04-06 22:51:37

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

QQ群 544762792附件下载 【全志资料下载/(主线u-boot,官方linux3.4, 自带Qt,跑analogclock)V3s_uboot_bsp_linux_qt_ethernet_tf(whycan.cn).7z】

准备一张 >= 512M 的TF卡,
解压上面的文件,
用dd 命令直接写到卡上:

sudo dd if=V3s_uboot_bsp_linux_qt_ethernet_tf.dump of=/dev/sdX

帐号是root, 没密码.

里面有一个Qt模拟时钟:

analogclock -platform linuxfb


为什么我执行,上面的  sudo dd if=V3s_uboot_bsp_linux_qt_ethernet_tf.dump of=/dev/sdb  就卡在这不动了。
但是用gparted看到了有分区。怎么回事。

离线

#92 2019-04-06 23:03:49

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

有可能 卡 或者 读卡器 问题, dd 一个小文件到TF卡, 然后逐渐增大试一试.

离线

#93 2019-04-08 09:52:50

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

QQ群 544762792附件下载 【全志资料下载/(主线u-boot,官方linux3.4, 自带Qt,跑analogclock)V3s_uboot_bsp_linux_qt_ethernet_tf(whycan.cn).7z】

准备一张 >= 512M 的TF卡,
解压上面的文件,
用dd 命令直接写到卡上:

sudo dd if=V3s_uboot_bsp_linux_qt_ethernet_tf.dump of=/dev/sdX

帐号是root, 没密码.

里面有一个Qt模拟时钟:

analogclock -platform linuxfb


晕哥,指导下,如何把所有的固件都封装到一个dump中去。

离线

#94 2019-04-08 09:56:33

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

先做一张能启动到 shell 的 TF卡, 然后再通过 dd 命令把 TF卡读出到 dump 文件, 这样操作简单。


用脚本也可以实现, 我看上次荔枝派 Q 群也有朋友这么做。

离线

#95 2019-04-08 10:19:36

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

QQ群 544762792附件下载 【全志资料下载/(主线u-boot,官方linux3.4, 自带Qt,跑analogclock)V3s_uboot_bsp_linux_qt_ethernet_tf(whycan.cn).7z】

准备一张 >= 512M 的TF卡,
解压上面的文件,
用dd 命令直接写到卡上:

sudo dd if=V3s_uboot_bsp_linux_qt_ethernet_tf.dump of=/dev/sdX

帐号是root, 没密码.

里面有一个Qt模拟时钟:

analogclock -platform linuxfb


晕哥,烧写上面提供的固件包,没有发现关于ov5647的相关信息。是否这个固件不支持ov5647摄像头
U-Boot 2017.01-rc2-00073-gdd6e874 (Jul 11 2018 - 16:05:42 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
SF: unrecognized JEDEC id bytes: 00, 00, 00
*** Warning - spi_flash_probe() failed, using default environment

Setting up a 800x480 lcd console (overscan 0x0)
dotclock: 33000kHz = 33000kHz: (1 * 3MHz * 66) / 6
In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
290 bytes read in 14 ms (19.5 KiB/s)
## Executing script at 41900000
reading uImage
2451080 bytes read in 133 ms (17.6 MiB/s)
reading script.bin
35240 bytes read in 24 ms (1.4 MiB/s)
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2451016 Bytes = 2.3 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (qh@ubuntu) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #4 Thu Jan 11 13:00:40 CST 2018
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 30376k/30376k available, 35160k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc047e000   (4568 kB)
[    0.000000]       .init : 0xc047e000 - 0xc04a1000   ( 140 kB)
[    0.000000]       .data : 0xc04a2000 - 0xc04e5f80   ( 272 kB)
[    0.000000]        .bss : 0xc04e5fa4 - 0xc0580b8c   ( 619 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000154] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000177] pid_max: default: 32768 minimum: 301
[    0.000314] Mount-cache hash table entries: 512
[    0.000865] CPU: Testing write buffer coherency: ok
[    0.001124] Setting up static identity map for 0x40359b08 - 0x40359b60
[    0.001794] devtmpfs: initialized
[    0.003455] pinctrl core: initialized pinctrl subsystem
[    0.003956] NET: Registered protocol family 16
[    0.004274] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004332] script_sysfs_init success
[    0.005092] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006030] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006418] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007201] persistent_ram: found existing buffer, size 18814, start 18814
[    0.091132] console [ram-1] enabled
[    0.091952] Not Found clk pll_isp in script
[    0.092067] Not Found clk pll_video in script
[    0.092258] Not Found clk pll_ve in script
[    0.092361] Not Found clk pll_periph0 in script
[    0.092552] Not Found clk pll_de in script
[    0.096525] bio: create slab <bio-0> at 0
[    0.096898] pwm module init!
[    0.099240] SCSI subsystem initialized
[    0.099589] usbcore: registered new interface driver usbfs
[    0.099760] usbcore: registered new interface driver hub
[    0.100117] usbcore: registered new device driver usb
[    0.100368] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.100565] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.101385] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.101595] axp20_board 0-0034: failed reading at 0x03
[    0.101730] axp20_board: probe of 0-0034 failed with error -70
[    0.101962] Linux video capture interface: v2.00
[    0.102153] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.102685] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.103461] Switching to clocksource arch_sys_counter
[    0.109971] NET: Registered protocol family 2
[    0.109971] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110369] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.110610] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.110736] TCP: Hash tables configured (established 2048 bind 2048)
[    0.110929] TCP: reno registered
[    0.111034] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.111150] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.111590] NET: Registered protocol family 1
[    0.112021] standby_mode = 1.
[    0.112214] wakeup src cnt is : 3.
[    0.112338] pmu1_enable = 0x1.
[    0.112443] pmux_id = 0x1.
[    0.112557] config_pmux_para: script_parser_fetch err.
[    0.112663] pmu2_enable = 0x0.
[    0.112772] add_sys_pwr_dm: get ldo name failed
[    0.112963] add_sys_pwr_dm: get ldo name failed
[    0.113069] add_sys_pwr_dm: get ldo name failed
[    0.113173] add_sys_pwr_dm: get ldo name failed
[    0.113362] add_sys_pwr_dm: get ldo name failed
[    0.113466] add_sys_pwr_dm: get ldo name failed
[    0.113655] add_sys_pwr_dm: get ldo name failed
[    0.113759] add_sys_pwr_dm: get ldo name failed
[    0.113862] add_sys_pwr_dm: get ldo name failed
[    0.114052] add_sys_pwr_dm: get ldo name failed
[    0.114156] after inited: sys_mask config = 0x0.
[    0.114345] dynamic_standby enalbe = 0x0.
[    0.114496] sunxi_reg_init enter
[    0.116550] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.116798] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.117094] msgmni has been set to 59
[    0.118236] io scheduler noop registered
[    0.118355] io scheduler deadline registered
[    0.118529] io scheduler cfq registered (default)
[    0.119122] [DISP]disp_module_init
[    0.119630] cmdline,disp=
[    0.120344] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.120640] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.123242] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.125876] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator
[    0.126975] [DISP]disp_module_init finish
[    0.127365] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.127934] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.128052] sw_uart_pm()890 - uart0 clk is already enable
[    0.128253] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.241885] console [ttyS0] enabled
[    0.761899] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.769697] spi spi0: master is unqueued, this is deprecated
[    0.776357] m25p_probe()982 - Use the Dual Mode Read.
[    0.782209] m25p80 spi0.0: found m25p05-nonjedec, expected w25q128
[    0.789255] m25p80 spi0.0: m25p05-nonjedec (64 Kbytes)
[    0.796580] partitions_register()865 - m25p80_read() ret 0, PartCnt: 0
[    0.804048] m25p80: probe of spi0.0 failed with error -22
[    0.811789] Failed to alloc md5
[    0.815510] eth0: Use random mac address
[    0.820069] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.847671] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.856724] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.865535] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.890036] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.897414] hub 1-0:1.0: USB hub found
[    0.901734] hub 1-0:1.0: 1 port detected
[    0.906683] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.912356] usb usb1: USB disconnect, device number 1
[    0.919383] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.935826] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.962988] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.971630] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.980270] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    1.044766] hub 1-0:1.0: USB hub found
[    1.049067] hub 1-0:1.0: 1 port detected
[    1.053936] sunxi-ohci sunxi-ohci.1: remove, state 1
[    1.059641] usb usb1: USB disconnect, device number 1
[    1.065959] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.082473] Initializing USB Mass Storage driver...
[    1.088064] usbcore: registered new interface driver usb-storage
[    1.094932] USB Mass Storage support registered.
[    1.100483] file system registered
[    1.105845] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.113740] android_usb gadget: Number of LUNs=1
[    1.118959]  lun0: LUN: removable file: (no medium)
[    1.125029] android_usb gadget: android_usb ready
[    1.130593] sunxikbd_script_init: key para not found, used default para.
[    1.139284] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.147795] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.156759] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.165701] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.174338] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.183059] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.191753] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.200379] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.209351] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.216707] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.228105] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.235775] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.242153] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.254095] no led_3, ignore it!
[    1.257890] no led_4, ignore it!
[    1.261601] no led_5, ignore it!
[    1.265300] no led_6, ignore it!
[    1.268973] no led_7, ignore it!
[    1.274811] usbcore: registered new interface driver usbhid
[    1.281206] usbhid: USB HID core driver
[    1.286313] ashmem: initialized
[    1.290088] logger: created 256K log 'log_main'
[    1.295534] logger: created 32K log 'log_events'
[    1.301053] logger: created 32K log 'log_radio'
[    1.306287] logger: created 32K log 'log_system'
[    1.313158] script_get_item return type err, consider it no ldo
[    1.324103] *******************Try sdio*******************
[    1.330664] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.338616] TCP: cubic registered
[    1.342516] NET: Registered protocol family 17
[    1.347655] *******************Try sd *******************
[    1.353919] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.362733] ThumbEE CPU extension supported.
[    1.367605] Registering SWP/SWPB emulation handler
[    1.377692] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.386776] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.395448] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.404098] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.412657] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.421308] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.430144] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.438920] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 00:01:05 UTC (65)
[    1.449281] ALSA device list:
[    1.452760]   #0: audiocodec
[    1.456471] Waiting for root device /dev/mmcblk0p2...
[    1.469385] mmc0: new high speed SDHC card at address aaaa
[    1.476072] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[    1.485689]  mmcblk0: p1 p2
[    1.489666] mmcblk mmc0:aaaa: Card claimed for testing.
[    1.495716] mmc0:aaaa: SC16G 14.8 GiB
[    1.500129] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.508967] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.517717] *******************sd init ok*******************
[    1.524252] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.532871] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.541510] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.550146] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.558671] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.572931] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.584719] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.603803] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.612994] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.622825] devtmpfs: mounted
[    1.626414] Freeing init memory: 140K
[    1.734995] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
buildroot login: root
# ls
# dmesg| grep ov5647
#

离线

#96 2019-04-08 10:25:12

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

这个帖子的固件应该没有 ov5647

这个阔以:  https://whycan.cn/t_1780.html

离线

#97 2019-04-08 11:05:51

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

qianhao 说:

参考链接1: 荔枝派Zero V3s开发板入坑记录
参考链接2: 芒果派全志V3s开发板入坑记录. (第一次收到坑友寄来评测的开发板)

uboot 才用主线的uboot 所以抄袭一段文字说明:

1. 准备工作

1) 安装Ubuntu14.04LTS(长支持版本),如果用虚拟机请安装vmware14(别的虚拟机都不推荐,泪的教训),  然后安装 vmware tools(不是必须,但是方便文件共享)
    2) 安装arm linux 硬件浮点数工具链, 因为V3s支持VFPv4 浮点单元: sudo apt-get install gcc-arm-linux-gnueabihf
    3) 安装git源码管理软件:  sudo apt-get install git
    4) 其他支撑软件 sudo apt-get install device-tree-compiler (.......................)

2. u-boot

首先获取u-boot源码:             git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-current
      如果你需要支持spi flash:   git clone https://github.com/Lichee-Pi/u-boot.git -b v3s-spi-experimental
cd u-boot
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_800x480LCD_defconfig (群主网店5寸屏)
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_480x272LCD_defconfig (通用4.3寸屏)
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make LicheePi_Zero_defconfig (默认)
ARCH=arm make menuconfig
执行编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make
多核编译,避免cpu其他内核打酱油, J后的参数是参与编译的cpu个数:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -J3

3.编译 sunxi-tools

sudo apt-get install libusb-1.0-0-dev
cd tool/sunxi-tools
make

4.生成boot.scr文件

新建一个文件 boot.cmd   
写入 :
setenv bootargs console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
setenv bootm_boot_mode sec
setenv machid 1029
load mmc 0:1 0x41000000 uImage
load mmc 0:1 0x41d00000 script.bin
bootm 0x41000000
保存
mkimage -C none -A arm -T script -d boot.cmd boot.scr

5.生成 script.bin文件

使用我提供的sys_config.fex
../sunxi-tools/fex2bin sys_config.fex > ../pub/boot/script.bin

6.编译内核

使用我提供的 lichee_BSP_config 说明一下  这里修改了内核支持网口 支持ext4文件系统 就直接给出我配置好的。
cd linux-3.4

cp lichee_BSP_config .config

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage -j16

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16 INSTALL_MOD_PATH=out modules

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j16 INSTALL_MOD_PATH=out modules_install

这时  我们要用的  uImage 在 arch/arm/boot/uImage

7.文件系统:

1). 下载最新的buildroot稳定版本
        官方网站:   https://buildroot.org/download.html
        长支持版本:buildroot-2017.02.7.tar.gz
        最新稳定版:buildroot-2017.08.1.tar.gz
    2). 配置buildroot 参数, make menuconfig; make

同 主线文件系统 的生成办法

8.打包

烧录TF卡启动盘:
    1) 删除TF卡所有分区
    2) 将uboot写入到sd卡8k偏移处(必须8K偏移, brom龟腚的)。
        sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
    3) 建立第一个分区,前面空出8MB   大小32M(可以随意填写), 格式FAT16, 把uImage,boot.src,script.bin,拷贝到 这个分区
    4) 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
        tar xvf output/images/rootfs.tar -C /挂载的tf卡第二个分区目录
以上资料我使用度盘分享(提供内核的源码和编译好的内核)
链接: https://pan.baidu.com/s/1ghlIl5D  密码:95mp

站长注:
如果上面链接失效,可以在QQ群 544762792附件下载 【全志资料下载/QianHao_V3s_BSP内核_20180111.7z



以下站长注:
上面的文件 QianHao_V3s_BSP内核_20180111.7z 有点问题, 缺 u-boot, boot.src 不正确.
这个软件包确实是正常的: V3s主线u-boot引导官方linux,带Qt文件系统,网卡已测试.7z

编译工具链: arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

添加到环境变量 ~/.bashrc

export PATH=/usr/local/arm-2014.05/bin/:$PATH



晕哥,根据上面的指示,我编译的内核, u-boot等。烧写、拷贝到SD卡中,出现这个,无法启动,是缺少什么文件么?
resetting ...

U-Boot SPL 2017.01-rc2-00057-g32ab180-dirty (Apr 06 2019 - 19:38:50)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00057-g32ab180-dirty (Apr 06 2019 - 19:38:50 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00057-g32ab180-dirty (Apr 06 2019 - 19:38:50 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0
reading zImage
** Unable to read file zImage **
reading sun8i-v3s-licheepi-zero-dock.dtb
** Unable to read file sun8i-v3s-licheepi-zero-dock.dtb **
=>

离线

#98 2019-04-08 11:17:54

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

uboot 加载 bsp linux Image 的套路有点不同,

你是不是改过 sun8i.h 的 default cmd line ?

如果改了, 撤销才行, 因为加载的文件已经不同了,

仔细看下 4#,  5#

离线

#99 2019-04-08 13:38:26

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

各位看官,我来使用下BBCODE发帖。

自己编译的内核,一直卡在:

Starting kernel ...


U-Boot SPL 2017.01-rc2-00057-g32ab180-dirty (Apr 06 2019 - 19:38:50)
DRAM: 64 MiB
Trying to boot from MMC1

U-Boot 2017.01-rc2-00057-g32ab180-dirty (Apr 06 2019 - 19:38:50 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000


U-Boot 2017.01-rc2-00057-g32ab180-dirty (Apr 06 2019 - 19:38:50 +0800) Allwinner Technology

CPU:   Allwinner V3s (SUN8I 1681)
Model: Lichee Pi Zero
DRAM:  64 MiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial@01c28000
Out:   serial@01c28000
Err:   serial@01c28000
Net:   No ethernet found.
starting USB...
No controllers found
Hit any key to stop autoboot:  0 
reading zImage
2453752 bytes read in 141 ms (16.6 MiB/s)
reading sun8i-v3s-licheepi-zero-dock.dtb
9262 bytes read in 25 ms (361.3 KiB/s)
## Flattened Device Tree blob at 41800000
   Booting using the fdt blob at 0x41800000
   Loading Device Tree to 42dfa000, end 42dff42d ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

有没有解决办法呢?非常感谢。

41#说 sys_config.fex没配置好 ,我也没有看明白,我的sys_config.fex哪里有问题.

;A23 PAD application
;---------------------------------------------------------------------------------------------------------
; port configuration:
; port_name = port:GPIO<mux><pull up/down><driver level><default value>
; mux: GPIO function configuration, 0-input, 1-output, 2+: special funciton for modules
; pull up/down: 1-pull up, 2-pull down
; driver level: 0,1,2,3. 2 is recommended
; default value: default output value when this IO is configured as an output IO
;---------------------------------------------------------------------------------------------------------

[product]
version = "100"
machine = "tiger-cdr"

[platform]
eraseflag   = 0

;----------------------------------------------------------------------------------
;[target]  system bootup configuration
;boot_clock	= CPU boot frequency, Unit: MHz
;storage_type	= boot medium, 0-nand, 1-card0, 2-card2, -1(defualt)auto scan
;speed_mod    0 : normal read ; 1 dual line fast read
;----------------------------------------------------------------------------------
[target]
boot_clock   	= 1008
storage_type  	= -1

[boot_spi_board0]
boot_spi_speed_hz = 60000000
speed_mod         = 1 

;----------------------------------------------------------------------------------
;dcdc1_vol	---set dcdc1 voltage,mV,1600-3400,100mV/step
;dcdc2_vol	---set dcdc2 voltage,mV,600-1540,20mV/step
;dcdc3_vol	---set dcdc3 voltage,mV,600-1860,20mV/step
;dcdc4_vol	---set dcdc4 voltage,mV,600-1540,20mV/step
;dcdc5_vol	---set dcdc5 voltage,mV,1000-2550,50mV/step
;aldo2_vol	---set aldo2 voltage,mV,700-3300,100mV/step
;aldo3_vol	---set aldo3 voltage,mV,700-3300,100mV/step
;----------------------------------------------------------------------------------
[power_sply]
dcdc2_vol       = 1200
dcdc3_vol       = 3300
aldo2_vol       = 2500
aldo3_vol       = 3000
ldo1_vol        = 3300
ldo2_vol        = 3000
;ldo3_vol        = 2800
;ldo4_vol        = 1800


;----------------------------------------------------------------------------------
;card boot
;----------------------------------------------------------------------------------
[card_boot]
logical_start   = 40960
spinor_verify   = 1
sprite_gpio0    =

;----------------------------------------------------------------------------------
;[cardx_boot_para] boot card configuration
;card_ctrl 	 = boot card NO. 0 or 2
;card_high_speed = speed mode, 0-normal mode(up to 25MHz), 1-high speed mode(up to 50MHz)
;card_line       = boot card buswidth(1 or 4)
;----------------------------------------------------------------------------------
[card0_boot_para]
card_ctrl       = 0
card_high_speed = 1
card_line       = 4
sdc_d1          = port:PF0<2><1><default><default>
sdc_d0          = port:PF1<2><1><default><default>
sdc_clk         = port:PF2<2><1><default><default>
sdc_cmd         = port:PF3<2><1><default><default>
sdc_d3          = port:PF4<2><1><default><default>
sdc_d2          = port:PF5<2><1><default><default>

;[card2_boot_para]
;card_ctrl       = 2
;card_high_speed = 1
;card_line       = 4
;sdc_cmd         = port:PC00<2><1><2><default>
;sdc_clk         = port:PC01<2><1><2><default>
;sdc_d0          = port:PC03<2><1><2><default>
;sdc_d1          = port:PC04<2><1><2><default>
;sdc_d2          = port:PC05<2><1><2><default>
;sdc_d3          = port:PC06<2><1><2><default>

;----------------------------------------------------------------------------------
;[twi_para] twi for boot code
;twi_port	= twi controller ID
;----------------------------------------------------------------------------------
[twi_para]
twi_port        = 0
twi_scl         = port:PB06<2><default><default><default>
twi_sda         = port:PB07<2><default><default><default>

;----------------------------------------------------------------------------------
;[uart_para] boot debug port configuration
;uart_debug_port = uart port ID for boot debug
;----------------------------------------------------------------------------------
;origin
;[uart_para]
;uart_debug_port = 1
;uart_debug_tx   = port:PE21<4><1><default><default>
;uart_debug_rx   = port:PE22<4><1><default><default>

[uart_para]
uart_debug_port = 0
uart_debug_tx   = port:PB08<3><1><default><default>
uart_debug_rx   = port:PB09<3><1><default><default>

;uart_debug_port = 2
;uart_debug_tx   = port:PB00<2><1><default><default>
;uart_debug_rx   = port:PB01<2><1><default><default>


;card print
;uart_debug_tx    = port:PF02<3><1><default><default>
;uart_debug_rx    = port:PF04<3><1><default><default>


;----------------------------------------------------------------------------------
;[jtag_para] jtag configuration
;jtag_enable     = 0-disable jtag, 1-enable jtag
;----------------------------------------------------------------------------------
[jtag_para]
jtag_enable     = 0
jtag_ms         = port:PF00<3><default><default><default>
jtag_ck         = port:PF05<3><default><default><default>
jtag_do         = port:PF03<3><default><default><default>
jtag_di         = port:PF01<3><default><default><default>

;----------------------------------------------------------------------------------
;[clock] pll configuration
;----------------------------------------------------------------------------------
[clock]
pll3            = 297
pll4            = 300
pll6            = 600
pll8            = 360
pll9            = 480
pll10           = 297

;---------------------------------------------------------------------------------------------------------
;[pm_para] power management
;standby_mode = 0-normal standby, 1-super standby
;---------------------------------------------------------------------------------------------------------
[pm_para]
standby_mode		= 1

;----------------------------------------------------------------------------------
;sys_pwr_dm_para
;this para is used to change default sys_pwr_dm config when necessary.
;   allowed sys_pwr_dm is such as follow:
;		vdd-cpua
; 		vdd-cpub
; 		vdd-gpu
; 		vcc-dram
; 		vdd-sys
; 		which is compatible with pmu regu config. see: [pmu1_regu] for more info.
;   value: 0: del the pwr_dm from sys_pwr_dm_mask;
;	   1: add the pwr_dm into sys_pwr_dm_mask;
;----------------------------------------------------------------------------------
[sys_pwr_dm_para]
;vdd-cpua = 1
;vdd-sys  = 1

;----------------------------------------------------------------------------------
;dynamic_standby_para
;   enable:
;	value: 0: all config is ignored.
;	       1: all config is effective.
;   dram_selfresh_flag:
;	value: 0: dram will not enter selfresh,
;		    this config is used for stop dram entering selfresh, in case of dram memory have bug.
;	       1: dram will enter slefresh.
;
;----------------------------------------------------------------------------------
[dynamic_standby_para]
enable = 0
dram_selfresh_flag = 1
vdd_cpua_vol     = 1200
vdd_sys_vol      = 1200

;*****************************************************************************
;sdram configuration
;
;*****************************************************************************
[dram_para]
dram_clk        = 360
dram_type       = 2
dram_zq         = 0x39bb
dram_odt_en     = 0
dram_para1      = 0x10E20000
dram_para2      = 0x0000
dram_mr0        = 0x1840
dram_mr1        = 0x4
dram_mr2        = 0x18
dram_mr3        = 0x4
dram_tpr0       = 0x00832087
dram_tpr1       = 0x01C24085
dram_tpr2       = 0x0002A01D
dram_tpr3       = 0x0
dram_tpr4       = 0x0
dram_tpr5       = 0x0
dram_tpr6       = 0x0
dram_tpr7       = 0x0
dram_tpr8       = 0x0
dram_tpr9       = 0x0
dram_tpr10      = 0x0
dram_tpr11      = 0x220000
dram_tpr12      = 0x78
dram_tpr13      = 0x0d000000

;---------------------------------------------------------------------------------------------------------
; if 1 == standby_mode, then support super standby;
; else, support normal standby.
;---------------------------------------------------------------------------------------------------------
[pm_para]
standby_mode		= 0

;---------------------------------------------------------------------------------------------------------
; wakeup_src_para:
;	sometimes, u would like to add more wakeup src in standby mode, these para will be
;	help;
;	u need to make sure the standby mode support the wakeup src. Also, some hw
;	condition must be guaranteed.
;	including:
;	cpu_en: power on or off.
;		1: mean power on
;		0: mean power off
;	cpu_freq: indicating lowest freq. unit is Mhz;
;	dram selfresh_en: selfresh or not.
;		1: enable enter selfresh
;		0: disable enter selfresh
;	dram_pll: if not enter selfresh, indicating lowest freq. unit is Mhz;
;	wakeup_src: to make the scenario work, the wakeup src is needed.
;---------------------------------------------------------------------------------------------------------
[wakeup_src_para]
cpu_en		= 0
cpu_freq	= 48
; (cpu:apb:ahb)
pll_ratio	= 0x111
dram_selfresh_en= 1
dram_freq	= 36
wakeup_src_wl 	= port:PL07<4><default><default><0>
wakeup_src_bt 	= port:PL09<4><default><default><0>
bb_wake_ap	= port:PL02<4><default><default><0>

;----------------------------------------------------------------------------------
;i2c configuration
; twi_used = twix enable    ;; twi0->use pmu axp209 ,  twi1->use gsenor
;----------------------------------------------------------------------------------
[twi0]
twi_used        = 1
twi_scl         = port:PB06<2><default><default><default>
twi_sda         = port:PB07<2><default><default><default>

[twi1]
twi_used        = 0
twi_scl         = port:PB08<2><default><default><default>
twi_sda         = port:PB09<2><default><default><default>

;----------------------------------------------------------------------------------
;uart configuration
;uart_used = uart x enable
;uart_port = x; x is order number of ttySx
;uart_type       = 2:2 wire,4:4 wire,8:8 wire, full function
;----------------------------------------------------------------------------------
[uart0]
uart_used       = 1
uart_port       = 0
uart_type       = 2
uart_tx         = port:PB08<3><1><default><default>
uart_rx         = port:PB09<3><1><default><default>
;card print
;uart_tx         = port:PF02<3><1><default><default>
;uart_rx         = port:PF04<3><1><default><default>

[uart1]
uart_used       = 0
uart_port	    = 0
uart_type       = 2
uart_tx         = port:PE21<4><1><default><default>
uart_rx         = port:PE22<4><1><default><default>

[uart2]
uart_used       = 0
uart_port	    = 0
uart_type       = 2
uart_tx         = port:PB00<2><1><default><default>
uart_rx         = port:PB01<2><1><default><default>

;----------------------------------------------------------------------------------
;SPI controller configuration
;spi_used       = SPIx enable
;spi_cs_bitmap  = SPI bit mapping
;----------------------------------------------------------------------------------
[spi0]
spi_used       = 1
spi_cs_bitmap  = 1
spi_mosi       = port:PC03<3><default><default><default>
spi_miso       = port:PC00<3><default><default><default>
spi_sclk       = port:PC01<3><default><default><default>
spi_cs0        = port:PC02<3><1><default><default>

;----------------------------------------------------------------------------------
;SPI device configuration
;spi_dev_num: number of spi devices
;----------------------------------------------------------------------------------
[spi_devices]
spi_dev_num = 1

;----------------------------------------------------------------------------------
;[spi_board0] spi device configuration
;modalias      = spi device name
;max_speed_hz  = max transfer speed
;bus_num       = bus ID
;chip_select   = chip select, 0,1
;mode          = SPI transfer mode
; sflash_size- 16 : 16M nor flash size , 8 : 8M nor flash size
;----------------------------------------------------------------------------------
[spi_board0]
modalias      = "w25q128"
max_speed_hz  = 50000000
bus_num       = 0
chip_select   = 0
mode          = 0
sflash_size   = 16


;----------------------------------------------------------------------------------
;capacitor tp configuration
;ctp_twi_id : twi controller ID
;ctp_twi_addr : I2C slave address, 7bit
;ctp_screen_max_x/_y : resolution of touch panel
;ctp_revert_x/_y_flag : whether need to revert x/y
;ctp_exchange_x_y_flag: whether need to exchange the value of x and y
;ctp_int_port : port for tp's interrupt signal
;ctp_wakeup : port for wakeup tp
;----------------------------------------------------------------------------------
[ctp_para]
ctp_used            = 1
ctp_name            = "gt911_m785q6"
ctp_twi_id          = 0
ctp_twi_addr        = 0x48
ctp_screen_max_x    = 800
ctp_screen_max_y    = 480
ctp_revert_x_flag   = 0
ctp_revert_y_flag   = 0
ctp_exchange_x_y_flag = 1

ctp_int_port        = port:PG04<6><default><default><default>
ctp_wakeup          = port:PG03<1><default><default><1>

;--------------------------------------------------------------------------------
; CTP automatic detection configuration
;ctp_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[ctp_list_para]
ctp_det_used              = 0
gt911_ts                  = 1
ft5x_ts                   = 1
gt82x                     = 1
gslX680                   = 1
gt9xx_ts                  = 1
gt811                     = 1
zet622x                   = 1
aw5306_ts                 = 1

;----------------------------------------------------------------------------------
;touch key configuration
;tkey_twi_id : twi controller ID
;tkey_twi_addr : I2C slave address, 7bit
;tkey_int : port for touch key's interrupt signal
;----------------------------------------------------------------------------------
[tkey_para]
tkey_used           = 0
tkey_twi_id         =
tkey_twi_addr       =
tkey_int            =

;----------------------------------------------------------------------------------
;motor configuration
;motor_shake : port for making the moto shaking
;----------------------------------------------------------------------------------
[motor_para]
motor_used          = 0
motor_shake         = port:power3<1><default><default><1>

;----------------------------------------------------------------------------------
;cooler_table  cooler_count <=32
;----------------------------------------------------------------------------------
[cooler_table]
cooler_count = 4
cooler0 = "1340000 4 4294967295 0"
cooler1 = "1200000 4 4294967295 0"
cooler2 = "1008000 4 4294967295 0"
cooler3 =  "648000 4 4294967295 0"

;----------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode             (0:screen0<screen0,fb0>)
;screenx_output_type   (0:none; 1:lcd; 3:hdmi;)
;screenx_output_mode   (used for hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50)
;                      (5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60)
;fbx format            (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888 12:ARGB4444)
;fbx pixel sequence    (0:ARGB 1:BGRA 2:ABGR 3:RGBA)
;fb0_scaler_mode_enable(scaler mode enable, used FE)
;fbx_width,fbx_height  (framebuffer horizontal/vertical pixels, fix to output resolution while equal 0)
;lcdx_backlight        (lcd init backlight,the range:[0,256],default:197
;lcdx_yy               (lcd init screen bright/contrast/saturation/hue, value:0~100, default:50/50/57/50)
;lcd0_contrast         (LCD contrast, 0~100)
;lcd0_saturation       (LCD saturation, 0~100)
;lcd0_hue              (LCD hue, 0~100)
;----------------------------------------------------------------------------------
[disp_init]
disp_init_enable         = 1
disp_mode                = 0

screen0_output_type      = 1
screen0_output_mode      = 4

screen1_output_type      = 1
screen1_output_mode      = 4

fb0_format               = 10
fb0_pixel_sequence       = 0
fb0_scaler_mode_enable   = 0
fb0_width                = 0
fb0_height               = 0

fb1_format               = 10
fb1_pixel_sequence       = 0
fb1_scaler_mode_enable   = 0
fb1_width                = 0
fb1_height               = 0

lcd0_backlight           = 102
lcd1_backlight           = 102

lcd0_bright              = 50
lcd0_contrast            = 50
lcd0_saturation          = 57
lcd0_hue                 = 50

lcd1_bright              = 50
lcd1_contrast            = 50
lcd1_saturation          = 57
lcd1_hue                 = 50

;----------------------------------------------------------------------------------
;lcd0 configuration

;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp; 6:extend dsi
;lcd_x:                lcd horizontal resolution
;lcd_y:                lcd vertical resolution
;lcd_width:            width of lcd in mm
;lcd_height:           height of lcd in mm
;lcd_dclk_freq:        in MHZ unit
;lcd_pwm_freq:         in HZ unit
;lcd_pwm_pol:          lcd backlight PWM polarity
;lcd_pwm_max_limit     lcd backlight PWM max limit(<=255)
;lcd_hbp:              hsync back porch
;lcd_ht:               hsync total cycle
;lcd_vbp:              vsync back porch
;lcd_vt:               vysnc total cycle
;lcd_hspw:             hsync plus width
;lcd_vspw:             vysnc plus width
;lcd_lvds_if:          0:single link;  1:dual link
;lcd_lvds_colordepth:  0:8bit; 1:6bit
;lcd_lvds_mode:        0:NS mode; 1:JEIDA mode
;lcd_frm:              0:disable; 1:enable rgb666 dither; 2:enable rgb656 dither
;lcd_io_phase:         0:noraml; 1:intert phase(0~3bit: vsync phase; 4~7bit:hsync phase;
;                      8~11bit:dclk phase; 12~15bit:de phase)
;lcd_gamma_en          lcd gamma correction enable
;lcd_bright_curve_en   lcd bright curve correction enable
;lcd_cmap_en           lcd color map function enable
;deu_mode              0:smoll lcd screen; 1:large lcd screen(larger than 10inch)
;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
;                      decrease it while lcd is not bright enough; increase while lcd is too bright
;smart_color           90:normal lcd screen 65:retina lcd screen(9.7inch)
;----------------------------------------------------------------------------------
[lcd0_para]
lcd_used            = 1

lcd_driver_name     = "default_lcd"
lcd_if              = 0
lcd_x               = 800
lcd_y               = 480
lcd_width           =
lcd_height          =
lcd_dclk_freq       = 33
lcd_pwm_used        = 1
lcd_pwm_ch          = 0
lcd_pwm_freq        = 50000
lcd_pwm_pol         = 1
lcd_hbp             = 46
lcd_ht              = 1055
lcd_hspw            = 0
lcd_vbp             = 23
lcd_vt              = 525
lcd_vspw            = 5
lcd_lvds_if         = 0
lcd_lvds_colordepth = 0
lcd_lvds_mode       = 0
lcd_frm             = 1
lcd_io_phase        = 0x0100
lcd_gamma_en        = 0
lcd_bright_curve_en = 0
lcd_cmap_en         = 0

deu_mode            = 0
lcdgamma4iep        = 22
smart_color        = 90

lcd_bl_en           = port:PB4<1><0><default><1>
lcd_power           = ""

lcdd2               = port:PE04<3><0><default><default>
lcdd3               = port:PE05<3><0><default><default>
lcdd4               = port:PE06<3><0><default><default>
lcdd5               = port:PE07<3><0><default><default>
lcdd6               = port:PE08<3><0><default><default>
lcdd7               = port:PE09<3><0><default><default>
lcdd10              = port:PE10<3><0><default><default>
lcdd11              = port:PE11<3><0><default><default>
lcdd12              = port:PE12<3><0><default><default>
lcdd13              = port:PE13<3><0><default><default>
lcdd14              = port:PE14<3><0><default><default>
lcdd15              = port:PE15<3><0><default><default>
lcdd18              = port:PE16<3><0><default><default>
lcdd19              = port:PE17<3><0><default><default>
lcdd20              = port:PE18<3><0><default><default>
lcdd21              = port:PE19<3><0><default><default>

lcdd22              = port:PE23<3><0><default><default>
lcdd23              = port:PE24<3><0><default><default>

lcdclk              = port:PE00<3><0><3><default>
lcdde               = port:PE01<3><0><3><default>
lcdhsync            = port:PE02<3><0><3><default>
lcdvsync            = port:PE03<3><0><3><default>
;----------------------------------------------------------------------------------
;pwm config
;----------------------------------------------------------------------------------
[pwm0_para]
pwm_used            = 1
pwm_positive        = port:PB04<2><0><default><default>

[pwm1_para]
pwm_used            = 0
pwm_positive        = port:PH01<2><0><default><default>

;------------------------------------------------------------------------------;
; 10/100/100Mbps Ethernet MAC Controller Configure                             ;
;------------------------------------------------------------------------------;
;   Options:                                                                   ;
;   gmac_used  ---  0: not used, 1: external phy, 2: internal phy              ;
;   gmac_powerx --  A[:B] A: axp channel, B: voltage value                     ;
;       If set gamc_phy to use internal PHY, do not config port                ;
;------------------------------------------------------------------------------;
;         MII        RMII         MII        RMII         MII        RMII      ;
;   PD00  *                 PD06   *           *    PD12   *           *       ;
;   PD01  *                 PD07   *                PD13   *           *       ;
;   PD02  *            *    PD08   *                PD14   *                   ;
;   PD03  *            *    PD09   *           *    PD15   *                   ;
;   PD04  *                 PD10   *           *    PD16   *           *       ;
;   PD05  *                 PD11   *           *    PD17   *           *       ;
;------------------------------------------------------------------------------;
[gmac0]
gmac_used          = 2
gmac_power1        = 

;--------------------------------------------------------------------------------
;vip (video input port) configuration
;vip_used: 0:disable 1:enable
;vip_mode: 0:sample one interface to one buffer 1:sample two interface to one buffer
;vip_dev_qty: The quantity of devices linked to capture bus
;
;vip_define_sensor_list: If you want use sensor detect function, please set vip_define_sensor_list = 1, and
;                                    verify that file /system/etc/hawkview/sensor_list_cfg.ini is properly configured!
;
;vip_dev(x)_pos: sensor position, "rear" or "front", if vip_define_sensor_list = 1,vip_dev(x)_pos must be configured!
;
;vip_dev(x)_isp_used 0:not use isp 1:use isp
;vip_dev(x)_fmt: 0:yuv 1:bayer raw rgb
;vip_dev(x)_stby_mode: 0:not shut down power at standby 1:shut down power at standby
;vip_dev(x)_vflip: flip in vertical direction 0:disable 1:enable
;vip_dev(x)_hflip: flip in horizontal direction 0:disable 1:enable
;vip_dev(x)_iovdd: camera module io power handle string, pmu power supply
;vip_dev(x)_iovdd_vol: camera module io power voltage, pmu power supply
;vip_dev(x)_avdd: camera module analog power handle string, pmu power supply
;vip_dev(x)_avdd_vol: camera module analog power voltage, pmu power supply
;vip_dev(x)_dvdd: camera module core power handle string, pmu power supply
;vip_dev(x)_dvdd_vol: camera module core power voltage, pmu power supply
;vip_dev(x)_afvdd: camera module vcm power handle string, pmu power supply
;vip_dev(x)_afvdd_vol: camera module vcm power voltage, pmu power supply
;x indicates the index of the devices which are linked to the same capture bus
;fill voltage in uV, e.g. iovdd = 2.8V, vip_devx_iovdd_vol = 2800000
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;--------------------------------------------------------------------------------

[csi0]
vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "h22_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x60
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = "csi-avdd"
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = "csi-dvdd"
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PG00<1><default><default><default>
vip_dev0_pwdn            = port:PG01<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
;fill handle string as below:
;axp22_eldo3
;axp22_dldo4
;axp22_eldo2
;fill handle string "" when not using any pmu power supply
;--------------------------------------------------------------------------------

[csi0]

vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "h22_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x60
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = "csi-avdd"
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = "csi-dvdd"
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PG00<1><default><default><default>
vip_dev0_pwdn            = port:PG01<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =

[csi1]
vip_used                 = 0
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_pck              = port:PE00<2><default><default><default>
vip_csi_mck              = port:PE01<2><default><default><default>
vip_csi_hsync            = port:PE02<2><default><default><default>
vip_csi_vsync            = port:PE03<2><default><default><default>
vip_csi_d0               = port:PE04<2><default><default><default>
vip_csi_d1               = port:PE05<2><default><default><default>
vip_csi_d2               = port:PE06<2><default><default><default>
vip_csi_d3               = port:PE07<2><default><default><default>
vip_csi_d4               = port:PE08<2><default><default><default>
vip_csi_d5               = port:PE09<2><default><default><default>
vip_csi_d6               = port:PE10<2><default><default><default>
vip_csi_d7               = port:PE11<2><default><default><default>
vip_csi_d8               = port:PE12<2><default><default><default>
;vip_csi_d9               = port:PE13<2><default><default><default>
vip_csi_d10               = port:PE14<2><default><default><default>
vip_csi_d11               = port:PE15<2><default><default><default>

vip_csi_sck               = port:PE21<2><default><default><default>
vip_csi_sda               = port:PE22<2><default><default><default>

vip_dev0_mname           = "ov5640"
vip_dev0_pos             = "front"
vip_dev0_twi_id          = 4
vip_dev0_twi_addr        = 0x78
vip_dev0_isp_used        = 0
vip_dev0_fmt             = 0
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 2800000
vip_dev0_avdd            = ""
vip_dev0_avdd_vol        = 2800000
vip_dev0_dvdd            = ""
vip_dev0_dvdd_vol        = 1500000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PE23<1><default><default><default>
vip_dev0_pwdn            = port:PE24<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =

vip_dev0_act_used        = 0
vip_dev0_act_name        = "ad5820_act"
vip_dev0_act_slave       = 0x18

vip_dev1_mname           = "gc2035"
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 4
vip_dev1_twi_addr        = 0x78
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =
;-------------------------------------------------------------------------------
;   mmc configuration
;
;   Config Guide
;   sdc_used:      1-enable card, 0-disable card
;   sdc_detmode:   card detect mode
;                  1-detect card by gpio polling
;                  2-detect card by gpio irq(must use IO with irq function)
;                  3-no detect, always in for boot card
;                  4-manually insert and remove by /proc/driver/sunxi-mmc.x/insert
;   sdc_buswidth:  card bus width, 1-1bit, 4-4bit, 8-8bit
;   sdc_use_wp:    1-with write protect IO, 0-no write protect IO
;   sdc_isio:      for sdio card
;   sdc_regulator: power control.if card supports UHS-I/DDR and HS200 timing for
;                  SD3.0 or eMMC4.5, regulator must be configured. the value is
;                  the ldo name of AXP221, eg: sdc_regulator = "axp22_eldo2"
;   other: GPIO Mapping configuration
;
;   Note:
;   1 if detmode=2, sdc_det's config=6
;     else if detmode=1, sdc_det's config=0
;     else sdc_det IO is not necessary
;   2 if the customer wants to support UHS-I and HS200 features, he must provide
;     an independent power supply for the card. This is only used in platforms
;     that supports SD3.0 cards and eMMC4.4+ flashes
;-------------------------------------------------------------------------------
[mmc0_para]
sdc_used          = 1
sdc_detmode       = 3
sdc_buswidth      = 4
sdc_d1            = port:PF00<2><1><2><default>
sdc_d0            = port:PF01<2><1><2><default>
sdc_clk           = port:PF02<2><1><2><default>
sdc_cmd           = port:PF03<2><1><2><default>
sdc_d3            = port:PF04<2><1><2><default>
sdc_d2            = port:PF05<2><1><2><default>
sdc_det           = port:PF06<0><1><default><default>
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 0
sdc_regulator     = "none"

[mmc1_para]
sdc_used          = 0
sdc_detmode       = 4
sdc_buswidth      = 4
sdc_clk           = port:PG00<2><1><1><default>
sdc_cmd           = port:PG01<2><1><1><default>
sdc_d0            = port:PG02<2><1><1><default>
sdc_d1            = port:PG03<2><1><1><default>
sdc_d2            = port:PG04<2><1><1><default>
sdc_d3            = port:PG05<2><1><1><default>
sdc_det           =
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 1
sdc_regulator     = "none"

[mmc2_para]
sdc_used          = 0
sdc_detmode       = 3
sdc_buswidth      = 8
sdc_clk           = port:PC00<2><1><2><default>
sdc_cmd           = port:PC01<2><1><2><default>
sdc_d0            = port:PC03<2><1><2><default>
sdc_d1            = port:PC04<2><1><2><default>
sdc_d2            = port:PC05<2><1><2><default>
sdc_d3            = port:PC06<2><1><2><default>
sdc_d4            = port:PC07<2><1><2><default>
sdc_d5            = port:PC08<2><1><2><default>
sdc_d6            = port:PC09<2><1><2><default>
sdc_d7            = port:PC10<2><1><2><default>
emmc_rst          = port:PC02<2><1><2><default>
sdc_det           =
sdc_use_wp        = 0
sdc_wp            =
sdc_isio          = 0
sdc_regulator     = "none"

;----------------------------------------------------------------------------------
;usb configuration
;usb_used:          usb controller enable, 0-disable, 1-enable
;usb_port_type:     usb mode: 0-device, 1-host, 2-otg
;usb_detect_type:   usb hotplug detect mode, 0-none, 1-vbus/id detect, 2-id/dpdm detect
;usb_id_gpio:       usb id detect IO
;usb_det_vbus_gpio: usb vbus detect IO, "axp_ctrl" for axp
;usb_drv_vbus_gpio: usb dirve vbus IO
;usb_restrict_gpio: usb current restrict IO
;usb_restric_flag:  usb current restrict flag
;----------------------------------------------------------------------------------
[usbc0]
usb_used            = 1
usb_port_type       = 2
usb_detect_type     = 1
usb_id_gpio         = port:PF6<0><1><default><default>
usb_det_vbus_gpio   = port:PF6<0><1><default><default>
usb_drv_vbus_gpio   = port:PG3<1><0><default><0>
usb_restrict_gpio   =
usb_host_init_state = 0
usb_restric_flag    = 0
usb_restric_voltage = 3550000
usb_restric_capacity= 5
usb_regulator_io    = "nocare"
usb_regulator_vol   = 0
usb_not_suspend     = 0
;----------------------------------------------------------------------------------

; USB Device vendor Info.
;----------------------------------------------------------------------------------
[usb_feature]
vendor_id           = 0x18D1
mass_storage_id     = 0x0001
adb_id              = 0x0002

manufacturer_name   = "USB Developer"
product_name        = "Android"
serial_number       = "20080411"

[msc_feature]
vendor_name         = "USB 2.0"
product_name        = "USB Flash Driver"
release             = 100
luns                = 1

[serial_feature]
serial_unique       = 0

;--------------------------------------------------------------------------------
; G sensor configuration
; gs_twi_id	---  TWI ID for controlling Gsensor (0: TWI0, 1: TWI1, 2: TWI2)
;--------------------------------------------------------------------------------
[gsensor_para]
gsensor_used        = 0
gsensor_twi_id      = 0
;gsensor_twi_addr    = 0x18
gsensor_twi_addr    = 0x27
gsensor_int1        = 
gsensor_int2        =

;--------------------------------------------------------------------------------
; G sensor automatic detection configuration
;gsensor_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[gsensor_list_para]
gsensor_det_used          = 0
bma250                    = 1
da380					  = 1
mma8452                   = 1
mma7660                   = 1
mma865x                   = 1
afa750                    = 1
lis3de_acc                = 1
lis3dh_acc                = 1
kxtik                     = 1
dmard10                   = 0
dmard06                   = 1
mxc622x                   = 1
fxos8700                  = 1
lsm303d                   = 1

;--------------------------------------------------------------------------------
; gps gpio configuration
; gps_spi_id:     the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used
; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1
; gps_lradc:      the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc
;--------------------------------------------------------------------------------
[gps_para]

;--------------------------------------------------------------------------------
;wifi configuration
;wifi_sdc_id:    0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3
;wifi_usbc_id:   0- USB0, 1- USB1, 2- USB2
;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)
;wifi_mod_sel:   0- none, 1- ap6181, 2- ap6210(wifi+bt),
;                3 - rtl8188eu, 4- rtl8723au(wifi+bt)
;--------------------------------------------------------------------------------
[wifi_para]
wifi_used          = 0
wifi_sdc_id        = 1
wifi_usbc_id       = 1
wifi_usbc_type     = 1
wifi_mod_sel       = 2
wifi_power         = ""

; 1 - ap6181 sdio wifi gpio config
;ap6xxx_wl_regon      = port:PL06<1><default><default><0>
;ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>

; 2 - ap6210 sdio wifi gpio config
ap6xxx_wl_regon      = port:PL06<1><default><default><0>
ap6xxx_wl_host_wake  = port:PL07<4><default><default><0>
ap6xxx_bt_regon      = port:PL08<1><default><default><0>
ap6xxx_bt_wake       = port:PL10<1><default><default><0>
ap6xxx_bt_host_wake  = port:PL09<4><default><default><0>
ap6xxx_lpo_use_apclk = 1

; 3 - rtl8188eu usb wifi gpio conifg

; 4 - rtl8723au usb wifi + bt

;--------------------------------------------------------------------------------
;light sensor
;--------------------------------------------------------------------------------
[ls_para]
ls_used             = 0
ls_twi_id           = 1
ls_twi_addr         = 0x23
ls_int              = port:PB07<4><1><default><default>

;--------------------------------------------------------------------------------
; lsensor automatic detection configuration
;ls_detect_used  --- Whether startup automatic inspection function. 1:used,0:unused
;Module name postposition 1 said detection, 0 means no detection. 
;--------------------------------------------------------------------------------
[ls_list_para]
ls_det_used          = 0
ltr_501als           = 1
jsa1212              = 1

;--------------------------------------------------------------------------------
;compass
;--------------------------------------------------------------------------------
[compass_para]
compass_used        = 0
compass_twi_id      = 1
compass_twi_addr    = 0x0d
compass_int         =

;--------------------------------------------------------------------------------
;daudio_master:1: SND_SOC_DAIFMT_CBM_CFM(codec clk & FRM master)        use
;			2: SND_SOC_DAIFMT_CBS_CFM(codec clk slave & FRM master)  not use
;			3: SND_SOC_DAIFMT_CBM_CFS(codec clk master & frame slave) not use
;			4: SND_SOC_DAIFMT_CBS_CFS(codec clk & FRM slave)         use
;daudio_select:0 is pcm.1 is i2s
;audio_format: 1:SND_SOC_DAIFMT_I2S(standard i2s format).            use
;			   2:SND_SOC_DAIFMT_RIGHT_J(right justfied format).
;			   3:SND_SOC_DAIFMT_LEFT_J(left justfied format)
;			   4:SND_SOC_DAIFMT_DSP_A(pcm. MSB is available on 2nd BCLK rising edge after LRC rising edge). use
;			   5:SND_SOC_DAIFMT_DSP_B(pcm. MSB is available on 1nd BCLK rising edge after LRC rising edge)
;signal_inversion:1:SND_SOC_DAIFMT_NB_NF(normal bit clock + frame)  use
;				  2:SND_SOC_DAIFMT_NB_IF(normal BCLK + inv FRM)
;				  3:SND_SOC_DAIFMT_IB_NF(invert BCLK + nor FRM)  use
;				  4:SND_SOC_DAIFMT_IB_IF(invert BCLK + FRM)
;over_sample_rate: support 128fs/192fs/256fs/384fs/512fs/768fs
;sample_resolution	:16bits/20bits/24bits
;word_select_size 	:16bits/20bits/24bits/32bits
;pcm_sync_period 	:16/32/64/128/256
;msb_lsb_first 		:0: msb first; 1: lsb first
;sign_extend 		:0: zero pending; 1: sign extend
;slot_index 		:slot index: 0: the 1st slot - 3: the 4th slot
;slot_width 		:8 bit width / 16 bit width
;frame_width 		:0: long frame = 2 clock width;  1: short frame
;tx_data_mode 		:0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;rx_data_mode 		:0: 16bit linear PCM; 1: 8bit linear PCM; 2: 8bit u-law; 3: 8bit a-law
;--------------------------------------------------------------------------------
[tdm0]
daudio_used         = 0
daudio_master       = 4
daudio_select       = 1
audio_format        = 1
signal_inversion    = 1
mclk_fs             = 512
sample_resolution   = 16
slot_width_select   = 16
pcm_lrck_period     = 32
pcm_lrckr_period    = 1
msb_lsb_first 	    = 0
sign_extend         = 0
slot_index          = 0
slot_width          = 16
frame_width         = 1
tx_data_mode        = 0
rx_data_mode        = 0
;i2s_mclk           = port:PB08<2><1><default><default>
i2s_bclk            = port:PG11<2><1><default><default>
i2s_lrclk           = port:PG10<2><1><default><default>
i2s_dout0           = port:PG12<2><1><default><default>
i2s_dout1           =
i2s_dout2           =
i2s_dout3           =
i2s_din             = port:PG13<2><1><default><default>

;--------------------------------------------------------------------------------------
;pa_single_vol,pa_double_vol: 31 level,1.5db/step.0x1f is the large volume.
;cap_val:use for system record,0x0--0db,0x1--24db,0x2--27db,0x3--30db,0x4--33db,0x5--36db,0x6--39db,0x7--42db
;headphone_vol,earpiece_vol: must least than 0x3b. 0x1 is a step.
;headset_mic_vol: headset mic(mic2) vol,use for phone headset mic call
;main_mic_vol: main mic(mic1) vol,use for phone main mic call
;version_v3_used : 1:v3,0:v3s
[audio0]
;audio_used           = 1
headphone_vol			= 0x3b

cap_vol					= 0x5
Differential_output    = 1
pa_single_vol			= 0x3d
pa_double_used			= 0
pa_double_vol			= 0x1f
headphone_direct_used	= 0
phone_mic_vol = 0x6
version_v3_used = 0
headphone_mute_used = 0
audio_hp_ldo       = 0
;v3s
audio_pa_ctrl         = port:PB05<1><default><default><0>

adcagc_used       = 0
adcdrc_used       = 0
dacdrc_used       = 0
adchpf_used       = 0
dachpf_used       = 0

;----------------------------------------------------------------------------------
;ir --- infra remote configuration
;----------------------------------------------------------------------------------
[s_ir0]
ir_used             = 0
ir_rx               = port:PL04<2><1><default><default>


;-------------------------------------------------------------------------------------
;pmu_used                    ---0:not used,1:used
;pmu_id                      ---0:axp19x,1:axp209,2:axp22x,3:axp806,4:axp808,5:axp809,6:axp803,7:axp813
;pmu_twi_addr                ---slave address
;pmu_twi_id                  ---i2c bus number (0 TWI0, 1 TWI2, 2 TWI3)
;pmu_irq_id		     ---irq number (0 irq0,1 irq1,…\E2\80?
;pmu_battery_rdc             ---battery initial resistance
;pmu_battery_cap             ---battery capability,mAh
;pmu_batdeten		     ---battery detect en;0:disable 1:enable
;pmu_runtime_chgcur          ---set initial charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_earlysuspend_chgcur     ---set earlysuspend charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_suspend_chgcur          ---set suspend charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_shutdown_chgcur         ---set shutdown charging current limite,mA\EF\BC?00/450/600/750/900/1050/1200/1350/1500/1650/1800/1950/
;pmu_init_chgvol             ---set initial charing target voltage,mV,4100/4220/4200/4240
;pmu_init_chgend_rate        ---set initial charing end current  rate,10/15
;pmu_init_chg_enabled        ---set initial charing enabled,0:disable,1:enable
;pmu_init_adc_freq           ---set initial adc frequency,Hz,100/200/400/800
;pmu_init_adcts_freq         ---set initial adc TS,Hz,100/200/400/800
;pmu_init_chg_pretime        ---set initial pre-charging time,min,40/50/60/70
;pmu_init_chg_csttime        ---set initial constance-charging time,min,360/480/600/720
;pmu_batt_cap_correct	     ---correct the battery capacity or not when one charge cycle 0:not correct 1:correct
;pmu_bat_regu_en			 ---bat regulator is enable or not when charge done 0:disable 1:enable
;pmu_bat_para1 		     			 ---battery indication at 3.13V
;pmu_bat_para2               ---battery indication at 3.27V
;pmu_bat_para3               ---battery indication at 3.34V
;pmu_bat_para4               ---battery indication at 3.41V
;pmu_bat_para5               ---battery indication at 3.48V
;pmu_bat_para6               ---battery indication at 3.52V
;pmu_bat_para7               ---battery indication at 3.55V
;pmu_bat_para8               ---battery indication at 3.57V
;pmu_bat_para9               ---battery indication at 3.59V
;pmu_bat_para10              ---battery indication at 3.61V
;pmu_bat_para11              ---battery indication at 3.63V
;pmu_bat_para12              ---battery indication at 3.64V
;pmu_bat_para13              ---battery indication at 3.66V
;pmu_bat_para14              ---battery indication at 3.7V
;pmu_bat_para15              ---battery indication at 3.73V
;pmu_bat_para16              ---battery indication at 3.77V
;pmu_bat_para17              ---battery indication at 3.78V
;pmu_bat_para18              ---battery indication at 3.8V
;pmu_bat_para19              ---battery indication at 3.82V
;pmu_bat_para20              ---battery indication at 3.84V
;pmu_bat_para21              ---battery indication at 3.85V
;pmu_bat_para22              ---battery indication at 3.87V
;pmu_bat_para23              ---battery indication at 3.91V
;pmu_bat_para24              ---battery indication at 3.94V
;pmu_bat_para25              ---battery indication at 3.98V
;pmu_bat_para26              ---battery indication at 4.01V
;pmu_bat_para27              ---battery indication at 4.05V
;pmu_bat_para28              ---battery indication at 4.08V
;pmu_bat_para29              ---battery indication at 4.1V
;pmu_bat_para30              ---battery indication at 4.12V
;pmu_bat_para31              ---battery indication at 4.14V
;pmu_bat_para32              ---battery indication at 4.15V
;pmu_usbvol_limit            ---set usb-ac limited voltage enable,1:enable\EF\BC?:disable
;pmu_usbcur_limit            ---set usb-ac limited current enable,1:enable\EF\BC?:disable
;pmu_usbvol                  ---set usb-ac limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_usbcur                  ---set usb-ac limited current level,mA,500/900, 0 - not limite
;pmu_usbvol_pc	             ---set usb-pc limited voltage level,mV,4000/4100/4200/4300/4400/4500/4600/4700,0 - not limite
;pmu_usbcur_pc               ---set usb-pc limited current level,mA,500/900, 0 - not limite
;pmu_pwroff_vol              ---set protect voltage when system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_pwron_vol               ---set protect voltage after system start up,mV,2600/2700/2800/2900/3000/3100/3200/3300
;pmu_pekoff_time             ---set pek off time,ms, 4000/6000/8000/10000
;pmu_pekoff_func             ---set pek off func, 0:shutdown,1:restart
;pmu_pekoff_en		     ---set pek offlevel powerdown or not, 0:not powerdown,1:powerdown
;pmu_peklong_time            ---set pek pek long irq time,ms,1000/1500/2000/2500
;pmu_pekon_time              ---set pek on time,ms,128/1000/2000/3000
;pmu_pwrok_time              ---set pmu pwrok delay time,ms,8/16/32/64
;pmu_battery_warning_level1  ---low power warning high level,5%-20%,1%/step
;pmu_battery_warning_level2  ---low power warning low level,0%-15%,1%/step
;pmu_restvol_time            ---battery indicaton reflash time,30/60/120/
;pmu_ocv_cou_adjust_time     ---ocv battery indication reflash time,60/120/30
;pmu_chgled_func             ---CHGKED pin control\EF\BC?:controlled by pmu,1:controlled by Charger
;pmu_chgled_type             ---CHGLED Type select when pmu_chgled_func=0,0:Type A\EF\BC?:Type B
;pmu_vbusen_func	     ---N_VBUSEN function select,0:as an output,1:as an input
;pmu_reset                   ---when power key press longer than 16's,PMU reset or not.0:not reset 1:reset
;pmu_IRQ_wakeup		     ---press IRQ wakeup or not when sleep or power down.0:not wakeup 1:wakeup
;pmu_hot_shutdowm            ---when PMU over temperature protect or not;0:disable 1:enable
;pmu_inshort		     ---ACIN and VBUS inshort or not by software;0:auto detect 1:inshort
;pmu_temp_enable             ---temp detect enable
;pmu_charge_ltf              ---charge temp low threshold voltage
;pmu_charge_htf              ---charge temp high threshold voltage
;pmu_discharge_ltf           ---shutdown temp low threshold voltage
;pmu_discharge_htf           ---shutdown temp high threshold voltage
;pmu_temp_para1              --- temp -25 voltage
;pmu_temp_para2              --- temp -15 voltage
;pmu_temp_para3              --- temp -10 voltage
;pmu_temp_para4              --- temp -5  voltage
;pmu_temp_para5              --- temp  0  voltage
;pmu_temp_para6              --- temp  5  voltage
;pmu_temp_para7              --- temp  10 voltage
;pmu_temp_para8              --- temp  20 voltage
;pmu_temp_para9              --- temp  30 voltage
;pmu_temp_para10             --- temp  40 voltage
;pmu_temp_para11             --- temp  45 voltage
;pmu_temp_para12             --- temp  50 voltage
;pmu_temp_para13             --- temp  55 voltage
;pmu_temp_para14             --- temp  60 voltage
;pmu_temp_para15             --- temp  70 voltage
;pmu_temp_para16             --- temp  80 voltage
;--------------------------------------------------------------------------------------------------------
[pmu1_para]
pmu_used                   = 1
pmu_id                     = 1
pmu_twi_addr               = 0x34
pmu_twi_id                 = 0
pmu_irq_id                 = 0
pmu_irq_gpio			   = port:PG05<6><default><default><default>
pmu_battery_rdc            = 249
pmu_battery_cap            = 183
pmu_batdeten               = 1
pmu_runtime_chgcur         = 150
pmu_earlysuspend_chgcur    = 150
pmu_suspend_chgcur         = 150
pmu_shutdown_chgcur        = 150
pmu_init_chgvol            = 4200
pmu_init_chgend_rate       = 15
pmu_init_chg_enabled       = 1
pmu_init_adc_freq          = 100
pmu_init_chg_pretime       = 50
pmu_init_chg_csttime       = 720
pmu_battery_warning1        = 3650
pmu_battery_warning2       = 3600


pmu_bat_para1=0
pmu_bat_para2=0
pmu_bat_para3=0
pmu_bat_para4=0
pmu_bat_para5=8
pmu_bat_para6=16
pmu_bat_para7=25
pmu_bat_para8=37
pmu_bat_para9=47
pmu_bat_para10=55
pmu_bat_para11=61
pmu_bat_para12=68
pmu_bat_para13=79
pmu_bat_para14=87
pmu_bat_para15=94
pmu_bat_para16=100

pmu_usbvol_limit           = 1
pmu_usbcur_limit           = 0
pmu_usbvol                 = 4000
pmu_usbcur                 = 0
pmu_usbvol_pc            = 4000
pmu_usbcur_pc            = 0
pmu_pwroff_vol             = 3300
pmu_pwron_vol            = 2900
pmu_pekoff_time            = 6000
pmu_pekoff_en              = 1
pmu_peklong_time           = 1500
pmu_pekon_time             = 1000
pmu_pwrok_time             = 64
pmu_pwrnoe_time          = 2000
pmu_hot_shutdown            = 1
pmu_suspendpwroff_vol    = 3500
power_start              = 1

[pmu1_regu]
regulator_count = 7
regulator1      = "axp20_dcdc2 none vdd-sys vdd-cpu vdd-ephy"
regulator2      = "axp20_dcdc3 none vcc-io hpvcc vcc-pd vcc-usb vcc-ephy vcc-mcsi vcc-lcd vcc-wifi vcc-device vcc-csi vcc-ctp"
regulator3      = "axp20_ldo1 none vcc-rtc"
regulator4      = "axp20_ldo2 none  vcc-avcc vcc-pll"
regulator5      = "axp20_ldo3 none vcc-pe csi-avdd"
regulator6      = "axp20_ldo4 none csi-dvdd"
regulator7      = "axp20_ldoio0 none"

;----------------------------------------------------------------------------------
; dvfs voltage-frequency table configuration
;
; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk
;                     1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator
; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz
; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz
;
; LV_count: count of LV_freq/LV_volt, must be < 16
;
; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz,  1536Mhz]
; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz,  1296Mhz]
; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz,  1200Mhz]
; LV4: core vdd is 1.20v if cpu frequency is (816Mhz,   1008Mhz]
; LV5: core vdd is 1.10v if cpu frequency is (648Mhz,    816Mhz]
; LV6: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
; LV7: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
; LV8: core vdd is 1.04v if cpu frequency is (0Mhz,      648Mhz]
;
;----------------------------------------------------------------------------------
[dvfs_table]
extremity_freq = 1008000000
max_freq = 1008000000
min_freq = 60000000

LV_count = 8

LV1_freq = 1008000000
LV1_volt = 1200

LV2_freq = 1008000000
LV2_volt = 1200

LV3_freq = 940000000
LV3_volt = 1200

LV4_freq = 940000000
LV4_volt = 1200

LV5_freq = 816000000
LV5_volt = 1100

LV6_freq = 648000000
LV6_volt = 1040

LV7_freq = 0
LV7_volt = 1040

LV8_freq = 0
LV8_volt = 1040

;----------------------------------------------------------------------------------
;virtual device
;virtual device for pinctrl testing
;device have pin PA1 PA2
;----------------------------------------------------------------------------------
[Vdevice]
Vdevice_used        = 1
Vdevice_0           = port:PA01<5><1><2><default>
Vdevice_1           = port:PA02<5><1><2><default>

;----------------------------------------------------------------------------------
; dram dvfs voltage-frequency table configuration
;
; LV_count: count of LV_freq/LV_volt
;
; LV1: core vdd is 1.1v if dram frequency is (360Mhz, 552Mhz]
; LV2: core vdd is 1.0v if dram frequency is (  0Mhz, 360Mhz]
; LV3: core vdd is 1.0v if dram frequency is (  0Mhz, 360Mhz]
;
;----------------------------------------------------------------------------------
[dram_dvfs_table]
LV_count = 3

LV1_freq = 552000000
LV1_volt = 1100

LV2_freq = 360000000
LV2_volt = 1000

LV3_freq = 0
LV3_volt = 1000


[fel_key]
fel_key_used =  1
fel_key_min  =  0
fel_key_max  = 	60

[leds_para]
leds_used = 1
led_0 = port:PG00<1><default><default><0>
led_0_active_low = 0
led_1 = port:PG01<1><default><default><0>
led_1_active_low = 0
led_2 = port:PG02<1><default><default><0>
led_2_active_low = 0
;led_3 = port:PA00<1><default><default><0>
;led_3_active_low = 0
;led_4 = port:PA00<1><default><default><0>
;led_4_active_low = 0
;led_5 = port:PA00<1><default><default><0>
;led_5_active_low = 0
;led_6 = port:PA00<1><default><default><0>
;led_6_active_low = 0
;led_7 = port:PA00<1><default><default><0>
;led_7_active_low = 0

最近编辑记录 晕哥小弟 (2019-04-08 13:46:59)

离线

#100 2019-04-08 14:00:20

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

这个问题应该出在:

[uart_para]
uart_debug_port = 0
uart_debug_tx   = port:PB08<3><1><default><default>
uart_debug_rx   = port:PB09<3><1><default><default>

你改回和上面我的配置一样:

[uart_para]
uart_debug_port = 2
uart_debug_tx   = port:PB00<3><1><default><default>
uart_debug_rx   = port:PB01<3><1><default><default>

我看到上面 early printk 输出了解压成功, 开始启动。

只是串口输出不对, 按你的配置可能调试信息输出到别的串口了。

以上是猜测。

离线

#101 2019-04-08 14:41:03

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

这个问题应该出在:

[uart_para]
uart_debug_port = 0
uart_debug_tx   = port:PB08<3><1><default><default>
uart_debug_rx   = port:PB09<3><1><default><default>

你改回和上面我的配置一样:

[uart_para]
uart_debug_port = 2
uart_debug_tx   = port:PB00<3><1><default><default>
uart_debug_rx   = port:PB01<3><1><default><default>

我看到上面 early printk 输出了解压成功, 开始启动。

只是串口输出不对, 按你的配置可能调试信息输出到别的串口了。

以上是猜测。

请收下我的膝盖,改完完美启动了。

离线

#102 2019-04-08 14:42:50

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

[url=C:\Users\he\Desktop\TIM截图20190408143958.png/]
其他的都已经是Y了,为什么还是ov5647还是N呢?
[/url]

最近编辑记录 晕哥小弟 (2019-04-08 14:43:48)

离线

#103 2019-04-08 14:43:53

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

后面还有很远的路要走, bsp linux 虽然驱动很全, 但是如果应用层不用 camdroid 架构, 视频编解码仍然会很麻烦,不过摄像头驱动还是很容易了。

离线

#104 2019-04-08 14:44:44

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

FluxBB bbcode 其他的都已经是Y了,为什么还是ov5647还是N呢?
其他的都已经是Y了,为什么还是ov5647还是N呢

最近编辑记录 晕哥小弟 (2019-04-08 14:46:48)

离线

#105 2019-04-08 14:49:00

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

后面还有很远的路要走, bsp linux 虽然驱动很全, 但是如果应用层不用 camdroid 架构, 视频编解码仍然会很麻烦,不过摄像头驱动还是很容易了。

1、我听说官方也提供了一个linux 的sdk不知道是不是真的,还没有联系到官方。
2、看到论坛上很多朋友说camdroid不提供技术支持,所以很害怕。
3、如果我单单只是拍个照片,应该不需要视频编解码了吧?

离线

#106 2019-04-08 14:49:40

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥小弟 说:

https://whycan.cn/files/members/1569/TIM20190408143958.png
其他的都已经是Y了,为什么还是ov5647还是N呢

应该还有一部分条件没有达到, 你打开 Kconfig 和 .config 对比看看

离线

#107 2019-04-08 14:51:41

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥小弟 说:
晕哥 说:

后面还有很远的路要走, bsp linux 虽然驱动很全, 但是如果应用层不用 camdroid 架构, 视频编解码仍然会很麻烦,不过摄像头驱动还是很容易了。

1、我听说官方也提供了一个linux 的sdk不知道是不是真的,还没有联系到官方。
2、看到论坛上很多朋友说camdroid不提供技术支持,所以很害怕。
3、如果我单单只是拍个照片,应该不需要视频编解码了吧?

1. linux sdk 可能有, 例如索智/全志 S3 就有, 在 小智 的 QQ群附件就有 S3 的 Linux SDK.
2. 全志一直都没有给散户提供技术支持
3. 拍照用 Linux 标准的 V4L2 接口就可以获取数据, 和视频编解码没有关系。

离线

#108 2019-04-08 18:10:47

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥,我的内核已经打开了ov5647,可是为什么板载的系统中没有关于OV5647的相关信息呢,出现了设备文件/dev/video0. 是否这个设备是坏的?
22222.png


以下是我内核启动的信息

## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2626784 Bytes = 2.5 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (he@he) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #2 Mon Apr 8 17:56:33 CST 2019
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 29340k/29340k available, 36196k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0502000   (5096 kB)
[    0.000000]       .init : 0xc0502000 - 0xc0525000   ( 140 kB)
[    0.000000]       .data : 0xc0526000 - 0xc05a27f0   ( 498 kB)
[    0.000000]        .bss : 0xc05a2814 - 0xc0683514   ( 900 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000150] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000171] pid_max: default: 32768 minimum: 301
[    0.000307] Mount-cache hash table entries: 512
[    0.000869] CPU: Testing write buffer coherency: ok
[    0.001130] Setting up static identity map for 0x4038cf68 - 0x4038cfc0
[    0.001804] devtmpfs: initialized
[    0.003519] pinctrl core: initialized pinctrl subsystem
[    0.004015] NET: Registered protocol family 16
[    0.004321] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004381] script_sysfs_init success
[    0.005173] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006114] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006489] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007339] persistent_ram: uncorrectable error in header
[    0.007354] persistent_ram: no valid data in buffer (sig = 0x55175517)
[    0.013821] console [ram-1] enabled
[    0.014632] Not Found clk pll_isp in script 
[    0.014864] Not Found clk pll_video in script 
[    0.014989] Not Found clk pll_ve in script 
[    0.015112] Not Found clk pll_periph0 in script 
[    0.015339] Not Found clk pll_de in script 
[    0.019533] bio: create slab <bio-0> at 0
[    0.019920] pwm module init!
[    0.022142] SCSI subsystem initialized
[    0.022504] usbcore: registered new interface driver usbfs
[    0.022708] usbcore: registered new interface driver hub
[    0.023079] usbcore: registered new device driver usb
[    0.023339] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.023570] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.024397] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.024644] axp20_board 0-0034: failed reading at 0x03
[    0.024899] axp20_board: probe of 0-0034 failed with error -70
[    0.025067] Linux video capture interface: v2.00
[    0.025384] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.025844] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.026749] Switching to clocksource arch_sys_counter
[    0.029961] NET: Registered protocol family 2
[    0.029961] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.030278] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.030552] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.030695] TCP: Hash tables configured (established 2048 bind 2048)
[    0.030923] TCP: reno registered
[    0.031049] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.031287] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.031664] NET: Registered protocol family 1
[    0.032228] standby_mode = 1. 
[    0.032354] wakeup src cnt is : 3. 
[    0.032496] pmu1_enable = 0x1. 
[    0.032618] pmux_id = 0x1. 
[    0.032855] config_pmux_para: script_parser_fetch err. 
[    0.032980] pmu2_enable = 0x0. 
[    0.033108] add_sys_pwr_dm: get ldo name failed
[    0.033335] add_sys_pwr_dm: get ldo name failed
[    0.033458] add_sys_pwr_dm: get ldo name failed
[    0.033686] add_sys_pwr_dm: get ldo name failed
[    0.033808] add_sys_pwr_dm: get ldo name failed
[    0.033930] add_sys_pwr_dm: get ldo name failed
[    0.034154] add_sys_pwr_dm: get ldo name failed
[    0.034278] add_sys_pwr_dm: get ldo name failed
[    0.034505] add_sys_pwr_dm: get ldo name failed
[    0.034628] add_sys_pwr_dm: get ldo name failed
[    0.034749] after inited: sys_mask config = 0x0. 
[    0.034975] dynamic_standby enalbe = 0x0. 
[    0.035146] sunxi_reg_init enter
[    0.037213] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.037498] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.037913] msgmni has been set to 57
[    0.038965] io scheduler noop registered
[    0.039104] io scheduler deadline registered
[    0.039413] io scheduler cfq registered (default)
[    0.039953] [DISP]disp_module_init
[    0.040532] cmdline,disp=
[    0.041315] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.041562] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.044209] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.046857] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.047992] [DISP]disp_module_init finish
[    0.048409] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.048998] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.049240] sw_uart_pm()890 - uart0 clk is already enable
[    0.049377] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.162851] console [ttyS0] enabled
[    0.687969] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.695952] spi spi0: master is unqueued, this is deprecated
[    0.702543] m25p_probe()982 - Use the Dual Mode Read.
[    0.708496] m25p80 spi0.0: found m25p05-nonjedec, expected w25q128
[    0.715501] m25p80 spi0.0: m25p05-nonjedec (64 Kbytes)
[    0.722920] partitions_register()865 - m25p80_read() ret 0, PartCnt: 0
[    0.730315] m25p80: probe of spi0.0 failed with error -22
[    0.738149] Failed to alloc md5
[    0.741854] eth0: Use random mac address
[    0.746381] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.774050] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.783297] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.791970] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.810033] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.817421] hub 1-0:1.0: USB hub found
[    0.821882] hub 1-0:1.0: 1 port detected
[    0.826768] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.832544] usb usb1: USB disconnect, device number 1
[    0.839826] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.856286] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.883492] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.892260] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.900828] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    0.964625] hub 1-0:1.0: USB hub found
[    0.968924] hub 1-0:1.0: 1 port detected
[    0.973935] sunxi-ohci sunxi-ohci.1: remove, state 1
[    0.979577] usb usb1: USB disconnect, device number 1
[    0.985891] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.002442] Initializing USB Mass Storage driver...
[    1.008061] usbcore: registered new interface driver usb-storage
[    1.014960] USB Mass Storage support registered.
[    1.020517] file system registered
[    1.026010] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.033815] android_usb gadget: Number of LUNs=1
[    1.039247]  lun0: LUN: removable file: (no medium)
[    1.045398] android_usb gadget: android_usb ready
[    1.050896] sunxikbd_script_init: key para not found, used default para. 
[    1.059666] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.067571] [VFE]cci probe start cci_sel = 0!
[    1.072663] [VFE]cci probe end cci_sel = 0!
[    1.077456] [VFE]cci_init end
[    1.080997] [VFE]Welcome to Video Front End driver
[    1.086720] [VFE]pdev->id = 0
[    1.090179] [VFE]dev->mipi_sel = 0
[    1.094171] [VFE]dev->vip_sel = 0
[    1.097956] [VFE]dev->isp_sel = 0
[    1.107860] [VFE_WARN]vfe vpu clock is null
[    1.119393] [VFE]vfe_init end
[    1.122900] [VFE]probe_work_handle start!
[    1.127464] [VFE]..........................vfe clk open!.......................
[    1.136801] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.145840] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.154887] [VFE]v4l2 subdev register input_num = 0
[    1.160547] [VFE_ERR]get regulator csi_avdd error!
[    1.165976] [VFE_ERR]vfe_device_regulator_get error at input_num = 0
[    1.173485] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.182151] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.191034] [VFE]V4L2 device registered as video0
[    1.196404] [VFE]..........................vfe clk close!.......................
[    1.205051] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.213725] [VFE]probe_work_handle end!
[    1.218261] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.227038] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.235966] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.243359] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.254801] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.262518] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.268921] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.280898] no led_3, ignore it!
[    1.284618] no led_4, ignore it!
[    1.288308] no led_5, ignore it!
[    1.292146] no led_6, ignore it!
[    1.295848] no led_7, ignore it!
[    1.300865] leds-gpio: probe of leds-gpio failed with error -16
[    1.307942] usbcore: registered new interface driver usbhid
[    1.314282] usbhid: USB HID core driver
[    1.319392] ashmem: initialized
[    1.323297] logger: created 256K log 'log_main'
[    1.328609] logger: created 32K log 'log_events'
[    1.334319] logger: created 32K log 'log_radio'
[    1.339590] logger: created 32K log 'log_system'
[    1.346344] script_get_item return type err, consider it no ldo
[    1.354269] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.364164] *******************Try sdio*******************
[    1.372064] TCP: cubic registered
[    1.375906] NET: Registered protocol family 17
[    1.381143] VFP support v0.3: [mmc]: *** sunxi_mci_dump_errinfo(L826): smc 0 err, cmd 5,  RTO !!
[    1.391474] ThumbEE CPU extension supported.
[    1.396482] Registering SWP/SWPB emulation handler
[    1.402826] *******************Try sd *******************
[    1.409280] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.418344] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.428375] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.439226] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.447837] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.456529] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.465411] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.474217] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 00:16:34 UTC (994)
[    1.484665] ALSA device list:
[    1.488097]   #0: audiocodec
[    1.491832] Waiting for root device /dev/mmcblk0p2...
[    1.527504] mmc0: new high speed SDHC card at address aaaa
[    1.534210] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.543890]  mmcblk0: p1 p2
[    1.547910] mmcblk mmc0:aaaa: Card claimed for testing.
[    1.553990] mmc0:aaaa: SC16G 14.8 GiB 
[    1.558383] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.567273] *******************sd init ok*******************
[    1.573765] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.582659] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.591222] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.599880] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.608573] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.617143] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.712926] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.724765] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.761795] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.771002] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.782364] devtmpfs: mounted
[    1.785975] Freeing init memory: 140K
[    1.905285] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
buildroot login: 
Welcome to Buildroot
buildroot login: root
# ls
111   test
# dmesg  | grep ov5647
# 
# 
# lsmod 
Module                  Size  Used by    Not tainted
# 

最近编辑记录 晕哥小弟 (2019-04-08 18:11:39)

离线

#109 2019-04-08 18:55:20

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

你看下是不是 sys_config.fex 应该开启 ov5647,而你没有开启。

离线

#110 2019-04-08 20:10:13

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

你看下是不是 sys_config.fex 应该开启 ov5647,而你没有开启。


我在sys_config.fex里面没有看到ov5647的部分,你这边有配置好的ov5647的sys_config.fex么?

离线

#111 2019-04-08 22:26:03

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

[csi0]
vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "ov5647_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x6c
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = ""
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = ""
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PB02<1><default><default><default>
vip_dev0_pwdn            = port:PB03<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =

看下是不是这个?

离线

#112 2019-04-09 09:33:11

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

[csi0]
vip_used                 = 1
vip_mode                 = 0
vip_dev_qty              = 1
vip_define_sensor_list   = 0
vip_csi_mck              = port:PE20<3><default><default><default>
vip_csi_sck              = port:PE21<2><default><default><default>
vip_csi_sda              = port:PE22<2><default><default><default>
vip_dev0_mname           = "ov5647_mipi"
vip_dev0_pos             = "rear"
vip_dev0_lane            = 1
vip_dev0_twi_id          = 0
vip_dev0_twi_addr        = 0x6c
vip_dev0_isp_used        = 1
vip_dev0_fmt             = 1
vip_dev0_stby_mode       = 0
vip_dev0_vflip           = 0
vip_dev0_hflip           = 0
vip_dev0_iovdd           = ""
vip_dev0_iovdd_vol       = 3000000
vip_dev0_avdd            = ""
vip_dev0_avdd_vol        = 3000000
vip_dev0_dvdd            = ""
vip_dev0_dvdd_vol        = 3000000
vip_dev0_afvdd           = ""
vip_dev0_afvdd_vol       = 2800000
vip_dev0_power_en        =
vip_dev0_reset           = port:PB02<1><default><default><default>
vip_dev0_pwdn            = port:PB03<1><default><default><default>
vip_dev0_flash_en        =
vip_dev0_flash_mode      =
vip_dev0_af_pwdn         =
vip_dev0_act_used        = 0
vip_dev0_act_name        = "dw9714_act"
vip_dev0_act_slave       = 0x18
vip_dev1_mname           = ""
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id          = 0
vip_dev1_twi_addr        =
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 1
vip_dev1_stby_mode       = 0
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = ""
vip_dev1_iovdd_vol       = 2800000
vip_dev1_avdd            = ""
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = ""
vip_dev1_dvdd_vol        = 1500000
vip_dev1_afvdd           = ""
vip_dev1_afvdd_vol       = 2800000
vip_dev1_power_en        =
vip_dev1_reset           =
vip_dev1_pwdn            =
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =

看下是不是这个?


晕哥把你这段代码给添加上去了,自己也写了一个v4l2的代码,尝试拍照。结果总是报下面这样的的错误。

# ./newtest 
[   34.653288] [VFE]vfe_open
[   34.656469] [VFE]..........................vfe clk open!.......................
[   34.665674] [VFE]vfe_open ok
[   34.669100] [VFE_ERR]try yuv422 bus error when pix fmt is yuv422 interleaved at try_fmt_internal!
[   34.679238] [VFE_ERR]pixel format (0x56595559) width 320 height 240 invalid at vidioc_s_fmt_vid_cap.
[   34.690262] [VFE]buffer_setup, buffer count=4, size=0
mmap failed[   34.696346] [VFE_ERR]videobuf_buffer->priv is NULL!

mmap failed
mmap failed
mmap failed
VIDIOC_QBUF failed
VIDIOC_QBUF failed
VIDIOC_QBUF failed
VIDIOC_QBUF failed
buf.index dq is 0,[   34.714109] [VFE]vfe_close

[   34.718734] [VFE]vfe select input flag = 0, s_input have not be used .
[   34.726312] [VFE]..........................vfe clk close!.......................
[   34.735047] [VFE]vfe_close end

是我的摄像头坏了么?还是。。。。

离线

#113 2019-04-09 09:38:15

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

log 有没有检测到  ov5647  摄像头?

离线

#114 2019-04-09 09:40:13

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

log 有没有检测到  ov5647  摄像头?

以下是启动log

starting USB...
No controllers found
Hit any key to stop autoboot:  0 
=> setenv bootargs console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
=> setenv bootm_boot_mode sec
=> setenv machid 1029
=> load mmc 0:1 0x41000000 uImage
reading uImage
2626848 bytes read in 153 ms (16.4 MiB/s)
=> load mmc 0:1 0x41d00000 script.bin
reading script.bin
32628 bytes read in 24 ms (1.3 MiB/s)
=> bootm 0x41000000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2626784 Bytes = 2.5 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (he@he) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #2 Mon Apr 8 17:56:33 CST 2019
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 29348k/29348k available, 36188k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0502000   (5096 kB)
[    0.000000]       .init : 0xc0502000 - 0xc0525000   ( 140 kB)
[    0.000000]       .data : 0xc0526000 - 0xc05a27f0   ( 498 kB)
[    0.000000]        .bss : 0xc05a2814 - 0xc0683514   ( 900 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000153] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000172] pid_max: default: 32768 minimum: 301
[    0.000314] Mount-cache hash table entries: 512
[    0.000874] CPU: Testing write buffer coherency: ok
[    0.001134] Setting up static identity map for 0x4038cf68 - 0x4038cfc0
[    0.001815] devtmpfs: initialized
[    0.003517] pinctrl core: initialized pinctrl subsystem
[    0.004014] NET: Registered protocol family 16
[    0.004317] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004377] script_sysfs_init success
[    0.005163] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006063] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006441] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007295] persistent_ram: uncorrectable error in header
[    0.007311] persistent_ram: no valid data in buffer (sig = 0xd5175701)
[    0.013814] console [ram-1] enabled
[    0.014636] Not Found clk pll_isp in script 
[    0.014871] Not Found clk pll_video in script 
[    0.014994] Not Found clk pll_ve in script 
[    0.015116] Not Found clk pll_periph0 in script 
[    0.015342] Not Found clk pll_de in script 
[    0.019519] bio: create slab <bio-0> at 0
[    0.019900] pwm module init!
[    0.022177] SCSI subsystem initialized
[    0.022531] usbcore: registered new interface driver usbfs
[    0.022729] usbcore: registered new interface driver hub
[    0.023108] usbcore: registered new device driver usb
[    0.023369] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.023603] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.024427] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.024671] axp20_board 0-0034: failed reading at 0x03
[    0.024923] axp20_board: probe of 0-0034 failed with error -70
[    0.025092] Linux video capture interface: v2.00
[    0.025402] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.025860] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.026749] Switching to clocksource arch_sys_counter
[    0.029942] NET: Registered protocol family 2
[    0.029942] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.030210] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.030482] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.030627] TCP: Hash tables configured (established 2048 bind 2048)
[    0.030854] TCP: reno registered
[    0.030980] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.031216] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.031586] NET: Registered protocol family 1
[    0.032151] standby_mode = 1. 
[    0.032278] wakeup src cnt is : 3. 
[    0.032421] pmu1_enable = 0x1. 
[    0.032544] pmux_id = 0x1. 
[    0.032781] config_pmux_para: script_parser_fetch err. 
[    0.032903] pmu2_enable = 0x0. 
[    0.033029] add_sys_pwr_dm: get ldo name failed
[    0.033255] add_sys_pwr_dm: get ldo name failed
[    0.033377] add_sys_pwr_dm: get ldo name failed
[    0.033602] add_sys_pwr_dm: get ldo name failed
[    0.033725] add_sys_pwr_dm: get ldo name failed
[    0.033847] add_sys_pwr_dm: get ldo name failed
[    0.034074] add_sys_pwr_dm: get ldo name failed
[    0.034197] add_sys_pwr_dm: get ldo name failed
[    0.034427] add_sys_pwr_dm: get ldo name failed
[    0.034549] add_sys_pwr_dm: get ldo name failed
[    0.034670] after inited: sys_mask config = 0x0. 
[    0.034897] dynamic_standby enalbe = 0x0. 
[    0.035068] sunxi_reg_init enter
[    0.037132] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.037414] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.037836] msgmni has been set to 57
[    0.038886] io scheduler noop registered
[    0.039025] io scheduler deadline registered
[    0.039329] io scheduler cfq registered (default)
[    0.039868] [DISP]disp_module_init
[    0.040451] cmdline,disp=
[    0.041231] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.041478] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.044126] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.046787] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.047920] [DISP]disp_module_init finish
[    0.048334] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.048916] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.049152] sw_uart_pm()890 - uart0 clk is already enable
[    0.049291] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.162764] console [ttyS0] enabled
[    0.687859] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.695828] spi spi0: master is unqueued, this is deprecated
[    0.702423] m25p_probe()982 - Use the Dual Mode Read.
[    0.708371] m25p80 spi0.0: found m25p05-nonjedec, expected w25q128
[    0.715375] m25p80 spi0.0: m25p05-nonjedec (64 Kbytes)
[    0.722791] partitions_register()865 - m25p80_read() ret 0, PartCnt: 0
[    0.730187] m25p80: probe of spi0.0 failed with error -22
[    0.738042] Failed to alloc md5
[    0.741745] eth0: Use random mac address
[    0.746275] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.773946] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.783197] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.791860] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.810033] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.817406] hub 1-0:1.0: USB hub found
[    0.821876] hub 1-0:1.0: 1 port detected
[    0.826768] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.832543] usb usb1: USB disconnect, device number 1
[    0.839714] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.856180] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.883382] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.892148] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.900713] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    0.964629] hub 1-0:1.0: USB hub found
[    0.968926] hub 1-0:1.0: 1 port detected
[    0.973934] sunxi-ohci sunxi-ohci.1: remove, state 1
[    0.979573] usb usb1: USB disconnect, device number 1
[    0.985875] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.002424] Initializing USB Mass Storage driver...
[    1.008042] usbcore: registered new interface driver usb-storage
[    1.014937] USB Mass Storage support registered.
[    1.020482] file system registered
[    1.025989] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.033795] android_usb gadget: Number of LUNs=1
[    1.039220]  lun0: LUN: removable file: (no medium)
[    1.045375] android_usb gadget: android_usb ready
[    1.050868] sunxikbd_script_init: key para not found, used default para. 
[    1.059622] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.067525] [VFE]cci probe start cci_sel = 0!
[    1.072626] [VFE]cci probe end cci_sel = 0!
[    1.077422] [VFE]cci_init end
[    1.080964] [VFE]Welcome to Video Front End driver
[    1.086691] [VFE]pdev->id = 0
[    1.090143] [VFE]dev->mipi_sel = 0
[    1.094135] [VFE]dev->vip_sel = 0
[    1.097919] [VFE]dev->isp_sel = 0
[    1.107818] [VFE_WARN]vfe vpu clock is null
[    1.119192] [VFE]vfe_init end
[    1.122660] [VFE]probe_work_handle start!
[    1.127242] [VFE]..........................vfe clk open!.......................
[    1.136562] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.145592] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.154630] [VFE]v4l2 subdev register input_num = 0
[    1.160287] [VFE]vfe sensor detect start! input_num = 0
[    1.166203] [VFE]Find sensor name is "ov5647_mipi", i2c address is 6c, type is "RAW" !
[    1.175259] [VFE]Sub device register "ov5647_mipi" i2c_addr = 0x6c start!
[    1.182923] [VFE]v4l2_device_register_subdev return 0
[    1.188744] [VFE]registered sensor subdev is OK!
[    1.193991] [VFE]Check sensor!
[    1.197595] [VFE]Sub device register "ov5647_mipi" is OK!
[    1.203889] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.212669] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.221321] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.230099] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.238845] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.247816] [VFE]Check open /system/etc/hawkview/ov5647_mipi/isp_test_param.ini failed!
[    1.247825] Match isp cfg  start!
[    1.260744] [VFE]read ini start
[    1.264518] [VFE]Fetch ini file form "/system/etc/hawkview/ov5647_mipi/isp_test_param.ini"
[    1.273910] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.281371] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.292853] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.300565] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.306969] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.319007] [VFE_WARN]read ini info fail
[    1.323876] [VFE]V4L2 device registered as video0
[    1.329298] [VFE]..........................vfe clk close!.......................
[    1.340387] [VFE]probe_work_handle end!
[    1.346162] no led_3, ignore it!
[    1.346171] no led_4, ignore it!
[    1.346178] no led_5, ignore it!
[    1.346184] no led_6, ignore it!
[    1.346189] no led_7, ignore it!
[    1.346887] usbcore: registered new interface driver usbhid
[    1.346895] usbhid: USB HID core driver
[    1.347542] ashmem: initialized
[    1.347669] logger: created 256K log 'log_main'
[    1.347788] logger: created 32K log 'log_events'
[    1.347900] logger: created 32K log 'log_radio'
[    1.348005] logger: created 32K log 'log_system'
[    1.349446] script_get_item return type err, consider it no ldo
[    1.350424] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.419120] TCP: cubic registered
[    1.422979] NET: Registered protocol family 17
[    1.428193] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.437066] ThumbEE CPU extension supported.
[    1.442025] Registering SWP/SWPB emulation handler
[    1.448590] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.457676] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.467619] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.478494] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.487052] *******************Try sdio*******************
[    1.493420] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.502125] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.510940] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.519868] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 00:00:33 UTC (33)
[    1.528835] *******************Try sd *******************
[    1.536302] ALSA device list:
[    1.539735]   #0: audiocodec
[    1.544994] Waiting for root device /dev/mmcblk0p2...
[    1.617421] mmc0: new high speed SDHC card at address aaaa
[    1.624209] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.633836]  mmcblk0: p1 p2
[    1.637862] mmcblk mmc0:aaaa: Card claimed for testing.
[    1.643964] mmc0:aaaa: SC16G 14.8 GiB 
[    1.648363] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.657230] *******************sd init ok*******************
[    1.663739] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.672616] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.681188] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.689840] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.698512] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.707072] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.772909] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.784765] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.819148] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.828446] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.839571] devtmpfs: mounted
[    1.843212] Freeing init memory: 140K
[    1.969289] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
buildroot login: root
# ls

麻烦晕哥帮我分析下,我看到有ov5647启动。

离线

#115 2019-04-09 09:42:42

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥小弟 说:
晕哥 说:

log 有没有检测到  ov5647  摄像头?

以下是启动log

starting USB...
No controllers found
Hit any key to stop autoboot:  0 
=> setenv bootargs console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
=> setenv bootm_boot_mode sec
=> setenv machid 1029
=> load mmc 0:1 0x41000000 uImage
reading uImage
2626848 bytes read in 153 ms (16.4 MiB/s)
=> load mmc 0:1 0x41d00000 script.bin
reading script.bin
32628 bytes read in 24 ms (1.3 MiB/s)
=> bootm 0x41000000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2626784 Bytes = 2.5 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (he@he) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #2 Mon Apr 8 17:56:33 CST 2019
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 29348k/29348k available, 36188k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0502000   (5096 kB)
[    0.000000]       .init : 0xc0502000 - 0xc0525000   ( 140 kB)
[    0.000000]       .data : 0xc0526000 - 0xc05a27f0   ( 498 kB)
[    0.000000]        .bss : 0xc05a2814 - 0xc0683514   ( 900 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000153] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000172] pid_max: default: 32768 minimum: 301
[    0.000314] Mount-cache hash table entries: 512
[    0.000874] CPU: Testing write buffer coherency: ok
[    0.001134] Setting up static identity map for 0x4038cf68 - 0x4038cfc0
[    0.001815] devtmpfs: initialized
[    0.003517] pinctrl core: initialized pinctrl subsystem
[    0.004014] NET: Registered protocol family 16
[    0.004317] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004377] script_sysfs_init success
[    0.005163] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006063] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006441] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007295] persistent_ram: uncorrectable error in header
[    0.007311] persistent_ram: no valid data in buffer (sig = 0xd5175701)
[    0.013814] console [ram-1] enabled
[    0.014636] Not Found clk pll_isp in script 
[    0.014871] Not Found clk pll_video in script 
[    0.014994] Not Found clk pll_ve in script 
[    0.015116] Not Found clk pll_periph0 in script 
[    0.015342] Not Found clk pll_de in script 
[    0.019519] bio: create slab <bio-0> at 0
[    0.019900] pwm module init!
[    0.022177] SCSI subsystem initialized
[    0.022531] usbcore: registered new interface driver usbfs
[    0.022729] usbcore: registered new interface driver hub
[    0.023108] usbcore: registered new device driver usb
[    0.023369] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.023603] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.024427] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.024671] axp20_board 0-0034: failed reading at 0x03
[    0.024923] axp20_board: probe of 0-0034 failed with error -70
[    0.025092] Linux video capture interface: v2.00
[    0.025402] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.025860] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.026749] Switching to clocksource arch_sys_counter
[    0.029942] NET: Registered protocol family 2
[    0.029942] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.030210] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.030482] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.030627] TCP: Hash tables configured (established 2048 bind 2048)
[    0.030854] TCP: reno registered
[    0.030980] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.031216] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.031586] NET: Registered protocol family 1
[    0.032151] standby_mode = 1. 
[    0.032278] wakeup src cnt is : 3. 
[    0.032421] pmu1_enable = 0x1. 
[    0.032544] pmux_id = 0x1. 
[    0.032781] config_pmux_para: script_parser_fetch err. 
[    0.032903] pmu2_enable = 0x0. 
[    0.033029] add_sys_pwr_dm: get ldo name failed
[    0.033255] add_sys_pwr_dm: get ldo name failed
[    0.033377] add_sys_pwr_dm: get ldo name failed
[    0.033602] add_sys_pwr_dm: get ldo name failed
[    0.033725] add_sys_pwr_dm: get ldo name failed
[    0.033847] add_sys_pwr_dm: get ldo name failed
[    0.034074] add_sys_pwr_dm: get ldo name failed
[    0.034197] add_sys_pwr_dm: get ldo name failed
[    0.034427] add_sys_pwr_dm: get ldo name failed
[    0.034549] add_sys_pwr_dm: get ldo name failed
[    0.034670] after inited: sys_mask config = 0x0. 
[    0.034897] dynamic_standby enalbe = 0x0. 
[    0.035068] sunxi_reg_init enter
[    0.037132] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.037414] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.037836] msgmni has been set to 57
[    0.038886] io scheduler noop registered
[    0.039025] io scheduler deadline registered
[    0.039329] io scheduler cfq registered (default)
[    0.039868] [DISP]disp_module_init
[    0.040451] cmdline,disp=
[    0.041231] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.041478] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.044126] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.046787] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.047920] [DISP]disp_module_init finish
[    0.048334] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.048916] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.049152] sw_uart_pm()890 - uart0 clk is already enable
[    0.049291] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.162764] console [ttyS0] enabled
[    0.687859] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.695828] spi spi0: master is unqueued, this is deprecated
[    0.702423] m25p_probe()982 - Use the Dual Mode Read.
[    0.708371] m25p80 spi0.0: found m25p05-nonjedec, expected w25q128
[    0.715375] m25p80 spi0.0: m25p05-nonjedec (64 Kbytes)
[    0.722791] partitions_register()865 - m25p80_read() ret 0, PartCnt: 0
[    0.730187] m25p80: probe of spi0.0 failed with error -22
[    0.738042] Failed to alloc md5
[    0.741745] eth0: Use random mac address
[    0.746275] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.773946] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.783197] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.791860] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.810033] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.817406] hub 1-0:1.0: USB hub found
[    0.821876] hub 1-0:1.0: 1 port detected
[    0.826768] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.832543] usb usb1: USB disconnect, device number 1
[    0.839714] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.856180] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.883382] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.892148] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.900713] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    0.964629] hub 1-0:1.0: USB hub found
[    0.968926] hub 1-0:1.0: 1 port detected
[    0.973934] sunxi-ohci sunxi-ohci.1: remove, state 1
[    0.979573] usb usb1: USB disconnect, device number 1
[    0.985875] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.002424] Initializing USB Mass Storage driver...
[    1.008042] usbcore: registered new interface driver usb-storage
[    1.014937] USB Mass Storage support registered.
[    1.020482] file system registered
[    1.025989] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.033795] android_usb gadget: Number of LUNs=1
[    1.039220]  lun0: LUN: removable file: (no medium)
[    1.045375] android_usb gadget: android_usb ready
[    1.050868] sunxikbd_script_init: key para not found, used default para. 
[    1.059622] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.067525] [VFE]cci probe start cci_sel = 0!
[    1.072626] [VFE]cci probe end cci_sel = 0!
[    1.077422] [VFE]cci_init end
[    1.080964] [VFE]Welcome to Video Front End driver
[    1.086691] [VFE]pdev->id = 0
[    1.090143] [VFE]dev->mipi_sel = 0
[    1.094135] [VFE]dev->vip_sel = 0
[    1.097919] [VFE]dev->isp_sel = 0
[    1.107818] [VFE_WARN]vfe vpu clock is null
[    1.119192] [VFE]vfe_init end
[    1.122660] [VFE]probe_work_handle start!
[    1.127242] [VFE]..........................vfe clk open!.......................
[    1.136562] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.145592] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.154630] [VFE]v4l2 subdev register input_num = 0
[    1.160287] [VFE]vfe sensor detect start! input_num = 0
[    1.166203] [VFE]Find sensor name is "ov5647_mipi", i2c address is 6c, type is "RAW" !
[    1.175259] [VFE]Sub device register "ov5647_mipi" i2c_addr = 0x6c start!
[    1.182923] [VFE]v4l2_device_register_subdev return 0
[    1.188744] [VFE]registered sensor subdev is OK!
[    1.193991] [VFE]Check sensor!
[    1.197595] [VFE]Sub device register "ov5647_mipi" is OK!
[    1.203889] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.212669] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.221321] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.230099] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.238845] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.247816] [VFE]Check open /system/etc/hawkview/ov5647_mipi/isp_test_param.ini failed!
[    1.247825] Match isp cfg  start!
[    1.260744] [VFE]read ini start
[    1.264518] [VFE]Fetch ini file form "/system/etc/hawkview/ov5647_mipi/isp_test_param.ini"
[    1.273910] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.281371] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.292853] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.300565] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.306969] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.319007] [VFE_WARN]read ini info fail
[    1.323876] [VFE]V4L2 device registered as video0
[    1.329298] [VFE]..........................vfe clk close!.......................
[    1.340387] [VFE]probe_work_handle end!
[    1.346162] no led_3, ignore it!
[    1.346171] no led_4, ignore it!
[    1.346178] no led_5, ignore it!
[    1.346184] no led_6, ignore it!
[    1.346189] no led_7, ignore it!
[    1.346887] usbcore: registered new interface driver usbhid
[    1.346895] usbhid: USB HID core driver
[    1.347542] ashmem: initialized
[    1.347669] logger: created 256K log 'log_main'
[    1.347788] logger: created 32K log 'log_events'
[    1.347900] logger: created 32K log 'log_radio'
[    1.348005] logger: created 32K log 'log_system'
[    1.349446] script_get_item return type err, consider it no ldo
[    1.350424] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.419120] TCP: cubic registered
[    1.422979] NET: Registered protocol family 17
[    1.428193] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.437066] ThumbEE CPU extension supported.
[    1.442025] Registering SWP/SWPB emulation handler
[    1.448590] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.457676] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.467619] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.478494] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.487052] *******************Try sdio*******************
[    1.493420] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.502125] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.510940] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.519868] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 00:00:33 UTC (33)
[    1.528835] *******************Try sd *******************
[    1.536302] ALSA device list:
[    1.539735]   #0: audiocodec
[    1.544994] Waiting for root device /dev/mmcblk0p2...
[    1.617421] mmc0: new high speed SDHC card at address aaaa
[    1.624209] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.633836]  mmcblk0: p1 p2
[    1.637862] mmcblk mmc0:aaaa: Card claimed for testing.
[    1.643964] mmc0:aaaa: SC16G 14.8 GiB 
[    1.648363] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.657230] *******************sd init ok*******************
[    1.663739] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.672616] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.681188] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.689840] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.698512] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.707072] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.772909] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.784765] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.819148] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.828446] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.839571] devtmpfs: mounted
[    1.843212] Freeing init memory: 140K
[    1.969289] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

Welcome to Buildroot
buildroot login: root
# ls

麻烦晕哥帮我分析下,我看到有ov5647启动。


另外这个是百度搜的拍照程序

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>

#include <getopt.h>

#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#include <malloc.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/ioctl.h>

#include <asm/types.h>
#include <linux/videodev2.h>

#define CLEAR(x) memset (&(x), 0, sizeof (x))

struct buffer {
		void * start;
		size_t length;
};

static char * dev_name = "/dev/video0";//摄像头设备名
static int fd = -1;
struct buffer * buffers = NULL;
static unsigned int n_buffers = 0;

FILE *file_fd;
static unsigned long file_length;
static unsigned char *file_name;
//////////////////////////////////////////////////////
//获取一帧数据
//////////////////////////////////////////////////////
static int read_frame (void)
{
		struct v4l2_buffer buf;
		unsigned int i;

		CLEAR (buf);
		buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
		buf.memory = V4L2_MEMORY_MMAP;

		ioctl (fd, VIDIOC_DQBUF, &buf); //出列采集的帧缓冲

		assert (buf.index < n_buffers);
		printf ("buf.index dq is %d,\n",buf.index);

		fwrite(buffers[buf.index].start, buf.bytesused, 1, file_fd); //将其写入文件中

		ioctl (fd, VIDIOC_QBUF, &buf); //再将其入列

		return 1;
}

int main (int argc,char ** argv)
{
		struct v4l2_capability cap;
		struct v4l2_format fmt;
		unsigned int i;
		enum v4l2_buf_type type;

		file_fd = fopen("test-mmap.jpg", "w");//图片文件名

		fd = open (dev_name, O_RDWR /* required */ | O_NONBLOCK, 0);//打开设备

		ioctl (fd, VIDIOC_QUERYCAP, &cap);//获取摄像头参数

		CLEAR (fmt);
		fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
		fmt.fmt.pix.width = 320;
		fmt.fmt.pix.height = 240;
		fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
		fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
		ioctl (fd, VIDIOC_S_FMT, &fmt); //设置图像格式

		file_length = fmt.fmt.pix.bytesperline * fmt.fmt.pix.height; //计算图片大小

		struct v4l2_requestbuffers req;
		CLEAR (req);
		req.count = 4;
		req.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
		req.memory = V4L2_MEMORY_MMAP;

		ioctl (fd, VIDIOC_REQBUFS, &req); //申请缓冲,count是申请的数量

		if (req.count < 2)
				printf("Insufficient buffer memory\n");

		buffers = calloc (req.count, sizeof (*buffers));//内存中建立对应空间

		for (n_buffers = 0; n_buffers < req.count; ++n_buffers)
		{
				struct v4l2_buffer buf; //驱动中的一帧
				CLEAR (buf);
				buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
				buf.memory = V4L2_MEMORY_MMAP;
				buf.index = n_buffers;

				if (-1 == ioctl (fd, VIDIOC_QUERYBUF, &buf)) //映射用户空间
						printf ("VIDIOC_QUERYBUF error\n");

				buffers[n_buffers].length = buf.length;
				buffers[n_buffers].start = mmap (NULL /* start anywhere */, //通过mmap建立映射关系
								buf.length,
								PROT_READ | PROT_WRITE /* required */,
								MAP_SHARED /* recommended */,
								fd, buf.m.offset);

				if (MAP_FAILED == buffers[n_buffers].start)
						printf ("mmap failed\n");
		}

		for (i = 0; i < n_buffers; ++i)
		{
				struct v4l2_buffer buf;
				CLEAR (buf);

				buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
				buf.memory = V4L2_MEMORY_MMAP;
				buf.index = i;

				if (-1 == ioctl (fd, VIDIOC_QBUF, &buf))//申请到的缓冲进入列队
						printf ("VIDIOC_QBUF failed\n");
		}

		type = V4L2_BUF_TYPE_VIDEO_CAPTURE;

		if (-1 == ioctl (fd, VIDIOC_STREAMON, &type)) //开始捕捉图像数据
				printf ("VIDIOC_STREAMON failed\n");

		for (i = 0; i < 1; i++) //这一段涉及到异步IO
		{
				fd_set fds;
				struct timeval tv;
				int r;

				FD_ZERO (&fds);//将指定的文件描述符集清空
				FD_SET (fd, &fds);//在文件描述符集合中增加一个新的文件描述符

				/* Timeout. */
				tv.tv_sec = 2;
				tv.tv_usec = 0;

				r = select (fd + 1, &fds, NULL, NULL, &tv);//判断是否可读(即摄像头是否准备好),tv是定时

				if (-1 == r) {
						if (EINTR == errno)
								continue;
						printf ("select err\n");
				}
				if (0 == r) {
						fprintf (stderr, "select timeout\n");
						exit (EXIT_FAILURE);
				}

				if (read_frame ())//如果可读,执行read_frame ()函数,并跳出循环
						break;
		}

unmap:
		for (i = 0; i < n_buffers; ++i)
				if (-1 == munmap (buffers[i].start, buffers[i].length))
						printf ("munmap error");
		close (fd);
		fclose (file_fd);
		exit (EXIT_SUCCESS);
		return 0;
}

离线

#116 2019-04-09 09:51:07

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

可能不支持 mmap,只支持 read

离线

#117 2019-04-09 09:55:10

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

可能不支持 mmap,只支持 read


那怎么解决呢?给点意见,困扰好几天了。另外也不知道是硬件问题还是软件问题。

最近编辑记录 晕哥小弟 (2019-04-09 09:55:29)

离线

#118 2019-04-09 10:05:42

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥小弟 说:
晕哥 说:

可能不支持 mmap,只支持 read


那怎么解决呢?给点意见,困扰好几天了。另外也不知道是硬件问题还是软件问题。

想判断硬件是否正常, 烧这个固件: https://whycan.cn/t_1780.html



这是经典的 V4L2 应用程序,

参数 m 使用 mmap 抓图, 参数 d 使用 read 抓图:

https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/capture.c.html

离线

#119 2019-04-09 14:05:23

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:
晕哥小弟 说:
晕哥 说:

可能不支持 mmap,只支持 read


那怎么解决呢?给点意见,困扰好几天了。另外也不知道是硬件问题还是软件问题。

想判断硬件是否正常, 烧这个固件: https://whycan.cn/t_1780.html
   因为购买的是荔枝派zero,本身这个硬件没有焊接spi-flash。所以暂时测试不了。


这是经典的 V4L2 应用程序,

参数 m 使用 mmap 抓图, 参数 d 使用 read 抓图:

https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/capture.c.html


另外我发现个问题,就是我把mipi摄像头给拔下来,log日志为:

reading script.bin
32628 bytes read in 24 ms (1.3 MiB/s)
=> bootm 0x41000000
## Booting kernel from Legacy Image at 41000000 ...
   Image Name:   Linux-3.4.39
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2635296 Bytes = 2.5 MiB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0x1029 from environment

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.4.39 (he@he) (gcc version 4.8.3 20140320 (prerelease) (Sourcery CodeBench Lite 2014.05-29) ) #5 Tue Apr 9 13:54:17 CST 2019
[    0.000000] Initialized persistent memory from 41d20800-41d307ff
[    0.000000] Kernel command line: console=ttyS0,115200 panic=5 rootwait root=/dev/mmcblk0p2 earlyprintk rw
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Memory: 64MB = 64MB total
[    0.000000] Memory: 29332k/29332k available, 36204k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0506000   (5112 kB)
[    0.000000]       .init : 0xc0506000 - 0xc0529000   ( 140 kB)
[    0.000000]       .data : 0xc052a000 - 0xc05a6930   ( 499 kB)
[    0.000000]        .bss : 0xc05a6954 - 0xc0687654   ( 900 kB)
[    0.000000] NR_IRQS:544
[    0.000000] Architected local timer running at 24.00MHz.
[    0.000000] Switching to timer-based delay loop
[    0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[    0.000000] Console: colour dummy device 80x30
[    0.000144] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000)
[    0.000165] pid_max: default: 32768 minimum: 301
[    0.000308] Mount-cache hash table entries: 512
[    0.000871] CPU: Testing write buffer coherency: ok
[    0.001140] Setting up static identity map for 0x4038ffe0 - 0x40390038
[    0.001825] devtmpfs: initialized
[    0.003521] pinctrl core: initialized pinctrl subsystem
[    0.004010] NET: Registered protocol family 16
[    0.004314] DMA: preallocated 128 KiB pool for atomic coherent allocations
[    0.004371] script_sysfs_init success
[    0.005159] gpiochip_add: registered GPIOs 0 to 223 on device: sunxi-pinctrl
[    0.006067] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver
[    0.006434] gpiochip_add: registered GPIOs 1024 to 1031 on device: axp-pinctrl
[    0.007284] persistent_ram: uncorrectable error in header
[    0.007300] persistent_ram: no valid data in buffer (sig = 0x55175517)
[    0.013832] console [ram-1] enabled
[    0.014652] Not Found clk pll_isp in script 
[    0.014891] Not Found clk pll_video in script 
[    0.015015] Not Found clk pll_ve in script 
[    0.015138] Not Found clk pll_periph0 in script 
[    0.015367] Not Found clk pll_de in script 
[    0.019492] bio: create slab <bio-0> at 0
[    0.019868] pwm module init!
[    0.022133] SCSI subsystem initialized
[    0.022482] usbcore: registered new interface driver usbfs
[    0.022679] usbcore: registered new interface driver hub
[    0.023060] usbcore: registered new device driver usb
[    0.023317] twi_chan_cfg()340 - [twi0] has no twi_regulator.
[    0.023553] twi_chan_cfg()340 - [twi1] has no twi_regulator.
[    0.024365] sunxi_i2c_do_xfer()985 - [i2c0] incomplete xfer (status: 0x20, dev addr: 0x34)
[    0.024612] axp20_board 0-0034: failed reading at 0x03
[    0.024865] axp20_board: probe of 0-0034 failed with error -70
[    0.025034] Linux media interface: v0.10
[    0.025203] Linux video capture interface: v2.00
[    0.025508] gpiochip_add: gpios 1024..1028 (axp_pin) failed to register
[    0.025969] Advanced Linux Sound Architecture Driver Version 1.0.25.
[    0.026858] Switching to clocksource arch_sys_counter
[    0.030000] NET: Registered protocol family 2
[    0.030000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.030000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.030283] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.030532] TCP: Hash tables configured (established 2048 bind 2048)
[    0.030658] TCP: reno registered
[    0.030790] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.031030] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.031528] NET: Registered protocol family 1
[    0.031996] standby_mode = 1. 
[    0.032123] wakeup src cnt is : 3. 
[    0.032266] pmu1_enable = 0x1. 
[    0.032387] pmux_id = 0x1. 
[    0.032520] config_pmux_para: script_parser_fetch err. 
[    0.032643] pmu2_enable = 0x0. 
[    0.032873] add_sys_pwr_dm: get ldo name failed
[    0.032996] add_sys_pwr_dm: get ldo name failed
[    0.033221] add_sys_pwr_dm: get ldo name failed
[    0.033344] add_sys_pwr_dm: get ldo name failed
[    0.033468] add_sys_pwr_dm: get ldo name failed
[    0.033694] add_sys_pwr_dm: get ldo name failed
[    0.033819] add_sys_pwr_dm: get ldo name failed
[    0.034047] add_sys_pwr_dm: get ldo name failed
[    0.034170] add_sys_pwr_dm: get ldo name failed
[    0.034293] add_sys_pwr_dm: get ldo name failed
[    0.034518] after inited: sys_mask config = 0x0. 
[    0.034643] dynamic_standby enalbe = 0x0. 
[    0.034928] sunxi_reg_init enter
[    0.036959] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.037139] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.037557] msgmni has been set to 57
[    0.038613] io scheduler noop registered
[    0.038857] io scheduler deadline registered
[    0.039060] io scheduler cfq registered (default)
[    0.039594] [DISP]disp_module_init
[    0.040280] cmdline,disp=
[    0.040944] [DISP] disp_get_rotation_sw,line:68:disp 0 out of range? g_rot_sw=0
[    0.041298] [DISP] disp_init_connections,line:289:NULL pointer: 0, 0
[    0.043844] [DISP] Fb_map_kernel_logo,line:924:Fb_map_kernel_logo failed!
[    0.046595] [DISP] disp_sys_power_enable,line:387:some error happen, fail to get regulator 
[    0.047623] [DISP]disp_module_init finish
[    0.048213] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.048679] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.048913] sw_uart_pm()890 - uart0 clk is already enable
[    0.049048] sw_console_setup()1233 - console setup baud 115200 parity n bits 8, flow n
[    0.162520] console [ttyS0] enabled
[    0.692064] sunxi_spi_chan_cfg()1376 - [spi-0] has no spi_regulator.
[    0.699885] spi spi0: master is unqueued, this is deprecated
[    0.706477] m25p_probe()982 - Use the Dual Mode Read.
[    0.712341] m25p80 spi0.0: found m25p05-nonjedec, expected w25q128
[    0.719424] m25p80 spi0.0: m25p05-nonjedec (64 Kbytes)
[    0.726746] partitions_register()865 - m25p80_read() ret 0, PartCnt: 0
[    0.734247] m25p80: probe of spi0.0 failed with error -22
[    0.742008] Failed to alloc md5
[    0.745662] eth0: Use random mac address
[    0.750240] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.777891] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.786952] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1
[    0.795800] sunxi-ehci sunxi-ehci.1: irq 104, io mem 0xf1c1a000
[    0.820040] sunxi-ehci sunxi-ehci.1: USB 0.0 started, EHCI 1.00
[    0.827435] hub 1-0:1.0: USB hub found
[    0.831779] hub 1-0:1.0: 1 port detected
[    0.836764] sunxi-ehci sunxi-ehci.1: remove, state 1
[    0.842508] usb usb1: USB disconnect, device number 1
[    0.849685] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered
[    0.866145] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.893350] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver
[    0.902015] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1
[    0.910695] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400
[    0.974623] hub 1-0:1.0: USB hub found
[    0.978941] hub 1-0:1.0: 1 port detected
[    0.983823] sunxi-ohci sunxi-ohci.1: remove, state 1
[    0.989565] usb usb1: USB disconnect, device number 1
[    0.995887] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered
[    1.012450] Initializing USB Mass Storage driver...
[    1.018061] usbcore: registered new interface driver usb-storage
[    1.024965] USB Mass Storage support registered.
[    1.030529] file system registered
[    1.035871] android_usb gadget: Mass Storage Function, version: 2009/09/11
[    1.043844] android_usb gadget: Number of LUNs=1
[    1.049215]  lun0: LUN: removable file: (no medium)
[    1.055377] android_usb gadget: android_usb ready
[    1.060901] sunxikbd_script_init: key para not found, used default para. 
[    1.069621] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0
[    1.077557] [VFE]cci probe start cci_sel = 0!
[    1.082680] [VFE]cci probe end cci_sel = 0!
[    1.087479] [VFE]cci_init end
[    1.090910] [VFE]Welcome to Video Front End driver
[    1.096731] [VFE]pdev->id = 0
[    1.100172] [VFE]dev->mipi_sel = 0
[    1.104057] [VFE]dev->vip_sel = 0
[    1.107948] [VFE]dev->isp_sel = 0
[    1.117875] [VFE_WARN]vfe vpu clock is null
[    1.129138] [VFE]vfe_init end
[    1.132710] [VFE]probe_work_handle start!
[    1.137273] [VFE]..........................vfe clk open!.......................
[    1.146607] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.155533] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.164704] [VFE]v4l2 subdev register input_num = 0
[    1.170251] [VFE]vfe sensor detect start! input_num = 0
[    1.176268] [VFE]Find sensor name is "ov5647_mipi", i2c address is 6c, type is "RAW" !
[    1.185327] [VFE]Sub device register "ov5647_mipi" i2c_addr = 0x6c start!
[    1.192994] [VFE]v4l2_device_register_subdev return 0
[    1.198822] [VFE]registered sensor subdev is OK!
[    1.204064] [VFE]Check sensor!
[    1.207563] [VFE]Sub device register "ov5647_mipi" is OK!
[    1.213974] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.222637] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.231407] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.240163] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.248806] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.257867] [VFE]Check open /system/etc/hawkview/ov5647_mipi/isp_test_param.ini failed!
[    1.257876] Match isp cfg  start!
[    1.270788] [VFE]read ini start
[    1.274454] [VFE]Fetch ini file form "/system/etc/hawkview/ov5647_mipi/isp_test_param.ini"
[    1.283919] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[    1.291382] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[    1.302881] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[    1.310593] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[    1.317008] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[    1.328967] [VFE_WARN]read ini info fail
[    1.333919] [VFE]V4L2 device registered as video0
[    1.339313] [VFE]..........................vfe clk close!.......................
[    1.350409] [VFE]probe_work_handle end!
[    1.356158] no led_3, ignore it!
[    1.356166] no led_4, ignore it!
[    1.356172] no led_5, ignore it!
[    1.356178] no led_6, ignore it!
[    1.356183] no led_7, ignore it!
[    1.356888] usbcore: registered new interface driver usbhid
[    1.356896] usbhid: USB HID core driver
[    1.357543] ashmem: initialized
[    1.357682] logger: created 256K log 'log_main'
[    1.357786] logger: created 32K log 'log_events'
[    1.357885] logger: created 32K log 'log_radio'
[    1.357985] logger: created 32K log 'log_system'
[    1.359441] script_get_item return type err, consider it no ldo
[    1.360428] asoc: sndcodec <-> sunxi-codec mapping ok
[    1.429218] TCP: cubic registered
[    1.433082] NET: Registered protocol family 17
[    1.438372] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[    1.447254] ThumbEE CPU extension supported.
[    1.452172] Registering SWP/SWPB emulation handler
[    1.458597] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.467805] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.477734] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.488509] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.497179] *******************Try sdio*******************
[    1.503552] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.512154] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.521073] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.530071] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 00:02:35 UTC (155)
[    1.539012] *******************Try sd *******************
[    1.546676] ALSA device list:
[    1.550155]   #0: audiocodec
[    1.553846] Waiting for root device /dev/mmcblk0p2...
[    1.627419] mmc0: new high speed SDHC card at address aaaa
[    1.634135] mmcblk0: mmc0:aaaa SC16G 14.8 GiB 
[    1.643842]  mmcblk0: p1 p2
[    1.647938] mmcblk mmc0:aaaa: Card claimed for testing.
[    1.653923] mmc0:aaaa: SC16G 14.8 GiB 
[    1.658423] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[    1.667222] *******************sd init ok*******************
[    1.673823] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[    1.682715] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[    1.691281] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[    1.699944] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[    1.708610] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[    1.717181] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[    1.772746] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[    1.784653] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[    1.831489] EXT4-fs (mmcblk0p2): recovery complete
[    1.840278] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    1.849487] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    1.860643] devtmpfs: mounted
[    1.864250] Freeing init memory: 140K
[    1.978693] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: OK

MIPI 摄像头插上和没有插上,打印信息都是一样的。

离线

#120 2019-04-09 14:15:05

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

这就有点尴尬了, 你确认一下 OV5647 摄像头有没有插反, 然后再烧我上面说的那个固件。

https://whycan.cn/t_1780.html

离线

#121 2019-04-09 14:29:57

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:

这就有点尴尬了, 你确认一下 OV5647 摄像头有没有插反, 然后再烧我上面说的那个固件。

https://whycan.cn/t_1780.html

晕哥,你这个固件是需要spi-flash的,没有spi-flash会一直不停的刷错误。

离线

#122 2019-04-09 14:38:29

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

那就买几片 spi flash嘛,没有多少钱的

离线

#123 2019-04-09 15:41:09

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

嗯,已经买了,快递要几天时间。另外
1、我在一个路由器发现W25Q16 这个可以使用么?
2、烧写你上面的https://whycan.cn/t_1780.html,固件方法怎么烧?

离线

#124 2019-04-09 15:50:12

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥小弟 说:

嗯,已经买了,快递要几天时间。另外
1、我在一个路由器发现W25Q16 这个可以使用么?
2、烧写你上面的 https://whycan.cn/t_1780.html ,固件方法怎么烧?

1. V3s 支持这个芯片,但是这个估计不支持,太小了
2. 一楼有方法,用全志官方软件烧

离线

#125 2019-04-09 15:59:50

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥 说:
晕哥小弟 说:

嗯,已经买了,快递要几天时间。另外
1、我在一个路由器发现W25Q16 这个可以使用么?
2、烧写你上面的 https://whycan.cn/t_1780.html ,固件方法怎么烧?

1. V3s 支持这个芯片,但是这个估计不支持,太小了
2. 一楼有方法,用全志官方软件烧


1、我购买个w25q128 可以吧?
2、一楼的烧写方法是烧写纯linux方式,我目前想烧写下你提供的camdroid方式。
       https://whycan.cn/t_866.html

离线

#126 2019-04-09 16:09:39

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

1. 最好买 W25Q256, MX25L256, 兼容 128
2. https://whycan.cn/t_1780.html  这个帖子就是 camdroid 固件

离线

#127 2019-04-09 17:25:33

晕哥小弟
会员
注册时间: 2019-04-04
累计积分: 26

Re: licheepi zero BSP 内核(linux3.4) 编译教程

晕哥,淘宝上没有卖OV5647的了咋办? 有这方面的链接么?我的这个可能因为方向问题烧掉了。总是提示

VIDIOC_QUERYBUF error
mmap failed
VIDIOC_QUERYBUF error
mmap failed
VIDIOC_QUERYBUF error
mmap failed
VIDIOC_QUERYBUF error
mmap failed
VIDIOC_QBUF failed
VIDIOC_QBUF failed
VIDIOC_QBUF failed
VIDIOC_QBUF failed
VIDIOC_STREAMON failed
select timeout

离线

#128 2019-04-09 17:32:12

晕哥
Administrator
注册时间: 2017-09-06
累计积分: 6,124

Re: licheepi zero BSP 内核(linux3.4) 编译教程

https://detail.1688.com/offer/564697485698.html



用阿里旺旺 联系一下这个店主, 看看还能不能买到。


或许是烧了, 荔枝派zero 新版防呆没做好, 两个方向都可以插。

离线

页脚