ntnu-b2xx: Added nescesarry configuration files

This commit is contained in:
Kristian Klausen 2015-11-13 15:13:38 +01:00
parent 6cb46ea056
commit 87b021ab77
8 changed files with 3053 additions and 0 deletions

File diff suppressed because it is too large Load Diff

17
systems/ntnu-b2xx/config Normal file
View File

@ -0,0 +1,17 @@
cfg_architecture='cortex-a8'
cfg_storage='data0:ext4:/opt'
cfg_modules=''
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-lctr-b2xx.dtb'
cfg_target_uboot_config='am335x_bbb'
cfg_ptpd_interface='eth0'
cfg_terminal='ttyO0'
cfg_partitions=\
(
x-boot boot0 512B 32MiB
root root0 32MiB 544MiB
data data0 544MiB -1
)

View File

@ -0,0 +1,6 @@
ttyO0 root:root 660 >terminal
ttyO1 root:root 660 >uart/1
ttyO2 root:root 660 >uart/2
ttyO4 root:root 660 >uart/4
ttyO5 root:root 660 >uart/5
ttyUSB[0-9]* root:root 660 */sbin/mdev-ttyusb

View File

@ -0,0 +1,11 @@
diff -Nru libswiftnav-0.11/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h libswiftnav-0.11.kk/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h
--- libswiftnav-0.11/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h 1970-01-01 01:00:00.000000000 +0100
+++ libswiftnav-0.11.kk/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h 2014-10-23 08:28:34.888000000 +0200
@@ -0,0 +1,7 @@
+/* arith.h definitions for ARM Cortex-A8
+ * Calculated by running arithchk on a Beaglebone Black. */
+#define IEEE_8087
+#define Arith_Kind_ASL 1
+#define Double_Align
+#define QNaN0 0x0
+#define QNaN1 0x7ff80000

View File

@ -0,0 +1,11 @@
diff -Nru libswiftnav-0.11/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h libswiftnav-0.11.kk/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h
--- libswiftnav-0.11/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h 1970-01-01 01:00:00.000000000 +0100
+++ libswiftnav-0.11.kk/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h 2014-10-23 08:28:34.888000000 +0200
@@ -0,0 +1,7 @@
+/* arith.h definitions for ARM Cortex-A8
+ * Calculated by running arithchk on a Beaglebone Black. */
+#define IEEE_8087
+#define Arith_Kind_ASL 1
+#define Double_Align
+#define QNaN0 0x0
+#define QNaN1 0x7ff80000

View File

