Commit Graph

65725 Commits

Author SHA1 Message Date
Igor Opaniuk
1cfe8d6b30 toradex: imx: enable BOOTCOUNT feature
This introduces automatic boot counter that increases after every
reset.After a power-on reset, it will be initialized with 1,
and each reboot will increment the value by 1. By default it's
disabled if bootlimit isn't set.

To enable this feature you have set bootcount limit ("bootlimit"),
alternate boot action ("altbootcmd") that will be performed if
the new value of bootcount exceeds the value of bootlimit, and
"upgrade_available" to let U-Boot automatically increase and save
the counter value after every reset:

> setenv bootlimit 5
> setenv upgrade_available 1
> setenv altbootcmd "bootm ..."

In case the bootlimit exceeds, the message will be shown and
albootcmd executed:
Warning: Bootlimit (5) exceeded. Using altbootcmd.

To reset bootcount run:
> bootcount reset

Print current value:
> bootcount print

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-06-22 17:42:44 +02:00
Igor Opaniuk
670795a38d apalis-tk1: fix setting fdtfile value
s/fdt-module/fdt_module/g, as we don't use dash in fdt_file anymore.

Fixes: 4c63a601("apalis-tk1: support v1.2 hardware revision")
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-06-22 17:42:35 +02:00
Igor Opaniuk
adff136c28 apalis-tk1: enable distroboot
1. Use distro_bootcmd as default boot command instead of
legacy emmcboot wrapper.
2. Drop emmcboot and sdboot wrappers.
3. Provide proper boot order for Distro Boot.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-06-22 17:42:28 +02:00
Max Krummenacher
1fd988a9fa configs/colibri_vf.h: drop sdboot in favour of distro_bootcmd
The distro bootscript uses kernel_image to get the file name of
the kernel, so change that variable name.
UBI boot has precedence in the default boot command. If one wants
to boot from SD with a working NAND installation stop in U-Boot
and enter:

