[PATCH 13/18] console: Refactor stdio_print_current_devices() a little bit

2023-07-22 Thread Bin Meng
In preparation to future changes, refactor this routine a little bit. Signed-off-by: Bin Meng --- common/console.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/common/console.c b/common/console.c index d0640ba05a..af52897ec3 100644 ---

[PATCH 14/18] console: Print out complete stdio device list

2023-07-22 Thread Bin Meng
At present if both CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are on, during boot, the printed out stdio devices are incomplete, e.g.: with "stdout=serial,vidconsole", only "vidconsole" is printed. For such case, we can print out the stdio device name from the environment variables. Signed-off-by:

[PATCH 12/18] console: Make stdio_print_current_devices() static

2023-07-22 Thread Bin Meng
As it is only called in common/console.c Signed-off-by: Bin Meng --- common/console.c| 2 +- include/stdio_dev.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/common/console.c b/common/console.c index 71ad8efd6f..d0640ba05a 100644 --- a/common/console.c +++

[PATCH 00/18] video: bochs: Remove the x86 limitation

2023-07-22 Thread Bin Meng
The Bochs VGA card emulated by QEMU does not enforce any architecture. It was first introduced on x86 and indeed the x86 IO instruction is used to access the legacy VGA IO ports, but that does not mean it has to be done like this. The first half of this series enhances the bochs video driver to

[PATCH 11/18] console: kconfig: Drop the redundant VIDEO dependency

2023-07-22 Thread Bin Meng
The VIDEO dependency is described twice in CONSOLE_MUX. Signed-off-by: Bin Meng --- common/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/Kconfig b/common/Kconfig index 973482f075..d103bc6ddb 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -226,7 +226,7

[PATCH 16/18] riscv: define a cache line size for the generic CPU

2023-07-22 Thread Bin Meng
From: Heinrich Schuchardt The USB 3.0 driver xhci-mem.c requires CONFIG_SYS_CACHELINE_SIZE to be set. Define the cache line size for QEMU on RISC-V to be 64 bytes. Signed-off-by: Heinrich Schuchardt Reviewed-by: Bin Meng Signed-off-by: Bin Meng --- arch/riscv/cpu/generic/Kconfig | 1 + 1

[PATCH 18/18] riscv: qemu: Enable usb keyboard as an input device

2023-07-22 Thread Bin Meng
This brings PCI xHCI support to QEMU RISC-V and uses a usb keyboard as one of the input devices. Signed-off-by: Bin Meng --- board/emulation/qemu-riscv/Kconfig | 5 + board/emulation/qemu-riscv/qemu-riscv.c | 5 + doc/board/emulation/qemu-riscv.rst | 5 +

[PATCH 17/18] riscv: qemu: Remove out-of-date "riscv, kernel-start" handling

2023-07-22 Thread Bin Meng
Commit 66ffe57 ("riscv: qemu: detect and boot the kernel passed by QEMU") added some logic to handle "riscv,kernel-start" in DT and stored the address to an environment variable kernel_start. However this "riscv,kernel-start" has never been an upstream DT binding. The upstream QEMU never

[PATCH 15/18] riscv: qemu: Enable PRE_CONSOLE_BUFFER

2023-07-22 Thread Bin Meng
By default the video console only outputs messages after it's ready. Messages before that won't show on the video console, but U-Boot has an option to buffer the console messages before it's ready. Enable this support, and carefully select an address for the buffer. Signed-off-by: Bin Meng ---

[PATCH 10/18] riscv: qemu: Enable Bochs video support

2023-07-22 Thread Bin Meng
Enable video console using the emulated Bochs VGA card. Signed-off-by: Bin Meng --- board/emulation/qemu-riscv/Kconfig | 3 +++ doc/board/emulation/qemu-riscv.rst | 5 + include/configs/qemu-riscv.h | 5 + 3 files changed, 13 insertions(+) diff --git

[PATCH 09/18] video: bochs: Set the frame buffer size per configuration

2023-07-22 Thread Bin Meng
At present the uclass stored frame buffer size is set to a hard coded value, but we can calculate the correct value based on what is configured. Signed-off-by: Bin Meng --- drivers/video/bochs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/bochs.c

[PATCH 08/18] video: kconfig: Set default FB size for Bochs

2023-07-22 Thread Bin Meng
Set up a default frame buffer size of 8MiB for Bochs for non-x86 architecturs as PCI is normally not enumerated before relocation on these architectures. Signed-off-by: Bin Meng --- drivers/video/Kconfig | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 07/18] video: kconfig: Drop the superfluous dependency

2023-07-22 Thread Bin Meng
PCI is always selected by X86 architecture hence "X86 && PCI" does not make it better. Signed-off-by: Bin Meng --- drivers/video/Kconfig | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 43ec7e6695..3f6b7d71b8 100644

[PATCH 06/18] video: kconfig: Fix wrong text for the PCI default FB size

2023-07-22 Thread Bin Meng
There is an example in the VIDEO_PCI_DEFAULT_FB_SIZE help text to tell people how to calculate its value but the resolution given does not match the value. Fix it. Signed-off-by: Bin Meng --- drivers/video/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 05/18] video: bochs: Remove the x86 dependency

2023-07-22 Thread Bin Meng
Now that the driver is legacy free, remove the x86 dependency so that it can be used on non-x86 architectures. Signed-off-by: Bin Meng --- drivers/video/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index b41dc60cec..3cdaa5ff27 100644

[PATCH 04/18] video: bochs: Avoid using IO instructions to access VGA IO port

2023-07-22 Thread Bin Meng
At present the driver uses IO instructions to access the legacy VGA IO ports, which unfortunately limits the driver to work only on x86. It turns out the IO instruction is not necessary as Bochs VGA card remaps the legacy VGA IO ports (0x3c0 -> 0x3df) to its memory mapped register space from

[PATCH 03/18] video: bochs: Drop the useless argument of bochs_vga_write()

2023-07-22 Thread Bin Meng
bochs_vga_write() takes 'index' as one argument, but never uses it. While we are here, use macros instead of magic numbers for the VGA IO port register name and value. Signed-off-by: Bin Meng --- drivers/video/bochs.c | 7 --- drivers/video/bochs.h | 5 - 2 files changed, 8

[PATCH 02/18] video: bochs: Drop inclusion of

2023-07-22 Thread Bin Meng
The driver does not call any MTRR APIs. Signed-off-by: Bin Meng --- drivers/video/bochs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/bochs.c b/drivers/video/bochs.c index 2136b51193..fa0283c158 100644 --- a/drivers/video/bochs.c +++ b/drivers/video/bochs.c @@ -11,7 +11,6

[PATCH 01/18] dm: video: Cosmetic style fix

2023-07-22 Thread Bin Meng
Some coding convention fixes for video_post_bind(). Signed-off-by: Bin Meng --- drivers/video/video-uclass.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 949595f1bc..8f268fc406 100644 ---

Re: [PATCH v2 3/6] net: introduce TCP/IP6 support

2023-07-22 Thread Simon Glass
Hi Dmitrii, On Wed, 10 May 2023 at 11:00, Dmitrii Merkurev wrote: > > Add TCP/IP6 related headers and reuse refactored TCP/IP > implementation > > Signed-off-by: Dmitrii Merkurev > Cc: Ying-Chun Liu (PaulLiu) > Cc: Simon Glass > Сс: Joe Hershberger > Сс: Ramon Fried > --- >

Re: [PATCH 1/1] efi_loader: simplify dp_fill()

2023-07-22 Thread Simon Glass
Hi Heinrich, On Fri, 21 Jul 2023 at 00:34, Heinrich Schuchardt wrote: > > Move the recursive dp_fill(dev->parent) call to a single location. > Determine uclass_id only once. > > Signed-off-by: Heinrich Schuchardt > --- > lib/efi_loader/efi_device_path.c | 45 +--- >

Re: [PATCH v2 5/6] net: add fastboot TCP documentation and IP6-only mode

