2014-08-20 17:22:24 +00:00
|
|
|
From: Robert Nelson <robertcnelson@gmail.com>
|
|
|
|
Date: Tue, 31 Dec 2013 14:18:00 -0600
|
|
|
|
Subject: [PATCH] arm: dts: am335x-bone-common: setup default pinmux
|
|
|
|
http://elinux.org/Basic_Proto_Cape
|
|
|
|
|
|
|
|
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
|
|
|
|
---
|
2015-03-16 14:07:00 +00:00
|
|
|
arch/arm/boot/dts/am335x-bone-common.dtsi | 222 ++++++++++++++++++++++++++++++
|
|
|
|
1 file changed, 222 insertions(+)
|
2014-08-20 17:22:24 +00:00
|
|
|
|
|
|
|
diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
|
2015-03-16 14:07:00 +00:00
|
|
|
index 1fd496fe1a68..9688dda39e7a 100644
|
2014-08-20 17:22:24 +00:00
|
|
|
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
|
|
|
|
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
|
2015-03-16 14:07:00 +00:00
|
|
|
@@ -95,6 +95,20 @@
|
2014-08-20 17:22:24 +00:00
|
|
|
>;
|
|
|
|
};
|
|
|
|
|
2015-03-16 14:07:00 +00:00
|
|
|
+ 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 */
|
|
|
|
+ >;
|
|
|
|
+ };
|
|
|
|
+
|
2014-08-20 17:22:24 +00:00
|
|
|
+ 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 */
|
2015-03-16 14:07:00 +00:00
|
|
|
@@ -175,6 +189,60 @@
|
2014-08-20 17:22:24 +00:00
|
|
|
0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */
|
|
|
|
>;
|
|
|
|
};
|
|
|
|
+
|
|
|
|
+ spi0_pins: pinmux_spi0_pins {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x150 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */
|
|
|
|
+ 0x154 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */
|
|
|
|
+ 0x158 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */
|
|
|
|
+ 0x15c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
|
|
|
|
+ >;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ ehrpwm1_pin_p9_14: pinmux_ehrpwm1_pin_p9_14 {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x048 0x6 /* P9_14 (ZCZ ball U14) | MODE 6 */
|
|
|
|
+ >;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ ehrpwm1_pin_p9_16: pinmux_ehrpwm1_pin_p9_16 {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x04c 0x6 /* P9_16 (ZCZ ball T14) | MODE 6 */
|
|
|
|
+ >;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ ecap0_pin_p9_42: pinmux_ecap0_pin_p9_42 {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x164 0x0 /* P9_42 (ZCZ ball C18) | MODE 0 */
|
|
|
|
+ >;
|
2015-03-16 14:07:00 +00:00
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ spi0_pins: pinmux_spi0_pins {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x150 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */
|
|
|
|
+ 0x154 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */
|
|
|
|
+ 0x158 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */
|
|
|
|
+ 0x15c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */
|
|
|
|
+ >;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ ehrpwm1_pin_p9_14: pinmux_ehrpwm1_pin_p9_14 {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x048 0x6 /* P9_14 (ZCZ ball U14) | MODE 6 */
|
|
|
|
+ >;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ ehrpwm1_pin_p9_16: pinmux_ehrpwm1_pin_p9_16 {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x04c 0x6 /* P9_16 (ZCZ ball T14) | MODE 6 */
|
|
|
|
+ >;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ ecap0_pin_p9_42: pinmux_ecap0_pin_p9_42 {
|
|
|
|
+ pinctrl-single,pins = <
|
|
|
|
+ 0x164 0x0 /* P9_42 (ZCZ ball C18) | MODE 0 */
|
|
|
|
+ >;
|
2014-08-20 17:22:24 +00:00
|
|
|
+ };
|
|
|
|
};
|
|
|
|
|
|
|
|
&uart0 {
|
2015-03-16 14:07:00 +00:00
|
|
|
@@ -184,6 +252,20 @@
|
2014-08-20 17:22:24 +00:00
|
|
|
status = "okay";
|
|
|
|
};
|
|
|
|
|
2015-03-16 14:07:00 +00:00
|
|
|
+&uart1 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&uart1_pins>;
|
|
|
|
+
|
|
|
|
+ status = "okay";
|
|
|
|
+};
|
|
|
|
+
|
2014-08-20 17:22:24 +00:00
|
|
|
+&uart1 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&uart1_pins>;
|
|
|
|
+
|
|
|
|
+ status = "okay";
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
&usb {
|
|
|
|
status = "okay";
|
|
|
|
};
|
2015-03-16 14:07:00 +00:00
|
|
|
@@ -259,6 +341,106 @@
|
2014-08-20 17:22:24 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2015-03-16 14:07:00 +00:00
|
|
|
+&epwmss0 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&ecap0_pin_p9_42>;
|
|
|
|
+ status = "okay";
|
|
|
|
+
|
|
|
|
+ ecap@48300100 {
|
|
|
|
+ status = "okay";
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+&epwmss1 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <
|
|
|
|
+ &ehrpwm1_pin_p9_14
|
|
|
|
+ &ehrpwm1_pin_p9_16
|
|
|
|
+ >;
|
|
|
|
+
|
|
|
|
+ status = "okay";
|
|
|
|
+
|
|
|
|
+ ehrpwm@48302200 {
|
|
|
|
+ status = "okay";
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+&spi0 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&spi0_pins>;
|
|
|
|
+ status = "okay";
|
|
|
|
+
|
|
|
|
+ spidev0: spi@0 {
|
|
|
|
+ compatible = "spidev";
|
|
|
|
+ reg = <0>;
|
|
|
|
+ spi-max-frequency = <16000000>;
|
|
|
|
+ spi-cpha;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ spidev1: spi@1 {
|
|
|
|
+ compatible = "spidev";
|
|
|
|
+ reg = <1>;
|
|
|
|
+ spi-max-frequency = <16000000>;
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+&tscadc {
|
|
|
|
+ status = "okay";
|
|
|
|
+ adc {
|
|
|
|
+ ti,adc-channels = <4 5 6>;
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
2014-08-20 17:22:24 +00:00
|
|
|
+&epwmss0 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&ecap0_pin_p9_42>;
|
|
|
|
+ status = "okay";
|
|
|
|
+
|
|
|
|
+ ecap@48300100 {
|
|
|
|
+ status = "okay";
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+&epwmss1 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <
|
|
|
|
+ &ehrpwm1_pin_p9_14
|
|
|
|
+ &ehrpwm1_pin_p9_16
|
|
|
|
+ >;
|
|
|
|
+
|
|
|
|
+ status = "okay";
|
|
|
|
+
|
|
|
|
+ ehrpwm@48302200 {
|
|
|
|
+ status = "okay";
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+&spi0 {
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&spi0_pins>;
|
|
|
|
+ status = "okay";
|
|
|
|
+
|
|
|
|
+ spidev0: spi@0 {
|
|
|
|
+ compatible = "spidev";
|
|
|
|
+ reg = <0>;
|
|
|
|
+ spi-max-frequency = <16000000>;
|
|
|
|
+ spi-cpha;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ spidev1: spi@1 {
|
|
|
|
+ compatible = "spidev";
|
|
|
|
+ reg = <1>;
|
|
|
|
+ spi-max-frequency = <16000000>;
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+&tscadc {
|
|
|
|
+ status = "okay";
|
|
|
|
+ adc {
|
|
|
|
+ ti,adc-channels = <4 5 6>;
|
|
|
|
+ };
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
/include/ "tps65217.dtsi"
|
|
|
|
|
|
|
|
&tps {
|
2015-03-16 14:07:00 +00:00
|
|
|
@@ -347,4 +529,44 @@
|
|
|
|
|
|
|
|
&sham {
|
|
|
|
status = "okay";
|
|
|
|
+
|
|
|
|
+};
|
2014-08-20 17:22:24 +00:00
|
|
|
+
|
|
|
|
+/ {
|
|
|
|
+ ocp {
|
|
|
|
+ //FIXME: these pwm's still need work, this guild isn't working..
|
|
|
|
+ //http://elinux.org/EBC_Exercise_13_Pulse_Width_Modulation
|
|
|
|
+ pwm_test_P9_14@0 {
|
|
|
|
+ compatible = "pwm_test";
|
|
|
|
+ pwms = <&ehrpwm1 0 500000 1>;
|
|
|
|
+ pwm-names = "PWM_P9_14";
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&ehrpwm1_pin_p9_14>;
|
|
|
|
+ enabled = <1>;
|
|
|
|
+ duty = <0>;
|
|
|
|
+ status = "okay";
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ pwm_test_P9_16@0 {
|
|
|
|
+ compatible = "pwm_test";
|
|
|
|
+ pwms = <&ehrpwm1 0 500000 1>;
|
|
|
|
+ pwm-names = "PWM_P9_16";
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&ehrpwm1_pin_p9_16>;
|
|
|
|
+ enabled = <1>;
|
|
|
|
+ duty = <0>;
|
|
|
|
+ status = "okay";
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ pwm_test_P9_42 {
|
|
|
|
+ compatible = "pwm_test";
|
|
|
|
+ pwms = <&ecap0 0 500000 1>;
|
|
|
|
+ pwm-names = "PWM_P9_42";
|
|
|
|
+ pinctrl-names = "default";
|
|
|
|
+ pinctrl-0 = <&ecap0_pin_p9_42>;
|
|
|
|
+ enabled = <1>;
|
|
|
|
+ duty = <0>;
|
|
|
|
+ status = "okay";
|
|
|
|
+ };
|
|
|
|
+ };
|
2015-03-16 14:07:00 +00:00
|
|
|
};
|