summaryrefslogtreecommitdiffstats
path: root/board/wandboard
Commit message (Collapse)AuthorAgeFilesLines
* treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada2020-07-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
* arm: wandboard: move CONFIG_MXC_UART to defconfigHeinrich Schuchardt2020-06-221-0/+10
| | | | | | | | | | | | | For using a debug UART on the Wandboard CONFIG_MXC_UART=y must be set in the .config file. To avoid duplicate definitions move the setting from include/configs/wandboard.h to configs/wandboard_defconfig. Document the debug UART settings in the README. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
* common: Drop linux/delay.h from common headerSimon Glass2020-05-182-0/+2
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop log.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop init.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Drop image.h from common headerSimon Glass2020-05-181-0/+1
| | | | | | Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
* arm: Don't include common.h in header filesSimon Glass2020-05-182-0/+2
| | | | | | | | | | | It is bad practice to include common.h in other header files since it can bring in any number of superfluous definitions. It implies that some C files don't include it and thus may be missing CONFIG options that are set up by that file. The C files should include these themselves. Update some header files in arch/arm to drop this. Signed-off-by: Simon Glass <sjg@chromium.org>
* wandboard: Print the board version in board_late_init()Fabio Estevam2020-04-181-14/+9
| | | | | | | | | | | | | | | Since CONFIG_DISPLAY_BOARDINFO_LATE is no longer used, the checkboard() function is no longer called. As it is useful to print the board revision, print it inside board_late_init() instead. Also, to avoid GPIO errors related to using a GPIO without requesting it, move the gpio_request(REV_DETECTION, "REV_DETECT") call prior to its usage. Signed-off-by: Fabio Estevam <festevam@gmail.com> Tested-by: Heiko Schocher <hs@denx.de>
* wandboard: Do not print error when PMIC is not presentFabio Estevam2020-04-181-1/+1
| | | | | | | | On wandboard variants prior to revD1, there is no PMIC populated, so do not print an error when the reading of the device ID register fails. Signed-off-by: Fabio Estevam <festevam@gmail.com> Tested-by: Heiko Schocher <hs@denx.de>
* wandboard: Fix version detection for mx6q/mx6dl revD1Fabio Estevam2020-04-181-2/+2
| | | | | | | | | | | | | | | | | | | | | The detection of the revD1 version is based on the presence of the PMIC. Currently revb1 device trees are used for mx6q/mx6dl variants, which do not have the PMIC nodes. This causes revD1 boards to be incorrectly be detected as revB1. Fix this issue by using the revd1 device trees, so that the PMIC node can be found and then the PMIC can be detected by reading its register ID. Imported the revd1 device trees from mainline kernel version 5.7-rc1. Reported-by: Heiko Schocher <hs@denx.de> Reported-by: Derek Atkins <derek@ihtfp.com> Signed-off-by: Fabio Estevam <festevam@gmail.com> Tested-by: Derek Atkins <derek@ihtfp.com> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Peter Robinson <pbrobinson@gmail.com>
* wandboard: Do not print error message when PMIC is absentFabio Estevam2020-01-141-1/+1
| | | | | | | | | | | Only the wandboard revD1 boards have PMIC, so when running on a wandboard of different revision the following error is always shown on every boot: pmic_get() ret -19 Instead of printing this error message, move it to debug level instead. Signed-off-by: Fabio Estevam <festevam@gmail.com>
* wandboard: Remove repeated PMIC stringFabio Estevam2020-01-081-2/+0
| | | | | | | | | | | After the conversion to DM_PMIC the following output is seen: PMIC: PMIC: PFUZE100 ID=0x10 Remove the unnecessary PMIC string from the board file to avoid the repetead string. Signed-off-by: Fabio Estevam <festevam@gmail.com>
* wandboard: Fix the DM_PMIC conversionFabio Estevam2020-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit ec837c82d709 ("imx6: wandboard: convert to DM_PMIC") caused the following pmic_get() error: CPU: Freescale i.MX6QP rev1.0 at 792 MHz Reset cause: POR DRAM: 2 GiB PMIC: pmic_get() ret -19 ... and since the PMIC presence is used to determine the board D1 revision, the following error is seen when booting a board rev D1: WARNING: Could not determine dtb to use and the kernel does not boot at all. Fix the regression by passing "pfuze100@8" as the correct parameter to the pmic_get() function in the DM case. Fixes: ec837c82d709 ("imx6: wandboard: convert to DM_PMIC") Signed-off-by: Fabio Estevam <festevam@gmail.com>
* common: Move some board functions out of common.hSimon Glass2019-12-021-0/+1
| | | | | | | A number of board function belong in init.h with the others. Move them. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
* imx: wandboard: convert FEC support to DM_ETHAnatolij Gustschin2019-10-081-22/+1
| | | | | | Remove CONFIG_DM_ETH conversion warning to avoid board removal. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* env: Move env_set() to env.hSimon Glass2019-08-111-0/+1
| | | | | | | Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'mmc-6-23' of https://github.com/MrVan/u-bootTom Rini2019-07-081-1/+1
|\ | | | | | | - Pull in the series to split fsl_esdhc for i.MX/non-i.MX cleanly
| * Convert to use fsl_esdhc_imx for i.MX platformsYangbo Lu2019-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | Converted to use fsl_esdhc_imx for i.MX platforms. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Tested-by: Steffen Dirkwinkel <s.dirkwinkel@beckhoff.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Martyn Welch <martyn.welch@collabora.com> Acked-by: Jason Liu <Jason.hui.liu@nxp.com>
* | wandboard: README: Adjust the U-Boot proper binary nameFabio Estevam2019-07-041-1/+1
| | | | | | | | | | | | | | After the conversion to DM the U-Boot proper binary name is 'u-boot-dtb.img', so adjust it accordingly. Signed-off-by: Fabio Estevam <festevam@gmail.com>
* | wandboard: Add FIT image supportFabio Estevam2019-07-041-0/+18
|/ | | | | | | | | | | | After the transition to DM, only the mx6dl/solo wandboard is supported. Add FIT image support so that all the wandboard variants can be supported, like it was prior to the DM conversion. Successfully booted Linux on mx6q/solo/qp wandboards. Signed-off-by: Fabio Estevam <festevam@gmail.com>
* wandboard: Rework Makefile to prevent spl.o from being builtEzequiel Garcia2019-06-112-4/+2
| | | | | | | | The spl.c source was entirely conditioned by CONFIG_SPL_BUILD. Change this moving CONFIG_SPL_BUILD to be used in the Makefile, which is slightly cleaner and more readable. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
* wandboard: Don't use I2C speed Kconfig settings with DM_I2CTrent Piepho2019-05-171-5/+14
| | | | | | | | | | | | | | | When using DM_I2C the speed value supplied to setup_i2c() is not used, so this code required CONFIG_SYS_MXC_I2C[12]_SPEED to be defined to compile, but did not actually use them. Change this so we no longer need to define an unused macro to compile in DM_I2C mode. Also make it more clear that they do not control the bus speed. Otherwise it is quite easy to mistakenly believe they are used to set the bus speed. Cc: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de> Signed-off-by: Trent Piepho <tpiepho@impinj.com>
* imx6: wandboard: convert to DM_MMCAnatolij Gustschin2019-04-132-97/+92
| | | | | | | Move SDHC init to SPL code since it is not required with DM_MMC. Enable DM_MMC support. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* imx6: wandboard: convert to DM_I2CAnatolij Gustschin2019-04-131-5/+18
| | | | | | Allow building with DM_I2C enabled. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* imx6: wandboard: convert to DM_PMICAnatolij Gustschin2019-04-131-16/+22
| | | | | | | Enable DM_PMIC_PFUZE100 driver and add PMIC description to DTS. Rework power_init_board() code. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* imx6: wandboard: convert to DM_GPIO and enable pinctrl driverAnatolij Gustschin2019-04-131-0/+12
| | | | | | | Enable DM_GPIO and pinctrl in defconfig and add gpio_request() calls where required. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* imx6: wandboard: add device treeAnatolij Gustschin2019-04-131-0/+3
| | | | | | | Add device trees from Linux in preparation for driver model conversions. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* wandboard: README: Include the mx6qp variant in the listFabio Estevam2018-09-141-1/+1
| | | | | | The mx6qp Wandboard variant is also supported, so add it to the list. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini2018-05-073-6/+3
| | | | | | | | | | | | | | | | | | | | When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
* Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTRTom Rini2018-04-271-2/+0
| | | | | | | | We have a large number of places where while we historically referenced gd in the code we no longer do, as well as cases where the code added that line "just in case" during development and never dropped it. Signed-off-by: Tom Rini <trini@konsulko.com>
* wandboard: remove superfluous includeHeinrich Schuchardt2018-03-291-1/+0
| | | | | | | No definition provided by input.h is used in the board file. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* Revert "wandboard: Remove unnecessary delay"Fabio Estevam2017-11-201-0/+2
| | | | | | | | | | | This reverts commit b8b9790e23a7d6eec08d66192853ecb61bcae095. Some wandboard variants no longer boot after this commit, so keep the original delay to avoid the boot regression. Reported-by: Varga Zsolt <vazso@vazso.hu> Tested-by: Varga Zsolt <vazso@vazso.hu> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* wandboard: Remove cpu type check prior to setup_sata()Fabio Estevam2017-10-311-3/+1
| | | | | | | | | | | Inside setup_sata() there is a cpu type check, so there is no need to do this check in the board file. This also brings the benefit to allowing setup_sata() to be called for the mx6qp wandboard variant. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* wandboard: Add support for the MX6QP variantFabio Estevam2017-10-312-4/+127
| | | | | | | | Add support for the latest MX6QP wandboard variant. Based on Richard Hu's work from Technexion's U-Boot tree. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* wandboard: Add support for the latest revd1 revisionFabio Estevam2017-10-121-5/+103
| | | | | | | | | | | | | | | | | | | | | | Latest wandboard hardware revision is revd1, which brings the following new features: - PFUZE100 PMIC - AR8035 Ethernet PHY - Upgrade Wifi/BT chip to BCM4339/BCM43430. The detection mechanism is to probe the PMIC and when it is found, then the revision of the board is revd1. As the detection is done via PMIC, we need to print the board version at a later stage via CONFIG_DISPLAY_BOARDINFO_LATE and also need to disable CONFIG_DISPLAY_BOARDINFO, which is done much earlier. Make the necessary adjustments for the AR8035 PHY to work on revd1. Based on Richard Hu's work from Technexion's U-Boot tree. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* wandboard: Avoid calling setup_display() from SPL codeFabio Estevam2017-10-121-3/+2
| | | | | | | | | There is no need call setup_display() from SPL code, so move it to board_init(), which executes only in U-Boot proper. Reported-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
* imx6: drop duplicated bss memset and board_init_r() callAnatolij Gustschin2017-09-181-6/+0
| | | | | | | | | | | | | | | | | bss section is cleared in crt0.S. board_init_r() is also entered from crt0 code. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: Nikita Kiryanov <nikita@compulab.co.il> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Tim Harvey <tharvey@gateworks.com> Cc: Marek Vasut <marex@denx.de> Cc: Lukasz Majewski <lukma@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* imx: imx6: Move gpr_init() function to soc.cBreno Lima2017-08-281-11/+0
| | | | | | | | | | Since the gpr_init() function is common for boards using MX6S, MX6DL, MX6D, MX6Q and MX6QP processors move it to the soc.c file. Signed-off-by: Breno Lima <breno.lima@nxp.com> Acked-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* env: Rename setenv() to env_set()Simon Glass2017-08-161-4/+4
| | | | | | | | We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
* imx: reorganize IMX code as other SOCsStefano Babic2017-07-122-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change is consistent with other SOCs and it is in preparation for adding SOMs. SOC's related files are moved from cpu/ to mach-imx/<SOC>. This change is also coherent with the structure in kernel. Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@nxp.com> CC: Akshay Bhat <akshaybhat@timesys.com> CC: Ken Lin <Ken.Lin@advantech.com.tw> CC: Marek Vasut <marek.vasut@gmail.com> CC: Heiko Schocher <hs@denx.de> CC: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com> CC: Christian Gmeiner <christian.gmeiner@gmail.com> CC: Stefan Roese <sr@denx.de> CC: Patrick Bruenn <p.bruenn@beckhoff.com> CC: Troy Kisky <troy.kisky@boundarydevices.com> CC: Nikita Kiryanov <nikita@compulab.co.il> CC: Otavio Salvador <otavio@ossystems.com.br> CC: "Eric Bénard" <eric@eukrea.com> CC: Jagan Teki <jagan@amarulasolutions.com> CC: Ye Li <ye.li@nxp.com> CC: Peng Fan <peng.fan@nxp.com> CC: Adrian Alonso <adrian.alonso@nxp.com> CC: Alison Wang <b18965@freescale.com> CC: Tim Harvey <tharvey@gateworks.com> CC: Martin Donnelly <martin.donnelly@ge.com> CC: Marcin Niestroj <m.niestroj@grinn-global.com> CC: Lukasz Majewski <lukma@denx.de> CC: Adam Ford <aford173@gmail.com> CC: "Albert ARIBAUD (3ADEV)" <albert.aribaud@3adev.fr> CC: Boris Brezillon <boris.brezillon@free-electrons.com> CC: Soeren Moch <smoch@web.de> CC: Richard Hu <richard.hu@technexion.com> CC: Wig Cheng <wig.cheng@technexion.com> CC: Vanessa Maegima <vanessa.maegima@nxp.com> CC: Max Krummenacher <max.krummenacher@toradex.com> CC: Stefan Agner <stefan.agner@toradex.com> CC: Markus Niebel <Markus.Niebel@tq-group.com> CC: Breno Lima <breno.lima@nxp.com> CC: Francesco Montefoschi <francesco.montefoschi@udoo.org> CC: Jaehoon Chung <jh80.chung@samsung.com> CC: Scott Wood <oss@buserror.net> CC: Joe Hershberger <joe.hershberger@ni.com> CC: Anatolij Gustschin <agust@denx.de> CC: Simon Glass <sjg@chromium.org> CC: "Andrew F. Davis" <afd@ti.com> CC: "Łukasz Majewski" <l.majewski@samsung.com> CC: Patrice Chotard <patrice.chotard@st.com> CC: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Hans de Goede <hdegoede@redhat.com> CC: Masahiro Yamada <yamada.masahiro@socionext.com> CC: Stephen Warren <swarren@nvidia.com> CC: Andre Przywara <andre.przywara@arm.com> CC: "Álvaro Fernández Rojas" <noltari@gmail.com> CC: York Sun <york.sun@nxp.com> CC: Xiaoliang Yang <xiaoliang.yang@nxp.com> CC: Chen-Yu Tsai <wens@csie.org> CC: George McCollister <george.mccollister@gmail.com> CC: Sven Ebenfeld <sven.ebenfeld@gmail.com> CC: Filip Brozovic <fbrozovic@gmail.com> CC: Petr Kulhavy <brain@jikos.cz> CC: Eric Nelson <eric@nelint.com> CC: Bai Ping <ping.bai@nxp.com> CC: Anson Huang <Anson.Huang@nxp.com> CC: Sanchayan Maity <maitysanchayan@gmail.com> CC: Lokesh Vutla <lokeshvutla@ti.com> CC: Patrick Delaunay <patrick.delaunay@st.com> CC: Gary Bisson <gary.bisson@boundarydevices.com> CC: Alexander Graf <agraf@suse.de> CC: u-boot@lists.denx.de Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
* wandboard: Remove unnecessary delayFabio Estevam2017-07-121-2/+0
| | | | | | | | There is no need to add a 100us delay after the DDR initialization. Other imx6 boards do not have such delay either, so simply remove it. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* Kconfig: Add CONFIG_SATA to enable SATASimon Glass2017-07-111-1/+1
| | | | | | | | | At present CONFIG_CMD_SATA enables the 'sata' command which also brings in SATA support. Some boards may wish to enable SATA without the command. Add a separate CONFIG to permit this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* arm: imx: wandboard: fix compile error if CONFIG_VIDEO is deactivatedSven Ebenfeld2016-11-291-0/+2
| | | | | | | | | | | | | When I tried to deactivate VIDEO support for the Wandboard, it still tried to initialize the Framebuffer and so on. That is the reason for the added ifdefs. CONFIG_VIDEO is enabled in the configuration as default and therefore nothing changes for the default user. The structs mx6dl_i2c2_pad_info and mx6q_i2c2_pad_info are only available when CONFIG_IPUV3 are set and should not be tried to access, when that define is not defined. Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com>
* wandboard: Make Ethernet functional againFabio Estevam2016-11-061-0/+33
| | | | | | | | | | | | | | | | | | Since commit ce412b79e7255770 ("drivers: net: phy: atheros: add separate config for AR8031") ethernet does not work on mx6sabresd. This commit correctly assigns ar8031_config() as the configuration function for AR8031 in the same way as done in the Linux kernel. However, on wandboard design we need some additional configuration, such as enabling the 125 MHz AR8031 output that needs to be done in the board file. This also aligns with the same method that the kernel performs the AR8031 fixup in arch/arm/mach-imx/mach-imx6q.c. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* wandboard: Fix hang when going into low frequencyFabio Estevam2016-10-041-3/+3
| | | | | | | | | | | | | | A kernel hang is observed when running wandboard 3.14 kernel and going to the lowest operational point of cpufreq: # ifconfig eth0 down # echo 1 > /sys/class/graphics/fb0/blank The problem is caused by incorrect setting of the REFR field of register MDREF. Setting it to 4 refresh commands per refresh cycle fixes the hang. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
* treewide: replace #include <asm/errno.h> with <linux/errno.h>Masahiro Yamada2016-09-231-1/+1
| | | | | | | | | | | Now, arch/${ARCH}/include/asm/errno.h and include/linux/errno.h have the same content. (both just wrap <asm-generic/errno.h>) Replace all include directives for <asm/errno.h> with <linux/errno.h>. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> [trini: Fixup include/clk.] Signed-off-by: Tom Rini <trini@konsulko.com>
* mx6: ddr: Allow changing REFSEL and REFR fieldsFabio Estevam2016-09-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently MX6 SPL DDR initialization hardcodes the REF_SEL and REFR fields of the MDREF register as 1 and 7, respectively for DDR3 and 0 and 3 for LPDDR2. Looking at the MDREF initialization done via DCD we see that boards do need to initialize these fields differently: $ git grep 0x021b0020 board/ board/bachmann/ot1200/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800 board/ccv/xpress/imximage.cfg:DATA 4 0x021b0020 0x00000800 /* MMDC0_MDREF */ board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x7800 board/freescale/mx6qarm2/imximage.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6qarm2/imximage_mx6dl.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6qsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6qsabreauto/mx6dl.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6qsabreauto/mx6qp.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6sabresd/mx6dlsabresd.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg:DATA 4 0x021b0020 0x00005800 board/freescale/mx6slevk/imximage.cfg:DATA 4 0x021b0020 0x00001800 board/freescale/mx6sxsabreauto/imximage.cfg:DATA 4 0x021b0020 0x00000800 board/freescale/mx6sxsabresd/imximage.cfg:DATA 4 0x021b0020 0x00000800 board/warp/imximage.cfg:DATA 4 0x021b0020 0x00001800 So introduce a mechanism for users to be able to configure REFSEL and REFR fields as needed. Keep all the mx6 SPL users in their current REF_SEL and REFR values, so no functional changes for the existing users. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Eric Nelson <eric@nelint.com>
* wandboard: Replace is_cpu_type() for macroBreno Lima2016-07-281-2/+2
| | | | | | | | It's not necessary to use the is_cpu_type function, there is a macro in sys_proto.h already implemented. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* mx6: wandboard: fix warning due to missing prototypeStefano Babic2016-07-281-0/+1
| | | | | | Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
* wandboard: enable SATA with imx6qGilles Chanteperdrix2016-07-121-0/+6
| | | | Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>