lctr-b2xx: added proper device tree.

This commit is contained in:
Ricardo Martins 2014-02-01 07:09:33 +00:00
parent f582c053ac
commit 116e0ce235
3 changed files with 76 additions and 44 deletions

View File

@ -5,7 +5,7 @@ cfg_services0='network dropbear storage upgrade syslog ptpd'
cfg_services2='dune'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux'
cfg_target_linux_kernel='arch/arm/boot/zImage'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-boneblack.dtb'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx.dtb'
cfg_target_uboot_config='am335x_bbb'
cfg_ptpd_interface='eth0'
cfg_terminal='ttyO0'

View File

@ -0,0 +1,75 @@
diff -Nru linux-3.13.1/arch/arm/boot/dts/Makefile linux-3.13.1.rasm/arch/arm/boot/dts/Makefile
--- linux-3.13.1/arch/arm/boot/dts/Makefile 2014-01-29 13:06:37.000000000 +0000
+++ linux-3.13.1.rasm/arch/arm/boot/dts/Makefile 2014-02-01 06:53:43.968486026 +0000
@@ -198,6 +198,7 @@
am335x-evmsk.dtb \
am335x-bone.dtb \
am335x-boneblack.dtb \
+ am335x-lctr-b2xx.dtb \
am335x-nano.dtb \
am335x-base0033.dtb \
am3517-evm.dtb \
diff -Nru linux-3.13.1/arch/arm/boot/dts/am335x-lctr-b2xx.dts linux-3.13.1.rasm/arch/arm/boot/dts/am335x-lctr-b2xx.dts
--- linux-3.13.1/arch/arm/boot/dts/am335x-lctr-b2xx.dts 1970-01-01 01:00:00.000000000 +0100
+++ linux-3.13.1.rasm/arch/arm/boot/dts/am335x-lctr-b2xx.dts 2014-02-01 06:51:48.273816483 +0000
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2014 Universidade do Porto - Faculdade de Engenharia
+ *
+ * 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 "am335x-boneblack.dts"
+
+/ {
+ /* No need for HDMI. */
+ hdmi {
+ status = "disabled";
+ };
+
+ /* PPS. */
+ pps {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pps_pins>;
+ compatible = "pps-gpio";
+ status = "okay";
+ gpios = <&gpio2 13 0>;
+ assert-rising-edge;
+ };
+};
+
+&am33xx_pinmux {
+ pinctrl-names = "default";
+ pinctrl-0 = <&board_pins>;
+
+ /* User space. */
+ board_pins: pinmux_board_pins {
+ /* lcd_data6 / gpio2_12 / GPIO 76 */
+ pinctrl-single,pins = <0xb8 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)>;
+ };
+
+ /* PPS. */
+ pps_pins: pinmux_pps_pins {
+ /* lcd_data7 / gpio2_13 */
+ pinctrl-single,pins = <0xbc (PIN_INPUT_PULLDOWN | MUX_MODE7)>;
+ };
+
+ /* UART1. */
+ uart1_pins: pinmux_uart1_pins {
+ pinctrl-single,pins = <
+ /* uart1_rxd */
+ 0x180 (PIN_INPUT_PULLUP | MUX_MODE0)
+ /* uart1_txd */
+ 0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0)
+ >;
+ };
+};
+
+/* Enable UART1. */
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>;
+ status = "okay";
+};

View File

@ -1,43 +0,0 @@
diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts
index 6b71ad9..0299c79 100644
--- a/arch/arm/boot/dts/am335x-boneblack.dts
+++ b/arch/arm/boot/dts/am335x-boneblack.dts
@@ -60,6 +60,17 @@
0x1b0 0x03 /* xdma_event_intr0, OMAP_MUX_MODE3 | AM33XX_PIN_OUTPUT */
>;
};
+
+ gps_pps_pins: gps_pps_pins {
+ pinctrl-single,pins = <0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)>;
+ };
+
+ 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 */
+ >;
+ };
};
&lcdc {
@@ -75,4 +86,19 @@
pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>;
status = "okay";
};
+
+ pps {
+ compatible = "pps-gpio";
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gps_pps_pins>;
+ gpios = <&gpio2 2 0>;
+ assert-rising-edge;
+ };
};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>;
+ status = "okay";
+};
\ No newline at end of file