diff --git a/arch/arm/dts/am335x-bone-common.dtsi b/arch/arm/dts/am335x-bone-common.dtsi
index 5b8230e281..33bf5e20ed 100644
--- a/arch/arm/dts/am335x-bone-common.dtsi
+++ b/arch/arm/dts/am335x-bone-common.dtsi
@@ -29,33 +29,13 @@
 
 		compatible = "gpio-leds";
 
-		led@2 {
-			label = "beaglebone:green:heartbeat";
-			gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "heartbeat";
-			default-state = "off";
-		};
-
-		led@3 {
-			label = "beaglebone:green:mmc0";
-			gpios = <&gpio1 22 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "mmc0";
-			default-state = "off";
-		};
-
 		led@4 {
-			label = "beaglebone:green:usr2";
-			gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
+			label = "beaglebone:yellow:cpu0";
+			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "cpu0";
 			default-state = "off";
 		};
 
-		led@5 {
-			label = "beaglebone:green:usr3";
-			gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "mmc1";
-			default-state = "off";
-		};
 	};
 
 	vmmcsd_fixed: fixedregulator@0 {
@@ -72,10 +52,8 @@
 
 	user_leds_s0: user_leds_s0 {
 		pinctrl-single,pins = <
-			0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a5.gpio1_21 */
-			0x58 (PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_a6.gpio1_22 */
-			0x5c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)	/* gpmc_a7.gpio1_23 */
-			0x60 (PIN_OUTPUT_PULLUP | MUX_MODE7)	/* gpmc_a8.gpio1_24 */
+			0x1B4 (PIN_OUTPUT_PULLUP | MUX_MODE7)	/* XDMA_EVENT_INTR1.gpio0[20] */
+
 		>;
 	};
 
@@ -85,7 +63,32 @@
 			0x18c (PIN_INPUT_PULLUP | MUX_MODE0)	/* i2c0_scl.i2c0_scl */
 		>;
 	};
+	i2c1_pins: pinmux_i2c1_pins {
+		pinctrl-single,pins = <
+			0x10c (PIN_INPUT_PULLUP | MUX_MODE3)	/* i2c1_sda.i2c1_sda */
+			0x110 (PIN_INPUT_PULLUP | MUX_MODE3)	/* i2c1_scl.i2c1_scl */
+		>;
+	};
 
