musicPi

Validating
  • Content Count

    11
  • Joined

  • Last visited

About musicPi

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello, I got I finally working. There are some changes to be done in the device tree to make sun4i-drm and lima work with LCD-Panels on BananaPi / BananaPro. Short version: create a panel in device tree and connect it to the correct driver. Here's what I did: 1. Start compilation with ./compile.sh CREATE_PATCHES=yes BOARD=bananapipro INSTALL_HEADERS=yes 2. If asked to apply changes modify u-boot-config: nano /build/cache/sources/v2020.04/configs/Bananapro_defconfig add #5" RGB LCD CONFIG_VIDEO_LCD_MODE="x:800,y:480,depth:24,pclk_khz:30000,le:40,ri:40,up:29,lo:13,hs:48,vs:3,sync:3,vmode:0" CONFIG_VIDEO_LCD_POWER="PH12" CONFIG_VIDEO_LCD_BL_EN="PH8" CONFIG_VIDEO_LCD_BL_PWM="PB2" 3. modify sun7i-a20 device tree nano build/cache/sources/v2020.04/arch/arm/dts/sun7i-a20.dtsi add the tcon0_out_lcd section to tcon0: tcon0: lcd-controller@1c0c000 { //..... ports { //..... tcon0_out: port@1 { #address-cells = <1>; #size-cells = <0>; reg = <1>; tcon0_out_lcd: endpoint@0 { reg = <0>; remote-endpoint = <&lcd_in_tcon0>; }; tcon0_out_hdmi: endpoint@1 { reg = <1>; remote-endpoint = <&hdmi_in_tcon0>; }; }; }; }; I don't know if it works for tcon1 too but feel free to try. Then add the same lines to tcon1 and replace each "tcon0" with "tcon1". Then add a panel section: panel: panel { #address-cells = <1>; #size-cells = <0>; port { #address-cells = <1>; #size-cells = <0>; lcd_in_tcon0: endpoint { remote-endpoint = <&tcon0_out_lcd>; }; }; }; If you also want to use tcon1 add lcd_in_tcon1 section . My Lemaker 5"LCD-Display uses RGB-Mode so this has to be added to pio section pio: pinctrl@1c20800 { compatible = "allwinner,sun7i-a20-pinctrl"; //..... lcd0_rgb888_pins: lcd0-rgb888 { pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PD16", "PD17", "PD18", "PD19", "PD20", "PD21", "PD22", "PD23", "PD24", "PD25", "PD26", "PD27"; function = "lcd0"; }; //..... }; 4. modify bananapro device tree nano build/cache/sources/v2020.04/arch/arm/dts/sun7i-a20-bananapro.dts Add backlight and power management for the panel #include <dt-bindings/pwm/pwm.h> / { model = "LeMaker Banana Pro"; compatible = "lemaker,bananapro", "allwinner,sun7i-a20"; //..... backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm 0 50000 0>; brightness-levels = < 0 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 5 5 5 6 6 6 7 7 8 8 8 9 9 9 10 10 10 11 11 12 12 12 13 13 14 14 14 15 15 16 16 17 17 17 18 18 19 19 20 20 21 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 30 30 31 31 32 32 33 33 34 35 35 36 36 37 38 38 39 39 40 41 41 42 43 43 44 44 45 46 47 47 48 49 49 50 51 51 52 53 54 54 55 56 57 57 58 59 60 61 61 62 63 64 65 65 66 67 68 69 70 71 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 101 102 103 104 105 106 108 109 110 111 112 114 115 116 117 119 120 121 123 124 125 127 128 129 131 132 133 135 136 138 139 141 142 144 145 147 148 150 151 153 154 156 157 159 161 162 164 166 167 169 171 173 174 176 178 180 181 183 185 187 189 191 192 194 196 198 200 202 204 206 208 210 212 214 216 219 221 223 225 227 229 232 234 236 238 241 242 244 246 248 250 253 255>; default-brightness-level = <128>; enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ }; panel_power: panel_power { compatible = "regulator-fixed"; regulator-name = "panel-power"; regulator-min-microvolt = <10400000>; regulator-max-microvolt = <10400000>; gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */ enable-active-high; regulator-boot-on; }; }; Configure tcon to use our panel and enable display engine &de { status = "okay"; }; &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd0_rgb888_pins>; status = "okay"; }; &panel { compatible = "lemaker,bl050-rgb-002"; power-supply = <&panel_power>; backlight = <&backlight>; }; Add touch driver for edt-ft5x06: &i2c3 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins>; edt: edt-ft5x06@38 { compatible = "edt,edt-ft5x06", "edt,edt-ft5306"; reg = <0x38>; interrupt-parent = <&pio>; interrupts = <7 9 IRQ_TYPE_EDGE_FALLING>; // wake-gpios = <7 7 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&edt_ft5x06_pins_a &edt_ft5x06_pins_b>; touchscreen-size-x = <800>; touchscreen-size-y = <480>; //touchscreen-inverted-x; //touchscreen-inverted-y; //touchscreen-swapped-x-y; }; }; Add edt_ft5x06 and backlight pins: &pio { edt_ft5x06_pins_a: ft5@0 { // interrupt pins = "PH9"; function = "irq"; drive-strength = <20>; bias-pull-up; }; edt_ft5x06_pins_b: ft5@1 { // reset-gpios pins = "PH7"; function = "gpio_out"; drive-strength = <20>; bias-pull-up; output-high; }; }; &pwm { pinctrl-names = "default"; pinctrl-0 = <&pwm0_pin>, <&pwm1_pin>; status = "okay"; }; Hit <Enter> If asked the nexttime to press enter: 5. Make sure your panel driver available in kernel drivers. Mine was not. So I had to add it to the simple panel driver which already contains the Lemeker 3,5"LCD-Display. nano build/cache/sources/linux-mainline/orange-pi-5.4/drivers/gpu/drm/panel/panel-simple.c add this right after lemaker_bl035_rgb_002 static const struct panel_desc lemaker_bl050_rgb_002 = { .modes = &lemaker_bl050_rgb_002_mode, .num_modes = 1, .size = { .width = 108, .height = 64, }, .bus_format = MEDIA_BUS_FMT_RGB888_1X24, .bus_flags = DRM_BUS_FLAG_DE_HIGH, }; static const struct drm_display_mode lg_lb070wv8_mode = { .clock = 33246, .hdisplay = 800, .hsync_start = 800 + 88, .hsync_end = 800 + 88 + 80, .htotal = 800 + 88 + 80 + 88, .vdisplay = 480, .vsync_start = 480 + 10, .vsync_end = 480 + 10 + 25, .vtotal = 480 + 10 + 25 + 10, .vrefresh = 60, }; and this right after lemaker,bl035-rgb-002 static const struct of_device_id platform_of_match[] = { { //..... }, { .compatible = "lemaker,bl050-rgb-002", .data = &lemaker_bl050_rgb_002, }, { //..... } } Do steps 3 and 4 to build/cache/sources/linux-mainline/orange-pi-5.4/arch/arm/boot/dts/sun7i-a20.dtsi and build/cache/sources/linux-mainline/orange-pi-5.4/arch/arm/boot/dts/sun7i-a20-bananapro.dts and hit <Enter> and proceed build Have a look at this page for other display configurations: http://linux-sunxi.org/LCD#Mainline_Linux_.28simple-panel.29 Thanks a lot to sgei and his tutorial! Many thanks to authors of another hunderd websites which also helped but I can't even list. Please let me know if this works for BananaPi too.
  2. Hello Werner, Thank you for your propt reply. The output of armbianmonitor -u has been located here: http://ix.io/2qTs The device tree has been changed according this description (last post): I changed the device tree to integrate the axp209 PMIC driver according to the configuration given in BananaPi's device tree and added SPDIF-Support. So please don't mind about messages which don't appear on usual BananaPro images. regards
  3. Hello, Im currently working on making lima run with an original 5"-LCD on BananaPro. My problem is to make it work with the sun4i-drm driver. At boot everything works fine and the display shows u-boot and kernel outputs but when the kernel starts the sun4i-drm driver the display freezes and turns white after some seconds. dmesg says: [ 11.178221] sun4i-drm display-engine: bound 1e00000.display-frontend (ops 0xc09986d4) [ 11.178361] sun4i-drm display-engine: bound 1e20000.display-frontend (ops 0xc09986d4) [ 11.178858] sun4i-drm display-engine: bound 1e60000.display-backend (ops sun4i_backend_ops [sun4i_backend]) [ 11.179226] sun4i-drm display-engine: bound 1e40000.display-backend (ops sun4i_backend_ops [sun4i_backend]) [ 11.179943] sun4i-drm display-engine: No panel or bridge found... RGB output disabled [ 11.179970] sun4i-drm display-engine: bound 1c0c000.lcd-controller (ops 0xc09973fc) [ 11.180653] sun4i-drm display-engine: No panel or bridge found... RGB output disabled [ 11.180675] sun4i-drm display-engine: bound 1c0d000.lcd-controller (ops 0xc09973fc) [ 11.195807] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok [ 11.204374] sun4i-drm display-engine: bound 1c16000.hdmi (ops sun4i_hdmi_driver_exit [sun4i_drm_hdmi]) [ 11.204391] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 11.204395] [drm] No driver support for vblank timestamp query. [ 11.204411] checking generic (7fe89000 177000) vs hw (0 ffffffff) [ 11.204422] fb0: switching to sun4i-drm-fb from simple [ 11.205292] Console: switching to colour dummy device 80x30 [ 11.206140] [drm] Initialized sun4i-drm 1.0.0 20150629 for display-engine on Lima was set up properly and works with HDMI output so far. What confuses me is the line where it says "No panel or bridge found... RGB output disabled". The 5"LCD is connected via RGB-Interface and has already been working less than a second before. So it seems the display has not been detected properly by the sun4i-drm module. Has anyone ever had a similar Problem? Any suggestions where to search for the problem's solution? regards
  4. I got lima working on BananaPro by adding following contents to build/cache/sources/u-boot/v20XX.XX/arch/arm/dts/sun7i-a20-bananapro.dts : Enable HDMI: Enable display engine: Change build/cache/sources/linux-mainline/orange-pi-5.XX/arch/arm/boot/dts/sun7i-a20-bananapro.dts accordingly. Then compile the mesa driver like this: nano /etc/apt/sources.list // uncomment #src apt update apt build-dep -y mesa apt install -y git g++ build-essential pkg-config apt install -y libx11-dev libgl1-mesa-dev apt install -y valgrind cmake libunwind-dev apt install -y libudev-dev // if you get meson version errors apt install -y python3-pip pip3 install --upgrade meson git clone https://gitlab.freedesktop.org/mesa/mesa.git cd mesa/ /usr/local/bin/meson build/ --optimization s --buildtype release --libdir=/usr/lib/arm-linux-gnueabihf -Dgallium-drivers=lima,panfrost,kmsro,swrast -Dplatforms=x11,drm,surfaceless ninja -C build/ ninja -C build/ install Now it's working (at least to run Kodi, but there ist still a great difference in power between this lima driver version and the mali driver provided at sunxi.org)! I don't know what changes are necessary to BananaPi but the Problems concerning SATA and AHCI seem to come from a different way of handling the PMIC. I saw similar dts-files with that specific PMIC axp209.dtsi-file. They got a AHCI-tag looking like this: Maybe the target-supply-line will do the thing. I'll ty later. Never the less i get problems when starting my original allwinner 5"-LCD using this tutorial: https://forum.armbian.com/topic/7233-bananapi-pro-7-touchlcd-with-debian-buster-and-mainline-kernel-5xxxx/ I changed the parameters from 7"-LCD to 5"-LCD and itis working very well without displayengine enabled. But when I enable it the screen freezes at boottime, right after saying "starting networkinterfaces". Has anyone ever had the same problem and can help me with that?
  5. lsmod shows sun4idrm and as far as i can say all devices needed are where they should be. On that base Lima can be run with basic functionality. It does not work like a charm (not all GL-Drives do work) but lima is able to run kodi.
  6. I just built the lastest armbian sources for BananaPi minimal, which is version Armbian_20.08.0-trunk_Bananapi_buster_current_5.4.44_minimal and startet ist on my BananaPro. After that I got mesa running doing this: ... and kodi on X11 started properly. Got into Kodi->Systeminformation. There it says lima driver is used. This failed on various BananaPro images before. The question is how to integrate that into a build script. Furthermore there seem to be some differences between the image configuration of BananaPi and BananaPro although the only differences are integrated WIFI-Device (Pro) and 40-Pin GPIO (Pro). Therefore there should be no differences between processorelated functionality. Differences known so far (each image tested on bananapro): AHCI does work properly on Pro but fails on Pi, sun4i-drm works on Pi but not on Pro I`m going to try some reverse engineering to find the differences in configuration.
  7. Finally got it to work building mesa on my own on a recent BananaPi image But it would be very cool if the sun4i-drm driver was fixed in BananaPro images. Can you please take care of that, Igor? I'll help you as far as I can and will provide further information from my test machine.
  8. On the BananaPi image startx says: Indeed /usr/lib/arm-linux-gnueabihf/dri/ contains various *_dri.so files but none called sun4i-drm. Any suggestions what to do?
  9. Thanks a lot for your replies! I still have the problem lima does not work properly. Module sun4i-drm, which is needed for lima, is avaliable via modprobe (at least ist gives no error message), but seems not to be loaded either. lsmod does not show it. I don't exactly know what is wrong but it seems there is a problem with the compiled driver. When I look into /lib/modules/5.4.44-sunxi/kernel/drivers/gpu/drm/sun4i/ there is just a file called sun6i_mipi_dsi.ko. What has sun6i todo with sun4i? The GPU is a different one (Power VR SGX 544 instead of Mali 400). The only thing I've found on my system is /sys/bus/platforms/drivers/sun4i-drm. There is no device bound to and no module connected. So I've build an image for bananapro myself, but it looks the same. For some reason I compiled an image for bananapi and surprisingly sun4i-drm has been loaded. I´m going to check if it works correctly... I'm interested in the differences between those two configurations and of course it would be very nice to apply this configuration also to the bananapro image!
  10. Hello guys, I've been playing around with the build-in lima drivers but didn't get it to work on BananaPro using Armbian_20.02.1_Bananapipro_buster_current_5.4.20_desktop image. I installed drivers armsoc, modesetting, fbdev from debian buster repos but "Xorg -configure" fails. /var/log/Xorg.0.log says: and and generated xorg.conf: Any suggestions what I am doing wrong? regards
  11. Hello there, I'm new to this Forum, so please I been trying to run Kodi as standalone music station with Buster minimal and Kodi 17 on it. This system boots very quick and I've been quite happy when I got kodi starting successfully, but it's very slow. It takes several seconds to switch from one menu item to the next. Next I tried to speed up the graphics using this instructions https://forum.armbian.com/topic/1420-opengl-on-mali-gpu-bananapi-orangepi-pc-etc/ http://wiki.lemaker.org/BananaPro/Pi:GPU But failed with xorg saying: /etc/X11/xorg.conf: There is no /dev/mali, /dev/ump or /dev/disp device available. Modules ump, mali, mali_drm are not loaded, but I saw lima drivers were active: I hope we can get this working either via mali or using lima driver. Thanks in advance für your help! regards