diff -Nru linux-3.14.16/arch/arm/boot/dts/am335x-ntnu-b2xx.dts linux-3.14.16.kk/arch/arm/boot/dts/am335x-ntnu-b2xx.dts --- linux-3.14.16/arch/arm/boot/dts/am335x-ntnu-b2xx.dts 1970-01-01 01:00:00.000000000 +0100 +++ linux-3.14.16.kk/arch/arm/boot/dts/am335x-ntnu-b2xx.dts 2016-03-31 11:45:37.584000000 +0200 @@ -0,0 +1,169 @@ +/* + * 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) + >; + }; + + /* 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) + >; + }; + + /* 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) + >; + }; + + /* 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) + >; + }; + + + + /* 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 UART1. */ +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>; + status = "okay"; +}; + +/* Enable UART2 (actual UART3). */ +&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 -Nru 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 2016-03-31 11:46:14.640000000 +0200 @@ -226,6 +226,7 @@ am335x-evmsk.dtb \ am335x-bone.dtb \ am335x-boneblack.dtb \ + am335x-ntnu-b2xx.dtb \ am335x-nano.dtb \ am335x-base0033.dtb \ am3517-evm.dtb \