Commit Graph

58 Commits

Author SHA1 Message Date
Simon Glass 401d1c4f5d common: Drop asm/global_data.h from common header
Move this out of the common header and include it only where needed.  In
a number of cases this requires adding "struct udevice;" to avoid adding
another large header or in other cases replacing / adding missing header
files that had been pulled in, very indirectly.   Finally, we have a few
cases where we did not need to include <asm/global_data.h> at all, so
remove that include.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-02-02 15:33:42 -05:00
Heiko Schocher 7a8d18da4b imx: aristainetos: enable U-Boot Environment variables protection
enable Environment protection with:

CONFIG_ENV_APPEND=y
CONFIG_ENV_WRITEABLE_LIST=y
CONFIG_ENV_ACCESS_IGNORE_FORCE

and add board specific env_get_location()
function.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-12-06 15:07:40 +01:00
Heiko Schocher 015c026f7a imx6: add support for aristainetos2c_cslb board variant
add support for aristainetos2c_cslb board variant.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-12-06 15:07:06 +01:00
Heiko Schocher 3cf02f5ffa imx6: remove not longer supported aristainetos boards
Removed aristainetos2, 2b, 2b-csl. This boards have been
recalled and destroyed.

Adapt board code to remove stuff not needed anymore.

Fix checkpatch warning, remove fdt_high and initrd_high
from default environment.

Signed-off-by: Heiko Schocher <hs@denx.de>
zu remove
2020-12-06 15:06:16 +01:00
Simon Glass 0914011310 command: Remove the cmd_tbl_t typedef
We should not use typedefs in U-Boot. They cannot be used as forward
declarations which means that header files must include the full header to
access them.

Drop the typedef and rename the struct to remove the _s suffix which is
now not useful.

This requires quite a few header-file additions.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 18:36:55 -04:00
Simon Glass 691d719db7 common: Drop init.h from common header
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 17:33:33 -04:00
Simon Glass 4d72caa5b9 common: Drop image.h from common header
Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 17:33:33 -04:00
Patrick Delaunay b09e28fc54 doc: update reference to README.imximage
Update reference in many files detected by
scripts/documentation-file-ref-check

README.imximage => imx/mkimage/imximage.txt

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-04-16 23:06:54 -04:00
Heiko Schocher 158d93adb4 imx6, aristainetos2c: add da9063 pmic setup
On the aristainetos2c boards the PMIC needs to be initialized,
because the Ethernet PHY uses a different regulator that is not
setup per hardware default. This does not influence the other
versions as this regulator isn't used there at all.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-03-09 15:03:04 +01:00
Heiko Schocher 0c054753a9 imx6: aristainetos: fix NAND detection with latest mainline
commit 88718be300 ("mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND")
moved CONFIG_NAND -> CONFIG_MTD_RAW_NAND. Adapt board code to this
change, as last merge did not respect the above commit.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-02-09 15:04:37 +01:00
Heiko Schocher 227cb30047 imx6: aristainetos: add support for rev C board
add support for revision C boards. This board has
no longer a NAND.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:56 +01:00
Heiko Schocher c08aa77173 imx6: aristainetos: add aristainetos 2b csl
add aristainetso board version CSL.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:56 +01:00
Heiko Schocher 1204b9675e imx6: aristainetos: readd aristainetos 2b board
readd aristainetos 2b board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:56 +01:00
Heiko Schocher 1c9c4642c3 imx6: aristainetos: enable HAB boot
enable IMX_HAB on aristianetos board

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:56 +01:00
Heiko Schocher 0ed133a6c4 imx6: aristainetos: cleanup bootmode settings
on the aristainetos there are some jumpers for
changing behaviour setting up Environment. Clean
this up.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:56 +01:00
Heiko Schocher f7cf76f8ac imx6: aristainetos: add i2c eeprom support
add support for i2c eeprom and add parsing "Rescue"
or "DefEnv" at offset 0x1ff0.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 44184c2aa8 imx6: aristainetos: get rid of CONFIG_BOARDNAME
CONFIG_BOARDNAME is not longer needed, as we use
the model information from DTS.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 87b687ad9d imx6: aristainetos: convert to DM_PWM/DM_BACKLIGHT
use DM_PWM and DM_BLACKLIGHT support and remove
board code.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher b9d4b64e44 imx6: aristainetos: add DM_I2C support
enable DM_I2C in defconfig and remove i2c specific
board code.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 621ff1363c imx6: aristainetos: add DM_VIDEO support
add DM_VIDEO support and remove now unneeded board
code. As we show a bmp logo on boot, call now
bmp_display() from board code and do not use
cfb_console anymore.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 5e65496d80 imx6: aristainetos: enable DM_ETH
enable DM_ETH and remove unneeded board code.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher cf8cbb0709 imx6: aristainetos: convert CONFIG_DM_SPI
enable CONFIG_DM_SPI and CONFIG_DM_SPI_FLASH
and get rid of build removal warnings.