+	spi0_pins: pinmux_spi0_pins {
+		pinctrl-single,pins = <
+			0x150 (PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_sclk */
+			0x154 (PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_d0  */
+			0x158 (PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_d1  */
+			0x15C (PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_cs0 */
+			0x160 (PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_cs1 */
+		>;
+	};
+
+	spi1_pins: pinmux_spi1_pins {
+		pinctrl-single,pins = <
+			0x164 (PIN_INPUT_PULLUP | MUX_MODE4)	/* spi1_sclk */
+			0x168 (PIN_INPUT_PULLUP | MUX_MODE4)	/* spi1_d0  */
+			0x16C (PIN_INPUT_PULLUP | MUX_MODE4)	/* spi1_d1  */
+			0x178 (PIN_INPUT_PULLUP | MUX_MODE4)	/* spi1_cs0 */
+			0x17C (PIN_INPUT_PULLUP | MUX_MODE4)	/* spi1_cs1 */
+		>;
+	};	
 	i2c2_pins: pinmux_i2c2_pins {
 		pinctrl-single,pins = <
 			0x178 (PIN_INPUT_PULLUP | MUX_MODE3)	/* uart1_ctsn.i2c2_sda */
@@ -99,7 +102,12 @@
 			0x174 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart0_txd.uart0_txd */
 		>;
 	};
-
+	uart1_pins: pinmux_uart1_pins {
+		pinctrl-single,pins = <
+			0x180 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart1_rxd.uart1_rxd */
+			0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */
+		>;
+	};
 	clkout2_pin: pinmux_clkout2_pin {
 		pinctrl-single,pins = <
 			0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr1.clkout2 */
@@ -109,26 +117,38 @@
 	cpsw_default: cpsw_default {
 		pinctrl-single,pins = <
 			/* Slave 1 */
-			0x110 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxerr.mii1_rxerr */
-			0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txen.mii1_txen */
-			0x118 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxdv.mii1_rxdv */
-			0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd3.mii1_txd3 */
-			0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd2.mii1_txd2 */
-			0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd1.mii1_txd1 */
-			0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* mii1_txd0.mii1_txd0 */
-			0x12c (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_txclk.mii1_txclk */
-			0x130 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxclk.mii1_rxclk */
-			0x134 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd3.mii1_rxd3 */
-			0x138 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd2.mii1_rxd2 */
-			0x13c (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd1.mii1_rxd1 */
-			0x140 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mii1_rxd0.mii1_rxd0 */
+			0x114 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
+			0x118 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxdv.rgmii1_rctl */
+			0x11c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd3.rgmii1_td3 */
+			0x120 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd2.rgmii1_td2 */
+			0x124 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
+			0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
+			0x12c (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
+			0x130 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxclk.rgmii1_rclk */
+			0x134 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd3.rgmii1_rd3 */
+			0x138 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd2.rgmii1_rd2 */
+			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd1.rgmii1_rd1 */
+			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* mii1_rxd0.rgmii1_rd0 */
+			
+			/* Slave 2 */
+			0x40 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a0.rgmii2_tctl */
+			0x44 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a1.rgmii2_rctl */
+			0x48 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a2.rgmii2_td3 */
+			0x4c (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a3.rgmii2_td2 */
+			0x50 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a4.rgmii2_td1 */
+			0x54 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a5.rgmii2_td0 */
+			0x58 (PIN_OUTPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a6.rgmii2_tclk */
+			0x5c (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a7.rgmii2_rclk */
+			0x60 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a8.rgmii2_rd3 */
+			0x64 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a9.rgmii2_rd2 */
+			0x68 (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a10.rgmii2_rd1 */
+			0x6c (PIN_INPUT_PULLDOWN | MUX_MODE2)	/* gpmc_a11.rgmii2_rd0 */
 		>;
 	};
 
 	cpsw_sleep: cpsw_sleep {
 		pinctrl-single,pins = <
 			/* Slave 1 reset value */
-			0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			0x114 (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			0x118 (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			0x11c (PIN_INPUT_PULLDOWN | MUX_MODE7)
@@ -141,6 +161,20 @@
 			0x138 (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			0x13c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 			0x140 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			
+			/* Slave 2 reset value*/
+			0x40 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x44 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x48 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x4c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x50 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x54 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x58 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x5c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x60 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x64 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x68 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x6c (PIN_INPUT_PULLDOWN | MUX_MODE7)
 		>;
 	};
 
@@ -160,9 +194,16 @@
 		>;
 	};
 
-	mmc1_pins: pinmux_mmc1_pins {
+	mmc1_pins_default: pinmux_mmc1_pins {
 		pinctrl-single,pins = <
-			0x160 (PIN_INPUT | MUX_MODE7) /* GPIO0_6 */
+			0x0F0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat3.mmc0_dat3 */
+			0x0F4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat2.mmc0_dat2 */
+			0x0F8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat1.mmc0_dat1 */
+			0x0FC (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat0.mmc0_dat0 */
+			0x100 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_clk.mmc0_clk */
+			0x104 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_cmd.mmc0_cmd */
+			/*0x1A0 (PIN_INPUT_PULLUP | MUX_MODE7)*/	/* mcasp0_aclkr.gpio3_18 */
+			0x190 (PIN_INPUT_PULLUP | MUX_MODE4)		/* spi0_cs1.gpio0_6 */
 		>;
 	};
 
@@ -170,14 +211,14 @@
 		pinctrl-single,pins = <
 			0x80 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn1.mmc1_clk */
 			0x84 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_csn2.mmc1_cmd */
-			0x00 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad0.mmc1_dat0 */
-			0x04 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad1.mmc1_dat1 */
-			0x08 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad2.mmc1_dat2 */
-			0x0c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad3.mmc1_dat3 */
-			0x10 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad4.mmc1_dat4 */
-			0x14 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad5.mmc1_dat5 */
-			0x18 (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad6.mmc1_dat6 */
-			0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
+			0x20 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad8.mmc1_dat0 */
+			0x24 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad9.mmc1_dat1 */
+			0x28 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad10.mmc1_dat2 */
+			0x2c (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad11.mmc1_dat3 */
+			0x30 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad12.mmc1_dat4 */
+			0x34 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad13.mmc1_dat5 */
+			0x38 (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad14.mmc1_dat6 */
+			0x3c (PIN_INPUT_PULLUP | MUX_MODE2) /* gpmc_ad15.mmc1_dat7 */
 		>;
 	};
 };
@@ -188,7 +229,12 @@
 
 	status = "okay";
 };
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
 
+	status = "okay";
+};
 &usb {
 	status = "okay";
 };
@@ -224,7 +270,7 @@
 	pinctrl-0 = <&i2c0_pins>;
 
 	status = "okay";
-	clock-frequency = <400000>;
+	clock-frequency = <100000>;
 
 	tps: tps@24 {
 		reg = <0x24>;
@@ -240,8 +286,164 @@
 			reg = <0 0x100>;
 		};
 	};
+	ds3231: rtc@68 {
+		compatible = "dallas,ds3231";
+		reg = <0x68>;
+	};
+
+	ssd1305: oled@3C {
+		compatible = "solomon,ssd1305fb-i2c";
+		reg = <0x3C>;
+		reset-gpios = <&gpiom2 8 0>;
+		reset-active-low;
+		solomon,height = <64>;
+		solomon,width = <128>;
+		solomon,page-offset = <0>;
+		solomon,com-seq;
+		solomon,com-invdir;
+		solomon,com-offset = <0>;
+	};
+};
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+
+	status = "okay";
+	clock-frequency = <100000>;
+
+	tlv320aic3106: tlv320aic3106@1b {
+		compatible = "ti,tlv320aic3106";
+		reg = <0x1b>;
+		status = "okay";
+
+		gpio-reset = <&gpiom2 10 0>;
+
+		/* Regulators */
+		/*
+		AVDD-supply = <&vaux2_reg>;
+		IOVDD-supply = <&vaux2_reg>;
+		DRVDD-supply = <&vaux2_reg>;
+		DVDD-supply = <&vbat>;
+		*/
+	};
+
+	ssm2380: ssm2380@31 {
+		compatible = "adi,ssm2380";
+		reg = <0x31>;
+		status = "okay";
+		gpios = <&gpiom2 9 0>;	/* connected to SD */
+	};
 };
 
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_pins>;
+
+	status = "okay";
+
+	flash: m25p40@0 {
+		compatible = "numonyx,m25p40";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+	};
+	
+};
+
+&spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_pins>;
+
+	status = "okay";
+
+	/* keypad */
+	gpiom1: gpio@1 {
+		compatible = "microchip,mcp23s17";
+		gpio-controller;
+		#gpio-cells = <2>;
+		microchip,spi-present-mask = <0x01>;
+		reg = <1>;
+		spi-max-frequency = <1000000>;
+	};
+
+	/* reset */
+	gpiom2: gpio@0 {
+		compatible = "microchip,mcp23s17";
+		gpio-controller;
+		#gpio-cells = <2>;
+		microchip,spi-present-mask = <0x01>;
+		reg = <0>;
+		spi-max-frequency = <1000000>;
+	};
+};
+
+/ {
+	gpio_keys_polled {
+		compatible = "gpio-keys-polled";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		poll-interval = <100>;
+		button@0 {
+			label = "GPIO Key ESC";
+			linux,code = <1>;
+			gpios = <&gpiom1 8 1>;
+		};
+		button@1 {
+			label = "GPIO Key ENTER";
+			linux,code = <28>;
+			gpios = <&gpiom1 9 1>;
+		};
+		button@2 {
+			label = "GPIO Key UP";
+			linux,code = <103>;
+			gpios = <&gpiom1 10 1>;
+		};
+		button@3 {
+			label = "GPIO Key DOWN";
+			linux,code = <108>;
+			gpios = <&gpiom1 11 1>;
+		};
+		button@4 {
+			label = "GPIO Key LEFT";
+			linux,code = <105>;
+			gpios = <&gpiom1 12 1>;
+		};
+		button@5 {
+			label = "GPIO Key RIGHT";
+			linux,code = <106>;
+			gpios = <&gpiom1 13 1>;
+		};
+		button@6 {
+			label = "GPIO Key 1";
+			linux,code = <2>;
+			gpios = <&gpiom1 0 1>;
+		};
+		button@7 {
+			label = "GPIO Key 2";
+			linux,code = <3>;
+			gpios = <&gpiom1 2 1>;
+		};
+		button@8 {
+			label = "GPIO Key 3";
+			linux,code = <4>;
+			gpios = <&gpiom1 1 1>;
+		};
+		button@9 {
+			label = "GPIO Key 4";
+			linux,code = <5>;
+			gpios = <&gpiom1 4 1>;
+		};
+		button@10 {
+			label = "GPIO Key 5";
+			linux,code = <6>;
+			gpios = <&gpiom1 3 1>;
+		};
+		button@11 {
+			label = "GPIO Key 6";
+			linux,code = <7>;
+			gpios = <&gpiom1 5 1>;
+		};
+	};
+};
 &i2c2 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c2_pins>;
@@ -387,8 +589,9 @@
 	status = "okay";
 	bus-width = <0x4>;
 	pinctrl-names = "default";
-	pinctrl-0 = <&mmc1_pins>;
-	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+	pinctrl-0 = <&mmc1_pins_default>;
+	cd-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
+	cd-inverted;
 };
 
 &aes {
diff --git a/arch/arm/dts/am335x-boneblack.dts b/arch/arm/dts/am335x-boneblack.dts
index 27ebe4a65d..f2b945d975 100644
--- a/arch/arm/dts/am335x-boneblack.dts
+++ b/arch/arm/dts/am335x-boneblack.dts
@@ -11,7 +11,7 @@
 #include "am335x-bone-common.dtsi"
 
 / {
-	model = "TI AM335x BeagleBone Black";
+	model = "test TI AM335x BeagleBone Black test";
 	compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
 	chosen {
 		stdout-path = &uart0;
@@ -68,21 +68,194 @@
 			0x1b0 0x03      /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
 		>;
 	};
+
+	mcasp1_pins: mcasp1_pins {
+		pinctrl-single,pins = <
+			0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcasp0_aclkr.mcasp1_aclkx_mux2 */
+			0x1A4 (PIN_INPUT_PULLDOWN | MUX_MODE3)	/* mcasp0_aclkr.mcasp1_fsx_mux2   */
+			0x1A8 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* mcasp0_aclkr.mcasp1_axr0_mux2 */
+			0x1AC (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* mcasp0_aclkr.mcasp1_axr1_mux1 */
+		>;
+	};
+
+	mcasp1_pins_sleep: mcasp1_pins_sleep {
+		pinctrl-single,pins = <
+			0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* mcasp0_aclkr.mcasp1_aclkx_mux2 */
+			0x1A4 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* mcasp0_aclkr.mcasp1_fsx_mux2   */
+			0x1A8 (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* mcasp0_aclkr.mcasp1_axr0_mux2 */
+			0x1AC (PIN_INPUT_PULLDOWN | MUX_MODE7)	/* mcasp0_aclkr.mcasp1_axr1_mux1 */
+		>;
+	};
+
+	nandflash_pins_default: nandflash_pins_default {
+		pinctrl-single,pins = <
+			0x0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad0.gpmc_ad0 */
+			0x4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad1.gpmc_ad1 */
+			0x8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad2.gpmc_ad2 */
+			0xc (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad3.gpmc_ad3 */
+			0x10 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad4.gpmc_ad4 */
+			0x14 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad5.gpmc_ad5 */
+			0x18 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad6.gpmc_ad6 */
+			0x1c (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_ad7.gpmc_ad7 */
+			0x70 (PIN_INPUT_PULLUP | MUX_MODE0)	/* gpmc_wait0.gpmc_wait0 */
+			0x74 (PIN_INPUT_PULLUP | MUX_MODE7)	/* gpmc_wpn.gpio0_30 */
+			0x7c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_csn0.gpmc_csn0  */
+			0x90 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_advn_ale.gpmc_advn_ale */
+			0x94 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_oen_ren.gpmc_oen_ren */
+			0x98 (PIN_OUTPUT | MUX_MODE0)		/* gpmc_wen.gpmc_wen */
+			0x9c (PIN_OUTPUT | MUX_MODE0)		/* gpmc_be0n_cle.gpmc_be0n_cle */
+		>;
+	};
+
+	nandflash_pins_sleep: nandflash_pins_sleep {
+		pinctrl-single,pins = <
+			0x0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0xc (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x10 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x14 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x18 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x1c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x74 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x7c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x98 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7)
+		>;
+	};
+
 };
 
 &lcdc {
 	status = "okay";
 };
 
+&elm {
+	status = "okay";
+};
+
+&gpmc {
+	status = "okay";
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&nandflash_pins_default>;
+	pinctrl-1 = <&nandflash_pins_sleep>;
+	ranges = <0 0 0x08000000 0x10000000>;	/* CS0: NAND */
+	nand@0,0 {
+		reg = <0 0 0>; /* CS0, offset 0 */
+		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 = <44>;
+		gpmc,cs-wr-off-ns = <44>;
+		gpmc,adv-on-ns = <6>;
+		gpmc,adv-rd-off-ns = <34>;
+		gpmc,adv-wr-off-ns = <44>;
+		gpmc,we-on-ns = <0>;
+		gpmc,we-off-ns = <40>;
+		gpmc,oe-on-ns = <0>;
+		gpmc,oe-off-ns = <54>;
+		gpmc,access-ns = <64>;
+		gpmc,rd-cycle-ns = <82>;
+		gpmc,wr-cycle-ns = <82>;
+		gpmc,wait-on-read = "true";
+		gpmc,wait-on-write = "true";
+		gpmc,bus-turnaround-ns = <0>;
+		gpmc,cycle2cycle-delay-ns = <0>;
+		gpmc,clk-activation-ns = <0>;
+		gpmc,wait-monitoring-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 0x000040000>;
+		};
+		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 0x00800000>;
+		};
+		partition@9 {
+			label = "NAND.file-system";
+			reg = <0x00B00000 0x3D800000>;
+		};
+	};
+};
+
+&mcasp1	{
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&mcasp1_pins>;
+	pinctrl-1 = <&mcasp1_pins_sleep>;
+	status = "okay";
+	op-mode = <0>;	/* MCASP_IIS_MODE */
+	tdm-slots = <2>;
+	serial-dir = <
+		1 2 0 0 /* 0: INACTIVE, 1: TX, 2: RX */
+		0 0 0 0
+		0 0 0 0
+		0 0 0 0
+		>;
+	tx-num-evt = <1>;
+	rx-num-evt = <1>;
+};
+
 / {
 	hdmi {
 		compatible = "ti,tilcdc,slave";
-		i2c = <&i2c0>;
+		i2c = <&i2c1>;
 		pinctrl-names = "default", "off";
 		pinctrl-0 = <&nxp_hdmi_bonelt_pins>;
 		pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
 		status = "okay";
 	};
+	sound {
+		compatible = "ti,da830-evm-audio";
+		ti,model = "DA830 EVM";
+		ti,audio-codec = <&tlv320aic3106>;
+		ti,mcasp-controller = <&mcasp1>;
+		ti,codec-clock-rate = <12000000>;
+		ti,audio-routing =
+			"Line Out", 			"LLOUT",
+			"Line Out", 			"RLOUT";
+	};
 };
 
 &rtc {
diff --git a/arch/arm/dts/am335x-evm.dts b/arch/arm/dts/am335x-evm.dts
index 0bda4d4429..af47d02c54 100644
--- a/arch/arm/dts/am335x-evm.dts
+++ b/arch/arm/dts/am335x-evm.dts
@@ -287,9 +287,28 @@
 		>;
 	};
 
-	mmc1_pins: pinmux_mmc1_pins {
+	mmc1_pins_default: pinmux_mmc1_pins {
 		pinctrl-single,pins = <
-			0x160 (PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
+			0x0F0 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat3.mmc0_dat3 */
+			0x0F4 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat2.mmc0_dat2 */
+			0x0F8 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat1.mmc0_dat1 */
+			0x0FC (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_dat0.mmc0_dat0 */
+			0x100 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_clk.mmc0_clk */
+			0x104 (PIN_INPUT_PULLUP | MUX_MODE0)	/* mmc0_cmd.mmc0_cmd */
+			/*0x1A0 (PIN_INPUT_PULLUP | MUX_MODE7)*/	/* mcasp0_aclkr.gpio3_18 */
+			0x190 (PIN_INPUT | MUX_MODE4)		/* spi0_cs1.gpio0_6 */
+		>;
+	};
+
+	mmc1_pins_sleep: pinmux_mmc1_pins_sleep {
+		pinctrl-single,pins = <
+			0x0F0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x0F4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x0F8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x0FC (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x100 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			0x104 (PIN_INPUT_PULLDOWN | MUX_MODE7)
+			/*0x1A0 (PIN_INPUT_PULLDOWN | MUX_MODE7)*/
 		>;
 	};
 
@@ -712,12 +731,13 @@
 &mmc1 {
 	status = "okay";
 	vmmc-supply = <&vmmc_reg>;
-	bus-width = <4>;
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc1_pins>;
-	cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
+	bus-width = <0x4>;
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&mmc1_pins_default>;
+	pinctrl-1 = <&mmc1_pins_sleep>;
+	cd-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
+	/*cd-inverted;*/
 };
-
 &mmc3 {
 	/* these are on the crossbar and are outlined in the
 	   xbar-event-map element */
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
old mode 100644
new mode 100755
index 4dc04817dc..2bed5bb96c
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -840,7 +840,12 @@ int board_late_init(void)
 	if (board_is_bbg1())
 		name = "BBG1";
 	if (board_is_bben())
-		name = "BBEN";
+		name = "A335BNLT";
+
+	//debug
+	puts("Board_name is null, use A335BNLT as default.\n");
+	printf("board_name: %s\n", name);
+	//debug end
 	set_board_info_env(name);
 
 	/*
@@ -861,6 +866,7 @@ int board_late_init(void)
 	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
 	mac_addr[4] = mac_lo & 0xFF;
 	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
+	printf("The MAC0 is %pM\n", mac_addr);
 
 	if (!env_get("ethaddr")) {
 		printf("<ethaddr> not set. Validating first E-fuse MAC\n");
@@ -877,6 +883,7 @@ int board_late_init(void)
 	mac_addr[3] = (mac_hi & 0xFF000000) >> 24;
 	mac_addr[4] = mac_lo & 0xFF;
 	mac_addr[5] = (mac_lo & 0xFF00) >> 8;
+	printf("The MAC1 is %pM\n", mac_addr);
 
 	if (!env_get("eth1addr")) {
 		if (is_valid_ethaddr(mac_addr))
@@ -909,12 +916,12 @@ struct cpsw_slave_data slave_data[] = {
 	{
 		.slave_reg_ofs  = CPSW_SLAVE0_OFFSET,
 		.sliver_reg_ofs = CPSW_SLIVER0_OFFSET,
-		.phy_addr       = 0,
+		.phy_addr       = 1/*0*/,
 	},
 	{
 		.slave_reg_ofs  = CPSW_SLAVE1_OFFSET,
 		.sliver_reg_ofs = CPSW_SLIVER1_OFFSET,
-		.phy_addr       = 1,
+		.phy_addr       = 0/*1*/,
 	},
 };
 
diff --git a/board/ti/am335x/board.h b/board/ti/am335x/board.h
index 48df914af9..476eb517c0 100644
--- a/board/ti/am335x/board.h
+++ b/board/ti/am335x/board.h
@@ -30,7 +30,8 @@ static inline int board_is_bone(void)
 
 static inline int board_is_bone_lt(void)
 {
-	return board_ti_is("A335BNLT");
+	//return board_ti_is("A335BNLT");
+	return 1;//debug by lq
 }
 
 static inline int board_is_pb(void)
@@ -45,7 +46,8 @@ static inline int board_is_bbg1(void)
 
 static inline int board_is_bben(void)
 {
-	return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2);
+	//return board_is_bone_lt() && !strncmp(board_ti_get_rev(), "SE", 2);
+	return 1;//debug by lq
 }
 
 static inline int board_is_beaglebonex(void)
diff --git a/board/ti/am335x/mux.c b/board/ti/am335x/mux.c
old mode 100644
new mode 100755
index 6fb2c009ba..b4793fd508
--- a/board/ti/am335x/mux.c
+++ b/board/ti/am335x/mux.c
@@ -66,7 +66,14 @@ static struct module_pin_mux mmc0_pin_mux[] = {
 	{OFFSET(mmc0_clk), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CLK */
 	{OFFSET(mmc0_cmd), (MODE(0) | RXACTIVE | PULLUP_EN)},	/* MMC0_CMD */
 	{OFFSET(mcasp0_aclkr), (MODE(4) | RXACTIVE)},		/* MMC0_WP */
+	/* begin lq for sd */
+#if 0
+	//{OFFSET(spi0_cs1), (MODE(5) | RXACTIVE | PULLUP_EN)},	/* MMC0_CD */
 	{OFFSET(spi0_cs1), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* GPIO0_6 */
+#else
+	{OFFSET(mcasp0_aclkx), (MODE(4) | RXACTIVE | PULLUP_EN)},	/* MMC0_CD */
+#endif
+/* end */
 	{-1},
 };
 
@@ -107,6 +114,26 @@ static struct module_pin_mux mmc1_pin_mux[] = {
 	{OFFSET(gpmc_advn_ale), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* MMC1_CD */
 	{-1},
 };
+/* begin wangquanli for emmc */
+static struct module_pin_mux hls_mmc1_pin_mux[] = {
+		{OFFSET(gpmc_ad8), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT0 */
+		{OFFSET(gpmc_ad9), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT1 */
+		{OFFSET(gpmc_ad10), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT2 */
+		{OFFSET(gpmc_ad11), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT3 */
+		{OFFSET(gpmc_ad12), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT4 */
+		{OFFSET(gpmc_ad13), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT5 */
+		{OFFSET(gpmc_ad14), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT6 */
+		{OFFSET(gpmc_ad15), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_DAT7 */
+		{OFFSET(gpmc_csn1), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CLK */
+		{OFFSET(gpmc_csn2), (MODE(2) | RXACTIVE | PULLUP_EN)},	/* MMC1_CMD */
+#if 0
+		{OFFSET(gpmc_csn0), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* MMC1_WP */
+		{OFFSET(gpmc_advn_ale), (MODE(7) | RXACTIVE | PULLUP_EN)},	/* MMC1_CD */
+		RSTN   T13
+#endif
+		{-1},
+	};
+/* end */
 
 static struct module_pin_mux i2c0_pin_mux[] = {
 	{OFFSET(i2c0_sda), (MODE(0) | RXACTIVE |
@@ -115,7 +142,8 @@ static struct module_pin_mux i2c0_pin_mux[] = {
 			PULLUDEN | SLEWCTRL)}, /* I2C_SCLK */
 	{-1},
 };
-
+/* begin wangquanli 20151013 for i2c1 */
+#if 0
 static struct module_pin_mux i2c1_pin_mux[] = {
 	{OFFSET(spi0_d1), (MODE(2) | RXACTIVE |
 			PULLUDEN | SLEWCTRL)},	/* I2C_DATA */
@@ -123,6 +151,15 @@ static struct module_pin_mux i2c1_pin_mux[] = {
 			PULLUDEN | SLEWCTRL)},	/* I2C_SCLK */
 	{-1},
 };
+#else
+	static struct module_pin_mux i2c1_pin_mux[] = {
+		{OFFSET(mii1_crs), (MODE(3) | RXACTIVE |
+				PULLUDEN | SLEWCTRL)},	/* I2C_DATA */
+		{OFFSET(mii1_rxerr), (MODE(3) | RXACTIVE |
+				PULLUDEN | SLEWCTRL)},	/* I2C_SCLK */
+		{-1},
+	};
+#endif
 
 static struct module_pin_mux spi0_pin_mux[] = {
 	{OFFSET(spi0_sclk), (MODE(0) | RXACTIVE | PULLUDEN)},	/* SPI0_SCLK */
@@ -133,6 +170,17 @@ static struct module_pin_mux spi0_pin_mux[] = {
 			PULLUDEN | PULLUP_EN)},			/* SPI0_CS0 */
 	{-1},
 };
+static struct module_pin_mux spi1_pin_mux[] = {
+	{OFFSET(ecap0_in_pwm0_out), (MODE(4) | RXACTIVE | PULLUDEN)},	/* SPI1_SCLK */
+	{OFFSET(uart0_ctsn), (MODE(4) | RXACTIVE |
+			PULLUDEN | PULLUP_EN)}, 		/* SPI1_D0 */
+	{OFFSET(uart0_rtsn), (MODE(4) | RXACTIVE | PULLUDEN)},	/* SPI1_D1 */
+	{OFFSET(uart1_ctsn), (MODE(4) | RXACTIVE |
+			PULLUDEN | PULLUP_EN)}, 		/* SPI1_CS0 */
+	{OFFSET(uart1_rtsn), (MODE(4) | RXACTIVE |
+			PULLUDEN | PULLUP_EN)}, 		/* SPI1_CS1 */
+	{-1},
+};
 
 static struct module_pin_mux gpio0_7_pin_mux[] = {
 	{OFFSET(ecap0_in_pwm0_out), (MODE(7) | PULLUDEN)},	/* GPIO0_7 */
@@ -409,7 +457,19 @@ void enable_board_pin_mux(void)
 #elif defined(CONFIG_NOR) && defined(CONFIG_EMMC_BOOT)
 		configure_module_pin_mux(bone_norcape_pin_mux);
 #else
-		configure_module_pin_mux(mmc1_pin_mux);
+		//configure_module_pin_mux(mmc1_pin_mux);
+//debug
+#if defined(CONFIG_MTD_RAW_NAND)
+		configure_module_pin_mux(nand_pin_mux);
+		puts("Hls CONFIG_NAND pinmux.\n");
+#endif
+		configure_module_pin_mux(hls_mmc1_pin_mux);
+		puts("Hls config mmc1 pinmux.\n");
+		configure_module_pin_mux(spi0_pin_mux);
+		configure_module_pin_mux(spi1_pin_mux);
+		puts("Hls config spi0 and spi1 pinmux.\n");
+//debug end
+
 #endif
 	} else if (board_is_pb()) {
 		configure_module_pin_mux(mii1_pin_mux);
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 9a61a04af9..08458c23fe 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -92,3 +92,10 @@ CONFIG_WDT=y
 CONFIG_DYNAMIC_CRC_TABLE=y
 CONFIG_RSA=y
 CONFIG_LZO=y
+CONFIG_CONS_INDEX=1
+CONFIG_DEBUG_UART_BASE=0x44e09000
+CONFIG_DEBUG_UART_CLOCK=48000000
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_OMAP=y
+CONFIG_DEBUG_UART_SHIFT=2
+CONFIG_DEBUG_UART_ANNOUNCE=y
\ No newline at end of file
