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.

AM3352:

Part Number: AM3352

USB 0 is configured as USB Ethernet, I need to support USB serial as well. I enabled it in config as attached below, but its not detected as USB serial

tried to see using /sys/kernel/config/usb_gadget# and only shows g1. Attached pls find the config and dts file

cx3_def_config_2_3.txt

/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <dt-bindings/net/ti-dp83867.h>

/ {

	cpus {
		cpu@0 {
			cpu0-supply = <&dcdc2_reg>;
		};
	};

	memory@80000000 {
		device_type = "memory";
		reg = <0x80000000 0x10000000>; /* 256 MB */
	};

	chosen {
		stdout-path = &uart0;
	};

	vmmcsd_fixed: fixedregulator0 {
		compatible = "regulator-fixed";
		regulator-name = "vmmcsd_fixed";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
	};
leds {
		compatible = "gpio-leds";


		led0 {
			label = "cx3:green";
			gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
			default-state = "off";
		};

		led1 {
			label = "cx3:red";
			gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
			default-state = "off";
		};

		led2 {
			label = "cx3:blue";
			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
			default-state = "off";
		};

		led3 {
			label = "cx3:yellow";
			gpios = <&gpio2 17 GPIO_ACTIVE_HIGH>;
			linux,default-trigger = "heartbeat";
			default-state = "off";
		};
	   };
};

/**************************************CX3 stuff begining ******************************************************/
&am33xx_pinmux {

#if 0
		cx3_heartbeatred_default:cx3_heartbeatred_default {

			pinctrl-single,pins = <
				AM33XX_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (V6) lcd_data12.gpio0[8] 
			>;
	
		};
		cx3_heartbeatgreen_default:cx3_heartbeatred_default {

			pinctrl-single,pins = <
				AM33XX_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (U5) lcd_data10.gpio2[16] 
			>;
	
		};
		cx3_heartbeatblue_default:cx3_heartbeatred_default {

			pinctrl-single,pins = <
				AM33XX_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (V6) lcd_data12.gpio0[8] */
				AM33XX_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (U5) lcd_data10.gpio2[16] */
			>;
	
		};
		cx3_heartbeatyellow_default:cx3_heartbeatred_default {

			pinctrl-single,pins = <
				AM33XX_IOPAD(0x8d0, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (V6) lcd_data12.gpio0[8] */
				AM33XX_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (U5) lcd_data10.gpio2[16] */
			>;
	
		}; 
#endif
/* i2c */
	i2c0_pins_default: i2c0_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x98c, PIN_INPUT_PULLUP | MUX_MODE0) /* (C16) I2C0_SCL.I2C0_SCL */
			AM33XX_IOPAD(0x988, PIN_INPUT_PULLUP | MUX_MODE0) /* (C17) I2C0_SDA.I2C0_SDA */
		>;
	};

	i2c2_pins_default: i2c2_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x97c, PIN_INPUT_PULLUP | MUX_MODE3) /* (D17) uart1_rtsn.I2C2_SCL */
			AM33XX_IOPAD(0x978, PIN_INPUT_PULLUP | MUX_MODE3) /* (D18) uart1_ctsn.I2C2_SDA */
		>;
	};

	clkout2_pin: pinmux_clkout2_pin {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x9b4, PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr1.clkout2 */
		>;
	};
#if 0
	user_leds_default: user_leds_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x8c8, PIN_OUTPUT_PULLUP | MUX_MODE7) /* (U5) lcd_data10.gpio2[16] */
			>;
		};
	user_leds_sleep: user_leds_sleep {
			pinctrl-single,pins = <
			AM33XX_IOPAD(0x8c8, PIN_OUTPUT_PULLDOWN | MUX_MODE7) /* (U5) lcd_data10.gpio2[16] */
			>;
		};	
