Commit graph

393 commits

Author SHA1 Message Date
Alexander Dahl
1818b44b7b board: sam9x60-curiosity: Let LED subsystem init leds if enabled
If CONFIG_LED and CONFIG_LED_GPIO are enabled, it is not necessary to
initialize the RGB LED on the board by manually setting hardcoded GPIOs
anymore.  Everything is well defined in dts and can be used like on
boards of other vendors.

Keep the old behaviour as fallback, though.

With all this in place enabling CONFIG_CMD_LED gives us a working 'led'
command on the U-Boot shell.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
2023-08-29 17:39:01 +03:00
Mihai Sain
87d1cac49d board: at91: sama5d29_curiosity: add initial support for sama5d29_curiosity
Add initial support for sama5d29_curiosity board.

Hardware:
SoC: SAMA5D29 500 MHz
DRAM: LPDDR2 512 MiB
PMIC: MCP16502
Debug: UART0
Flash: QSPI NOR 8 MiB
RGB LCD connector
Mikrobus connectors x 2
SD-Card connectors x 2
USB 2.0 x 2

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
2023-08-07 11:42:16 +03:00
Mihai Sain
8a2f52f44a configs: sam9x60: add mmc config for sdmmc1
Add new config for storing environment from SDMMC1.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
2023-01-04 09:28:04 +02:00
Mihai Sain
77aa6456bf board: at91: sam9x60: set blue led on at boot time
Set blue led on at boot time in order to highlight that u-boot is loaded.
This is done for all sam9x60 based boards which contain an RGB led.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
2023-01-04 09:28:04 +02:00
Balamanikandan Gunasundar
c41e05bab0 board: sam9x60ek: remove nand init from board file
Move this out of board file as this is done by the DM based NAND flash
driver. The EBI chip select configuration, iomux and timings are
handled by the driver

Signed-off-by: Balamanikandan Gunasundar <balamanikandan.gunasundar@microchip.com>
2022-12-08 18:06:27 +02:00
Tom Rini
aa6e94deab global: Move remaining CONFIG_SYS_SDRAM_* to CFG_SYS_SDRAM_*
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_SDRAM
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05 16:06:07 -05:00
Tom Rini
4e5909450e global: Move remaining CONFIG_SYS_NAND_* to CFG_SYS_NAND_*
The rest of the unmigrated CONFIG symbols in the CONFIG_SYS_NAND
namespace do not easily transition to Kconfig. In many cases they likely
should come from the device tree instead. Move these out of CONFIG
namespace and in to CFG namespace.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-12-05 16:05:38 -05:00
Simon Glass
b86986c7b3 video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEO
Now that all the old code is gone, rename this option. Driver model
migration is now complete.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30 20:07:17 +01:00
Simon Glass
6b9a829d27 video: Drop atmel LCD code
This has not been migrated to DM_VIDEO since 2019. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30 20:07:17 +01:00
Simon Glass
ba97899349 video: Drop CONFIG_LCD_INFO
This option is not used anymore since the LCD implementation is being
removed. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30 20:07:16 +01:00
Michal Suchanek
1d0617bd74 dm: treewide: Use uclass_next_device_err when accessing second device
There are a couple users of uclass_next_device return value that get the
first device by other means and use uclass_next_device assuming the
following device in the uclass is related to the first one.

Use uclass_next_device_err because the return value from
uclass_next_device will be removed in a later patch.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-17 21:17:12 -06:00
Durai Manickam KR
af64b436b1 board: sam9x60_curiosity: add pda detect call at init time
Call the PDA detection mechanism at boot time so that we can
have the pda environment variable ready for use.

Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-09-19 09:50:17 +03:00
Tom Rini
a2504a1bd2 net: ks8851_mll: Remove legacy non-DM_ETH code and callers
As this driver has been converted to DM_ETH and the migration deadline
is 2 years passed, remove the legacy code and callers.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2022-08-20 21:18:15 -04:00
Tom Rini
17ead040d4 Audit <flash.h> inclusion
A large number of files include <flash.h> as it used to be how various
SPI flash related functions were found, or for other reasons entirely.
In order to migrate some further CONFIG symbols to Kconfig we need to
not include flash.h in cases where we don't have a NOR flash of some
sort enabled.  Furthermore, in cases where we are in common code and it
doesn't make sense to try and further refactor the code itself in to new
files we need to guard this inclusion.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-08-04 16:18:47 -04:00
Eugen Hristev
3820020299 board: atmel: remove calls to debug_uart_init
Since 0dba45864b ("arm: Init the debug UART") ,
the debug_uart_init is now called from crt.S

It's no longer required to call it from the board file.

With the current code, the banned <debug_uart> is printed twice:

<debug_uart>

<debug_uart>

