Tegra: T30: Beaver board support.
PATCH v2 1/1 Tegra: T30: Beaver board support.
Beaver is a Tegra30 board that is nearly 100% compatible w/Cardhu. Add a Beaver build so it can begin to be differentiated, if need be.
---
v2: Add MAINTAINERS and beaver.h config file
MAINTAINERS | 1 + board/nvidia/beaver/Makefile | 38 +++++++++++++++++++ board/nvidia/dts/tegra30-beaver.dts | 66 ++++++++++++++++++++++++++++++++ boards.cfg | 1 + include/configs/beaver.h | 76 +++++++++++++++++++++++++++++++++++++ 5 files changed, 182 insertions(+) create mode 100644 board/nvidia/beaver/Makefile create mode 100644 board/nvidia/dts/tegra30-beaver.dts create mode 100644 include/configs/beaver.h
MAINTAINERS +1 -0
@@ -994,6 +994,7 @@ Stephen Warren <[email protected]> paz00 Tegra20 (ARM7 & A9 Dual Core) trimslice Tegra20 (ARM7 & A9 Dual Core) whistler Tegra20 (ARM7 & A9 Dual Core) + beaver Tegra30 (ARM7 & A9 Quad Core) Stephen Warren <[email protected]>
board/nvidia/beaver/Makefile new file +38 -0
@@ -0,0 +1,38 @@ +# +# Copyright (c) 2010-2013, NVIDIA CORPORATION. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +include $(TOPDIR)/config.mk + +$(shell mkdir -p $(obj)../cardhu) + +LIB = $(obj)lib$(BOARD).o + +COBJS = ../cardhu/cardhu.o + +SRCS := $(COBJS:.o=.c) +OBJS := $(addprefix $(obj),$(COBJS)) + +$(LIB): $(obj).depend $(OBJS) + $(call cmd_link_o_target, $(OBJS)) + +######################################################################### + +# defines $(obj).depend target +include $(SRCTREE)/rules.mk + +sinclude $(obj).depend + +#########################################################################
board/nvidia/dts/tegra30-beaver.dts new file +66 -0
66 lines not on this page · raw message
boards.cfg +1 -0
@@ -310,6 +310,7 @@ seaboard arm armv7:arm720t seaboard nvidia ventana arm armv7:arm720t ventana nvidia tegra20 whistler arm armv7:arm720t whistler nvidia tegra20 cardhu arm armv7:arm720t cardhu nvidia tegra30 +beaver arm armv7:arm720t beaver nvidia tegra30 dalmore arm armv7:arm720t dalmore nvidia tegra114 colibri_t20_iris arm armv7:arm720t colibri_t20_iris toradex tegra20 u8500_href arm armv7 u8500 st-ericsson u8500
include/configs/beaver.h new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
1.8.1.5
PATCH v2 1/1 Tegra: T30: Beaver board support.
board/nvidia/dts/tegra30-beaver.dts line 21
Quoted 8 lines · Tom Warren
Beaver is a Tegra30 board that is nearly 100% compatible w/Cardhu. Add a Beaver build so it can begin to be differentiated, if need be.
board/nvidia/dts/tegra30-beaver.dts +3
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x80000000>;
That should probably be 0x7ff00000, since the boot ROM(?) prevents use of the last 1MiB. This is also a bug in the kernel DT I think.
board/nvidia/dts/tegra30-beaver.dts line 52
Quoted 4 lines
board/nvidia/dts/tegra30-beaver.dts +4
-0+ spi at 7000da00 { + status = "okay"; + spi-max-frequency = <25000000>; + };
Shouldn't the SPI flash be listed there too?
include/configs/beaver.h line 59
Quoted 5 lines
include/configs/beaver.h +3
-0+/* Environment in eMMC, at the end of 2nd "boot sector" */ +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_ENV_OFFSET ((512 * 1024) - CONFIG_ENV_SIZE)
The eMMC boot partitions on Beaver appear to be 1MiB not 512KiB. Hence, I think that should be:
#define CONFIG_ENV_OFFSET ((1024 * 1024) - CONFIG_ENV_SIZE)
I should really get around to writing a patch to allow negative values for the offset, which would be interpreted as relative to the end of the partition, to make this automatic. It'd also help e.g. Ventana where some boards apparently have different size boot sectors. I'll file myself a bug for that.
BTW, did you find out if boards.cfg would allow any of this patch to be shared with the existing Cardhu support? Ignoring that, with the above issues fixed (assuming the SPI is DT is made to match the kernel), then this patch,
PATCH v2 1/1 Tegra: T30: Beaver board support.
Stephen,
Quoted 7 lines · Stephen Warren
Review
Quoted 4 lines · Tom Warren
Beaver is a Tegra30 board that is nearly 100% compatible w/Cardhu. Add a Beaver build so it can begin to be differentiated, if need be.
(quoted diff) +0
-0
b/board/nvidia/dts/tegra30-beaver.dts
Quoted 7 lines
board/nvidia/dts/tegra30-beaver.dts line 21
Quoted 3 lines
board/nvidia/dts/tegra30-beaver.dts new file +3
-0+ memory { + device_type = "memory"; + reg = <0x80000000 0x80000000>;That should probably be
0x7ff00000, since the boot ROM(?) prevents use of the last 1MiB. This is also a bug in the kernel DT I think.
I'll change it. Thanks.
Quoted 7 lines
board/nvidia/dts/tegra30-beaver.dts line 52
Quoted 4 lines
board/nvidia/dts/tegra30-beaver.dts new file +4
-0+ spi at 7000da00 { + status = "okay"; + spi-max-frequency = <25000000>; + };Shouldn't the SPI flash be listed there too?
Yeah, missed that. I'll add it, too.
Quoted 12 lines
include/configs/beaver.h line 59
Quoted 6 lines
include/configs/beaver.h +3
-0+/* Environment in eMMC, at the end of 2nd "boot sector" */ +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_ENV_OFFSET ((512 * 1024) - CONFIG_ENV_SIZE)The eMMC boot partitions on Beaver appear to be 1MiB not 512KiB. Hence, I think that should be:
#define
CONFIG_ENV_OFFSET((1024 * 1024) -CONFIG_ENV_SIZE)
OK, I'll make that change, too, for V2.
Quoted 7 lines
I should really get around to writing a patch to allow negative values for the offset, which would be interpreted as relative to the end of the partition, to make this automatic. It'd also help e.g. Ventana where some boards apparently have different size boot sectors. I'll file myself a bug for that.
Quoted 5 lines
BTW, did you find out if boards.cfg would allow any of this patch to be shared with the existing Cardhu support? Ignoring that, with the above issues fixed (assuming the SPI is DT is made to match the kernel), then this patch,
Haven't looked at modifying boards.cfg yet. I'll take a look before I post v2.
Thanks.
Quoted 3 lines
Reviewed-by Stephen Warren <[email protected]>