Re: [PATCH v5 4/6] configs: am62x_evm_*: Enable USB and DFU support

2024-07-12 Thread Martyn Welch
On Thu, 2024-07-11 at 16:41 -0500, Jon Humphreys wrote: > Jon Humphreys writes: > > > Martyn Welch writes: > > > > > On Thu, 2024-05-23 at 15:08 -0500, Jon Humphreys wrote: > > > > Martyn Welch writes: > > > > > > > > > From: Sjoerd Simons > > > > > > > > > > Provide config fragments to ena

Re: [PATCH v2] amd: Enable the NFS command for Versal Gen 2

2024-07-12 Thread Michal Simek
On 7/11/24 18:57, Prasad Kummari wrote: Enabled the default utilization of the NFS command on Versal Gen 2 platform to facilitate booting images through the network using the NFS protocol Signed-off-by: Prasad Kummari --- Changes in v2: - corrected commit description. configs/amd_versal2_

Re: [PATCH 2/2] ext4: Fix zalloc()

2024-07-12 Thread Richard Weinberger
Tom, Am Donnerstag, 11. Juli 2024, 17:45:17 CEST schrieb Tom Rini: > The problem here is that "zalloc" is inline and so this change causes > about 1KiB of growth on platforms which enable ext4 and so at least > mx6sabresd now overflows it's maximum size. Looking harder, I think the > best solution

[PATCH] reloc_bootstage: Fix out-of-bounds read

2024-07-12 Thread Richard Weinberger
bootstage_get_size() returns the total size of the data structure including associated records. When copying from gd->bootstage, only the allocation size of gd->bootstage must be used. Otherwise too much memory is copied. This bug caused no harm so far because gd->new_bootstage is always large eno

Re: env: CONFIG_DEFAULT_ENV_FILE and CFG_EXTRA_ENV_SETTINGS

2024-07-12 Thread Rasmus Villemoes
Tony Dinh writes: > Hi Tom, > > I'm trying to move some envs from a board header file to the default > env file. I recall that the envs in CONFIG_DEFAULT_ENV_FILE are > appended to the envs in CFG_EXTRA_ENV_SETTINGS. As you mentioned here > before: > > https://lore.kernel.org/all/20220810170439.G

[PATCH 1/4] squashfs: Fix integer overflow in sqfs_resolve_symlink()

2024-07-12 Thread Richard Weinberger
A carefully crafted squashfs filesystem can exhibit an inode size of 0x, as a consequence malloc() will do a zero allocation. Later in the function the inode size is again used for copying data. So an attacker can overwrite memory. Avoid the overflow by using the __builtin_add_overflow() he

[PATCH 2/4] squashfs: Fix integer overflow in sqfs_inode_size()

2024-07-12 Thread Richard Weinberger
A carefully crafted squashfs filesystem can exhibit an extremly large inode size and overflow the calculation in sqfs_inode_size(). As a consequence, the squashfs driver will read from wrong locations. Fix by using __builtin_add_overflow() to detect the overflow. Signed-off-by: Richard Weinberger

[PATCH 3/4] squashfs: Check sqfs_find_inode() return value

2024-07-12 Thread Richard Weinberger
The function can fail and return NULL. Signed-off-by: Richard Weinberger --- fs/squashfs/sqfs.c | 17 + 1 file changed, 17 insertions(+) diff --git a/fs/squashfs/sqfs.c b/fs/squashfs/sqfs.c index 16a07c0622..fa99d514f2 100644 --- a/fs/squashfs/sqfs.c +++ b/fs/squashfs/sqfs.c @@

[PATCH 4/4] squashfs: Fix stack overflow while symlink resolving

2024-07-12 Thread Richard Weinberger
The squashfs driver blindly follows symlinks, and calls sqfs_size() recursively. So an attacker can create a crafted filesystem and with a deep enough nesting level a stack overflow can be achieved. Fix by limiting the nesting level to 8. Signed-off-by: Richard Weinberger --- fs/squashfs/sqfs.c

[PATCH] fat: fat2rtc: Sanitize timestamps

