Skip to content

Commit

Permalink
Add Tegra-TK1
Browse files Browse the repository at this point in the history
Add support for Simon's Tegra-TK1 board.

Also add a check that the board appears on the USB bus and produce an
error if not.

Signed-off-by: Simon Glass <sjg@chromium.org>
  • Loading branch information
sjg20 authored and nvswarren committed Feb 5, 2020
1 parent b12c091 commit 0b7358a
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
38 changes: 38 additions & 0 deletions bin/kea/conf.jetson-tk1_sjg-tk1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright 2020 Google LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

relay_type=6QMBS_

console_dev=/dev/ttyusb_port3
reset_impl=usbrelay
flash_impl=none
reset_impl=recovery_download
recovery_impl=usbrelay

usbrelay_power=1
usbrelay_reset=2
usbrelay_recovery=3

board_usb_dev=/dev/usbdev-jetson-tk1
download_impl=tegra-uboot-flasher
tubf_bin=/vid/software/devel/tegra/tegra-uboot-flasher-scripts
tubf_board=jetson-tk1
tubf_config=jetson-tk1
board_usb_port_path=4-10.1.1
32 changes: 32 additions & 0 deletions bin/recovery.usbrelay
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Copyright 2020 Google LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

usbrelay "${relay_type}${usbrelay_recovery}=1"
usbrelay "${relay_type}${usbrelay_reset}=1"

sleep 0.1

usbrelay "${relay_type}${usbrelay_reset}=0"

sleep 0.1

usbrelay "${relay_type}${usbrelay_recovery}=0"
4 changes: 4 additions & 0 deletions bin/reset.recovery_download
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ for ((i = 0; i <= 100; i++)); do
fi
sleep 0.1
done
if [ ! -e "${board_usb_dev}" ]; then
echo "Cannot find device ${board_usb_dev}"
exit 1
fi
sleep 1

. "${bin_dir}/download.${download_impl}"

0 comments on commit 0b7358a

Please sign in to comment.