define CONFIG_GPIO_ENABLE_SPI_FLASH is not longer
needed, so remove it from config_whitelist.txt

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 64679e2c80 imx6: aristainetos: convert to DM_USB
Drop CONFIG_USB_MAX_CONTROLLER_COUNT and enable DM_USB
in defconfig.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher fc7e3cc639 imx6: aristainetos: convert gpio pins to DM and DTS
Enable DM_GPIO, GPIO_HOG, LED and LED_GPIO as gpio
and LEDs are now defined in DTS. Enable also here
the pinctrl driver, so pinmux setup is also done.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 8664c485d9 imx6: aristainetos: convert to DM_MMC
Enable DM_MMC support.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher f44b4ab3c8 imx6: aristainetos: add DM_SERIAL support
add DM_SERIAL support for the aristainetos board, and
remove not used code from board code.

remove CONSOLE_OVERWRITE_ROUTINE.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher ccc7595a81 imx6: aristainetos: prepare dts for other board versions
as we switch to support DM and DTS, rework the existing
DTS trees. Change also Linux specific Device trees, goal
is to push this changes to linux.

Collect U-Boot specific changes in separate "*u-boot*" dts
files.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 0f1130b6a1 imx6: aristainetos: remove aristainetos-v2.c
remove aristainetos-v2.c file, as we now want to
switch to DM/DTS support and have all board specific
code in one file. Goal is to setup differences
through DT.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 8fb028ee20 imx6: aristainetos: add device tree from linux
Add device trees from Linux in preparation for driver model
conversions.

device tree files taken from Linux:
71ae5fc87c34: "Merge tag 'linux-kselftest-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest"

and added SPDX license identifier.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 1b857f1a92 imx6: aristainetos: remove 2b version
remove 2b version of aristainetos board, as it
is easier to make the DM / DTS port and introduce
the 2b board version again (also some more board
version).

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher 3882e6fc01 imx6: aristainetos: move defines to Kconfig
move defines, which are already moved to Kconfig
out of board config.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Heiko Schocher a7e2dc9cf6 imx6: remove aristainetos board
remove not anymore used aristainetos board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2020-01-07 10:26:55 +01:00
Simon Glass 5255932f01 common: Move some board functions out of common.h
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>
2019-12-02 18:25:21 -05:00
Simon Glass 9fb625ce05 env: Move env_set() to env.h
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>
2019-08-11 16:43:41 -04:00
Yangbo Lu e37ac717d7 Convert to use fsl_esdhc_imx for i.MX platforms
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>
2019-06-23 14:18:34 +08:00
Anatolij Gustschin c77ea32ed8 imx: aristainetos: fix build breakage
ipu.h header is not found since the ipuv3 driver was moved to
the drivers/video/imx subdirectory. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2019-04-13 20:30:10 +02:00
Tom Rini 83d290c56f SPDX: Convert all of our single license tags to Linux Kernel style
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>
2018-05-07 09:34:12 -04:00
Diego Dorta 7594c51ae6 imx: Include <input.h> header file
When building with W=1 errors like the one below is seen:

board/freescale/mx6sabresd/mx6sabresd.c:546:5: warning:
no previous prototype for ‘overwrite_console’
[-Wmissing-prototypes] int overwrite_console(void)

Fix the build warnings by including <input.h>.