2024-07-12 Thread Richard Weinberger
Make sure that tm_mday and tm_mon are within the expected range. Upper layers such as rtc_calc_weekday() will use them as lookup keys for arrays and this can cause out of bounds memory accesses. Signed-off-by: Richard Weinberger --- fs/fat/fat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 dele

Re: [PATCH 00/12] clk: mediatek: add OPs to support OF_UPSTREAM

2024-07-12 Thread Christian Marangi
On Fri, Jun 28, 2024 at 07:40:45PM +0200, Christian Marangi wrote: > This series doesn't currently change anything and it does add all the > additional OPs to make support of OF_UPSTREAM. > > While converting the mt7681/7686/7688/7623/7622 it was notice lots of > discrepancy between the downstream

[PATCH v2 0/2] a little RPi watchdog cleanup

2024-07-12 Thread Rasmus Villemoes
Two related leftovers I found while looking at remaining hw_watchdog/CONFIG_HW_WATCHDOG items. v2: Add Stefan's R-bs. Trim commit log in patch 1. No code changes. CI: https://dev.azure.com/u-boot/u-boot/_build/results?buildId=8910&view=results I'm pretty sure the only failures are the false posi

[PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block

2024-07-12 Thread Rasmus Villemoes
This was added in commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836 watchdog), which did do 'select HW_WATCHDOG'. That incarnation of the watchdog driver later got removed in c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references), but this block wa

[PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable

2024-07-12 Thread Rasmus Villemoes
This empty stub was originally added as one branch of an #ifdef in commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836 watchdog). That incarnation of the rpi watchdog driver was later removed in c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unused BCM283x watchdog driver and its references),

Re: [PATCH] fat: fat2rtc: Sanitize timestamps

2024-07-12 Thread Heinrich Schuchardt
Am 12. Juli 2024 10:24:54 MESZ schrieb Richard Weinberger : >Make sure that tm_mday and tm_mon are within the expected >range. Upper layers such as rtc_calc_weekday() will use >them as lookup keys for arrays and this can cause out of >bounds memory accesses. rtc_calc_weekday() might receive inv

[PATCH v3] net/tftp: make tftpput working with servers that do not use OACK

2024-07-12 Thread Mikhail Kshevetskiy
Option Acknowledgment (OACK) is an extension of TFTP protocol (see rfc2347). Not all tftp servers implements it. For example it does not supported by tftpd server from debian-11 (https://packages.debian.org/bullseye/tftpd). Starting the "tftpput $loadaddr $size out_file" command with such server w

Re: [PATCH] fat: fat2rtc: Sanitize timestamps

2024-07-12 Thread Richard Weinberger
Am Freitag, 12. Juli 2024, 11:46:08 CEST schrieb 'Heinrich Schuchardt' via upstream: > Am 12. Juli 2024 10:24:54 MESZ schrieb Richard Weinberger : > >Make sure that tm_mday and tm_mon are within the expected > >range. Upper layers such as rtc_calc_weekday() will use > >them as lookup keys for arr

Re: [PATCH v2 1/2] arm: bcm283x: remove unused empty hw_watchdog_disable

2024-07-12 Thread Peter Robinson
On Fri, 12 Jul 2024 at 10:07, Rasmus Villemoes wrote: > > This empty stub was originally added as one branch of an #ifdef in > commit 45a6d231b2f (bcm2835_wdt: support for the BCM2835/2836 > watchdog). That incarnation of the rpi watchdog driver was later > removed in c7adc0b5f98 (watchdog: bcm283

Re: [PATCH v2 2/2] board: rpi: remove leftover CONFIG_HW_WATCHDOG block

2024-07-12 Thread Peter Robinson
On Fri, 12 Jul 2024 at 10:07, Rasmus Villemoes wrote: > > This was added in commit 45a6d231b2f (bcm2835_wdt: support for the > BCM2835/2836 watchdog), which did do 'select HW_WATCHDOG'. That > incarnation of the watchdog driver later got removed in > c7adc0b5f98 (watchdog: bcm2835_wdt: Remove unus

Re: [PATCH] board: raspberrypi: Fix format specifier for printing rev_scheme

2024-07-12 Thread Peter Robinson
On Tue, 9 Jul 2024 at 13:20, Francois Berder wrote: > > rev_scheme is an unsigned integer and must not be printed > as a signed integer. > Reviewed-by: Peter Robinson > Signed-off-by: Francois Berder > --- > board/raspberrypi/rpi/rpi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH 1/2] ext4: Fix integer overflow in ext4fs_read_symlink()

2024-07-12 Thread Heinrich Schuchardt
On 02.07.24 21:42, Richard Weinberger wrote: While zalloc() takes a size_t type, adding 1 to the le32 variable will overflow. A carefully crafted ext4 filesystem can exhibit an inode size of 0x and as consequence zalloc() will do a zero allocation. Later in the function the inode size is

Re: [PATCH 1/2] ext4: Fix integer overflow in ext4fs_read_symlink()

2024-07-12 Thread Richard Weinberger
Am Freitag, 12. Juli 2024, 13:10:12 CEST schrieb 'Heinrich Schuchardt' via upstream: > On 02.07.24 21:42, Richard Weinberger wrote: > > While zalloc() takes a size_t type, adding 1 to the le32 variable > > will overflow. > > A carefully crafted ext4 filesystem can exhibit an inode size of 0xff

Re: [PATCH 2/2] ext4: Fix zalloc()

2024-07-12 Thread Heinrich Schuchardt
On 02.07.24 21:42, Richard Weinberger wrote: The zalloc() function suffers from two problems. 1. If memalign() fails it will return NULL and memset() will use a NULL pointer. 2. memalign() itself seems to crash when more than 2^32 bytes are requested. So, check the return value of memalign() and

Re: [PATCH 1/2] ext4: Fix integer overflow in ext4fs_read_symlink()

2024-07-12 Thread Heinrich Schuchardt
On 12.07.24 13:14, Richard Weinberger wrote: Am Freitag, 12. Juli 2024, 13:10:12 CEST schrieb 'Heinrich Schuchardt' via upstream: On 02.07.24 21:42, Richard Weinberger wrote: While zalloc() takes a size_t type, adding 1 to the le32 variable will overflow. A carefully crafted ext4 filesystem ca

Re: [PATCH 1/2] ext4: Fix integer overflow in ext4fs_read_symlink()

2024-07-12 Thread Richard Weinberger
Am Freitag, 12. Juli 2024, 13:19:32 CEST schrieb Heinrich Schuchardt: > > Hm, I see man built-ins in the U-Boot source. > > Why is this one special? > > See the definition of COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW in > include/linux/compiler-clang.h. So I can't use __builtin_add_overflow() because

Re: [PATCH 2/2] ext4: Fix zalloc()

2024-07-12 Thread Richard Weinberger
Am Freitag, 12. Juli 2024, 13:15:56 CEST schrieb 'Heinrich Schuchardt' via upstream: > Memalign() is called in many code locations. > > If memalign() has a bug, it needs to be fixed in memalign. We should not > try to work around it in all callers. Agreed, I did already: See https://lists.denx.d

Pull request: rpi-2024.10 rc1

2024-07-12 Thread Peter Robinson
Hi Tom, Please pull the updates for the Raspberry Pi: Updates for RPi for 2024.10: - board: rpi: remove leftover CONFIG_HW_WATCHDOG block - arm: bcm283x: remove unused empty hw_watchdog_disable - board: raspberrypi: Fix format specifier for printing rev_scheme - Revert "arm: dts: bcm283x: Add min

Re: [PATCH] fat: fat2rtc: Sanitize timestamps

2024-07-12 Thread Heinrich Schuchardt
On 12.07.24 11:51, Richard Weinberger wrote: Am Freitag, 12. Juli 2024, 11:46:08 CEST schrieb 'Heinrich Schuchardt' via upstream: Am 12. Juli 2024 10:24:54 MESZ schrieb Richard Weinberger : Make sure that tm_mday and tm_mon are within the expected range. Upper layers such as rtc_calc_weekday()

Re: [RESEND PATCH v2 3/5] net: dwc_eth_qos: Adapt probe() for PCI devices

2024-07-12 Thread Philip Oberfichtner
Hi Marek, Thank you for the review! On Sun, Jun 30, 2024 at 07:33:33AM +0200, Marek Vasut wrote: > On 6/24/24 10:34 AM, Philip Oberfichtner wrote: > > PCI devices do not necessarily use a device tree. In that case, the > > driver currently fails to find eqos->config and eqos->regs. > > > > Thi

[PATCH uboot] dt-bindings: clock: rcar-gen2: Remove obsolete header files

2024-07-12 Thread Geert Uytterhoeven
The clock definitions in were superseded by those in a long time ago. In fact U-Boot never used . The unused headers, their replacements, and the corresponding r8a779?.dtsi files were introduced together in U-Boot v2018.03. Fixes: 16b6e4aa3732cee1 ("ARM: dts: rmobile: Import R8A7790 DTS from Li

Re: [RESEND PATCH v2 5/5] net: dwc_eth_qos: Add glue driver for Intel MAC

2024-07-12 Thread Philip Oberfichtner
Hi Marek, On Sun, Jun 30, 2024 at 07:38:43AM +0200, Marek Vasut wrote: > On 6/24/24 10:34 AM, Philip Oberfichtner wrote: > > > +++ b/drivers/net/dwc_eth_qos_intel.c > > @@ -0,0 +1,446 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * Copyright (c) 2023 DENX Software Engineering GmbH > >

Re: [GIT PULL] Please pull u-boot-dfu-20240711

2024-07-12 Thread Tom Rini
On Thu, Jul 11, 2024 at 03:09:58PM +0200, Mattijs Korpershoek wrote: > Hi Tom, > > Please find some new developments for master: > > Usb gadget: > - A welcome cleanup: epautoconf workaround is dropped to use > .match_ep() instead > - Introduce handle_interrupts() op for USB_GADGET_GENERIC, whi

Re: [PATCH RFC 1/3] drop unused kallsyms support

2024-07-12 Thread Tom Rini
On Wed, Jul 10, 2024 at 06:26:18PM +0200, Caleb Connolly wrote: > There was some very old code floating around for decoding symbols, it's > incomplete and is never built. Remove it so we can add a new > implementation. > > Signed-off-by: Caleb Connolly Reviewed-by: Tom Rini -- Tom signatur

Re: [PATCH RFC 2/3] add support for symbol lookups

2024-07-12 Thread Tom Rini
On Wed, Jul 10, 2024 at 06:26:19PM +0200, Caleb Connolly wrote: > This is mostly a port of the Xen hypervisor implementation. The U-Boot > binary is built as normal, then its symbol table is fed into > tools/symbols to generate an optimised lookup table. U-Boot is rebuilt > with the symbol table a

Re: [PATCH RFC 3/3] arm64: unwind stack on exception

2024-07-12 Thread Tom Rini
On Wed, Jul 10, 2024 at 06:26:20PM +0200, Caleb Connolly wrote: > We already build arm64 images with frame pointers. Let's finally make > use of them in tandem with the new symbol lookup support by unwinding > the stack when an exception occurs, producing a backtrace similar to > those emitted by

Re: [PATCH RFC 0/3] ARM64: add symbol name lookup and print a backtrace on exception

2024-07-12 Thread Tom Rini
On Wed, Jul 10, 2024 at 06:26:17PM +0200, Caleb Connolly wrote: > U-Boot already emits frame pointers on ARM64, but lacks the code to > parse them, as well as a mechanism for looking up symbol names at > runtime. > > There was some (seemingly?) leftover code for symbols lookups in > common/kallsy

Re: adding fdt-overlay function - help needed

2024-07-12 Thread Tom Rini
On Thu, Jul 11, 2024 at 01:23:32PM +0200, Frank Wunderlich wrote: > Hi, > > i got a bit further and noticed, that required command is not available in > uboot...this is normally part of the dtc package [1], so why is it missing in > u-boot? > I guess later added or dropped to reduce compile tim

Re: env: CONFIG_DEFAULT_ENV_FILE and CFG_EXTRA_ENV_SETTINGS

2024-07-12 Thread Tom Rini
On Fri, Jul 12, 2024 at 10:14:27AM +0200, Rasmus Villemoes wrote: > Tony Dinh writes: > > > Hi Tom, > > > > I'm trying to move some envs from a board header file to the default > > env file. I recall that the envs in CONFIG_DEFAULT_ENV_FILE are > > appended to the envs in CFG_EXTRA_ENV_SETTINGS.

[PATCH v2 0/6] power: pmic: sunxi: consolidate AXP SPL drivers

2024-07-12 Thread Andre Przywara
Hi, v2 of this series merges the AXP717 support patches in, as they didn't make it into the tree yet. As there is little point in creating a separate AXP717 SPL driver file, just to delete it again two patches later, this series skips the separate file altogether. I put in the related AXP717 U-Boo

[PATCH v2 1/6] power: regulator: add AXP717 support

2024-07-12 Thread Andre Przywara
The X-Powers AXP717 is a PMIC with four buck converters and a number of LDOs, one of which is actually fixed (so not modelled here). Add the compatible string and the respective regulator ranges to allow drivers to adjust voltages. Signed-off-by: Andre Przywara Reviewed-by: Ryan Walklin --- dr

[PATCH v2 2/6] power: pmic: sunxi: only build AXP drivers for SPL

2024-07-12 Thread Andre Przywara
The axp.c drivers are only used for the SPL, for U-Boot proper we have a separate, DM compliant driver. Mask the build instructions with CONFIG_SPL_BUILD, to avoid them being build for U-Boot proper as well. Signed-off-by: Andre Przywara --- drivers/power/Makefile | 2 ++ 1 file changed, 2 inser

[PATCH v2 3/6] power: pmic: sunxi: introduce generic SPL AXP DC/DC driver

2024-07-12 Thread Andre Przywara
So far we had a separate driver file for each AXP PMIC chip that we need to support in the SPL. The code in there was largely similar, but differed in many details. Based on the idea of the DM AXP driver, introduce a data structure to describe each regulator in a compact way. This is a simplified

[PATCH v2 4/6] power: pmic: sunxi: add AXP717 SPL support

2024-07-12 Thread Andre Przywara
On boards using the AXP717 PMIC, the DRAM rail is often not setup correctly at reset time, so we have to program the PMIC very early in the SPL, before running the DRAM initialisation. Using the new generic AXP SPL driver, add the Kconfig options and platform bits needed to support an AXP717 PMIC

[PATCH v2 5/6] power: pmic: sunxi: use generic AXP SPL driver for AXP313

2024-07-12 Thread Andre Przywara
The generic AXP SPL driver implementation can cover all regulators we need for the AXP313. Add the descriptions for the three DC/DC regulators of the AXP313, and enable that when CONFIG_AXP313_POWER is enabled. Also remove the old driver, and switch the Makefile to include the new, generic version

[PATCH v2 6/6] power: pmic: sunxi: use generic AXP SPL driver for AXP305

2024-07-12 Thread Andre Przywara
The generic AXP SPL driver implementation can cover all regulators we need for the AXP305. Add the descriptions for four of the six DC/DC regulators of the AXP305, and enable that when CONFIG_AXP305_POWER is enabled. We won't need DCDC2 and DCDC3, but by using the position in the array for the ind

Re: [PATCH 1/2] ext4: Fix integer overflow in ext4fs_read_symlink()

2024-07-12 Thread Tom Rini
On Fri, Jul 12, 2024 at 01:26:35PM +0200, Richard Weinberger wrote: > Am Freitag, 12. Juli 2024, 13:19:32 CEST schrieb Heinrich Schuchardt: > > > Hm, I see man built-ins in the U-Boot source. > > > Why is this one special? > > > > See the definition of COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW in > >

Re: [PATCH] fat: fat2rtc: Sanitize timestamps

2024-07-12 Thread Tom Rini
On Fri, Jul 12, 2024 at 11:51:06AM +0200, Richard Weinberger wrote: > Am Freitag, 12. Juli 2024, 11:46:08 CEST schrieb 'Heinrich Schuchardt' via > upstream: > > Am 12. Juli 2024 10:24:54 MESZ schrieb Richard Weinberger : > > >Make sure that tm_mday and tm_mon are within the expected > > >range. U

Re: [PATCH uboot] dt-bindings: clock: rcar-gen2: Remove obsolete header files

2024-07-12 Thread Tom Rini
On Fri, Jul 12, 2024 at 03:17:38PM +0200, Geert Uytterhoeven wrote: > The clock definitions in were > superseded by those in a long > time ago. > > In fact U-Boot never used . > The unused headers, their replacements, and the corresponding > r8a779?.dtsi files were introduced together in U-Boot

Re: adding fdt-overlay function - help needed

2024-07-12 Thread Frank Wunderlich
Am 12. Juli 2024 18:49:02 MESZ schrieb Tom Rini : >On Thu, Jul 11, 2024 at 01:23:32PM +0200, Frank Wunderlich wrote: > >> Hi, >> >> i got a bit further and noticed, that required command is not available in >> uboot...this is normally part of the dtc package [1], so why is it missing >> in u-boo

[PATCH 0/2] spi: sunxi: Improve the loading speed

2024-07-12 Thread Michael Walle
Right now, the maximal transfer speed from an SPI flash on a V3s is about 240kb/s. That is pretty slow. It turns out, that due to an error u-boot is setting the maximum frequency to 1MHz. By fixing that another bug is unearthed: one cannot set a clock divider of 1:1 due to the handling between CDR1

[PATCH 1/2] spi: sunxi: drop max_hz handling

2024-07-12 Thread Michael Walle
The driver is trying to read the "spi-max-frequency" property of the *controller* driver node. There is no such property. The "spi-max-frequency" property belongs to the SPI devices on the bus. Right now, the driver will always fall back to the default value of 1MHz and thus flash reads are very s

[PATCH 2/2] spi: sunxi: fix clock divider calculation for max frequency setting

2024-07-12 Thread Michael Walle
If the maximum frequency is requested, we still fall into the CDR2 handling. But there the minimal divider is 2. For the sun6i and sun8i we can do better with the CDR1 setting where the minimal divider is 1: SPI_CLK = MOD_CLK / 2 ^ cdr with cdr = 0 Thus, handle the div = 1 case specially. While

Re: [PATCH 0/2] spi: sunxi: Improve the loading speed

2024-07-12 Thread Peter Robinson
On Fri, 12 Jul 2024 at 18:25, Michael Walle wrote: > > Right now, the maximal transfer speed from an SPI flash on a V3s is > about 240kb/s. That is pretty slow. It turns out, that due to an > error u-boot is setting the maximum frequency to 1MHz. By fixing > that another bug is unearthed: one cann

Re: Pull request: rpi-2024.10 rc1

2024-07-12 Thread Tom Rini
On Fri, Jul 12, 2024 at 12:36:32PM +0100, Peter Robinson wrote: > Hi Tom, > > Please pull the updates for the Raspberry Pi: > > Updates for RPi for 2024.10: > - board: rpi: remove leftover CONFIG_HW_WATCHDOG block > - arm: bcm283x: remove unused empty hw_watchdog_disable > - board: raspberrypi:

Re: [PATCH 0/2] spi: sunxi: Improve the loading speed

2024-07-12 Thread Michael Walle
Right now, the maximal transfer speed from an SPI flash on a V3s is about 240kb/s. That is pretty slow. It turns out, that due to an error u-boot is setting the maximum frequency to 1MHz. By fixing that another bug is unearthed: one cannot set a clock divider of 1:1 due to the handling between CDR

Re: env: CONFIG_DEFAULT_ENV_FILE and CFG_EXTRA_ENV_SETTINGS

2024-07-12 Thread Tony Dinh
On Fri, Jul 12, 2024 at 9:50 AM Tom Rini wrote: > > On Fri, Jul 12, 2024 at 10:14:27AM +0200, Rasmus Villemoes wrote: > > Tony Dinh writes: > > > > > Hi Tom, > > > > > > I'm trying to move some envs from a board header file to the default > > > env file. I recall that the envs in CONFIG_DEFAULT_E

[PATCH] clk: imx6q: Add definition for IMX6QDL_CLK_I2C3

2024-07-12 Thread Emil Kronborg
Commit 727fa4539ca2 ("clk: Add support for I2C clocks on NXP's imx6q SoC which use CCF") added I2C clocks for I2C1 and I2C2, but not I2C3. Consequently, devices using I2C3 fail after enabling CONFIG_CLK_IMX6Q and thus CONFIG_CLK. Therefore, this commit adds the last I2C clock. Signed-off-by: Emil

[PATCH] clk: imx6q: Add definition for IMX6QDL_CLK_PWM1

2024-07-12 Thread Emil Kronborg
Enabling CONFIG_CMD_PWM, and consequently CONFIG_DM_PWM, causes the pwm command to fail due to a missing clock. => pwm enable 0 0 Enable clock-controller@20c4000 failed Failed to enable per_clk pwm: '0' not found Command 'pwm' failed: Error -2 Note that it is trivial to also a

[PATCH 0/5] arm: exynos: Enable TRNG for E850-96 board

2024-07-12 Thread Sam Protsenko
This series enables True Random Number Generator (TRNG) for E850-96 board. Here is a short breakdown of features implemented in this series: 1. Load LDFW (Loadable Firmware) on E850-96 board. It's needed to make TRNG SMC commands functional. To do so, add the default eMMC partition tab

[PATCH 2/5] board: samsung: e850-96: Load LDFW firmware on board init

2024-07-12 Thread Sam Protsenko
LDFW is a Loadable Firmware which provides additional security capabilities in EL3 monitor. For example, True Random Number Generator (TRNG) block registers can't be accessed from EL1 (where U-Boot and Linux kernel are running), but it's possible to access TRNG capabilities via corresponding SMC ca

[PATCH 3/5] clk: exynos: Add SSS clocks for Exynos850

2024-07-12 Thread Sam Protsenko
Add ACLK (operating clock) and PCLK (bus clock) for Security Sub System (SSS) in Exynos850. Those clocks are needed for RNG enablement. Signed-off-by: Sam Protsenko --- drivers/clk/exynos/clk-exynos850.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/clk/exynos/clk-exyno

[PATCH 1/5] board: samsung: e850-96: Add default partitions

2024-07-12 Thread Sam Protsenko
Add an environment file for E850-96 board with default eMMC partition list. It follows the Samsung's partition list used for Android-Q on Exynos850 devices. It was verified on E850-96 board with: => gpt verify mmc 0 "$partitions" Verify GPT: success! Signed-off-by: Sam Protsenko --- boar

[PATCH 5/5] arm: exynos: Enable TRNG on E850-96 board

2024-07-12 Thread Sam Protsenko
Enable True Random Number Generator (TRNG) on E850-96 board. To do so: 1. Enable DM_RNG and RNG_EXYNOS for TARGET_E850_96 2. Add TRNG node to E850-96 device tree 3. Enable 'rng' command support for easy TRNG testing TRNG node is already applied in Linux kernel device tree, but it hasn't appe

[PATCH 4/5] rng: Add Exynos TRNG driver

2024-07-12 Thread Sam Protsenko
Add True Random Number Generator (TRNG) driver for Exynos chips. This implementation is heavily based on Linux kernel's counterpart [1]. It also follows upstream dt-bindings [2]. TRNG block is usually a part of SSS (Security Sub System) IP-core on Exynos chips. Because SSS access on Exynos850 is p

Re: [PATCH v2 1/5] usb: tcpm: add core framework

2024-07-12 Thread Tim Harvey
On Tue, Jun 4, 2024 at 9:36 AM Sebastian Reichel wrote: > > This adds TCPM framework in preparation for fusb302 support, which can > handle USB power delivery messages. This is needed to solve issues with > devices, that are running from a USB-C port supporting USB-PD, but not > having a battery.