Pull request: u-boot-rockchip-20230319

2023-03-18 Thread Kever Yang
Hi Tom, Please pull the fixes for rockchip platform: - Fix for rockchip timer driver; - Fix for rk3568 and rk3588 boot device and clock driver; - Fix for rk3568 reset handler; - Fix for rk3568 sdhci DLL at 52MHz; CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/15648 Than

Re: [PATCH 12/12] rockchip: Convert rk35xx to use standard boot

2023-03-18 Thread Kever Yang
Hi Jonas,     I will pick other patches for fix of this series, and leave this one after the patch set[0] from Simon get land. Thanks, - Kever https://patchwork.ozlabs.org/project/uboot/patch/20230302033930.2546548-7-...@chromium.org/ On 2023/3/14 08:38, Jonas Karlman wrote: Imply use of

Re: [PATCH] rockchip: sdhci: rk3568: fix clock setting logic

2023-03-18 Thread Kever Yang
On 2023/3/8 05:26, Vasily Khoruzhick wrote: mmc->tran_speed is max clock, but currently rk3568_sdhci_set_ios_post uses it if its != 0, regardless of mmc->clock value, and it breaks eMMC controller. Without this patch 'mmc dev 0; mmc dev 1; mmc dev 0' is enough for breaking eMMC, since first in

Re: [PATCH RFC u-boot-mvebu 0/6] arm: mvebu: Fix boot mode detection

2023-03-18 Thread Martin Rowe
On Sun, 5 Mar 2023 at 11:55, Pali Rohár wrote: > On Sunday 05 March 2023 04:21:42 Martin Rowe wrote: > > On Sat, 4 Mar 2023 at 10:51, Pali Rohár wrote: > > > > > Improve code for checking strapping pins which specifies boot mode > source. > > > > > > Martin, could you test if Clearfog can be sti

[PATCH 3/4] arch: m68k: Add QEMU specific RAMBAR workaround

2023-03-18 Thread Marek Vasut
The QEMU emulation of m68k does not support RAMBAR accesses, add Kconfig option which inhibits those accesses, so that U-Boot can be started in m68k QEMU for CI testing purpopses until QEMU emulation improves. Signed-off-by: Marek Vasut --- Cc: Angelo Dureghello Cc: Huan Wang Cc: Marek Vasut C

[PATCH 2/4] arch: m68k: Introduce trivial PIT based timer

2023-03-18 Thread Marek Vasut
The QEMU emulation of m68k does not support DMA timer, the only timer that is supported is the PIT timer. Implement trivial PIT timer support for m68k. Signed-off-by: Marek Vasut --- Cc: Angelo Dureghello Cc: Huan Wang Cc: Marek Vasut Cc: Simon Glass Cc: Stefan Roese Cc: Tom Rini --- arch/

[PATCH 4/4] CI: Add m68k target

2023-03-18 Thread Marek Vasut
Add M5208EVBE board to CI. This does not use default config due to limitations of QEMU emulation, instead the timer is switched from DMA timer to PIT timer and RAMBAR accesses are inhibited. Local QEMU launch command is as follows: $ qemu-system-m68k -nographic -machine mcf5208evb -cpu m5208 -bios

[PATCH 1/4] arch: m68k: Use existing CONFIG_MCFTMR instead of CFG_MCFTMR

2023-03-18 Thread Marek Vasut
There is an existing CONFIG_MCFTMR Kconfig symbol, use it and drop all other instances of CFG_MCFTMR. This duality is likely a result of bogus conversion to Kconfig. Signed-off-by: Marek Vasut --- Cc: Angelo Dureghello Cc: Huan Wang Cc: Marek Vasut Cc: Simon Glass Cc: Stefan Roese Cc: Tom Ri

[PATCH] lib: Fix SYS_TIMER_COUNTS_DOWN description in Kconfig

