[PATCH 0/9] rockchip: pinctrl: Minor fixes and add support for pinmux status cmd

2024-05-12 Thread Jonas Karlman
This series includes some minor fixes, cleanup and add support for using the pinmux status cmd. Following is an example on a Radxa ROCK 5A (RK3588S): => pinmux dev pinctrl dev: pinctrl => pinmux status GPIO0_A0 : gpio GPIO0_A1 : func-2 GPIO0_A2 : gpio GPIO0_A3 : gpio GPIO0_A4

[PATCH 3/9] pinctrl: rockchip: rk3588: Fix support for rockchip_get_mux()

2024-05-12 Thread Jonas Karlman
GPIO IOMUX control is located at PMU2_IOC or BUS_IOC offset on RK3588. Based on Linux commit fdc33eba11c5 ("pinctrl/rockchip: add rk3588 support"). Compared to the Linux commit, this include a fix so that the iomux of GPIO0_B4-D7 is reported correctly. Signed-off-by: Jonas Karlman --- The fix t

[PATCH 5/9] pinctrl: rockchip: Update get_gpio_mux() ops

2024-05-12 Thread Jonas Karlman
Add a way to get_gpio_mux() based on the pinctrl pin offset, use -1 as banknum to use the pinctrl pin offset mode instead of bank pin offset. This mode will be used by the gpio driver to ensure a pin used by gpio request() and get_function() ops always refer to the same pinctrl pin. Also add veri

[PATCH 4/9] pinctrl: rockchip: Use syscon_regmap_lookup_by_phandle()

2024-05-12 Thread Jonas Karlman
Use syscon_regmap_lookup_by_phandle() to simplify the code. Signed-off-by: Jonas Karlman --- .../pinctrl/rockchip/pinctrl-rockchip-core.c | 39 ++- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/drivers/pinctrl/rockchip/pinctrl-rockchip-core.c b/drivers/pinctrl

[PATCH 1/9] pinctrl: rockchip: rk3188: Fix support for IOMUX_GPIO_ONLY flag

2024-05-12 Thread Jonas Karlman
GPIO0_A0-A7 on RK3188 is IOMUX_GPIO_ONLY, however, trying to set gpio mux return an -ENOTSUPP error code. Fix this by validating using the mux function type and not the iomux flag. Based on Linux commit c4a532dee6b6 ("pinctrl: rockchip: handle first half of rk3188-bank0 correctly"). Signed-off-by

[PATCH 2/9] pinctrl: rockchip: rv1126: Fix support for IOMUX_L_SOURCE_PMU flag

2024-05-12 Thread Jonas Karlman
GPIO0_C0-C4 iomux is set using PMUGRF_GPIO0C_IOMUX_L reg on RV1126. This is indicated using the IOMUX_L_SOURCE_PMU flag. Fix reading current mux by fully adopting the IOMUX_L_SOURCE_PMU related code in Linux kernel. Based on Linux commit fd4ea48688c6 ("pinctrl: rockchip: Add RV1126 pinctrl support

[PATCH 7/9] gpio: rockchip: Use pinctrl pin offset to get_gpio_mux()

2024-05-12 Thread Jonas Karlman
Use the pinctrl pin offset to get_gpio_mux() to remove the bank num dependency and instead only use the bank num to assign a bank name. Most Rockchip SoCs use all 32 pins of each gpio controller, meaning the pinctrl pin offset typically is aligned to 32. However, for gpio0 on RK3288 only 24 pins

[PATCH 6/9] gpio: rockchip: Get pinctrl device from gpio-ranges prop

2024-05-12 Thread Jonas Karlman
Get pinctrl device from gpio-ranges phandle when the property exists, fallback to get the first pinctrl device. Signed-off-by: Jonas Karlman --- drivers/gpio/rk_gpio.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/drivers/gpio/rk_gpio.c b/driver

[PATCH 8/9] pinctrl: rockchip: Add pinmux status related ops

2024-05-12 Thread Jonas Karlman
Add get_pins_count(), get_pin_name() and get_pin_muxing() ops to support the pinmux status cmd. => pinmux dev pinctrl dev: pinctrl => pinmux status GPIO0_A0 : gpio GPIO0_A1 : func-1 GPIO0_A2 : gpio GPIO0_A3 : gpio GPIO0_A4 : func-1 GPIO0_A5 : gpio GPIO0_A6 : gpio GPIO0

[PATCH 9/9] rockchip: gpio: Add gpio-ranges props

2024-05-12 Thread Jonas Karlman
Add gpio-ranges props to supported SoCs based on the following Linux patches: ARM: dts: rockchip: add gpio-ranges property to gpio nodes https://lore.kernel.org/all/26007385-81dc-9961-05d5-8b9a0969d...@gmail.com/ arm64: dts: rockchip: add gpio-ranges property to gpio nodes https://lore.kernel.org

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Alex Bee
Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um 13:28 schrieb Jonas Karlman: This series add gpio request() and pinctrl gpio_request_enable() ops so that a gpio requested pin automatically use gpio pinmux and U-Boot behaves

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Mark Kettenis
> Date: Sat, 11 May 2024 22:55:18 +0200 > From: Jonas Karlman > > Hi Mark, > > On 2024-05-11 21:57, Mark Kettenis wrote: > >> Date: Sat, 11 May 2024 20:47:40 +0200 > >> From: Jonas Karlman > > > > Hi Jonas & Alex, > > > >> Hi Alex, > >> > >> On 2024-05-11 19:44, Alex Bee wrote: > >>> Hi Jonas

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Mark Kettenis
> Date: Sun, 12 May 2024 21:49:21 +0200 > From: Alex Bee > > Am 11.05.24 um 20:47 schrieb Jonas Karlman: > > Hi Alex, > > > > On 2024-05-11 19:44, Alex Bee wrote: > >> Hi Jonas, > >> > >> Am 11.05.24 um 13:28 schrieb Jonas Karlman: > >>> This series add gpio request() and pinctrl gpio_request_ena

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Jonas Karlman
Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: > Am 11.05.24 um 20:47 schrieb Jonas Karlman: >> Hi Alex, >> >> On 2024-05-11 19:44, Alex Bee wrote: >>> Hi Jonas, >>> >>> Am 11.05.24 um 13:28 schrieb Jonas Karlman: This series add gpio request() and pinctrl gpio_request_enable() ops so tha

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Jonas Karlman
Hi Mark, On 2024-05-12 22:41, Mark Kettenis wrote: >> Date: Sat, 11 May 2024 22:55:18 +0200 >> From: Jonas Karlman >> >> Hi Mark, >> >> On 2024-05-11 21:57, Mark Kettenis wrote: Date: Sat, 11 May 2024 20:47:40 +0200 From: Jonas Karlman >>> >>> Hi Jonas & Alex, >>> Hi Alex, >>

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Alex Bee
Am 12.05.24 um 23:37 schrieb Jonas Karlman: Hi Alex, On 2024-05-12 21:49, Alex Bee wrote: Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: Hi Jonas, Am 11.05.24 um 13:28 schrieb Jonas Karlman: This series add gpio request() and pinctrl gpio_reques

Re: [PATCH 0/4] rockchip: Add gpio request() ops and drop PCIe reset-gpios workaround

2024-05-12 Thread Jonas Karlman
On 2024-05-13 00:34, Alex Bee wrote: > > Am 12.05.24 um 23:37 schrieb Jonas Karlman: >> Hi Alex, >> >> On 2024-05-12 21:49, Alex Bee wrote: >>> Am 11.05.24 um 20:47 schrieb Jonas Karlman: Hi Alex, On 2024-05-11 19:44, Alex Bee wrote: > Hi Jonas, > > Am 11.05.24 um 13:28

Re: [PATCH 1/2 v2] board: starfive: support Pine64 Star64 board

2024-05-12 Thread E Shattow
Off-list we reasoned further about the correct PHY values. As our reference was the pre-loaded SPI NOR content containing dtb data: ethernet@1603 { ... ethernet-phy@0 { rxc_dly_en = <0x01>; tx_delay_sel_fe = <0x05>; tx_delay_sel = <0x0a>; tx_inverted_10 = <

Re: [PATCH 1/2 v2] board: starfive: support Pine64 Star64 board

2024-05-12 Thread E Shattow
P.S. some typo in my last message. On Sun, May 12, 2024 at 4:57 PM E Shattow wrote: > > Off-list we reasoned further about the correct PHY values. > > As our reference was the pre-loaded SPI NOR content containing dtb data: > > ethernet@1603 { > ... > ethernet-phy@0 { > rxc_dly_en

[PATCH] ARM: imx: Add doc/imx/ to i.MX MAINTAINERS entry

2024-05-12 Thread Marek Vasut
Make sure i.MX maintainers are CCed on doc/imx/ patches. Signed-off-by: Marek Vasut --- Cc: "NXP i.MX U-Boot Team" Cc: Claudius Heine Cc: Fabio Estevam Cc: Stefano Babic --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0462ade4ac6..6aed4a526

Re: [PATCH] imx: hab: add documentation about the required keys/certs

2024-05-12 Thread Marek Vasut
On 5/8/24 9:23 AM, Claudius Heine wrote: Hi Marek, Hi, On 2024-05-07 3:28 pm, Marek Vasut wrote: On 5/7/24 3:06 PM, Claudius Heine wrote: For CST to find the certificates and keys for signing, some keys and certs need to be copied into the u-boot build directory. Make sure to CC "NXP i.MX

Re: [PATCH v2] efi_loader: Fix EFI_VARIABLE_APPEND_WRITE hash check

2024-05-12 Thread Weizhao Ouyang
On Fri, May 10, 2024 at 5:23 PM Heinrich Schuchardt wrote: > > On 5/8/24 13:13, Weizhao Ouyang wrote: > > According to UEFI v2.10 spec section 8.2.6, if a caller invokes the > > SetVariables() service, it will produce a digest from hash(VariableName, > > VendorGuid, Attributes, TimeStamp, DataNew_

Re: [PATCH 1/3] cyclic: stop strdup'ing name in cyclic_register()

2024-05-12 Thread Stefan Roese
On 5/9/24 02:47, Rasmus Villemoes wrote: We are not checking the return value of strdup(), nor freeing the string in cyclic_unregister(). However, all current users either pass a string literal or the dev->name of the client device. So in all cases the name string will live at least as long as t

[PATCH] net: tftp: don't call stop callback from UDP handler

2024-05-12 Thread A. Sverdlin
From: Alexander Sverdlin Contrary to doc/develop/driver-model/ethernet.rst contract, eth_ops .free_pkt can be called after .stop, there are several error paths in TFTP, for instance: eth_halt() <= tftp_handler() <= net_process_received_packet() <= eth_rx() ... am65_cpsw_free_pkt() <= eth_rx() W

Re: [PATCH] Fix neighbor discovery ethernet address saving

2024-05-12 Thread Vyacheslav V. Mitrofanov
Hello, Sean. I see. You are right. Reviewed-by: Viacheslav Mitrofanov On Tue, 2024-05-07 at 22:16 -0700, Sean Edmond wrote: > > Hi Vyachesla, > > Let's start by saying neighbour discovery protocol is definitely > working > properly.  I'm only suggesting that it isn't properly caching the MAC