U-Boot 2022.07-rc4-00089-gee3d158fa8 (Jun 08 2022 - 17:39:29 +0300)

Remove all calls from board_early_init_f .

Suggested-by: Balamanikandan Gunasundar <Balamanikandan.Gunasundar@microchip.com>
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2022-06-28 10:10:06 +03:00
Durai Manickam KR
c8532d3f9e configs: Add sam9x60_curiosity_mmc_defconfig
Add boot from SDMMC (sdcard) support for sam9x60_curiosity.

Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-04-26 09:50:24 +03:00
Durai Manickam KR
b07a022964 board: Add sam9x60_curiosity support
Add board files, Kconfig, Makefile and MAINTAINERS.

Signed-off-by: Durai Manickam KR <durai.manickamkr@microchip.com>
2022-04-26 09:50:24 +03:00
Tom Rini
8c3e231b8f at91: Remove unused LED code
These LED files (and CONFIG values) are unused today, remove the code in
question.

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-08 09:05:20 -04:00
Tom Rini
8221c52d88 First set of u-boot-at91 features for the 2022.07 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFQBAABCgA6FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAmJH28ocHGV1Z2VuLmhy
 aXN0ZXZAbWljcm9jaGlwLmNvbQAKCRAesx4CDqwvyDv4B/9FBx95f7zR6WmguG05
 VyBchjphsRSuXHb7NieVNNEIpCJu+zw8YutngN2Q8KWIbM9o1OZnrNGxuKR9s+Px
 ivMXytGGsIa74XXhxv2boX151R1a5TG4UPf4Vn20qxmUiScE4FaoW5wQHG2vGqxd
 /LbzENNCA1A41/RGGysqyY8nQgOEY+Iass+OaHe7XjngcCfY5oY4IRqJ/Ak7ojkv
 Vm46i+KCTuyBlcMDjAwDsukSmzsujz2FyzZU1Uy62N8quEdXgrlIA/Yh4oarZ+BO
 5W/BJe1rClbnBkMJJn71GUlmnYrioYeUvxvIYwZWooe0Hgr+Iv1vOXv8aJ4hBsdc
 yoje
 =SwGu
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-at91-2022.07-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

First set of u-boot-at91 features for the 2022.07 cycle:

This feature set includes the new driver for the Atmel TCB timer,
alignment in DT for sama7g5 and sama7g5ek board, one Kconfig conversion
for external reset, and the usage of Galois tables from ROM for sama5d2
device.
2022-04-04 08:26:55 -04:00
Tom Rini
d7b7e3e906 Convert CONFIG_SYS_USE_NORFLASH et al to Kconfig
This converts the following to Kconfig:
   CONFIG_SYS_USE_NORFLASH
   CONFIG_SYS_USE_BOOT_NORFLASH

Signed-off-by: Tom Rini <trini@konsulko.com>
2022-04-01 10:28:46 -04:00
Mihai Sain
d05fc47bbc board: at91: sama5d2: set blue led on at boot time
Set blue led on at boot time in order to highlight that u-boot is loaded.
This is done for all sama5d2 based boards which contain an RGB led.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
2022-04-01 15:42:46 +03:00
Tom Rini
b601906ed5 atmel: Remove CONFIG_AT91SAM9G45_LCD_BASE
This variable is used once and is noted as board-specific.  Use the
value directly with a comment.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-18 12:48:17 -04:00
Tom Rini
137b990bf5 atmel: Remove CONFIG_AT91SAM9G45EKES
This symbol is used only once, and in comparison with an unset symbol,
so drop it.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-18 12:48:17 -04:00
Tom Rini
de0bb2ba54 Convert CONFIG_AT91SAM9G10EK et al to Kconfig
This converts the following to Kconfig:
   CONFIG_AT91SAM9G10EK
   CONFIG_AT91SAM9261EK
   CONFIG_AT91SAM9G10

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-18 12:48:17 -04:00
Tom Rini
23cf6344c0 Convert CONFIG_AT91SAM9G20EK et al to Kconfig
This converts the following to Kconfig:
   CONFIG_AT91SAM9G20EK
   CONFIG_AT91SAM9260EK
   CONFIG_AT91SAM9G20EK_2MMC

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-03-18 12:48:17 -04:00
Mihai Sain
93ddc09da2 board: sama7g5ek: set blue led on at boot time
Set blue led on at boot time in order to highlight that u-boot is loaded.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
2022-01-13 11:45:00 +02:00
Wolfgang Denk
66356b4c06 WS cleanup: remove trailing empty lines
Signed-off-by: Wolfgang Denk <wd@denx.de>
2021-09-30 08:08:56 -04:00
Tom Rini
7b57e56739 First set of u-boot-at91 features for the 2022.01 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFQBAABCgA6FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAmFKxpEcHGV1Z2VuLmhy
 aXN0ZXZAbWljcm9jaGlwLmNvbQAKCRAesx4CDqwvyBLaB/0XsIdkGAvcHLWW8yUg
 27GiRznikNKwn9/qIj2ByraoUd4BvxdQV4gKHR1R9n0sgYh/8VMyLbmhRoCRKFwP
 3mQ0MUyjaeU5sEWzasovJVpXhuUapEiV0jEg6t3Lgwd3mp2QK2Pk87zoleQfZNkb
 VAVCnt1T+kb3y0W9oa3XZbuH2wam9T5pNWRGW70JbgzdwJNKLO1Qo7MfcUNiDxJu
 Jf7uXtYwwILlN38G1KSk1ymMjfaotCqj7RzNaV3Ero57MVj3VzerKGb7H+XPOYf2
 nYXyietYLJJkzvHzSDwIdCSVlOSQL8QqVB8GCmLiNQD4tG830RcvSJnYpRLylWQK
 6F+Y
 =Q/aS
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-at91-2022.01-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