2023-03-18 Thread Marek Vasut
The SYS_TIMER_COUNTS_DOWN description contains a typo, s@rathe@&r@ , fix it. Signed-off-by: Marek Vasut --- Cc: Angelo Dureghello Cc: Huan Wang Cc: Marek Vasut Cc: Simon Glass Cc: Stefan Roese Cc: Tom Rini --- lib/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [PATCH RFC u-boot-mvebu 0/2] arm: mvebu: Fix eMMC boot

2023-03-18 Thread Martin Rowe
On Mon, 6 Mar 2023 at 18:40, Pali Rohár wrote: > On Monday 06 March 2023 11:15:35 Martin Rowe wrote: > > On Sun, 5 Mar 2023 at 16:04, Pali Rohár wrote: > > > Could you try another test by completely erasing BOOT0, BOOT1 and USER > > > > data? And see what BootROM prints. > > > > > > > ==

Re: [PATCH] gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio controllers

2023-03-18 Thread Rasmus Villemoes
On 18/03/2023 21.20, Simon Glass wrote: > Hi Rasmus, > > On Fri, 17 Mar 2023 at 14:13, Rasmus Villemoes > wrote: >> >> The API is more convenient to use if one doesn't have to know upfront >> which gpio controller has a line with the name one is searching for, >> and arrange to look that device u

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-03-18 Thread Rasmus Villemoes
On 18/03/2023 21.20, Simon Glass wrote: >> >> Now, the only way to be really sure is to build the world >> with/without this patch and check if any .dtb file changes, but I >> don't have the means to do that. But I do notice that >> >> >> doc/develop/devicetree/control.rst | 1 + >> scripts/Makef

Re: [PATCH RFC u-boot-mvebu 0/2] arm: mvebu: Fix eMMC boot

2023-03-18 Thread Martin Rowe
On Mon, 6 Mar 2023 at 11:53, Pali Rohár wrote: > On Monday 06 March 2023 11:15:35 Martin Rowe wrote: > > On Sun, 5 Mar 2023 at 16:04, Pali Rohár wrote: > > > > > On Sunday 05 March 2023 12:46:34 Pali Rohár wrote: > > > > On Sunday 05 March 2023 02:24:27 Martin Rowe wrote: > > > > > On Sat, 4 Mar

[PATCH 3/3] gpio: rockchip: Add support for RK3568 and RK3588 banks

2023-03-18 Thread Jonas Karlman
Some GPIO regs used on RK35xx have changed offset and now use upper 16 bits as a write mask. Refactor and add support for this to add support for RK3568 and RK3588 to the driver. Signed-off-by: Jonas Karlman --- drivers/gpio/rk_gpio.c | 111 - 1 file chang

[PATCH 2/3] gpio: rockchip: Use gpio alias id as gpio bank id

2023-03-18 Thread Jonas Karlman
Use the gpio alias id as the gpio bank id, same as in the linux driver. This reverts the recent change to base bank id on the gpio-ranges prop and apply the same logic used when nodes was named gpio0@ to the alias. With missing gpio aliases added to u-boot.dtsi files this should restore gpio func

[PATCH 1/3] rockchip: dts: Add missing alias for gpio controllers

2023-03-18 Thread Jonas Karlman
This adds any missing gpio alias for gpio controllers in rockchip u-boot.dtsi files. They are needed to determin what gpio bank id to use in the rockchip gpio driver. Signed-off-by: Jonas Karlman --- arch/arm/dts/px30-u-boot.dtsi| 4 arch/arm/dts/rk3066a-u-boot.dtsi | 11 +++ a

[PATCH 0/3] rockchip: gpio: Add support for RK3568 and RK3588

2023-03-18 Thread Jonas Karlman
This series adds support for RK3568 and RK3588 in the rk gpio driver. It also reverts the use of gpio-ranges to set gpio bank id and instead add gpio aliases and instead use the alias sequence as the bank id. Using an alias should remove the need for adding a new bank-id prop and abusing the gpio-

[PATCH v3] test_vboot.py: include test of fdt_add_pubkey tool

2023-03-18 Thread Ivan Mikhaylov
From: Roman Kopytin Signed-off-by: Roman Kopytin Signed-off-by: Ivan Mikhaylov Cc: Rasmus Villemoes --- test/py/tests/test_vboot.py | 33 + 1 file changed, 33 insertions(+) diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py index e3e7ca4b21