setenv fdtfile ${soc}-colibri-${fdt_board}.dtb && run distro_bootcmd

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-06-22 17:42:21 +02:00
Max Krummenacher
a0092cf236 colibri_vf_defconfig: enable part cmd
This allows to boot from SD/USB with passing the rootfs partition via UUID.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-06-22 17:42:15 +02:00
Stefan Agner
b0a8cefd5b colibri-imx6ull/imx7: define bootubipart for distro boot
When using distro boot to boot from UBI volumes the boot partition
has been hardcoded to "UBI" (capital letters). However, our default
MTD layout uses "ubi" (lower case letter). Define "ubi" as the
default UBI partition for distro boot for Toradex. This allows to
use distro boot without having to redefine the MTD partition layout
which is useful for TorizonCore.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2020-06-22 17:42:04 +02:00
Stefan Agner
d3976cc2fe colibri_imx7: add addresses required for distro boot
Define addresses required for full distro boot support.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2020-06-22 17:41:57 +02:00
Oleksandr Suvorov
506619da80 colibri-imx8x: declare consoleargs
Store all console-related kernel parameters
in dedicated variable.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-06-22 17:41:51 +02:00
Max Krummenacher
1b25ee978c apalis/colibri-imx8: re-enable CONFIG_IMX_SCU_THERMAL
This got dropped by a global 'make savedefconfig' resync as
required patches are still in flight.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
2020-06-22 17:41:44 +02:00
Marcel Ziswiler
4e8aba4dd5 apalis-imx8: enable of_system_setup
Enable CONFIG_OF_SYSTEM_DEFAULT for Apalis iMX8.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2020-06-22 17:41:38 +02:00
Fabio Estevam
041dd8e9c4 ARM: dts: imx6qdl-sabresd: Fix AR8031 phy-mode
As per kernel commit 0672d22a1924 ("ARM: dts: imx: Fix the AR803X phy-mode)
the correct phy-mode should be "rgmii-id", so fix it accordingly
to fix the Ethernet regression.

This problem has been exposed by commit:

commit 13114f38e2
Author: Vladimir Oltean <vladimir.oltean@nxp.com>
Date:   Thu May 7 00:11:51 2020 +0200

    phy: atheros: Explicitly disable RGMII delays

    To eliminate any doubts about the out-of-reset value of the PHY, that
    the driver previously relied on.

    If bisecting shows that this commit breaks your board you probably have
    a wrong PHY interface mode. You probably want the
    PHY_INTERFACE_MODE_RGMII_RXID or PHY_INTERFACE_MODE_RGMII_ID mode.

    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2020-06-22 17:41:25 +02:00
Fabio Estevam
64e2793f70 ARM: dts: imx6qdl-sabreauto: Fix AR8031 phy-mode
As per kernel commit 0672d22a1924 ("ARM: dts: imx: Fix the AR803X phy-mode)
the correct phy-mode should be "rgmii-id", so fix it accordingly
to fix the Ethernet regression.

This problem has been exposed by commit:

commit 13114f38e2
Author: Vladimir Oltean <vladimir.oltean@nxp.com>
Date:   Thu May 7 00:11:51 2020 +0200

    phy: atheros: Explicitly disable RGMII delays

    To eliminate any doubts about the out-of-reset value of the PHY, that
    the driver previously relied on.

    If bisecting shows that this commit breaks your board you probably have
    a wrong PHY interface mode. You probably want the
    PHY_INTERFACE_MODE_RGMII_RXID or PHY_INTERFACE_MODE_RGMII_ID mode.

    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Fix the phy-mode accordingly to fix the regression.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
2020-06-22 17:41:13 +02:00
Fabio Estevam
d8da22c5db mx6cuboxi: Convert to DM_ETH
Migration to DM_ETH is mandatory, so convert mx6cuboxi to Ethernet
Driver Model.

This also brings the benefit of restoring Ethernet functionality.

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Tom Rini <trini@konsulko.com>
2020-06-22 17:41:06 +02:00
Fabio Estevam
db86e6c66a ARM: dts: imx6qdl-sr-som: Sync with kernel 5.8-rc1
Sync the device tree with 5.8-rc1.

It basically contains the following extra kernel commit:

commit 86b08bd5b99480b79a25343f24c1b8c4ddcb5c09
Author: Russell King <rmk+kernel@armlinux.org.uk>
Date:   Wed Apr 15 16:44:17 2020 +0100

    ARM: dts: imx6-sr-som: add ethernet PHY configuration

    Add ethernet PHY configuration ahead of removing the quirk that
    configures the clocking mode for the PHY.  The RGMII delay is
    already set correctly.

    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Reviewed-by: Fabio Estevam <festevam@gmail.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>

, which passes the 'qca,clk-out-frequency' property and it is important
to specify the correct frequency generated by the AR8035.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Tom Rini <trini@konsulko.com>
2020-06-22 17:40:56 +02:00
Fabio Estevam
89b5bd54c1 net: fec: Allow the PHY node to be retrieved
As we move towards driver model, it is required to let the FEC driver
know how to properly deal with an Ethernet PHY subnode in the device tree.

For example:

 &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
	phy-handle = <&phy>;
 	phy-mode = "rgmii-id";
 	phy-reset-duration = <2>;
 	phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
 	status = "okay";

	mdio {
		#address-cells = <1>;
		#size-cells = <0>;

		phy: ethernet-phy@0 {
			reg = <0>;
			qca,clk-out-frequency = <125000000>;
		};
	};
 };

Currently the PHY node pointer is incorrectly associated with the
Ethernel controller instead of the PHY node itself.

This causes the PHY properties, such as "qca,clk-out-frequency" in
the example above to not get parsed.

Fix this problem by populating the phy_of_node node.

Suggested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Tom Rini <trini@konsulko.com>
2020-06-22 17:40:49 +02:00
Fabio Estevam
338d9b032a phy: atheros: ar8035: Fix clock output calculation
The clock ouput frequency is calculated incorrectly for AR8035 due to
wrong masking of priv->clk_25m_reg and priv->clk_25m_mask.

This same issue has been already fixed in the kernel by:

commit b1f4c209d84057b6d40b939b6e4404854271d797
Author: Oleksij Rempel <o.rempel@pengutronix.de>
Date:   Wed Apr 1 11:57:32 2020 +0200

    net: phy: at803x: fix clock sink configuration on ATH8030 and ATH8035

    The masks in priv->clk_25m_reg and priv->clk_25m_mask are one-bits-set
    for the values that comprise the fields, not zero-bits-set.

    This patch fixes the clock frequency configuration for ATH8030 and
    ATH8035 Atheros PHYs by removing the erroneous "~".

    To reproduce this bug, configure the PHY  with the device tree binding
    "qca,clk-out-frequency" and remove the machine specific PHY fixups.

    Fixes: 2f664823a47021 ("net: phy: at803x: add device tree binding")
    Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Reported-by: Russell King <rmk+kernel@armlinux.org.uk>
    Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
    Tested-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>

Apply the same fix in the U-Boot driver.

Tested on a i.MX6 Hummingboard.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Tested-by: Tom Rini <trini@konsulko.com>
2020-06-22 17:40:41 +02:00
Tom Rini
f5a8214593 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sh 2020-06-20 18:51:50 -04:00
Tom Rini
2b8692bac1 Pull request for UEFI sub-system for efi-2020-07-rc5 (2)
Fix memory reservations: do not use random bytes from the stack.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl7s/CIACgkQxIHbvCwF
 GsQkGQ/+KU1BZ4ul3LJhOFI9Un6JyEaooKo1YzvwW4ae81FQbw74C+xDNCPDAa0n
 ovsGIBegjZWERb2q9NPIxfX1SWy2tspjENvIC5odXyhuTvyyYUttXlOrOSOrJUbv
 w0uJbqkO6ZhsPVc7i1Xqw7aKd0Mvzt/i/v1nRFnuaNjwFIW/eKrEsQpoze1EVbQv
 WHKVa+k/gLI3LtcbJLY1cF0bchHmLLu1GalaxpZCviUz2jw88vit2ovH6Ng842gW
 uJorr9bF1jYSpD8UA6fYqrFm956gys/5NCKEncbJbO729i34BcqYzlVoe+vOdKrF
 xcYCa+ZZwHPSsuaAmE3+vjX9dmtrzWWLljAyL9X4werB9zPuQMIPjKXjDbPuh5aL
 MODXCI1llDaA7ZVSLZULZPqgtLBCbsNKBtRGmeiclS9kuK1FVgHcwkmJuBbMvU1W
 8Spf/DS8OABzrDMyfIAmB2RAbpxUSKHC4TJHlW2zu7u0tUd81igMM1JsnL2CiIh8
 3yZHAiFTm2QL6sO46KixbzNnueq3G3QRx4pE55Dr3Elgn0rsKrTURhqNL0csORkX
 Pg0Xg7wxRx7bgYuUmAYeEsP4F+0SeZFJgMGcPh5bPtCXhhMCT+GEOw8mze/gG6PA
 tMnhFuKKcp9wAkxZtm2I3OJZDBrZ3js2iaYaV1M6Mlpdxc7mRwE=
 =j2MV
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-07-rc5-2' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-07-rc5 (2)

Fix memory reservations: do not use random bytes from the stack.
2020-06-19 14:22:23 -04:00
Tom Rini
1e389a434a - fix SD card cart detect on DHCOM and ST boards
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEE56Yx6b9SnloYCWtD4rK92eCqk3UFAl7srSQACgkQ4rK92eCq
 k3XpwQf9HMLY4XImTMrRnvlnEBLVqb2CoA5vNqebnOcwLiIKqmkvT+5lGoQPxbjk
 9pwAJ+Em8KqqyPWbzW6IRzd2oR2bKBmEjvUBqLLP8MhPOqY5xhMfKmzDw6n7/mrF
 iiZ28itft3n47qUBakBf/hoGyX82gBebnIXL1Au19plqgYHqV5hAJjlZWkCWk8Ku
 ZsSvk/LBmvufgyp+uQS/OI46O1Q26sjuopumtYn5cz+wHv3VwwGCjBQ1tqAGlpwJ
 ggqbCeEM7xIKU9ZOGdI5HYSUKJR6HGgK3w7x4Qe3yl2xEQ4qQIJGq2rZufqvJbIg
 vmN+NNmjIO5dxO+YolPcRwBtK4fiqg==
 =Auvp
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20200619' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- fix SD card cart detect on DHCOM and ST boards
2020-06-19 12:41:24 -04:00
Tom Rini
d0cc022820 Merge https://gitlab.denx.de/u-boot/custodians/u-boot-tegra 2020-06-19 12:41:05 -04:00
Patrick Delaunay
792919241b ARM: dts: stm32: Reinstate card detect behavior on ST boards
The cd-gpios with (GPIO_ACTIVE_LOW | GPIO_PULL_UP) gpio is thus far
unsupported, reinstate the old cd-gpios behavior until this handling
is fully implemented. This avoid potential issue for SDCard boot:
the card detect fails with floating gpio.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-06-19 14:18:36 +02:00
Marek Vasut
3c2e2a1a79 ARM: dts: stm32: Reinstate card detect behavior on DHSOM
The cd-gpios with (GPIO_ACTIVE_LOW | GPIO_PULL_UP) gpio is thus far
unsupported, reinstate the old cd-gpios behavior until this handling
is fully implemented. This permits the DHSOM to boot from SD again,
without this patch the card detect fails.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Cc: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-06-19 09:43:59 +02:00
Atish Patra
0d7c2913fd cmd: bootefi: Honor the address & size cells properties correctly
fdtdec_get_addr_size reads the uses a fixed value for address & size
cell properties which may not be correct always.

Use the auto variant of the function which automatically reads
 #address-cells & #size-cells from parent and uses to read the "reg"
property.

Signed-off-by: Atish Patra <atish.patra@wdc.com>

On 32 bit systems fdt_addr_t may be 4 bytes long but size is defined as
u64. Avoid filling the upper 4 bytes of the sizep parameter of
fdtdec_get_addr_size_auto_parent() with random bytes from the stack by
defining a separate variable fdt_size.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-06-19 09:00:38 +02:00
Tom Warren
7b4f42b6cd t210: Nano: Add NVME support
This allows Nano to use the key M.2 on the CVB to connect and use a M.2
NVMe SSD stick. Works on my Nano B00, WD SN750 NVMe SSD shows up
w/'nvme' commands. Will add booting from NVMe via distro cmds in a future
patch.

Signed-off-by: Tom Warren <twarren@nvidia.com>
2020-06-18 15:12:34 -07:00
Tom Rini
5c3cd8e2e1 - fix stdout in default environment for apalis_imx6, colibri_imx6
and cm_fx6 boards
 -----BEGIN PGP SIGNATURE-----
 
 iGwEABECACwWIQSC4hxrSoIUVfFO0kRM6ATMmsalXAUCXuvX2Q4cYWd1c3RAZGVu
 eC5kZQAKCRBM6ATMmsalXKQ9AJ4tL6uvQ0owuKlt5lkf3us6Dp7xwACfSJQrpmvj
 fv4v4CCCv44oBkqwHtc=
 =k6d2
 -----END PGP SIGNATURE-----

Merge tag 'fixes-for-v2020.07-rc4' of https://gitlab.denx.de/u-boot/custodians/u-boot-video

- fix stdout in default environment for apalis_imx6, colibri_imx6
  and cm_fx6 boards
2020-06-18 18:00:05 -04:00
Igor Opaniuk
c46443dd85 colibri_t20: change maintainer
Take over maintainership for Colibri T20 module.

Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Acked-by: Lucas Stach <dev@lynxeye.de>
2020-06-18 13:15:02 -07:00
Jon Hunter
1ec7453384 ARM: tegra: Enable PSCI support for Tegra210 and Tegra186
The PSCI nodes are currently not populated for the Tegra210 and Tegra186
devices. This prevents the PSCI driver from being able to identify the
PSCI method used by these devices and causes the probe of the PSCI
driver to fail.

Since commit 81ea00838c ("efi_loader: PSCI reset and shutdown") was
added, which moves the PSCI EFI system reset handler into the PSCI
driver, this has prevented the EFI system reset from working for
Tegra210 and Tegra186. Therefore, populating these nodes is necessary
to fix the EFI system reset for Tegra210 and Tegra186.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
2020-06-18 13:14:50 -07:00
Jon Hunter
fb264efbd2 firmware: PSCI: Fix PSCI support for OF live trees
When CONFIG_OF_LIVE is enabled, dev_of_offset() cannot be used and
if used returns an invalid offset. This causes the call to
fdt_stringlist_get() in the psci_probe() to fail to read the 'method'
property from the PSCI node for the device and hence prevents PSCI
from working. Fix this by using the ofnode_read_string() API instead
of the fdt_stringlist_get() because this will handle reading the
property both when CONFIG_OF_LIVE is enabled or disabled.

Due to the above problem and since commit 81ea00838c ("efi_loader:
PSCI reset and shutdown") was added, the EFI system reset has been
broken for Tegra210 and Tegra196 platforms. This also fixes the EFI
system reset for these Tegra platforms.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
2020-06-18 13:14:50 -07:00
Tom Rini
717e779f6e Azure/GitLab: Move to latest Docker image
- Add guestfstools, efitools
- Latest Ubuntu/bionic snapshot

Signed-off-by: Tom Rini <trini@konsulko.com>
2020-06-18 13:51:39 -04:00
Marek Vasut
10fa7ec9f6 ARM: rmobile: Increase PHY auto-negotiation timeout to 20s
The ethernet PHY on all known Gen3 boards takes a while to come out
of reset, increase the auto-negotiation timeout to prevent it from
timing out in case the ethernet is used right after the board was
reset.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2020-06-18 19:35:03 +02:00
Anatolij Gustschin
1099b2abef colibri_imx6: fix video stdout in default environment
After migration to DM 'vga' name is not longer supported,
change it to 'vidconsole' in the default environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-06-18 19:17:28 +02:00
Anatolij Gustschin
d8c37c6309 apalis_imx6: fix video stdout in default environment
After migration to DM 'vga' name is not longer supported,
change it to 'vidconsole' in the default environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Igor Opaniuk <igor.opaniuk@toradex.com>
2020-06-18 19:16:10 +02:00
Anatolij Gustschin
f94e54811a cm_fx6: fix video stdout in default environment
After migration to DM 'vga' name is not longer supported,
change it to 'vidconsole' in the default environment.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Nikita Kiryanov <nikita@compulab.co.il>
2020-06-18 19:14:36 +02:00
Tom Rini
0b3a92dfa3 - move amlogic board documentation into doc/board in RsT format
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAl7rJPIACgkQd9zb2sjI
 SdFq7hAAnJ2OzE4hFQgjMtSreN36hGKfmuvnKz6CMi1JED8avKQSbTWNJ0Lzxtrg
 Y0nMKAXL4X5Gny/0VpPPNla+XjxstIB7iLI9m3WfIHddxEffZO2uUjRdeGcCRa97
 iXUkSgm+rwI23iReUeOUZBuh8xEMP67cvMcmdTCDsaM2OOFocCuOXJ3qkr4yNdqq
 2BLDX0/d0f7wSYciWZRzU8pO8M0xbWqhd8VwvksoGmUezlS2HDDyDV1KpD1N6GEM
 NM25n9FM+ea3H2uPlD4D8I7PbSjypeMGpHIkqoaZy28cye1gSKfxR1ewKPQNDoZm
 OtwpsQpreZTZduIcz2NkhcUDE3Rm4d2A8vqGApsQF9TJLFgMVuhKlb12xibafBXi
 AxoTPvDRLJz0xBl9zG6QXXokZWM/HMFa3bc5qbPBKfGg4O9GdsWFTroHbUpjCCcR
 irFlfIr8y+H1dJDe0cj5tlci/Mt+9aNg66nO1NW5r2YHOKxmkmf4emhBWkZ15ez7
 v8W+4987M+bG1IvJ80ul4q5zcj9Fe6mzeJl8WWX4EIN4Aj2e/I99oAUSMQuWKCy0
 r6kG/Bz4GB4ISoxb1NP9gUyCYwZKJ6lOnBuxbwdsn7pTmR+DmFI6ivGH7OraWOS7
 YK5QREMsy+GP9+Yrj87a29fKUJfyv2QmHRkxADmaAKJXPwNdju4=
 =L/H/
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-amlogic-20200618' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic

- move amlogic board documentation into doc/board in RsT format
2020-06-18 09:46:55 -04:00
Neil Armstrong
9c55f5d112 board: amlogic: add board doc files to MAINTAINERS
Add the recently added reStructuredText board documentation in the
appropriate MAINTAINERS files.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-06-18 10:24:13 +02:00
Neil Armstrong
0ce3639d6f board: amlogic: move boards doc into doc/board/amlogic
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-18 10:24:13 +02:00
Tom Rini
9cb895203a - fix boot with OP-TEE for stm32mp15 boards
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEE56Yx6b9SnloYCWtD4rK92eCqk3UFAl7ojsoACgkQ4rK92eCq
 k3UANwf+IvP4rgSW5U4WoEivnhGMmySfg7IBaZJQvd7gqp5/8bhZnkTDDAm6u/JH
 xKFe6H4lZNhMFn+ojRx+BSlFlBe5+WTlIxptPpp0aHSEIV7/lIN8+KgufHjnurqb
 C0aXQ4sw/ahbpAlspxvyoXrMvy4GI3/OxCBZSYteS/niLGdSE7Y6fhKBDivEk3dd
 Jp6ylEU4+321a31wvgzotJdZicA+Blf2IPSI2dnLlaSBVoF3wmHCoBv7sxos+HfO
 qO06vTrwHVXjjFeJA2djMeWNwMft9QrpyyLHAnGrWb1BwqnkN4jwEQgmOjuER7XK
 b6mzXIPETya9r42zqsLwc1OTB8+XCA==
 =gjIr
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-stm32-20200616' of https://gitlab.denx.de/u-boot/custodians/u-boot-stm

- fix boot with OP-TEE for stm32mp15 boards
2020-06-16 09:18:56 -04:00
Etienne Carriere
9e69696506 dts: ARM: stm32mp15: add OP-TEE node in u-boot DTSI
Add OP-TEE firmware node in stm32mp15 U-Boot DTSI. This node is
needed since commit [1] that changed U-Boot/stm32mp15 to detect
OP-TEE availability by probing the resource instead of relying on
U-Boot configuration. The software sequence implemented by [1] is
fine but U-Boot DTS/DTSI files were not updated accordingly since,
hence OP-TEE presence is never detected by U-Boot, preventing Linux
kernel from using OP-TEE resources.

For consistency and to synchronize stm32mp15 DTSI files (excluding
U-Boot specific DTSI files) with the Linux kernel ones, this change
also moves the OP-TEE reserved memory nodes from board generic DTSI
files to U-Boot specific board DTSI files.

Link: [1] commit 43df0a159d ("stm32mp1: dynamically detect op-tee presence")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-06-16 10:39:28 +02:00
Etienne Carriere
164873a0c0 board: stm32mp1: fix handling of DT OP-TEE reserved memory nodes
Fix the sequence in stm32mp1 fdt.c that disables OP-TEE resources
defined in FDT when U-boot detects OP-TEE firmware is not present.

Before this change, helper function stm32_fdt_disable_optee()
set property status to "disabled" for the OP-TEE reserved memory
nodes but this has no impact since Linux kernel does not consider
the status property for reserved-memory subnodes. This change
make U-Boot to attempt to delete the node instead.

Fixes: 4a1b975dac ("board: stm32mp1: reserve memory for OP-TEE in device tree")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2020-06-16 10:38:09 +02:00
Tom Rini
c622afb087 Pull request for UEFI sub-system for efi-2020-07-rc5
Use correct printf code in efi_image_parse().
 Add random number generation to HTML documentation.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAl7ny9YACgkQxIHbvCwF
 GsRTAg//bG9ixJ/ryzkPNhgedyHnJnZ1fBOVQphaJAnQDjLKhxTMsebIaBDpxkGg
 yCa0RAo7Y91PeYz/2WavH1BKX4SjSXEDIyIw8cvhCwQ5hmlBEQHiw6WIUCGW2p33
 iQO9XdTR8U1IqRENJk6ZtGP6hKH9V8LNY9taBt1lkk45aS8tDVPVivVn+1Z+JFbg
 sY0VTaWmCFWOH+aeJprWYR7tjO6TI5KG82SNe3tu3vmfRzFN5X/2E4IOmcHL00Yy
 oVGALNBEQ22TZgz7/uQTn4xH3X3a+HDW7RyHnOQUkmqxCUqfTvp54tLLVhNTTsIj
 ccvS2TGaI9bKQVIzBQbOWaJRgYrlzDvlCvUwxgqg3iAWx0bzXeB0Nz8cNWTj0HOP
 gNpCJeODp3XlGD4PKx6GKg9R6JMmtzcJYudPLhoy1jjwZxLALGv+Y2DRP7fzeLpA
 wW6Slg8t3HEMF8JYbqYVa/V0CqB9MNX7nfHBdBu/SoMoOqzMA8TQk3Aen4jTWU1x
 wYSxh7sh1KT21/cpoVRTyD+5Ao8Ti6zeDbdCcbAQTr9w210ts/wRyCWXjPbe/WCM
 MWiEzuL2o6NfQdzUs1TyNs+8GohNI8X/PzFPok9+5gsbrKqKAbmWB2CQ74ufjt6k
 Qg3wHBVOvYFqIvoEFoyWus6Ni4LEycrQ0kuYsHQhnNoZlUXj6wE=
 =yON/
 -----END PGP SIGNATURE-----

Merge tag 'efi-2020-07-rc5' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi

Pull request for UEFI sub-system for efi-2020-07-rc5

Use correct printf code in efi_image_parse().
Add random number generation to HTML documentation.
2020-06-15 16:44:58 -04:00
Mark Kettenis
e88d6979d1 regulator: fix: enable gpio when requested
The fix in commit b7adcdd073 has the side-effect that the regulator
will be disabled when requesting the relevant gpio in
regulator_common_ofdata_to_platdata() and enabled in
regulator_pre_probe() when the regulator was already enabled.
This leads to a short interruption in the 3.3V power to the PCIe
slot on the firefly-rk3399 which makes an ADATA SX8000NP NVMe SSD
unhappy.

Fix this by setting the GPIOD_IS_OUT_ACTIVE flag again when the
'regulator-boot-on' property is set, but check for this property
explicitly instead of relying on the "boot_on" member of
the uclass platdata.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Tested-by: Patrice Chotard <patrice.chotard@st.com>
2020-06-15 16:37:01 -04:00
Tom Rini
287be3294a Merge branch '2020-06-15-misc-bugfixes'
- Assorted bug fixes
2020-06-15 11:24:42 -04:00
Patrick Delaunay
35c2683f46 env: Kconfig: cosmetics: update comment for SYS_RELOC_GD_ENV_ADDR
Update the comment for SYS_RELOC_GD_ENV_ADDR as gd->env_addr is updated
in board_r.c::initr_reloc_global_data() under the compilation flags
CONFIG_SYS_RELOC_GD_ENV_ADDR

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2020-06-15 11:24:36 -04:00
Heinrich Schuchardt
5b60326b6e config: qemu: increase SYS_MALLOC_F_LEN
Several configutation options require additional memory before relocation:

* CONSOLE_RECORD
* LOG
* RSA

The current default of 0x400 is too small to encompass them all. Increase
the value of SYS_MALLOC_F_LEN to 0x2000 for ARCH_QEMU.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-06-15 11:24:36 -04:00
Sean Anderson
1fae74125b Revert "lib: Improve _parse_integer_fixup_radix base 16 detection"
This reverts commit 0486497e2b.

The strtoul has well-defined semantics. It is defined by the C standard and
POSIX. To quote the relevant section of the man pages,

> If base is zero or 16, the string may then include a "0x" prefix, and the
> number will be read in base 16; otherwise, a zero base is taken as 10
> (decimal) unless the next character is '0', in which case it is taken as
> 8 (octal).

Keeping these semantics is important for several reasons. First, it is very
surprising for standard library functions to behave differently than usual.
Every other implementation of strtoul has different semantics than the
implementation in U-Boot at the moment. Second, it can result in very
surprising results from small changes. For example, changing the string
"1f" to "20" causes the parsed value to *decrease*. Forcing use of the "0x"
prefix to specify hexidecimal numbers is a feature, not a bug. Lastly, this
is slightly less performant, since the entire number is parsed twice.

This fixes the str_simple_strtoul test failing with

test/str_ut.c:29, run_strtoul(): expect_val == val: Expected 0x44b (1099), got 0x1099ab (1087915)
test/str_ut.c:46, str_simple_strtoul(): 0 == run_strtoul(uts, str2, 0, 1099, 4): Expected 0x0 (0), got 0x1 (1)

Signed-off-by: Sean Anderson <seanga2@gmail.com>
CC: Michal Simek <michal.simek@xilinx.com>
CC: Shiril Tichkule <shirilt@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2020-06-15 11:23:41 -04:00
Michal Simek
a633a804a2 trivial: Fix booot occurences
s/booot/boot/g

The first ase is booot instead of boot and second u-booot instead of
u-boot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-06-15 11:23:41 -04:00
Etienne Carriere
05f0c74606 optee: fix copy of optee reserved-memory node
Fix the loop that parses FDT for a reserved memory node named "optee".

Before this change, if at least one subnode was found in the
reserved-memory node, the function endlessly looped since instruction
continue returned back in the loop without updating variable subnode.
This change fixes the issue by using a for loop.

Fixes: 6ccb05eae0 ("image: fdt: copy possible optee nodes to a loaded devicetree")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-06-15 11:23:40 -04:00
Tom Rini
bb1ff1371e Merge tag 'mmc-2020-6-15' of https://gitlab.denx.de/u-boot/custodians/u-boot-mmc
- fsl_esdhc sdr104 and hs200 fix and error path fix
- fsl_esdhc workaround 3.3v io issue
- ca_dw_mmc cleanup
- presidio-asic emmc DT update.
2020-06-15 10:20:35 -04:00
Marek Vasut
50a17a69be mmc: fsl_esdhc: Gracefully fail on unsupported voltage switch
Unsupported voltage on voltage switch is not an error, do not
print error message in such a case. This happens e.g. if the
eMMC is already in 1V8 mode or when testing 1V2 mode operation
on systems which only do 3V3/1V8 switching.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-06-15 09:45:22 +08:00
Marek Vasut
406df85345 mmc: fsl_esdhc: Fix SDR104 and HS200 support
The 3V3/1V8 switching could never have worked on any of the iMXes
ever since 51313b49f2 ("mmc: fsl_esdhc: support SDR104 and HS200"),
because that commit uses priv->vqmmc_dev when switching voltages on
mode switch, while local vqmmc_dev in probe to store the regulator
pointer. Those are two different variables with the same name. So
the priv->vqmmc_dev was always NULL and thus voltage switch between
modes never really suceeded.

Fix this by assigning priv->vqmmc_dev with value of the vqmmc_dev
in probe.

Fixes: 51313b49f2 ("mmc: fsl_esdhc: support SDR104 and HS200")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2020-06-15 09:45:22 +08:00