]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
2 years agoxilinx: Fix logic when dfu_alt_info is generated
Michal Simek [Tue, 9 Aug 2022 14:32:52 +0000 (16:32 +0200)]
xilinx: Fix logic when dfu_alt_info is generated

Generate dfu_alt_info only when it is not defined.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/464e4b325c644e52a660df9cf44eeb4d80427f6a.1660055571.git.michal.simek@amd.com
2 years agoxilinx: zynq: Enable mkeficapsule tools compilation
Michal Simek [Tue, 9 Aug 2022 14:32:51 +0000 (16:32 +0200)]
xilinx: zynq: Enable mkeficapsule tools compilation

Zynq can use efi capsule infrastructure that's why enable it by default.
For capsule generation for zynq you can use:

pushd spl
../tools/mkeficapsule -g "1ba29a15-9969-40aa-b424-e86121618664" boot.bin \
--index 1 ../capsule1.bin
popd
./tools/mkeficapsule -g "1a5178f0-87d3-4f36-ac63-3b31a23be305" u-boot.img \
--index 2 capsule2.bin

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/a8194ecfa7932f2d8ada5ee508b2a026c782f15e.1660055571.git.michal.simek@amd.com
2 years agoxilinx: versal: Define CONFIG_CQSPI_REF_CLK
Ashok Reddy Soma [Fri, 5 Aug 2022 09:19:58 +0000 (11:19 +0200)]
xilinx: versal: Define CONFIG_CQSPI_REF_CLK

With commit 55b3ba4c2ba4 ("spi: cadence_qspi: Migrate CONFIG_CQSPI_REF_CLK
to Kconfig") CONFIG_CQSPI_REF_CLK is moved to Kconfig.

The static value via Kconfig is a fallback option in case of clock
framework is not enabled or fails for some reason.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/fe7c38a19e878c307d5b75311bbfd8cf6c1f601e.1659691195.git.michal.simek@amd.com
2 years agoxilinx: versal: Enable power domain driver
Ashok Reddy Soma [Fri, 5 Aug 2022 09:19:57 +0000 (11:19 +0200)]
xilinx: versal: Enable power domain driver

Enable power domain driver to request node for all the IP's that are
enabled in DT.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/dbed54df622d647b8d520d8ce5289cd69ba66e0b.1659691195.git.michal.simek@amd.com
2 years agofirmware: zynqmp: Skip loading config object for Versal
Ashok Reddy Soma [Fri, 5 Aug 2022 09:19:56 +0000 (11:19 +0200)]
firmware: zynqmp: Skip loading config object for Versal

SET_CONFIGURATION is not yet implemented for Versal platforms. Skip
loading config object for Versal until support is added.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/eb7ef6c6de36a1f7d056de43042f96fe3639f18e.1659691195.git.michal.simek@amd.com
2 years agoxilinx: zynq: Disable LMB for mini configurations
Michal Simek [Tue, 6 Sep 2022 10:41:10 +0000 (12:41 +0200)]
xilinx: zynq: Disable LMB for mini configurations

There shouldn't be a reason to have LMB on for these configurations.
LMB was already disabled for ZynqMP by commit 0063487a5b60 ("configs:
zynqmp: Disable LMB for mini u-boot").

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/07d95f619a15672d1a234eddcfbb54c0ab382eaa.1662460867.git.michal.simek@amd.com
2 years agoxilinx: zynqmp: Disable LMB for mini u-boot
Ashok Reddy Soma [Fri, 5 Aug 2022 09:19:55 +0000 (11:19 +0200)]
xilinx: zynqmp: Disable LMB for mini u-boot

LMB is not required for mini u-boot which runs out of on chip memory.
Disable CONFIG_LMB from mini u-boot defconfig's.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/45fad28825f0f236ad45e700aca1f39afbb22236.1659691195.git.michal.simek@amd.com
2 years agocmd: bdinfo: Enable dumping lmb data when LMB is enabled
Michal Simek [Wed, 7 Sep 2022 07:52:09 +0000 (09:52 +0200)]
cmd: bdinfo: Enable dumping lmb data when LMB is enabled

The commit 9996cea75f5a ("lmb/bdinfo: dump lmb info via bdinfo") added
support for dumping LMB information as the part of bdinfo. But code itself
should be called only when LMB is enabled.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://lore.kernel.org/r/3e40c8bb77550dfca9f7eb48fe644a018d971411.1662537127.git.michal.simek@amd.com
2 years agoxilinx: zynqmp: Disable various configs for mini U-Boot
Ashok Reddy Soma [Fri, 5 Aug 2022 09:19:54 +0000 (11:19 +0200)]
xilinx: zynqmp: Disable various configs for mini U-Boot

With 2022.01-rc3 upgrade, the size of the mini U-Boot increased and is
not able to fit in OCM. Hence disable unnecessary configs and make room.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/306b57818601fa3571bc75c4182f25aaa3f2a793.1659691195.git.michal.simek@amd.com
2 years agoxilinx: versal: Enable i2c mux uclass with pca954x driver
Michal Simek [Fri, 5 Aug 2022 09:19:53 +0000 (11:19 +0200)]
xilinx: versal: Enable i2c mux uclass with pca954x driver

Xilinx is using pca954x i2c muxes on a lot of boards that's why enable this
driver by default.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c090aea3436c7a4ebe698da6cbc70e70a14baae3.1659691195.git.michal.simek@amd.com
2 years agoxilinx: zynqmp: Fix AES with a user provided key
Janne Ylalehto [Tue, 16 Aug 2022 12:45:25 +0000 (15:45 +0300)]
xilinx: zynqmp: Fix AES with a user provided key

The user provided key address was not flushed in struct aes because of
the flushing location in the function.

Signed-off-by: Janne Ylalehto <ylalehto@gmail.com>
Link: https://lore.kernel.org/r/20220816124525.19671-1-ylalehto@gmail.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agofpga: zynq: Remove post config info message for SPL
Stefan Herbrechtsmeier [Mon, 8 Aug 2022 14:53:31 +0000 (16:53 +0200)]
fpga: zynq: Remove post config info message for SPL

The drivers informs the user that a post config was not run after FPGA
configuration. This message is unnecessary in SPL because the
ps7_post_config function is called via spl_board_prepare_for_boot
function before jump_to_image_no_args function from board_init_r
function.

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Link: https://lore.kernel.org/r/20220808145331.24723-1-stefan.herbrechtsmeier-oss@weidmueller.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agozynq: Convert arm twd timer to DM driver
Stefan Herbrechtsmeier [Fri, 5 Aug 2022 06:16:28 +0000 (08:16 +0200)]
zynq: Convert arm twd timer to DM driver

Move arm twd timer driver from zynq to generic location.

DM timer drivers are designed differently to original driver. Timer is
counting up and not down.
Information about clock rates are find out in timer_pre_probe() that's
why there is no need to get any additional information from DT in the
driver itself (only register offset).

Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Link: https://lore.kernel.org/r/20220805061629.1207-1-stefan.herbrechtsmeier-oss@weidmueller.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2 years agoMerge branch '2022-09-02-assorted-improvements' into next
Tom Rini [Sat, 3 Sep 2022 01:51:21 +0000 (21:51 -0400)]
Merge branch '2022-09-02-assorted-improvements' into next

- DM RTC improvements that should help in CI, allow disabling LTO from
  the make line, add extension (cape, etc) support to distro bootcmd,
  add a pause command and re-enable ARM v4T support.

2 years agodm: rtc: Try to handle the localtime() race
Simon Glass [Mon, 1 Aug 2022 13:58:48 +0000 (07:58 -0600)]
dm: rtc: Try to handle the localtime() race

At present the sandbox timer uses localtime() which can jump around twice
a year when daylight-saving time changes.

It would be tricky to make use of gmtime() since we still need to present
the time in local time, as seems to be required by U-Boot's RTC interface.

The problem can only happen once, so use a loop to detect it and try
again. This should be sufficient to detect either a change in the 'second'
value, or a daylight-saving change. We can assume that the latter also
incorporates a 'second' change, so there is no need to loop more than
twice.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agodm: rtc: Try to avoid a race in rtc_set_get test
Simon Glass [Mon, 1 Aug 2022 13:58:47 +0000 (07:58 -0600)]
dm: rtc: Try to avoid a race in rtc_set_get test

It seems that the time can change in between getting it and reading the
offset. Check for this and try again if this happens.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agodm: rtc: Avoid a race in the rtc_reset test
Simon Glass [Mon, 1 Aug 2022 13:58:46 +0000 (07:58 -0600)]
dm: rtc: Avoid a race in the rtc_reset test

Since resetting the RTC on sandbox causes it to read the base time from
the system, we cannot rely on this being unchanged since it was last read.
Allow for a one-second delay.

Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Fixes: https://source.denx.de/u-boot/u-boot/-/issues/4
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Reported-by: Tom Rini <trini@konsulko.com>
Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agotest: Allow running tests multiple times
Simon Glass [Mon, 1 Aug 2022 13:58:45 +0000 (07:58 -0600)]
test: Allow running tests multiple times

Some tests can have race conditions which are hard to detect on a single
one. Add a way to run tests more than once, to help with this.

Each individual test is run the requested number of times before moving
to the next test. If any runs failed, a message is shown.

This is most useful when running a single test, since running all tests
multiple times can take a while.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agodm: rtc: Make use of ut_assertnonnull()
Simon Glass [Mon, 1 Aug 2022 13:58:44 +0000 (07:58 -0600)]
dm: rtc: Make use of ut_assertnonnull()

Use this (newish) macro since it is designed for the purpose of making
sure things are non-NULL.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoci: Add a test for a non-LTO build
Simon Glass [Wed, 3 Aug 2022 18:13:09 +0000 (12:13 -0600)]
ci: Add a test for a non-LTO build

Check that sandbox builds and runs tests OK with LTO disabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoMakefile: Allow LTO to be disabled for a build
Simon Glass [Wed, 3 Aug 2022 18:13:08 +0000 (12:13 -0600)]
Makefile: Allow LTO to be disabled for a build

LTO (Link-Time Optimisation) is an very useful feature which can
significantly reduce the size of U-Boot binaries. So far it has been
made available for selected ARM boards and sandbox.

However, incremental builds are much slower when LTO is used. For example,
an incremental build of sandbox takes 2.1 seconds on my machine, but 6.7
seconds with LTO enabled.

Add a NO_LTO parameter to the build, similar to NO_SDL, so it can be
disabled during development if needed, for faster builds.

Add some documentation about LTO while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
2 years agoarm: ARMv4 assembly compatibility
Sergei Antonov [Sun, 21 Aug 2022 13:34:20 +0000 (16:34 +0300)]
arm: ARMv4 assembly compatibility

There is currently a problem that U-Boot can not work on ARMv4
because assembly imlementations of memcpy() and some other functions
use "bx lr" instruction that is not available on ARMv4 ("mov pc, lr"
should be used instead).

A working preprocessor-based solution to this problem is found in
arch/arm/lib/relocate.S. Move it to the "ret" macro in
arch/arm/include/asm/assembler.h and change all "bx lr" code
to "ret lr" in functions that may run on ARMv4. Linux source code
deals with this problem in the same manner.

v1 -> v2:
Comment update. Pointed out by Andre Przywara.

Signed-off-by: Sergei Antonov <saproj@gmail.com>
CC: Samuel Holland <samuel@sholland.org>
CC: Ye Li <ye.li@nxp.com>
CC: Simon Glass <sjg@chromium.org>
CC: Andre Przywara <andre.przywara@arm.com>
CC: Marek Vasut <marex@denx.de>
CC: Sean Anderson <sean.anderson@seco.com>
CC: Tom Rini <trini@konsulko.com>
2 years agocmd: Add pause command
Samuel Dionne-Riel [Thu, 18 Aug 2022 19:44:04 +0000 (15:44 -0400)]
cmd: Add pause command

This command is being introduced with the goal of allowing user-friendly
"generic use case" U-Boot builds to pause until user input under some
situations.

The main use case would be when a boot failure happens, to pause until
the user has had time to acknowledge the current state.

Tested using:

    make && ./u-boot -v -T -c 'ut lib lib_test_hush_pause'

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Cc: Simon Glass <sjg@chromium.org>
2 years agodistro_bootcmd: Introduce support for extension command
Matwey V. Kornilov [Tue, 9 Aug 2022 15:54:07 +0000 (18:54 +0300)]
distro_bootcmd: Introduce support for extension command

Try to load required DTB overlays if the board supports extensions and
CONFIG_CMD_EXTENSION is enabled.

Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
2 years agoMerge branch '2022-09-01-assorted-Kconfig-migrations' into next
Tom Rini [Fri, 2 Sep 2022 12:59:15 +0000 (08:59 -0400)]
Merge branch '2022-09-01-assorted-Kconfig-migrations' into next

- Assorted Kconfig migrations

2 years agoARM: imx6: dh-imx6: Enable d-cache early in SPL
Marek Vasut [Wed, 17 Aug 2022 13:07:14 +0000 (15:07 +0200)]
ARM: imx6: dh-imx6: Enable d-cache early in SPL

Enable d-cache early in SPL right after DRAM is started up.
This reduces U-Boot proper load time by 650ms when loaded
from SPI NOR.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Philip Oberfichtner <pro@denx.de>
2 years agoARM: cache: Allow SPL to build cache-pl310.c
Philip Oberfichtner [Wed, 17 Aug 2022 13:07:13 +0000 (15:07 +0200)]
ARM: cache: Allow SPL to build cache-pl310.c

Introduce the new Kconfig symbol CONFIG_SPL_SYS_L2_PL310 to allow the
SPL to build cache-pl310.c.

Before this commit, the SPL could enable the PL310 L2 cache [1], but the
cache maintenance functions from cache-pl310.c were only useable for
non-SPL builds.

After enabling the cache one must be able to flush it, too. Thus this
commit allows cache-pl310.c to be included in the SPL build.

[1] See for example arch/arm/mach-imx/cache.c: v7_outer_cache_enable()

Signed-off-by: Philip Oberfichtner <pro@denx.de>
2 years agoConvert CONFIG_SYS_L2_PL310 to Kconfig
Philip Oberfichtner [Wed, 17 Aug 2022 13:07:12 +0000 (15:07 +0200)]
Convert CONFIG_SYS_L2_PL310 to Kconfig

This converts CONFIG_SYS_L2_PL310 to Kconfig.

For omap2 and mvebu the 'select SYS_L2_PL310' locations were
determined using ./tools/moveconfig -i CONFIG_SYS_L2_PL310.

For mx6 I manually chose ARCH_MX6 as 'select' location. The
correctness has been verified using

$ ./tools/moveconfig.py -f ARCH_MX6 ~SYS_L2_PL310 ~SYS_L2CACHE_OFF
0 matches

That means whenever an ARCH_MX6 board had SYS_L2_PL310 disabled, this
was correctly reflected in SYS_L2CACHE_OFF. Thus it's safe to insert
the 'select' statement under ARCH_MX6.

Signed-off-by: Philip Oberfichtner <pro@denx.de>
2 years agoRemove CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS et al
Tom Rini [Wed, 10 Aug 2022 14:29:28 +0000 (10:29 -0400)]
Remove CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS et al

This removes the following symbols:
   CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_BITS
   CONFIG_SYS_I2C_EEPROM_PAGE_WRITE_DELAY_MS
   CONFIG_SYS_I2C_LDI_ADDR
   CONFIG_SYS_I2C_DVI_ADDR
   CONFIG_SYS_I2C_DVI_BUS_NUM

They are unused by any code in tree at this time.

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoConvert CONFIG_SYS_I2C_EEPROM_CCID et al to Kconfig
Tom Rini [Wed, 10 Aug 2022 14:29:27 +0000 (10:29 -0400)]
Convert CONFIG_SYS_I2C_EEPROM_CCID et al to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_I2C_EEPROM_CCID
   CONFIG_SYS_I2C_EEPROM_NXID
   CONFIG_SYS_EEPROM_BUS_NUM

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-08-26-assorted-platform-updates' into next
Tom Rini [Fri, 26 Aug 2022 18:47:48 +0000 (14:47 -0400)]
Merge branch '2022-08-26-assorted-platform-updates' into next

- Assorted Arm, TI and Qualcomm platform updates

2 years agofirmware: ti_sci: Move ACK checking to ti_sci_do_xfer() function
Andrew Davis [Tue, 26 Jul 2022 01:25:06 +0000 (20:25 -0500)]
firmware: ti_sci: Move ACK checking to ti_sci_do_xfer() function

We can check if the message was acknowledged in the common
ti_sci_do_xfer() which lets us remove it from after each call to this
function. This simplifies the code and reduces binary size.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agofirmware: ti_sci: Remove inline keyword from functions
Andrew Davis [Tue, 26 Jul 2022 01:25:05 +0000 (20:25 -0500)]
firmware: ti_sci: Remove inline keyword from functions

The inline hint is not needed here, the compiler will do the right thing
based on if we are compiling for speed or for code size. In this case the
inline causes this function to be placed inside each callsite which is
not the right thing to do for either speed nor size. There is no
performance benefit to this due to the larger function size reducing
cache locality, but there is a huge size penalty. Remove inline keyword.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agofirmware: ti_sci: Factor out message alloc failed message
Andrew Davis [Tue, 26 Jul 2022 01:25:04 +0000 (20:25 -0500)]
firmware: ti_sci: Factor out message alloc failed message

We don't need to print the same message in every location, just
print it in the function that fails and remove all the extra
message printouts.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agofirmware: ti_sci: Reduce output on ti_sci_do_xfer error
Andrew Davis [Tue, 26 Jul 2022 01:25:03 +0000 (20:25 -0500)]
firmware: ti_sci: Reduce output on ti_sci_do_xfer error

This ti_sci_do_xfer() function already prints out the reason for the
failure, and the caller of each of these functions should also notify
the user of the failed task. Remove this extra level of error message.

Signed-off-by: Andrew Davis <afd@ti.com>
2 years agoarm: dts: qcom: Sync pinctrl DT nodes with Linux bindings
Sumit Garg [Wed, 27 Jul 2022 08:22:04 +0000 (13:52 +0530)]
arm: dts: qcom: Sync pinctrl DT nodes with Linux bindings

Currently for all Qcom SoCs/boards there are separate compatibles for
GPIO and pinctrl. But this is inconsistent with official (upstream) Linux
bindings which requires only a single compatible "qcom,<SoC name>-pinctrl"
and there is no such compatible property as "qcom,tlmm-<SoC name>".

So fix this inconsistency for Qcom SoCs in order to comply with upstream
DT bindings. This is done via removing compatibles from "msm_gpio" driver
and via binding to "msm_gpio" driver from pinctrl driver in case
"gpio-controller" property is specified for pinctrl node.

Suggested-by: Stephan Gerhold <stephan@gerhold.net>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agopinctrl: sdm845: Remove redundant CONFIG_SDM845 check
Sumit Garg [Wed, 27 Jul 2022 08:22:03 +0000 (13:52 +0530)]
pinctrl: sdm845: Remove redundant CONFIG_SDM845 check

DT compatible is sufficient to make platform specific differentiation,
so remove redundant CONFIG_SDM845 check.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2 years agoqcs404evb_defconfig: Enable USB configs
Sumit Garg [Thu, 4 Aug 2022 14:27:21 +0000 (19:57 +0530)]
qcs404evb_defconfig: Enable USB configs

Enable USB config options along with its dependencies like PHY, RESET,
PMIC GPIO etc. config options.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoboard: qcs404-evb: Enable USB3 specific PMIC GPIO
Sumit Garg [Thu, 4 Aug 2022 14:27:20 +0000 (19:57 +0530)]
board: qcs404-evb: Enable USB3 specific PMIC GPIO

For USB3 host controller to detect devices on the bus it is required to
enable a PMIC GPIO: usb_vbus_boost_pin. So enable that during board
specific initialization.

And since this PMIC GPIO parsing is quite u-boot specific, so add a
DT override to qcs404-evb-uboot.dtsi to represent usb_vbus_boost_pin.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agodts: qcs404-evb: Add PMIC GPIO controller node
Sumit Garg [Thu, 4 Aug 2022 14:27:19 +0000 (19:57 +0530)]
dts: qcs404-evb: Add PMIC GPIO controller node

PMIC GPIOs are special GPIOs which are accessible through SPMI bus. So
add corresponding DT nodes.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agogpio: qcom_pmic: Add support for GPIO LV/MV subtype
Sumit Garg [Thu, 4 Aug 2022 14:27:18 +0000 (19:57 +0530)]
gpio: qcom_pmic: Add support for GPIO LV/MV subtype

GPIO LV (low voltage)/MV (medium voltage) subtypes have different
features and register mappings than 4CH/8CH subtypes. Add support
for LV and MV subtypes.

With GPIO LV/MV subtype available, add "qcom,pms405-gpio" compatible
which requires support for GPIO MV subtype.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agopmic: Convert pm8916 driver to a generic Qcom PMIC driver
Sumit Garg [Thu, 4 Aug 2022 14:27:17 +0000 (19:57 +0530)]
pmic: Convert pm8916 driver to a generic Qcom PMIC driver

Since both pm8916.c and pm8916_gpio.c are already supporting multiple
Qcom SoCs, it makes sense to rename these drivers to pmic_qcom.c and
qcom_pmic_gpio.c respectively. Also, these driver can be extended to
support additional functionality if required for other Qcom SoCs.

Along with this import latest DT binding: qcom,spmi-pmic.txt from Linux
kernel and thereby remove pm8916.txt.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agodts: qcs404-evb: Add USB controller and PHY nodes
Sumit Garg [Thu, 4 Aug 2022 14:27:16 +0000 (19:57 +0530)]
dts: qcs404-evb: Add USB controller and PHY nodes

QCS404 SoC provides support for two USB controllers: one USB3 and the
other one being USB2. The USB3 controller supports further 2 PHY: one high
speed PHY and the other super speed PHY. The USB2 controller supports a
single high speed PHY. So add corresponding DT nodes.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoclocks: qcs404: Add support for USB clocks
Sumit Garg [Thu, 4 Aug 2022 14:27:15 +0000 (19:57 +0530)]
clocks: qcs404: Add support for USB clocks

Add support for USB controller and PHY clocks for QCS404 SoC.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoclocks: qcom: Add clock enable callback support
Sumit Garg [Thu, 4 Aug 2022 14:27:14 +0000 (19:57 +0530)]
clocks: qcom: Add clock enable callback support

Drivers like USB, ethernet etc. uses ".enable" hook to enable clocks.
So add corresponding support for Qcom clock drivers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agodts: qcs404-evb: Add reset controller node
Sumit Garg [Thu, 4 Aug 2022 14:27:13 +0000 (19:57 +0530)]
dts: qcs404-evb: Add reset controller node

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoreset: qcom: Add support for QCS404 SoC reset table
Sumit Garg [Thu, 4 Aug 2022 14:27:12 +0000 (19:57 +0530)]
reset: qcom: Add support for QCS404 SoC reset table

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoreset: Convert ipq4019 driver to a generic Qcom driver
Sumit Garg [Thu, 4 Aug 2022 14:27:11 +0000 (19:57 +0530)]
reset: Convert ipq4019 driver to a generic Qcom driver

Since the base functionality remains the same for a reset driver on Qcom
SoCs, so leverage that to convert ipq4019 specific reset driver to a
generic Qcom reset driver. With that one just need to provide SoC specific
reset table.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agophy: Add support for drivers to enable USB on QCS404 SoC
Sumit Garg [Thu, 4 Aug 2022 14:27:10 +0000 (19:57 +0530)]
phy: Add support for drivers to enable USB on QCS404 SoC

QCS404 SoC supports two types of PHY, one supports high speed mode or
USB2 PHY and the other supports super speed mode or USB3 PHY. So add
corresponding PHY drivers.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agophy: Move qcom SoCs specific phy drivers to qcom folder
Sumit Garg [Thu, 4 Aug 2022 14:27:09 +0000 (19:57 +0530)]
phy: Move qcom SoCs specific phy drivers to qcom folder

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
2 years agoarm: total_compute: enable psci
Davidson K [Tue, 9 Aug 2022 10:26:52 +0000 (15:56 +0530)]
arm: total_compute: enable psci

psci is used for system reset

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
2 years agoconfigs: j721s2_evm_a72_defconfig: fix the bootcmd
Jayesh Choudhary [Tue, 2 Aug 2022 13:08:14 +0000 (18:38 +0530)]
configs: j721s2_evm_a72_defconfig: fix the bootcmd

Remove the main_cpsw0_qsgmii_phyinit variable from the boot
command as there is no ethernet firmware in j721s2.

Fixes: 8886341aa670 ('configs: j721s2_evm_a72_defconfig: Add A72 specific defconfig')
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
2 years agoMerge commit 'ac30d240dbb520d0980f0687630feb702a14f51a' of https://source.denx.de...
Tom Rini [Wed, 24 Aug 2022 21:30:29 +0000 (17:30 -0400)]
Merge commit 'ac30d240dbb520d0980f0687630feb702a14f51a' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash into next

Re-sync again on some linux part, add some fixes for fsl_elbc from
Pali and switch
imx8mn bsh to use nand base ident

For nand subsystem tested on:
 - imx8mn  Macronix MX30LF4G18AC
 - P2020 based board Turris 1.1 for fsl_elbc

2 years agoMerge https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 23 Aug 2022 19:44:54 +0000 (15:44 -0400)]
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell

- kirkwood: pogo_v4 & nsa310s: Add distro boot (Tony)
- kirkwood: add DM timer support and use it on lsxl boards (Michael)
- kirkwood: convert the Buffalo Linkstation LS-CHLv2 and XHL boards
  to DM (Michael)
- mvebu: turris_mox/omnia: misc improments (Pali)
- mvebu: mbus: Fix mbus driver to work also after U-Boot relocation (Pali)

2 years agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 23 Aug 2022 19:24:14 +0000 (15:24 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoboard: lsxl: update the README
Michael Walle [Wed, 17 Aug 2022 19:38:09 +0000 (21:38 +0200)]
board: lsxl: update the README

Update the board's README to reflect all the recent changes.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: disable eth0
Michael Walle [Wed, 17 Aug 2022 19:38:08 +0000 (21:38 +0200)]
board: lsxl: disable eth0

The board has only one network interface. The linux kernel will
gracefully skip a the ethernet interface if no connected PHY could be
probed. u-boot on the other hand will throw an error message. The kernel
device tree is about to be fixed. For now, just disable the ethernet
interface in our -u-boot.dtsi.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to CONFIG_TIMER
Michael Walle [Wed, 17 Aug 2022 19:38:07 +0000 (21:38 +0200)]
board: lsxl: convert to CONFIG_TIMER

Enable the orion timer driver and we are good.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_SERIAL
Michael Walle [Wed, 17 Aug 2022 19:38:06 +0000 (21:38 +0200)]
board: lsxl: convert to DM_SERIAL

DM_SERIAL needs early malloc. The on-chip RAM is pretty tight, it's only
2kiB, with DM_SERIAL enabled, this doesn't work anymore. Fortunately for
us, we don't need the on-chip RAM because the DRAM is already
initialized before u-boot starts. Just put the early malloc area there
and use the default early malloc size.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_ETH
Michael Walle [Wed, 17 Aug 2022 19:38:05 +0000 (21:38 +0200)]
board: lsxl: convert to DM_ETH

Just enabling the Kconfig option for DM_ETH and DM_MDIO is enough.
Additionally, we can remove the old hardcoded config.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: convert to DM_GPIO
Michael Walle [Wed, 17 Aug 2022 19:38:04 +0000 (21:38 +0200)]
board: lsxl: convert to DM_GPIO

Use the new mvebu GPIO driver and convert all the function calls to the
former kirkwood GPIO driver. This means that we are now using the LED
uclass and the regulator uclass. Unfortunately, the GPIO LED doesn't
offer a blinking method. Thus we are now stuck with solid on and off
states, which makes debugging a bit harder. Also, there is no GPIO fan
driver for now.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: make last resort recovery more reliable
Michael Walle [Wed, 17 Aug 2022 19:38:03 +0000 (21:38 +0200)]
board: lsxl: make last resort recovery more reliable

If something is wrong with the environment, we cannot rely on a proper
u-boot operation anymore. In fact, it is possible, that we never reach
misc_init_r() with a broken environment.

Also don't enable the netconsole by environment settings. This way the
user don't have to reconfigure the environment. Instead the network
console is only enabled when the push button is pressed during boot.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: enable ATAGS support
Michael Walle [Wed, 17 Aug 2022 19:38:02 +0000 (21:38 +0200)]
board: lsxl: enable ATAGS support

We still need to be able to boot legacy images. Esp. the debian
installer will have a kernel with an appended DTB.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: use proper *_r variables
Michael Walle [Wed, 17 Aug 2022 19:38:01 +0000 (21:38 +0200)]
board: lsxl: use proper *_r variables

Use the common kernel_addr_r, ramdisk_addr_r and fdt_addr_r variable
names.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: reorder image loading and remove ramdisk_len
Michael Walle [Wed, 17 Aug 2022 19:38:00 +0000 (21:38 +0200)]
board: lsxl: reorder image loading and remove ramdisk_len

We can load the ramdisk as the last step. This way we don't have to set
the intermediate variable 'ramdisk_len' and can remove it.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: use CONFIG_DEFAULT_FDT_FILE
Michael Walle [Wed, 17 Aug 2022 19:37:59 +0000 (21:37 +0200)]
board: lsxl: use CONFIG_DEFAULT_FDT_FILE

Drop our own CONFIG_FDTFILE handling in favor of the generic
CONFIG_DEFAULT_FDT_FILE one.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: automatically select CONFIG_MISC_INIT_R
Michael Walle [Wed, 17 Aug 2022 19:37:58 +0000 (21:37 +0200)]
board: lsxl: automatically select CONFIG_MISC_INIT_R

The board code needs this to be set. Otherwise, the recovery mechanism
doesn't work. Therefore, select this option automatically with the
board.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove unused header files
Michael Walle [Wed, 17 Aug 2022 19:37:57 +0000 (21:37 +0200)]
board: lsxl: remove unused header files

Cleanup the included header files in the board code. These are all
leftovers from earlier days.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove CONFIG_ENV_OVERWRITE
Michael Walle [Wed, 17 Aug 2022 19:37:56 +0000 (21:37 +0200)]
board: lsxl: remove CONFIG_ENV_OVERWRITE

This is not needed. The user can force setting the variables with
"setenv -f".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove eraseenv script
Michael Walle [Wed, 17 Aug 2022 19:37:55 +0000 (21:37 +0200)]
board: lsxl: remove eraseenv script

This is not needed. The user can do a "env default -f -a".

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: remove unused features
Michael Walle [Wed, 17 Aug 2022 19:37:54 +0000 (21:37 +0200)]
board: lsxl: remove unused features

Make the binary smaller by removing unused features.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoboard: lsxl: limit size to 384kiB
Michael Walle [Wed, 17 Aug 2022 19:37:53 +0000 (21:37 +0200)]
board: lsxl: limit size to 384kiB

The board only has a 4Mbit flash and two sectors are reserved for the
u-boot environment and the device tree.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agobutton: gpio: add DM_GPIO dependency
Michael Walle [Wed, 17 Aug 2022 19:37:52 +0000 (21:37 +0200)]
button: gpio: add DM_GPIO dependency

The gpio-button driver depends on DM_GPIO, add it to Kconfig to avoid
build errors.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agotimer: add orion-timer support
Michael Walle [Wed, 17 Aug 2022 19:37:51 +0000 (21:37 +0200)]
timer: add orion-timer support

Add timer support for Kirkwood and MVEBU devices.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Acked-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: make it CONFIG_TIMER aware
Michael Walle [Wed, 17 Aug 2022 19:37:50 +0000 (21:37 +0200)]
arm: kirkwood: make it CONFIG_TIMER aware

If we switch to CONFIG_TIMER, we don't need the legacy timer macros and
functions anymore. Add the proper guards to exclude them from compiling.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register
Pali Rohár [Wed, 17 Aug 2022 19:37:49 +0000 (21:37 +0200)]
arm: kirkwood: 88f6281: Detect CONFIG_SYS_TCLK from SAR register

Bit 21 in SAR register specifies if TCLK is running at 166 MHz or 200 MHz.
This information is undocumented in public Marvell Kirkwood Functional
Specifications [2], but is available in Linux v3.15 kirkwood code [1].

Commit 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
broke support for Marvell 88F6281 SoCs because it was expected that all
those SoCs have TCLK running at 200 MHz as specified in Marvell 88F6281
Hardware Specifications [3].

Fix broken support for 88F6281 by detecting CONFIG_SYS_TCLK from SAR
register, like it was doing Linux v3.15.

[1] - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/arm/mach-kirkwood/common.c?h=v3.15#n542
[2] - https://web.archive.org/web/20130730091033/http://www.marvell.com/embedded-processors/kirkwood/assets/FS_88F6180_9x_6281_OpenSource.pdf
[3] - https://web.archive.org/web/20120620073511/http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf

Update by Stefan 2022-08-23:
- Fix compilation error for ds109

Fixes: 8ac303d49f89 ("arm: kirkwood: Do not overwrite CONFIG_SYS_TCLK")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agotime: move the CONFIG_SYS_TIMER_RATE handling to the compiler
Michael Walle [Wed, 17 Aug 2022 19:37:48 +0000 (21:37 +0200)]
time: move the CONFIG_SYS_TIMER_RATE handling to the compiler

CONFIG_SYS_TIMER_RATE might be a dynamic value, i.e. a function call
instead of a static value, thus it has to be evaluated at runtime. If it
is a static value, the compiler should be able to optimize the unused
branches out.

This will be needed for kirkwoods dynamic CONFIG_SYS_TCLK setting.

Cc: Pali Rohár <pali@kernel.org>
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: nsa310s: Add Distro boot capability
Tony Dinh [Thu, 11 Aug 2022 23:40:25 +0000 (16:40 -0700)]
arm: kirkwood: nsa310s: Add Distro boot capability

- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
- Remove Gerald from maintainer list (email bounced)
- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
kernel method of booting (e.g. OpenWrt) with appended DTB.
- Add CONFIG_UBIFS_SILENCE_MSG to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2 years agoarm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation
Pali Rohár [Wed, 10 Aug 2022 12:46:09 +0000 (14:46 +0200)]
arm: mvebu: mbus: Fix mbus driver to work also after U-Boot relocation

mbus driver is initialized from arch_cpu_init() callback which is called
before relocation. This driver stores lot of functions and structure
pointers into global variables, so it is data position dependent.

Therefore after relocations all pointers are invalid and driver does not
work anymore as all pointers referes to the old memory, which overlaps with
CONFIG_SYS_LOAD_ADDR and ${loadaddr}.

For example U-Boot fuse command crashes if loadaddr memory is cleared or
rewritten by some image loaded by U-Boot load command.

  mw.w ${loadaddr} 0x0 10000
  fuse read 0 1 2

Fix this issue by removing of all mbus global variables in which are stored
pointers to structures or functions which changes during relocation. And
replace it by direct function calls (not via pointers). With this change
fuse command finally works.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected
Pali Rohár [Wed, 10 Aug 2022 10:54:11 +0000 (12:54 +0200)]
arm: mvebu: turris_mox: Set "sfp" label in eth1 DT node when only Mox SFP is detected

When Mox SFP module is connected after Topaz or Peridot module then port DT
node already contains "sfp" label. But Mox SFP module can be connected also
without Topaz or Peridot module in which case it is connected directly into
he eth1 DT node, which is without any label. So add "sfp" label into eth1
DT node in this case.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: mvebu: turris_omnia: Show MCU version
Pali Rohár [Wed, 10 Aug 2022 09:00:25 +0000 (11:00 +0200)]
arm: mvebu: turris_omnia: Show MCU version

There are already more MCU firmware versions for Turris Omnia in
production, so display git commit (version) of the MCU firmware during
U-Boot startup. It will help to identify what version of MCU firmware is
Turris Omnia using.

MCU firmware for Turris Omnia is open source and available at website:
https://gitlab.nic.cz/turris/hw/omnia_hw_ctrl

It can be updated from running system via i2c bus with this tool:
https://gitlab.nic.cz/turris/omnia-mcutool

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoarm: kirkwood: pogo_v4: Add Distro boot capability
Tony Dinh [Tue, 9 Aug 2022 03:01:34 +0000 (20:01 -0700)]
arm: kirkwood: pogo_v4: Add Distro boot capability

- Add distro boot to board include file and deconfig file
- Miscellaneous changes:
- Add CONFIG_SUPPORT_PASSING_ATAGS and friends to support legacy
kernel method of booting (e.g. OpenWrt) with appended DTB.
- Add CONFIG_LTO and CONFIG_UBIFS_SILENCE_MSG, and disable some
unused configs to reduce binary size.

Note that this patch is depended on the following patch:
https://patchwork.ozlabs.org/project/uboot/patch/20220807192709.21717-1-pali@kernel.org/

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
2 years agoarm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL
Pali Rohár [Mon, 8 Aug 2022 17:13:43 +0000 (19:13 +0200)]
arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL

SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM.
Proper U-Boot removes this direct mapping. So it is available only in SPL.
This applies for all 32-bit Armada BootROMs. SPL mvebu code is used only on
32-bit Armada SoCs. So move env_sf_get_env_addr() function from Turris
Omnia board to common SPL mvebu code and add proper checks for SPI0 CS0.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
2 years agoPrepare v2022.10-rc3
Tom Rini [Mon, 22 Aug 2022 22:54:48 +0000 (18:54 -0400)]
Prepare v2022.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Tom Rini [Mon, 22 Aug 2022 16:41:07 +0000 (12:41 -0400)]
Merge tag 'dm-pull-20aug22' of https://source.denx.de/u-boot/custodians/u-boot-dm

binman fixes for various things
binman clean-up of compression and addition of utilities

2 years agoMerge branch '2022-08-22-platform-removals-CI-updates'
Tom Rini [Mon, 22 Aug 2022 16:32:52 +0000 (12:32 -0400)]
Merge branch '2022-08-22-platform-removals-CI-updates'

- Remove a few more platforms, update CI to Ubuntu 22.04 and perform
  some other other minor updates to Azure.

2 years agoCI: Move to Ubuntu 2022.04 "Jammy" for CI base
Tom Rini [Wed, 10 Aug 2022 01:08:54 +0000 (21:08 -0400)]
CI: Move to Ubuntu 2022.04 "Jammy" for CI base

- We now have a new enough sbsigntools in the distro, stop building.
- Use the 20220801 tag for Jammy.
- Move to pygit2 1.9.2 (current version) as the old one doesn't build on
 "Jammy".
- Add the working directory to the list of safe directories for git.
- Move to pytest 6.2.5 to address other issues.
- This move exposed a number of minor issues in the existing scripts we
  used within CI to perform the jobs themselves.  The most notable changes
  here involve using 'set +e / set -e' to enforce when we should or should
  not make non-zero buildman status be a fatal error.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agomtd: rawnand: fsl_elbc: Fix reading address pointer from DT
Pali Rohár [Fri, 19 Aug 2022 09:20:01 +0000 (11:20 +0200)]
mtd: rawnand: fsl_elbc: Fix reading address pointer from DT

During compilation gcc throws warning:

    drivers/mtd/nand/raw/fsl_elbc_nand.c: In function ‘fsl_elbc_nand_probe’:
    drivers/mtd/nand/raw/fsl_elbc_nand.c:841:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      return fsl_elbc_chip_init(0, (void *)dev_read_addr(dev), dev);
                                   ^

Fix it by using dev_read_addr_ptr() function which returns pointer instead
of dev_read_addr() which returns integer type.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag
Pali Rohár [Mon, 15 Aug 2022 08:01:40 +0000 (10:01 +0200)]
mtd: rawnand: fsl_elbc: Remove NAND_NO_SUBPAGE_WRITE flag

Subpage write support for freescale eLBC NAND controller driver is
implemented in U-Boot and was fixes in the commit d3963721d93f ("nand: Sync
with Linux v4.1").

So remove NAND_NO_SUBPAGE_WRITE flag from the fsl_elbc_nand.c driver. This
partially revert commit cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE
to eLBC and IFC drivers"), only eLBC driver part.

With this change U-Boot with default settings can read from NAND UBIFS
image created on Linux with Linux default settings. Prior this change
U-Boot was unable to read from NAND UBIFS images created with Linux default
settings due to differnet UBI geometry.

Linux kernel fsl_elbc_nand.c driver also does not set NAND_NO_SUBPAGE_WRITE
flag and has implemented subpage write support.

Fixes: cb04c7723429 ("nand/fsl: add NAND_NO_SUBPAGE_WRITE to eLBC and IFC drivers")
Fixes: d3963721d93f ("nand: Sync with Linux v4.1")
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Acked-By: Michael Trimarchi<michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agoconfigs: imx8mn_bsh_smm_s2: Use nand_base ident for nand identification
Michael Trimarchi [Thu, 28 Jul 2022 12:43:09 +0000 (14:43 +0200)]
configs: imx8mn_bsh_smm_s2: Use nand_base ident for nand identification

The board can mount different nand brand type. Try to use the full scan
detection and not the onfi one

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: samsung: Retrieve ECC requirements from extended
Michael Trimarchi [Mon, 25 Jul 2022 10:20:24 +0000 (12:20 +0200)]
mtd: nand: samsung: Retrieve ECC requirements from extended

Upstream linux commit 8fc82d456e40a0.

On some nand controllers with hw-ecc the controller code wants to know
the ecc strength and size and having these as 0, 0 is not accepted.

Specifying these in devicetree is possible but undesirable as the nand
may be different in different production runs of the same board, so it
is better to get this info from the nand id where possible.

This commit adds code to read the ecc strength and size from the nand
for Samsung extended-id nands. This code is based on the info for the 5th
id byte in the datasheets for the following Samsung nands: K9GAG08U0E,
K9GAG08U0F, K9GAG08X0D, K9GBG08U0A, K9GBG08U0B. These all use these bits
in the exact same way.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: Rename nand_get_flash_type() into nand_detect()
Michael Trimarchi [Mon, 25 Jul 2022 08:18:51 +0000 (10:18 +0200)]
mtd: nand: Rename nand_get_flash_type() into nand_detect()

Upstream linux commit 7bb427990ee364.

Rename the function to match this new behavior.

NOTE: fix nand_detect/nand_get_flash_type parameters in
mxs_nand_spl. This code seems never executed by any board
as alternative for nand detect

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: change return type of nand_get_flash_type() to int
Michael Trimarchi [Mon, 25 Jul 2022 08:06:06 +0000 (10:06 +0200)]
mtd: nand: change return type of nand_get_flash_type() to int

Upstream linux commit 4722c0e958e636.

The returned "type" is never used in nand_scan_ident() and spl code

Make nand_get_flash_type() simply return an integer value in order
to avoid unnecessary ERR_PTR/PTR_ERR dance.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agomtd: nand: Rename the nand_manufacturers struct
Michael Trimarchi [Tue, 26 Jul 2022 16:33:11 +0000 (18:33 +0200)]
mtd: nand: Rename the nand_manufacturers struct

Upstream linux commit 8cfb9ab68f9070.

Drop the 's' at the end of nand_manufacturers since the struct is actually
describing a single manufacturer, not a manufacturer table.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Reviewed-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
2 years agoCI: Azure: Merge PowerPC jobs in to one
Tom Rini [Wed, 10 Aug 2022 01:08:52 +0000 (21:08 -0400)]
CI: Azure: Merge PowerPC jobs in to one

At this point given the number of PowerPC platforms we have, a single
job to build them all fits within the time limit we have in Azure.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2 years agopowerpc: remove support for kmtergr1 and MPC8309
Holger Brunck [Fri, 19 Aug 2022 14:55:06 +0000 (16:55 +0200)]
powerpc: remove support for kmtergr1 and MPC8309

The kmtegr1 board is out of maintenance and can be removed. As it is the
only board in the tree using MPC8309 the support for this CPU is dropped
completely.

Signed-off-by: Holger Brunck <holger.brunck@hitachienergy.com>
2 years agoarm: Remove warp board
Tom Rini [Wed, 3 Aug 2022 16:11:00 +0000 (12:11 -0400)]
arm: Remove warp board

This board is missing migration to CONFIG_DM, which had a deadline of
v2020.01, which is now more than 2 years passed due.  Remove it.

Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Rini <trini@konsulko.com>
2 years agoMerge branch '2022-08-20-enforce-DM_ETH-migration'
Tom Rini [Sun, 21 Aug 2022 02:39:42 +0000 (22:39 -0400)]
Merge branch '2022-08-20-enforce-DM_ETH-migration'

Enforce requiring DM_ETH to be enabled for ethernet drivers, as the
migration deadline has well passed. To facilitate this, we remove some
non-migrated platforms and disable networking on a few others. Finally
we remove some of the now-useless non-DM_ETH code in some platforms as a
prerequisite for DM_ETH being set.

2 years agonet: Make DM_ETH be selected by NETDEVICE
Tom Rini [Tue, 2 Aug 2022 11:33:47 +0000 (07:33 -0400)]
net: Make DM_ETH be selected by NETDEVICE

The deadline for DM_ETH migration passed 2 years ago.  Now that
platforms which cannot be migrated have been either removed or had
drivers disabled, and platforms that needed minor help to migrate have
been forcefully migrated, we can complete the migration.

This entails select'ing DM_ETH under NETDEVICES, and then removing now
extraneous depends on lines.  In a few places, we can now either remove
options or just simplify later dependencies.

Cc: Ramon Fried <rfried.dev@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Ramon Fried <rfried.dev@gmail.com>
2 years agosmdkc100: Remove legacy non-DM_ETH code
Tom Rini [Tue, 2 Aug 2022 11:33:46 +0000 (07:33 -0400)]
smdkc100: Remove legacy non-DM_ETH code

Now that we are about to enable DM_ETH by default, remove legacy code.

Cc: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>