aboutsummaryrefslogtreecommitdiff
path: root/board/st
AgeCommit message (Collapse)Author
2019-12-02common: Move serial functions out of common.hSimon Glass
These functions belong in serial.h so move them over. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-12-02common: Drop global inclusion of status_led.hSimon Glass
This is only used by a few files so it should not be in the common header. Move it out. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2019-11-26stm32mp1: add support for virtual partition readPatrick Delaunay
Add read for OTP and PMIC NVM with alternates on virtual DFU device. Serie-cc: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-11-26stm32mp1: board: add spi nand supportPatrick Delaunay
This patch adds the support of the spi nand device in mtdparts command and in dfu_alt_info. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-11-26stm32mp1: activate SET_DFU_ALT_INFOPatrick Delaunay
Generate automatically dfu_alt_info for the supported device. The simple command "dfu 0" allows to start the dfu stack on usb 0 for the supported devices: - dfu mtd for nand0 - dfu mtd for nor0 - dfu mmc for SDCard - dfu mmc for eMMC - dfu ram for images in DDR The DUF alternate use the "part", "partubi" and "mmcpart" options to select the correct MTD or GPT partition or the eMMC hw boot partition. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-10-22board: stm32mp1: fixup the usb product id for USB download gadgetPatrick Delaunay
Select the correct USB product id used by the download gadget for ST stm32mp1 boards. The board stm32mp1 select the correct product id, as defined in http://www.linux-usb.org/usb.ids for the STMicroelectronics vendor id = 0x0483 (CONFIG_USB_GADGET_VENDOR_NUM): - dfu = 0xdf11 : STM Device in DFU mode it is the value used by ROM code and reused for stm32prog command - fasboot = 0x0afb : Android Fastboot device - others = 0x5720 (CONFIG_USB_GADGET_PRODUCT_NUM) Mass Storage Device it is used for UMS command / usb_dnl_ums This patch avoid conflict when the same USB VID/PID is used for ums, fastboot or dfu command (two different protocols associated to the same PID). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Patrice Chotard <patrice.chotard@st.com>
2019-10-13board: Add STM32F769 SoC, discovery board supportYannick Fertré
Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
2019-09-04net: dwc_et_qos: update weak function board_interface_eth_initPatrick Delaunay
Align the board and driver prototype for board_interface_eth_init to avoid execution issue (the interface_type parameter is defined as int or phy_interface_t). To have a generic weak function (it should be reused by other driver) I change the prototype to use directly udevice. This prototype is added in netdev.h to allow compilation check and avoid warning when compiling with W=1 on file board/st/stm32mp1/stm32mp1.c warning: no previous prototype for 'board_interface_eth_init'\ [-Wmissing-prototypes] int board_interface_eth_init(int interface_type, .... ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-08-27stm32mp1: update README for remoteproc supportPatrick Delaunay
Add information for remoteproc usage to load firmware in M4 coprocessor on stm32mp157. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: add example files for FIT generationPatrick Delaunay
Add example of its files to generate FIT to start kernel on ev1 or dk2 board with - only kernel and dtb = fit_copro_kernel_dtb.its - kernel, M4 copro firmware and dtb = it_copro_kernel_dtb.its Add extlinux example to manage config in generated FIT. Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: Add copro image support for M4 firmwarePatrick Delaunay
Implements copro image loading with FIT. Once image is loaded with remoteproc, the M4 coprocessor is automatically started. Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board update command stboard on misc_read resultPatrick Delaunay
Update management of misc_read, which now return length of data after the commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: update sysconf_init on misc_read resultPatrick Delaunay
Update management of misc_read in sysconf_init, which now return length of data after the commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: update test on misc_read resultPatrick Delaunay
Update the stm32mp1 baord after the commit 8729b1ae2cbd ("misc: Update read() and write() methods to return bytes xfered") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27MAINTAINERS: update ARM STM STM32MP and STM32MP1 BOARDPatrick Delaunay
Add the missing driver and files for mach-stm32mp / stm32mp1 product. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: cosmetic: cleanup filePatrick Delaunay
- reorder include files - remove one comment Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: remove board_check_usb_power when ADC is not activatedPatrick Delaunay
Avoid compilation issue when CONFIG_ADC is not activated Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: Update the way vdd-supply is retrieved from DTPatrick Delaunay
Due to kernel DT alignment, pwr-supply is renamed to vdd-supply and is a subnode of pwr-regulators. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: check the boot-source to disable bootdelayPatrick Delaunay
Allows to avoid to wait 2 second in U-Boot before to start STM32CubeProgrammer command. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: protect the led function callsPatrick Delaunay
Avoid compilation issue when CONFIG_LED is not activated Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: support of error led on ed1/ev1 boardPatrick Delaunay
Create a function led_error_blink and add node in device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: enable v1v2_hdmi and v3v3_hdmi regulator on dk2 bootPatrick Delaunay
As for Audio codec IC, HDMI IC is not "IO safe". HDMI regulators (v3v3 and v1v2) must be enabled to allow I2C1 bus usage. HDMI IC must be under reset during power up and keep HDMI and AUDIO devices in reset while they are not used in U-Boot to keep them in low power mode (each device can be kept in reset independently keeping their power supplies ON until kernel). Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stm32mp1: board: add environment variable for board id and board revPatrick Delaunay
Add variable to identify board with HW id (read from OTP) and revision. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-27stpmic1: program pmic to keep only the debug unit onPatrick Delaunay
Depending on backup register value, we maintain the debug unit powered-on for debugging purpose. Only BUCK1 is required for powering the debug unit, so revert the setting for all the other power lanes, except BUCK3 that has to be always on. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-08-11env: Rename environment.h to env_internal.hSimon Glass
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: Move env_get_f() to env.hSimon Glass
Move this function over to the new header file. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-07-12board: st: add missing gpio_request() for stm32f429-discoveryPatrice Chotard
This fixes the following error message: U-Boot 2019.07-rc4-00103-g5eea874b5e (Jun 25 2019 - 15:09:31 +0200) DRAM: 8 MiB gpio@40021800: dir_output: error: gpio GPIOG14 not reserved gpio@40021800: dir_output: error: gpio GPIOG13 not reserved gpio@40021800: set_value: error: gpio GPIOG14 not reserved Flash: 2 MiB .... Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-07-12board: stm32mp1: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: warning: no previous prototype for 'board_quiesce_devices' [-Wmissing-prototypes] void board_quiesce_devices(void) ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: activate OF_BOARD_SETUP and FDT_FIXUP_PARTITIONSPatrick Delaunay
Update kernel MTD partition in device tree with U-Boot information. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: add configuration op-teePatrick Delaunay
Add support of Trusted boot chain with OP-TEE - reserved 32MB at the end of the DDR for OP-TEE Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: cosmetic: remove unnecessary includePatrick Delaunay
Remove post.h include as it is used in spl.c Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: update READMEPatrick Delaunay
Add latest information and correct some information. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: add stboard commandPatrick Delaunay
Allow to update board identification in OTP 59. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: call regulators_enable_boot_on in board_initPatrick Delaunay
U-Boot activates regulators by reading the "regulator-boot-on" property in DT; it is requested by M4 early Boot feature. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: move CONFIG_ENV in KconfigPatrick Delaunay
Move 2 ENV configuration flags in board Kconfig - CONFIG_ENV_SECT_SIZE - CONFIG_ENV_OFFSET Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-06-06board: stm32mp1: Add board_interface_eth_initChristophe Roullier
Called to configure Ethernet PHY interface selection and configure clock selection in RCC Ethernet clock tree. Signed-off-by: Christophe Roullier <christophe.roullier@st.com>
2019-06-06board: stm32mp1: Update power supply check via USB TYPE-CPatrice Chotard
Add 2 new checks: - detect when USB TYPE-C cable is not plugged correctly. In this case, GND and VBUS pins are connected but not CC1 and CC2 pins. - detect is an USB Type-C charger supplies more than 3 Amps which is not compliant with the USB Type-C specification In these 2 situations, stop the boot process and let red led blinks forever. V cc1 | V cc2 | power supply | red led | console message range (Volts) |range (Volts)| (Amps) | blinks | --------------|-------------|--------------|---------|----------------------------------- > 2.15 | < 0.2 | > 3 | for ever| USB TYPE-C charger not compliant with specification [2.15 - 1.23[ | < 0.2 | 3 | NO | NO [1.23 - 0.66[ | < 0.2 | 1.5 | 3 times | WARNING 1.5A power supply detected [0.66 - 0] | < 0.2 | 0.5 | 2 times | WARNING 500mA power supply detected < 0.2 | < 0.2 | | for ever| ERROR USB TYPE-C connection in unattached mode > 0.2 | > 0.2 | | for ever| ERROR USB TYPE-C connection in unattached mode Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06stm32mp1: Update env_get_location for NOR supportPatrice Chotard
Update env_get_location() to be able to save environment into NOR (SPI_FLASH). Series-cc: pde, cke, pch, uboot-stm32 Cover-letter: Add saveenv support for STM32MP1 This series adds saveenv support for STM32MP1 on several boot devices. STM32MP1 is able to boot on eMMC, sdcard and NOR (NAND support is not fully supported). On eMMC and sdcard, environment is saved in EXT4 partition On NOR, environment is saved in a dedicated partition On NAND, environment is saved in a UBI volume. This series: - enables NAND and NOR support on ev1 board - enables ENV_IS_IN_SPI_FLASH, ENV_IS_IN_UBI, ENV_IS_IN_EXT4 flags - fixes get_mtdparts() - allows to override interface, device and partition for ext4 environment - updates rule to set ENV_IS_NOWHERE value - introduce ENV_IS_IN_DEVICE END Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06stm32mp1: Add env_get_location()Patrice Chotard
In case of several environment location support, env_get_location is needed to select the correct location depending of the boot device . Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06board: stm32mp1: Add env_ext4_get_dev_part() and env_ext4_get_intf()Patrice Chotard
This allows to : - select the current device to save the environment file - select the correct EXT4 boot device instance and partition to save the environment file. For EXT4, device is mmc, device instance is 0 for sdcard or 1 for eMMC. The partition is set to "auto" to select the first partition with bootable flag. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06stm32mp1: support dynamic MTDPARTSPatrice Chotard
This patch configure the default value for mtdids and mtparts dynamically according the presence of nor and nand in the board device tree Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-06-06board: stm32mp1: Add Avenger96 board supportManivannan Sadhasivam
Add support for Avenger96 board from Arrow Electronics based on STM32MP157 MPU. This board is one of the Consumer Edition (CE) boards of the 96Boards family and has the following features: SoC: STM32MP157AAC PMIC: STPMIC1A RAM: 1024 Mbyte @ 533MHz Storage: eMMC v4.51: 8 Gbyte microSD Socket: UHS-1 v3.01 Ethernet Port: 10/100/1000 Mbit/s, IEEE 802.3 Compliant Wireless: WiFi 5 GHz & 2.4GHz IEEE 802.11a/b/g/n/ac Bluetooth®v4.2 (BR/EDR/BLE) USB: 2x Type A (USB 2.0) Host and 1x Micro B (USB 2.0) OTG Display: HDMI: WXGA (1366x768)@ 60 fps, HDMI 1.4 LED: 4x User LED, 1x WiFi LED, 1x BT LED More information about this board can be found in 96Boards website: https://www.96boards.org/product/avenger96/ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-05-23stm32mp1: ram: add support for LPDDR2/LPDDR3Patrick Delaunay
Manage power supply configuration for board using stpmic1 with LPDDR2 or with LPDDR3: + VDD_DDR1 = 1.8V with BUCK3 (bypass if possible) + VDD_DDR2 = 1.2V with BUCK2 Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-05-18CONFIG_SPL_SYS_[DI]CACHE_OFF: addTrevor Woerner
While converting CONFIG_SYS_[DI]CACHE_OFF to Kconfig, there are instances where these configuration items are conditional on SPL. This commit adds SPL variants of these configuration items, uses CONFIG_IS_ENABLED(), and updates the configurations as required. Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Trevor Woerner <trevor@toganlabs.com> [trini: Make the default depend on the setting for full U-Boot, update more zynq hardware] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-04-24Merge tag 'u-boot-stm32-mcu-20190423' of https://github.com/pchotard/u-bootTom Rini
STM32 MCUs update: - DT rework and alignment with DT kernel v4.20 - mmc: arm_pl180_mmci: Synchronize compatible with kernel v4.20 - mmc: stm32_sdmmc2: Synchronize properties with kernel v4.20 - configs: update for F746/769 boards
2019-04-23board: stm32f746-disco: Get MII/RMII phy_mode from DTPatrice Chotard
This is needed to make ethernet work on stm32f746-eval which uses MII mode. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-04-21stm32mp1: add stusb1600 support for DK1 and DK2 boardPatrick Delaunay
The DK1 and DK2 boards use the USB Type-C controller STUSB1600. This patch updates: - the device tree to add the I2C node in the DT - the board stm32mp1 to probe this I2C device and use this controller to check cable detection. - the DWC2 driver to support a new dt property "u-boot,force-b-session-valid" which forces B session and device mode; it is a workaround because the VBUS sensing and ID detection isn't available with stusb1600. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2019-04-21stm32mp1: migrate USBOTG device to driver modelPatrick Delaunay
Use the DWC2 device driver with DM_USB_GADGET support and cleanup the USB support in STM32MP1 board. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-04-12board: stm32mp1: Force pinctrl driver probe in board_init()Patrice Chotard
In order to insure that hog GPIOs are configured early during the boot process, force all pinctrl driver probing in board_init(). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2019-04-12Board: stm32mp1: Add supply current boot informationPatrice Chotard
For DK1/DK2 boards, check if power supply provides enough current to allow the board to boot correctly. ADC@0 channel 18 and 19 are connected to USB type-C CC1 and CC2 signals. The table below shows the behavior for different range of CC1 or CC2: range | power supply | red led | console message (Volts) | (Amps) | blinks | --------------|--------------|---------|----------------------------------- [2.10 - 1.23[ | 3 | NO | NO [1.23 - 0.66[ | 1.5 | 3 times | WARNING 1.5A power supply detected [0.66 - 0] | 0.5 | 2 times | WARNING 500mA power supply detected If detected current is < 3A, red led is kept ON after blinking. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>