#endif
/* RGMII */ 
	cpsw_default: cpsw_default {
		pinctrl-single,pins = <
		    /* Slave 1 */ 
			AM33XX_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (J16) gmii1_txen.rgmii1_tctl */
			AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (J17) gmii1_rxdv.rgmii1_rctl */
			AM33XX_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (K18) gmii1_txclk.rgmii1_tclk */
			AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (L18) gmii1_rxclk.rgmii1_rclk */
			AM33XX_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (K17) gmii1_txd0.rgmii1_td0 */
			AM33XX_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (K16) gmii1_txd1.rgmii1_td1 */
			AM33XX_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (K15) gmii1_txd2.rgmii1_td2 */
			AM33XX_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (J18) gmii1_txd3.rgmii1_td3 */
			AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (M16) gmii1_rxd0.rgmii1_rd0 */
			AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (L15) gmii1_rxd1.rgmii1_rd1 */
			AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (L16) gmii1_rxd2.rgmii1_rd2 */
			AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (L17) gmii1_rxd3.rgmii1_rd3 */

			/* Slave 2 */
			AM33XX_IOPAD(0x840, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (R13) gpmc_a0.rgmii2_tctl */
			AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (V14) gpmc_a1.rgmii2_rctl */
			AM33XX_IOPAD(0x858, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (U15) gpmc_a6.rgmii2_tclk */
			AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (T15) gpmc_a7.rgmii2_rclk */
			AM33XX_IOPAD(0x854, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (V15) gpmc_a5.rgmii2_td0 */
			AM33XX_IOPAD(0x850, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (R14) gpmc_a4.rgmii2_td1 */
			AM33XX_IOPAD(0x84c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (T14) gpmc_a3.rgmii2_td2 */
			AM33XX_IOPAD(0x848, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* (U14) gpmc_a2.rgmii2_td3 */
			AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (V17) gpmc_a11.rgmii2_rd0 */
			AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (T16) gpmc_a10.rgmii2_rd1 */
			AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (U16) gpmc_a9.rgmii2_rd2 */
			AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE2) /* (V16) gpmc_a8.rgmii2_rd3 */
		>;
	};

	cpsw_sleep: cpsw_sleep {
		pinctrl-single,pins = <
			/* Slave 1 reset value */
			AM33XX_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (J16) gmii1_txen.rgmii1_tctl */
			AM33XX_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (J17) gmii1_rxdv.rgmii1_rctl */
			AM33XX_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K18) gmii1_txclk.rgmii1_tclk */
			AM33XX_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (L18) gmii1_rxclk.rgmii1_rclk */
			AM33XX_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K17) gmii1_txd0.rgmii1_td0 */
			AM33XX_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K16) gmii1_txd1.rgmii1_td1 */
			AM33XX_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (K15) gmii1_txd2.rgmii1_td2 */
			AM33XX_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (J18) gmii1_txd3.rgmii1_td3 */
			AM33XX_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (M16) gmii1_rxd0.rgmii1_rd0 */
			AM33XX_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (L15) gmii1_rxd1.rgmii1_rd1 */
			AM33XX_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (L16) gmii1_rxd2.rgmii1_rd2 */
			AM33XX_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (L17) gmii1_rxd3.rgmii1_rd3 */

			/* Slave 2 reset value */
			AM33XX_IOPAD(0x840, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (R13) gpmc_a0.rgmii2_tctl */
			AM33XX_IOPAD(0x844, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V14) gpmc_a1.rgmii2_rctl */
			AM33XX_IOPAD(0x858, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U15) gpmc_a6.rgmii2_tclk */
			AM33XX_IOPAD(0x85c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T15) gpmc_a7.rgmii2_rclk */
			AM33XX_IOPAD(0x854, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V15) gpmc_a5.rgmii2_td0 */
			AM33XX_IOPAD(0x850, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (R14) gpmc_a4.rgmii2_td1 */
			AM33XX_IOPAD(0x84c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T14) gpmc_a3.rgmii2_td2 */
			AM33XX_IOPAD(0x848, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U14) gpmc_a2.rgmii2_td3 */
			AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V17) gpmc_a11.rgmii2_rd0 */
			AM33XX_IOPAD(0x868, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (T16) gpmc_a10.rgmii2_rd1 */
			AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (U16) gpmc_a9.rgmii2_rd2 */
			AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (V16) gpmc_a8.rgmii2_rd3 */
		>;
	};

/* mdio */
	davinci_mdio_pins_default: davinci_mdio_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* (M18) mdio_clk.mdio_clk */
			AM33XX_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* (M17) mdio_data.mdio_data */
		>;
	};

	/* Optional sleep pin settings. Must manually enter values in the below skeleton. */
	davinci_mdio_pins_sleep: davinci_mdio_pins_sleep {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7) /* (M18) mdio_clk.mdio_clk */
			AM33XX_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (M17) mdio_data.mdio_data */
		>;
	};

/* eMMC */

	emmc_pins: pinmux_emmc_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x880, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
			AM33XX_IOPAD(0x884, PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
			AM33XX_IOPAD(0x800, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
			AM33XX_IOPAD(0x804, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
			AM33XX_IOPAD(0x808, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
			AM33XX_IOPAD(0x80c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
			AM33XX_IOPAD(0x810, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
			AM33XX_IOPAD(0x814, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
			AM33XX_IOPAD(0x818, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
			AM33XX_IOPAD(0x81c, PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
		>;
	};
	
/* SPI */
	spi0_pins_default: spi0_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x950, PIN_INPUT_PULLUP | MUX_MODE0) /* (A17) spi0_sclk.spi0_sclk */
			AM33XX_IOPAD(0x954, PIN_INPUT_PULLUP | MUX_MODE0) /* (B17) spi0_d0.spi0_d0 */
			AM33XX_IOPAD(0x958, PIN_INPUT_PULLUP | MUX_MODE0) /* (B16) spi0_d1.spi0_d1 */
			AM33XX_IOPAD(0x95c, PIN_INPUT_PULLUP | MUX_MODE0) /* (A16) spi0_cs0.spi0_cs0 */
		>;
	};

	spi1_pins_default: spi1_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x990, PIN_INPUT_PULLUP | MUX_MODE3) /* (A13) mcasp0_aclkx.spi1_sclk */
			AM33XX_IOPAD(0x994, PIN_INPUT_PULLUP | MUX_MODE3) /* (B13) mcasp0_fsx.spi1_d0 */
			AM33XX_IOPAD(0x998, PIN_INPUT_PULLUP | MUX_MODE3) /* (D12) mcasp0_axr0.spi1_d1 */
			AM33XX_IOPAD(0x99c, PIN_INPUT_PULLUP | MUX_MODE3) /* (C12) mcasp0_ahclkr.spi1_cs0 */
		>;
	};	

/* UART */
	uart0_pins_default: uart0_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x970, PIN_INPUT_PULLUP | MUX_MODE0) /* (E15) uart0_rxd.uart0_rxd */
			AM33XX_IOPAD(0x974, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (E16) uart0_txd.uart0_txd */
		>;
	};

	uart1_pins_default: uart1_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x980, PIN_INPUT_PULLUP | MUX_MODE0) /* (D16) uart1_rxd.uart1_rxd */
			AM33XX_IOPAD(0x984, PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* (D15) uart1_txd.uart1_txd */
		>;
	};

	uart2_pins_default: uart2_pins_default {
		pinctrl-single,pins = <
		AM33XX_IOPAD(0x900, PIN_INPUT | MUX_MODE3) /* (G17) mmc0_clk.uart2_rxd */
		AM33XX_IOPAD(0x904, PIN_OUTPUT | MUX_MODE3) /* (G18) mmc0_cmd.uart2_txd */
		>;
	};
#if 1
	uart4_pins_default: uart4_pins_default {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x968, PIN_INPUT_PULLUP | MUX_MODE1) /* (E18) uart0_ctsn.uart4_rxd */
			AM33XX_IOPAD(0x96c, PIN_OUTPUT_PULLDOWN | MUX_MODE1) /* (E17) uart0_rtsn.uart4_txd */
//			AM33XX_IOPAD(0x8f4, PIN_OUTPUT | MUX_MODE2) /* (F18) mmc0_dat2.uart4_rtsn - 485_CONTROL*/
		>;
	};
#endif
};

/* SYSTEM UART */
&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins_default>;
	status = "okay";
};

/* CLI */
&uart1 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart1_pins_default>;
	status = "okay";
};

