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.

AM335x Beaglebone Black LCD doesn't work

Hi,

I'm testing the beagle bone black with 7" LCD. I'm using the SDK 3.01.00.06 (pre compiled image installed in the uSD card) and the display is always off. The hardware is ok, I'm sure because when I run the pre installed O.S. (Debian), present on the eMMC, the LCD works fine. I run the this command, in order to understand if all the pins are configured well:

root@am335x-evm:~# dmesg | grep pinctrl
[    0.171619] pinctrl core: initialized pinctrl subsystem
[    0.307294] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
root@am335x-evm:~#

and also running the modetest command, the result is this (no LCD is detected):

root@am335x-evm:~# modetest
trying to open device 'i915'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...done
Encoders:
id      crtc    type    possible crtcs  possible clones
25      0       TMDS    0x00000001      0x00000000

Connectors:
id      encoder status          name            size (mm)       modes   encoders
26      25      disconnected    HDMI-A-1        0x0             0       25
  props:
        1 EDID:
                flags: immutable blob
                blobs:

                value:
        2 DPMS:
                flags: enum
                enums: On=0 Standby=1 Suspend=2 Off=3
                value: 0

CRTCs:
id      fb      pos     size
24      0       (0,0)   (0x0)
   0 0 0 0 0 0 0 0 0 flags: ; type:
  props:

Planes:
id      crtc    fb      CRTC x,y        x,y     gamma size      possible crtcs
23      24      0       0,0             0,0     0               0x00000001
  formats: XR24 AR24
  props:
        5 type:
                flags: immutable enum
                enums: Overlay=0 Primary=1 Cursor=2
                value: 1

Frame buffers:
id      size    pitch

root@am335x-evm:~#

What can I do? someone could help me?

Thanks in advance

