Merge pull request #17 from krisklau/pr/feature/ntnu-b2xx

ntnu-b2xx: New folder for NTNU systems
This commit is contained in:
Ricardo Martins 2015-12-28 10:06:28 +00:00
commit 8ab12cbb31
25 changed files with 3340 additions and 37 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/qemu-i686
/lauv-aux
/lauv-aux-rpi
/ntnu-b2xx

View File

@ -1,8 +0,0 @@
# ntnu-nest-0x
cfg_hostname='ntnu-nest-02'
cfg_eth_ext_ip='192.168.1.46'
cfg_eth_ext_mk='255.255.255.0'
cfg_eth_ext_gw='192.168.1.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-gpio.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libswiftnav'

View File

@ -1,9 +0,0 @@
# ntnu-x8-00x
# Adds libav package.
cfg_hostname='ntnu-x8-002'
cfg_eth_ext_ip='192.168.1.105'
cfg_eth_ext_mk='255.255.255.0'
cfg_eth_ext_gw='192.168.1.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-gpio.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libav libswiftnav'

View File

@ -0,0 +1,2 @@
Systems description for vehicles used by NTNU.
Maintained by Kristian Klausen <kristian.klausen@itk.ntnu.no>

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,9 @@
start()
{
ethtool -s eth0 speed 10 duplex full autoneg off
}
stop()
{
ethtool -s eth0 autoneg on
}

View File

@ -0,0 +1,10 @@
start()
{
echo ds3231 0x68 >/sys/bus/i2c/devices/i2c-2/new_device
hwclock -f /dev/rtc1 -s
}
stop()
{
echo "no stop-operation for rtc"
}

View File

@ -0,0 +1,27 @@
start()
{
(cd /opt/lsts/rtklib/ && exec rtkrcv -s -o /etc/rtklib/conf/rtkrcv.conf -d /tmp/ttyC0 < /dev/null > /opt/lsts/rtklib/startlog.log 2>&1 &)
}
stop()
{
while [ 1 ]; do
echo "* Stopping process..."
killall rtkrcv > /dev/null 2>&1
for r in 0 1 2 3 4 5 6 7 8 9; do
if [ -n "$(pidof rtkrcv)" ]; then
echo "* Waiting for process to exit ($r)..."
sleep 1
else
echo "* Process not running."
return 1
fi
done
echo "* Forcing exit..."
killall -9 rtkrcv > /dev/null 2>&1
sleep 1
done
}

View File

@ -0,0 +1,27 @@
start()
{
str2str -in serial://uart/2:9600:8:n:1:off -c /etc/rtklib/data/ubx_raw_10hz.cmd -out tcpsvr://:50022 < /dev/null > /dev/null 2>&1 &
}
stop()
{
while [ 1 ]; do
echo "* Stopping process..."
killall str2str > /dev/null 2>&1
for r in 0 1 2 3 4 5 6 7 8 9; do
if [ -n "$(pidof str2str)" ]; then
echo "* Waiting for process to exit ($r)..."
sleep 1
else
echo "* Process not running."
return 1
fi
done
echo "* Forcing exit..."
killall -9 str2str > /dev/null 2>&1
sleep 1
done
}

View File

@ -0,0 +1,28 @@
start()
{
socat -d -d pty,raw,echo=0,link=/tmp/ttyV0 pty,raw,echo=0,link=/tmp/ttyV1 < /dev/null > /dev/null &
socat -d -d pty,raw,echo=0,link=/tmp/ttyC0 pty,raw,echo=0,link=/tmp/ttyC1 < /dev/null > /dev/null &
}
stop()
{
while [ 1 ]; do
echo "* Stopping process..."
killall socat > /dev/null 2>&1
for r in 0 1 2 3 4 5 6 7 8 9; do
if [ -n "$(pidof socat)" ]; then
echo "* Waiting for process to exit ($r)..."
sleep 1
else
echo "* Process not running."
return 1
fi
done
echo "* Forcing exit..."
killall -9 socat > /dev/null 2>&1
sleep 1
done
}

View File

@ -0,0 +1,139 @@
# RTKNAVI options (2015/10/30 13:05:07, v.2.4.2)
pos1-posmode =movingbase # (0:single,1:dgps,2:kinematic,3:static,4:movingbase,5:fixed,6:ppp-kine,7:ppp-static)
pos1-frequency =l1 # (1:l1,2:l1+l2,3:l1+l2+l5,4:l1+l2+l5+l6,5:l1+l2+l5+l6+l7)
pos1-soltype =forward # (0:forward,1:backward,2:combined)
pos1-elmask =10 # (deg)
pos1-snrmask_r =off # (0:off,1:on)
pos1-snrmask_b =off # (0:off,1:on)
pos1-snrmask_L1 =0,0,0,0,0,0,0,0,0
pos1-snrmask_L2 =0,0,0,0,0,0,0,0,0
pos1-snrmask_L5 =0,0,0,0,0,0,0,0,0
pos1-dynamics =on # (0:off,1:on)
pos1-tidecorr =off # (0:off,1:on,2:otl)
pos1-ionoopt =brdc # (0:off,1:brdc,2:sbas,3:dual-freq,4:est-stec,5:ionex-tec,6:qzs-brdc,7:qzs-lex,8:vtec_sf,9:vtec_ef,10:gtec)
pos1-tropopt =saas # (0:off,1:saas,2:sbas,3:est-ztd,4:est-ztdgrad)
pos1-sateph =brdc # (0:brdc,1:precise,2:brdc+sbas,3:brdc+ssrapc,4:brdc+ssrcom)
pos1-posopt1 =off # (0:off,1:on)
pos1-posopt2 =off # (0:off,1:on)
pos1-posopt3 =off # (0:off,1:on)
pos1-posopt4 =off # (0:off,1:on)
pos1-posopt5 =off # (0:off,1:on)
pos1-exclsats = # (prn ...)
pos1-navsys =1 # (1:gps+2:sbas+4:glo+8:gal+16:qzs+32:comp)
pos2-armode =fix-and-hold # (0:off,1:continuous,2:instantaneous,3:fix-and-hold)
pos2-gloarmode =off # (0:off,1:on,2:autocal)
pos2-bdsarmode =off # (0:off,1:on)
pos2-arthres =3
pos2-arlockcnt =0
pos2-arelmask =0 # (deg)
pos2-arminfix =10
pos2-elmaskhold =0 # (deg)
pos2-aroutcnt =5
pos2-maxage =30 # (s)
pos2-syncsol =on # (0:off,1:on)
pos2-slipthres =0.05 # (m)
pos2-rejionno =30 # (m)
pos2-rejgdop =30
pos2-niter =1
pos2-baselen =0 # (m)
pos2-basesig =0 # (m)
out-solformat =llh # (0:llh,1:xyz,2:enu,3:nmea)
out-outhead =off # (0:off,1:on)
out-outopt =off # (0:off,1:on)
out-timesys =gpst # (0:gpst,1:utc,2:jst)
out-timeform =hms # (0:tow,1:hms)
out-timendec =3
out-degform =deg # (0:deg,1:dms)
out-fieldsep =
out-height =ellipsoidal # (0:ellipsoidal,1:geodetic)
out-geoid =internal # (0:internal,1:egm96,2:egm08_2.5,3:egm08_1,4:gsi2000)
out-solstatic =all # (0:all,1:single)
out-nmeaintv1 =0 # (s)
out-nmeaintv2 =0 # (s)
out-outstat =state # (0:off,1:state,2:residual)
stats-eratio1 =100
stats-eratio2 =100
stats-errphase =0.003 # (m)
stats-errphaseel =0.003 # (m)
stats-errphasebl =0 # (m/10km)
stats-errdoppler =1 # (Hz)
stats-stdbias =30 # (m)
stats-stdiono =0.03 # (m)
stats-stdtrop =0.3 # (m)
stats-prnaccelh =10 # (m/s^2)
stats-prnaccelv =10 # (m/s^2)
stats-prnbias =0.0001 # (m)
stats-prniono =0.001 # (m)
stats-prntrop =0.0001 # (m)
stats-clkstab =5e-12 # (s/s)
ant1-postype =llh # (0:llh,1:xyz,2:single,3:posfile,4:rinexhead,5:rtcm)
ant1-pos1 =90 # (deg|m)
ant1-pos2 =0 # (deg|m)
ant1-pos3 =-6335367.6285 # (m|m)
ant1-anttype =
ant1-antdele =0 # (m)
ant1-antdeln =0 # (m)
ant1-antdelu =0 # (m)
ant2-postype =llh # (0:llh,1:xyz,2:single,3:posfile,4:rinexhead,5:rtcm)
ant2-pos1 =90 # (deg|m)
ant2-pos2 =0 # (deg|m)
ant2-pos3 =-6335367.6285 # (m|m)
ant2-anttype =
ant2-antdele =0 # (m)
ant2-antdeln =0 # (m)
ant2-antdelu =0 # (m)
misc-timeinterp =off # (0:off,1:on)
misc-sbasatsel =0 # (0:all)
misc-rnxopt1 =
misc-rnxopt2 =
file-satantfile =
file-rcvantfile =
file-staposfile =
file-geoidfile =
file-ionofile =
file-dcbfile =
file-eopfile =
file-blqfile =
file-tempdir =/tmp/
file-geexefile =
file-solstatfile =
file-tracefile =
#
inpstr1-type =serial # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,7:ntripcli,8:ftp,9:http)
inpstr2-type =tcpcli # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,7:ntripcli,8:ftp,9:http)
inpstr3-type =off # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,7:ntripcli,8:ftp,9:http)
inpstr1-path =uart/2:115200:8:n:1:off
inpstr2-path =:@10.0.60.51:50022/:
inpstr3-path =
inpstr1-format =ubx # (0:rtcm2,1:rtcm3,2:oem4,3:oem3,4:ubx,5:ss2,6:hemis,7:skytraq,8:gw10,9:javad,10:nvs,11:binex,12:rt17,15:sp3)
inpstr2-format =ubx # (0:rtcm2,1:rtcm3,2:oem4,3:oem3,4:ubx,5:ss2,6:hemis,7:skytraq,8:gw10,9:javad,10:nvs,11:binex,12:rt17,15:sp3)
inpstr3-format =rtcm2 # (0:rtcm2,1:rtcm3,2:oem4,3:oem3,4:ubx,5:ss2,6:hemis,7:skytraq,8:gw10,9:javad,10:nvs,11:binex,12:rt17,15:sp3)
inpstr2-nmeareq =off # (0:off,1:latlon,2:single)
inpstr2-nmealat =0 # (deg)
inpstr2-nmealon =0 # (deg)
outstr1-type =serial # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripsvr)
outstr2-type =file # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripsvr)
outstr1-path =../tmp/ttyV0:115200:8:n:1:off
outstr2-path =/opt/lsts/rtklib/log/rtklib_output%Y%m%d%h%M.pos
outstr1-format =enu # (0:llh,1:xyz,2:enu,3:nmea)
outstr2-format =enu # (0:llh,1:xyz,2:enu,3:nmea)
logstr1-type =file # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripsvr)
logstr2-type =file # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripsvr)
logstr3-type =off # (0:off,1:serial,2:file,3:tcpsvr,4:tcpcli,6:ntripsvr)
logstr1-path =/opt/lsts/rtklib/log/rtklib_ubxstream_x8_log%Y%m%d%h%M.ubx
logstr2-path =/opt/lsts/rtklib/log/rtklib_ubxstream_base_log%Y%m%d%h%M.ubx
logstr3-path =
misc-svrcycle =50 # (ms)
misc-timeout =30000 # (ms)
misc-reconnect =30000 # (ms)
misc-nmeacycle =5000 # (ms)
misc-buffsize =32768 # (bytes)
misc-navmsgsel =all # (0:all,1:rover,2:base,3:corr)
misc-proxyaddr =
misc-fswapmargin =30 # (s)
#misc-startcmd =./rtkstart.sh
#misc.startcmd =./rtkshut.sh
file-cmdfile1 =/etc/rtklib/data/ubx_raw_10hz.cmd
file-cmdfile2 =/etc/rtklib/data/ubx_raw_10hz.cmd

