This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
lsts_glued/systems/ntnu-b2xx/patches/linux/3.14.58/00-lctr-b2xx-ntnu-x-dts.patch

140 lines
3.8 KiB
Diff
Raw Normal View History

diff -ruN linux-3.14.16/arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dts linux-3.14.16.kk/arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dts
--- linux-3.14.16/arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dts 1970-01-01 01:00:00.000000000 +0100
+++ linux-3.14.16.kk/arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dts 2015-08-13 13:31:06.308000000 +0200
@@ -0,0 +1,124 @@
+/*
+ * 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-lctr-b2xx.dts"
+
+
+
+&am33xx_pinmux {
+ pinctrl-names = "default";
+ pinctrl-0 = <&board_pins>;
+
+
+ /* UART2. */
+ uart2_pins: pinmux_uart2_pins {
+ pinctrl-single,pins = <
+ /* uart2_rxd */
+ 0x150 (PIN_INPUT_PULLUP | MUX_MODE1)
+ /* uart2_txd */
+ 0x154 (PIN_OUTPUT_PULLDOWN | MUX_MODE1)
+ >;
+ };
+
+ /* GPIO on ntnu cape v1.2. */
+ gpio_pins: pinmux_gpio_pins {
+ pinctrl-single,pins = <
+ /* GPIO 48 - Pin P9 15 - GPIO 1_16 */
+ 0x040 (PIN_INPUT_PULLUP | MUX_MODE7)
+ /* GPIO 51 - Pin P9 16 - GPIO 1_19 */
+ 0x04c (PIN_OUTPUT_PULLDOWN | MUX_MODE7)
+ /* GPIO 4 - Pin P9 17 - GPIO 0_5 */
+ 0x15c (PIN_INPUT_PULLUP | MUX_MODE7)
+ /* GPIO 48 - Pin P9 18 - GPIO 0_4 */
+ 0x158 (PIN_OUTPUT_PULLDOWN | MUX_MODE7)
+ >;
+ };
+
+ /* UART4. */
+ uart4_pins: pinmux_uart4_pins {
+ pinctrl-single,pins = <
+ /* uart4_rxd */
+ 0x70 (PIN_INPUT_PULLUP | MUX_MODE6)
+ /* uart4_txd */
+ 0x74 (PIN_OUTPUT_PULLDOWN | MUX_MODE6)
+ >;
+ };
+
+ /* SPI1 */
+ spi1_pins_s0: spi1_pins_s0 {
+ pinctrl-single,pins = <
+ 0x190 0x33 /* mcasp0_aclkx.spi1_sclk, INPUT_PULLUP | MODE3 */
+ 0x194 0x33 /* mcasp0_fsx.spi1_d0, INPUT_PULLUP | MODE3 */
+ 0x198 0x13 /* mcasp0_axr0.spi1_d1, OUTPUT_PULLUP | MODE3 */
+ 0x19c 0x13 /* mcasp0_ahclkr.spi1_cs0, OUTPUT_PULLUP | MODE3 */
+ 0x164 0x12 /* eCAP0_in_PWM0_out.spi1_cs1 , OUTPUT_PULLUP | MODE2 */
+ >;
+ };
+
+ /* I2C 2 */
+ i2c2_pins: pinmux_i2c2_pins {
+ pinctrl-single,pins = <
+ 0x178 (PIN_INPUT_PULLUP | MUX_MODE3) // spi0_d1.i2c2_sda, IMPUT_PULLUP | MODE3
+ 0x17c (PIN_INPUT_PULLUP | MUX_MODE3) // spi0_cs0.i2c2_scl, INPUT_PULLUP | MODE3
+ >;
+ };
+};
+
+/ {
+/* GPIO. */
+ ntnu_gpio {
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_pins>;
+ compatible = "ntnu-gpio";
+ status = "okay";
+ };
+};
+
+/* Enable UART2. */
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+ status = "okay";
+};
+
+/* Enable UART4. */
+&uart4 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4_pins>;
+ status = "okay";
+};
+
+/* Enable SPI1 */
+&spi1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi1_pins_s0>;
+
+ spidev@1 {
+ spi-max-frequency = <24000000>;
+ reg = <0>;
+ compatible = "linux,spidev";
+ };
+ spidev@2 {
+ spi-max-frequency = <24000000>;
+ reg = <1>;
+ compatible = "linux,spidev";
+ };
+};
+
+/* Enable i2c-2 */
+&i2c2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_pins>;
+
+ status = "okay";
+ clock-frequency = <400000>;
+
+};
diff -ruN linux-3.14.16/arch/arm/boot/dts/Makefile linux-3.14.16.kk/arch/arm/boot/dts/Makefile
--- linux-3.14.16/arch/arm/boot/dts/Makefile 2014-08-08 01:50:59.000000000 +0200
+++ linux-3.14.16.kk/arch/arm/boot/dts/Makefile 2015-11-04 13:15:01.096000000 +0100
@@ -227,6 +227,7 @@
am335x-bone.dtb \
am335x-boneblack.dtb \
am335x-nano.dtb \
+ am335x-lctr-b2xx-ntnu-uart.dtb \
am335x-base0033.dtb \
am3517-evm.dtb \
am3517_mt_ventoux.dtb \