[PATCH] pinctrl: rockchip: Fix IO mux selection on RK3568

2023-03-18 Thread Jonas Karlman
IO mux selection is not working correctly for all pins. Sync mux route data from linux to add any missing and update wrong trigger pins to fix this. Also apply the pull-up fix needed for GPIO0 D3-D6. Fixes: 1977d746aa54 ("rockchip: rk3568: add rk3568 pinctrl driver") Signed-off-by: Jonas Karlman

[PATCH] netconsole: various improvements

2023-03-18 Thread Tony Dinh
- When Netconsole is running, stdin/stdout/stderr are set to nc. Reset stdin/stdout/stderr to serial (a sane deffault) before booting kernel. - Enable net_timeout when netconsole starts will give a better user experience if netconsole server is not running. Signed-off-by: Tony Dinh --- boot/boo

Re: [PATCH v1 5/6] rockchip: configs: mk808: change CONFIG_TPL_TEXT_BASE

2023-03-18 Thread Simon Glass
On Thu, 16 Mar 2023 at 10:48, Johan Jonker wrote: > > Currently the Rockchip rk3066a u-boot-tpl.bin file needs > to add the characters "RK30", while the other SoCs replace > the first 4 bytes. Bring this in line with the rest by > lowering CONFIG_TPL_TEXT_BASE and update rockchip.rst > instruction

Re: [PATCH v1 1/6] rockchip: gpio: rk_gpio: use ROCKCHIP_GPIOS_PER_BANK as divider

2023-03-18 Thread Simon Glass
Hi Johan, On Thu, 16 Mar 2023 at 10:46, Johan Jonker wrote: > > The current divider to calculate the bank ID can change. > Use a constant ROCKCHIP_GPIOS_PER_BANK as fixed divider. What is the motivation for this patch? > > Signed-off-by: Johan Jonker > --- > drivers/gpio/rk_gpio.c | 2 +- > 1

Re: [PATCH v1 6/6] rockchip: configs: mk808: enable usb support

2023-03-18 Thread Simon Glass
On Thu, 16 Mar 2023 at 10:48, Johan Jonker wrote: > > Enable usb support in the mk808_defconfig. > > Signed-off-by: Johan Jonker > --- > configs/mk808_defconfig | 10 ++ > 1 file changed, 10 insertions(+) > Reviewed-by: Simon Glass

Re: [PATCH 1/1] dm: simplify uclass_pre_remove_device

2023-03-18 Thread Simon Glass
Hi Heinrich, On Sat, 18 Mar 2023 at 03:56, Heinrich Schuchardt wrote: > > Remove a superfluous logical constraint. > > Signed-off-by: Heinrich Schuchardt > --- > drivers/core/uclass.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) Where possible I like to keep the happy path c

Re: [PATCH v1 1/5] net: phy: Add driver for Motorcomm yt8531 gigabit ethernet phy

2023-03-18 Thread Simon Glass
Hi Yanhong, On Thu, 16 Mar 2023 at 19:06, Yanhong Wang wrote: > > Add a driver for the motorcomm yt8531 gigabit ethernet phy. We have > verified the driver on StarFive VisionFive2 board. > > Signed-off-by: Yanhong Wang > --- > drivers/net/phy/Kconfig | 6 + > drivers/net/phy/Makefile|

Re: mkimage for Windows?

2023-03-18 Thread Simon Glass
Hi Tom, On Thu, 16 Mar 2023 at 08:55, Tom Rini wrote: > > On Wed, Mar 15, 2023 at 01:56:25PM -0600, Simon Glass wrote: > > > Hi, > > > > Does anyone know how to build mkimage (or other tools) on a Windows > > host, or at least with a Windows target? > > Other than the Azure tools-only test? I thi

Re: [PATCH v1 2/6] arm: dts: rockchip: rk3066a-u-boot: add gpio-ranges

