This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3354: LCD backlight control issue

Part Number: AM3354

Tool/software: Linux

Hi All,

Problem-1:

When ever I am trying to turn off backlight LED using below command it's brightness level is high. 

$ echo 0 > /sys/class/backlight/backlight/brightness

I checked with pulse (Oscilloscope) it is active high. I need to make it as active low (Full LED OFF).

My DTS Config is shown below:

lcd_bl: backlight {
            compatible = "pwm-backlight";
            pwms = <&ecap0 0 5000000 0>;
            brightness-levels = <0 32 64 96 128 160 192 224 255>;
            default-brightness-level = <7>;
};

panel {
         compatible = "ti,tilcdc,panel";
         status = "okay";
         pinctrl-names = "default";
         pinctrl-0 = <&lcd_pins_s0>;
         backlight = <&lcd_bl>;
         panel-info {
                ac-bias = <255>;
                ac-bias-intrpt = <0>;
                dma-burst-sz = <16>;
                bpp = <24>;
                fdd = <0x80>;
                sync-edge = <0>;
                sync-ctrl = <1>;
                raster-order = <0>;
                fifo-th = <0>;
        };

};
ecap0_pins: backlight_pins {
             pinctrl-single,pins = <
                                  0x164 ( PIN_OUTPUT | MUX_MODE0 )
                                   /*AM33XX_IOPAD(0x964, MUX_MODE0)*/ /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out */
              >;
};
&epwmss0 {
           status = "okay";

           ecap0: ecap@48300100 {
                               status = "okay";
                               pinctrl-names = "default";
                               pinctrl-0 = <&ecap0_pins>;
            };
};

Used guide Link:

http://processors.wiki.ti.com/index.php/Sitara_Linux_LCDC_Porting_Guide

Problem-2:

I Tried to enable PWM manually by unbinding backlight driver using below commands.

Working steps: To Turn Off Backlight completly

echo out > /sys/class/gpio/gpio60/direction

echo backlight > /sys/bus/platform/drivers/pwm-backlight/unbind

echo 0 > /sys/class/pwm/pwmchip0/export

echo 1000000000 > /sys/class/pwm/pwmchip0/pwm0/period

echo 0 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle

echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable      ----> (LED IS TURNED OFF COMPLETLY)

 

Working steps: To Turn On Backlight

echo 0 > /sys/class/pwm/pwmchip0/pwm0/enable

echo 0 > /sys/class/pwm/pwmchip0/unexport

echo backlight > /sys/bus/platform/drivers/pwm-backlight/bind

echo in > /sys/class/gpio/gpio60/direction                       ----> (LED IS TURNED ON )


NOW IF WE CONTROL THE BRIGHTNESS USING BELOW COMMAND IT IS NOT WORKING...


echo 3 > /sys/class/backlight/backlight/brightness

Please help me to solve this issue.