Signed-off-by: Diego Dorta <diego.dorta@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
2017-10-12 17:31:16 +02:00
Simon Glass 00caae6d47 env: Rename getenv/_f() to env_get()
We are now using an env_ prefix for environment functions. Rename these
two functions for consistency. Also add function comments in common.h.

Quite a few places use getenv() in a condition context, provoking a
warning from checkpatch. These are fixed up in this patch also.

Suggested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-16 08:30:24 -04:00
Simon Glass 382bee57f1 env: Rename setenv() to env_set()
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>
2017-08-16 08:22:18 -04:00
Stefano Babic 552a848e4f imx: reorganize IMX code as other SOCs
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>
2017-07-12 10:17:44 +02:00
Masahiro Yamada 1221ce459d treewide: replace #include <asm/errno.h> with <linux/errno.h>
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>
2016-09-23 17:55:42 -04:00
Fabio Estevam 84c51687a7 aristainetos: Use imx_ddr_size() for calculating the DDR size
imx_ddr_size() can be used to calculate the DDR size in runtime.

By using this function we no longer need to define PHYS_SDRAM_SIZE.

Cc: Heiko Schocher <hs@denx.de>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Acked-by: Heiko Schocher <hs@denx.de>
2016-07-28 13:27:20 +02:00
Heiko Schocher c39fcad780 arm, imx6, aristainetos2: set gpr register after reset
setting the gpr 1,8 and 12 registers to a fix value.
This is needed because after a WDT reset, this registers
are not correct resettet, and prevent linux from booting
again.

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-10-30 15:08:55 +01:00
Heiko Schocher 5614bc7b0c imx6, aristaintetos2: add me as maintainer
Add me as Maintainer for the aristainetos2b board.

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-09-20 10:03:25 +02:00
Peng Fan f20562e4c4 mx6: remove SYS_SOC from board Kconfig
Remove duplicated SYS_SOC Kconfig entry from board Kconfig,
because we have this entry in arch/arm/cpu/armv7/mx6/Kconfig.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Troy Kisky <troy.kisky@boundarydevices.com>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
Cc: "Eric Bénard" <eric@eukrea.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Markus Niebel <Markus.Niebel@tq-group.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Markus Niebel <Markus.Niebel@tq-group.com>
Acked-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2015-09-13 10:37:29 +02:00
Heiko Schocher 9627084c23 arm, imx6: add aristainetos 2b board version
there is a 2b board version of the aristainetos2
board. Differences to the v2:

- spi cs for the nor flash and display controller
  changed
- some pinmux changes
- LED gpio settings changed

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-09-02 15:38:16 +02:00
Heiko Schocher d0d005b616 arm, imx6: aristainetos board updates
some small updates for the aristainetos boards:
- fix display timings for the aristainetos board
- fix pinmux for the aristainetos board
- fix pinmux for the aristainetos2 board
- fix default environment

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-09-02 15:34:11 +02:00
Peng Fan 6d97dc10a8 imx: clock support enet2 anatop clock support
To i.MX6SX/UL, two ethernet interfaces are supported.
Add ENET2 clock support:
1. Introduce a new input parameter "fec_id", only 0 and 1 are allowed.
   To value 1, only i.MX6SX/UL can pass the check.
2. Modify board code who use this api to follow new api prototype.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Nikolaos Pasaloukos <Nikolaos.Pasaloukos@imgtec.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
2015-09-02 15:29:14 +02:00
Heiko Schocher 7254d92ebc arm, imx6: add support for aristainetos2 board
add support for imx6dl based aristainetos2 board

U-Boot 2015.04-rc5-00066-g60f6ed4 (Apr 10 2015 - 08:46:27)

CPU:   Freescale i.MX6DL rev1.1 at 792 MHz
Reset cause: WDOG
Board: aristaitenos2
       Watchdog enabled
I2C:   ready
DRAM:  1 GiB
NAND:  1024 MiB
MMC:   FSL_SDHC: 0
SF: Detected N25Q128A with page size 256 Bytes, erase size 64 KiB, total 16 MiB
Display: lg4573 (480x800)
In:    serial
Out:   serial
Err:   serial
Net:   FEC [PRIME]
Hit any key to stop autoboot:  0
=>

Signed-off-by: Heiko Schocher <hs@denx.de>
2015-05-26 14:18:11 +02:00