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/AM4378: GPIO driver questions

Part Number: AM4378
Other Parts Discussed in Thread: TPS65218, AM4372

Tool/software: Linux

So i am cutting my teeth on linux drivers and i am starting with GPIO drivers. i am using SDK 4.03

i am using these pages as resources:

so i am trying to control the only GPIO i seem to have available, GPIO16. 

so i open export and write "16" to it, i open direction and write "out" to it, i open value and i write "1" or "0" to it. when i read back value i get the value i wrote to it. so the files seem to work... but according to the schematic linked above GPIO16 is attached to status LED5 which is D11 on my board which never changes. so am i wrong to assume it is as simple as export, direction, value? am i missing something?

general question about these GPIO drivers:

there are lots of potential GPIO lines to control, but according to my /sys/class/gpio directory i only seem to have access to 1 GPIO.  a lot of GPIOs are attached to LEDS, but when i look in the LED directory the directory is empty. so i have a lot of, seemingly, unaccounted for GPIOs.  do the GPIO folders get created when i do an export? are the other GPIOs not included on purpose to force people to write their own drivers? 

the next general question i have on this EVM is GPIO input - the buttons are all tied to keyboard scanning GPIOs. how do i use the drivers for these GPIOs? i am a linux newbie so how do i use the custom keyboard created on this EVM? i didn't see anything obvious in the sys/class directory to indicate a keyboard

  • Hi Cobsonchael,

    As you probably have read in the GPIO SySfs interface for userspace you can export and manage the GPIOs:
    git.ti.com/.../sysfs.txt
    and no need to write your own driver
    " do the GPIO folders get created when i do an export? "
    Yes, the folder get created after export the GPIO.
    You can more details about GPIO keys from gpio_keys.c keyboard driver readme:
    www.kernel.org/.../gpio-keys.txt

    BR
    Tsvetolin Shulev
  • yes i read about exporting the gpios but there are no examples of this. you still haven't answered my questions of A) did i do something wrong/miss something and B) why doesn't my LED turn on and off?

    thank you for answering about the export and folder question

    that link does not help whatsoever with HOW to use the keyboard drivers. i still don't know how to use them. i assume a value gets written to a file somewhere when a key is pressed? looking around /sys/class/ i don't see any keyboards. maybe it's in input?
  • how messed up is it that i have an easier time getting the keyboard drivers to work than the GPIO? using this resource:
    www.linuxjournal.com/.../6429
    i am able to get the keyboard to work.

    my LED still does not light up
    this is my test code:

    void InitGPIO(void)
    {
    char readBuf[100];

    if(write_GPIO("export", "16"))
    {
    usleep(250000); //apparently sleep to allow linux to set it up

    if(write_GPIO("gpio16/direction", "out"))
    {
    write_GPIO("gpio16/value", "1");
    memset(readBuf, 0, sizeof(readBuf));
    read_GPIO("gpio16/value", readBuf, 1);
    sleep(3);

    write_GPIO("gpio16/value", "0");
    memset(readBuf, 0, sizeof(readBuf));
    read_GPIO("gpio16/value", readBuf, 1);
    sleep(3);

    write_GPIO("gpio16/value", "1");
    memset(readBuf, 0, sizeof(readBuf));
    read_GPIO("gpio16/value", readBuf, 1);
    sleep(3);

    write_GPIO("gpio16/value", "0");
    memset(readBuf, 0, sizeof(readBuf));
    read_GPIO("gpio16/value", readBuf, 1);
    sleep(3);
    }
    }
    }

    void CloseGPIO(void)
    {
    write_GPIO("unexport", "16");
    }

    char write_GPIO(char *filename, char *value)
    {
    char pass = 0;
    int gpio;
    char fullPath[100];
    char valueString[11];

    memset(fullPath, 0, sizeof(fullPath));
    memset(valueString, 0, sizeof(valueString));
    strcpy(fullPath, GPIO_PATH);
    strcat(fullPath, filename);
    gpio = open(fullPath, O_WRONLY);
    if(gpio != 0)
    {
    write(gpio, value, strlen(value));
    close(gpio);
    pass = 1;
    }

    return pass;
    }

    char read_GPIO(char *filename, char *value, int length)
    {
    char pass = 0;
    int gpio;
    char fullPath[100];
    char valueString[11];

    memset(fullPath, 0, sizeof(fullPath));
    memset(valueString, 0, sizeof(valueString));
    strcpy(fullPath, GPIO_PATH);
    strcat(fullPath, filename);
    gpio = open(fullPath, O_RDONLY);
    if(gpio != 0)
    {
    read(gpio, value, length);
    close(gpio);
    pass = 1;
    }

    return pass;
    }

    what am i doing wrong?
  • cobsonchael,

    Can we start simpler? Can you verify that you can modify a GPIO that is on the board and already used just to get used to the interface in a simpler format?

    I just booted an AM437x SK using the current SDK. I then went to /sys/class/leds and there are 4 LEDs listed. These are the LEDs on the top of the SK by the buttons on the right hands side of the touch screen. These correspond to the 4 leds, led0 - led3, listed in the am437x-sk-evm.dts file. In fact, the labels in the DTS file correspond to the directory names in sysfs.

    I can then go into any of these directories. I chose the am437x-sk:red:heartbeat directory. There are several things here that you can play with. To make sure it was working I simply turned off the heartbeat:

    echo none > trigger

    The red LED stopped blinking.

    echo heartbeat > trigger

    The red LED starts blinking again.

    Can you play around with these and make sure it all makes sense?

    Since these are set up for you, you don't have to do the exports and such.

    You can then use the compatible field in the DTS file "gpio-leds" to find the driver source and start correlating all of that to what you are seeing in sysfs. To go deeper, try putting some printks in the source and rebuilding it to make sure you see prints where you expected them in the driver call flow.

    Hope this helps.
  • so i believe i am not using the SK board, as the gpio's listed for the keyboard are not what shows up on the schematic for my EVM, i believe i am using a "gp" board. when i look at the gp_evm dts file i have no leds listed and there are non in the sys/class/leds folder, and when i look at the gpio directory in sys/class/gpio all i have is gpio16 (i have gpiochip directories, though), which also isn't in the dts file. i don't have any gpio folders already set up for me besides 16. when i change it to export gpio1, which is in the dts file but not in any folder, it should be changing status led 0, or d12, but just like with gpio16, gpio14 it does nothing. the directory gets created when i export, the files change when i change them and read them back, but nothing happens with the LED physically.
  • OK, the LEDs need to be added to the DTS file, along with Pin Muxing. I will try to look further into this next week to describe how to enable these.

    Essentially, the DTS info needs to be copied from the SK and adapted accordingly.
  • so since this is an EVM board, why are all the LEDs and unshared GPIOs not defined for the drivers? i asked before if this is something i needed to add in and i was told that all gpios are accessible and i shouldn't have to write anything to get them to work. apparently we need to change the pinmux and dts file in order to get them to work.

    another question: you kept assuming i have the board associated with the sk dts file. is the gp board not common? is it new? do most of the people helping on e2e assume we have the sk board?

    just to understand - as the EVM is currently (default) configured i have no control over any GPIO or LED on this board, is that correct?
  • cobsonchael said:
    so since this is an EVM board, why are all the LEDs and unshared GPIOs not defined for the drivers?

    I'm sorry, I don't know.

    cobsonchael said:
    is the gp board not common? is it new? do most of the people helping on e2e assume we have the sk board?

    It was my mistake. The board is not new. No, I don't think anyone else should make the mistake I did if you say you are using the EVM.

    cobsonchael said:

    just to understand - as the EVM is currently (default) configured i have no control over any GPIO or LED on this board, is that correct?

    Correct. No entries in the DT means no drivers being probed and no sysfs entries being created (because there is no driver loaded to interact with them).

    I'm working on having them enabled by tomorrow.

  • So, I made the following changes to the am437x-gp-evm.dts file to add LED support for the 6 USR LEDs (I ignored the two that are also tied to the EMU pins).

    diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
    index 629979d..241f967 100644
    --- a/arch/arm/boot/dts/am437x-gp-evm.dts
    +++ b/arch/arm/boot/dts/am437x-gp-evm.dts
    @@ -86,7 +86,51 @@
     				0x0101006a      /* RIGHT */
     				0x02000069      /* LEFT */
     				0x0201006c>;      /* DOWN */
    +	};
    +
    +	leds {
    +		compatible = "gpio-leds";
    +
    +		pinctrl-names = "default";
    +		pinctrl-0 = <&leds_pins_default>;
    +
    +		led0 {
    +			label = "am437x-evm:green:usr0";
    +			gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;	/* Bank 3, pin 18 */
    +			default-state = "off";
    +		};
    +
    +		led1 {
    +			label = "am437x-evm:yellow:usr3";
    +			gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>;	/* Bank 5, pin 10 */
    +			default-state = "off";
    +		};
    +
    +		led2 {
    +			label = "am437x-evm:yellow:usr4";
    +			gpios = <&gpio5 11 GPIO_ACTIVE_HIGH>;	/* Bank 5, pin 11 */
    +			default-state = "off";
    +		};
    +
    +		led3 {
    +			label = "am437x-evm:orange:usr5";
    +			gpios = <&gpio5 12 GPIO_ACTIVE_HIGH>;	/* Bank 5, pin 12 */
    +			default-state = "off";
    +		};
    +
    +		led4 {
    +			label = "am437x-evm:blue:usr6";
    +			gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>;	/* Bank 5, pin 13 */
    +			default-state = "off";
    +		};
    +
    +		led5 {
    +			label = "am437x-evm:red:heartbeat";
    +			gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;	/* Bank 5, pin 4 */
    +			linux,default-trigger = "heartbeat";
    +			default-state = "off";
     		};
    +	};
     
     	lcd0: display {
     		compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
    @@ -536,13 +580,7 @@
     			AM4372_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE7)
     			AM4372_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE7)
     			AM4372_IOPAD(0x99c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    -			AM4372_IOPAD(0x9a0, PIN_INPUT_PULLDOWN | MUX_MODE7)
     			AM4372_IOPAD(0xa3c, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    -			AM4372_IOPAD(0xa40, PIN_INPUT_PULLDOWN | MUX_MODE7)
    -			AM4372_IOPAD(0xa44, PIN_INPUT_PULLDOWN | MUX_MODE7)
    -			AM4372_IOPAD(0xa48, PIN_INPUT_PULLDOWN | MUX_MODE7)
    -			AM4372_IOPAD(0xa4c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    -			AM4372_IOPAD(0xa50, PIN_INPUT_PULLDOWN | MUX_MODE7)
     			AM4372_IOPAD(0xa54, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
     			AM4372_IOPAD(0xa58, PIN_INPUT_PULLDOWN | MUX_MODE7)
     			AM4372_IOPAD(0xa60, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    @@ -602,6 +640,17 @@
     		>;
     	};
     
    +	leds_pins_default: leds_pins_default {
    +		pinctrl-single,pins = <
    +			AM4372_IOPAD(0xa50, PIN_OUTPUT | MUX_MODE7)	/* (P25) spi4_sclk.gpio5[4] */
    +			AM4372_IOPAD(0xa40, PIN_OUTPUT | MUX_MODE7)	/* (G20) gpio5_10.gpio5[10] */
    +			AM4372_IOPAD(0xa44, PIN_OUTPUT | MUX_MODE7)	/* (F23) gpio5_11.gpio5[11] */
    +			AM4372_IOPAD(0xa48, PIN_OUTPUT | MUX_MODE7)	/* (E25) gpio5_12.gpio5[12] */
    +			AM4372_IOPAD(0xa4c, PIN_OUTPUT | MUX_MODE7)	/* (E24) gpio5_13.gpio5[13] */
    +			AM4372_IOPAD(0x9a0, PIN_OUTPUT | MUX_MODE7)	/* (L23) mcasp0_aclkr.gpio3[18] */
    +		>;
    +	};
    +
     	uart0_pins_default: uart0_pins_default {
     		pinctrl-single,pins = <
     			AM4372_IOPAD(0x968, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0) /* uart0_ctsn.uart0_ctsn */

    With these changes, I booted the EVM and I now have the expected entries in /sys/class/leds; specifically six entries with the labels above. I set up the red LED to be a heartbeat and it starts blinking almost immediately after the kernel boots up. This is done using the "trigger" entry, which you can explore.

    If I want to turn one of the others on, I simply do this:

    echo 1 > brightness

    And to turn it off:

    echo 0 > brightness

    This should now provide a full example for you to start exploring GPIOs further. 

    I hope you find it helpful.

  • this might seem like a stupid question but do i have to rebuild the kernal or something after making these changes? it's been a while since we had our training and i haven't started down the path of customizing any pins
  • The changes are purely DTS (Device Tree), which is built separately. You don't need to rebuild the complete kernel.

    Here are the commands assuming the RT SDK was installed in the default location (I'm showing "/home/user", this might be different):

    make ARCH=arm CROSS_COMPILE=/home/user/ti-processor-sdk-linux-rt-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- tisdk_am437x-evm-rt_defconfig

    make ARCH=arm CROSS_COMPILE=/home/user/ti-processor-sdk-linux-rt-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am437x-gp-evm.dtb

    This should build arch/arm/boot/dts/am437x-gp-evm.dtb.

    You will then need to copy the generated .dtb file to the SD Card that you are using to boot. and make sure that the boot process is picking it up. The boot files are located in the /boot directory on the rootfs partition of the SD Card.

    All of this is covered in the Software Developer's Guide if you need further instructions. 

  • when i try to just run those commands i get "no rules to make target" and when i go to the directories where those files actually live, both "tisdk_am437x-evm_defconfig" (i couldn't find -rt_defconfig) and "am437x-gp-evm.dtb", and i run the script there i get "nothing to be done for ..."

    i found the defconfig file in ti-<SDK stuff>/board_support/linux-4<blah blah blah>/arch/arm/configs and i found the dtb file in ti-<sdk stuff>/targetNSF/boot

    also that link you gave me doesn't work, i did however find what i think you are referring to when i go to:
    software-dl.ti.com/.../Foundational_Components.html
    in section 3.3

    so did i change the wrong file? i changed the file located at ti-<SDK stuff>/board_support/linux-4<blah blah>/arch/arm/boot/dts

  • When you rebuild anything in Linux, you do it from the Linux directory as all the make files reference from there.

    So you need to be in ti-<SDK stuff>/board_support/linux-4<blah blah>
  • ah, yes. that is the piece of information i was missing

    so here is the output from the build:
    cpe@uti-cpelnx-01:linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae$ make ARCH=arm CROSS_COMPILE=/opt/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- tisdk_am437x-evm_defconfig
    HOSTCC scripts/kconfig/conf.o
    HOSTCC scripts/kconfig/zconf.tab.o
    HOSTLD scripts/kconfig/conf
    #
    # configuration written to .config
    #
    cpe@uti-cpelnx-01:linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae$ make ARCH=arm CROSS_COMPILE=/opt/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am437x-gp-evm.dtb
    scripts/kconfig/conf --silentoldconfig Kconfig
    CC scripts/mod/empty.o
    MKELF scripts/mod/elfconfig.h
    HOSTCC scripts/mod/modpost.o
    CC scripts/mod/devicetable-offsets.s
    GEN scripts/mod/devicetable-offsets.h
    HOSTCC scripts/mod/file2alias.o
    HOSTCC scripts/mod/sumversion.o
    HOSTLD scripts/mod/modpost
    DTC arch/arm/boot/dts/am437x-gp-evm.dtb


    i went to the "/ti-<SDK stuff>/board_support/linux-<blah>/arch/arm/boot/dts/am437x-gp-evm.dtb" file and copied it onto my target in the boot directory. i rebooted the EVM and there were no changes so the led folder in /sys/class/ and no additional gpio folders either. i must be missing something
  • Did you add the DT changes I posted earlier before you rebuilt the file?

    If so, when you copied the file, are you sure it copied? There is a symlink in the boot directory of the rootfs partition that already has that name and it will often cause the copy to fail. You need to remove the symlink before the copy.

    You can also check the date code to make sure that you have the new file.
  • i did make those changes first.

    i wasn't sure i was copying it, since it wasn't working. i took the SDCard out of the EVM, plugged it into my host machine, did a sudo cp from my host to the card, verified on the card that the file was changed and put it back into the EVM board.

    just so i have it right. here is my dts file:

    /*
     * Copyright (C) 2013 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.
     */
    
    /* AM437x GP EVM */
    
    /dts-v1/;
    
    #include "am4372.dtsi"
    #include <dt-bindings/pinctrl/am43xx.h>
    #include <dt-bindings/pwm/pwm.h>
    #include <dt-bindings/gpio/gpio.h>
    
    / {
    	model = "TI AM437x GP EVM";
    	compatible = "ti,am437x-gp-evm","ti,am4372","ti,am43";
    
    	aliases {
    		display0 = &lcd0;
    	};
    
    	chosen {
    		stdout-path = &uart0;
    	};
    
    	evm_v3_3d: fixedregulator-v3_3d {
    		compatible = "regulator-fixed";
    		regulator-name = "evm_v3_3d";
    		regulator-min-microvolt = <3300000>;
    		regulator-max-microvolt = <3300000>;
    		enable-active-high;
    	};
    
    	vtt_fixed: fixedregulator-vtt {
    		compatible = "regulator-fixed";
    		regulator-name = "vtt_fixed";
    		regulator-min-microvolt = <1500000>;
    		regulator-max-microvolt = <1500000>;
    		regulator-always-on;
    		regulator-boot-on;
    		enable-active-high;
    		gpio = <&gpio5 7 GPIO_ACTIVE_HIGH>;
    	};
    
    	vmmcwl_fixed: fixedregulator-mmcwl {
    		compatible = "regulator-fixed";
    		regulator-name = "vmmcwl_fixed";
    		regulator-min-microvolt = <1800000>;
    		regulator-max-microvolt = <1800000>;
    		gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>;
    		enable-active-high;
    	};
    
    	lcd_bl: backlight {
    		compatible = "pwm-backlight";
    		pwms = <&ecap0 0 50000 PWM_POLARITY_INVERTED>;
    		brightness-levels = <0 51 53 56 62 75 101 152 255>;
    		default-brightness-level = <8>;
    	};
    
    	matrix_keypad: matrix_keypad0 {
    		compatible = "gpio-matrix-keypad";
    		debounce-delay-ms = <5>;
    		col-scan-delay-us = <2>;
    
    		pinctrl-names = "default", "sleep";
    		pinctrl-0 = <&matrix_keypad_default>;
    		pinctrl-1 = <&matrix_keypad_sleep>;
    
    		linux,wakeup;
    
    		row-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH /* Bank0, pin3 */
    				&gpio4 3 GPIO_ACTIVE_HIGH /* Bank4, pin3 */
    				&gpio4 2 GPIO_ACTIVE_HIGH>; /* Bank4, pin2 */
    
    		col-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH /* Bank3, pin19 */
    				&gpio3 20 GPIO_ACTIVE_HIGH>; /* Bank3, pin20 */
    
    		linux,keymap = <0x00000201      /* P1 */
    				0x00010202      /* P2 */
    				0x01000067      /* UP */
    				0x0101006a      /* RIGHT */
    				0x02000069      /* LEFT */
    				0x0201006c>;      /* DOWN */
    		};
    
    	leds {
    	       compatible = "gpio-leds";
    
    	       pinctrl-names = "default";
    	       pinctrl-0 = <&leds_pins_default>;
    
    	       led0 {
    		   label = "am437x-evm:green:usr0";
    		   gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>; /* Bank 3, pin 18 */
    		   default-state = "off";
    	       };
    
    	       led1 {
    		   label = "am437x-evm:yellow:usr3";
    		   gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 10 */
    		   default-state = "off";
    	       };
    
    	       led2 {
    		   label = "am437x-evm:yellow:usr4";
    		   gpios = <&gpio5 11 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 11 */
    		   default-state = "off";
    	       };
    
    	       led3 {
    		   label = "am437x-evm:orange:usr5";
    		   gpios = <&gpio5 12 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 12 */
    		   default-state = "off";
    	       };
    
    	       led4 {
    		   label = "am437x-evm:blue:usr6";
    		   gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 13 */
    		   default-state = "off";
    	       };
    
    	       led5 {
    		   label = "am437x-evm:red:heartbeat";
    		   gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>;  /* Bank 5, pin 4 */
    		   linux,default-trigger = "heartbeat";
    		   default-state = "off";
    		};
    	   };
    
    	lcd0: display {
    		compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
    		label = "lcd";
    
    		backlight = <&lcd_bl>;
    
    		panel-timing {
    			clock-frequency = <33000000>;
    			hactive = <800>;
    			vactive = <480>;
    			hfront-porch = <210>;
    			hback-porch = <16>;
    			hsync-len = <30>;
    			vback-porch = <10>;
    			vfront-porch = <22>;
    			vsync-len = <13>;
    			hsync-active = <0>;
    			vsync-active = <0>;
    			de-active = <1>;
    			pixelclk-active = <1>;
    		};
    
    		port {
    			lcd_in: endpoint {
    				remote-endpoint = <&dpi_out>;
    			};
    		};
    	};
    
    	/* fixed 12MHz oscillator */
    	refclk: oscillator {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <12000000>;
    	};
    
    	/* fixed 32k external oscillator clock */
    	clk_32k_rtc: clk_32k_rtc {
    		#clock-cells = <0>;
    		compatible = "fixed-clock";
    		clock-frequency = <32768>;
    	};
    
    	sound0: sound0 {
    		compatible = "simple-audio-card";
    		simple-audio-card,name = "AM437x-GP-EVM";
    		simple-audio-card,widgets =
    			"Headphone", "Headphone Jack",
    			"Line", "Line In";
    		simple-audio-card,routing =
    			"Headphone Jack",	"HPLOUT",
    			"Headphone Jack",	"HPROUT",
    			"LINE1L",		"Line In",
    			"LINE1R",		"Line In";
    		simple-audio-card,format = "dsp_b";
    		simple-audio-card,bitclock-master = <&sound0_master>;
    		simple-audio-card,frame-master = <&sound0_master>;
    		simple-audio-card,bitclock-inversion;
    
    		simple-audio-card,cpu {
    			sound-dai = <&mcasp1>;
    			system-clock-frequency = <12000000>;
    		};
    
    		sound0_master: simple-audio-card,codec {
    			sound-dai = <&tlv320aic3106>;
    			system-clock-frequency = <12000000>;
    		};
    	};
    
    	audio_mstrclk: mclk_osc {
    		compatible = "fixed-clock";
    		#clock-cells = <0>;
    		clock-frequency = <12000000>;
    	};
    
    };
    
    &am43xx_pinmux {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&wlan_pins_default &ddr3_vtt_toggle_default &unused_pins &debugss_pins>;
    	pinctrl-1 = <&wlan_pins_sleep>;
    
    	ddr3_vtt_toggle_default: ddr_vtt_toggle_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0xa5c, DS0_PULL_UP_DOWN_EN | PIN_OUTPUT_PULLUP | DS0_FORCE_OFF_MODE | MUX_MODE7)
    		>;
    	};
    
    	i2c0_pins: i2c0_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x988, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_sda.i2c0_sda */
    			AM4372_IOPAD(0x98c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)  /* i2c0_scl.i2c0_scl */
    		>;
    	};
    
    	i2c1_pins: i2c1_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x95c, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_cs0.i2c1_scl */
    			AM4372_IOPAD(0x958, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE2)  /* spi0_d1.i2c1_sda  */
    		>;
    	};
    
    	mmc1_pins: pinmux_mmc1_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
    		>;
    	};
    
    	ecap0_pins: backlight_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x964, MUX_MODE0)       /* eCAP0_in_PWM0_out.eCAP0_in_PWM0_out MODE0 */
    		>;
    	};
    
    	pixcir_ts_pins: pixcir_ts_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0xa64, PIN_INPUT_PULLUP | MUX_MODE7)  /* spi2_d0.gpio3_22 */
    		>;
    	};
    
    	cpsw_default: cpsw_default {
    		pinctrl-single,pins = <
    			/* Slave 1 */
    			AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txen.rgmii1_txen */
    			AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxdv.rgmii1_rxctl */
    			AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd1.rgmii1_txd3 */
    			AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd0.rgmii1_txd2 */
    			AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd1.rgmii1_txd1 */
    			AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txd0.rgmii1_txd0 */
    			AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* mii1_txclk.rmii1_tclk */
    			AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxclk.rmii1_rclk */
    			AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rxd3 */
    			AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rxd2 */
    			AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rxd1 */
    			AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rxd0 */
    		>;
    	};
    
    	cpsw_sleep: cpsw_sleep {
    		pinctrl-single,pins = <
    			/* Slave 1 reset value */
    			AM4372_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	davinci_mdio_default: davinci_mdio_default {
    		pinctrl-single,pins = <
    			/* MDIO */
    			AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0)	/* mdio_data.mdio_data */
    			AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0)			/* mdio_clk.mdio_clk */
    		>;
    	};
    
    	davinci_mdio_sleep: davinci_mdio_sleep {
    		pinctrl-single,pins = <
    			/* MDIO reset value */
    			AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	nand_flash_x8: nand_flash_x8 {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x800, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad0.gpmc_ad0 */
    			AM4372_IOPAD(0x804, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad1.gpmc_ad1 */
    			AM4372_IOPAD(0x808, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad2.gpmc_ad2 */
    			AM4372_IOPAD(0x80c, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad3.gpmc_ad3 */
    			AM4372_IOPAD(0x810, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad4.gpmc_ad4 */
    			AM4372_IOPAD(0x814, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad5.gpmc_ad5 */
    			AM4372_IOPAD(0x818, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad6.gpmc_ad6 */
    			AM4372_IOPAD(0x81c, PIN_INPUT  | MUX_MODE0)	/* gpmc_ad7.gpmc_ad7 */
    			AM4372_IOPAD(0x870, PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wait0.gpmc_wait0 */
    			AM4372_IOPAD(0x874, PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_wpn.gpmc_wpn */
    			AM4372_IOPAD(0x87c, PIN_OUTPUT | MUX_MODE0)		/* gpmc_csn0.gpmc_csn0  */
    			AM4372_IOPAD(0x890, PIN_OUTPUT | MUX_MODE0)		/* gpmc_advn_ale.gpmc_advn_ale */
    			AM4372_IOPAD(0x894, PIN_OUTPUT | MUX_MODE0)		/* gpmc_oen_ren.gpmc_oen_ren */
    			AM4372_IOPAD(0x898, PIN_OUTPUT | MUX_MODE0)		/* gpmc_wen.gpmc_wen */
    			AM4372_IOPAD(0x89c, PIN_OUTPUT | MUX_MODE0)		/* gpmc_be0n_cle.gpmc_be0n_cle */
    		>;
    	};
    
    	dss_pins: dss_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x820, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 8 -> DSS DATA 23 */
    			AM4372_IOPAD(0x824, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x828, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x82c, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x830, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x834, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x838, PIN_OUTPUT_PULLUP | MUX_MODE1)
    			AM4372_IOPAD(0x83c, PIN_OUTPUT_PULLUP | MUX_MODE1) /*gpmc ad 15 -> DSS DATA 16 */
    			AM4372_IOPAD(0x8a0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 0 */
    			AM4372_IOPAD(0x8a4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8a8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8ac, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8b0, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8b4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8b8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8bc, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8c0, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8c4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8cc, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8d4, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8d8, PIN_OUTPUT_PULLUP | MUX_MODE0)
    			AM4372_IOPAD(0x8dc, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS DATA 15 */
    			AM4372_IOPAD(0x8e0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS VSYNC */
    			AM4372_IOPAD(0x8e4, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS HSYNC */
    			AM4372_IOPAD(0x8e8, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS PCLK */
    			AM4372_IOPAD(0x8ec, PIN_OUTPUT_PULLUP | MUX_MODE0) /* DSS AC BIAS EN */
    
    		>;
    	};
    
    	display_mux_pins: display_mux_pins {
    		pinctrl-single,pins = <
    			/* GPIO 5_8 to select LCD / HDMI */
    			AM4372_IOPAD(0xa38, PIN_OUTPUT_PULLUP | MUX_MODE7)
    		>;
    	};
    
    	dcan0_default: dcan0_default_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x978, PIN_OUTPUT | MUX_MODE2)		/* uart1_ctsn.d_can0_tx */
    			AM4372_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE2)	/* uart1_rtsn.d_can0_rx */
    		>;
    	};
    
    	dcan0_sleep: dcan0_sleep_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE7)	/* uart1_ctsn.gpio0_12 */
    			AM4372_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE7)	/* uart1_rtsn.gpio0_13 */
    		>;
    	};
    
    	dcan1_default: dcan1_default_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x980, PIN_OUTPUT | MUX_MODE2)		/* uart1_rxd.d_can1_tx */
    			AM4372_IOPAD(0x984, PIN_INPUT_PULLUP | MUX_MODE2)	/* uart1_txd.d_can1_rx */
    		>;
    	};
    
    	dcan1_sleep: dcan1_sleep_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE7)	/* uart1_rxd.gpio0_14 */
    			AM4372_IOPAD(0x984, PIN_INPUT_PULLUP | MUX_MODE7)	/* uart1_txd.gpio0_15 */
    		>;
    	};
    
    	vpfe0_pins_default: vpfe0_pins_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x9b0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_hd mode 0*/
    			AM4372_IOPAD(0x9b4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_vd mode 0*/
    			AM4372_IOPAD(0x9c0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_pclk mode 0*/
    			AM4372_IOPAD(0x9c4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data8 mode 0*/
    			AM4372_IOPAD(0x9c8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data9 mode 0*/
    			AM4372_IOPAD(0xa08, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data0 mode 0*/
    			AM4372_IOPAD(0xa0c, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data1 mode 0*/
    			AM4372_IOPAD(0xa10, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data2 mode 0*/
    			AM4372_IOPAD(0xa14, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data3 mode 0*/
    			AM4372_IOPAD(0xa18, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data4 mode 0*/
    			AM4372_IOPAD(0xa1c, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data5 mode 0*/
    			AM4372_IOPAD(0xa20, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data6 mode 0*/
    			AM4372_IOPAD(0xa24, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam0_data7 mode 0*/
    		>;
    	};
    
    	vpfe0_pins_sleep: vpfe0_pins_sleep {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x9b0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_hd mode 0*/
    			AM4372_IOPAD(0x9b4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_vd mode 0*/
    			AM4372_IOPAD(0x9c0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_pclk mode 0*/
    			AM4372_IOPAD(0x9c4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data8 mode 0*/
    			AM4372_IOPAD(0x9c8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data9 mode 0*/
    			AM4372_IOPAD(0xa08, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data0 mode 0*/
    			AM4372_IOPAD(0xa0c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data1 mode 0*/
    			AM4372_IOPAD(0xa10, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data2 mode 0*/
    			AM4372_IOPAD(0xa14, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data3 mode 0*/
    			AM4372_IOPAD(0xa18, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data4 mode 0*/
    			AM4372_IOPAD(0xa1c, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data5 mode 0*/
    			AM4372_IOPAD(0xa20, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data6 mode 0*/
    			AM4372_IOPAD(0xa24, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam0_data7 mode 0*/
    		>;
    	};
    
    	vpfe1_pins_default: vpfe1_pins_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x9cc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data9 mode 0*/
    			AM4372_IOPAD(0x9d0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data8 mode 0*/
    			AM4372_IOPAD(0x9d4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_hd mode 0*/
    			AM4372_IOPAD(0x9d8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_vd mode 0*/
    			AM4372_IOPAD(0x9dC, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_pclk mode 0*/
    			AM4372_IOPAD(0x9e8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data0 mode 0*/
    			AM4372_IOPAD(0x9ec, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data1 mode 0*/
    			AM4372_IOPAD(0x9f0, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data2 mode 0*/
    			AM4372_IOPAD(0x9f4, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data3 mode 0*/
    			AM4372_IOPAD(0x9f8, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data4 mode 0*/
    			AM4372_IOPAD(0x9fc, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data5 mode 0*/
    			AM4372_IOPAD(0xa00, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data6 mode 0*/
    			AM4372_IOPAD(0xa04, PIN_INPUT_PULLUP | MUX_MODE0)  /* cam1_data7 mode 0*/
    		>;
    	};
    
    	vpfe1_pins_sleep: vpfe1_pins_sleep {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x9cc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data9 mode 0*/
    			AM4372_IOPAD(0x9d0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data8 mode 0*/
    			AM4372_IOPAD(0x9d4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_hd mode 0*/
    			AM4372_IOPAD(0x9d8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_vd mode 0*/
    			AM4372_IOPAD(0x9dc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_pclk mode 0*/
    			AM4372_IOPAD(0x9e8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data0 mode 0*/
    			AM4372_IOPAD(0x9ec, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data1 mode 0*/
    			AM4372_IOPAD(0x9f0, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data2 mode 0*/
    			AM4372_IOPAD(0x9f4, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data3 mode 0*/
    			AM4372_IOPAD(0x9f8, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data4 mode 0*/
    			AM4372_IOPAD(0x9fc, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data5 mode 0*/
    			AM4372_IOPAD(0xa00, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data6 mode 0*/
    			AM4372_IOPAD(0xa04, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7)  /* cam1_data7 mode 0*/
    		>;
    	};
    
    	mmc3_pins_default: pinmux_mmc3_pins_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x88c, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_clk.mmc2_clk */
    			AM4372_IOPAD(0x888, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_csn3.mmc2_cmd */
    			AM4372_IOPAD(0x844, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a1.mmc2_dat0 */
    			AM4372_IOPAD(0x848, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a2.mmc2_dat1 */
    			AM4372_IOPAD(0x84c, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_a3.mmc2_dat2 */
    			AM4372_IOPAD(0x878, PIN_INPUT_PULLUP | MUX_MODE3)      /* gpmc_be1n.mmc2_dat3 */
    		>;
    	};
    
    	mmc3_pins_sleep: pinmux_mmc3_pins_sleep {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x88c, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_clk.mmc2_clk */
    			AM4372_IOPAD(0x888, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_csn3.mmc2_cmd */
    			AM4372_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a1.mmc2_dat0 */
    			AM4372_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a2.mmc2_dat1 */
    			AM4372_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a3.mmc2_dat2 */
    			AM4372_IOPAD(0x878, PIN_INPUT_PULLDOWN | MUX_MODE7)	/* gpmc_be1n.mmc2_dat3 */
    		>;
    	};
    
    	wlan_pins_default: pinmux_wlan_pins_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE7)		/* gpmc_a4.gpio1_20 WL_EN */
    			AM4372_IOPAD(0x85c, PIN_INPUT | WAKEUP_ENABLE | MUX_MODE7)	/* gpmc_a7.gpio1_23 WL_IRQ*/
    			AM4372_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE7)		/* gpmc_a0.gpio1_16 BT_EN*/
    		>;
    	};
    
    	wlan_pins_sleep: pinmux_wlan_pins_sleep {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE7)		/* gpmc_a4.gpio1_20 WL_EN */
    			AM4372_IOPAD(0x85c, PIN_INPUT | WAKEUP_ENABLE | MUX_MODE7)	/* gpmc_a7.gpio1_23 WL_IRQ*/
    			AM4372_IOPAD(0x840, PIN_OUTPUT_PULLUP | MUX_MODE7)		/* gpmc_a0.gpio1_16 BT_EN*/
    		>;
    	};
    
    	uart3_pins: uart3_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0xa28, PIN_INPUT | MUX_MODE0)		/* uart3_rxd.uart3_rxd */
    			AM4372_IOPAD(0xa2c, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_txd.uart3_txd */
    			AM4372_IOPAD(0xa30, PIN_INPUT_PULLUP | MUX_MODE0)	/* uart3_ctsn.uart3_ctsn */
    			AM4372_IOPAD(0xa34, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart3_rtsn.uart3_rtsn */
    		>;
    	};
    
    	mcasp1_pins: mcasp1_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x908, PIN_OUTPUT_PULLDOWN | MUX_MODE4)	/* mii1_col.mcasp1_axr2 */
    			AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE4)	/* mii1_crs.mcasp1_aclkx */
    			AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE4)	/* mii1_rxerr.mcasp1_fsx */
    			AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE4)	/* rmii1_ref_clk.mcasp1_axr3 */
    		>;
    	};
    
    	mcasp1_sleep_pins: mcasp1_sleep_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	gpio0_pins: gpio0_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0xa6c, PIN_OUTPUT | MUX_MODE9) /* spi2_cs0.gpio0_23 SEL_eMMCorNANDn */
    		>;
    	};
    
    	emmc_pins_default: emmc_pins_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
    			AM4372_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
    			AM4372_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
    			AM4372_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
    			AM4372_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
    			AM4372_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
    			AM4372_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
    			AM4372_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
    			AM4372_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
    			AM4372_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
    		>;
    	};
    
    	emmc_pins_sleep: emmc_pins_sleep {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x800, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad0.gpio1_0 */
    			AM4372_IOPAD(0x804, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad1.gpio1_1 */
    			AM4372_IOPAD(0x808, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad2.gpio1_2 */
    			AM4372_IOPAD(0x80c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad3.gpio1_3 */
    			AM4372_IOPAD(0x810, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad4.gpio1_4 */
    			AM4372_IOPAD(0x814, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad5.gpio1_5 */
    			AM4372_IOPAD(0x818, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad6.gpio1_6 */
    			AM4372_IOPAD(0x81c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_ad7.gpio1_7 */
    			AM4372_IOPAD(0x880, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn1.gpio1_30 */
    			AM4372_IOPAD(0x884, PIN_INPUT_PULLDOWN | MUX_MODE7) /* gpmc_csn2.gpio1_31 */
    		>;
    	};
    
    	unused_pins: unused_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x950, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0x99c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xa3c, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    			AM4372_IOPAD(0xa54, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    			AM4372_IOPAD(0xa58, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xa60, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    			AM4372_IOPAD(0xa68, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xa70, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xa78, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xa7c, PIN_INPUT | PULL_DISABLE)
    			AM4372_IOPAD(0xac8, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xad4, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xad8, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xadc, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xae0, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xae4, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xae8, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xaec, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xaf0, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xaf4, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xaf8, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xafc, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xb00, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xb04, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xb08, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xb0c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xb10, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xb14, PIN_INPUT_PULLDOWN | MUX_MODE7)
    			AM4372_IOPAD(0xb18, PIN_INPUT_PULLDOWN | MUX_MODE7)
    		>;
    	};
    
    	debugss_pins: pinmux_debugss_pins {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0xa90, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xa94, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xa98, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xa9c, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xaa0, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xaa4, PIN_INPUT_PULLDOWN)
    			AM4372_IOPAD(0xaa8, PIN_INPUT_PULLDOWN)
    		>;
    	};
    
    	matrix_keypad_default: matrix_keypad_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x9a4, PIN_OUTPUT | MUX_MODE7)
    			AM4372_IOPAD(0x9a8, PIN_OUTPUT | MUX_MODE7)
    			AM4372_IOPAD(0x9ac, PIN_INPUT | PULL_DISABLE | MUX_MODE9)
    			AM4372_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE0)
    		>;
    	};
    
    	matrix_keypad_sleep: matrix_keypad_sleep {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x9a4, PULL_UP | MUX_MODE7)
    			AM4372_IOPAD(0x9a8, PULL_UP | MUX_MODE7)
    			AM4372_IOPAD(0x9ac, PIN_INPUT | PULL_DISABLE | MUX_MODE9)
    			AM4372_IOPAD(0x954, PIN_INPUT_PULLDOWN | MUX_MODE0)
    		>;
    	};
    
    	leds_pins_default: leds_pins_default {
    	       pinctrl-single,pins = <
    		   AM4372_IOPAD(0xa50, PIN_OUTPUT | MUX_MODE7) /* (P25) spi4_sclk.gpio5[4] */
    		   AM4372_IOPAD(0xa40, PIN_OUTPUT | MUX_MODE7) /* (G20) gpio5_10.gpio5[10] */
    		   AM4372_IOPAD(0xa44, PIN_OUTPUT | MUX_MODE7) /* (F23) gpio5_11.gpio5[11] */
    		   AM4372_IOPAD(0xa48, PIN_OUTPUT | MUX_MODE7) /* (E25) gpio5_12.gpio5[12] */
    		   AM4372_IOPAD(0xa4c, PIN_OUTPUT | MUX_MODE7) /* (E24) gpio5_13.gpio5[13] */
    		   AM4372_IOPAD(0x9a0, PIN_OUTPUT | MUX_MODE7) /* (L23) mcasp0_aclkr.gpio3[18] */
    	       >;
    	   };
    
    	uart0_pins_default: uart0_pins_default {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x968, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0) /* uart0_ctsn.uart0_ctsn */
    			AM4372_IOPAD(0x96C, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE0) /* uart0_rtsn.uart0_rtsn */
    			AM4372_IOPAD(0x970, PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_rxd.uart0_rxd */
    			AM4372_IOPAD(0x974, PIN_INPUT | PULL_DISABLE | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_txd.uart0_txd */
    		>;
    	};
    
    	uart0_pins_sleep: uart0_pins_sleep {
    		pinctrl-single,pins = <
    			AM4372_IOPAD(0x968, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* uart0_ctsn.uart0_ctsn */
    			AM4372_IOPAD(0x96C, DS0_PULL_UP_DOWN_EN | INPUT_EN | MUX_MODE7) /* uart0_rtsn.uart0_rtsn */
    			AM4372_IOPAD(0x970, PIN_INPUT_PULLUP | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_rxd.uart0_rxd */
    			AM4372_IOPAD(0x974, PIN_INPUT_PULLDOWN | SLEWCTRL_FAST | DS0_PULL_UP_DOWN_EN | MUX_MODE0) /* uart0_txd.uart0_txd */
    		>;
    	};
    };
    
    &i2c0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c0_pins>;
    	clock-frequency = <100000>;
    
    	tps65218: tps65218@24 {
    		reg = <0x24>;
    		compatible = "ti,tps65218";
    		interrupts = <GIC_SPI 7 IRQ_TYPE_NONE>; /* NMIn */
    		interrupt-controller;
    		#interrupt-cells = <2>;
    
    		dcdc1: regulator-dcdc1 {
    			regulator-name = "vdd_core";
    			regulator-min-microvolt = <912000>;
    			regulator-max-microvolt = <1144000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc2: regulator-dcdc2 {
    			regulator-name = "vdd_mpu";
    			regulator-min-microvolt = <912000>;
    			regulator-max-microvolt = <1378000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    
    		dcdc3: regulator-dcdc3 {
    			regulator-name = "vdcdc3";
    			regulator-boot-on;
    			regulator-always-on;
    			regulator-state-mem {
    				regulator-on-in-suspend;
    			};
    			regulator-state-disk {
    				regulator-off-in-suspend;
    			};
    		};
    
    		dcdc5: regulator-dcdc5 {
    			regulator-name = "v1_0bat";
    			regulator-min-microvolt = <1000000>;
    			regulator-max-microvolt = <1000000>;
    			regulator-boot-on;
    			regulator-always-on;
    			regulator-state-mem {
    				regulator-on-in-suspend;
    			};
    		};
    
    		dcdc6: regulator-dcdc6 {
    			regulator-name = "v1_8bat";
    			regulator-min-microvolt = <1800000>;
    			regulator-max-microvolt = <1800000>;
    			regulator-boot-on;
    			regulator-always-on;
    			regulator-state-mem {
    				regulator-on-in-suspend;
    			};
    		};
    
    		ldo1: regulator-ldo1 {
    			regulator-min-microvolt = <1800000>;
    			regulator-max-microvolt = <1800000>;
    			regulator-boot-on;
    			regulator-always-on;
    		};
    	};
    
    	ov2659@30 {
    		compatible = "ovti,ov2659";
    		reg = <0x30>;
    
    		clocks = <&audio_mstrclk>;
    		clock-names = "xvclk";
    
    		port {
    			ov2659_0: endpoint {
    				remote-endpoint = <&vpfe1_ep>;
    				link-frequencies = /bits/ 64 <70000000>;
    			};
    		};
    	};
    };
    
    &i2c1 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&i2c1_pins>;
    	pixcir_ts@5c {
    		compatible = "pixcir,pixcir_tangoc";
    		pinctrl-names = "default";
    		pinctrl-0 = <&pixcir_ts_pins>;
    		reg = <0x5c>;
    
    		attb-gpio = <&gpio3 22 GPIO_ACTIVE_HIGH>;
    
    		/*
    		 * 0x264 represents the offset of padconf register of
    		 * gpio3_22 from am43xx_pinmux base.
    		 */
    		interrupts-extended = <&gpio3 22 IRQ_TYPE_EDGE_FALLING>,
    				      <&am43xx_pinmux 0x264>;
    		interrupt-names = "tsc", "wakeup";
    
    		touchscreen-size-x = <1024>;
    		touchscreen-size-y = <600>;
    		wakeup-source;
    	};
    
    	ov2659@30 {
    		compatible = "ovti,ov2659";
    		reg = <0x30>;
    
    		clocks = <&audio_mstrclk>;
    		clock-names = "xvclk";
    
    		port {
    			ov2659_1: endpoint {
    				remote-endpoint = <&vpfe0_ep>;
    				link-frequencies = /bits/ 64 <70000000>;
    			};
    		};
    	};
    
    	tlv320aic3106: tlv320aic3106@1b {
    		#sound-dai-cells = <0>;
    		compatible = "ti,tlv320aic3106";
    		reg = <0x1b>;
    		status = "okay";
    
    		/* Regulators */
    		IOVDD-supply = <&evm_v3_3d>; /* V3_3D -> <tps63031> EN: V1_8D -> VBAT */
    		AVDD-supply = <&evm_v3_3d>; /* v3_3AUD -> V3_3D -> ... */
    		DRVDD-supply = <&evm_v3_3d>; /* v3_3AUD -> V3_3D -> ... */
    		DVDD-supply = <&ldo1>; /* V1_8D -> LDO1 */
    	};
    };
    
    &epwmss0 {
    	status = "okay";
    };
    
    &tscadc {
    	status = "okay";
    
    	adc {
    		ti,adc-channels = <0 1 2 3 4 5 6 7>;
    	};
    };
    
    &ecap0 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&ecap0_pins>;
    };
    
    &gpio0 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&gpio0_pins>;
    	status = "okay";
    
    	p23 {
    		gpio-hog;
    		gpios = <23 GPIO_ACTIVE_HIGH>;
    		/* SelEMMCorNAND selects between eMMC and NAND:
    		 * Low: NAND
    		 * High: eMMC
    		 * When changing this line make sure the newly
    		 * selected device node is enabled and the previously
    		 * selected device node is disabled.
    		 */
    		output-low;
    		line-name = "SelEMMCorNAND";
    	};
    };
    
    &gpio1 {
    	status = "okay";
    };
    
    &gpio3 {
    	status = "okay";
    };
    
    &gpio4 {
    	status = "okay";
    };
    
    &gpio5 {
    	pinctrl-names = "default";
    	pinctrl-0 = <&display_mux_pins>;
    	status = "okay";
    	ti,no-reset-on-init;
    
    	p8 {
    		/*
    		 * SelLCDorHDMI selects between display and audio paths:
    		 * Low: HDMI display with audio via HDMI
    		 * High: LCD display with analog audio via aic3111 codec
    		 */
    		gpio-hog;
    		gpios = <8 GPIO_ACTIVE_HIGH>;
    		output-high;
    		line-name = "SelLCDorHDMI";
    	};
    };
    
    &mmc1 {
    	status = "okay";
    	vmmc-supply = <&evm_v3_3d>;
    	bus-width = <4>;
    	pinctrl-names = "default";
    	pinctrl-0 = <&mmc1_pins>;
    	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
    };
    
    /* eMMC sits on mmc2 */
    &mmc2 {
    	/*
    	 * When enabling eMMC, disable GPMC/NAND and set
    	 * SelEMMCorNAND to output-high
    	 */
    	status = "disabled";
    	vmmc-supply = <&evm_v3_3d>;
    	bus-width = <8>;
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&emmc_pins_default>;
    	pinctrl-1 = <&emmc_pins_sleep>;
    	ti,non-removable;
    };
    
    &mmc3 {
    	status = "okay";
    	/* these are on the crossbar and are outlined in the
    	   xbar-event-map element */
    	dmas = <&edma_xbar 30 0 1>,
    		<&edma_xbar 31 0 2>;
    	dma-names = "tx", "rx";
    	vmmc-supply = <&vmmcwl_fixed>;
    	bus-width = <4>;
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&mmc3_pins_default>;
    	pinctrl-1 = <&mmc3_pins_sleep>;
    	cap-power-off-card;
    	keep-power-in-suspend;
    	ti,non-removable;
    
    	#address-cells = <1>;
    	#size-cells = <0>;
    	wlcore: wlcore@0 {
    		compatible = "ti,wl1835";
    		reg = <2>;
    		interrupt-parent = <&gpio1>;
    		interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
    	};
    };
    
    &uart3 {
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&uart3_pins>;
    };
    
    &usb2_phy1 {
    	status = "okay";
    };
    
    &usb1 {
    	dr_mode = "otg";
    	status = "okay";
    };
    
    &usb2_phy2 {
    	status = "okay";
    };
    
    &usb2 {
    	dr_mode = "host";
    	status = "okay";
    };
    
    &mac {
    	slaves = <1>;
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&cpsw_default>;
    	pinctrl-1 = <&cpsw_sleep>;
    	status = "okay";
    };
    
    &davinci_mdio {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&davinci_mdio_default>;
    	pinctrl-1 = <&davinci_mdio_sleep>;
    	status = "okay";
    };
    
    &cpsw_emac0 {
    	phy_id = <&davinci_mdio>, <0>;
    	phy-mode = "rgmii";
    };
    
    &elm {
    	status = "okay";
    };
    
    &gpmc {
    	/*
    	 * When enabling GPMC, disable eMMC and set
    	 * SelEMMCorNAND to output-low
    	 */
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&nand_flash_x8>;
    	ranges = <0 0 0x08000000 0x01000000>;	/* CS0 space. Min partition = 16MB */
    	nand@0,0 {
    		compatible = "ti,omap2-nand";
    		reg = <0 0 4>;		/* device IO registers */
    		interrupt-parent = <&gpmc>;
    		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
    			     <1 IRQ_TYPE_NONE>;	/* termcount */
    		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>;	/* gpmc_wait0 */
    		ti,nand-xfer-type = "prefetch-dma";
    		ti,nand-ecc-opt = "bch16";
    		ti,elm-id = <&elm>;
    		nand-bus-width = <8>;
    		gpmc,device-width = <1>;
    		gpmc,sync-clk-ps = <0>;
    		gpmc,cs-on-ns = <0>;
    		gpmc,cs-rd-off-ns = <40>;
    		gpmc,cs-wr-off-ns = <40>;
    		gpmc,adv-on-ns = <0>;
    		gpmc,adv-rd-off-ns = <25>;
    		gpmc,adv-wr-off-ns = <25>;
    		gpmc,we-on-ns = <0>;
    		gpmc,we-off-ns = <20>;
    		gpmc,oe-on-ns = <3>;
    		gpmc,oe-off-ns = <30>;
    		gpmc,access-ns = <30>;
    		gpmc,rd-cycle-ns = <40>;
    		gpmc,wr-cycle-ns = <40>;
    		gpmc,bus-turnaround-ns = <0>;
    		gpmc,cycle2cycle-delay-ns = <0>;
    		gpmc,clk-activation-ns = <0>;
    		gpmc,wr-access-ns = <40>;
    		gpmc,wr-data-mux-bus-ns = <0>;
    		/* MTD partition table */
    		/* All SPL-* partitions are sized to minimal length
    		 * which can be independently programmable. For
    		 * NAND flash this is equal to size of erase-block */
    		#address-cells = <1>;
    		#size-cells = <1>;
    		partition@0 {
    			label = "NAND.SPL";
    			reg = <0x00000000 0x00040000>;
    		};
    		partition@1 {
    			label = "NAND.SPL.backup1";
    			reg = <0x00040000 0x00040000>;
    		};
    		partition@2 {
    			label = "NAND.SPL.backup2";
    			reg = <0x00080000 0x00040000>;
    		};
    		partition@3 {
    			label = "NAND.SPL.backup3";
    			reg = <0x000c0000 0x00040000>;
    		};
    		partition@4 {
    			label = "NAND.u-boot-spl-os";
    			reg = <0x00100000 0x00080000>;
    		};
    		partition@5 {
    			label = "NAND.u-boot";
    			reg = <0x00180000 0x00100000>;
    		};
    		partition@6 {
    			label = "NAND.u-boot-env";
    			reg = <0x00280000 0x00040000>;
    		};
    		partition@7 {
    			label = "NAND.u-boot-env.backup1";
    			reg = <0x002c0000 0x00040000>;
    		};
    		partition@8 {
    			label = "NAND.kernel";
    			reg = <0x00300000 0x00700000>;
    		};
    		partition@9 {
    			label = "NAND.file-system";
    			reg = <0x00a00000 0x1f600000>;
    		};
    	};
    };
    
    &uart0 {
    	status = "okay";
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&uart0_pins_default>;
    	pinctrl-1 = <&uart0_pins_sleep>;
    };
    
    &dss {
    	status = "ok";
    
    	pinctrl-names = "default";
    	pinctrl-0 = <&dss_pins>;
    
    	port {
    		dpi_out: endpoint {
    			remote-endpoint = <&lcd_in>;
    			data-lines = <24>;
    		};
    	};
    };
    
    &dcan0 {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&dcan0_default>;
    	pinctrl-1 = <&dcan0_sleep>;
    	status = "okay";
    };
    
    &dcan1 {
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&dcan1_default>;
    	pinctrl-1 = <&dcan1_sleep>;
    	status = "okay";
    };
    
    &vpfe0 {
    	status = "okay";
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&vpfe0_pins_default>;
    	pinctrl-1 = <&vpfe0_pins_sleep>;
    
    	port {
    		vpfe0_ep: endpoint {
    			remote-endpoint = <&ov2659_1>;
    			ti,am437x-vpfe-interface = <0>;
    			bus-width = <8>;
    			hsync-active = <0>;
    			vsync-active = <0>;
    		};
    	};
    };
    
    &vpfe1 {
    	status = "okay";
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&vpfe1_pins_default>;
    	pinctrl-1 = <&vpfe1_pins_sleep>;
    
    	port {
    		vpfe1_ep: endpoint {
    			remote-endpoint = <&ov2659_0>;
    			ti,am437x-vpfe-interface = <0>;
    			bus-width = <8>;
    			hsync-active = <0>;
    			vsync-active = <0>;
    		};
    	};
    };
    
    &mcasp1 {
    	#sound-dai-cells = <0>;
    	pinctrl-names = "default", "sleep";
    	pinctrl-0 = <&mcasp1_pins>;
    	pinctrl-1 = <&mcasp1_sleep_pins>;
    
    	status = "okay";
    
    	op-mode = <0>; /* MCASP_IIS_MODE */
    	tdm-slots = <2>;
    	/* 4 serializers */
    	serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
    		0 0 1 2
    	>;
    	tx-num-evt = <32>;
    	rx-num-evt = <32>;
    };
    
    &rtc {
    	clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
    	clock-names = "ext-clk", "int-clk";
    	status = "okay";
    };
    
    &cpu {
    	cpu0-supply = <&dcdc2>;
    };
    
    &wkup_m3_ipc {
    	ti,set-io-isolation;
    	ti,scale-data-fw = "am43x-evm-scale-data.bin";
    };
    
    &pruss_soc_bus {
    	status = "okay";
    
    	pruss1: pruss@54400000 {
    		status = "okay";
    
    		pru1_0: pru@54434000 {
    			status = "okay";
    		};
    
    		pru1_1: pru@54438000 {
    			status = "okay";
    		};
    	};
    
    	pruss0: pruss@54440000 {
    		status = "okay";
    
    		pru0_0: pru@54474000 {
    			status = "okay";
    		};
    
    		pru0_1: pru@54478000 {
    			status = "okay";
    		};
    	};
    };
    
    &sgx {
    	status = "okay";
    };

    i then go to the /opt/ti-<SDK stuff>/board-support/linux-4<blah> directory and type in:

    make ARCH=arm CROSS_COMPILE=/opt/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- tisdk_am437x-evm_defconfig

    (notice it is not -rt_defconfig, that does not work)

    then i type in:

    make ARCH=arm CROSS_COMPILE=/opt/ti-processor-sdk-linux-am437x-evm-04.03.00.05/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/arm-linux-gnueabihf- am437x-gp-evm.dtb

    then i go to  /opt/ti-<SDK stuff>/board-support/linux-4<blah>/arch/arm/boot/dts, verify that the dtb file did just change.

    shut down evm

    take sd card out of evm and put it in my host

    sudo cp from /opt/ti-<SDK stuff>/board-support/linux-4<blah>/arch/arm/boot/dts to /boot/

    verify the dtb file changed

    put sdcard back in evm

    boot evm

    look in sys/class/leds for files.

    nothing there. fail.

    look in targetNSF, that file is still old.

    remove dtb from targetNSF/boot

    cp new dtb to boot

    reboot evm

    look in sys/class/leds. nothing. fail.

    what am i doing wrong?

  • Are you booting over NFS or SD Card? Can you please attache a full boot log from your boot so I can see what is going on?
  • nsf

    U-Boot SPL 2017.01-gc68ed086bd (Mar 26 2018 - 14:49:09)
    Trying to boot from MMC1
    SPL: Please implement spl_start_uboot() for your board
    SPL: Direct Linux boot not active!
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img
    reading u-boot.img


    U-Boot 2017.01-gc68ed086bd (Mar 26 2018 - 14:49:09 -0400)

    CPU : AM437X-GP rev 1.2
    Model: TI AM437x GP EVM
    DRAM: 2 GiB
    PMIC: TPS65218
    NAND: 512 MiB
    MMC: OMAP SD/MMC: 0
    reading uboot.env
    Net: cpsw, usb_ether
    Hit any key to stop autoboot: 0
    reading uEnv.txt
    717 bytes read in 5 ms (139.6 KiB/s)
    Importing environment from mmc0 ...
    link up on port 0, speed 100, half duplex
    BOOTP broadcast 1
    DHCP client bound to address 192.168.1.3 (231 ms)
    link up on port 0, speed 100, half duplex
    Using cpsw device
    TFTP from server 192.168.1.5; our IP address is 192.168.1.3
    Filename 'zImage-am437x-evm.bin'.
    Load address: 0x82000000
    Loading: #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    #################################################################
    ##############################################################
    1.7 MiB/s
    done
    Bytes transferred = 3641944 (379258 hex)
    link up on port 0, speed 100, half duplex
    Using cpsw device
    TFTP from server 192.168.1.5; our IP address is 192.168.1.3
    Filename 'am437x-gp-evm.dtb'.
    Load address: 0x88000000
    Loading: ###########
    1.2 MiB/s
    done
    Bytes transferred = 54391 (d477 hex)
    ## Flattened Device Tree blob at 88000000
    Booting using the fdt blob at 0x88000000
    Loading Device Tree to 8ffef000, end 8ffff476 ... OK

    Starting kernel ...

    [ 0.000000] Booting Linux on physical CPU 0x0
    [ 0.000000] Linux version 4.9.69-g9ce43c71ae (gtbldadm@ubuntu-16) (gcc versi8
    [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
    [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instructie
    [ 0.000000] OF: fdt:Machine model: TI AM437x GP EVM
    [ 0.000000] efi: Getting EFI parameters from FDT:
    [ 0.000000] efi: UEFI not found.
    [ 0.000000] cma: Reserved 48 MiB at 0xfcc00000
    [ 0.000000] Memory policy: Data cache writeback
    [ 0.000000] CPU: All CPU(s) started in SVC mode.
    [ 0.000000] AM437x ES1.2 (sgx neon)
    [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pa9
    [ 0.000000] Kernel command line: console=ttyO0,115200n8 video=HDMI-A-1:800x6p
    [ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [ 0.000000] Memory: 2016632K/2097148K available (7168K kernel code, 292K rwd)
    [ 0.000000] Virtual kernel memory layout:
    [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
    [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
    [ 0.000000] vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
    [ 0.000000] lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
    [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
    [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
    [ 0.000000] .text : 0xc0008000 - 0xc0800000 (8160 kB)
    [ 0.000000] .init : 0xc0b00000 - 0xc0c00000 (1024 kB)
    [ 0.000000] .data : 0xc0c00000 - 0xc0c49048 ( 293 kB)
    [ 0.000000] .bss : 0xc0c49048 - 0xc0c8f774 ( 282 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] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e40
    [ 0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x0
    [ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
    [ 0.000000] OMAP L2C310: ROM does not support power control setting
    [ 0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
    [ 0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
    [ 0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
    [ 0.000000] OMAP clockevent source: timer2 at 24000000 Hz
    [ 0.000011] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 8947s
    [ 0.000028] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, mas
    [ 0.000037] OMAP clocksource: timer1 at 24000000 Hz
    [ 0.000416] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xfffffffs
    [ 0.000427] OMAP clocksource: 32k_counter at 32768 Hz
    [ 0.000795] Console: colour dummy device 80x30
    [ 0.000823] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
    [ 0.000829] This ensures that you still see kernel messages. Please
    [ 0.000833] update your kernel commandline.
    [ 0.000852] Calibrating delay loop... 1987.37 BogoMIPS (lpj=9936896)
    [ 0.060172] pid_max: default: 32768 minimum: 301
    [ 0.060286] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.060298] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [ 0.061043] CPU: Testing write buffer coherency: ok
    [ 0.061389] Setting up static identity map for 0x80100000 - 0x80100060
    [ 0.062157] EFI services will not be available.
    [ 0.063101] devtmpfs: initialized
    [ 0.074552] VFP support v0.3: implementor 41 architecture 3 part 30 variant 4
    [ 0.074857] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ms
    [ 0.074879] futex hash table entries: 256 (order: -1, 3072 bytes)
    [ 0.078093] pinctrl core: initialized pinctrl subsystem
    [ 0.079184] NET: Registered protocol family 16
    [ 0.080571] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [ 0.180180] cpuidle: using governor ladder
    [ 0.210171] cpuidle: using governor menu
    [ 0.215632] omap_gpio 44e07000.gpio: could not find pctldev for node /ocp@44e
    [ 0.217371] OMAP GPIO hardware version 0.1
    [ 0.221540] omap_gpio 48322000.gpio: could not find pctldev for node /ocp@44e
    [ 0.225340] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp@44e
    [ 0.229486] No ATAGs?
    [ 0.229511] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint.
    [ 0.229522] hw-breakpoint: maximum watchpoint size is 4 bytes.
    [ 0.266778] edma 49000000.edma: TI EDMA DMA engine driver
    [ 0.270847] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp@4400e
    [ 0.270906] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp@4400e
    [ 0.271041] media: Linux media interface: v0.10
    [ 0.271096] Linux video capture interface: v2.00
    [ 0.271137] pps_core: LinuxPPS API ver. 1 registered
    [ 0.271144] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giom>
    [ 0.271172] PTP clock support registered
    [ 0.271213] EDAC MC: Ver: 3.0.0
    [ 0.272067] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
    [ 0.272433] Advanced Linux Sound Architecture Driver Initialized.
    [ 0.273461] clocksource: Switched to clocksource timer1
    [ 0.281638] NET: Registered protocol family 2
    [ 0.282287] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.282353] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    [ 0.282428] TCP: Hash tables configured (established 8192 bind 8192)
    [ 0.282565] UDP hash table entries: 512 (order: 1, 8192 bytes)
    [ 0.282586] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
    [ 0.282726] NET: Registered protocol family 1
    [ 0.283108] RPC: Registered named UNIX socket transport module.
    [ 0.283119] RPC: Registered udp transport module.
    [ 0.283125] RPC: Registered tcp transport module.
    [ 0.283131] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [ 0.285465] workingset: timestamp_bits=14 max_order=19 bucket_order=5
    [ 0.290563] squashfs: version 4.0 (2009/01/31) Phillip Lougher
    [ 0.291339] NFS: Registering the id_resolver key type
    [ 0.291373] Key type id_resolver registered
    [ 0.291380] Key type id_legacy registered
    [ 0.291421] ntfs: driver 2.1.32 [Flags: R/O].
    [ 0.292887] bounce: pool size: 64 pages
    [ 0.293085] Block layer SCSI generic (bsg) driver version 0.4 loaded (major )
    [ 0.293098] io scheduler noop registered
    [ 0.293105] io scheduler deadline registered
    [ 0.293220] io scheduler cfq registered (default)
    [ 0.296388] pinctrl-single 44e10800.pinmux: 199 pins at pa f9e10800 size 796
    [ 0.299190] backlight supply power not found, using dummy regulator
    [ 0.345896] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
    [ 0.348388] omap8250 44e09000.serial: No clock speed specified: using defaul0
    [ 0.349113] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud =0
    [ 1.054537] console [ttyS0] enabled
    [ 1.058492] omap8250 481a6000.serial: No clock speed specified: using defaul0
    [ 1.067192] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 31, base_baud =0
    [ 1.077628] omap_rng 48310000.rng: OMAP Random Number Generator ver. 20
    [ 1.084510] [drm] Initialized
    [ 1.088766] 4832a000.dss supply vdda_video not found, using dummy regulator
    [ 1.095978] OMAP DSS rev 2.0
    [ 1.099024] omapdss_dss 4832a000.dss: bound 4832a400.dispc (ops dispc_compon)
    [ 1.108210] display supply vcc not found, using dummy regulator
    [ 1.127032] brd: module loaded
    [ 1.136005] loop: module loaded
    [ 1.141510] libphy: Fixed MDIO Bus: probed
    [ 1.213529] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
    [ 1.219664] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
    [ 1.226726] libphy: 4a101000.mdio: probed
    [ 1.230769] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driY
    [ 1.241273] cpsw 4a100000.ethernet: Detected MACID = 68:9e:19:b8:52:ce
    [ 1.248029] cpsw 4a100000.ethernet: device node lookup for pps timer failed
    [ 1.255136] cpsw 4a100000.ethernet: cpts: overflow check period 500 (jiffies)
    [ 1.263783] mousedev: PS/2 mouse device common for all mice
    [ 1.269678] i2c /dev entries driver
    [ 1.275109] cpuidle: enable-method property 'ti,am4372' found operations
    [ 1.344189] ledtrig-cpu: registered to indicate activity on CPUs
    [ 1.355973] NET: Registered protocol family 10
    [ 1.361859] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
    [ 1.369828] NET: Registered protocol family 17
    [ 1.374656] Key type dns_resolver registered
    [ 1.379159] omap_voltage_late_init: Voltage driver support not added
    [ 1.391192] omapdrm omapdrm.0: DMM not available, disable DMM support
    [ 1.398179] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [ 1.404890] [drm] No driver support for vblank timestamp query.
    [ 1.472915] Console: switching to colour frame buffer device 100x30
    [ 1.496056] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [ 1.524739] GPIO line 119 (SelEMMCorNAND) hogged as output/low
    [ 1.532475] GPIO line 136 (SelLCDorHDMI) hogged as output/high
    [ 1.540015] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [ 1.545294] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [ 1.552916] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
    [ 1.559433] nand: Micron MT29F4G08ABAEAWP
    [ 1.563490] nand: 512 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB si4
    [ 1.571282] using OMAP_ECC_BCH16_CODE_HW ECC scheme
    [ 1.576307] 10 ofpart partitions found on MTD device omap2-nand.0
    [ 1.582427] Creating 10 MTD partitions on "omap2-nand.0":
    [ 1.587886] 0x000000000000-0x000000040000 : "NAND.SPL"
    [ 1.594257] 0x000000040000-0x000000080000 : "NAND.SPL.backup1"
    [ 1.601046] 0x000000080000-0x0000000c0000 : "NAND.SPL.backup2"
    [ 1.608043] 0x0000000c0000-0x000000100000 : "NAND.SPL.backup3"
    [ 1.614934] 0x000000100000-0x000000180000 : "NAND.u-boot-spl-os"
    [ 1.621988] 0x000000180000-0x000000280000 : "NAND.u-boot"
    [ 1.628509] 0x000000280000-0x0000002c0000 : "NAND.u-boot-env"
    [ 1.635271] 0x0000002c0000-0x000000300000 : "NAND.u-boot-env.backup1"
    [ 1.642674] 0x000000300000-0x000000a00000 : "NAND.kernel"
    [ 1.649711] 0x000000a00000-0x000020000000 : "NAND.file-system"
    [ 1.738696] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz
    [ 1.745799] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 100 kHz
    [ 1.753087] omap_hsmmc 48060000.mmc: Got CD GPIO
    [ 1.814475] hctosys: unable to open rtc device (rtc0)
    [ 1.833924] net eth0: initializing cpsw version 1.15 (0)
    [ 1.840402] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
    [ 1.848876] cpsw 4a100000.ethernet: ALE Table size 1024
    [ 1.951851] mmc1: host does not support reading read-only switch, assuming we
    [ 1.962517] Micrel KSZ9031 Gigabit PHY 4a101000.mdio:00: attached PHY driver)
    [ 1.977946] cpts ptp bc clkid 0
    [ 1.980916] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [ 1.993199] mmc1: new high speed SDHC card at address e624
    [ 1.999446] mmcblk1: mmc1:e624 SS08G 7.40 GiB
    [ 2.005657] mmcblk1: p1 p2
    [ 2.074315] random: fast init done
    [ 4.084675] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Half - flow cof
    [ 4.103583] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [ 4.133690] Sending DHCP requests .., OK
    [ 7.043580] IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.13
    [ 7.051230] IP-Config: Complete:
    [ 7.054546] device=eth0, hwaddr=68:9e:19:b8:52:ce, ipaddr=192.168.1.3, 1
    [ 7.064659] host=192.168.1.3, domain=, nis-domain=(none)
    [ 7.070447] bootserver=0.0.0.0, rootserver=192.168.1.5, rootpath= n1
    [ 7.080233] vmmcwl_fixed: disabling
    [ 7.083930] ALSA device list:
    [ 7.086929] No soundcards found.
    [ 8.249740] VFS: Mounted root (nfs filesystem) on device 0:15.
    [ 8.256559] devtmpfs: mounted
    [ 8.261927] Freeing unused kernel memory: 1024K
    [ 8.762572] systemd[1]: System time before build time, advancing clock.
    [ 8.853058] systemd[1]: systemd 230 running in system mode. (+PAM -AUDIT -SE)
    [ 8.872537] systemd[1]: Detected architecture arm.

    Welcome to Arago 2017.12!

    [ 9.128647] systemd[1]: Set hostname to <am437x-evm>.
    [ 10.261743] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
    [ OK ] Listening on /dev/initctl Compatibility Named Pipe.
    [ 10.304847] systemd[1]: Listening on udev Control Socket.
    [ OK ] Listening on udev Control Socket.
    [ 10.333925] systemd[1]: Listening on udev Kernel Socket.
    [ OK ] Listening on udev Kernel Socket.
    [ 10.364780] systemd[1]: Listening on Network Service Netlink Socket.
    [ OK ] Listening on Network Service Netlink Socket.
    [ 10.404857] systemd[1]: Listening on Journal Socket (/dev/log).
    [ OK ] Listening on Journal Socket (/dev/log).
    [ 10.458926] systemd[1]: Listening on Process Core Dump Socket.
    [ OK ] Listening on Process Core Dump Socket.
    [ 10.496238] systemd[1]: Created slice User and Session Slice.
    [ OK ] Created slice User and Session Slice.
    [ OK ] Started Forward Password Requests to Wall Directory Watch.
    [ OK ] Reached target Remote File Systems.
    [ OK ] Listening on Journal Socket.
    [ OK ] Reached target Swap.
    [ OK ] Created slice System Slice.
    Starting Setup Virtual Console...
    Starting Load Kernel Modules...
    Mounting Temporary Directory...
    [ OK ] Created slice system-serial\x2dgetty.slice.
    [ OK ] Reached target Slices.
    [ 10.926460] cmemk: loading out-of-tree module taints kernel.
    [ 10.936436] CMEMK module: reference Linux version 4.9.69
    [ 10.954012] no physical memory specified
    [ 10.957988] cmemk initialized
    Mounting POSIX Message Queue File System...
    [ OK ] Created slice system-getty.slice.
    [ 11.004329] cryptodev: driver 1.8 loaded.
    Mounting Debug File System...
    Starting alignment.service...
    [ OK ] Listening on Syslog Socket.
    Starting Journal Service...
    Starting Create Static Device Nodes in /dev...
    Starting Remount Root and Kernel File Systems...
    [ 11.216295] random: crng init done
    [ 11.224425] usbcore: registered new interface driver usbfs
    [ 11.230026] usbcore: registered new interface driver hub
    [ 11.238205] usbcore: registered new device driver usb
    [ OK ] Started Dispatch Password Requests to Console Directory Watch.
    [ OK ] Reached target Paths.
    [ OK ] Mounted Debug File System.
    [ OK ] Mounted POSIX Message Queue File System.
    [ OK ] Mounted Temporary Directory.
    [ OK ] Started Setup Virtual Console.
    [ 11.471892] usbcore: registered new interface driver usbserial
    [ OK ] Started alignment.service.
    [ 11.589276] usbcore: registered new interface driver ftdi_sio
    [ 11.672376] usbserial: USB Serial support registered for FTDI USB Serial Deve
    [ OK ] Started Remount Root and Kernel File Systems.
    Starting udev Coldplug all Devices...
    [ OK ] Started Load Kernel Modules.
    [ OK ] Started Journal Service.
    Starting Flush Journal to Persistent Storage...
    Starting Apply Kernel Variables...
    Mounting Configuration File System...
    [ OK ] Mounted Configuration File System.
    [ OK ] Started Create Static Device Nodes in /dev.
    [ OK ] Started Apply Kernel Variables.
    [ 12.365972] systemd-journald[103]: Received request to flush runtime journal1
    Starting udev Kernel Device Manager...
    [ OK ] Reached target Local File Systems (Pre).
    Mounting /media/ram...
    Mounting /var/volatile...
    [ OK ] Started Flush Journal to Persistent Storage.
    [ OK ] Mounted /media/ram.
    [ OK ] Mounted /var/volatile.
    Starting Load/Save Random Seed...
    [ OK ] Reached target Local File Systems.
    Starting Create Volatile Files and Directories...
    [ OK ] Started Load/Save Random Seed.
    [ OK ] Started udev Kernel Device Manager.
    [ OK ] Started Create Volatile Files and Directories.
    Starting Update UTMP about System Boot/Shutdown...
    Starting Network Time Synchronization...
    [ OK ] Started Update UTMP about System Boot/Shutdown.
    [ OK ] Started Network Time Synchronization.
    [ OK ] Reached target System Time Synchronized.
    [ OK ] Started udev Coldplug all Devices.
    [ OK ] Reached target System Initialization.
    [ OK ] Listening on D-Bus System Message Bus Socket.
    [ OK ] Started Daily Cleanup of Temporary Directories.
    [ OK ] Reached target Timers.
    [ OK ] Listening on RPCbind Server Activation Socket.
    [ 14.370095] remoteproc remoteproc0: wkup_m3 is available
    [ 14.400022] omap_rtc 44e3e000.rtc: already running
    [ 14.410612] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0
    [ 14.436852] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [ 14.654200] ov2659 0-0030: Sensor detection failed (3030, 0)
    [ 14.690886] ov2659 1-0030: Found OV2656 sensor
    [ 14.778881] ov2659 1-0030: ov2659 1-0030 sensor driver registered !!
    [ OK ] Listening on dropbear.socket.
    [ OK ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [ OK ] Reached target Sockets.
    [ 14.935401] remoteproc remoteproc0: powering up wkup_m3
    [ OK ] Reached target Basic System.
    Starting uim-sysfs.service...
    [ OK ] Started D-Bus System Message Bus.
    [ 15.051079] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf,8
    [ 15.145792] input: pixcir_tangoc as /devices/platform/44000000.ocp/4802a000.0
    [ 15.305072] CAN device driver interface
    [ 15.338115] c_can_platform 481cc000.can: c_can_platform device registered (r)
    [ 15.397019] c_can_platform 481d0000.can: c_can_platform device registered (r)
    [ 15.648173] remoteproc remoteproc0: remote processor wkup_m3 is now up
    [ 15.654830] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x192
    [ 16.387862] omap-sham 53100000.sham: hw accel on OMAP rev 0.0
    Starting Login Service...
    Starting Print notice about GPLv3 packages...
    [ 16.567601] omap-aes 53501000.aes: OMAP AES hw accel rev: 0.1
    [ 16.629198] omap-aes 53501000.aes: will run requests pump with realtime prioy
    [ OK ] Started Periodic Command Scheduler.
    Starting Avahi mDNS/DNS-SD Stack...
    [ 16.840893] [drm] Initialized pvr 1.14.3699939 20110701 on minor 1
    [ 16.910122] omap-des 53701000.des: OMAP DES hw accel rev: 0.33
    [ OK ] Started Kernel Logging Service.
    [ 17.007201] omap-des 53701000.des: will run requests pump with realtime prioy
    [ OK ] Started System Logging Service.
    Starting Network Service...
    [ OK ] Started Job spooling tools.
    Starting Telephony service...
    [ OK ] Found device /dev/ttyS0.
    [ OK ] Started Network Service.
    [ 19.444519] input: matrix_keypad0 as /devices/platform/matrix_keypad0/input/1
    [ 19.470102] Bluetooth: Core ver 2.22
    [ 19.558946] NET: Registered protocol family 31
    [ 19.563426] Bluetooth: HCI device and connection manager initialized
    [ 19.601435] PM: bootloader does not support rtc-only!
    [ 19.813843] Bluetooth: HCI socket layer initialized
    [ 19.818773] Bluetooth: L2CAP socket layer initialized
    [ 19.902353] asoc-simple-card sound0: tlv320aic3x-hifi <-> 4803c000.mcasp mapk
    [ 20.091401] Bluetooth: SCO socket layer initialized
    [ 20.804878] EXT4-fs (mmcblk1p2): mounting ext3 file system using the ext4 sum
    [ 21.014440] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. )
    [ 21.380368] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data.
    [ OK ] Started uim-sysfs.service.
    [ OK ] Started Avahi mDNS/DNS-SD Stack.
    [ OK ] Started Telephony service.
    [ OK ] Started Login Service.
    [ OK ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
    Starting rc.pvr.service...
    [ OK ] Created slice system-systemd\x2dbacklight.slice.
    Starting Load/Save Screen Backlight...htness of backlight:backlight...
    [ OK ] Reached target Network.
    [ OK ] Started strongSwan IPsec IKEv1/IKEv2 daemon using ipsec.conf.
    Starting Enable and configure wl18xx bluetooth stack...
    Starting Permit User Sessions...
    Starting Lightning Fast Webserver With Light System Requirements...
    Starting Simple Network Management Protocol (SNMP) Daemon....
    Starting Network Name Resolution...
    Starting Wait for Network to be Configured...
    [ OK ] Started Load/Save Screen Backlight Brightness of backlight:backlight.
    [ OK ] Started Permit User Sessions.
    [ OK ] Started Lightning Fast Webserver With Light System Requirements.
    [ 25.947316] PVR_K: UM DDK-(3699939) and KM DDK-(3699939) match. [ OK ]
    [ OK ] Started Network Name Resolution.
    [ OK ] Started rc.pvr.service.
    [ OK ] Started Enable and configure wl18xx bluetooth stack.
    [ 27.642628] NET: Registered protocol family 15
    [ 28.162249] ti-pruss 54400000.pruss: creating PRU cores and other child plats
    [ 28.243021] irq: no irq domain found for /ocp@44000000/pruss_soc_bus@5442600!
    [ 28.364691] irq: no irq domain found for /ocp@44000000/pruss_soc_bus@5442600!
    [ 28.429648] ti-pruss 54440000.pruss: creating PRU cores and other child plats
    [ 28.590251] irq: no irq domain found for /ocp@44000000/pruss_soc_bus@5442600!
    [ 28.784495] irq: no irq domain found for /ocp@44000000/pruss_soc_bus@5442600!
    [ OK ] Started Wait for Network to be Configured.
    [ 28.954471] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
    [ 28.960035] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus n1
    [ 29.157656] remoteproc remoteproc1: 54434000.pru0 is available
    [ 29.157719] pru-rproc 54434000.pru0: PRU rproc node /ocp@44000000/pruss_soc_y
    [ 29.160310] remoteproc remoteproc2: 54438000.pru1 is available
    [ 29.160397] pru-rproc 54438000.pru1: PRU rproc node /ocp@44000000/pruss_soc_y
    [ 29.161248] remoteproc remoteproc3: 54474000.pru0 is available
    [ 29.161305] pru-rproc 54474000.pru0: PRU rproc node /ocp@44000000/pruss_soc_y
    [ 29.184209] remoteproc remoteproc4: 54478000.pru1 is available
    [ 29.184297] pru-rproc 54478000.pru1: PRU rproc node /ocp@44000000/pruss_soc_y
    [ 29.488991] Initializing XFRM netlink socket
    [ OK ] Started Simple Network Management Protocol (SNMP) Daemon..
    [ 29.543975] xhci-hcd xhci-hcd.3.auto: hcc params 0x0238f06d hci version 0x100
    [ 29.589988] xhci-hcd xhci-hcd.3.auto: irq 261, io mem 0x483d0000
    [ 29.637243] hub 1-0:1.0: USB hub found
    [ 29.655341] hub 1-0:1.0: 1 port detected
    [ 29.683817] xhci-hcd xhci-hcd.3.auto: xHCI Host Controller
    [ 29.689363] xhci-hcd xhci-hcd.3.auto: new USB bus registered, assigned bus n2
    [ 29.736769] usb usb2: We don't know the algorithms for LPM for this host, di.
    [ 29.777846] hub 2-0:1.0: USB hub found
    [ 29.791259] hub 2-0:1.0: 1 port detected
    [ OK ] Reached target Sound Card.
    [ OK ] Reached target Network is Online.
    Starting weston.service...
    [ OK ] Started Serial Getty on ttyS0.
    [ OK ] Started Getty on tty1.
    [ OK ] Reached target Login Prompts.
    Starting Synchronize System and HW clocks...
    [ OK ] Started Synchronize System and HW clocks.
    [ OK ] Started weston.service.
    Starting telnetd.service...
    [ OK ] Started telnetd.service.
    Starting thttpd.service...
    [ OK ] Started thttpd.service.
    Starting rng-tools.service...
    [ OK ] Started rng-tools.service.
    Starting LSB: Redis, a key-value store...
    [ OK ] Started LSB: Redis, a key-value store.
    Starting matrix-gui-2.0.service...
    [ OK ] Started matrix-gui-2.0.service.
    Starting parse-ip.service...
    Starting thermal-zone-init.service...
    [ OK ] Started parse-ip.service.
    [ OK ] Started thermal-zone-init.service.

    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org am437x-evm ttyS0

    Arago 2017.12 am437x-evm ttyS0

    am437x-evm login: **************************************************************
    ***************************************************************
    NOTICE: This file system contains the following GPLv3 packages:
    autoconf
    binutils
    cifs-utils
    cpio
    cpp-symlinks
    cpp
    dosfstools
    findutils
    g++-symlinks
    g++
    gawk-dev
    gawk
    gcc-symlinks
    gcc
    gdb
    gdbserver
    glmark2
    gstreamer1.0-libav
    gzip
    hidapi
    libcairo-perf-utils
    libgmp10
    libidn11
    libmavconn
    libmpc3
    libmpfr4
    libreadline-dev
    libreadline6
    m4-dev
    m4
    make
    mavlink
    mavros-extras
    mavros-msgs
    mavros
    nettle
    socketcan-interface
    swig-dev
    swig
    which

    If you do not wish to distribute GPLv3 components please remove
    the above packages prior to distribution. This can be done using
    the opkg remove command. i.e.:
    opkg remove <package>
    Where <package> is the name printed in the list above

    NOTE: If the package is a dependency of another package you
    will be notified of the dependent packages. You should
    use the --force-removal-of-dependent-packages option to
    also remove the dependent packages as well
    ***************************************************************
    ***************************************************************
  • You are using TFTP boot. Did you move the new DTB into the appropriate TFTP directory with your kernel?

    Sorry, I had assumed you were booting from SD card.
  • is NSF boot not the same as TFTP boot?

    i think i moved it into the right directory, as i stated in my steps above i put it in the targetNSF/boot directory. is that not the right directory? did my dts file look correct? did you see any issues with my process?
  • We can't really do NFS boot. We have to TFTP the kernel and DTB and then mount the NFS. The kernel and DTB usually come from a directory set up for TFTP, like /tftpboot on my set up. It depends a bit how you set up your TFTP server.

    The DTS file looks correct, but I don't think we are loading the one you modified. You could look in /proc/device-tree or something like that (I"m not at a booted set up as I am traveling, sorry) to show the current DT in use. But, since it is not in you sysfs, I'm fairly certain this is the case.

    Hope this helps.
  • well i guess i didn't know the difference.

    in the sdk directory we have "targetNSF" as the directory i believed the target booted from (default from the setup script). when i put files in the home directory in my "targetNSF" directory they show up in the corresponding directory on my target. is targetNSF/boot/ not the right place it is loading the dtb file from?

    i did look in device tree and no leds are there
  • so i deleted ALL the DTB files that i presume my EVM would use. the one in the dts directory that gets built, the one in the targetNSF/boot directory, and the one on the target EVM boot directory. i rebuilt the DTB file and distributed it to targetNSF/boot and scp to /boot on the target. still no leds. i would really like to know what i am doing wrong/missing? is the target booting from somewhere else and the dtb file is embedded in an img or binary file or something?
  • Do you have a /tftpboot directory on your development machine? If so, what is in there?
  • when you were talking about the tftpboot directory i thought you were asking about the directory the system gets its file from when booting over tftp, when i looked for that specific directory i found it, replaced the dtb file and now i have leds in the led directory. -1 for me not being able to take direction.
  • ok now that i am attempting to use our daughter board with the EVM i need access to actual GPIOs, inputs and outputs, not just LED function

    i see that there are some gpio's listed in the dts file but they do not show up in my directory.

    i think i understand the syntax a little. the GPIOs listed are the banks, the "p" sub-parts are the pins. so gpio5 { p8{stuff}} will have stuff for gpio5{8], correct?

    however these do not show up in my directory "gpio"

    when we added the led stuff, leds showed up in my leds directory. how do i define a gpio in the dts file so that it shows up in my gpio directory and is usable?

  • Can you remove one of the pins' led nodes and see if it shows up as an accessible GPIO? You may need to export it first. There are many great guides to using GPIO out there that should help. Here's one from us:

    processors.wiki.ti.com/.../Linux_PSP_GPIO_Driver_Guide

    Don't mess with the pin muxing; the ping still needs to be pin muxed as GPIO.
  • i removed the GPIO i wanted to use (GPIO5[10]) from the LED drivers and they did disappear from the leds directory. i did not add anything to the section in gpio5 where "SelLCDorHDMI" is defined. i left that alone.

    in the numbering of the gpio's it appears to be GPIO_BANK_NUM*32 + line. i want gpio5[10] which would be 5*32+10 = 170 which doesn't seem to exist. i get gpiochip128 (128-159), and for some reason gpiochip510 (only 2 pins exist so 510 and 511? whatever those are) but i don't seem to have access to bank 5. i do see in /dev/ there are all the gpiochip (0-5) but when i attempt to do ioctl commands using those gpiochip5 says there are only 2 lines which matches what gpiochip510 says in the ngpio file.

    i did attempt to add gpio5[10] to the gpio5 section with "SelLCDorHDMI" and i could hog-tie it to high or low and the corresponding LED did in fact behave with it but i have no access to it otherwise.

    so did i pick the wrong bank to attempt to use gpio pins?
  • There are only 4 banks declared, so gpio5 is really 4 and that pin is 138.

    Here is a diff of the changes I made to get it to work:

    diff --git a/arch/arm/boot/dts/am437x-gp-evm.dts b/arch/arm/boot/dts/am437x-gp-evm.dts
    index 629979d..3184e0c 100644
    --- a/arch/arm/boot/dts/am437x-gp-evm.dts
    +++ b/arch/arm/boot/dts/am437x-gp-evm.dts
    @@ -86,8 +86,46 @@
    0x0101006a /* RIGHT */
    0x02000069 /* LEFT */
    0x0201006c>; /* DOWN */
    + };
    +
    + leds {
    + compatible = "gpio-leds";
    +
    + pinctrl-names = "default";
    + pinctrl-0 = <&leds_pins_default>;
    +
    + led0 {
    + label = "am437x-evm:green:usr0";
    + gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>; /* Bank 3, pin 18 */
    + default-state = "off";
    + };
    +
    + led2 {
    + label = "am437x-evm:yellow:usr4";
    + gpios = <&gpio5 11 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 11 */
    + default-state = "off";
    + };
    +
    + led3 {
    + label = "am437x-evm:orange:usr5";
    + gpios = <&gpio5 12 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 12 */
    + default-state = "off";
    };

    + led4 {
    + label = "am437x-evm:blue:usr6";
    + gpios = <&gpio5 13 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 13 */
    + default-state = "off";
    + };
    +
    + led5 {
    + label = "am437x-evm:red:heartbeat";
    + gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>; /* Bank 5, pin 4 */
    + linux,default-trigger = "heartbeat";
    + default-state = "off";
    + };
    + };
    +
    lcd0: display {
    compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
    label = "lcd";
    @@ -319,6 +357,7 @@
    pinctrl-single,pins = <
    /* GPIO 5_8 to select LCD / HDMI */
    AM4372_IOPAD(0xa38, PIN_OUTPUT_PULLUP | MUX_MODE7)
    + AM4372_IOPAD(0xa40, PIN_OUTPUT | MUX_MODE7) /* (G20) gpio5_10.gpio5[10] */
    >;
    };

    @@ -536,13 +575,7 @@
    AM4372_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0x99c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    - AM4372_IOPAD(0x9a0, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0xa3c, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    - AM4372_IOPAD(0xa40, PIN_INPUT_PULLDOWN | MUX_MODE7)
    - AM4372_IOPAD(0xa44, PIN_INPUT_PULLDOWN | MUX_MODE7)
    - AM4372_IOPAD(0xa48, PIN_INPUT_PULLDOWN | MUX_MODE7)
    - AM4372_IOPAD(0xa4c, PIN_INPUT_PULLDOWN | MUX_MODE7)
    - AM4372_IOPAD(0xa50, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0xa54, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    AM4372_IOPAD(0xa58, PIN_INPUT_PULLDOWN | MUX_MODE7)
    AM4372_IOPAD(0xa60, PIN_INPUT | PULL_DISABLE | MUX_MODE7)
    @@ -602,6 +635,16 @@
    >;
    };

    + leds_pins_default: leds_pins_default {
    + pinctrl-single,pins = <
    + AM4372_IOPAD(0xa50, PIN_OUTPUT | MUX_MODE7) /* (P25) spi4_sclk.gpio5[4] */
    + AM4372_IOPAD(0xa44, PIN_OUTPUT | MUX_MODE7) /* (F23) gpio5_11.gpio5[11] */
    + AM4372_IOPAD(0xa48, PIN_OUTPUT | MUX_MODE7) /* (E25) gpio5_12.gpio5[12] */
    + AM4372_IOPAD(0xa4c, PIN_OUTPUT | MUX_MODE7) /* (E24) gpio5_13.gpio5[13] */
    + AM4372_IOPAD(0x9a0, PIN_OUTPUT | MUX_MODE7) /* (L23) mcasp0_aclkr.gpio3[18] */
    + >;
    + };

    Basically, moved the pin mux to the display node, removed it from leds, removed the led node.

    Then did these commands with output:

    root@am437x-evm:~# cd /sys//class/gpio/
    root@am437x-evm:/sys/class/gpio# echo 138 > export
    root@am437x-evm:/sys/class/gpio# echo "out" > gpio138/direction
    root@am437x-evm:/sys/class/gpio# echo 1 > gpio138/value
    root@am437x-evm:/sys/class/gpio# echo 0 > gpio138/value

    The LED turns on and off as expected.

    Hope this helps. Have a good weekend!
  • i guess i didn't see that gpio2 was missing. is there a reason why it isn't 0-4?

    i guess i'm a stickler for organizing things: let's say i didn't want this GPIO grouped with the LCD, it is it's own group and i want to define that. do i just add:
    pinctrl-0 = <&general_gpios_group>;
    right under the other group listing and make that group in the pinmux section?
  • Yes, that would be a good way to handle it.
  • thank you i have control over some gpio lines now