@ -0,0 +1,92 @@
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,77 @@
+/*
+ * 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)
+ >;
+ };
+};
+
+/* 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";
+};

View File

@ -0,0 +1,139 @@
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 \

View File

@ -0,0 +1,153 @@
diff --git a/boards.cfg b/boards.cfg
index 1ba2081..08dc221 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -1218,3 +1218,4 @@ Orphan powerpc ppc4xx - sandburst metrobox
# The following were move to "Orphan" in September, 2013
Orphan arm arm1136 mx31 - imx31_phycore imx31_phycore_eet imx31_phycore:IMX31_PHYCORE_EET (resigned) Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Orphan arm arm1136 mx31 freescale mx31ads mx31ads - (resigned) Guennadi Liakhovetski <g.liakhovetski@gmx.de>
+Active arm armv7 am33xx ti am335x am335x_bbb am335x_bbb:SERIAL1,CONS_INDEX=1 Ricardo Martins <rasm@fe.up.pt>
diff --git a/include/configs/am335x_bbb.h b/include/configs/am335x_bbb.h
new file mode 100644
index 0000000..9e00817
--- /dev/null
+++ b/include/configs/am335x_bbb.h
@@ -0,0 +1,138 @@
+/*
+ * am335x_evm.h
+ *
+ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __CONFIG_AM335X_EVM_H
+#define __CONFIG_AM335X_EVM_H
+
+#include <configs/ti_am335x_common.h>
+
+#ifdef CONFIG_BOOTDELAY
+# undef CONFIG_BOOTLDELAY
+#endif
+#define CONFIG_BOOTDELAY 2
+#define CONFIG_AUTOBOOT_KEYED 1
+#define CONFIG_AUTOBOOT_DELAY_STR "uboot"
+#define CONFIG_AUTOBOOT_PROMPT \
+ "autoboot in %d seconds\n",bootdelay
+
+#undef CONFIG_BOOTM_NETBSD
+#undef CONFIG_BOOTM_PLAN9
+#undef CONFIG_BOOTM_RTEMS
+#undef CONFIG_BOOTM_VXWORKS
+#undef CONFIG_BOOTP_DNS
+#undef CONFIG_BOOTP_DNS2
+#undef CONFIG_BOOTP_SEND_HOSTNAME
+#undef CONFIG_CMD_ASKENV
+#undef CONFIG_CMD_BDI
+#undef CONFIG_CMD_BOOTD
+#undef CONFIG_CMD_CRC32
+#undef CONFIG_CMD_DFU
+#undef CONFIG_CMD_DHCP
+#undef CONFIG_CMD_EDITENV
+#undef CONFIG_CMD_EDITENV
+#undef CONFIG_CMD_EXPORTENV
+#undef CONFIG_CMD_FPGA
+#undef CONFIG_CMD_ITEST
+#undef CONFIG_CMD_LOADB
+#undef CONFIG_CMD_LOADS
+#undef CONFIG_CMD_MEMORY
+#undef CONFIG_CMD_MISC
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
+#undef CONFIG_CMD_PING
+#undef CONFIG_CMD_SETGETDCR
+#undef CONFIG_CMD_SPI
+#undef CONFIG_DRIVER_TI_CPSW
+#undef CONFIG_MII
+#undef CONFIG_MUSB_GADGET
+#undef CONFIG_MUSB_HOST
+#undef CONFIG_NAND
+#undef CONFIG_OMAP3_SPI
+#undef CONFIG_SPI
+#undef CONFIG_SPI_BOOT
+#undef CONFIG_SPL_ETH_SUPPORT
+#undef CONFIG_SPL_NAND_LOAD
+#undef CONFIG_SPL_NAND_SUPPORT
+#undef CONFIG_SPL_SPI_FLASH_SUPPORT
+#undef CONFIG_SPL_SPI_LOAD
+#undef CONFIG_SPL_SPI_SUPPORT
+#undef CONFIG_SPL_YMODEM_SUPPORT
+#undef CONFIG_SYS_LONGHELP
+
+#define MACH_TYPE_TIAM335EVM 3589 /* Until the next sync */
+#define CONFIG_MACH_TYPE MACH_TYPE_TIAM335EVM
+
+/* Clock Defines */
+#define V_OSCK 24000000 /* Clock output from T2 */
+#define V_SCLK (V_OSCK)
+
+/* Custom script for NOR */
+#define CONFIG_SYS_LDSCRIPT "board/ti/am335x/u-boot.lds"
+
+/* Always 128 KiB env size */
+#define CONFIG_ENV_SIZE (128 << 10)
+
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+
+#ifndef CONFIG_SPL_BUILD
+#define CONFIG_EXTRA_ENV_SETTINGS \
+ "loadaddr=0x80200000\0" \
+ "fdtaddr=0x80F80000\0" \
+ "console=ttyO0,115200n8\0" \
+ "mmcroot=/dev/mmcblk0p2\0" \
+ "mmcrootfstype=ext4\0"
+
+#define CONFIG_BOOTCOMMAND \
+ "setenv bootargs \"console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} rootwait ro quiet\"; " \
+ "mmc dev 0; " \
+ "ext4load mmc0 0:2 ${loadaddr} /boot/kernel; " \
+ "ext4load mmc0 0:2 ${fdtaddr} /boot/board.dtb; " \
+ "bootz ${loadaddr} - ${fdtaddr}; "
+
+#endif
+
+/* NS16550 Configuration */
+#define CONFIG_SYS_NS16550_COM1 0x44e09000 /* Base EVM has UART0 */
+#define CONFIG_SYS_NS16550_COM2 0x48022000 /* UART1 */
+#define CONFIG_SYS_NS16550_COM3 0x48024000 /* UART2 */
+#define CONFIG_SYS_NS16550_COM4 0x481a6000 /* UART3 */
+#define CONFIG_SYS_NS16550_COM5 0x481a8000 /* UART4 */
+#define CONFIG_SYS_NS16550_COM6 0x481aa000 /* UART5 */
+#define CONFIG_BAUDRATE 115200
+
+#define CONFIG_CMD_EEPROM
+#define CONFIG_ENV_EEPROM_IS_ON_I2C
+#define CONFIG_SYS_I2C_EEPROM_ADDR 0x50 /* Main EEPROM */
+#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 2
+#define CONFIG_SYS_I2C_MULTI_EEPROMS
+
+/* PMIC support */
+#define CONFIG_POWER_TPS65217
+#define CONFIG_POWER_TPS65910
+
+/* SPL */
+#define CONFIG_SPL_POWER_SUPPORT
+
+
+/* Bootcount using the RTC block */
+#define CONFIG_BOOTCOUNT_LIMIT
+#define CONFIG_BOOTCOUNT_AM33XX
+
+/* SPI flash. */
+#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds"
+
+#define CONFIG_ENV_IS_NOWHERE
+
+#endif /* ! __CONFIG_AM335X_EVM_H */