Jump to content

MartinKeppler

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by MartinKeppler

  1. After searching arround, I saw, that edt-ft5x06 wasn't compiled. First I added CONFIG_TOUCHSCREEN_EDT_FT5X06=m to Bananapi_defconfig. But that doesn't help. In Kconfig at /drivers/touchscreen/ I saw, that there must be a menu point in menuconfig. And there it is: menuconfig > Device Drivers > Input Device Support > Touchscreens > EDT FocalTech FT5x06 I2C Touchscreen support Set it to [*] (means compile as kernel modul) Now, at /sys/devices/platform/soc@01c00000 there is a node for the I²C3 1c2b800.i2c Thats a beginning. But touch still doesn't work.
  2. Little update: Found out, that driver modul edt-ft5x06 isn't compiled to my build of kernel. One reason why it doesn't work. $ modprope edt-ft5x06 Returns: modprobe: FATAL: Module edt-ft5x06 not found. How can I activate this driver in menuconfig of my kernel? Yours, Martin
  3. I've been testing a bit arround and find out, that my entries of DTS File aren't in the platform devicetree. I think it must be there in /sys/devices/platform/soc@01c00000 but there are only 1c2ac00.i2c and 1c2b400.i2c Any Ideas? I think there is a problem with the driver or something, so it's couldn't be loaded. Could it be, that is an option to be activated in Kernel config? Yours, Martin
  4. Hi, after getting the LCD - Display working, I now try to get touch working. In sun7i-a20-bananapi.dts, I added: &i2c3 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins_a>; edt: edt-ft5x06@38 { compatible = "edt,edt-ft5x06"; 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>; touchscreen-size-x = <800>; touchscreen-size-y = <480>; touchscreen-inverted-x; touchscreen-swapped-x-y; }; }; directly after &i2c2 { pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay"; }; also added: edt_ft5x06_pins: edt_ft5x06_pins@0 { allwinner,pins = "PH7", "PH9"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_40_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; after led_pins_bananapi: led_pins@0 { allwinner,pins = "PH24"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; But unfortunately, touch doesn't work. Any ideas, what went wrong? Maybe not the correct registers or something... Got this from a patch: https://github.com/igorpecovnik/lib/blob/master/patch/kernel/sunxi-next/bananapipro_lemaker_lcd.patch.disabled But patch is for Bananapi pro Hope to get some help.
  5. But now I got a last, single problem. Touch isn't working yet. Did some changes in DT. Now searching for solution. I made thread for this: http://forum.armbian.com/index.php/topic/1849-touch-driver-banana-pi/
  6. So, now I can tell you how to enable LCD in u-boot and DT. First getting the source of armbian from https://github.com/igorpecovnik/lib Open the file sources/u-boot/v2016.09/configs/Bananapi_defconfig and add: 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" Now LCD is enabled in u-boot. But it will not switch on backlight, because backlight uses pwm and pwm is disabled per default in DT. So you also have to add: &pwm { pinctrl-names = "default"; pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>; status = "okay"; }; Ready! But be aware, LCD only turns on if there is no HDMI Monitor plugged in!! Ok, hopping some one else of you can use this stuff.
  7. Okay Guys, I've got a little success. My display is on now. I think the worst thing I could do, was to let HDMI plugged in and HDMI monitor switched on. Only by luck, I saw, that my display is working when HDMI monitor is switched of. Now, I will search for the correct solution and post it here soon. Yours Martin
  8. Ok got some news: Added following to sun7i-a20.dtsi framebuffer0: framebuffer@1d385000 { compatible = "simple-framebuffer"; reg = <0x1d385000 (800 * 480 * 2)>; width = <800>; height = <4800>; stride = <(800 * 2)>; format = "r5g6b5"; clocks = <&ahb_gates 36>, <&ahb_gates 43>, <&ahb_gates 44>; lcd-supply = <&reg_dc1sw>; display = <&lcdc0>; }; stdout-path = "display0"; Changed the last lines in sun7i-a20.dtsi because of compiling errors to: //Set LCD as a master device framebuffer { compatible = "allwinner,framebuffer"; def_display = "lcd"; }; /*lvds_state_default: lvds_default { lvds_mux { allwinner,groups = "mfp1_6_5", "mfp2_28_27"; allwinner,function = "lvds"; }; lcd_mux { allwinner,groups = "mfp1_22_21"; allwinner,function = "lcd0"; };*/ rgb_state_default: rgb_default { rgb_mux { allwinner,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", "PD26", "PD27", "PD27"; allwinner,function = "lcd0"; }; }; And also changed the pinctrl value in sun7i-a20.dtsi for lcd0 and added a compatible line: lcd0: lcd0@01c0c000 { compatible = "allwinner,sun4i-a10-lcdc"; pinctrl-names = "default"; pinctrl-0 = <&rgb_state_default>; I thought "actions" could not be the correct label, because all other functions in device tree of a20 are called allwinner,... Also find out that the groups does not exist for a20. Didn't find groups witch match. Maybe anybody knows where I can find out or add this groups. Must be a header file. So I changed "groups" to "pins" and added all pins from a20's port D witch represents the lcd0. But what should I say ... display is still dark. I got sneaking suspicion, that still isn't activate in u-boot. I'm not sure, if the additions to my Bananapi_defconfig from http://forum.armbian.com/index.php/topic/1905-enabling-lcd-in-u-boot-kernel-472/?p=14676 arereally compiled into the u-boot. I'm thinking that hdmi has to stay black, if my configs are correct. Am I right? Is there a way to check the config, of u-boot at runtime?
  9. I'm getting deeper and deeper into the topic. But it still doesn't work. At http://wiki.lemaker.org/LeMaker_Guitar:LCD I saw an exampel of activiating LCD on the LeMakers Guitar: I changed a few things and added this to my dtsi files. lcd0: lcd0@01c0c000 { /* org: lcd0: lcd0@b02a0000 { 0x01c0c000 from a20 allwinner manual*/ pinctrl-names = "default"; pinctrl-0 = <&lvds_state_default>; lcd_power_gpios = <&gpio 7 12 0> /*PH12" /*<&gpio 36 0>;*/ /*GPIOB4*/ //lcd_reset_gpios = <&gpio 49 0>; /*GPIOB17*/ port_type = "lvds"; data_width = <0>; /* 0:24bit ,1:18bit */ videomode-0 = <&lcd_mode0>; vsync_inversion = <0>; hsync_inversion = <0>; dclk_inversion = <0>; lde_inversion = <0>; lvds_ctl = <0x000a9523>; /* last two bit: 3:8bit ,1:6bit */ lvds_alg_ctl0 = <0xc141a030>; lightness = <128>; saturation = <7>; contrast = <5>; lcd_mode0:mode@800x600p60 {/*1280x800p60 {*/ refresh = <60>; xres = <800>; /*1280*/ yres = <480>; /*480*/ pixclock = <14090>; left_margin = <80>; right_margin = <60>; upper_margin = <8>; lower_margin = <7>; hsync_len = <20>; vsync_len = <8>; vmode = <0>; }; }; //Set LCD as a master device framebuffer { compatible = "actions,framebuffer"; def_display = "lcd"; }; //Set HDMI display as a master device /* framebuffer { compatible = "actions,framebuffer"; def_display = "hdmi"; xres = <1280>; yres = <720>; bpp = <4>; }; */ First build throws an error because &lvds_state_default was unknown. So I seachrched arround and did find the original file https://github.com/LeMaker/linux-actions/blob/linux-3.10.y/arch/arm/boot/dts/lemaker_guitar_bbb.dts I added lvds_state_default to my dtsi files. But build now throws a new error. I think it could be because of the "actions" and the names "mfp1_6_5" and so on. For a20 I saw at compatible and such things "allwinner,arm-cortex-a7" and so on. lvds_state_default: lvds_default { lvds_mux { actions,groups = "mfp1_6_5", "mfp2_28_27"; actions,function = "lvds"; }; lcd_mux { actions,groups = "mfp1_22_21"; actions,function = "lcd0"; }; }; rgb_state_default: rgb_default { rgb_mux { actions,groups = "mfp0_25_23","mfp1_16_14", "mfp1_22_21", "mfp1_13_12", "mfp1_11_10", "mfp1_6_5", "mfp2_30_29", "mfp2_28_27"; actions,function = "lcd0"; }; }; Any hints how to name it correct? Is there any documentation, where I can find the correct names?
  10. The same thought as me. Must be missing something. Isn't it necessary to map the pins for the Display like in FEX as shown below? Is there a syntax for DT to do this? [lcd0_para] . . . . lcd_bl_en = port:PH08<1><0><default><1> lcd_power_used = 1 lcd_power = port:PH12<1><0><default><1> lcd_pwm_used = 1 lcd_pwm = port:PB02<2><0><default><default> lcdd0 = port:PD00<2><0><3><default> lcdd1 = port:PD01<2><0><3><default> lcdd2 = port:PD02<2><0><3><default> lcdd3 = port:PD03<2><0><3><default> lcdd4 = port:PD04<2><0><3><default> lcdd5 = port:PD05<2><0><3><default> lcdd6 = port:PD06<2><0><3><default> lcdd7 = port:PD07<2><0><3><default> lcdd8 = port:PD08<2><0><3><default> lcdd9 = port:PD09<2><0><3><default> lcdd10 = port:PD10<2><0><3><default> lcdd11 = port:PD11<2><0><3><default> lcdd12 = port:PD12<2><0><3><default> lcdd13 = port:PD13<2><0><3><default> lcdd14 = port:PD14<2><0><3><default> lcdd15 = port:PD15<2><0><3><default> lcdd16 = port:PD16<2><0><3><default> lcdd17 = port:PD17<2><0><3><default> lcdd18 = port:PD18<2><0><3><default> lcdd19 = port:PD19<2><0><3><default> lcdd20 = port:PD20<2><0><3><default> lcdd21 = port:PD21<2><0><3><default> lcdd22 = port:PD22<2><0><3><default> lcdd23 = port:PD23<2><0><3><default> lcdclk = port:PD24<2><0><3><default> lcdde = port:PD25<2><0><3><default> lcdhsync = port:PD26<2><0><3><default> lcdvsync = port:PD27<2><0><3><default> I saw a file at /sources/u-boot/v2016.07/drivers/video called sunxi_display.c. There are some specific defines like SSD2828. ifdef CONFIG_VIDEO_LCD_SSD2828 static int sunxi_ssd2828_init(const struct ctfb_res_modes *mode) { struct ssd2828_config cfg = { .csx_pin = name_to_gpio(CONFIG_VIDEO_LCD_SPI_CS), .sck_pin = name_to_gpio(CONFIG_VIDEO_LCD_SPI_SCLK), .sdi_pin = name_to_gpio(CONFIG_VIDEO_LCD_SPI_MOSI), .sdo_pin = name_to_gpio(CONFIG_VIDEO_LCD_SPI_MISO), .reset_pin = name_to_gpio(CONFIG_VIDEO_LCD_SSD2828_RESET), .ssd2828_tx_clk_khz = CONFIG_VIDEO_LCD_SSD2828_TX_CLK * 1000, .ssd2828_color_depth = 24, #ifdef CONFIG_VIDEO_LCD_PANEL_MIPI_4_LANE_513_MBPS_VIA_SSD2828 .mipi_dsi_number_of_data_lanes = 4, .mipi_dsi_bitrate_per_data_lane_mbps = 513, .mipi_dsi_delay_after_exit_sleep_mode_ms = 100, .mipi_dsi_delay_after_set_display_on_ms = 200 #else #error MIPI LCD panel needs configuration parameters #endif }; I'm hoping not have to change a driver to make my display work.
  11. At http://docs.armbian.com/Developer-Guide_Build-Options/I saw, that there are two variables EXTERNAL and EXTERNAL_NEW. EXTERNAL compiles some extra applications like sunxi display control. EXTERNAL_NEW does compiles extra applications in to chroot. I now set both to "yes" in compile.sh. But still got no picture on my lcd.
  12. Ok, I downloaded the armbian source with all build tools from https://github.com/igorpecovnik/lib as described at http://docs.armbian.com/Developer-Guide_Build-Preparation/ I changed the file /sources/u-boot/v2016.07/configs/Bananapi_defconfig. Here I added: 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" Left the rest of file as it was. I also changed /sources/u-boot-v2016.07/arch/arm/dts/sun7i-a20-bananapi.dts At the end of &pio node, I added: edt_ft5x06_pins: edt_ft5x06_pins@0 { allwinner,pins = "PH7", "PH9"; allwinner,function = "gpio_out"; allwinner,drive = <SUN4I_PINCTRL_40_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; }; And for touchdriver: &i2c3 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&i2c3_pins_a>; edt: edt-ft5x06@38 { compatible = "edt,edt-ft5x06"; 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>; touchscreen-size-x = <1024>; touchscreen-size-y = <600>; touchscreen-inverted-x; touchscreen-swapped-x-y; }; }; After &i2c2. PWM. &pwm { pinctrl-names = "default"; pinctrl-0 = <&pwm0_pins_a>, <&pwm1_pins_a>; status = "okay"; }; for backlight PWM after the &pio node. In /sources/u-boot-v2016.07/arch/arm/dts/sun7i-a20.dtsi I activated simpleframebuffer "framebuffer@1": framebuffer@1 { compatible = "allwinner,simple-framebuffer", "simple-framebuffer"; allwinner,pipeline = "de_be0-lcd0"; clocks = <&ahb_gates 36>, <&ahb_gates 44>, <&de_be0_clk>, <&tcon0_ch0_clk>, <&dram_gates 26>; status = "enabled"; }; Built the armbian, made an image, wrote it to SD and let it run. Still HDMI is on, LCD stays dark. Any Ideas?
  13. Hi, since Igor told me to enable LCD in u-boot I was searching for a solution. In the menuconfig of Kernel 3.4 ... 3.14 I saw Device Drivers > Graphics Support > Enable driver model support for LCD/video ... Now in menuconfig of armbian with Kernel 4.7.2 I can't see this option. I see attach screenshot. Has anyone an idea how to enable LCD? I'm using LeMaker 5" LCD with CP - Touch. My board is Banana Pi with Allwinner a20.
  14. Final question to this topic. Enabling LCD in u-boot, means to change the dts or to change the config and rebuild the u-boot?
  15. Guys, many thanks to you! PWM now is working again. Martin
  16. Thanks Igor. I'm watching. I think, I got much to read and learn now.
  17. Ok, I'm searching. Is there a difference between enabling LCD in u-boot and in script.bin? I was using the modifications from banana_pi_5lcd.fex to generate a new script.bin. But the LCD doesn't turn on. I'm still on HDMI.
  18. Good Morning, I'm using the 5" LCD of LeMaker designed for Banana Pi. For some reason I changed from legacy Kernel to vanilla kernel. But now in the vanilla kernel touch screen driver isn't available anymore. In legacy kernel it the ft5x_ts module. Is there an other way to make my Display working with touch again? Displays: http://wiki.lemaker.org/BananaPro/Pi:LCD_Module Martin
  19. He, thats good to know. Thanks for preventing me from new troubles!
  20. Hi, thanks a lot. It worked. Now with echo 0 > /sys/class/pwm/pwmchip0/export I got a pwm0 with duty_cycle, enable, periode, polarity, power and uevent. Your really great!!!! I'm so happy!!!!
  21. Ok, after adding the section into source, do I have it to compile with the dtc? Could you tell me where I can get the source, please. The sun7i-a20-bananapi.dts is not on my board neither any other.
  22. Hi Thomas, did it with your code snippet. I gues the pinctrl-0 musst be the GPIO - number or the address of the PWM - Pin. So I need the pin PB02 --> GPIO34 --> 0x22. Is that correct? I tried with 0x35 0x36 and also with 0x22. Don't get any content in /sys/class/pwm. Is there more to do? Martin
  23. Hi Folks, I installed armbian Jessie with Desktop and Kernel 4.6.3 on my Banana Pi. I'm glad to see, that most of modules I need are installed and working properly. Good job, thanks! But there is one little problem I've got with the kernel. I need pwm (Pin PB2) to control the backlight of my LCD. With Bananian I used sunxi-pwm modul. Worked fine, but isn't installed in the kernel 4.6.3. I know there are ways to build it into the kernel. But befor I'll build an own kernel, I'm hoping of an other way to make pwm for backlight working again. I saw an pwm folder at /sys/class/pwm and also pwm-sun4i modul can be loaded. Unfortunately /sys/class/pwm is empty and stays empty even when I load pwm-sun4i. In the devicetree I can see a pwm device: /sys/firmware/devicetree/base/soc@01c00000/pwm@01c20e00. Has anyone an Idea how I can pwm make working with this System? Yours Martin
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines