History log of /u-boot/board/siemens/common/factoryset.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# b062eef0 24-Jan-2024 Enrico Leto <enrico.leto@siemens.com>

siemens: factoryset: use correct config for soc specific implementation

Adding the capricorn board family some parts diverge from draco family.
The switches used were not pertinent and need to be enhanced for each new
board of the capricorn family. Replace them through the SOC name 'AM33XX'
and 'IMX8'.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>

# 60ad0fdb 24-Jan-2024 Enrico Leto <enrico.leto@siemens.com>

siemens: board: clean up includes

Many includes were not removed when code parts were moved or removed.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>

# e9ef9a13 24-Jan-2024 Enrico Leto <enrico.leto@siemens.com>

siemens: eeprom: simplify setup & read

Since we have boards using the driver model or not for i2c, use abstraction
function to probe the i2c, check the EEPROM and read from EEPROM.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>

# 5ae54613 24-Jan-2024 Enrico Leto <enrico.leto@siemens.com>

siemens: eeprom: clean up definitions

Move the I2C and EEPROM address definitions in common board header.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Enrico Leto <enrico.leto@siemens.com>

# d77c6fbd 23-Jan-2022 Simon Glass <sjg@chromium.org>

video: siemens: Drop unused video code

Drop this old code which is not built anymore, as it depends on
CONFIG_VIDEO which has been removed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 7e5f460e 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with hex to hextoul()

It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.

Add a proper comment to simple_strtoul() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 7b5b9343 07-Jan-2020 Anatolij Gustschin <agust@denx.de>

imx: add imx8x capricorn giedi board

Add support for i.MX8X based Capricorn Giedi SoM.

Supported interfaces: GPIO, ENET, eMMC, I2C, UART.

Console output:

U-Boot SPL 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100)
Trying to boot from MMC1
Load image from MMC/SD 0x3e400

U-Boot 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100) ##v01.07

CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 30C

Model: Siemens Giedi
Board: Capricorn
Boot: MMC0
DRAM: 1022 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
In: serial@5a080000
Out: serial@5a080000
Err: serial@5a080000
Net: eth1: ethernet@5b050000 [PRIME]
Autobooting in 1 seconds, press "<Esc><Esc>" to stop

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 9c611582 12-Aug-2019 Tom Rini <trini@konsulko.com>

Merge branch '2019-08-11-ti-imports'

- More DaVinci updates and fixes
- PCIe support on am65x
- Watchdog converted to DM
- Assorted other bugfixes


# e7dcf564 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Drop environment.h header file where not needed

This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 9fb625ce 01-Aug-2019 Simon Glass <sjg@chromium.org>

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>

# 490e6d68 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: extend factoryset reading for giedi and deneb boards

giedi and deneb are i.MX8X based and have additional data with
WLAN MAC in factoryset container. Enable building for these
boards and adapt factoryset functions to set WLAN MAC and dtb
name in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 4987bc2a 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: adapt factoryset reading for DM_I2C enabled boards

For new boards we always enable DM_I2C. Extend factoryset functions
to support EEPROM reading on these boards.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

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>

# 9925f1db 01-Apr-2018 Alex Kiernan <alex.kiernan@gmail.com>

net: Move enetaddr env access code to env config instead of net config

In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

# bb4059a5 16-Feb-2018 Marek Vasut <marex@denx.de>

dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>

# a95aee6a 07-Sep-2017 Maxime Ripard <maxime.ripard@free-electrons.com>

usb: gadget: Make g_dnl USB settings common

The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

# fd1e959e 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>

# 382bee57 03-Aug-2017 Simon Glass <sjg@chromium.org>

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>

# 01acd6ab 12-Jun-2015 Paul Kocialkowski <contact@paulk.fr>

usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 0c331ebc 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 4ac32b9c 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>

# 7dc60d81 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 56eb3da4 04-Nov-2013 Samuel Egli <samuel.egli@siemens.com>

arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.

Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development

* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.

rut:
* add nand_img_size

dxr2:
* update nand_img_size

* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>

# d6eae7b0 08-Oct-2013 Łukasz Majewski <l.majewski@samsung.com>

usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>

# c0dcece7 19-Aug-2013 Heiko Schocher <hs@denx.de>

arm, am335x: add support for 3 siemens boards

add support for the am335x based boards from siemens:

dxr2:
- DDR3 128MiB
- NAND 256MiB
- Ethernet with external Switch SMSC LAN9303
- no PMIC
- internal Watchdog
- DFU support

pxm2:
- DDR2 512 MiB
- NAND 1024 MiB
- PMIC
- PHY atheros ar803x
- USB Host
- internal Watchdog
- DFU support

rut:
- DDR3 256 MiB
- NAND 256 MiB
- PMIC
- PHY natsemi dp83630
- external Watchdog
- DFU support

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Cc: Pascal Bach <pascal.bach@siemens.com>
Cc: Tom Rini <trini@ti.com>

# d77c6fbd 23-Jan-2022 Simon Glass <sjg@chromium.org>

video: siemens: Drop unused video code

Drop this old code which is not built anymore, as it depends on
CONFIG_VIDEO which has been removed.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 7e5f460e 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with hex to hextoul()

It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.

Add a proper comment to simple_strtoul() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 7b5b9343 07-Jan-2020 Anatolij Gustschin <agust@denx.de>

imx: add imx8x capricorn giedi board

Add support for i.MX8X based Capricorn Giedi SoM.

Supported interfaces: GPIO, ENET, eMMC, I2C, UART.

Console output:

U-Boot SPL 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100)
Trying to boot from MMC1
Load image from MMC/SD 0x3e400

U-Boot 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100) ##v01.07

CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 30C

Model: Siemens Giedi
Board: Capricorn
Boot: MMC0
DRAM: 1022 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
In: serial@5a080000
Out: serial@5a080000
Err: serial@5a080000
Net: eth1: ethernet@5b050000 [PRIME]
Autobooting in 1 seconds, press "<Esc><Esc>" to stop

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 9c611582 12-Aug-2019 Tom Rini <trini@konsulko.com>

Merge branch '2019-08-11-ti-imports'

- More DaVinci updates and fixes
- PCIe support on am65x
- Watchdog converted to DM
- Assorted other bugfixes


# e7dcf564 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Drop environment.h header file where not needed

This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 9fb625ce 01-Aug-2019 Simon Glass <sjg@chromium.org>

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>

# 490e6d68 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: extend factoryset reading for giedi and deneb boards

giedi and deneb are i.MX8X based and have additional data with
WLAN MAC in factoryset container. Enable building for these
boards and adapt factoryset functions to set WLAN MAC and dtb
name in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 4987bc2a 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: adapt factoryset reading for DM_I2C enabled boards

For new boards we always enable DM_I2C. Extend factoryset functions
to support EEPROM reading on these boards.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

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>

# 9925f1db 01-Apr-2018 Alex Kiernan <alex.kiernan@gmail.com>

net: Move enetaddr env access code to env config instead of net config

In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

# bb4059a5 16-Feb-2018 Marek Vasut <marex@denx.de>

dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>

# a95aee6a 07-Sep-2017 Maxime Ripard <maxime.ripard@free-electrons.com>

usb: gadget: Make g_dnl USB settings common

The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

# fd1e959e 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>

# 382bee57 03-Aug-2017 Simon Glass <sjg@chromium.org>

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>

# 01acd6ab 12-Jun-2015 Paul Kocialkowski <contact@paulk.fr>

usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 0c331ebc 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 4ac32b9c 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>

# 7dc60d81 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 56eb3da4 04-Nov-2013 Samuel Egli <samuel.egli@siemens.com>

arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.

Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development

* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.

rut:
* add nand_img_size

dxr2:
* update nand_img_size

* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>

# d6eae7b0 08-Oct-2013 Łukasz Majewski <l.majewski@samsung.com>

usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>

# c0dcece7 19-Aug-2013 Heiko Schocher <hs@denx.de>

arm, am335x: add support for 3 siemens boards

add support for the am335x based boards from siemens:

dxr2:
- DDR3 128MiB
- NAND 256MiB
- Ethernet with external Switch SMSC LAN9303
- no PMIC
- internal Watchdog
- DFU support

pxm2:
- DDR2 512 MiB
- NAND 1024 MiB
- PMIC
- PHY atheros ar803x
- USB Host
- internal Watchdog
- DFU support

rut:
- DDR3 256 MiB
- NAND 256 MiB
- PMIC
- PHY natsemi dp83630
- external Watchdog
- DFU support

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Cc: Pascal Bach <pascal.bach@siemens.com>
Cc: Tom Rini <trini@ti.com>

# 7e5f460e 24-Jul-2021 Simon Glass <sjg@chromium.org>

global: Convert simple_strtoul() with hex to hextoul()

It is a pain to have to specify the value 16 in each call. Add a new
hextoul() function and update the code to use it.

Add a proper comment to simple_strtoul() while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 7b5b9343 07-Jan-2020 Anatolij Gustschin <agust@denx.de>

imx: add imx8x capricorn giedi board

Add support for i.MX8X based Capricorn Giedi SoM.

Supported interfaces: GPIO, ENET, eMMC, I2C, UART.

Console output:

U-Boot SPL 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100)
Trying to boot from MMC1
Load image from MMC/SD 0x3e400

U-Boot 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100) ##v01.07

CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 30C

Model: Siemens Giedi
Board: Capricorn
Boot: MMC0
DRAM: 1022 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
In: serial@5a080000
Out: serial@5a080000
Err: serial@5a080000
Net: eth1: ethernet@5b050000 [PRIME]
Autobooting in 1 seconds, press "<Esc><Esc>" to stop

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 9c611582 12-Aug-2019 Tom Rini <trini@konsulko.com>

Merge branch '2019-08-11-ti-imports'

- More DaVinci updates and fixes
- PCIe support on am65x
- Watchdog converted to DM
- Assorted other bugfixes


# e7dcf564 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Drop environment.h header file where not needed

This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 9fb625ce 01-Aug-2019 Simon Glass <sjg@chromium.org>

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>

# 490e6d68 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: extend factoryset reading for giedi and deneb boards

giedi and deneb are i.MX8X based and have additional data with
WLAN MAC in factoryset container. Enable building for these
boards and adapt factoryset functions to set WLAN MAC and dtb
name in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 4987bc2a 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: adapt factoryset reading for DM_I2C enabled boards

For new boards we always enable DM_I2C. Extend factoryset functions
to support EEPROM reading on these boards.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

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>

# 9925f1db 01-Apr-2018 Alex Kiernan <alex.kiernan@gmail.com>

net: Move enetaddr env access code to env config instead of net config

In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

# bb4059a5 16-Feb-2018 Marek Vasut <marek.vasut@gmail.com>

dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>

# a95aee6a 07-Sep-2017 Maxime Ripard <maxime.ripard@free-electrons.com>

usb: gadget: Make g_dnl USB settings common

The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

# fd1e959e 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>

# 382bee57 03-Aug-2017 Simon Glass <sjg@chromium.org>

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>

# 01acd6ab 12-Jun-2015 Paul Kocialkowski <contact@paulk.fr>

usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 0c331ebc 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 4ac32b9c 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>

# 7dc60d81 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 56eb3da4 04-Nov-2013 Samuel Egli <samuel.egli@siemens.com>

arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.

Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development

* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.

rut:
* add nand_img_size

dxr2:
* update nand_img_size

* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>

# d6eae7b0 08-Oct-2013 Łukasz Majewski <l.majewski@samsung.com>

usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>

# c0dcece7 19-Aug-2013 Heiko Schocher <hs@denx.de>

arm, am335x: add support for 3 siemens boards

add support for the am335x based boards from siemens:

dxr2:
- DDR3 128MiB
- NAND 256MiB
- Ethernet with external Switch SMSC LAN9303
- no PMIC
- internal Watchdog
- DFU support

pxm2:
- DDR2 512 MiB
- NAND 1024 MiB
- PMIC
- PHY atheros ar803x
- USB Host
- internal Watchdog
- DFU support

rut:
- DDR3 256 MiB
- NAND 256 MiB
- PMIC
- PHY natsemi dp83630
- external Watchdog
- DFU support

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Cc: Pascal Bach <pascal.bach@siemens.com>
Cc: Tom Rini <trini@ti.com>

# f7ae49fc 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop log.h from common header

Move this header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>

# 7b5b9343 07-Jan-2020 Anatolij Gustschin <agust@denx.de>

imx: add imx8x capricorn giedi board

Add support for i.MX8X based Capricorn Giedi SoM.

Supported interfaces: GPIO, ENET, eMMC, I2C, UART.

Console output:

U-Boot SPL 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100)
Trying to boot from MMC1
Load image from MMC/SD 0x3e400

U-Boot 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100) ##v01.07

CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 30C

Model: Siemens Giedi
Board: Capricorn
Boot: MMC0
DRAM: 1022 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
In: serial@5a080000
Out: serial@5a080000
Err: serial@5a080000
Net: eth1: ethernet@5b050000 [PRIME]
Autobooting in 1 seconds, press "<Esc><Esc>" to stop

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 9c611582 12-Aug-2019 Tom Rini <trini@konsulko.com>

Merge branch '2019-08-11-ti-imports'

- More DaVinci updates and fixes
- PCIe support on am65x
- Watchdog converted to DM
- Assorted other bugfixes


# e7dcf564 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Drop environment.h header file where not needed

This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 9fb625ce 01-Aug-2019 Simon Glass <sjg@chromium.org>

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>

# 490e6d68 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: extend factoryset reading for giedi and deneb boards

giedi and deneb are i.MX8X based and have additional data with
WLAN MAC in factoryset container. Enable building for these
boards and adapt factoryset functions to set WLAN MAC and dtb
name in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 4987bc2a 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: adapt factoryset reading for DM_I2C enabled boards

For new boards we always enable DM_I2C. Extend factoryset functions
to support EEPROM reading on these boards.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

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>

# 9925f1db 01-Apr-2018 Alex Kiernan <alex.kiernan@gmail.com>

net: Move enetaddr env access code to env config instead of net config

In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

# bb4059a5 16-Feb-2018 Marek Vasut <marek.vasut@gmail.com>

dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>

# a95aee6a 07-Sep-2017 Maxime Ripard <maxime.ripard@free-electrons.com>

usb: gadget: Make g_dnl USB settings common

The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

# fd1e959e 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>

# 382bee57 03-Aug-2017 Simon Glass <sjg@chromium.org>

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>

# 01acd6ab 12-Jun-2015 Paul Kocialkowski <contact@paulk.fr>

usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 0c331ebc 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 4ac32b9c 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>

# 7dc60d81 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 56eb3da4 04-Nov-2013 Samuel Egli <samuel.egli@siemens.com>

arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.

Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development

* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.

rut:
* add nand_img_size

dxr2:
* update nand_img_size

* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>

# d6eae7b0 08-Oct-2013 Łukasz Majewski <l.majewski@samsung.com>

usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>

# c0dcece7 19-Aug-2013 Heiko Schocher <hs@denx.de>

arm, am335x: add support for 3 siemens boards

add support for the am335x based boards from siemens:

dxr2:
- DDR3 128MiB
- NAND 256MiB
- Ethernet with external Switch SMSC LAN9303
- no PMIC
- internal Watchdog
- DFU support

pxm2:
- DDR2 512 MiB
- NAND 1024 MiB
- PMIC
- PHY atheros ar803x
- USB Host
- internal Watchdog
- DFU support

rut:
- DDR3 256 MiB
- NAND 256 MiB
- PMIC
- PHY natsemi dp83630
- external Watchdog
- DFU support

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Cc: Pascal Bach <pascal.bach@siemens.com>
Cc: Tom Rini <trini@ti.com>

# 7b5b9343 07-Jan-2020 Anatolij Gustschin <agust@denx.de>

imx: add imx8x capricorn giedi board

Add support for i.MX8X based Capricorn Giedi SoM.

Supported interfaces: GPIO, ENET, eMMC, I2C, UART.

Console output:

U-Boot SPL 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100)
Trying to boot from MMC1
Load image from MMC/SD 0x3e400

U-Boot 2020.01-00003-gfd1c98f (Jan 07 2020 - 15:51:25 +0100) ##v01.07

CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 30C

Model: Siemens Giedi
Board: Capricorn
Boot: MMC0
DRAM: 1022 MiB
MMC: FSL_SDHC: 0
Loading Environment from MMC... OK
In: serial@5a080000
Out: serial@5a080000
Err: serial@5a080000
Net: eth1: ethernet@5b050000 [PRIME]
Autobooting in 1 seconds, press "<Esc><Esc>" to stop

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 9c611582 12-Aug-2019 Tom Rini <trini@konsulko.com>

Merge branch '2019-08-11-ti-imports'

- More DaVinci updates and fixes
- PCIe support on am65x
- Watchdog converted to DM
- Assorted other bugfixes


# e7dcf564 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Drop environment.h header file where not needed

This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 9fb625ce 01-Aug-2019 Simon Glass <sjg@chromium.org>

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>

# 490e6d68 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: extend factoryset reading for giedi and deneb boards

giedi and deneb are i.MX8X based and have additional data with
WLAN MAC in factoryset container. Enable building for these
boards and adapt factoryset functions to set WLAN MAC and dtb
name in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 4987bc2a 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: adapt factoryset reading for DM_I2C enabled boards

For new boards we always enable DM_I2C. Extend factoryset functions
to support EEPROM reading on these boards.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

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>

# 9925f1db 01-Apr-2018 Alex Kiernan <alex.kiernan@gmail.com>

net: Move enetaddr env access code to env config instead of net config

In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

# bb4059a5 16-Feb-2018 Marek Vasut <marek.vasut@gmail.com>

dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>

# a95aee6a 07-Sep-2017 Maxime Ripard <maxime.ripard@free-electrons.com>

usb: gadget: Make g_dnl USB settings common

The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

# fd1e959e 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>

# 382bee57 03-Aug-2017 Simon Glass <sjg@chromium.org>

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>

# 01acd6ab 12-Jun-2015 Paul Kocialkowski <contact@paulk.fr>

usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 0c331ebc 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 4ac32b9c 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>

# 7dc60d81 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 56eb3da4 04-Nov-2013 Samuel Egli <samuel.egli@siemens.com>

arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.

Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development

* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.

rut:
* add nand_img_size

dxr2:
* update nand_img_size

* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>

# d6eae7b0 08-Oct-2013 Łukasz Majewski <l.majewski@samsung.com>

usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>

# c0dcece7 19-Aug-2013 Heiko Schocher <hs@denx.de>

arm, am335x: add support for 3 siemens boards

add support for the am335x based boards from siemens:

dxr2:
- DDR3 128MiB
- NAND 256MiB
- Ethernet with external Switch SMSC LAN9303
- no PMIC
- internal Watchdog
- DFU support

pxm2:
- DDR2 512 MiB
- NAND 1024 MiB
- PMIC
- PHY atheros ar803x
- USB Host
- internal Watchdog
- DFU support

rut:
- DDR3 256 MiB
- NAND 256 MiB
- PMIC
- PHY natsemi dp83630
- external Watchdog
- DFU support

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Cc: Pascal Bach <pascal.bach@siemens.com>
Cc: Tom Rini <trini@ti.com>

# 9c611582 12-Aug-2019 Tom Rini <trini@konsulko.com>

Merge branch '2019-08-11-ti-imports'

- More DaVinci updates and fixes
- PCIe support on am65x
- Watchdog converted to DM
- Assorted other bugfixes


# e7dcf564 01-Aug-2019 Simon Glass <sjg@chromium.org>

env: Drop environment.h header file where not needed

This header file is now only used by files that access internal
environment features. Drop it from various places where it is not needed.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>

# 9fb625ce 01-Aug-2019 Simon Glass <sjg@chromium.org>

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>

# 490e6d68 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: extend factoryset reading for giedi and deneb boards

giedi and deneb are i.MX8X based and have additional data with
WLAN MAC in factoryset container. Enable building for these
boards and adapt factoryset functions to set WLAN MAC and dtb
name in environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 4987bc2a 10-Jul-2019 Anatolij Gustschin <agust@denx.de>

board: siemens: adapt factoryset reading for DM_I2C enabled boards

For new boards we always enable DM_I2C. Extend factoryset functions
to support EEPROM reading on these boards.

Signed-off-by: Anatolij Gustschin <agust@denx.de>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

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>