View File

@ -1,8 +1,9 @@
# ntnu-hexa-00x
cfg_hostname='ntnu-hexa-001'
cfg_eth_ext_ip='192.168.1.200'
cfg_eth_ext_mk='255.255.255.0'
cfg_eth_ext_gw='192.168.1.1'
cfg_eth_ext_ip='10.0.60.200'
cfg_eth_ext_mk='255.255.0.0'
cfg_eth_ext_gw='10.0.60.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libswiftnav'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libphidget'
cfg_services1='rtc-ds3231'

View File

@ -1,8 +1,9 @@
# ntnu-hexa-00x
cfg_hostname='ntnu-hexa-002'
cfg_eth_ext_ip='192.168.1.205'
cfg_eth_ext_mk='255.255.255.0'
cfg_eth_ext_gw='192.168.1.1'
cfg_eth_ext_ip='10.0.60.205'
cfg_eth_ext_mk='255.255.0.0'
cfg_eth_ext_gw='10.0.60.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libswiftnav'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libphidget'
cfg_services1='rtc-ds3231'

View File

@ -1,8 +1,9 @@
# ntnu-hexa-00x
cfg_hostname='ntnu-hexa-003'
cfg_eth_ext_ip='192.168.1.210'
cfg_eth_ext_mk='255.255.255.0'
cfg_eth_ext_gw='192.168.1.1'
cfg_eth_ext_ip='10.0.60.210'
cfg_eth_ext_mk='255.255.0.0'
cfg_eth_ext_gw='10.0.60.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libswiftnav'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libphidget ethtool'
cfg_services1='rtc-ds3231 force_10mbit'