2023-03-18 Thread Simon Glass
On Thu, 16 Mar 2023 at 10:47, Johan Jonker wrote: > > The gpio node names are made generic, but without > gpio bank ID. Add gpio-ranges to rk3066a-u-boot.dtsi > for now till a better method is found. > > Signed-off-by: Johan Jonker > --- > arch/arm/dts/rk3066a-u-boot.dtsi | 25 ++

Re: [PATCH v1 3/6] arm: dts: rockchip: rk3188-u-boot: add gpio-ranges

2023-03-18 Thread Simon Glass
On Thu, 16 Mar 2023 at 10:47, Johan Jonker wrote: > > The gpio node names are made generic, but without > gpio bank ID. Add gpio-ranges to rk3188-u-boot.dtsi > for now till a better method is found. > > Signed-off-by: Johan Jonker > --- > arch/arm/dts/rk3188-u-boot.dtsi | 13 + > 1 f

Re: [PATCH] rtc: m41t62: implements read8/write8 operations

2023-03-18 Thread Simon Glass
On Fri, 17 Mar 2023 at 08:25, wrote: > > From: Thomas Perrot > > These operations are required by dm_rtc_read and > dm_bootcount_get helpers. > > Signed-off-by: Thomas Perrot > --- > drivers/rtc/m41t62.c | 12 > 1 file changed, 12 insertions(+) > Reviewed-by: Simon Glass

Re: [PATCH] scripts/Makefile.lib: also consider $(CONFIG_SYS_BOARD)-u-boot.dtsi

2023-03-18 Thread Simon Glass
Hi Rasmus, On Fri, 17 Mar 2023 at 04:26, Rasmus Villemoes wrote: > > I have a couple of boards, e.g. foo21, bar33, each with a few > different revisions, so I have > > foo21-revA.dts > foo21-revB.dts > bar33-revA.dts > bar33-revB.dts > > Now the necessary U-Boot specific additions for the

Re: [PATCH v1 4/6] arm: dts: rockchip: sync rk3066/rk3188 DT files from linux-next v6.2-rc4

2023-03-18 Thread Simon Glass
On Thu, 16 Mar 2023 at 10:47, Johan Jonker wrote: > > Sync rk3066/rk3188 DT files from Linux. > This is the state as of linux-next v6.2-rc4. > New nfc node for MK808 rk3066a. > CRU nodes now have a clock property. > To prefend dtoc errors a fixed clock must also be > included for tpl/spl in the rk

Re: [PATCH 00/13] x86: Various minor enhancements for coreboot

2023-03-18 Thread Simon Glass
Hi Bin, On Mon, 20 Feb 2023 at 19:02, Jason Liu wrote: > > > > > -Original Message- > > From: Simon Glass > > Sent: 2023年2月21日 3:49 > > To: U-Boot Mailing List > > Cc: Bin Meng ; Simon Glass ; > > AKASHI Takahiro ; Andrew Scull > > ; Heinrich Schuchardt ; Ilias > > Apalodimas ; Jason Li

Re: [PATCH] regulator: implement basic reference counter

2023-03-18 Thread Simon Glass
Hi Eugen, On Thu, 16 Mar 2023 at 07:53, Eugen Hristev wrote: > > Some devices share a regulator supply, when the first one will request > regulator disable, the second device will have it's supply cut off before > graciously shutting down. Hence there will be timeouts and other failed > operation

Re: [PATCH 1/2] include: kernel.h: port find_closest() from Linux