# 9925f1db 01-Apr-2018 Alex Kiernan <alex.kiernan@gmail.com>

net: Move enetaddr env access code to env config instead of net config

In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>

# bb4059a5 16-Feb-2018 Marek Vasut <marek.vasut@gmail.com>

dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>

# a95aee6a 07-Sep-2017 Maxime Ripard <maxime.ripard@free-electrons.com>

usb: gadget: Make g_dnl USB settings common

The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

# fd1e959e 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>

# 382bee57 03-Aug-2017 Simon Glass <sjg@chromium.org>

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>

# 01acd6ab 12-Jun-2015 Paul Kocialkowski <contact@paulk.fr>

usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)

# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>

# 0c331ebc 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 4ac32b9c 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>

# 7dc60d81 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>

# 56eb3da4 04-Nov-2013 Samuel Egli <samuel.egli@siemens.com>

arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.

Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development

* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.

rut:
* add nand_img_size

dxr2:
* update nand_img_size

* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>

# d6eae7b0 08-Oct-2013 Lukasz Majewski <l.majewski@samsung.com>

usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>

# c0dcece7 19-Aug-2013 Heiko Schocher <hs@denx.de>

arm, am335x: add support for 3 siemens boards

add support for the am335x based boards from siemens:

dxr2:
- DDR3 128MiB
- NAND 256MiB
- Ethernet with external Switch SMSC LAN9303
- no PMIC
- internal Watchdog
- DFU support

pxm2:
- DDR2 512 MiB
- NAND 1024 MiB
- PMIC
- PHY atheros ar803x
- USB Host
- internal Watchdog
- DFU support

rut:
- DDR3 256 MiB
- NAND 256 MiB
- PMIC
- PHY natsemi dp83630
- external Watchdog
- DFU support

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Cc: Pascal Bach <pascal.bach@siemens.com>
Cc: Tom Rini <trini@ti.com>

# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

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>


# 9925f1db 01-Apr-2018 Alex Kiernan <alex.kiernan@gmail.com>

net: Move enetaddr env access code to env config instead of net config

In order that we can use eth_env_* even when CONFIG_NET isn't set, move
these functions to environment code from net code.

This fixes failures such as:

board/ti/am335x/built-in.o: In function `board_late_init':
board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr'
u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr'

which caters for use cases such as:

commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment
variable")

when Ethernet is required in Linux, but not U-Boot.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>


# bb4059a5 16-Feb-2018 Marek Vasut <marek.vasut@gmail.com>

dfu: Rename _FUNCTION_DFU to DFU_OVER_

Do the following to make the symbol names less confusing.

sed -i "s/\([TU][^_]\+\)_FUNCTION_DFU/DFU_OVER_\1/g" \
`git grep _FUNCTION_DFU | cut -d ":" -f 1 | sort -u`

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Lukasz Majewski <lukma@denx.de>


# a95aee6a 07-Sep-2017 Maxime Ripard <maxime.ripard@free-electrons.com>

usb: gadget: Make g_dnl USB settings common

The g_dnl USB settings for the vendor ID, product ID and manufacturer are
actually common settings that can and should be shared by all the gadgets.

Make them common by renaming them, and convert all the users.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>


# fd1e959e 03-Aug-2017 Simon Glass <sjg@chromium.org>

env: Rename eth_setenv_enetaddr() to eth_env_set_enetaddr()

Rename this function for consistency with env_set().

Signed-off-by: Simon Glass <sjg@chromium.org>


# 382bee57 03-Aug-2017 Simon Glass <sjg@chromium.org>

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>


# 01acd6ab 12-Jun-2015 Paul Kocialkowski <contact@paulk.fr>

usb: USB download gadget and functions config options coherent naming

This introduces a coherent scheme for naming USB download gadget and functions
config options. The download USB gadget config option is moved to
CONFIG_USB_GADGET_DOWNLOAD for better consistency with other gadgets and each
function's config option is moved to a CONFIG_USB_FUNCTION_ prefix.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>

Test HW: Odroid_XU3 (Exynos5422), trats (Exynos4210)


# 0adb5b76 08-Apr-2015 Joe Hershberger <joe.hershberger@ni.com>

net: cosmetic: Name ethaddr variables consistently

Use "_ethaddr" at the end of variables and drop CamelCase.
Make constant values actually 'const'.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>


# 0c331ebc 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x: siemens boards add FIT support

add FIT support and set "boardid" from factoryset records
"DEV/id" and "COMP/ver". "boardid" is used for selecting
which fit configuration gets booted on the board.

Signed-off-by: Heiko Schocher <hs@denx.de>


# 4ac32b9c 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: read COMP/ver from factoryset

Signed-off-by: Heiko Schocher <hs@denx.de>


# 7dc60d81 18-Nov-2014 Heiko Schocher <hs@denx.de>

arm, am335x, siemens: fix factoryset interpretation

a record could contain other records, so after an ">" (begin mark)
there not always come an end mark "<", instead a ">" is possible.
Take care of this.

Signed-off-by: Heiko Schocher <hs@denx.de>


# 56eb3da4 04-Nov-2013 Samuel Egli <samuel.egli@siemens.com>

arm, am335x: update for the siemens boards

- dxr2: define unused pins as input
- do not enable RTC32K OSC on dxr2 board
- update default environment
- add splashpos=m,m to default environment, so splash screen is always
centered.
- adapt environment for bootcount feature
- add altbootcmd to default environment
- rut: SPL add early reset pulse for eth-phy, maXTouch and display
- rut: display timing aenderungen
- siemens boards: adapt for background color = white
- add boutcount feature for the siemens boards
store the bootcount in the environment, as we have no softreset
save registers on this hardware. Use therefore the CONFIG_BOOTCOUNT_ENV
bootcount driver.
- change spi mode from 3 to 0 for the lcd init
- add gpio pin for lcd reset with state 0 and add mdelay
- siemens boards: use own USB id's
- add dfu serial and device number for siemens boards
Add for the siemens boards the possibility to define in dfu mode,
the iSerialNumber and the bcdDevice fields in the USB Device
descriptor.
- fix upgrade mechanism based on bootcount
Correct location of saveenv and remove not active variable.

Add CONFIG_BOOT_RETRY_TIME and CONFIG_RESET_TO_RETRY to
reboot board in case of empty kernel partition. Without
these defines an empty kernel partition leads to an
abort of boot process and one remains in u-boot prompt.

- general cleanup of dxr2, pxm2 and rut boards
all:
* Remove net boot from bootcmd
Ping can cause a crash on boards without ethernet phy.
net_nfs command is used only for development

* Add reset at the end of bootcmd
In order to have an immediate reset of the boot when bootcmd
fails, add reset at the end of bootcmd.

rut:
* add nand_img_size

dxr2:
* update nand_img_size

* ddr3 timings updated with iocontrol property that can be
modified via eeprom. New default parameters from software
leveling with draco ES2.

Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Matthias Michel <matthias.michel@siemens.com>
Cc: Tom Rini <trini@ti.com>


# d6eae7b0 08-Oct-2013 Lukasz Majewski <l.majewski@samsung.com>

usb:g_dnl: Add name parameter to g_dnl_bind_fixup function

New parameter, namely *name has been added to g_dnl_bind_fixup().
It is necessary (for compatibility reasons) to assign new USB idProduct
and idVendor for different usb functions.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>


# c0dcece7 19-Aug-2013 Heiko Schocher <hs@denx.de>

arm, am335x: add support for 3 siemens boards

add support for the am335x based boards from siemens:

dxr2:
- DDR3 128MiB
- NAND 256MiB
- Ethernet with external Switch SMSC LAN9303
- no PMIC
- internal Watchdog
- DFU support

pxm2:
- DDR2 512 MiB
- NAND 1024 MiB
- PMIC
- PHY atheros ar803x
- USB Host
- internal Watchdog
- DFU support

rut:
- DDR3 256 MiB
- NAND 256 MiB
- PMIC
- PHY natsemi dp83630
- external Watchdog
- DFU support

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Roger Meier <r.meier@siemens.com>
Signed-off-by: Samuel Egli <samuel.egli@siemens.com>
Cc: Pascal Bach <pascal.bach@siemens.com>
Cc: Tom Rini <trini@ti.com>