Thanks in advance!

  • Hi Biser,

    Yes I am using the same user guide lines for controlling the brightness of back light.

    The issue is I'm not able to turn of the LED completely even I gave 0% brightness using below command.

    $ echo 0 > /sys/class/backlight/backlight/brightness

    I checked with pulse (Oscilloscope) it is active high. I need to make it as active low (Full LED OFF).

    Thanks for response!

     

  • Hello Thejeswarareddy,

    Change the pinmuxing to 0x164 0x0. Also, please mark the right answers as verified when they fixes your issue.

    Best regards,
    Kemal

  • Hi Kemal,

    I tried the above changes ( pinmuxing to 0x164 0x0 ) but it is not able to turning off the backlight completly using below command.
    # echo 0 > /sys/class/backlight/backlight/brightness

    Thanks for support!
    Please try to solve this issue with backlight.
  • Please, see this thread. Your hardware is bad, please fix your hardware then double, triple and quadruple check your schematic.

  • Hi Kemal,

    The problem is not with the hardware or schematic, It looks like problem with backlight driver which is used to control backlight brightness.

    Because, I am trying to change the brightness using (commands like $echo <no> > /sys/class/backlight/backlight/brightness  here, <no> can be 1 to 8 levels ) command line it is working.

    However, to turn OFF the backlight using below command is not turned off.

    # echo 0 > /sys/class/backlight/backlight/brightness

    So I tried to control backlight from PWM0 manually by setting period (1000000000 ) and duty cycle (0) using below commends then it is complete turned OFF.

    # echo 0 > /sys/class/pwm/pwmchip0/export

    # echo 1000000000 > /sys/class/pwm/pwmchip0/pwm0/period

    # echo 0 > /sys/class/pwm/pwmchip0/pwm0/duty_cycle

    # echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable

    However, every time when ever we need to change the brightness we have to disable and enable PWM0 so please help me to turn OFF the LED using backlight driver.

    Thanks for response!

  • Please, post the output of this command devmem2 0x44E10964.

  • Hi Kemal,

    Sorry for the merged response it is because of Linux pc.

    Please find the below output for your command:

    root@localhost:~# devmem2 0x44E10964

    /dev/mem opened.

    Memory mapped at address 0xb6ff9000.

    Read at address  0x44E10964 (0xb6ff9964): 0x00000000

    Thanks for Response!

  • Which exact Processor SDK version you use?
  • I am using ti-processor-sdk-linux-am335x-evm-04.02.00.09 version.
  • Can you attach the complete boot log and the feedback from this command?

    root@am335x-evm:~# echo 0 > /sys/class/backlight/backlight/brightness
    root@am335x-evm:~# cat /sys/kernel/debug/pwm

  • H Kemal,

    Please find the below Log for above mentioned commands,

    the Dmesg command output is attached below

    dmessage.log
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Linux version 4.9.59-ga75d8e9305 (root@BLTSP01211) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #90 PREEMPT Thu Apr 12 15:39:12 IST 2018
    [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
    [    0.000000] OF: fdt:Machine model: TI AM335x EVM
    [    0.000000] efi: Getting EFI parameters from FDT:
    [    0.000000] efi: UEFI not found.
    [    0.000000] cma: Reserved 48 MiB at 0x9d000000
    [    0.000000] Memory policy: Data cache writeback
    [    0.000000] On node 0 totalpages: 131072
    [    0.000000] free_area_init_node: node 0, pgdat c0c42cf4, node_mem_map dcb61000
    [    0.000000]   Normal zone: 1152 pages used for memmap
    [    0.000000]   Normal zone: 0 pages reserved
    [    0.000000]   Normal zone: 131072 pages, LIFO batch:31
    [    0.000000] CPU: All CPU(s) started in SVC mode.
    [    0.000000] AM335X ES2.1 (sgx neon)
    [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    [    0.000000] pcpu-alloc: [0] 0 
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
    [    0.000000] Kernel command line: console=ttyO0,115200n8 root=PARTUUID=4884c26f-02 rw rootfstype=ext4 rootwait
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 457976K/524288K available (7168K kernel code, 277K rwdata, 2288K rodata, 1024K init, 269K bss, 17160K reserved, 49152K cma-reserved, 0K highmem)
    [    0.000000] Virtual kernel memory layout:
                       vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                       fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                       vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
                       lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
                       pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                       modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                         .text : 0xc0008000 - 0xc0800000   (8160 kB)
                         .init : 0xc0b00000 - 0xc0c00000   (1024 kB)
                         .data : 0xc0c00000 - 0xc0c454d0   ( 278 kB)
                          .bss : 0xc0c454d0 - 0xc0c889b4   ( 270 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000] 	Build-time adjustment of leaf fanout to 32.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [    0.000021] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
    [    0.000050] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
    [    0.000064] OMAP clocksource: timer1 at 24000000 Hz
    [    0.000306] clocksource_probe: no matching clocksources found
    [    0.000534] Console: colour dummy device 80x30
    [    0.000569] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [    0.000578] This ensures that you still see kernel messages. Please
    [    0.000585] update your kernel commandline.
    [    0.000614] Calibrating delay loop... 597.60 BogoMIPS (lpj=2988032)
    [    0.118741] pid_max: default: 32768 minimum: 301
    [    0.118919] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.118934] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
    [    0.120009] CPU: Testing write buffer coherency: ok
    [    0.120504] Setting up static identity map for 0x80100000 - 0x80100060
    [    0.121639] EFI services will not be available.
    [    0.123481] devtmpfs: initialized
    [    0.141095] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    0.141561] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.141597] futex hash table entries: 256 (order: -1, 3072 bytes)
    [    0.146357] pinctrl core: initialized pinctrl subsystem
    [    0.148065] NET: Registered protocol family 16
    [    0.150863] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.170594] omap_hwmod: debugss: _wait_target_disable failed
    [    0.248748] cpuidle: using governor ladder
    [    0.278733] cpuidle: using governor menu
    [    0.284762] gpio gpiochip0: (gpio): added GPIO chardev (254:0)
    [    0.285289] gpiochip_setup_dev: registered GPIOs 0 to 31 on device: gpiochip0 (gpio)
    [    0.287356] OMAP GPIO hardware version 0.1
    [    0.288508] gpio gpiochip1: (gpio): added GPIO chardev (254:1)
    [    0.289055] gpiochip_setup_dev: registered GPIOs 32 to 63 on device: gpiochip1 (gpio)
    [    0.291709] gpio gpiochip2: (gpio): added GPIO chardev (254:2)
    [    0.292273] gpiochip_setup_dev: registered GPIOs 64 to 95 on device: gpiochip2 (gpio)
    [    0.295094] gpio gpiochip3: (gpio): added GPIO chardev (254:3)
    [    0.295518] gpiochip_setup_dev: registered GPIOs 96 to 127 on device: gpiochip3 (gpio)
    [    0.307218] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_s0, deferring probe
    [    0.311258] No ATAGs?
    [    0.311285] hw-breakpoint: debug architecture 0x4 unsupported.
    [    0.360513] edma 49000000.edma: TI EDMA DMA engine driver
    [    0.361008] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator0[0]'
    [    0.361447] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator1[0]'
    [    0.364724] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
    [    0.364808] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
    [    0.364992] media: Linux media interface: v0.10
    [    0.365071] Linux video capture interface: v2.00
    [    0.365137] pps_core: LinuxPPS API ver. 1 registered
    [    0.365148] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.365181] PTP clock support registered
    [    0.365234] EDAC MC: Ver: 3.0.0
    [    0.366784] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [    0.367269] Advanced Linux Sound Architecture Driver Initialized.
    [    0.369022] clocksource: Switched to clocksource timer1
    [    0.383556] NET: Registered protocol family 2
    [    0.384607] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.384678] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.384740] TCP: Hash tables configured (established 4096 bind 4096)
    [    0.384838] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.384864] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.385042] NET: Registered protocol family 1
    [    0.385616] RPC: Registered named UNIX socket transport module.
    [    0.385633] RPC: Registered udp transport module.
    [    0.385641] RPC: Registered tcp transport module.
    [    0.385650] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.385669] PCI: CLS 0 bytes, default 64
    [    0.386876] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
    [    0.390324] workingset: timestamp_bits=14 max_order=17 bucket_order=3
    [    0.401367] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [    0.402711] NFS: Registering the id_resolver key type
    [    0.402768] Key type id_resolver registered
    [    0.402780] Key type id_legacy registered
    [    0.402843] ntfs: driver 2.1.32 [Flags: R/O].
    [    0.405441] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
    [    0.405467] io scheduler noop registered
    [    0.405477] io scheduler deadline registered
    [    0.405699] io scheduler cfq registered (default)
    [    0.407693] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
    [    0.412188] pwm-backlight backlight: GPIO lookup for consumer enable
    [    0.412204] pwm-backlight backlight: using device tree for GPIO lookup
    [    0.412219] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/backlight[0]'
    [    0.412229] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/backlight[0]'
    [    0.412237] pwm-backlight backlight: using lookup tables for GPIO lookup
    [    0.412248] pwm-backlight backlight: lookup for GPIO enable failed
    [    0.412274] backlight supply power not found, using dummy regulator
    [    0.497703] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [    0.503136] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a 8250
    [    1.116865] console [ttyS0] enabled
    [    1.121939] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159, base_baud = 3000000) is a 8250
    [    1.133289] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [    1.140260] [drm] Initialized
    [    1.143845] panel panel: found backlight
    [    1.147803] panel panel: GPIO lookup for consumer enable
    [    1.147811] panel panel: using device tree for GPIO lookup
    [    1.147825] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/panel[0]'
    [    1.147835] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/panel[0]'
    [    1.147843] panel panel: using lookup tables for GPIO lookup
    [    1.147854] panel panel: lookup for GPIO enable failed
    [    1.149218] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    1.155881] [drm] No driver support for vblank timestamp query.
    [    1.194671] Console: switching to colour frame buffer device 100x30
    [    1.208557] tilcdc 4830e000.lcdc: fb0:  frame buffer device
    [    1.258554] brd: module loaded
    [    1.270951] loop: module loaded
    [    1.279686] libphy: Fixed MDIO Bus: probed
    [    1.359083] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [    1.365233] davinci_mdio 4a101000.mdio: no live phy, scanning all
    [    1.371861] davinci_mdio: probe of 4a101000.mdio failed with error -5
    [    1.379349] cpsw 4a100000.ethernet: Detected MACID = 68:c9:0b:ba:29:f7
    [    1.386058] cpsw 4a100000.ethernet: device node lookup for pps timer failed
    [    1.393219] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [    1.402940] mousedev: PS/2 mouse device common for all mice
    [    1.409271] i2c /dev entries driver
    [    1.415309] cpuidle: enable-method property 'ti,am3352' found operations
    [    1.423478] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    1.423490] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.423529] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' - status (0)
    [    1.423629] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.428398] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    1.428405] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.428417] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    1.428427] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    1.428435] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    1.428446] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    1.430082] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.440264] NET: Registered protocol family 10
    [    1.446592] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [    1.453867] NET: Registered protocol family 17
    [    1.458721] Key type dns_resolver registered
    [    1.463565] omap_voltage_late_init: Voltage driver support not added
    [    1.477091] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.482593] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.488765] gpiochip_find_base: found new base at 510
    [    1.488830] gpio gpiochip4: (omap-gpmc): added GPIO chardev (254:4)
    [    1.489453] gpiochip_setup_dev: registered GPIOs 510 to 511 on device: gpiochip4 (omap-gpmc)
    [    1.491002] omap2-nand 8000000.nand: GPIO lookup for consumer rb
    [    1.491015] omap2-nand 8000000.nand: using device tree for GPIO lookup
    [    1.491066] of_get_named_gpiod_flags: parsed 'rb-gpios' property of node '/ocp/gpmc@50000000/nand@0,0[0]' - status (0)
    [    1.491155] nand: device found, Manufacturer ID: 0x98, Chip ID: 0xda
    [    1.497674] nand: Toshiba NAND 256MiB 3,3V 8-bit
    [    1.502435] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
    [    1.510293] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
    [    1.515811] 10 ofpart partitions found on MTD device omap2-nand.0
    [    1.521977] Creating 10 MTD partitions on "omap2-nand.0":
    [    1.527417] 0x000000000000-0x000000080000 : "NAND.SPL"
    [    1.534750] 0x000000080000-0x000000100000 : "NAND.SPL.backup1"
    [    1.542478] 0x000000100000-0x000000180000 : "NAND.SPL.backup2"
    [    1.550286] 0x000000180000-0x000000200000 : "NAND.SPL.backup3"
    [    1.557971] 0x000000200000-0x000000280000 : "NAND.u-boot-spl-os"
    [    1.565970] 0x000000280000-0x000000380000 : "NAND.u-boot"
    [    1.573411] 0x000000380000-0x000000400000 : "NAND.u-boot-env"
    [    1.581167] 0x000000400000-0x000000480000 : "NAND.u-boot-env.backup1"
    [    1.589598] 0x000000480000-0x000000b80000 : "NAND.kernel"
    [    1.599350] 0x000000b80000-0x000040000000 : "NAND.file-system"
    [    1.605225] mtd: partition "NAND.file-system" extends beyond the end of device "omap2-nand.0" -- size truncated to 0xf480000
    [    1.739336] tps65910 0-002d: No interrupt support, no core IRQ
    [    1.745491] tps65910-gpio tps65910-gpio: ti,en-gpio-sleep not specified
    [    1.745523] gpiochip_find_base: found new base at 504
    [    1.745567] gpio gpiochip5: (tps65910): added GPIO chardev (254:5)
    [    1.746007] gpiochip_setup_dev: registered GPIOs 504 to 509 on device: gpiochip5 (tps65910)
    [    1.747833] vrtc: supplied by vbat
    [    1.755368] vio: supplied by vbat
    [    1.760371] random: fast init done
    [    1.763890] vdd1: supplied by vbat
    [    1.769449] vdd2: supplied by vbat
    [    1.776735] vdig1: supplied by vbat
    [    1.781862] vdig2: supplied by vbat
    [    1.786884] vpll: supplied by vbat
    [    1.792132] vdac: supplied by vbat
    [    1.797173] vaux1: supplied by vbat
    [    1.802371] vaux2: supplied by vbat
    [    1.807599] vaux33: supplied by vbat
    [    1.812883] vmmc: supplied by vbat
    [    1.817949] vbb: supplied by vbat
    [    1.823601] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 16 bytes/write
    [    1.830732] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
    [    1.838204] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
    [    1.846125] omap_hsmmc 48060000.mmc: GPIO lookup for consumer cd
    [    1.846140] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.846178] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@48060000[0]' - status (0)
    [    1.846277] omap_hsmmc 48060000.mmc: Got CD GPIO
    [    1.851135] omap_hsmmc 48060000.mmc: GPIO lookup for consumer wp
    [    1.851143] omap_hsmmc 48060000.mmc: using device tree for GPIO lookup
    [    1.851155] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@48060000[0]'
    [    1.851165] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@48060000[0]'
    [    1.851173] omap_hsmmc 48060000.mmc: using lookup tables for GPIO lookup
    [    1.851184] omap_hsmmc 48060000.mmc: lookup for GPIO wp failed
    [    1.910282] hctosys: unable to open rtc device (rtc0)
    [    1.916061] lis3_reg: disabling
    [    1.919683] ALSA device list:
    [    1.922765]   No soundcards found.
    [    1.930311] Waiting for root device PARTUUID=4884c26f-02...
    [    2.038360] mmc0: host does not support reading read-only switch, assuming write-enable
    [    2.049910] mmc0: new high speed SDHC card at address aaaa
    [    2.056451] mmcblk0: mmc0:aaaa SS08G 7.40 GiB 
    [    2.063059]  mmcblk0: p1 p2
    [    2.191289] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    2.199817] VFS: Mounted root (ext4 filesystem) on device 179:2.
    [    2.212877] devtmpfs: mounted
    [    2.220176] Freeing unused kernel memory: 1024K
    [    2.535310] systemd[1]: System time before build time, advancing clock.
    [    2.635602] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
    [    2.655379] systemd[1]: Detected architecture arm.
    [    2.690900] systemd[1]: No hostname configured.
    [    2.695568] systemd[1]: Set hostname to <localhost>.
    [    3.037358] systemd[1]: [/lib/systemd/system/gadget-init.service:15] Unknown lvalue 'ExecStopPre' in section 'Service'
    [    3.133070] systemd[1]: Configuration file /lib/systemd/system/psplash-stop.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    [    3.148321] systemd[1]: Configuration file /lib/systemd/system/psplash-stop.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
    [    3.169560] systemd[1]: psplash-stop.service: Service lacks both ExecStart= and ExecStop= setting. Refusing.
    [    3.327931] systemd[1]: Configuration file /lib/systemd/system/psplash-start.service is marked executable. Please remove executable permission bits. Proceeding anyway.
    [    3.343297] systemd[1]: Configuration file /lib/systemd/system/psplash-start.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
    [    4.083226] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
    [    4.206580] cryptodev: loading out-of-tree module taints kernel.
    [    4.225049] cryptodev: driver 1.8 loaded.
    [    5.181339] systemd-journald[117]: Received request to flush runtime journal from PID 1
    [    7.597963] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad0[0]' - status (0)
    [    7.598006] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad0[1]' - status (0)
    [    7.598038] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad0[2]' - status (0)
    [    7.598077] of_get_named_gpiod_flags: parsed 'row-gpios' property of node '/matrix_keypad0[3]' - status (0)
    [    7.598093] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad0[0]' - status (0)
    [    7.598117] of_get_named_gpiod_flags: parsed 'col-gpios' property of node '/matrix_keypad0[1]' - status (0)
    [    7.598822] input: matrix_keypad0 as /devices/platform/matrix_keypad0/input/input0
    [    7.829438] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    8.823762] edt_ft5x06 2-0038: GPIO lookup for consumer reset
    [    8.823784] edt_ft5x06 2-0038: using device tree for GPIO lookup
    [    8.823801] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    8.823811] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    8.823819] edt_ft5x06 2-0038: using lookup tables for GPIO lookup
    [    8.823830] edt_ft5x06 2-0038: lookup for GPIO reset failed
    [    8.823840] edt_ft5x06 2-0038: GPIO lookup for consumer wake
    [    8.823847] edt_ft5x06 2-0038: using device tree for GPIO lookup
    [    8.823856] of_get_named_gpiod_flags: can't parse 'wake-gpios' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    8.823864] of_get_named_gpiod_flags: can't parse 'wake-gpio' property of node '/ocp/i2c@4819c000/edt-ft5406@38[0]'
    [    8.823871] edt_ft5x06 2-0038: using lookup tables for GPIO lookup
    [    8.823879] edt_ft5x06 2-0038: lookup for GPIO wake failed
    [    8.872736] input: EP0790M09 as /devices/platform/ocp/4819c000.i2c/i2c-2/2-0038/input/input1
    [    9.314141] omap_hwmod: pruss: _wait_target_ready failed: -16
    [    9.418370] pruss-soc-bus 4a326000.pruss-soc-bus: use pm_runtime_put_sync_suspend() in driver?
    [    9.516977] pruss-soc-bus 4a326000.pruss-soc-bus: couldn't enable module
    [    9.584891] pruss-soc-bus: probe of 4a326000.pruss-soc-bus failed with error -16
    [    9.689697] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
    [    9.739615] omap-aes 53500000.aes: will run requests pump with realtime priority
    [    9.883349] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
    [   10.048341] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [   11.600897] remoteproc remoteproc0: wkup_m3 is available
    [   11.985560] net eth0: initializing cpsw version 1.12 (0)
    [   12.067651] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [   12.200580] cpsw 4a100000.ethernet: ALE Table size 1024
    [   12.303275] libphy: PHY 4a101000.mdio:00 not found
    [   12.303301] net eth0: phy "4a101000.mdio:00" not found on slave 0, err -19
    [   12.303312] libphy: PHY 4a101000.mdio:01 not found
    [   12.303321] net eth0: phy "4a101000.mdio:01" not found on slave 1, err -19
    [   12.341851] cpts ptp bc clkid 0
    [   12.416760] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   12.455903] Bluetooth: Core ver 2.22
    [   12.456034] NET: Registered protocol family 31
    [   12.456039] Bluetooth: HCI device and connection manager initialized
    [   12.456069] Bluetooth: HCI socket layer initialized
    [   12.456087] Bluetooth: L2CAP socket layer initialized
    [   12.456132] Bluetooth: SCO socket layer initialized
    [   12.523559] remoteproc remoteproc0: powering up wkup_m3
    [   12.540720] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 224268
    [   12.541028] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [   12.541062] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [   13.904283] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
    [   18.622476] udc-core: couldn't find an available UDC - added [g_multi] to list of pending drivers
    [   19.660650] NET: Registered protocol family 15
    [   20.488788] random: crng init done
    [   21.030408] Initializing XFRM netlink socket
    [   22.925326] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer reset
    [   22.925350] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   22.925368] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   22.925378] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   22.925386] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   22.925398] am335x-phy-driver 47401300.usb-phy: lookup for GPIO reset failed
    [   22.925409] am335x-phy-driver 47401300.usb-phy: GPIO lookup for consumer vbus-detect
    [   22.925416] am335x-phy-driver 47401300.usb-phy: using device tree for GPIO lookup
    [   22.925426] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   22.925434] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401300[0]'
    [   22.925441] am335x-phy-driver 47401300.usb-phy: using lookup tables for GPIO lookup
    [   22.925450] am335x-phy-driver 47401300.usb-phy: lookup for GPIO vbus-detect failed
    [   22.925572] 47401300.usb-phy supply vcc not found, using dummy regulator
    [   23.056472] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer reset
    [   23.056498] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   23.056518] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   23.056528] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   23.056537] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   23.056549] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO reset failed
    [   23.056559] am335x-phy-driver 47401b00.usb-phy: GPIO lookup for consumer vbus-detect
    [   23.056566] am335x-phy-driver 47401b00.usb-phy: using device tree for GPIO lookup
    [   23.056576] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpios' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   23.056584] of_get_named_gpiod_flags: can't parse 'vbus-detect-gpio' property of node '/ocp/usb@47400000/usb-phy@47401b00[0]'
    [   23.056592] am335x-phy-driver 47401b00.usb-phy: using lookup tables for GPIO lookup
    [   23.056600] am335x-phy-driver 47401b00.usb-phy: lookup for GPIO vbus-detect failed
    [   23.056725] 47401b00.usb-phy supply vcc not found, using dummy regulator
    [   23.068492] usbcore: registered new interface driver usbfs
    [   23.068604] usbcore: registered new interface driver hub
    [   23.068795] usbcore: registered new device driver usb
    [   23.465264] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [   23.559304] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [   23.655799] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [   23.745352] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   23.869352] usb usb1: Product: MUSB HDRC host driver
    [   23.874377] usb usb1: Manufacturer: Linux 4.9.59-ga75d8e9305 musb-hcd
    [   24.053664] usb usb1: SerialNumber: musb-hdrc.0
    [   24.069589] hub 1-0:1.0: USB hub found
    [   24.123271] hub 1-0:1.0: 1 port detected
    [   24.227650] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [   24.378821] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [   24.486312] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [   24.575154] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   24.677631] usb usb2: Product: MUSB HDRC host driver
    [   24.741684] usb usb2: Manufacturer: Linux 4.9.59-ga75d8e9305 musb-hcd
    [   24.748186] usb usb2: SerialNumber: musb-hdrc.1
    [   24.892412] hub 2-0:1.0: USB hub found
    [   24.981962] hub 2-0:1.0: 1 port detected
    [   25.185963] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #1, port1 00000104
    [   25.338386] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #2, port1 00000104
    [   25.490816] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_vrise (81, <SessEnd), retry #3, port1 00000104
    [   25.643241] musb-hdrc musb-hdrc.1: VBUS_ERROR in a_wait_vrise (80, <SessEnd), retry #3, port1 0008010c
    [   30.750162] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    

    Thanks for response!

  • Please, also post the output of these two commands:
    root@am335x-evm:~# echo 0 > /sys/class/backlight/backlight/brightness
    root@am335x-evm:~# cat /sys/kernel/debug/pwm
  • Hi
    I posted that image is not inserted properly,
    Please find the below,
    root@localhost:~# echo 0 > /sys/class/backlight/backlight/brightness
    root@localhost:~# cat /sys/kernel/debug/pwm
    platform/48300100.ecap, 1 PWM device
    pwm-0 (backlight ): requested period: 5000000 ns duty: 0 ns polarity: normal

    Thanks for response!
  • It is not possible backlight to glow when the duty cycle is 0.

    For your problem 1
    You cannot completely turned of the brightness in ti-processor-sdk-linux-am335x-evm-04.02.00.09 because of this systemd service which saves the current brightness index value to /var/lib/systemd/backlight/platform-backlight:backlight:backlight file on reboot and later loads the same value on booting and if this value is 0 it clams to a value of at least 1 or 5% of maximum brightness. To stop this behavior you need to add ENV{ID_BACKLIGHT_CLAMP}="0" to /lib/udev/rules.d/99-systemd.rules in this way the default-brightness-level = <0>; from your device tree won't be changed by this service. If you do not want to restore the backlight settings on boot enter => setenv optargs systemd.restore_state=0 and => saveenv settings in U-Boot console.

    For your problem 2

    Please, refer to this post to see how manually you can control the brightness.

  • Hi Kemal,

    The problem is I am not able to turn off the backlight completely by setting brightness as "0" level (i.e., Duty cycle is 0%)

    Even though I set the ENV{ID_BACKLIGHT_CLAMP}="0" in system services in /lib/udev/rules.d/99-systemd.rules, It will set the default brightness to zero.

    But, still the backlight is turned on with full brightness (Active high signal in oscilloscope).

    Thanks for replay!
  • Can you take and attach the photo of the display and the signal you see on the oscilloscope?

    Plus the output of these commands:
    root@am335x-evm:~# cat /sys/kernel/debug/pwm
    root@am335x-evm:~# cat /sys/devices/platform/backlight/backlight/backlight/actual_brightness
    root@am335x-evm:~# cat /sys/devices/platform/backlight/backlight/backlight/brightness
    root@am335x-evm:~# cat /sys/class/backlight/backlight/brightness
    root@am335x-evm:~# cat /sys/class/backlight/backlight/actual_brightness
    root@am335x-evm:~# cat /var/lib/systemd/backlight/platform-backlight\:backlight\:backlight
    root@am335x-evm:~# cat /proc/cmdline
  • Hi Kemal,

    Thanks for response and below is the output of all commands.

    root@am335x-evm:~# cat /sys/kernel/debug/pwm

    platform/48300100.ecap, 1 PWM device

    pwm-0 (backlight ): requested period: 50000 ns duty: 37647 ns polarity: normal

    root@am335x-evm:~# cat /sys/devices/platform/backlight/backlight/backlight/actual_brightness

    6

    root@am335x-evm:~# cat /sys/devices/platform/backlight/backlight/backlight/brightness

    6

    root@am335x-evm:~# cat /sys/class/backlight/backlight/brightness

    6

    root@am335x-evm:~# cat /sys/class/backlight/backlight/actual_brightness

    6

    root@am335x-evm:~# cat /var/lib/systemd/backlight/platform-backlight\:backlight\:backlight

    6

    root@am335x-evm:~# cat /proc/cmdline

    console=ttyO0,115200n8 root=PARTUUID=4884c26f-02 rw rootfstype=ext4 rootwait

    Please find the attached photo of oscilloscope output.


    Thanks in advance!
  • It seems normal. Can you now echo 0 > /sys/devices/platform/backlight/backlight/backlight/brightnes attach the output of commands from my previous comment the reboot and attach the new values again.