Matteo

  • Hi Matteo,

    I'm using the SDK 3.01.00.06 (pre compiled image installed in the uSD card) and the display is always off.


    By default the SDK does not include lcd node in the am335x-boneblack.dts and am335x-bone-common.dtsi. BBB is set to work with the HDMI.

    If you want to add your lcd you need to modify the device tree files accordingly. You can take a reference from the am335x-evmsk.dts or am335x-evm.dts.

    Best Regards,
    Yordan
  • Hi Yordan,

    I modified the .dtb file like the am335x-evm. I copied the setting of the LCD pins and the backlight, but the LCD doesn't work.  I attached the .dtb file. I modified the symlink (I attached the contenent of the boot folder):

    matteo@matteo-Compaq-Presario-CQ61-Notebook-PC:~/Sitara/targetNFS/boot$ ll
    totale 3424
    drwxr-xr-x  3 root root    4096 dic  6 21:12 ./
    drwxr-xr-x 21 root root    4096 ott  4 01:59 ../
    lrwxrwxrwx  1 root root      24 dic  6 11:15 am335x-boneblack.dtb -> am335x-boneblack-LCD.dtb
    -rw-rw-r--  1 root root   37521 dic  6 20:52 am335x-boneblack-LCD.dtb
    drwxr-xr-x  2 root root    4096 dic  6 21:12 old files/
    lrwxrwxrwx  1 root root      25 ott  4 01:59 zImage -> zImage-4.4.19-gdb0b54cdad
    -rw-r--r--  1 root root 3451352 ott  3 23:53 zImage-4.4.19-gdb0b54cdad
    matteo@matteo-Compaq-Presario-CQ61-Notebook-PC:~/Sitara/targetNFS/boot$


    the boot seems to be ok:

    TFTP from server 192.168.1.101; our IP address is 192.168.1.100                 
    Filename 'zImage-am335x-evm.bin'.                                               
    Load address: 0x82000000                                                        
    Loading: #################################################################      
             #################################################################      
             #################################################################      
             #################################################################      
             #################################################################      
             #################################################################      
             #################################################################      
             #################################################################      
             #################################################################      
             #################################################################      
             #########################                                              
             1.4 MiB/s                                                              
    done                                                                            
    Bytes transferred = 3451352 (34a9d8 hex)                                        
    link up on port 0, speed 100, full duplex                                       
    Using ethernet@4a100000 device                                                  
    TFTP from server 192.168.1.101; our IP address is 192.168.1.100                 
    Filename 'am335x-boneblack.dtb'.                                                
    Load address: 0x88000000                                                        
    Loading: ########                                                               
             1.2 MiB/s                                                              
    done                                                                            
    Bytes transferred = 37004 (908c hex)                                            
    Kernel image @ 0x82000000 [ 0x000000 - 0x34a9d8 ]                               
    ## Flattened Device Tree blob at 88000000                                       
       Booting using the fdt blob at 0x88000000                                     
       Loading Device Tree to 8fff3000, end 8ffff08b ... OK                         
                                                                                    
    Starting kernel ... 

    but the result is always the same. Could you help me again, please?

    Matteo

    /*
     * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
     *
     * 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.
     */
    /dts-v1/;

    #include "am33xx.dtsi"
    #include "am335x-bone-common.dtsi"
    #include <dt-bindings/pwm/pwm.h>
    /*#include <dt-bindings/display/tda998x.h>*/

    / {
        model = "TI AM335x BeagleBone Black";
        compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

        backlight {
            compatible = "pwm-backlight";
            pwms = <&ecap0 0 50000 0>;
            brightness-levels = <0 51 53 56 62 75 101 152 255>;
            default-brightness-level = <8>;
        };


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

            display-timings {
                800x480p62 {
                    clock-frequency = <30000000>;
                    hactive = <800>;
                    vactive = <480>;
                    hfront-porch = <39>;
                    hback-porch = <39>;
                    hsync-len = <47>;
                    vback-porch = <29>;
                    vfront-porch = <13>;
                    vsync-len = <2>;
                    hsync-active = <1>;
                    vsync-active = <1>;
                };
            };
        };

    };

    &ldo3_reg {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-always-on;
    };

    &mmc1 {
        vmmc-supply = <&vmmcsd_fixed>;
    };

    &mmc2 {
        vmmc-supply = <&vmmcsd_fixed>;
        pinctrl-names = "default";
        pinctrl-0 = <&emmc_pins>;
        bus-width = <8>;
        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>;
        };
    };


    &am33xx_pinmux {
        lcd_pins_s0: lcd_pins_s0 {
            pinctrl-single,pins = <
                0x20 (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad8.lcd_data23 */
                0x24 (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad9.lcd_data22 */
                0x28 (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad10.lcd_data21 */
                0x2c (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad11.lcd_data20 */
                0x30 (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad12.lcd_data19 */
                0x34 (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad13.lcd_data18 */
                0x38 (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad14.lcd_data17 */
                0x3c (PIN_OUTPUT | MUX_MODE1)        /* gpmc_ad15.lcd_data16 */
                0xa0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data0.lcd_data0 */
                0xa4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data1.lcd_data1 */
                0xa8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data2.lcd_data2 */
                0xac (PIN_OUTPUT | MUX_MODE0)        /* lcd_data3.lcd_data3 */
                0xb0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data4.lcd_data4 */
                0xb4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data5.lcd_data5 */
                0xb8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data6.lcd_data6 */
                0xbc (PIN_OUTPUT | MUX_MODE0)        /* lcd_data7.lcd_data7 */
                0xc0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data8.lcd_data8 */
                0xc4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data9.lcd_data9 */
                0xc8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data10.lcd_data10 */
                0xcc (PIN_OUTPUT | MUX_MODE0)        /* lcd_data11.lcd_data11 */
                0xd0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data12.lcd_data12 */
                0xd4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data13.lcd_data13 */
                0xd8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data14.lcd_data14 */
                0xdc (PIN_OUTPUT | MUX_MODE0)        /* lcd_data15.lcd_data15 */
                0xe0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_vsync.lcd_vsync */
                0xe4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_hsync.lcd_hsync */
                0xe8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_pclk.lcd_pclk */
                0xec (PIN_OUTPUT | MUX_MODE0)        /* lcd_ac_bias_en.lcd_ac_bias_en */
            >;
        };
        
        ecap0_pins: backlight_pins {
            pinctrl-single,pins = <
                0x164 0x0    /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
            >;
        };

        mcasp0_pins: mcasp0_pins {
            pinctrl-single,pins = <
                AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
                AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
                AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */
                AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
                AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */
            >;
        };
    };

    &lcdc {
          status = "okay";
    };

    &epwmss0 {
        status = "okay";

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

    &rtc {
        system-power-controller;
    };

    &mcasp0    {
        #sound-dai-cells = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&mcasp0_pins>;
        status = "okay";
        op-mode = <0>;    /* MCASP_IIS_MODE */
        tdm-slots = <2>;
        serial-dir = <    /* 0: INACTIVE, 1: TX, 2: RX */
                0 0 1 0
            >;
        tx-num-evt = <32>;
        rx-num-evt = <32>;
    };

    &sgx {
        status = "okay";
    };

    / {
        clk_mcasp0_fixed: clk_mcasp0_fixed {
            #clock-cells = <0>;
            compatible = "fixed-clock";
            clock-frequency = <24576000>;
        };

        clk_mcasp0: clk_mcasp0 {
            #clock-cells = <0>;
            compatible = "gpio-gate-clock";
            clocks = <&clk_mcasp0_fixed>;
            enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
        };

        sound {
            compatible = "simple-audio-card";
            simple-audio-card,name = "TI BeagleBone Black";
            simple-audio-card,format = "i2s";
            simple-audio-card,bitclock-master = <&dailink0_master>;
            simple-audio-card,frame-master = <&dailink0_master>;

            dailink0_master: simple-audio-card,cpu {
                sound-dai = <&mcasp0>;
                clocks = <&clk_mcasp0>;
            };

        };
    };

  • Hi,

    First of all, can you check verify that am335x-bone-common.dtsi does NOT overwrite some of the pinmux settings. I think it isn't, but double check that. Also the am335x-boneblack.dts itself has an nxp_hdmi_bonelt_pins & nxp_hdmi_bonelt_off_pins, which use part of the LCD_DATA signals and overwrite them.

    Take care of the following dts nodes:
    &lcdc {
    status = "okay";
    port {
    lcdc_0: endpoint@0 {
    remote-endpoint = <&hdmi_0>;
    };
    };
    };

    &i2c0 {
    tda19988: tda19988 {
    compatible = "nxp,tda998x";
    reg = <0x70>;

    pinctrl-names = "default", "off";
    pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
    pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;

    #sound-dai-cells = <0>;
    audio-ports = < AFMT_I2S 0x03>;

    ports {
    port@0 {
    hdmi_0: endpoint@0 {
    remote-endpoint = <&lcdc_0>;
    };
    };
    };
    };
    };
    which are related to the HDMI.

    And finally, after you check the above, can you probe (with a scope) the pclk pin on the BBB expansion headers? This would indicate if your lcdc driver is called.

    Best Regards,
    Yordan
  • Also can you attach the full bootlog (dmesg)?

    Best Regards,
    Yordan
  • Hi Yordan,

    I'm a little bit confuse. Does the .dts file work with the "overlay" mentality? This means that the sets after the #include overlay the previous sets, is correct?

    I checked the schematics of the BBB and I see that the TDA19988 converts the LCD pins signals to HDMI. This means that the LCD signals are already available, because the HDMI works, is correct?


    The I2C0 bus is necessary only for the audio, is not important when the LCD is connected.

    Instead the backlight is different. Is a signal that doesn't share nothing with the audio/video signals. During my tests the display is always deep black. Without the backlight nothing is visible in the LCD pannel so is not possible to understand if the LDC signals are ok or not ok. I fear that the backlight signal is not set correctly (and I haven't a scope that confirm this theory).

    My question is simple: I'm using a standard 4DCAPE-70T display: does exist a .dts file for this display?

    Thanks

  • HI,

    his means that the LCD signals are already available, because the HDMI works, is correct?


    Pinmux settings are done, yes, but you need an LCD node to use them, in order to activate the pins, i.e. :
    panel {
    compatible = "ti,tilcdc,panel";
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&lcd_pins_s0>;
    .......

    My question is simple: I'm using a standard 4DCAPE-70T display: does exist a .dts file for this display?

    No, there isn't anything in the official TISDK. However, I've found some community sources which may be of use to you:
    github.com/.../arm
    lists.yoctoproject.org/.../024467.html

    Hope this helps.

    Best Regards,
    Yordan
  • Hi Yordan,

    now the LDC works. I modified the backlight control (now it is on PWM1A and not ecap0) and I added another pin (LCD_AVDD_EN) for enable the LCD control. I added also the keys control, but I haven't test it. Thanks for your help.

    I modified the am335x-boneblack.dts file like below:

    #include "am33xx.dtsi"
    #include "am335x-bone-common.dtsi"
    /* #include <dt-bindings/pwm/pwm.h> */
    /* #include <dt-bindings/interrupt-controller/irq.h> */

    #include <dt-bindings/display/tda998x.h>

    / {
        model = "TI AM335x BeagleBone Black";
        compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";

        backlight {
            status = "okay";
            compatible = "pwm-backlight";
            pwms = <&ehrpwm1 0 50000 0>;

            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 = <50>;
        };

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

            display-timings {
                800x480p62 {
                    clock-frequency = <30000000>;
                    hactive = <800>;
                    vactive = <480>;
                    hfront-porch = <39>;
                    hback-porch = <39>;
                    hsync-len = <47>;
                    vback-porch = <29>;
                    vfront-porch = <13>;
                    vsync-len = <2>;
                    hsync-active = <1>;
                    vsync-active = <1>;
                };
            };
        };

        gpio_keys {
            compatible = "gpio-keys";
            pinctrl-names = "default";
            pinctrl-0 = <&bone_lcd7_cape_keys_pins_default>;

            #address-cells = <1>;
            #size-cells = <0>;

            button@1 {
                debounce_interval = <50>;
                linux,code = <105>;
                label = "left";
                gpios = <&gpio1 16 0x1>;
                gpio-key,wakeup;
                autorepeat;
            };
            button@2 {
                debounce_interval = <50>;
                linux,code = <106>;
                label = "right";
                gpios = <&gpio1 17 0x1>;
                gpio-key,wakeup;
                autorepeat;
            };
            button@3 {
                debounce_interval = <50>;
                linux,code = <103>;
                label = "up";
                gpios = <&gpio1 19 0x1>;
                gpio-key,wakeup;
                autorepeat;
            };
            button@4 {
                debounce_interval = <50>;
                linux,code = <108>;
                label = "down";
                gpios = <&gpio3 16 0x1>;
                gpio-key,wakeup;
                autorepeat;
            };
            button@5 {
                debounce_interval = <50>;
                linux,code = <28>;
                label = "enter";
                gpios = <&gpio0 3 0x1>;
                gpio-key,wakeup;
            };
        };

    };

    &ldo3_reg {
        regulator-min-microvolt = <1800000>;
        regulator-max-microvolt = <1800000>;
        regulator-always-on;
    };

    &mmc1 {
        vmmc-supply = <&vmmcsd_fixed>;
    };

    &mmc2 {
        vmmc-supply = <&vmmcsd_fixed>;
        pinctrl-names = "default";
        pinctrl-0 = <&emmc_pins>;
        bus-width = <8>;
        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>;
        };
    };


    &am33xx_pinmux {

        nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins {
            pinctrl-single,pins = <
                    0xa0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data0.lcd_data0 */
                    0xa4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data1.lcd_data1 */
                    0xa8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data2.lcd_data2 */
                    0xac (PIN_OUTPUT | MUX_MODE0)        /* lcd_data3.lcd_data3 */
                    0xb0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data4.lcd_data4 */
                    0xb4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data5.lcd_data5 *
                    0xb8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data6.lcd_data6 */
                    0xbc (PIN_OUTPUT | MUX_MODE0)        /* lcd_data7.lcd_data7 */
                    0xc0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data8.lcd_data8 */
                    0xc4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data9.lcd_data9 */
                    0xc8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data10.lcd_data10 */
                    0xcc (PIN_OUTPUT | MUX_MODE0)        /* lcd_data11.lcd_data11 */
                    0xd0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data12.lcd_data12 */
                    0xd4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data13.lcd_data13 */
                    0xd8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_data14.lcd_data14 */
                    0xdc (PIN_OUTPUT | MUX_MODE0)        /* lcd_data15.lcd_data15 */

                    0xe0 (PIN_OUTPUT | MUX_MODE0)        /* lcd_vsync.lcd_vsync */
                    0xe4 (PIN_OUTPUT | MUX_MODE0)        /* lcd_hsync.lcd_hsync */
                    0xe8 (PIN_OUTPUT | MUX_MODE0)        /* lcd_pclk.lcd_pclk */
                    0xec (PIN_OUTPUT | MUX_MODE0)        /* lcd_ac_bias_en.lcd_ac_bias_en */
            
            >;
        };
        nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins {
            pinctrl-single,pins = <
                0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
            >;
        };

        ehrpwm1_pins: backlight_pins {
            pinctrl-single,pins = <
                0x48 ( PIN_OUTPUT_PULLUP | MUX_MODE6 ) /* (U14) gpmc_a2.ehrpwm1A */
            >;

        };

        LCD_AVDD_EN_pin_default: LCD_AVDD_EN_pin_default {
            pinctrl-single,pins = <
                0x150 ( PIN_OUTPUT_PULLUP | MUX_MODE7 )  /*-commento -- (A17) spi0_sclk.gpio0[2] */
            >;

        };

        bone_lcd7_cape_keys_pins_default: pinmux_bone_lcd7_cape_keys_pins_default {
            pinctrl-single,pins = <
                0x154 ( PIN_INPUT | MUX_MODE7 ) /* (B17) spi0_d0.gpio0[3] - enter */
            
                0x40 ( PIN_INPUT | MUX_MODE7 ) /* (R13) gpmc_a0.gpio1[16] - left */
                0x44 ( PIN_INPUT | MUX_MODE7 ) /* (V14) gpmc_a1.gpio1[17] - right */
                0x4c ( PIN_INPUT | MUX_MODE7 ) /* (T14) gpmc_a3.gpio1[19] - up */

                0x198 ( PIN_INPUT | MUX_MODE7 ) /* (D12) mcasp0_axr0.gpio3[16] - down */
            >;
        };

        mcasp0_pins: mcasp0_pins {
            pinctrl-single,pins = <
                AM33XX_IOPAD(0x9ac, PIN_INPUT_PULLUP | MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */
                AM33XX_IOPAD(0x99c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/
                AM33XX_IOPAD(0x994, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx */
                AM33XX_IOPAD(0x990, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
                AM33XX_IOPAD(0x86c, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* gpmc_a11.GPIO1_27 */
            >;
        };
    };

    &lcdc {
        status = "okay";
        port {
            lcdc_0: endpoint@0 {
            remote-endpoint = <&hdmi_0>;
            };
        };
    };


    &i2c0 {
        tda19988: tda19988 {
            compatible = "nxp,tda998x";
            reg = <0x70>;

            pinctrl-names = "default", "off";
            pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
            pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;

            #sound-dai-cells = <0>;
            audio-ports = <    AFMT_I2S    0x03>;

            ports {
                port@0 {
                    hdmi_0: endpoint@0 {
                        remote-endpoint = <&lcdc_0>;
                    };
                };
            };
        };
    };


    &epwmss1 {
        status = "okay";

              ehrpwm1: pwm@48302200 {  

            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&ehrpwm1_pins>;
        };

    };



    &gpio0{
        ti,gpio-always-on;
        pinctrl-names = "default";
        pinctrl-0 = <&LCD_AVDD_EN_pin_default>;
        status = "okay";
    };




    &tscadc {
        status = "okay";
        tsc {
            ti,wires = <4>;
            ti,x-plate-resistance = <200>;
            ti,coordinate-readouts = <5>;
            ti,wire-config = <0x00 0x11 0x22 0x33>;
            ti,charge-delay = <0x400>;
        };

        adc {
            ti,adc-channels = <4 5 6 7>;
        };
    };


    &rtc {
        system-power-controller;
    };

    &mcasp0    {
        #sound-dai-cells = <0>;
        pinctrl-names = "default";
        pinctrl-0 = <&mcasp0_pins>;
        status = "okay";
        op-mode = <0>;    /* MCASP_IIS_MODE */
        tdm-slots = <2>;
        serial-dir = <    /* 0: INACTIVE, 1: TX, 2: RX */
                0 0 1 0
            >;
        tx-num-evt = <32>;
        rx-num-evt = <32>;
    };

    &sgx {
        status = "okay";
    };

    / {
        clk_mcasp0_fixed: clk_mcasp0_fixed {
            #clock-cells = <0>;
            compatible = "fixed-clock";
            clock-frequency = <24576000>;
        };

        clk_mcasp0: clk_mcasp0 {
            #clock-cells = <0>;
            compatible = "gpio-gate-clock";
            clocks = <&clk_mcasp0_fixed>;
            enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */
        };

        sound {
            compatible = "simple-audio-card";
            simple-audio-card,name = "TI BeagleBone Black";
            simple-audio-card,format = "i2s";
            simple-audio-card,bitclock-master = <&dailink0_master>;
            simple-audio-card,frame-master = <&dailink0_master>;

            dailink0_master: simple-audio-card,cpu {
                sound-dai = <&mcasp0>;
                clocks = <&clk_mcasp0>;
            };

        };
    };