/* IRD */
&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart2_pins_default>;
	status = "okay";

	serIrDA-rx-during-tx;
	//serIrDA-filter = <>;
	linux,serIrDA-enabled-at-boot-time;
};


/* RS-485 */
&uart4 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart4_pins_default>;
	status = "okay";

	//rts-gpio = <&gpio2 27 GPIO_ACTIVE_HIGH>;
/*
	rs485-rts-delay = <a b>
	* a - the delay between rts signal and beginning of data sent in milliseconds.
	      it corresponds to the delay before sending data.
	 * b - the delay between end of data sent and rts signal in milliseconds
	 it corresponds to the delay after sending data and actual release of the line.
*/
	//rs485-rts-active-high;
	//rs485-rx-during-tx;
	//rs485-rts-delay = <0 1>;
	//linux,rs485-enabled-at-boot-time;
};

&usb {
	status = "okay";
};

&usb_ctrl_mod {
	status = "okay";
};

 &usb0_phy {
	status = "okay";
};


&usb1_phy {
	status = "okay";
};

&usb0 {
	status = "okay";
	dr_mode = "peripheral";
	interrupts-extended = <&intc 18 &tps 0>;
	interrupt-names = "mc", "vbus";
};


&usb1 {
	status = "okay";
	dr_mode = "host";
};