2023-03-18 Thread Simon Glass
On Thu, 16 Mar 2023 at 16:17, Chris Packham wrote: > > The find_closest() macro can be used to find an element in a sorted > array that is closest to an input value. > > Signed-off-by: Chris Packham > --- > > include/linux/kernel.h | 24 > 1 file changed, 24 insertions(+

Re: [PATCH v1 2/5] net: dwc_eth_qos: Add StarFive ethernet driver glue layer

2023-03-18 Thread Simon Glass
Hi Yanhong, On Thu, 16 Mar 2023 at 19:07, Yanhong Wang wrote: > > The StarFive ETHQOS hardware has its own clock and reset,so add a > corresponding glue driver to configure them. > > Signed-off-by: Yanhong Wang > --- > drivers/net/Kconfig| 7 + > drivers/net/Makefile

Re: [PATCH 0/9] Enable splash screen

2023-03-18 Thread Simon Glass
Hi Nikhil, On Fri, 17 Mar 2023 at 02:13, Nikhil M Jain wrote: > > Hi Simon, > > On 16/03/23 10:10, Nikhil M Jain wrote: > > Hi Simon, > > > > On 15/03/23 19:38, Simon Glass wrote: > >> Hi Nikhil, > >> > >> On Wed, 15 Mar 2023 at 00:07, Nikhil M Jain wrote: > >>> > >>> Hi Simon, > >>> > >>> On 15

Re: [BUG] Devices of uclass BLK are not listed on x86

2023-03-18 Thread Simon Glass
Hi Detlev, On Fri, 17 Mar 2023 at 15:30, Detlev Casanova wrote: > > Hello, > > We have been having an issue with IDE and SCSI drives not being usable on the > x86 architecture. > > After bisecting, it looks like commit f2ebaaa9f38defaf2e616a9fc489fe8b4021 > (pci: Handle failed calloc in decod

Re: [PATCH] gpio: allow passing NULL to gpio_request_by_line_name() to search all gpio controllers

2023-03-18 Thread Simon Glass
Hi Rasmus, On Fri, 17 Mar 2023 at 14:13, Rasmus Villemoes wrote: > > The API is more convenient to use if one doesn't have to know upfront > which gpio controller has a line with the name one is searching for, > and arrange to look that device up somehow. Or implement this loop > oneself. > > Sig

[PATCH V2 3/3] nvmem: u-boot-env: post-process "ethaddr" env variable

2023-03-18 Thread Rafał Miłecki
From: Rafał Miłecki U-Boot environment variables are stored in ASCII format so "ethaddr" requires parsing into binary to make it work with Ethernet interfaces. This includes support for indexes to support #nvmem-cell-cells = <1>. Signed-off-by: Rafał Miłecki --- drivers/nvmem/Kconfig |

[PATCH V2 2/3] nvmem: core: support specifying both: cell raw data & post read lengths

2023-03-18 Thread Rafał Miłecki
From: Rafał Miłecki Callback .read_post_process() is designed to modify raw cell content before providing it to the consumer. So far we were dealing with modifications that didn't affect cell size (length). In some cases however cell content needs to be reformatted and resized. It's required e.g

[PATCH V2 1/3] dt-bindings: nvmem: u-boot, env: add MAC's #nvmem-cell-cells

2023-03-18 Thread Rafał Miłecki
From: Rafał Miłecki U-Boot's "ethaddr" environment variable is very often used to store *base* MAC address. It's used as a base for calculating addresses for multiple interfaces. It's done by adding proper values. Actual offsets are picked by manufacturers and vary across devices. Signed-off-by:

[PATCH V2 0/3] nvmem: support post read for U-Boot's "ethaddr"

2023-03-18 Thread Rafał Miłecki
From: Rafał Miłecki This change is required for NVMEM consumers to get expected MAC address from U-Boot env data variable "ethaddr". To address some previous concerns: 1. Yes, U-Boot env binding & driver should be converted to NVMEM layout 2. My priority is to get working MAC rather than fancy D

[PULL] u-boot-sh/next

2023-03-18 Thread Marek Vasut
The following changes since commit cefd0449d6df77eb0edb8a6800a441f9cd4e3653: Merge tag 'xilinx-for-v2023.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next (2023-03-16 12:18:30 -0400) are available in the Git repository at: https://source.denx.de/u-boot/custodi

[PATCH 1/1] dm: simplify uclass_pre_remove_device

2023-03-18 Thread Heinrich Schuchardt
Remove a superfluous logical constraint. Signed-off-by: Heinrich Schuchardt --- drivers/core/uclass.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c index 1762a0796d..dce5b46fc7 100644 --- a/drivers/core/uclass.c +++ b/dr