7c20258
From 0e30e7a460e6260521d5d7cdfb199b543f8e5def Mon Sep 17 00:00:00 2001
6a91557
From: Robert Nelson <robertcnelson@gmail.com>
6a91557
Date: Tue, 31 Dec 2013 14:18:00 -0600
6a91557
Subject: [PATCH] arm: dts: am335x-bone-common: setup default pinmux
6a91557
 http://elinux.org/Basic_Proto_Cape
6a91557
6a91557
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
6a91557
---
6a91557
 arch/arm/boot/dts/am335x-bone-common.dtsi | 130 ++++++++++++++++++++++++++++++
6a91557
 1 file changed, 130 insertions(+)
6a91557
6a91557
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
6a91557
index c7357bcc7d5c..86cdb52dbf8a 100644
6a91557
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
6a91557
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
6a91557
@@ -98,6 +98,13 @@
6a91557
 		>;
6a91557
 	};
6a91557
 
6a91557
+	uart1_pins: pinmux_uart1_pins {
6a91557
+		pinctrl-single,pins = <
6a91557
+			0x180 (PIN_INPUT_PULLUP | MUX_MODE0)	/* uart1_rxd.uart1_rxd */
6a91557
+			0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)	/* uart1_txd.uart1_txd */
6a91557
+		>;
6a91557
+	};
6a91557
+
6a91557
 	clkout2_pin: pinmux_clkout2_pin {
6a91557
 		pinctrl-single,pins = <
6a91557
 			0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3)	/* xdma_event_intr1.clkout2 */
6a91557
@@ -178,6 +185,33 @@
6a91557
 			0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
6a91557
 		>;
6a91557
 	};
6a91557
+
6a91557
+	spi0_pins: pinmux_spi0_pins {
6a91557
+		pinctrl-single,pins = <
6a91557
+			0x150 (PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_sclk.spi0_sclk */
6a91557
+			0x154 (PIN_INPUT_PULLUP | MUX_MODE0)	/* spi0_d0.spi0_d0 */
6a91557
+			0x158 (PIN_OUTPUT_PULLUP | MUX_MODE0)	/* spi0_d1.spi0_d1 */
6a91557
+			0x15c (PIN_OUTPUT_PULLUP | MUX_MODE0)	/* spi0_cs0.spi0_cs0 */
6a91557
+		>;
6a91557
+	};
6a91557
+
6a91557
+	ehrpwm1_pin_p9_14: pinmux_ehrpwm1_pin_p9_14 {
6a91557
+		pinctrl-single,pins = <
6a91557
+			0x048 0x6	/* P9_14 (ZCZ ball U14) | MODE 6 */
6a91557
+		>;
6a91557
+	};
6a91557
+
6a91557
+	ehrpwm1_pin_p9_16: pinmux_ehrpwm1_pin_p9_16 {
6a91557
+		pinctrl-single,pins = <
6a91557
+			0x04c 0x6	/* P9_16 (ZCZ ball T14) | MODE 6 */
6a91557
+		>;
6a91557
+	};
6a91557
+
6a91557
+	ecap0_pin_p9_42: pinmux_ecap0_pin_p9_42 {
6a91557
+		pinctrl-single,pins = <
6a91557
+			0x164 0x0	/* P9_42 (ZCZ ball C18) | MODE 0 */
6a91557
+		>;
6a91557
+	};
6a91557
 };
6a91557
 
6a91557
 &uart0 {
6a91557
@@ -187,6 +221,13 @@
6a91557
 	status = "okay";
6a91557
 };
6a91557
 
6a91557
+&uart1 {
6a91557
+	pinctrl-names = "default";
6a91557
+	pinctrl-0 = <&uart1_pins>;
6a91557
+
6a91557
+	status = "okay";
6a91557
+};
6a91557
+
6a91557
 &usb {
6a91557
 	status = "okay";
6a91557
 };
6a91557
@@ -261,6 +302,56 @@
6a91557
 	};
6a91557
 };