&cppi41dma  {
	status = "okay";
};


/* I2C */
&i2c2 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c2_pins_default>;
	status = "okay";
	clock-frequency = <40000>;
};

&i2c0 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c0_pins_default>;
	status = "okay";
	clock-frequency = <40000>;

	/* Set OPP50 (0.95V) for VDD core */
		sleep-sequence = /bits/ 8 <
				0x02 0x24 0x0b 0x6d /* Password unlock 1 */
				0x02 0x24 0x10 0x02 /* Set DCDC3 to 0.95V */
				0x02 0x24 0x0b 0x6d /* Password unlock 2 */
				0x02 0x24 0x10 0x02 /* Set DCDC3 to 0.95V */
				0x02 0x24 0x0b 0x6c /* Password unlock 1 */
				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
				0x02 0x24 0x0b 0x6c /* Password unlock 2 */
				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
		>;

	/* Set OPP100 (1.10V) for VDD core */
		wake-sequence = /bits/ 8 <
				0x02 0x24 0x0b 0x6d /* Password unlock 1 */
				0x02 0x24 0x10 0x08 /* Set DCDC3 to 1.1V */
				0x02 0x24 0x0b 0x6d /* Password unlock 2 */
				0x02 0x24 0x10 0x08 /* Set DCDC3 to 1.1V */
				0x02 0x24 0x0b 0x6c /* Password unlock 1 */
				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
				0x02 0x24 0x0b 0x6c /* Password unlock 2 */
				0x02 0x24 0x11 0x86 /* Apply DCDC changes */
		>;

		tps: tps@24 {
			reg = <0x24>;
		};
/*
No support in drivers
		eeprom@50 {
			compatible = "microchip,24lc128";
			reg = <0x50>;
			pagesize = <64>;
			status = "okay";
		};

		tmp100@48 {
			compatible = "tmp100";
			reg = <0x48>;
			status = "okay";
		};
*/
};

/* SPI */

&spi0 {
	#address-cells = <1>;
	#size-cells = <0>;

	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&spi0_pins_default>;
/*
	channel@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "rohm,dh2228fv";
		reg = <0>;
		spi-max-frequency = <48000000>;
		//spi-cpha;
	};

*/
	sfpFpga@0 {
		compatible = "atmel,sfpFpga";
		spi-max-frequency = <48000000>;
		reg = <0>;
	};

};

&spi1 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&spi1_pins_default>;

	channel@0 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "rohm,dh2228fv";
		reg = <0>;
		spi-max-frequency = <48000000>;
		//spi-cpha;
	};
};

/include/ "tps65217.dtsi"

