summaryrefslogtreecommitdiff
path: root/board/amlogic
AgeCommit message (Collapse)AuthorFilesLines
2021-08-11Merge tag 'u-boot-amlogic-20210810' of ↵Tom Rini1-1/+1
https://source.denx.de/u-boot/custodians/u-boot-amlogic - odroid-n2: fix fdtfile suffix for n2-plus - sei610 & meson64_android cleanups to prepare android 11 boot support - use Android BCB mechanism for reboot reason instead of HW reboot flag - Switch meson64_android boot flow to use abootimg for A/B, AVB and DTBO support
2021-08-10board: amlogic: odroid-n2: fix fdtfile suffix for n2-plusChristian Hewitt1-1/+1
The N2+ dtb is meson-g12b-odroid-n2-plus.dtb, not n2_plus, so correct the suffix provided in the board file. Also align the board ident string shown during boot to match. Fixes: 8bc780106c13 ("board: amlogic: odroid: add runtime detection of the N2/N2+/C4/HC4 variants") Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass3-3/+3
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>
2021-07-27board: amlogic: vim3: fix phy-names property setupArtem Lapkin1-2/+2
phy-names was improperly implemented resulting in an inoperable USB-OTG port. - phy-names = "usb2-phy0\0\0usb2-phy1\0"; + phy-names = "usb2-phy0\0usb2-phy1"; Signed-off-by: Artem Lapkin <art@khadas.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-07-27VIM3: mmc_get_env_dev correct non emmc boot sourcesArtem Lapkin1-2/+8
need return -1 if boot source is not EMMC or SD ( for example it will be useful if we have multy env sources configuration and device was booted from SPI flash and env need read from SPI not from mmc ) Signed-off-by: Artem Lapkin <art@khadas.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-04-06arm: meson: remove static ethernet link setupNeil Armstrong12-26/+2
The static ethernet link type config code is no more needed because now handled by the meson8b glue driver, delete it. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-02-15Merge branch '2021-02-02-drop-asm_global_data-when-unused'Tom Rini1-0/+1
- Merge the patch to take <asm/global_data.h> out of <common.h>
2021-02-10board: amlogic: odroid: add runtime detection of the N2/N2+/C4/HC4 variantsMarek Szyprowski1-0/+80
Use the ADC channel 1 to check the hardware revision of the board and detect the N2 vs. N2+ and the C4 vs. HC4 variants. Each of them use different dtb file, so adjust fdtfile environment variable to the detected variant. The ADC min/max values for each variant are taken from the vendor code, adjusted to the 12-bit ADC driver operation mode (vendor code use 10-bit mode). Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass1-0/+1
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-01-12board: amlogic: vim3: fix setup ethernet mac from efuseArtem Lapkin1-3/+15
Fix reading built-in ethernet MAC address from efuse NOTE: MAC is stored in ASCII format, 1bytes = 2characters by 0 offset if mac from efuse not valid we use meson_generate_serial_ethaddr NOTE: remake odroid-n2.c from Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Artem Lapkin <art@khadas.com> [narmstrong: remove MAC print & spurious new endline] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11board: amlogic: add MMC boot device detection for environment loadMarek Szyprowski2-0/+16
Detect eMMC or SD card boot on Odroid-C4/N2 and Khadas VIM3(l) boards and report proper MMC device for the environment loading code. This allows to automatically load and store environment variables on the FAT partition or RAW offset of the MMC device without the need to use different configurations on eMMC and SD card. To use this feature with environment stored on FAT partition, one has to specify an empty device part (i.e. ":1" for the first partition) in CONFIG_ENV_FAT_DEVICE_AND_PART to let the code to set the device to the value returned by mmc_get_env_dev() function. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11boards: amlogic: add Beelink S922X board family supportChristian Hewitt3-0/+69
Copied from Odroid N2. Add myself as maintainer. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11board: amlogic: vim3: read ethernet MAC address from efuseMarek Szyprowski1-0/+19
Add the board specific code for reading built-in ethernet MAC address from efuse. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11boards: amlogic: update documentation for WeTek Core2Christian Hewitt1-0/+1
Update the device matrix and add build instructions. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> [narmstrong: added wetek-core2.rst to q200 MAINTAINERS and added blank lines to fix build] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11boards: amlogic: add WeTek Core2 supportChristian Hewitt1-0/+1
Add a config for the WeTek Core2, largely based on the VIM2 config. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> [narmstrong: added wetek-core2_defconfig to q200 MAINTAINERS] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11meson: Add soc_rev to environmentPascal Vizeli1-0/+5
Add SoC revision to environment. This can be useful to select the correct device tree at runtime (N2/N2+). Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2021-01-11arm64: meson: add support for libretech-cc v2Jerome Brunet1-0/+1
Add support for the Amlogic based libretech cc version 2. As version 1, it is based on the s905x SoC. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> [narmstrong: Fixed libretech-cc.rst bullet points] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-10-05board: amlogic: vim3: add support for dynamic PCIe enableNeil Armstrong2-0/+198
The VIM3 on-board MCU can mux the PCIe/USB3.0 shared differential lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between an USB3.0 Type A connector and a M.2 Key M slot. The PHY driving these differential lines is shared between the USB3.0 controller and the PCIe Controller, thus only a single controller can use it. This adds this dynamic switching right before booting Linux and the configuration steps in the boards documentation. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> [narmstrong: fixed warning by replacing min() by min_t()]
2020-10-05board: amlogic: add a vim3 specific board supportNeil Armstrong4-4/+35
The VIM3 will need a specific code to enable PCIe if enabled in the MCU, thus add a specific board support for VIM3 & VIM3L. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-10-05board: s400: generate unique mac address from SoC serialNeil Armstrong1-0/+2
Enable unique mac address generation from SoC serial on S400 board. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-07-08boards: amlogic: add Odroid C4 supportChristian Hewitt1-0/+2
Odroid C4 is an Amlogic SM1 device, the board config and board documentation are adapted from the Odroid-N2 support from the same vendor. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> [narmstrong: fix odroid-c4.rst typos and structure] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Anand Moon <linux.amoon@gmail.com>
2020-07-08board: amlogic: Add Odroid-N2 board supportPascal Vizeli4-2/+62
Add a proper Odroid-N2 board support to handle the Ethernet MAC address stored in the in-SoC eFuses. Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Anand Moon <linux.amoon@gmail.com>
2020-06-18board: amlogic: add board doc files to MAINTAINERSNeil Armstrong9-0/+17
Add the recently added reStructuredText board documentation in the appropriate MAINTAINERS files. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-06-18board: amlogic: move boards doc into doc/board/amlogicNeil Armstrong18-2005/+0
Move the natural text Amlogic board README files to doc/board/amlogic into reStructuredText and : - add reStructuredText markup for bash code - fix secondary titles markup - move board support into global support matrix Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-06-03amlogic: Remove ARCH= references from documentationTom Rini18-18/+0
When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. Cc: Beniamino Galvani <b.galvani@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Cc: u-boot-amlogic@groups.io Signed-off-by: Tom Rini <trini@konsulko.com>
2020-05-19command: Remove the cmd_tbl_t typedefSimon Glass2-0/+2
We should not use typedefs in U-Boot. They cannot be used as forward declarations which means that header files must include the full header to access them. Drop the typedef and rename the struct to remove the _s suffix which is now not useful. This requires quite a few header-file additions. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop init.h from common headerSimon Glass9-0/+9
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop net.h from common headerSimon Glass9-0/+9
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-04-06arm64: dts: meson: add libretech-pc supportJerome Brunet1-0/+2
Add support for the Amlogic based libretech-pc platform. This platform comes with 2 variant, based on the s905d or s912 SoC. Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> [narmstrong: update board/amlogic/q200/MAINTAINERS] Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-01-07boards: amlogic: add Khadas VIM3L supportChristian Hewitt2-0/+133
Khadas VIM3L uses the same board layout as VIM3, but with an S905D3 chip instead of A311D. Board config is derived from khadas-vim3_defconfig and sei610_defconfig. README is based on README.khadas-vim3; the difference is that VIM3L uses FIP files from the g12a folder in vendor sources not the g12b folder. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [narmstrong: added vim3l readme into w400 MAINTAINERS]
2019-10-18configs: sei610: Add config file to fix userdata sizeGuillaume La Roque1-0/+1
Add separate config file to handle the different eMMC size on the sei610 board. Signed-off-by: Guillaume La Roque <glaroque@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-10-18boards: amlogic: add SEI610 supportNeil Armstrong4-0/+157
Add support for the customer board SEI610 manufactured by SEI Robotics with the following specifications: - Amlogic S905X3 ARM Cortex-A55 quad-core SoC - 2GB DDR4 SDRAM - 10/100 Ethernet (Internal PHY) - 1 x USB 3.0 Host - 1 x USB Type-C DRD - 1 x FTDI USB Serial Debug Interface - eMMC - SDcard - Infrared receiver - SDIO WiFi Module Like it's SEI510 counterpart, the boot flow is designed to boot Android AOSP built for the Yukawa Android device. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-10-18configs: Add Khadas VIM3 defconfigAndreas Färber2-0/+133
Derived from odroid-n2_defconfig and README.odroid-n2. Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-10-18board: amlogic: document alternative libretech-cc installation methodsDaniel Drake1-4/+37
As already documented in this README, several binaries must be glued together in order to boot the device. Extend the documentation to cover the prebuilt binaries (saving you the hassle of installing ancient cross-compilers), and also mention the open source replacements for the encryption tool (which is especially useful if you want to avoid requiring 32-bit x86 binaries in your build system). Signed-off-by: Daniel Drake <drake@endlessm.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-08-13Merge tag 'u-boot-amlogic-20190812' of ↵Tom Rini4-0/+162
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic - amlogic: add support for the SEI Robotic SEI510
2019-08-12boards: meson: add g12a sei510Jerome Brunet4-0/+162
The SEI510 board is based on the Amlogic S905X2 SoC from the Amlogic G12A SoC family. The board has the following specifications : - Amlogic S905X2 ARM Cortex-A53 quad-core SoC - XGB DDR4 SDRAM - 10/100 Ethernet (Internal PHY) - 1 x USB 3.0 Host - eMMC - SDcard - Infrared receiver - SDIO WiFi Module The board default behaviour is for booting Android and triggers fastboot on recovery or reboot mode. USB vendor ID (used by fastboot) is 0x18d1 (Google) for default udev rules for existing android users work out of the box. Signed-off-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-08-12env: Rename environment.h to env_internal.hSimon Glass1-1/+1
This file contains lots of internal details about the environment. Most code can include env.h instead, calling the functions there as needed. Rename this file and add a comment at the top to indicate its internal nature. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> [trini: Fixup apalis-tk1.c] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-08-11env: Drop environment.h header file where not neededSimon Glass6-6/+0
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>
2019-08-11env: Move env_set() to env.hSimon Glass4-0/+4
Move env_set() over to the new header file. Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2019-07-31board: amlogic: add support for Odroid-N2Neil Armstrong5-0/+290
ODROID-N2 is a single board computer manufactured by Hardkernel Co. Ltd with the following specifications: - Amlogic S922X ARM Cortex-A53 dual-core + Cortex-A73 quad-core SoC - 4GB DDR4 SDRAM - Gigabit Ethernet - HDMI 2.1 4K/60Hz display - 40-pin GPIO header - 4 x USB 3.0 Host, 1 x USB OTG - eMMC, microSD - Infrared receiver The board directory is W400, the name of the Amlogic Reference Design of Amlogic G12B with Gigabit boards, which will be used for similar boards. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Mark Kettenis <kettenis@openbsd.org>
2019-07-08Merge tag 'u-boot-amlogic-20190704' of ↵Tom Rini3-1/+5
https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic - fix khadas-vim README - add support for unique generated MAC adresses from SoC serial, limited to Amlogic GXL/GXM boards for now
2019-07-04board: amlogic: add mailing-list to MAINTAINERSNeil Armstrong6-0/+6
Add missing mailing-list to the amlogic boards MAINTAINERS file. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-04board: amlogic: Generate unique MAC address for Q200 and P212 based boardsNeil Armstrong2-0/+4
Enable unique MAC address generation for boards usins SoCs having a known functional and valid unique serial number. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-07-04board: amlogic: vim: Fix READMEAndreas Färber1-1/+1
Unlike the BayLibre repos Khadas' repo defaults to using native gcc, so specify the CROSS_COMPILE setting matching the prescribed toolchain. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-05-31boards: amlogic-g200: remove phy resetNeil Armstrong1-6/+0
The PHY reset is now handled by the MAC driver, remove this leftover. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-23board: amlogic-q200: fix Khadas VIM2 READMENeil Armstrong1-2/+2
The vendor U-boot branch and defconfig was wrong for the Khadas VIM2, fix this. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-23boards: meson: add g12a u200Jerome Brunet4-0/+161
The Amlogic U200 board is based on the Amlogic S905D2 SoC from the Amlogic G12A SoC family. The board has the following specifications : - Amlogic S905D2 ARM Cortex-A53 quad-core SoC - XGB DDR4 SDRAM - 10/100 Ethernet (Internal PHY) - 1 x USB 3.0 Host - eMMC - SDcard - Infrared receiver - SDIO WiFi Module - MIPI DSI Connector - Audio HAT Connector - PCI-E M.2 Connector Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-10boards: Amlogic: Add support for Libretech-ACNeil Armstrong2-0/+104
LibreTech AC is a single board computer manufactured by Libre Technology with the following specifications: - Amlogic S805X ARM Cortex-A53 quad-core SoC @ 1.2GHz - ARM Mali 450 GPU - 512MiB DDR4 SDRAM - 10/100 Ethernet - HDMI 2.0 4K/60Hz display - 40-pin GPIO header - 4 x USB 2.0 Host - eMMC, SPI NOR Flash - Infrared receiver The u-boot specific code is the same as the P212 support, so use the P212 board support code with a distinct defconfig and config include files. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-10ARM: board: meson: add p201 boardMohammad Rasim4-0/+156
This adds support for p201 reference boards Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2019-04-10ARM: board: meson: add p200 boardMohammad Rasim2-0/+104
This adds the defconfig and README files for p200 board Signed-off-by: Mohammad Rasim <mohammad.rasim96@gmail.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>