@whycan 可以了,谢谢
ceoifung 发布的帖子
-
虚拟机编译A133的longan源码失败,报 or32-elf-gcc找不到的错误
我自己搭了个ubuntu18.04的虚拟机,打算编译A133的Longan源码,然后报了如下的错误
INFO: build arisc make: Entering directory '/home/ceoifung/workspace/a133/longan/brandy/arisc' arisc defconfig: generate ar100s/.config by sun50iw10p1_axp803_defconfig # # configuration written to .config # CHK include/generated/conf.h CC driver/intc/intc.o /bin/sh: 1: or32-elf-gcc: not found mv: cannot stat 'driver/intc/.intc.o.tmp': No such file or directory scripts/Makefile.build:103: recipe for target 'driver/intc/intc.o' failed make[3]: *** [driver/intc/intc.o] Error 1 scripts/Makefile.build:146: recipe for target 'intc' failed make[2]: *** [intc] Error 2 Makefile:91: recipe for target 'driver/obj-in.o' failed make[1]: *** [driver/obj-in.o] Error 2 Makefile:9: recipe for target 'all' failed make: *** [all] Error 2 make: Leaving directory '/home/ceoifung/workspace/a133/longan/brandy/arisc' INFO: mkarisc failed
他报错说找不到
or32-elf-gcc
,但是我在当前的源码目录搜了一下,是有这个工具链的,但是为什么会报错呢?ceoifung@ceoifung:~/workspace/a133/longan$ find ./ -name or32-elf-gcc ./brandy/arisc/coco/coco/tools/arch_toolchain/openrisc_toolchain/bin/or32-elf-gcc ./brandy/arisc/ar100s/tools/toolchain/bin/or32-elf-gcc
我是还要什么环境变量没有设置吗?我看了编译的Makefile这都是动态获取的呀,并没有相关的配置要求,求解答
-
回复: A133 board.dts中触摸IC中twi配置i2c地址的问题
@chengwei_peng 触摸驱动需要在设备树上面注册reset-gpios,查看了一下Linux设备树的reset-gpios的参数,有三个,我看一般的写法是
reset-gpios = <&pioD 22 GPIO_ACTIVE_LOW>;
但是我看了pin-ctrl.dtsi,并没有&pioD这样的写法,都是
&pio PD 22
这样的写法,如果我要设置PD22为reset引脚,我这样写可以吗reset-gpios = <&pio PD 22 GPIO_ACTIVE_LOW>;
-
回复: A133适配AMOLED屏幕,LCD时序参数过小导致无法进入U-Boot
@anruliu 请问一下:屏厂给的参数就是这样的,对方FAE说这个参数可能不适用于所有的平台,需要芯片厂家推荐一个合适的值,下面是厂商给的部分参数,A133这个平台LCD的时序与这个屏幕怎么个调整比较合适呢?大佬有什么解决方法吗?
建议值:HSW=32,HBP=20,HFP=2, VSW=4,VBP=12,VFP=12 分辨率:720*800 Frame rate:60HZ
-
回复: A133 board.dts中触摸IC中twi配置i2c地址的问题
@chengwei_peng 我看到A133默认支持了FTX5x系列驱动的支持,我的驱动芯片属于atm_mxt_ts的,移植的时候,也是在这里配置是吧,只不过是一些ctp的配置没有我删减掉就好了是吗
-
A133 board.dts中触摸IC中twi配置i2c地址的问题
A133芯片移植触摸驱动芯片,有个twi配置
ctp { compatible = "allwinner,gt9xxnew_ts"; reg = <0x5d>; device_type = "ctp"; status = "okay"; ctp_name = "gt9xxnew_ts"; ctp_twi_id = <0x1>; ctp_twi_addr = <0x40>; ctp_screen_max_x = <720>; ctp_screen_max_y = <1280>; ctp_revert_x_flag = <0>; ctp_revert_y_flag = <0>; ctp_exchange_x_y_flag = <0x0>; ctp_int_port = <&pio PH 19 6 0xffffffff 0xffffffff 0>; ctp_wakeup = <&pio PD 22 1 0xffffffff 0xffffffff 1>; ctp-supply; ctp_power_ldo_vol = <3300>; };
里面的
reg
和ctp_twi_addr
是代表什么意思呀,我的触摸驱动IC的i2c地址应该填在reg
还是ctp_twi_addr
呀 -
回复: A133适配AMOLED屏幕,LCD时序参数过小导致无法进入U-Boot
lcd0: lcd0@01c0c000 { lcd_used = <1>; lcd_driver_name = "xiaor_amoled"; lcd_backlight = <255>; lcd_if = <4>; lcd_x = <600>; lcd_y = <800>; lcd_width = <190>; lcd_height = <254>; lcd_dclk_freq = <55>; lcd_pwm_used = <0>; lcd_pwm_ch = <0>; lcd_pwm_freq = <5000>; lcd_pwm_pol = <1>; lcd_pwm_max_limit = <250>; lcd_hbp = <52>; lcd_ht = <654>; lcd_hspw = <32>; lcd_vbp = <16>; lcd_vt = <828>; lcd_vspw = <4>; lcd_frm = <0>; lcd_io_phase = <0>; lcd_gamma_en = <0>; lcd_bright_curve_en = <0>; lcd_cmap_en = <0>; deu_mode = <0>; lcdgamma4iep = <22>; smart_color = <90>; lcd_dsi_if = <0>; lcd_dsi_lane = <4>; lcd_dsi_format = <0>; lcd_dsi_te = <0>; lcd_dsi_eotp = <0>; lcd_pin_power = "eldo1"; lcd_power = "dc1sw"; //lcd_bl_en = <&pio PG 9 1 0 3 1>; lcd_gpio_0 = <&pio PB 6 1 1 3 1>; lcd_gpio_1 = <&pio PB 2 1 1 3 1>; lcd_gpio_2 = <&pio PD 20 1 1 3 1>; pinctrl-0 = <&dsi4lane_pins_a>; pinctrl-1 = <&dsi4lane_pins_b>; };
-
回复: A133适配AMOLED屏幕,LCD时序参数过小导致无法进入U-Boot
@anruliu 我这边重新计算了以下相关的值,还是进不去u-boot,我的屏幕13.3寸,这个和屏幕大小尺寸会有关系吗?以下是开机后,打印的内容
[SCP] :sunxi-arisc driver begin startup 2 [SCP] :0x1 [SCP] :arisc version: [] [SCP] :arisc startup ready [SCP] :arisc startup notify message feedback [SCP] :send hard sync feedback message: 0x900200 [SCP] :sunxi-arisc driver v1.10 is starting [00.616]PMU: AXP803 [00.618]PMU: AXP803 bias_name:pc_bias bias_vol:1800 [00.688]CPU=1008 MHz,PLL6=600 Mhz,AHB=200 Mhz, APB1=100Mhz MBus=400Mhz [00.695]drv_disp_init [00.720]drv_disp_init finish [00.726]gic: sec monitor mode [00.728]flash init start [00.730]workmode = 0,storage type = 2 [00.734][mmc]: mmc driver ver uboot2018:2020-5-25 9:26:00-202007011433 [00.741][mmc]: get sdc_type fail and use default host:tm4. [00.753][mmc]: SUNXI SDMMC Controller Version:0x50300 [00.781][mmc]: Best spd md: 4-HS400, freq: 3-100000000, Bus width: 8 [00.787]sunxi flash init ok [00.791]Loading Environment from SUNXI_FLASH... OK [00.800]out of usb burn from boot: not need burn key [00.804]boot_gui_init:start [00.809]set disp.dev2_output_type fail. using defval=0
串口输出到
[00.809]set disp.dev2_output_type fail. using defval=0
就没有内容了,然后测试发现初始化完LCD_cfg_panel_info
这个函数之后,进不去LCD_power_on
这个函数 -
A133适配AMOLED屏幕,LCD时序参数过小导致无法进入U-Boot
目前有一个LCD驱动,里面的LCD时序参数是:
lcd_hbp = <40>; lcd_ht = <820>; lcd_hspw = <20>; lcd_vbp = <16>; lcd_vt = <1320>; lcd_vspw = <8>;
然后能正常进入U-Boot,但是新屏幕,我修改了如下参数:
lcd_hbp = <20>; lcd_ht = <654>; lcd_hspw = <32>; lcd_vbp = <12>; lcd_vt = <828>; lcd_vspw = <4>;
然后就发现U-Boot进不去了,然后我适当增大了
lcd_hbp
、lcd_vbp
的值,然后就能进入U-Boot了,修改后的参数是:lcd_hbp = <40>; lcd_ht = <684>; lcd_hspw = <32>; lcd_vbp = <16>; lcd_vt = <888>; lcd_vspw = <4>;
所以我现在的疑问是LCD时序参数里面
lcd_hbp
与lcd_vbp
是不是有一个最小值限制呀?另外屏厂给的推荐参数就是那个不能进入U-Boot的参数值,适当增大之后对屏幕驱动是不是有相关影响呀?求各位大佬帮帮忙 -
回复: A133芯片u-boot无法调用gpio_request接口
@ceoifung @WhycanService 找到问题了,原来是改完之后,调试发现,程序进不去u-boot界面 所以也就没有办法进入LCD初始化那里,拉高相关的电平了
-
回复: A133芯片u-boot无法调用gpio_request接口
@whycanservice 请问大佬,我这边按照你的方法设置了如下内容
lcd_gpio_0 = <&pio PB 6 1 1 1 0>; lcd_gpio_1 = <&pio PB 2 1 1 1 0>; lcd_gpio_2 = <&pio PD 20 1 1 1 0>;
当我在我在设备树里面设置最后以为为1的时候,能检测到IO口已经被拉高了,但是我在代码中使用设置电平的函数直接拉高,就监测不到电平变化,这是为什么呢?
sunxi_lcd_gpio_set_value(0, 1, 1);
-
回复: A133芯片u-boot无法调用gpio_request接口
@whycanservice 我知道他封装了,我想在代码中控制某个IO口的拉高或者拉低,但是LCD屏幕的封装的是固定的IO口,我想单独控制其他的IO口。我看到屏幕驱动里面,有个函数是:
#define panel_reset(val) sunxi_lcd_gpio_set_value(sel, 1, val) #define power_en(val) sunxi_lcd_gpio_set_value(sel, 0, val)
中间参数的1和0是代表boart.dts里面的lcd_gpio_x还是pinctrl呀?
lcd_gpio_0 = <&pio PB 6 1 0 3 1>; pinctrl-0 = <&dsi4lane_pins_a>; pinctrl-1 = <&dsi4lane_pins_b>;
-
A133芯片u-boot无法调用gpio_request接口
我在A133的kernel的LCD驱动代码里面调用如下代码:
#define LCD_SWIRE_IO 116 gpio_request(LCD_SWIRE_IO, "distance"); gpio_direction_output(LCD_SWIRE_IO, 0); __gpio_set_value(LCD_SWIRE_IO, 1);
build的时候,是没有问题的。但是在u-boot-2018里面的驱动代码里面添加同样的内容,就报了如下错误:
drivers/video/sunxi/disp2/disp/lcd/bj_050_720x1280.c:386:5: error: implicit declaration of function ‘gpio_request’; did you mean ‘pwm_request’? [-Werror=implicit-function-declaration] gpio_request(LCD_SWIRE_IO, "distance"); ^~~~~~~~~~~~ pwm_request drivers/video/sunxi/disp2/disp/lcd/bj_050_720x1280.c:387:2: error: implicit declaration of function ‘gpio_direction_output’ [-Werror=implicit-function-declaration] gpio_direction_output(LCD_SWIRE_IO, 0); ^~~~~~~~~~~~~~~~~~~~~ drivers/video/sunxi/disp2/disp/lcd/bj_050_720x1280.c:388:2: error: implicit declaration of function ‘__gpio_set_value’; did you mean ‘disp_sys_gpio_set_value’? [-Werror=implicit-function-declaration] __gpio_set_value(LCD_SWIRE_IO, 1); ^~~~~~~~~~~~~~~~ disp_sys_gpio_set_value CC lib/display_options.o
这到底是是什么原因导致的,求各位大大遇到过的帮忙解答以下