Jump to content

bananapi m3 MIPI DSI (S070WV20HG-) how to make it work?


Recommended Posts

Posted (edited)

Hello guys!

i had download armbian for bananapi m3(a83t) from arambian for bpi-m3. And braking my mind with friending sinovoip LCD+touchscreen module.

I tried all the known options for me to connect the LCD display S070WV20HG-DC16 with the touchscreen on the ft5x_ts driver,  and failed because apparently not smart enough for this, the my brains are exploding.

In the kernel, I did not find the drivers on the display (S070WV20_MIPI_RGB)
and the driver on the screen in the kernel is not compiled.

Is anyone can correct in the device tree file the parameters for the LCD section for the display as I understood the data can be taken from the fex file:

Spoiler


;----------------------------------------------------------------------------------
;i2c configuration
;----------------------------------------------------------------------------------
[twi0]
twi_used        = 1
twi_scl         = port:PH0<2><default><default><default>
twi_sda         = port:PH1<2><default><default><default>

[twi1]
twi_used        = 1
twi_scl         = port:PH2<2><default><default><default>
twi_sda         = port:PH3<2><default><default><default>

[twi2]
twi_used        = 1
twi_scl         = port:PH4<2><default><default><default>
twi_sda         = port:PH5<2><default><default><default>


;----------------------------------------------------------------------------------
;capacitor tp configuration
;external int function
;wakeup output function
;notice ---    tp_int_port &  tp_io_port use the same port
;----------------------------------------------------------------------------------
[ctp_para]
ctp_used            = 1
ctp_gesture_wakeup  = 0
ctp_twi_id          = 0
ctp_twi_addr        = 0x38
;ctp_name            = "ft5x_ts"
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 = 0

ctp_int_port        = port:PL07<3><default><default><default>
ctp_wakeup          = port:PL06<1><default><default><1>
ctp_power_ldo       = "vcc-tp-3v3"
ctp_power_ldo_vol   =3300
ctp_power_io        =

;--------------------------------------------------------------------------------
; 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              = 1
ft5x_ts                   = 1



;----------------------------------------------------------------------------------
;boot display configuration
;output_type  (0:none; 1:lcd; 2:tv; 3:hdmi; 4:vga)
;output_mode  (used for tv/hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc)
;output_mode  (used for vga output, 0:1680*1050 1:1440*900 2:1360*768 3:1280*1024 4:1024*768 5:800*600 6:640*480 10:1920*1080 11:1280*720)
;tv_mode      (used for tv output, 0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc)
;auto_hpd     (auto detect hdmi/cvbs/ypbpr plug in)
;----------------------------------------------------------------------------------
[boot_disp]
output_disp = 1
output_type = 3
output_mode = 5

;----------------------------------------------------------------------------------
;disp init configuration
;
;disp_mode             (0:screen0<screen0,fb0>; 1:screen1<screen1,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           (0:ARGB 1:ABGR 2:RGBA 3:BGRA 5:RGB565 8:RGB888 12:ARGB4444 16:ARGB1555 18:RGBA5551)
;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
;----------------------------------------------------------------------------------
[disp_init]
disp_init_enable         = 1
disp_mode                = 0

screen0_output_type      = 3
screen0_output_mode      = 5

screen1_output_type      = 3
screen1_output_mode      = 5

fb0_format               = 0
fb0_width                = 0
fb0_height               = 0

fb1_format               = 0
fb1_width                = 0
fb1_height               = 0

lcd0_backlight           = 50
lcd1_backlight           = 50



;----------------------------------------------------------------------------------
; HDMI to DVI converters
; hdmi_hdcp_enable    = 0
; hdmi_cts_compatibility = 1
;----------------------------------------------------------------------------------
[hdmi_para]
hdmi_used           = 1
hdmi_power          = "vcc-hdmi-18"
hdmi_hdcp_enable    = 0
hdmi_cts_compatibility = 0
hdmi_io_0           = port:PH6<2><0><default><default>
hdmi_io_1           = port:PH7<2><0><default><default>
hdmi_io_2           = port:PH8<2><0><default><default>

[clock]
pll_ve          = 432
;pll_periph      = 600
pll_gpu         = 432
pll_hsic        = 480
pll_de          = 504
;apb2_parent     = pll_periph
;apb2            = 40
pll_video1      = 297

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

;lcd_if:               0:hv(sync+de); 1:8080; 2:ttl; 3:lvds; 4:dsi; 5:edp
;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_gamma_en          lcd gamma correction enable
;lcd_bright_curve_en   lcd bright curve correction enable
;lcd_cmap_en           lcd color map function enable
;lcdgamma4iep:         Smart Backlight parameter, lcd gamma vale * 10;
;                      decrease it while lcd is not bright enough; increase while lcd is too bright
;----------------------------------------------------------------------------------
[lcd0_para]
lcd_used            = 1

lcd_driver_name     = "S070WV20_MIPI_RGB"
lcd_bl_0_percent    = 0
lcd_bl_40_percent   = 23
lcd_bl_100_percent  = 100

lcd_if              = 4

lcd_x               = 800
lcd_y               = 480

lcd_width           = 86
lcd_height          = 154

lcd_dclk_freq       = 20

lcd_pwm_used        = 1
lcd_pwm_ch          = 0
lcd_pwm_freq        = 50000
lcd_pwm_pol         = 1
lcd_pwm_max_limit   = 255

lcd_hbp             = 88
lcd_ht              = 928
lcd_hspw            = 48
lcd_vbp             = 32
lcd_vt              = 525
lcd_vspw            = 3

lcd_frm             = 0
lcd_cmap_en         = 0
lcd_dsi_if          = 0
lcd_dsi_lane        = 4
lcd_dsi_format      = 0
lcd_dsi_te          = 0
;lcd_gamma_en        = 0
;lcd_bright_curve_en = 0
;lcdgamma4iep        = 22

lcd_power           = "vcc-dsi-18"
lcd_power1          = "vcc-mipi"
lcd_bl_en           =  port:PD29<1><0><2><1>

lcd_gpio_0          = port:PD26<1><0><2><1>
lcd_gpio_1          = port:PD27<1><0><2><1>
lcd_io_regulator1   = "vcc-pd"

;----------------------------------------------------------------------------------
;hdmi configuration
;----------------------------------------------------------------------------------
[hdmi_para]
hdmi_used           = 1

;----------------------------------------------------------------------------------
;pwm config
;----------------------------------------------------------------------------------
[pwm0_para]
pwm_used            = 1
pwm_positive        = port:PD28<2><0><default><default>


;--------------------------------------------------------------------------------
;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_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               =
vip_csi_d1               =
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_sck               = port:PE14<2><default><default><default>
vip_csi_sda               = port:PE15<2><default><default><default>

vip_dev0_mname = "ov5640"
vip_dev0_pos = "rear"
vip_dev0_lane = 4
vip_dev0_twi_id = 2
vip_dev0_twi_addr = 120
vip_dev0_isp_used = 1
vip_dev0_fmt = 0
vip_dev0_stby_mode = 0
vip_dev0_vflip = 1
vip_dev0_hflip = 1
vip_dev0_iovdd = "axp81x_dldo4"
vip_dev0_iovdd_vol = 2800000
vip_dev0_avdd = "axp81x_dldo4"
vip_dev0_avdd_vol = 2800000
vip_dev0_dvdd = "axp81x_eldo1"
vip_dev0_dvdd_vol = 1500000
vip_dev0_afvdd =
vip_dev0_afvdd_vol =
vip_dev0_power_en =
vip_dev0_reset = port:PE16<1><default><default><default>
vip_dev0_pwdn = port:PD15<1><default><default><default>
vip_dev0_flash_en =
vip_dev0_flash_mode =
vip_dev0_af_pwdn =
vip_dev0_act_used = 1
vip_dev0_act_name = "vm149c_act"
vip_dev0_act_slave = 24


vip_dev1_mname           = "hi253"
vip_dev1_pos                 = "front"
vip_dev1_lane            = 1
vip_dev1_twi_id = 0
vip_dev1_twi_addr = 64
vip_dev1_isp_used        = 0
vip_dev1_fmt             = 0
vip_dev1_stby_mode       = 1
vip_dev1_vflip           = 0
vip_dev1_hflip           = 0
vip_dev1_iovdd           = 
vip_dev1_iovdd_vol       = 
vip_dev1_avdd            = "axp81x_dldo4"
vip_dev1_avdd_vol        = 2800000
vip_dev1_dvdd            = "axp81x_eldo3"
vip_dev1_dvdd_vol        = 1800000
vip_dev1_afvdd           = 
vip_dev1_afvdd_vol       = 
vip_dev1_power_en        =
vip_dev1_reset           = port:PE18<1><default><default><default>
vip_dev1_pwdn            = port:PE19<1><default><default><default>
vip_dev1_flash_en        =
vip_dev1_flash_mode      =
vip_dev1_af_pwdn         =



[wifi_para]
wifi_used             = 1
wifi_sdc_id           = 1
wifi_usbc_id          = 1
wifi_usbc_type        = 1
wl_reg_on             = port:PL02<1><default><default><0>
wl_host_wake          = port:PL03<4><default><default><0>
wl_host_wake_invert   = 0

;--------------------------------------------------------------------------------
;bluetooth configuration
;bt_used:       0- no used, 1- used
;bt_uard_id:		0- uart0, 1- uart1, 2- uart2
;bt_rst_n:      bt function enable io
;bt_wake:       host wake-up bluetooth device
;bt_wak_host:   bt device wake-up host 
;bt_host_wake_invert: whether bt_host_wake use inverter between ap and module
;                     0: not used, 1: used
;--------------------------------------------------------------------------------
[bt_para]
bt_used               = 1
bt_uart_id            = 1  
bt_rst_n              = port:PL04<1><default><default><0>
bt_wake               = port:PH09<1><default><default><0>
bt_host_wake          = port:PL05<4><default><default><0>
bt_host_wake_invert   = 0

;----------------------------------------------------------------------------------
;leds config parameters
;----------------------------------------------------------------------------------
[leds_para]
leds_used = 1
green_led = port:power0<1><default><default><0>
green_led_active_low =0
green_led_default_trigger = "heartbeat"
blue_led = port:power1<1><default><default><0>
blue_led_active_low = 0
blue_led_default_trigger = "none"

 

pull in the kernel driver for the display for compilation from here:S070WV20_MIPI_RGB.c

And make correct Device tree binary file(dtb),Uboot and drivers for kernel.

 I will award beer for the implemented solution 

Edited by kaneghost
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines