Re: [U-Boot] [PATCH 2/2] ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board
On Wed, 04 Sep 2013 12:05:00 -0600 Stephen Warren swar...@wwwdotorg.org wrote: On 09/04/2013 07:00 AM, Alban Bedel wrote: Add support for the new Tamonten™ NG platform from Avionic Design. Currently only I2C, MMC, USB and ethernet have been tested. (Also CC'ing the Tegra maintainer here) Ok, I'll add him in the next patch round. diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c +void pmu_write(uchar reg, uchar data) +{ + int i; + i2c_set_bus_num(0); /* PMU is on bus 0 */ + for (i = 0; i MAX_I2C_RETRY; ++i) { + if (i2c_write(PMU_I2C_ADDRESS, reg, 1, data, 1)) + udelay(100); + else + break; + } +} Is there really a need to retry the I2C transactions? If so, why do they fail? I assume this was just copy/pasted from some other board file, and there's no need for any retries? Yes, that was adapted from the cardhu code and the retry are most probably useless. I just made a bit more generic function because we have to set several outputs, on cardhu only one is set. It'd be nice if there was a proper PMU subsystem, so we could have a specific driver for each PMU chip, rather than having open-coded/custom writes to the PMU registers in each board file, but I guess that's not an issue with this patch specfically. A PMU subsystem would be nice, although something that would be compatible with the Linux regulator and their representation in DT would be even better. Otherwise a first step could be to at least create a driver for this PMU, similar to one for tps6586x. That would at least prevent too much code duplication between the T30 boards. diff --git a/include/configs/tec-ng.h b/include/configs/tec-ng.h +/* support the new (FDT-based) image format */ +#define CONFIG_FIT Hmmm. Do the standard Tegra boot scripts in tegra-common-post.h deal well with FIT? I've tried to avoid FIT usage as much as possible. AFAIU it doesn't change anything if you use old images, it just allow you to also use FIT image. As the build system we use for our platform produce FIT image we do need support for it. Or should such things, which are not related to the HW config, be configured in another place? Alban ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 2/2] ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board
On 09/05/2013 06:46 AM, Alban Bedel wrote: On Wed, 04 Sep 2013 12:05:00 -0600 Stephen Warren swar...@wwwdotorg.org wrote: On 09/04/2013 07:00 AM, Alban Bedel wrote: Add support for the new Tamonten™ NG platform from Avionic Design. Currently only I2C, MMC, USB and ethernet have been tested. ... diff --git a/include/configs/tec-ng.h b/include/configs/tec-ng.h +/* support the new (FDT-based) image format */ +#define CONFIG_FIT Hmmm. Do the standard Tegra boot scripts in tegra-common-post.h deal well with FIT? I've tried to avoid FIT usage as much as possible. AFAIU it doesn't change anything if you use old images, it just allow you to also use FIT image. As the build system we use for our platform produce FIT image we do need support for it. Or should such things, which are not related to the HW config, be configured in another place? No, this file is the right/only place for such things. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 2/2] ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board
Add support for the new Tamonten™ NG platform from Avionic Design. Currently only I2C, MMC, USB and ethernet have been tested. Signed-off-by: Alban Bedel alban.be...@avionic-design.de --- .../common/pinmux-config-tamonten-ng.h | 385 + board/avionic-design/common/tamonten-ng.c | 129 +++ board/avionic-design/dts/tegra30-tamonten.dtsi | 74 board/avionic-design/dts/tegra30-tec-ng.dts| 8 + board/avionic-design/tec-ng/Makefile | 32 ++ boards.cfg | 1 + include/configs/tec-ng.h | 84 + 7 files changed, 713 insertions(+) create mode 100644 board/avionic-design/common/pinmux-config-tamonten-ng.h create mode 100644 board/avionic-design/common/tamonten-ng.c create mode 100644 board/avionic-design/dts/tegra30-tamonten.dtsi create mode 100644 board/avionic-design/dts/tegra30-tec-ng.dts create mode 100644 board/avionic-design/tec-ng/Makefile create mode 100644 include/configs/tec-ng.h diff --git a/board/avionic-design/common/pinmux-config-tamonten-ng.h b/board/avionic-design/common/pinmux-config-tamonten-ng.h new file mode 100644 index 000..39df731 --- /dev/null +++ b/board/avionic-design/common/pinmux-config-tamonten-ng.h @@ -0,0 +1,385 @@ +/* + * (C) Copyright 2013 + * Avionic Design GmbH www.avionic-design.de + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _PINMUX_CONFIG_TAMONTEN_NG_H_ +#define _PINMUX_CONFIG_TAMONTEN_NG_H_ + +#define DEFAULT_PINMUX(_pingroup, _mux, _pull, _tri, _io) \ + { \ + .pingroup = PINGRP_##_pingroup, \ + .func = PMUX_FUNC_##_mux, \ + .pull = PMUX_PULL_##_pull,\ + .tristate = PMUX_TRI_##_tri, \ + .io = PMUX_PIN_##_io, \ + .lock = PMUX_PIN_LOCK_DEFAULT,\ + .od = PMUX_PIN_OD_DEFAULT, \ + .ioreset= PMUX_PIN_IO_RESET_DEFAULT,\ + } + +#define I2C_PINMUX(_pingroup, _mux, _pull, _tri, _io, _lock, _od) \ + { \ + .pingroup = PINGRP_##_pingroup, \ + .func = PMUX_FUNC_##_mux, \ + .pull = PMUX_PULL_##_pull,\ + .tristate = PMUX_TRI_##_tri, \ + .io = PMUX_PIN_##_io, \ + .lock = PMUX_PIN_LOCK_##_lock,\ + .od = PMUX_PIN_OD_##_od,\ + .ioreset= PMUX_PIN_IO_RESET_DEFAULT,\ + } + +#define LV_PINMUX(_pingroup, _mux, _pull, _tri, _io, _lock, _ioreset) \ + { \ + .pingroup = PINGRP_##_pingroup, \ + .func = PMUX_FUNC_##_mux, \ + .pull = PMUX_PULL_##_pull,\ + .tristate = PMUX_TRI_##_tri, \ + .io = PMUX_PIN_##_io, \ + .lock = PMUX_PIN_LOCK_##_lock,\ + .od = PMUX_PIN_OD_DEFAULT, \ + .ioreset= PMUX_PIN_IO_RESET_##_ioreset \ + } + +#define DEFAULT_PADCFG(_padgrp, _slwf, _slwr, _drvup, _drvdn, _lpmd, _schmt, _hsm) \ + { \ + .padgrp = PDRIVE_PINGROUP_##_padgrp,\ + .slwf = _slwf,\ + .slwr = _slwr,\ + .drvup = _drvup, \ + .drvdn = _drvdn, \ + .lpmd = PGRP_LPMD_##_lpmd,\ + .schmt = PGRP_SCHMT_##_schmt, \ + .hsm= PGRP_HSM_##_hsm, \ + } + +static struct pingroup_config tamonten_ng_pinmux_common[] = { + /* SDMMC1 pinmux */ + DEFAULT_PINMUX(SDMMC1_CLK, SDMMC1, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(SDMMC1_CMD, SDMMC1, UP, NORMAL, INPUT), + DEFAULT_PINMUX(SDMMC1_DAT0, SDMMC1, UP, NORMAL, INPUT), + DEFAULT_PINMUX(SDMMC1_DAT1, SDMMC1, UP, NORMAL, INPUT), + DEFAULT_PINMUX(SDMMC1_DAT2, SDMMC1, UP, NORMAL, INPUT), + DEFAULT_PINMUX(SDMMC1_DAT3, SDMMC1, UP, NORMAL, INPUT), + + /* SDMMC3 pinmux */ + DEFAULT_PINMUX(SDMMC3_CLK, SDMMC3, NORMAL, NORMAL, INPUT), + DEFAULT_PINMUX(SDMMC3_CMD, SDMMC3, UP, NORMAL, INPUT), + DEFAULT_PINMUX(SDMMC3_DAT0, SDMMC3, UP, NORMAL, INPUT), +
Re: [U-Boot] [PATCH 2/2] ARM: tegra: Add the Tamonten™ NG Evaluation Carrier board
On 09/04/2013 07:00 AM, Alban Bedel wrote: Add support for the new Tamonten™ NG platform from Avionic Design. Currently only I2C, MMC, USB and ethernet have been tested. (Also CC'ing the Tegra maintainer here) diff --git a/board/avionic-design/common/tamonten-ng.c b/board/avionic-design/common/tamonten-ng.c +void pmu_write(uchar reg, uchar data) +{ + int i; + i2c_set_bus_num(0); /* PMU is on bus 0 */ + for (i = 0; i MAX_I2C_RETRY; ++i) { + if (i2c_write(PMU_I2C_ADDRESS, reg, 1, data, 1)) + udelay(100); + else + break; +} +} Is there really a need to retry the I2C transactions? If so, why do they fail? I assume this was just copy/pasted from some other board file, and there's no need for any retries? It'd be nice if there was a proper PMU subsystem, so we could have a specific driver for each PMU chip, rather than having open-coded/custom writes to the PMU registers in each board file, but I guess that's not an issue with this patch specfically. diff --git a/include/configs/tec-ng.h b/include/configs/tec-ng.h +/* support the new (FDT-based) image format */ +#define CONFIG_FIT Hmmm. Do the standard Tegra boot scripts in tegra-common-post.h deal well with FIT? I've tried to avoid FIT usage as much as possible. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot