Jump to content

musitm

Validating
  • Posts

    1
  • Joined

  • Last visited

  1. [ 7.798092] [drm] Initialized ili9341 1.0.0 20180514 for spi1.0 on minor 1 I have an ili9341 lcd After loading, the kernel has been found SPI device. But the log ing screen can not seen. It is just waitng there How did you solve the problems My DT-overlay is shown below and I ma using beaglebone black /* * Copyright (C) 2013 CircuitCo * Copyright (C) 2018 Drew Fustini <drew@beagleboard.org> * Copyright (C) 2019 Mark A. Yoder <mark.a.yoder@beagleboard.org> * * Adafruit 2.4" TFT LCD on SPI1 bus using tinydrm ili9341 driver * * LICENSE: * -------- * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * DOCUMENTATION: * -------------- * This file was copied from src/arm/BB-SPIDEV1-00A0.dts and modified * by Drew Fustini based on an exmample from David Lechner. * Later modified by Mark A. Yoder for the 2.4" LCD. * * This is the Adafruit 2.4" TFT LCD: * https://www.adafruit.com/product/2478 * * It should be connected to BeagleBone SPI1 bus: * * P9.16 <--> lite (pwm) [OPTIONAL] * P9.23 <--> lite (gpio) [OPTIONAL] * P9.25 <--> reset * P9.27 <--> dc * P9.28 <--> tft_cs * P9.29 <--> miso * P9.30 <--> mosi * P9.31 <--> clk * * This overlay will load the mainline tinydrm ili9341 driver by David Lechner: * https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/tiny/ili9341.c * * Tested with 4.19.59-ti-r26 kernel on Debian 10.1 image * * Run libdrm modetest for colorbar test based on instructions from: * https://github.com/notro/tinydrm/wiki/Development#modetest * * modetest -M "ili9341" -c #this will display connector id * modetest -M "ili9341" -s 28:128x160 #connector id and resolution * # you should now see a color bar on the LCD * * Mailing list post with more information: * https://groups.google.com/d/msg/beagleboard/GuMQIP_XCW0/b3lxbx_8AwAJ * * Discussion with notro on how to test tinydrm driver: * https://github.com/notro/tinydrm/issues/1#issuecomment-367279037 */ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/pinctrl/am33xx.h> #include <dt-bindings/board/am335x-bbw-bbb-base.h> /dts-v1/; /plugin/; / { /* * Helper to show loaded overlays under: /proc/device-tree/chosen/overlays/ */ fragment@0 { target-path="/"; __overlay__ { chosen { overlays { BB-LCD-ADAFRUIT-24-SPI1-00A0 = __TIMESTAMP__; }; }; }; }; /* * Free up the pins used by the cape from the pinmux helpers. */ fragment@1 { target = <&ocp>; __overlay__ { P9_25_pinmux { status = "disabled"; }; /* lcd reset */ P9_16_pinmux { status = "disabled"; }; /* lcd pwm backlight (OPTIONAL) */ P9_27_pinmux { status = "disabled"; }; /* lcd dc */ // P9_23_pinmux { status = "disabled"; }; /* lcd gpio backlight (OPTIONAL) */ P9_28_pinmux { status = "disabled"; }; /* spi1_cs0 */ P9_29_pinmux { status = "disabled"; }; /* spi1_d0 */ P9_30_pinmux { status = "disabled"; }; /* spi1_d1 */ P9_31_pinmux { status = "disabled"; }; /* spi1_sclk */ }; }; fragment@2 { target = <&am33xx_pinmux>; __overlay__ { /* default state has all gpios released and mode set to uart1 */ /* See page 1446 of am35xx TRM */ bb_spi1_pins: pinmux_bb_spi1_pins { pinctrl-single,pins = < BONE_P9_31 0x33 /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */ BONE_P9_29 0x33 /* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */ BONE_P9_30 0x13 /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */ BONE_P9_28 0x13 /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */ BONE_P9_27 0x17 /* gpio, dc, OUTPUT_PULLUP | MODE07*/ BONE_P9_25 0x17 /* gpio, reset, OUTPUT_PULLUP | MODE07*/ // BONE_P9_42A 0x12 /* eCAP0_in_PWM0_out.spi1_cs1 OUTPUT_PULLUP | MODE2 */ >; }; backlight_pwm_pins: pinmux_backlight_pwm_pins { pinctrl-single,pins = < BONE_P9_16 0x06 /* gpmc_a2.ehrpwm1b, OMAP_MUX_MODE6 | AM33XX_PIN_OUTPUT */ >; }; /* gpmc_a2.ehrpwm1b */ }; }; fragment@3 { target = <&epwmss1>; __overlay__ { status = "okay"; }; }; fragment@4 { target = <&ehrpwm1>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&backlight_pwm_pins>; status = "okay"; }; }; fragment@5 { target-path = "/"; __overlay__ { bl_reg: backlight-regulator { compatible = "regulator-fixed"; regulator-name = "backlight"; regulator-always-on; regulator-boot-on; }; /* backlight is optional */ backlight_gpio: backlight_gpio { compatible = "gpio-backlight"; gpios = <&gpio1 17 0>; // connect lcd lite pin to P9.23 which is gpio1[17] // refer to https://elinux.org/Beagleboard:Cape_Expansion_Headers }; /* * Turn the PWM backlight on by setting bl_power to 0: * echo 0 > /sys/class/backlight/backlight_pwm/bl_power */ backlight_pwm: backlight_pwm { // P9.16 <--> lite (pwm-backlight EHRPWM1B) status = "okay"; compatible = "pwm-backlight"; pwms = <&ehrpwm1 1 500000 0>; // First digit: 0 for A side of pwm, 1 for B side // 500000 is the PWM period in ns // https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/pwm/pwm.txt 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 = <100>; power-supply = <&bl_reg>; }; }; }; fragment@6 { target = <&spi1>; __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&bb_spi1_pins>; display@0{ status = "okay"; compatible = "adafruit,yx240qv29", "ilitek,ili9341"; reg = <0>; spi-max-frequency = <32000000>; dc-gpios = <&gpio3 19 0>; // lcd dc P9.27 gpio3[19] reset-gpios = <&gpio3 21 1>; // lcd reset P9.25 gpio3[21] // backlight is optional // choose either pwm or gpio control //backlight = <&backlight_gpio>; // lcd lite P9.23 gpio1[17] backlight = <&backlight_pwm>; // lcd lite P9.16 gpmc_a2.ehrpwm1b // refer to https://elinux.org/Beagleboard:Cape_Expansion_Headers // rotation is optional rotation = <270>; }; }; }; };
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines