Part Number:AM3358Other Parts Discussed in Thread:TPS65217, OPA362, TPD12S015
SDK 版本:ti-processor-sdk-linux-rt-am335x-evm-07.03.00.005
硬件:beaglebone black BBVIEW+4.3寸屏幕(使用非设备树的老版本SDK测试功能完好)
参考bbview的dts,修改am335x-boneblackd.dts:
#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-boneblack-common.dtsi"
/ {
model = "TI AM335x BeagleBone Black";
compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
lcd_cape_pins: pinmux_lcd_cape_pins {
pinctrl-single,pins = <
0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */
0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */
>;
};
panel {
compatible = "tilcdc,panel";
pinctrl-names = "default";
pinctrl-0 = <&lcd_cape_pins>;
panel-info {
ac-bias = <255>;
ac-bias-intrpt = <0>;
dma-burst-sz = <16>;
bpp = <32>;
fdd = <0x80>;
tft-alt-mode = <0>;
stn-565-mode = <0>;
mono-8bit-mode = <0>;
sync-edge = <0>;
sync-ctrl = <1>;
raster-order = <0>;
fifo-th = <0>;
};
display-timings {
native-mode = <&timing0>;
timing0: 480×272 {
hactive = <480>;
vactive = <272>;
hback-porch = <44>;
hfront-porch = <9>;
hsync-len = <5>;
vback-porch = <13>;
vfront-porch = <4>;
vsync-len = <10>;
clock-frequency = <9000000>;
hsync-active = <0>;
vsync-active = <0>;
};
};
};
pwm_bl_pins: pinmux_pwm_bl_pins {
pinctrl-single,pins = <
0x48 0x06 /* gpmc_a2.ehrpwm1a, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */
>;
};
backlight {
compatible = "pwm-backlight";
pinctrl-names = "default";
pinctrl-0 = <&pwm_bl_pins>;
pwms = <&ehrpwm1 0 500000 0>;
pwm-names = "LCD4";
brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100>;
default-brightness-level = <101>; /* index to the array above */
status = "okay";
};
fb {
compatible = "ti,am33xx-tilcdc";
reg = <0x4830e000 0x1000>;
interrupt-parent = <&intc>;
interrupts = <36>;
ti,hwmods = "lcdc";
};
};
&cpu0_opp_table {
/*
* All PG 2.0 silicon may not support 1GHz but some of the early
* BeagleBone Blacks have PG 2.0 silicon which is guaranteed
* to support 1GHz OPP so enable it for PG 2.0 on this board.
*/
oppnitro-1000000000 {
opp-supported-hw = <0x06 0x0100>;
};
};
************************************************************************
更新SD卡中的设备树,进入Uboot命令行,可以发现新增了设备:
=> fdt addr 0x88000000=> fdt list/ { compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; interrupt-parent = <0x00000001>; #address-cells = <0x00000001>; #size-cells = <0x00000001>; model = "TI AM335x BeagleBone Black"; chosen { }; aliases { }; cpus { }; opp-table { }; pmu@4b000000 { }; soc { }; ocp { }; memory@80000000 { }; leds { }; fixedregulator0 { }; clk_mcasp0_fixed { }; clk_mcasp0 { }; sound { }; pinmux_lcd_cape_pins { }; panel { }; pinmux_pwm_bl_pins { }; backlight { };};=>
***************************************************************************************
内核启动后报以下错误:
0.317702] 000: omap_rng 48310000.rng: Random Number Generator ver. 20[ 0.320149] 000: OF: graph: no port node found in /fb[ 0.320438] 000: OF: graph: no port node found in /fb[ 0.320901] 000: OF: graph: no port node found in /fb[ 0.320918] 000: tilcdc 4830e000.fb: no encoders/connectors found[ 0.321160] 000: random: fast init done[ 0.321300] 000: random: crng init done[ 0.337603] 000: brd: module loaded[ 0.345666] 000: loop: module loaded[ 0.351010] 000: libphy: Fixed MDIO Bus: probed[ 0.408506] 000: davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus 0
[ 0.408527] 000: libphy: 4a101000.mdio: probed[ 0.410134] 000: davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:000
[ 0.410301] 000: cpsw 4a100000.ethernet: initialized cpsw ale version 1.4[ 0.410312] 000: cpsw 4a100000.ethernet: ALE Table size 1024[ 0.410414] 000: cpsw 4a100000.ethernet: cpts: overflow check period 500 (ji)
[ 0.410479] 000: cpsw 4a100000.ethernet: Detected MACID = a0:f6:fd:4a:fe:03[ 0.412479] 000: i2c /dev entries driver[ 0.414341] 000: sdhci: Secure Digital Host Controller Interface driver[ 0.414349] 000: sdhci: Copyright(c) Pierre Ossman[ 0.415574] 000: omap_gpio 44e07000.gpio: Could not set line 6 debounce to 2)
[ 0.415583] 000: omap_hsmmc 48060000.mmc: Got CD GPIO[ 0.467652] 000: omap_hsmmc 47810000.mmc: RX DMA channel request failed[ 0.467789] 000: sdhci-pltfm: SDHCI platform and OF driver helper[ 0.474300] 000: mmc0: host does not support reading read-only switch, assume
[ 0.476187] 000: mmc0: new high speed SDHC card at address 1234[ 0.476857] 000: davinci-mcasp 48038000.mcasp: IRQ common not found[ 0.477361] 000: mmcblk0: mmc0:1234 SA32G 28.9 GiB[ 0.481114] 000: NET: Registered protocol family 10[ 0.482184] 000: mmcblk0: p1 p2[ 0.484204] 000: Segment Routing with IPv6[ 0.484298] 000: sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver[ 0.484974] 000: NET: Registered protocol family 17[ 0.485349] 000: Key type dns_resolver registered[ 0.485482] 000: omap_voltage_late_init: Voltage driver support not added[ 0.486296] 000: Loading compiled-in X.509 certificates[ 0.568125] 000: tps65217 0-0024: TPS65217 ID 0xe version 1.2[ 0.569117] 000: tda998x 0-0070: Error -121 writing to cec:0xff[ 0.569180] 000: tda998x 0-0070: set_page 000a err -121[ 0.609981] 000: mmc1: new high speed MMC card at address 0001[ 0.618863] 000: mmcblk1: mmc1:0001 P1XXXX 7.20 GiB[ 0.619133] 000: mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB[ 0.619364] 000: mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB[ 0.619615] 000: mmcblk1rpmb: mmc1:0001 P1XXXX partition 3 128 KiB, chardev )
[ 0.621279] 000: mmcblk1: p1 p2[ 0.638577] 000: tda998x 0-0070: set_page 000a err -121[ 0.708530] 000: tda998x 0-0070: set_page 0001 err -121[ 0.708582] 000: tda998x 0-0070: set_page 0001 err -121[ 0.708632] 000: tda998x 0-0070: set_page 0200 err -121[ 0.708682] 000: tda998x 0-0070: set_page 0201 err -121[ 0.708732] 000: tda998x 0-0070: set_page 0202 err -121[ 0.708780] 000: tda998x 0-0070: set_page 0203 err -121[ 0.708829] 000: tda998x 0-0070: set_page 0204 err -121[ 0.708877] 000: tda998x 0-0070: set_page 0205 err -121[ 0.708926] 000: tda998x 0-0070: set_page 020e err -121[ 0.708974] 000: tda998x 0-0070: set_page 0211 err -121[ 0.709023] 000: tda998x 0-0070: set_page 0207 err -121[ 0.709071] 000: tda998x 0-0070: set_page 0208 err -121[ 0.709120] 000: tda998x 0-0070: set_page 0209 err -121[ 0.709169] 000: tda998x 0-0070: set_page 020a err -121[ 0.709217] 000: tda998x 0-0070: set_page 0206 err -121[ 0.709266] 000: tda998x 0-0070: set_page 0027 err -121[ 0.709314] 000: tda998x 0-0070: set_page 0000 err -121[ 0.709321] 000: tda998x 0-0070: failed to read version: -121[ 0.709401] 000: tda998x: probe of 0-0070 failed with error -121[ 0.709570] 000: omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz[ 0.719823] 000: omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz[ 0.722854] 000: OF: graph: no port node found in /fb[ 0.723145] 000: OF: graph: no port node found in /fb[ 0.723655] 000: OF: graph: no port node found in /fb[ 0.723676] 000: tilcdc 4830e000.fb: no encoders/connectors found[ 0.724675] 000: OF: graph: no port node found in /fb[ 0.724920] 000: OF: graph: no port node found in /fb[ 0.725321] 000: OF: graph: no port node found in /fb
********************************************************************************
正常进入系统,但LCD没有点亮,请问需要重新编译内核么?
fei xu:
顶一下
,
Shine:
请看一下下面的帖子是否有帮助。https://cospandesign.github.io/linux,am335x/2018/10/16/am335x-lcd-panel.html
,
fei xu:
22.755159] 000: OF: graph: no port node found in /ocp/interconnect@480000000[ 22.755381] 000: OF: graph: no port node found in /ocp/interconnect@480000000[ 22.755922] 000: OF: graph: no port node found in /ocp/interconnect@480000000[ 22.755946] 000: tilcdc 4830e000.lcdc: no encoders/connectors found [ 22.758443] 000: OF: graph: no port node found in /ocp/interconnect@480000000[ 22.758693] 000: OF: graph: no port node found in /ocp/interconnect@480000000[ 22.767731] 000: OF: graph: no port node found in /ocp/interconnect@480000000[ 22.767756] 000: tilcdc 4830e000.lcdc: no encoders/connectors found [ 22.833058] 000: musb-hdrc musb-hdrc.1: MUSB HDRC host driver
还会有这个问题,evm和bbb有什么区别么?
,
fei xu:
tilcdc 4830e000.lcdc: no encoders/connectors found
请问这个问题怎么解决?
,
Shine:
新的SDK使用DRM driver,老版本的使用的是 fbdev driver,请看下面的帖子是否有帮助。 https://e2echina.ti.com/support/processors/f/processors-forum/191405/beagleboneblack-lcd/589304#589304
,
fei xu:
这是我修改后的设备树:
#include "am33xx.dtsi"#include "am335x-bone-common.dtsi"#include "am335x-boneblack-common.dtsi"/ { model = "TI AM335x BeagleBone Black"; compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx"; panel { compatible = "tilcdc,panel"; pinctrl-names = "default"; pinctrl-0 = <&lcd_cape_pins>; backlight = <&lcd_backlight>; status = "okay"; panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; dma-burst-sz = <16>; bpp = <32>; fdd = <0x80>; tft-alt-mode = <0>; stn-565-mode = <0>; mono-8bit-mode = <0>; sync-edge = <0>; sync-ctrl = <1>; raster-order = <0>; fifo-th = <0>; }; display-timings { native-mode = <&timing0>; timing0: 480×272 { hactive = <480>; vactive = <272>; hback-porch = <44>; hfront-porch = <9>; hsync-len = <5>; vback-porch = <13>; vfront-porch = <4>; vsync-len = <10>; clock-frequency = <9000000>; hsync-active = <0>; vsync-active = <0>; }; }; }; lcd_backlight: backlight { status = "okay"; compatible = "gpio-backlight"; pinctrl-names = "default"; pinctrl-0 = <&backlight_pin>; gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>; enable-gpios = <&gpio1 18 1>; };};&am33xx_pinmux { lcd_cape_pins: pinmux_lcd_cape_pins { pinctrl-single,pins = < 0xa0 0x08 /* lcd_data0.lcd_data0, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xa4 0x08 /* lcd_data1.lcd_data1, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xa8 0x08 /* lcd_data2.lcd_data2, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xac 0x08 /* lcd_data3.lcd_data3, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xb0 0x08 /* lcd_data4.lcd_data4, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xb4 0x08 /* lcd_data5.lcd_data5, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xb8 0x08 /* lcd_data6.lcd_data6, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xbc 0x08 /* lcd_data7.lcd_data7, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xc0 0x08 /* lcd_data8.lcd_data8, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xc4 0x08 /* lcd_data9.lcd_data9, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xc8 0x08 /* lcd_data10.lcd_data10, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xcc 0x08 /* lcd_data11.lcd_data11, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xd0 0x08 /* lcd_data12.lcd_data12, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xd4 0x08 /* lcd_data13.lcd_data13, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xd8 0x08 /* lcd_data14.lcd_data14, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xdc 0x08 /* lcd_data15.lcd_data15, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT | AM33XX_PULL_DISA */ 0xe0 0x00 /* lcd_vsync.lcd_vsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ 0xe4 0x00 /* lcd_hsync.lcd_hsync, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ 0xe8 0x00 /* lcd_pclk.lcd_pclk, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ 0xec 0x00 /* lcd_ac_bias_en.lcd_ac_bias_en, OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT */ >; }; backlight_pin: backlight_pin_default { pinctrl-single,pins = < AM33XX_IOPAD(0x848, MUX_MODE7) /* (R7)gpmc_a2.gpio1[18] (BACKLIGHT PWM) */ >; };};&lcdc { status = "okay";};&cpu0_opp_table { /* * All PG 2.0 silicon may not support 1GHz but some of the early * BeagleBone Blacks have PG 2.0 silicon which is guaranteed * to support 1GHz OPP so enable it for PG 2.0 on this board. */ oppnitro-1000000000 { opp-supported-hw = <0x06 0x0100>; };};
内核编译选项:
## OMAPDRM External Display Device Drivers## CONFIG_DRM_OMAP_ENCODER_OPA362 is not setCONFIG_DRM_OMAP_ENCODER_TPD12S015=yCONFIG_DRM_OMAP_DRA7EVM_ENCODER_TPD12S015=yCONFIG_DRM_OMAP_CONNECTOR_HDMI=y# CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV is not set# CONFIG_DRM_OMAP_PANEL_DSI_CM is not set# end of OMAPDRM External Display Device DriversCONFIG_DRM_TILCDC=yCONFIG_DRM_QXL=y# CONFIG_DRM_BOCHS is not set# CONFIG_DRM_VIRTIO_GPU is not set# CONFIG_DRM_FSL_DCU is not setCONFIG_DRM_STM=yCONFIG_DRM_PANEL=y
感觉基本设置没有问题,内核加载时还是: tilcdc 4830e000.lcdc: no encoders/connectors found
我只是用bbb驱动一个RGB LCD,不用HDMI,应该怎么设置?
我看了sdk的 dt bingdings,LCDC 都是基于 HDMI的
,
fei xu:
我按照他的方法把tilcdc编译为module,启动后再加载,一样报错的
root@am335x-evm:/opt# insmod tilcdc.ko [ 91.841867] 000: OF: graph: no port node found in /ocp/interconnect@480000000[ 91.842090] 000: OF: graph: no port node found in /ocp/interconnect@480000000root@am335x-evm:/opt# [ 91.847144] 000: OF: graph: no port node found in /ocp0[ 91.847183] 000: tilcdc 4830e000.lcdc: no encoders/connectors found
,
fei xu:
一直报这个错:pwm-backlight backlight: backlight supply power not found, using dummy regulator
手动把LCD pwm拉高有显示了,不过没有显示matrix gui
可是打印信息有加载matrix gui:
Starting Synchronize System and HW clocks…[ OK ] Started Weston Wayland Compositor.[ OK ] Started weston.service. Starting Matrix GUI… Starting telnetd.service…[ OK ] Started Simple Network Man…ement Protocol (SNMP) Daemon..[ OK ] Started Matrix GUI.[ OK ] Started telnetd.service.[ OK ] Created slice User Slice of UID 0. Starting User Runtime Directory /run/user/0…[ OK ] Started User Runtime Directory /run/user/0. Starting User Manager for UID 0…[ OK ] Started Synchronize System and HW clocks.
,
fei xu:
顶一下
,
Shine:
建议到您到beagleboneboard社区论坛咨询一下。https://forum.beagleboard.org/