View File

@ -1,8 +1,9 @@
# ntnu-hexa-00x
cfg_hostname='ntnu-hexa-004'
cfg_eth_ext_ip='192.168.1.215'
cfg_eth_ext_mk='255.255.255.0'
cfg_eth_ext_gw='192.168.1.1'
cfg_eth_ext_ip='10.0.60.215'
cfg_eth_ext_mk='255.255.0.0'
cfg_eth_ext_gw='10.0.60.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libswiftnav'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libphidget ethtool'
cfg_services1='rtc-ds3231 force_10mbit'

View File

@ -1,8 +1,9 @@
# ntnu-hexa-00x
cfg_hostname='ntnu-hexa-testbed'
cfg_eth_ext_ip='192.168.1.220'
cfg_eth_ext_mk='255.255.255.0'
cfg_eth_ext_gw='192.168.1.1'
cfg_eth_ext_ip='10.0.60.220'
cfg_eth_ext_mk='255.255.0.0'
cfg_eth_ext_gw='10.0.60.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libswiftnav'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux libphidget'
cfg_services1='rtc-ds3231'

View File

@ -0,0 +1,9 @@
# ntnu-nest-0x
cfg_hostname='ntnu-nest-02'
cfg_eth_ext_ip='10.0.60.51'
cfg_eth_ext_mk='255.255.0.0'
cfg_eth_ext_gw='10.0.60.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux rtklib'
cfg_services1='rtklib_str2str'

View File

@ -0,0 +1,10 @@
# ntnu-x8-00x
# Adds libav package.
cfg_hostname='ntnu-x8-002'
cfg_eth_ext_ip='10.0.60.105'
cfg_eth_ext_mk='255.255.0.0'
cfg_eth_ext_gw='10.0.60.1'
cfg_ptpd_interface='eth0'
cfg_target_linux_dtb='arch/arm/boot/dts/am335x-lctr-b2xx-ntnu-uart.dtb'
cfg_packages='u-boot dropbear rsync busybox e2fsprogs ptpd i2c-tools am33xx-cm3/host linux rtklib libphidget ethtool socat'
cfg_services1='vsp_pair rtc-ds3231 force_10mbit rtklib_rtkrcv'

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 */