6a91557
 
6a91557
+&epwmss0 {
6a91557
+	pinctrl-names = "default";
6a91557
+	pinctrl-0 = <&ecap0_pin_p9_42>;
6a91557
+	status = "okay";
6a91557
+
6a91557
+	ecap@48300100 {
6a91557
+		status = "okay";
6a91557
+	};
6a91557
+};
6a91557
+
6a91557
+&epwmss1 {
6a91557
+	pinctrl-names = "default";
6a91557
+	pinctrl-0 = <
6a91557
+		&ehrpwm1_pin_p9_14
6a91557
+		&ehrpwm1_pin_p9_16
6a91557
+	>;
6a91557
+
6a91557
+	status = "okay";
6a91557
+
6a91557
+	ehrpwm@48302200 {
6a91557
+		status = "okay";
6a91557
+	};
6a91557
+};
6a91557
+
6a91557
+&spi0 {
6a91557
+	pinctrl-names = "default";
6a91557
+	pinctrl-0 = <&spi0_pins>;
6a91557
+	status = "okay";
6a91557
+
6a91557
+	spidev0: spi@0 {
6a91557
+		compatible = "spidev";
6a91557
+		reg = <0>;
6a91557
+		spi-max-frequency = <16000000>;
6a91557
+		spi-cpha;
6a91557
+	};
6a91557
+
6a91557
+	spidev1: spi@1 {
6a91557
+		compatible = "spidev";
6a91557
+		reg = <1>;
6a91557
+		spi-max-frequency = <16000000>;
6a91557
+	};
6a91557
+};
6a91557
+
6a91557
+&tscadc {
6a91557
+	status = "okay";
6a91557
+	adc {
6a91557
+		ti,adc-channels = <4 5 6>;
6a91557
+	};
6a91557
+};
6a91557
+
6a91557
 /include/ "tps65217.dtsi"
6a91557
 
6a91557
 &tps {
6a91557
@@ -337,3 +428,42 @@
6a91557
 	cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
6a91557
 	cd-inverted;
6a91557
 };
6a91557
+
6a91557
+/ {
6a91557
+	ocp {
6a91557
+		//FIXME: these pwm's still need work, this guild isn't working..
6a91557
+		//http://elinux.org/EBC_Exercise_13_Pulse_Width_Modulation
6a91557
+		pwm_test_P9_14@0 {
6a91557
+			compatible = "pwm_test";
6a91557
+			pwms = <&ehrpwm1 0 500000 1>;
6a91557
+			pwm-names = "PWM_P9_14";
6a91557
+			pinctrl-names = "default";
6a91557
+			pinctrl-0 = <&ehrpwm1_pin_p9_14>;
6a91557
+			enabled = <1>;
6a91557
+			duty = <0>;
6a91557
+			status = "okay";
6a91557
+		};
6a91557
+
6a91557
+		pwm_test_P9_16@0 {
6a91557
+			compatible = "pwm_test";
6a91557
+			pwms = <&ehrpwm1 0 500000 1>;
6a91557
+			pwm-names = "PWM_P9_16";
6a91557
+			pinctrl-names = "default";
6a91557
+			pinctrl-0 = <&ehrpwm1_pin_p9_16>;
6a91557
+			enabled = <1>;
6a91557
+			duty = <0>;
6a91557
+			status = "okay";
6a91557
+		};
6a91557
+
6a91557
+		pwm_test_P9_42 {
6a91557
+			compatible = "pwm_test";
6a91557
+			pwms = <&ecap0 0 500000 1>;
6a91557
+			pwm-names = "PWM_P9_42";
6a91557
+			pinctrl-names = "default";
6a91557
+			pinctrl-0 = <&ecap0_pin_p9_42>;
6a91557
+			enabled = <1>;
6a91557
+			duty = <0>;
6a91557
+			status = "okay";
6a91557
+		};
6a91557
+	};
6a91557
+};
6a91557
-- 
6a91557
1.9.3
6a91557