First set of u-boot-at91 features for the 2022.01 cycle:

This feature set includes : the support for CPU driver for arm926
(sam9x60 device); changes required for OP-TEE boot for sama5d2_xplained
and sama5d27_som1_ek boards; QSPI boot configuration for sama5d2_icp;
starting to remove old Kconfig unused symbols from config_whitelist.txt
(work will take more time); also small fixes and updates in mach, DT,
configs, etc.
2021-09-22 21:17:39 -04:00
Mihai Sain
d2b4809bde configs: sama5d2: add qspi config for QSPI1
Add new config for storing environment from QSPI1.

Signed-off-by: Mihai Sain <mihai.sain@microchip.com>
[eugen.hristev@microchip.com: cleanup and add MAINTAINERS entry]
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2021-09-21 10:05:38 +03:00
Clément Léger
8f5972ca2b board: sama5d2_xplained: Get dram size and base from device tree
In order to make it more flexible and allow modifying the base address
of DRAM without recompiling U-Boot, use memory node from device tree
with fdtdec functions.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
2021-09-21 10:05:38 +03:00
Clément Léger
73c1589f02 board: sama5d27_som1_ek: Get dram size and base from device tree
In order to make it more flexible and allow modifying the base address
of DRAM without recompiling U-Boot, use memory node from device tree
with fdtdec functions.

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
2021-09-21 10:05:38 +03:00
Pali Rohár
a79f823314 Remove #include <version.h> from files which do not need it
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2021-09-17 12:10:44 -04:00
Simon Glass
0b1284eb52 global: Convert simple_strtoul() with decimal to dectoul()
It is a pain to have to specify the value 10 in each call. Add a new
dectoul() function and update the code to use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02 13:32:14 -04:00
Tom Rini
f4a6f75b48 arm: Remove at91rm9200ek boards
These boards have not been converted to CONFIG_DM_USB by the deadline
and is also missing conversion to CONFIG_DM.  Remove them.

Cc: Andreas Bießmann <andreas@biessmann.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-07-07 22:22:42 -04:00
Michael Opdenacker
ea83ea5afd board: sama5d3_xplained: add Falcon boot support
This supports Falcon boot support for Microchip SAMA5D3 Xplained,
tested on raw MMC, and on raw NAND.

spl_start_uboot() is has the simplest possible implementation.
It doesn't test the environment because enabling environment support
currently causes the SPL to exceed its maximum size (64 KiB).
It doesn't check the serial for incoming characters either because
this functionality currently doesn't seem to work from the SPL
on this board.

Settings for Falcon boot from at FAT partition are also added to
avoid compile failures when CONFIG_SPL_OS_BOOT is enabled, but this
particular case is currently not functional as adding FAT and
partition support cause the SPL to be too big again.

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
2021-06-14 12:28:03 +03:00
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
Greg Gallagher
9119800591 board: atmel: Add SAMA5D27 giant board
Giant board is a tiny SBC based on the Adafruit Feather form factor,
created by groboards it contains a SAMA5D2 processor (SAMA5D27),
128 MB of RAM and a microSD card for storage.