2023-07-22 Thread Simon Glass
Hi Dmitrii, On Wed, 10 May 2023 at 11:00, Dmitrii Merkurev wrote: > > Command to start IP6 only TCP fastboot: > fastboot tcp -ipv6 > > Signed-off-by: Dmitrii Merkurev > Cc: Ying-Chun Liu (PaulLiu) > Cc: Simon Glass > Сс: Joe Hershberger > Сс: Ramon Fried > --- > cmd/fastboot.c |

Re: [PATCH v8 21/23] binman: Overwrite symlink if it already exists

2023-07-22 Thread Simon Glass
On Fri, 21 Jul 2023 at 12:47, Neha Malcom Francis wrote: > > From: Andrew Davis > > Without this re-building will fail with an error when trying to create > the symlink for the second time with an already exists error. > > Signed-off-by: Andrew Davis > [n-fran...@ti.com: Added support for test

Re: [PATCH] board_f: Cosmetic style fix

2023-07-22 Thread Simon Glass
On Fri, 21 Jul 2023 at 10:15, Bin Meng wrote: > > Some coding convention fixes for print_resetinfo(). > > Signed-off-by: Bin Meng > --- > > common/board_f.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > Reviewed-by: Simon Glass

Re: [PATCH 1/1] spl: blk: partition numbers are hexadecimal

2023-07-22 Thread Simon Glass
On Sat, 22 Jul 2023 at 04:46, Heinrich Schuchardt wrote: > > Loading u-boot.itb from device 0x00, partition 0x0f fails with: > > Trying to boot from NVME > > Device 0: Vendor: 0x4x Rev: 8.0.50 Prod: nvme-1 > Type: Hard Disk > Capacity: 3814.6 MB = 3.7 GB

Re: [PATCH] rockchip: veyron: Enable Winbond SPI flash

2023-07-22 Thread Simon Glass
On Fri, 21 Jul 2023 at 02:46, Alper Nebi Yasak wrote: > > Some veyron boards seem to have Winbond SPI flash chips instead of > GigaDevice ones. At the very least, coreboot builds for veyron boards > have them enabled [1]. Enable support for them here as well. > > [1]

Re: [PATCH v2 6/6] net: update net_ip6 from link_local address when eth device is changed

2023-07-22 Thread Simon Glass
On Wed, 10 May 2023 at 11:00, Dmitrii Merkurev wrote: > > Current active eth device may be changed (due to ethprime), so make > sure current net_ip6 is updated as a reaction. > > Signed-off-by: Dmitrii Merkurev > Cc: Ying-Chun Liu (PaulLiu) > Cc: Simon Glass > Сс: Joe Hershberger > Сс: Ramon

Re: [PATCH v2 4/6] net: add fastboot TCP6 support

2023-07-22 Thread Simon Glass
Hi Dmitrii, On Wed, 10 May 2023 at 11:00, Dmitrii Merkurev wrote: > > fastboot tcp command remains the same, but started > listening IP6 in case it's enabled. > > Signed-off-by: Dmitrii Merkurev > Cc: Ying-Chun Liu (PaulLiu) > Cc: Simon Glass > Сс: Joe Hershberger > Сс: Ramon Fried > --- >

Re: [PATCH v2 2/6] net: prepare existing TCP stack to be reused by IP6

2023-07-22 Thread Simon Glass
Hi Dmitrii, On Wed, 10 May 2023 at 11:00, Dmitrii Merkurev wrote: > > Changes: > 1. Separate reusable part from net_set_tcp_header to > net_set_tcp_header_common > 2. Make TCP signatures reusable by receiving particular > IP agnostic TCP headers > 3. Extract net_send_ip_packet6 from

Re: [PATCH v2 1/6] net: split IP_TCP header into separate IP/IP6 and TCP headers

2023-07-22 Thread Simon Glass
On Wed, 24 May 2023 at 15:19, Ying-Chun Liu (PaulLiu) wrote: > > Reviewed-by: Ying-Chun Liu (PaulLiu) > > On 2023/5/11 00:59, Dmitrii Merkurev wrote: > > This allows us to reuse TCP logic between IP and IP6 stack. > > > > Signed-off-by: Dmitrii Merkurev > > Cc: Ying-Chun Liu (PaulLiu) > > Cc:

Re: [PATCH v2 1/7] power: regulator: expand basic reference counter onto all uclass

2023-07-22 Thread Simon Glass
Hi Svyatoslav, On Thu, 20 Jul 2023 at 23:23, Svyatoslav Ryhel wrote: > > чт, 20 лип. 2023 р. о 22:43 Simon Glass пише: > > > > Hi Svyatoslav, > > > > On Thu, 20 Jul 2023 at 06:38, Svyatoslav Ryhel wrote: > > > > > > Commit is based on 4fcba5d ("regulator: implement basic reference > > >

Re: [PATCH v3 00/11] Sign Xilinx ZynqMP SPL/FSBL boot images using binman

2023-07-22 Thread Simon Glass
Hi Michal, On Fri, 21 Jul 2023 at 08:41, Michal Simek wrote: > > > > On 7/18/23 13:53, lukas.funke-...@weidmueller.com wrote: > > From: Lukas Funke > > > > > > This series adds two etypes to create a verified boot chain for > > Xilinx ZynqMP devices. The first etype 'xilinx-fsbl-auth' is used

Re: [PATCH v2 2/9] cmd: boot: implement PMIC based poweroff

2023-07-22 Thread Simon Glass
Hi Svyatoslav, On Thu, 20 Jul 2023 at 02:48, Svyatoslav Ryhel wrote: > > Use new PMIC ops to perform device poweroff. > > Signed-off-by: Svyatoslav Ryhel > --- > cmd/Kconfig | 6 ++ > cmd/boot.c | 40 > 2 files changed, 46 insertions(+) > > diff

Re: [PATCH 1/1] doc: update coc/sphinx/requirements.txt

2023-07-22 Thread Simon Glass
On Thu, 20 Jul 2023 at 14:13, Heinrich Schuchardt wrote: subject: doc: > > Update the following requirements to their latest version: > > * Pygments - syntax highlighting > * pytz - world timezone definitions > * certifi - Mozilla's CA bundle > > Signed-off-by: Heinrich Schuchardt > ---

Strange construct in binman description

2023-07-22 Thread Simon Glass
Hi Marcel, I just noticed this in an imx8 description: binman_configuration: @config-SEQ { Since this is a generator node, binman blindly generates a phandle for each not it generates. This means that if there is more than one config node, then they will have duplicate phandles. I have sent a

[PATCH v2 6/6] binman: Support templates containing phandles

2023-07-22 Thread Simon Glass
This provides support for phandles to be copied over from templates. This is not quite safe, since if the template is instantiated twice (i.e. in two different nodes), then duplicate phandles will be found. This will result in an error. Signed-off-by: Simon Glass --- Changes in v2: - Refine

[PATCH v2 5/6] binman: Remove templates after use

2023-07-22 Thread Simon Glass
It is not necessary to keep templates around after they have been processed. They can cause confusion and potentially duplicate phandles. Remove them. Use the same means of detecting a template node in _ReadImageDesc so that the two places are consistent. Signed-off-by: Simon Glass --- (no

[PATCH v2 4/6] fdt: Allow copying phandles into templates

2023-07-22 Thread Simon Glass
Allow phandles to be copied over from a template. This can potentially cause duplicate phandles, so detect this and report an error. Signed-off-by: Simon Glass --- Changes in v2: - Handle phandle copying property and report duplicates tools/dtoc/fdt.py | 28 +++-

[PATCH v2 3/6] dtoc: Add some debugging when copying nodes

2023-07-22 Thread Simon Glass
Show the operations being performed, when debugging is enabled. Convert a mistaken 'print' in test_copy_subnodes_from_phandles() while we are here. Signed-off-by: Simon Glass --- Changes in v2: - Use a 'done' variable to reduce code duplication tools/dtoc/fdt.py | 5 +

[PATCH v2 2/6] dtoc: Make properties dirty when purging them

2023-07-22 Thread Simon Glass
Without the 'dirty' flag properties are not written back to the devicetree when synced. This means that new properties copied over to a node are not always written out. Fix this and add a test. Signed-off-by: Simon Glass --- (no changes since v1) tools/dtoc/fdt.py | 1 +

[PATCH v2 1/6] binman: Produce a template-file after processing

2023-07-22 Thread Simon Glass
This file aids debugging when binman fails to get far enough to write out the final devicetree file. Write it immediate after template processing. Signed-off-by: Simon Glass --- (no changes since v1) tools/binman/binman.rst | 4 tools/binman/control.py | 14 --

[PATCH v2 0/6] binman: Template fixes and improvements

2023-07-22 Thread Simon Glass
With the basic template feature in place, some problems have come to light. Firstly, keeping the template around while processing entries seems unnecessary and perhaps confusing, so this is removed. Secondly this series aims to support phandles in a more intuitive way, rather than just ignoring

Re: [PATCH 1/5] x86: fsp: Use mtrr_set_next_var() for graphics memory

2023-07-22 Thread Simon Glass
Hi Bin, On Fri, 21 Jul 2023 at 10:12, Bin Meng wrote: > > At present this uses mtrr_add_request() & mtrr_commit() combination > to program the MTRR for graphics memory. This usage has two major > issues as below: > > - mtrr_commit() will re-initialize all MTRR registers from index 0, > using

Re: [PATCH 1/1] riscv: qemu: provide more SPL boot methods

2023-07-22 Thread Heinrich Schuchardt
On 7/22/23 16:22, Bin Meng wrote: Hi Heinrich, On Sat, Jul 22, 2023 at 7:10 PM Heinrich Schuchardt wrote: QEMU can supply block devices or semihosting to U-Boot SPL. Allow booting from these. Signed-off-by: Heinrich Schuchardt --- board/emulation/qemu-riscv/qemu-riscv.c | 17

[PATCH 1/1] spl: initialize PCI before booting from SATA

2023-07-22 Thread Heinrich Schuchardt
Many SATA controllers are PCI bus devices. Before calling scsi_scan() we must bind the PCI devices. Signed-off-by: Heinrich Schuchardt --- common/spl/spl_sata.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index 32746ce9f3..060da49006

Re: [PATCH 1/1] spl: spl_legacy: simplify spl_parse_legacy_validate

2023-07-22 Thread Heinrich Schuchardt
On 7/22/23 21:09, Marek Vasut wrote: On 7/22/23 20:46, Heinrich Schuchardt wrote: The check for an overlap of the loaded image and SPL is overly complicated. Fixes: 77aed22b48ab ("spl: spl_legacy: Add extra address checks") Signed-off-by: Heinrich Schuchardt ---   common/spl/spl_legacy.c |

[RFC PATCH v2 4/4] arm: dts: k3-am625-sk-u-boot.dtsi: drop cpsw-phy-sel property

2023-07-22 Thread Roger Quadros
This was a custom property and we don't need it anymore. We are now using the standard property "phys" to get the PHY port control register. Signed-off-by: Roger Quadros --- arch/arm/dts/k3-am625-sk-u-boot.dtsi | 7 --- 1 file changed, 7 deletions(-) diff --git

[RFC PATCH v2 3/4] arm: dts: k3-am625-sk-u-boot.dtsi: drop mac_efuse

2023-07-22 Thread Roger Quadros
This was a custom property and we don't need it anymore. We are now using the standard property "ti,syscon-efuse". Signed-off-by: Roger Quadros --- arch/arm/dts/k3-am625-sk-u-boot.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/dts/k3-am625-sk-u-boot.dtsi

[PATCH v2 2/4] net: ti: am65-cpsw-nuss: Get port mode register from standard "phys" property

2023-07-22 Thread Roger Quadros
Approved DT binding has the port mode register in the "phys" property. Get it from there instead of the custom "cpsw-phy-sel" property. This will allow us to keep DT in sync with Linux. Signed-off-by: Roger Quadros --- drivers/net/ti/am65-cpsw-nuss.c | 63 +++-- 1

[PATCH v2 1/4] net: ti: am65-cpsw-nuss: Use approved property to get efuse address

2023-07-22 Thread Roger Quadros
The approved DT property for MAC efuse (ROM) address is "ti,syscon-efuse". Use that and drop custom property "mac_efuse". Signed-off-by: Roger Quadros --- drivers/net/ti/Kconfig | 1 + drivers/net/ti/am65-cpsw-nuss.c | 52 +++-- 2 files changed, 37

[PATCH v2 0/4] net: ti: am65-cpsw-nuss: Drop custom properties

2023-07-22 Thread Roger Quadros
Hi, This series gets rid of 2 custom properties (mac_efuse and cpsw-phy-sel) that were used in u-boot for the cpsw3g node. This makes it easier for us to have u-boot DT in sync with Linux. Last 2 patches are RFC so they can come separately. i.e. squashed with DT cleanup series from Nishanth.

[PATCH 1/1] spl: add FIT support to semihosting boot method

2023-07-22 Thread Heinrich Schuchardt
Allow loading a FIT image via semihosting in SPL. Signed-off-by: Heinrich Schuchardt --- common/spl/spl_semihosting.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/common/spl/spl_semihosting.c b/common/spl/spl_semihosting.c index 5b5e842a11..f7dd289286

Re: [PATCH 1/1] spl: spl_legacy: simplify spl_parse_legacy_validate

2023-07-22 Thread Marek Vasut
On 7/22/23 20:46, Heinrich Schuchardt wrote: The check for an overlap of the loaded image and SPL is overly complicated. Fixes: 77aed22b48ab ("spl: spl_legacy: Add extra address checks") Signed-off-by: Heinrich Schuchardt --- common/spl/spl_legacy.c | 5 + 1 file changed, 1

[PATCH 1/1] spl: spl_legacy: simplify spl_parse_legacy_validate

2023-07-22 Thread Heinrich Schuchardt
The check for an overlap of the loaded image and SPL is overly complicated. Fixes: 77aed22b48ab ("spl: spl_legacy: Add extra address checks") Signed-off-by: Heinrich Schuchardt --- common/spl/spl_legacy.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

Re: [PATCH 0/2] Fix network commands w/ USB Eth gadget

2023-07-22 Thread Tom Rini
On Sat, Jul 22, 2023 at 12:25:35AM +0200, Miquel Raynal wrote: > Hello, > > I recently came across serious issues using U-Boot on Beagle Bone > Black. The USB Ethernet gadget is behaving in a way that is not > compliant with the uclass expectations, leading to use-after-free > accesses often

Re: [PATCH 1/1] riscv: qemu: provide more SPL boot methods

2023-07-22 Thread Bin Meng
Hi Heinrich, On Sat, Jul 22, 2023 at 7:10 PM Heinrich Schuchardt wrote: > > QEMU can supply block devices or semihosting to U-Boot SPL. Allow booting > from these. > > Signed-off-by: Heinrich Schuchardt > --- > board/emulation/qemu-riscv/qemu-riscv.c | 17 ++--- > 1 file changed,

[PATCH v3 3/3] board: rockchip: Add Hardkernel ODROID-M1

2023-07-22 Thread Jonas Karlman
Hardkernel ODROID-M1 is a single board computer with a RK3568B2 SoC, a slightly modified version of the RK3568 SoC. Features tested on a ODROID-M1 8GB v1.0 2022-06-13: - SD-card boot - eMMC boot - SPI Flash boot - PCIe/NVMe/AHCI - SATA port - USB host Device tree is imported from linux v6.4.

[PATCH v3 2/3] cmd: ini: Fix build warning

2023-07-22 Thread Jonas Karlman
Building U-Boot with CMD_INI=y result in following build warning: cmd/ini.c: In function 'memgets': include/linux/kernel.h:184:24: warning: comparison of distinct pointer types lacks a cast 184 | (void) (&_min1 == &_min2); \ |^~

[PATCH v3 0/3] board: rockchip: Add Hardkernel ODROID-M1

2023-07-22 Thread Jonas Karlman
This series add support for Hardkernel ODROID-M1, a single board computer with a RK3568B2 SoC. First patch fixes a build issue in the dwc_ahci driver. Second patch fixes a build warning in the ini command. Third patch import the device tree from linux v6.4 and add a defconfig for Hardkernel

[PATCH v3 1/3] ata: dwc_ahci: Fix support for other platforms

2023-07-22 Thread Jonas Karlman
The dwc_ahci driver use platform specific defines, place the platform specific code behind a ifdef CONFIG_ARCH_OMAP2PLUS to allow build and use of the driver on Rockchip platform. Fixes: 02a4b4297901 ("drivers: block: dwc_ahci: Implement a driver for Synopsys DWC sata device") Signed-off-by:

[PATCH v4 9/9] rockchip: rk356x: Update PCIe config, IO and memory regions

2023-07-22 Thread Jonas Karlman
Update config, IO and memory regions used based on [1] with pcie3x2 config reg address and reg size corrected. Before this change: PCI Autoconfig: Bus Memory region: [0-3eef], PCI Autoconfig: Bus I/O region: [3ef0-3eff], After this change: PCI Autoconfig: Bus Memory region:

[PATCH v4 7/9] rockchip: clk: clk_rk3568: Add CLK_PCIEPHY2_REF support

2023-07-22 Thread Jonas Karlman
Add dummy support for the CLK_PCIEPHY2_REF clock. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- v4: - No change v3: - No change v2: - Collect r-b tag drivers/clk/rockchip/clk_rk3568.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk_rk3568.c

[PATCH v4 8/9] rockchip: rk3568-rock-3a: Enable PCIe and NVMe support

2023-07-22 Thread Jonas Karlman
Add missing pinctrl and defconfig options to enable PCIe and NVMe support on Radxa ROCK 3 Model A. Use of pcie20m1_pins and pcie30x2m1_pins ensure IO mux selection M1. The following pcie_reset_h and pcie3x2_reset_h ensure GPIO func is restored to the perstn pin, a workaround to avoid having to

[PATCH v4 6/9] regulator: fixed: Add support for gpios prop

2023-07-22 Thread Jonas Karlman
The commit 12df2c182ccb ("regulator: dt-bindings: fixed-regulator: allow gpios property") in linux v6.3-rc1 added support for use of either a gpios or gpio prop with a fixed-regulator. This adds support for the new gpios prop to the fixed-regulator driver. gpios prop is used by

[PATCH v4 5/9] pci: pcie_dw_rockchip: Disable unused BARs of the root complex

2023-07-22 Thread Jonas Karlman
From: Jon Lin The Root Complex BARs default to claim the full 1 GiB memory region on RK3568, leaving no space for any attached device. Fix this by disable the unused BAR 0 and BAR 1 of the RC. Signed-off-by: Jon Lin [jo...@kwiboo.se: Move to rk_pcie_configure and use PCI_BASE_ADDRESS_0/1

[PATCH v4 4/9] pci: pcie_dw_rockchip: Speed up link probe

2023-07-22 Thread Jonas Karlman
Use a similar pattern and delay values as the linux mainline driver to speed up failing when nothing is connected. Reduce fail speed from around 5+ seconds down to around one second on a Radxa ROCK 3 Model A, where pcie2x1 is probed before pcie3x2 M2 slot. Signed-off-by: Jonas Karlman

[PATCH v4 3/9] pci: pcie_dw_rockchip: Use regulator_set_enable_if_allowed

2023-07-22 Thread Jonas Karlman
The vpcie3v3 regulator is typically a fixed regulator controlled using gpio. Change to use enable and disable calls on the regulator instead of trying to set a voltage value. Also remove the delay to match linux driver, for a fixed regulator the startup-delay-us prop can be used in case a startup

[PATCH v4 2/9] pci: pcie_dw_rockchip: Get config region from reg prop

2023-07-22 Thread Jonas Karlman
Get the config region to use from the reg prop. Also update the referenced region index used in comment. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- v4: - No change v3: - No change v2: - Use dev_read_addr_size_index_ptr - Collect r-b tag drivers/pci/pcie_dw_common.c | 10

[PATCH v4 0/9] rockchip: Fix PCIe and NVMe support on RK3568

2023-07-22 Thread Jonas Karlman
This series fixes and enables PCIe and NVMe support on RK3568. Patch 1 adds a dev_read_addr_size_index_ptr function. Patch 2-3 fixes main issue in the driver to be usable on RK3568. Patch 4 fixes a long wait time during probe when no device is attached. Patch 5 disable BARs of the root complex

[PATCH v4 1/9] core: read: add dev_read_addr_size_index_ptr function

2023-07-22 Thread Jonas Karlman
Add dev_read_addr_size_index_ptr function with the same functionality as dev_read_addr_size_index, but instead a return pointer is given. Use map_sysmem() function as cast for the return. Signed-off-by: Jonas Karlman Reviewed-by: Kever Yang --- v4: - No change v3: - Collect r-b tag v2: - New

[PATCH 1/1] riscv: qemu: provide more SPL boot methods

2023-07-22 Thread Heinrich Schuchardt
QEMU can supply block devices or semihosting to U-Boot SPL. Allow booting from these. Signed-off-by: Heinrich Schuchardt --- board/emulation/qemu-riscv/qemu-riscv.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/board/emulation/qemu-riscv/qemu-riscv.c

[PATCH 1/1] spl: blk: partition numbers are hexadecimal

2023-07-22 Thread Heinrich Schuchardt
Loading u-boot.itb from device 0x00, partition 0x0f fails with: Trying to boot from NVME Device 0: Vendor: 0x4x Rev: 8.0.50 Prod: nvme-1 Type: Hard Disk Capacity: 3814.6 MB = 3.7 GB (7812500 x 512) ** Invalid partition 21 ** Couldn't find

Re: [PATCH v2 3/3] fixup! arm: dts: k3-am62: Bump dtsi from linux v6.5-rc1

2023-07-22 Thread Roger Quadros
On 21/07/2023 16:07, Maxime Ripard wrote: > Dropping ranges entirely doesn't work since the register offset on the > MDIO device node will now be completely off, so we need to adjust it to > the right value without the translation. > > We also need to have an empty ranges property for the reg

Re: [PATCH v2 2/3] fixup! arm: dts: k3-am62: Bump dtsi from linux v6.5-rc1

2023-07-22 Thread Roger Quadros
On 21/07/2023 16:07, Maxime Ripard wrote: > The MDIO pinctrl nodes can't be duplicated between the child and device, > because if we ever boot Linux with our DT it will try to attach that > pinctrl configuration to both the MAC and MDIO devices, which will > result in failure to probe. > >

Re: [PATCH v2 1/3] net: ti: am65-cpsw-nuss: Enforce pinctrl state on the MDIO child node

2023-07-22 Thread Roger Quadros
On 21/07/2023 16:07, Maxime Ripard wrote: > The binding represents the MDIO controller as a child device tree > node of the MAC device tree node. > > The U-Boot driver mostly ignores that child device tree node and just > hardcodes the resources it uses to support both the MAC and MDIO in a >

Re: [PATCH] usb: cdns3: gadget: Configure speed in udc_start

2023-07-22 Thread Roger Quadros
On 19/07/2023 11:59, Ravi Gunasekaran wrote: > When one of the functions does not support super speed, the composite > driver forces the gadget to high speed. But the speed is never > configured in the cdns3 gadget driver. So configure the speed > in cdns3_gadget_udc_start just like in the

Re: [PATCH] net: ksz9477: add support for KSZ9893 GbE switch

2023-07-22 Thread Ramon Fried
On Thu, Jun 29, 2023 at 1:18 AM Karsten Wiese wrote: > > Copy and tweak the required code from the linux kernel. > Only the KSZ9893 has been tested. > > Signed-off-by: Karsten Wiese > > --- > drivers/net/ksz9477.c | 103 -- > 1 file changed, 89