&tps {
	/*
	 * Configure pmic to enter OFF-state instead of SLEEP-state ("RTC-only
	 * mode") at poweroff.  Most BeagleBone versions do not support RTC-only
	 * mode and risk hardware damage if this mode is entered.
	 *
	 * For details, see linux-omap mailing list May 2015 thread
	 *	[PATCH] ARM: dts: am335x-bone* enable pmic-shutdown-controller
	 * In particular, messages:
	 *	http://www.spinics.net/lists/linux-omap/msg118585.html
	 *	http://www.spinics.net/lists/linux-omap/msg118615.html
	 *
	 * You can override this later with
	 *	&tps {  /delete-property/ ti,pmic-shutdown-controller;  }
	 * if you want to use RTC-only mode and made sure you are not affected
	 * by the hardware problems. (Tip: double-check by performing a current
	 * measurement after shutdown: it should be less than 1 mA.)
	 */

	interrupts = <7>; /* NMI */
	interrupt-parent = <&intc>;

	ti,pmic-shutdown-controller;

	charger {
		status = "okay";
	};

	pwrbutton {
		status = "okay";
	};

	regulators {
		dcdc1_reg: regulator@0 {
			regulator-name = "vdds_dpr";
			regulator-always-on;
		};

		dcdc2_reg: regulator@1 {
			/* VDD_MPU voltage limits 0.95V - 1.26V with +/-4% tolerance */
			regulator-name = "vdd_mpu";
			regulator-min-microvolt = <925000>;
			regulator-max-microvolt = <1351500>;
			regulator-boot-on;
			regulator-always-on;
		};

		dcdc3_reg: regulator@2 {
			/* VDD_CORE voltage limits 0.95V - 1.1V with +/-4% tolerance */
			regulator-name = "vdd_core";
			regulator-min-microvolt = <925000>;
			regulator-max-microvolt = <1150000>;
			regulator-boot-on;
			regulator-always-on;
		};

		ldo1_reg: regulator@3 {
			regulator-name = "vio,vrtc,vdds";
			regulator-always-on;
		};

		ldo2_reg: regulator@4 {
			regulator-name = "vdd_3v3aux";
			regulator-always-on;
		};

		ldo3_reg: regulator@5 {
			regulator-name = "vdd_1v8";
			regulator-always-on;
		};

		ldo4_reg: regulator@6 {
			regulator-name = "vdd_3v3a";
			regulator-always-on;
		};
	};
};

/* PHY */
&mac {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&cpsw_default>;
	pinctrl-1 = <&cpsw_sleep>;
//	dual_emac=<1>;
	status = "okay";
};

&davinci_mdio {
	pinctrl-names = "default", "sleep";
	compatible = "ti,cpsw-mdio", "ti,davinci_mdio";
	pinctrl-0 = <&davinci_mdio_pins_default>;
	pinctrl-1 = <&davinci_mdio_pins_sleep>;
	status = "okay";

	dp83867_0: ethernet-phy@0 {
		reg = <0>;
		ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
		ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
		ti,min-output-impedance;
		ti,dp83867-rxctrl-strap-quirk;
	};

	dp83867_1: ethernet-phy@1 {
		reg = <1>;
		ti,rx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
		ti,tx-internal-delay = <DP83867_RGMIIDCTL_1_75_NS>;
		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
		ti,min-output-impedance;
		ti,dp83867-rxctrl-strap-quirk;
	};
};
/*swapping ids to fix hardware issue */
&cpsw_emac0 {
	phy_id = <&davinci_mdio>, <1>;
	phy-mode = "rgmii-id";
//	dual_emac_res_vlan = <2>;
};

&cpsw_emac1 {
	phy_id = <&davinci_mdio>, <0>;
	phy-mode = "rgmii-id";
//	dual_emac_res_vlan = <1>;
};

/* ADC */
&tscadc {/* touch screen adc*/
	status = "okay";
};

&am335x_adc {
	ti,adc-channels = <0 1 2 3 4 5 6 7>;
};


&wkup_m3_ipc {
	ti,scale-data-fw = "am335x-bone-scale-data.bin";
};

/**************CX3 stuff ends*************************************************************************************************/

&am33xx_pinmux {
	pinctrl-names = "default";
//	pinctrl-0 = <&clkout2_pin>;


	mmc1_pins: pinmux_mmc1_pins {
		pinctrl-single,pins = <
			AM33XX_IOPAD(0x960, PIN_INPUT | MUX_MODE7)		/* spio0_cs1.gpio0_6 */
			AM33XX_IOPAD(0x8fc, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat0.mmc0_dat0 */
			AM33XX_IOPAD(0x8f8, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat1.mmc0_dat1 */
//conflict w/ uart4
//			AM33XX_IOPAD(0x8f4, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat2.mmc0_dat2 */
			AM33XX_IOPAD(0x8f0, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat3.mmc0_dat3 */
			AM33XX_IOPAD(0x904, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_cmd.mmc0_cmd */
			AM33XX_IOPAD(0x900, PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_clk.mmc0_clk */
		>;
	};


};

&mmc1 {
	status = "okay";
	bus-width = <0x4>;
	pinctrl-names = "default";
	pinctrl-0 = <&mmc1_pins>;
	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
};
/{
#if 0
	cx3gpios {
		pinctrl-names = "default";
		pinctrl-0 = <&cx3_gpio_default>;
		
		compatible = "gpio-leds";
		gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
	};
#endif

};