Signed-off-by: Greg Gallagher <greg@embeddedgreg.com>
2021-01-22 15:09:59 +02:00
Eugen Hristev
a07d2a1121 board: atmel: sama7g5ek: add support for MAC address retreival
Obtain two MAC addresses from the two EEPROMs and configure the two
available Ethernet interfaces accordingly.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2021-01-07 09:44:16 +02:00
Eugen Hristev
0f8904b82d configs: sama7g5: add mmc config for sdmmc0
Add new config for storing environment from sdmmc0.
Also clean-up sama7g5ek_emmc1 to point to the proper mmc device.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2021-01-07 09:44:16 +02:00
Eugen Hristev
1d463d6735 board: atmel: sama7g5ek: add initial support for sama7g5ek
Add initial support for sama7g5 evaluation kit board.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2021-01-07 09:44:15 +02:00
Eugen Hristev
68d3ec599e board: atmel: common: introduce at91_set_eth1addr for second interface
We already have a function to retrieve the mac address from one EEPROM.
For boards with a second Ethernet interface, however, we would
require another EEPROM with a second unique MAC address.
Introduce at91_set_eth1addr which will look for a second EEPROM
and set the 'eth1addr' variable with the obtained MAC address.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-09-22 11:27:18 +03:00
Simon Glass
411e9eb88c w1: Drop dm.h header file
This header file should not be included in other header files. Remove it
and use a forward declaration instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03 22:19:54 -04:00
Masahiro Yamada
b75d8dc564 treewide: convert bd_t to struct bd_info by coccinelle
The Linux coding style guide (Documentation/process/coding-style.rst)
clearly says:

  It's a **mistake** to use typedef for structures and pointers.

Besides, using typedef for structures is annoying when you try to make
headers self-contained.

Let's say you have the following function declaration in a header:

  void foo(bd_t *bd);

This is not self-contained since bd_t is not defined.

To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h>

  #include <asm/u-boot.h>
  void foo(bd_t *bd);

Then, the include direcective pulls in more bloat needlessly.

If you use 'struct bd_info' instead, it is enough to put a forward
declaration as follows:

  struct bd_info;
  void foo(struct bd_info *bd);

Right, typedef'ing bd_t is a mistake.

I used coccinelle to generate this commit.

The semantic patch that makes this change is as follows:

  <smpl>
  @@
  typedef bd_t;
  @@
  -bd_t
  +struct bd_info
  </smpl>

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-17 09:30:13 -04:00
Tom Rini
c27178ba36 First set of u-boot-atmel fixes for 2020.07 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFQBAABCgA6FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAl7YxFMcHGV1Z2VuLmhy
 aXN0ZXZAbWljcm9jaGlwLmNvbQAKCRAesx4CDqwvyJnICACR6Q6OclfIuM0A3ubV
 GV48+iVz55eZnrZFKkbALBNjwTsshLpdZ/7Lr4zPD5e/FmrbJ+RONd0B6E38fSJk
 Rq1ZwMyuR6yv+LAb9+La36tGqD9bCFewqBpR5LQNOdjE+fG66rrWxksMME1jOIr5
 FLpFkk3lmEUloQumHDCQUgzXC/TUWpedgxpT15l1nR/Ovkh/MPvggIdS2zMWw92J
 oA9shaNTVLd//W9icduXagNtRMsjscmf/zTZFCYgBRjUZgiPW+HnitWg7jqbYIuY
 AqmNBZIrC6OuZ7W447g1rMGwbwQ5T9vbydp6PpHVqPvTt3D8OZ9h1+Hwwie7u9O1
 CPaV
 =xLcT
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians/u-boot-atmel

First set of u-boot-atmel fixes for 2020.07 cycle

This set includes just two small commits that fix a build warning and
add a missing serial node.
2020-06-04 10:21:51 -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
90526e9fba common: Drop net.h from common header
Move this header out of the common header. Network support is used in
quite a few places but it still does not warrant blanket inclusion.

Note that this net.h header itself has quite a lot in it. It could be
split into the driver-mode support, functions, structures, checksumming,
etc.

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

Fix up some style problems in flash.h while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-18 14:53:28 -04:00
Josef Lusticky
ef5a7438ac board: atmel: Fix compiler warning 'board_usb_hw_init()' not used
Wrap definition of board_usb_hw_init() around with #ifdef CONFIG_CMD_USB
to avoid warning: 'board_usb_hw_init' defined but not used
[-Wunused-function] when compiling without CONFIG_CMD_USB.

This patch makes sama5d27_som1_ek, sama5d2_ptc_ek and sama5d2_xplained
consistent with other boards that use the same #ifdef to avoid the warning.

Cc: Eugen Hristev <eugen.hristev@microchip.com>
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Josef Lusticky <josef@lusticky.cz>
Reviewed-by: Eugen Hristev <eugen.hristev@microchip.com>
2020-05-06 16:18:53 +03:00
Simon Glass
9b4a205f45 common: Move RAM-sizing functions to init.h
These functions relate to memory init so move them into the init
header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 14:02:35 -05:00
Simon Glass
5e6267af31 common: Move reset_phy() to net.h
This is a network function so let's move it into that header.

Signed-off-by: Simon Glass <sjg@chromium.org>
2020-01-17 13:26:50 -05:00