Re: [PATCH] airoha: rework RAM size handling to support multiple RAM size

2025-07-27 Thread Christian Marangi
On Thu, Jul 24, 2025 at 01:30:45PM +0300, Mikhail Kshevetskiy wrote: > > On 22.07.2025 21:44, Christian Marangi wrote: > > There are multiple version of the same reference board with different > > RAM size and it's not enough to base the RAM size entirely from DT. To > &

Re: [PATCH 2/2] airoha: rework RAM size handling to support multiple RAM size

2025-07-22 Thread Christian Marangi
On Wed, Jul 16, 2025 at 09:37:08AM +0200, Christian Marangi wrote: > There are multiple version of the same reference board with different > RAM size and it's not enough to base the RAM size entirely from DT. To > better support it use the get_ram_size way to scan for the actual

[PATCH] airoha: rework RAM size handling to support multiple RAM size

2025-07-22 Thread Christian Marangi
There are multiple version of the same reference board with different RAM size and it's not enough to base the RAM size entirely from DT. To better support it use the get_ram_size way to scan for the actual RAM size of Airoha SoC and increase the size of the memory map. Signed-off-by: Chri

[PATCH 2/2] airoha: rework RAM size handling to support multiple RAM size

2025-07-16 Thread Christian Marangi
There are multiple version of the same reference board with different RAM size and it's not enough to base the RAM size entirely from DT. To better support it use the get_ram_size way to scan for the actual RAM size of Airoha SoC and increase the size of the memory map. Signed-off-by: Chri

[PATCH 1/2] linux/sizes.h: add SZ_8G for 1GB RAM size

2025-07-16 Thread Christian Marangi
Add additional macro to handle a 1GB RAM size in 8Gb. Drop the redundant entry from the Mediatek arch. Signed-off-by: Christian Marangi --- arch/arm/mach-mediatek/mt7988/init.c | 2 -- include/linux/sizes.h| 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a

[PATCH] env: Fix possible out-of-bound access in env_do_env_set

2025-06-29 Thread Christian Marangi
d access (making the bootloader eventually crash with strchr searching in invalid data) To better handle this and prevent the out-of-bound access, actually check the argv entry left (with the use of the argc variable) and exit early before doing any kind of array access. Signed-off-by: Christian Maran

[PATCH v4 0/5] linux/bitfield.h: sync from Linux 6.15 + winbond

2025-06-07 Thread Christian Marangi
: - Reorder patch for better bisectability Changes v3: - Fix compilation error for remaining drivers Changes v2: - Copy the full file instead of cherry-pick Changes Christian Marangi (5): clk: imx: add missing linux/bug.h header for WARN iommu: qcom-smmu: add missing linux/bug.h header for WARN_ON

[PATCH v4 3/5] arm: apple: rtkit: add missing header linux/bug.h and linux/bitops.h

2025-06-07 Thread Christian Marangi
bitfield.h) Explicitly include the headers to fix future compilation error. Signed-off-by: Christian Marangi --- arch/arm/mach-apple/rtkit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-apple/rtkit.c b/arch/arm/mach-apple/rtkit.c index f3561543a35..251c6056cbd 100644 --- a

[PATCH v4 1/5] clk: imx: add missing linux/bug.h header for WARN

2025-06-07 Thread Christian Marangi
The WARN macro requires inclusion of linux/bug.h header. It does currently work as bitfield.h includes it indirectly but this will change when bitfield.h will be synced with new Linux version. Explicitly include the header to fix future compilation error. Signed-off-by: Christian Marangi

[PATCH v4 2/5] iommu: qcom-smmu: add missing linux/bug.h header for WARN_ON

2025-06-07 Thread Christian Marangi
The WARN macro requires inclusion of linux/bug.h header. It does currently work as bitfield.h includes it indirectly but this will change when bitfield.h will be synced with new Linux version. Explicitly include the header to fix future compilation error. Signed-off-by: Christian Marangi

[PATCH v4 4/5] linux/bitfield.h: sync from Linux 6.15

2025-06-07 Thread Christian Marangi
Sync bitfield.h header with Linux 6.15 version. Mainly is to permit the introduction of FIELD_PREP_CONST. The bug.h header changed to build_bug.h doesn't cause any regression as we also ship split header similar to how it's done with in Linux. Signed-off-by: Christian Marangi --- inc

[PATCH v4 5/5] mtd: spinand: winbond: add Winbond W25N04KV flash support

2025-06-07 Thread Christian Marangi
Add Winbond W25N04KV flash support that use a different value to detect ECC bitflip. Signed-off-by: Christian Marangi --- drivers/mtd/nand/spi/winbond.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index

Re: [PATCH 3/3] drivers/net/airoha_eth: fix stalling in package receiving

2025-06-06 Thread Christian Marangi
On Fri, Jun 06, 2025 at 10:49:03PM +0300, Mikhail Kshevetskiy wrote: > ARCH_DMA_MINALIGN is 64 for ARMv7a/ARMv8a architectures, but RX/TX > descriptors are 32 bytes long. So they may not be aligned on an > ARCH_DMA_MINALIGN boundary. In case of RX path, this may cause the > following problem > > 1

Re: [PATCH 1/3] drivers/net/airoha_eth: add missed terminator for compatible devices list

2025-06-06 Thread Christian Marangi
On Fri, Jun 06, 2025 at 10:49:01PM +0300, Mikhail Kshevetskiy wrote: > list must be terminated > Nitpick, please write a more detailed description. Also title use "missing". > Signed-off-by: Mikhail Kshevetskiy > --- > drivers/net/airoha_eth.c | 1 + > 1 file changed, 1 insertion(+) > > diff -

[PATCH v3 5/5] mtd: spinand: winbond: add Winbond W25N04KV flash support

2025-06-06 Thread Christian Marangi
Add Winbond W25N04KV flash support that use a different value to detect ECC bitflip. Signed-off-by: Christian Marangi --- drivers/mtd/nand/spi/winbond.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index

[PATCH v3 4/5] arm: apple: rtkit: add missing header linux/bug.h and linux/bitops.h

2025-06-06 Thread Christian Marangi
compilation error. Signed-off-by: Christian Marangi --- arch/arm/mach-apple/rtkit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-apple/rtkit.c b/arch/arm/mach-apple/rtkit.c index f3561543a35..251c6056cbd 100644 --- a/arch/arm/mach-apple/rtkit.c +++ b/arch/arm/mach-apple

[PATCH v3 3/5] iommu: qcom-smmu: add missing linux/bug.h header for WARN_ON

2025-06-06 Thread Christian Marangi
The WARN_ON macro requires inclusion of linux/bug.h header. It did previously work as bitfield.h included it indirectly but now this has changed. Explicitly include the header to fix compilation error. Signed-off-by: Christian Marangi --- drivers/iommu/qcom-hyp-smmu.c | 1 + 1 file changed, 1

[PATCH v3 2/5] clk: imx: add missing linux/bug.h header for WARN

2025-06-06 Thread Christian Marangi
The WARN macro requires inclusion of linux/bug.h header. It did previously work as bitfield.h included it indirectly but now this has changed. Explicitly include the header to fix compilation error. Signed-off-by: Christian Marangi --- drivers/clk/imx/clk-fracn-gppll.c | 1 + 1 file changed, 1

[PATCH v3 1/5] linux/bitfield.h: sync from Linux 6.15

2025-06-06 Thread Christian Marangi
Sync bitfield.h header with Linux 6.15 version. Mainly is to permit the introduction of FIELD_PREP_CONST. The bug.h header changed to build_bug.h doesn't cause any regression as we also ship split header similar to how it's done with in Linux. Signed-off-by: Christian Marangi --- inc

[PATCH v3 0/5] linux/bitfield.h: sync from Linux 6.15 + winbond

2025-06-06 Thread Christian Marangi
compilation error for remaining drivers Changes v2: - Copy the full file instead of cherry-pick Changes Christian Marangi (5): linux/bitfield.h: sync from Linux 6.15 clk: imx: add missing linux/bug.h header for WARN iommu: qcom-smmu: add missing linux/bug.h header for WARN_ON arm: apple

[PATCH v2 2/2] mtd: spinand: winbond: add Winbond W25N04KV flash support

2025-06-04 Thread Christian Marangi
Add Winbond W25N04KV flash support that use a different value to detect ECC bitflip. Signed-off-by: Christian Marangi --- drivers/mtd/nand/spi/winbond.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index

[PATCH v2 1/2] linux/bitfield.h: sync from Linux 6.15

2025-06-04 Thread Christian Marangi
Sync bitfield.h header with Linux 6.15 version. Mainly is to permit the introduction of FIELD_PREP_CONST. The bug.h header changed to build_bug.h doesn't cause any regression as we also ship split header similar to how it's done with in Linux. Signed-off-by: Christian Marangi ---

Re: [PATCH 1/2] linux/bitfield.h: import FIELD_PREP_CONST macro from Linux Kernel

2025-06-03 Thread Christian Marangi
On Tue, Jun 03, 2025 at 05:08:13PM +0200, Quentin Schulz wrote: > Hi Christian, > > On 6/3/25 10:51 AM, Christian Marangi wrote: > > Import FIELD_PREP_CONST macro from Linux Kernel to permit usage of > > FIELD_PREP with scenario where a constant value is needed. >

[PATCH 2/2] mtd: spinand: winbond: add Winbond W25N04KV flash support

2025-06-03 Thread Christian Marangi
Add Winbond W25N04KV flash support that use a different value to detect ECC bitflip. Signed-off-by: Christian Marangi --- drivers/mtd/nand/spi/winbond.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/mtd/nand/spi/winbond.c b/drivers/mtd/nand/spi/winbond.c index

[PATCH 1/2] linux/bitfield.h: import FIELD_PREP_CONST macro from Linux Kernel

2025-06-03 Thread Christian Marangi
n with the Linux Kernel for easier porting of driver. Signed-off-by: Christian Marangi --- include/linux/bitfield.h | 26 ++ 1 file changed, 26 insertions(+) diff --git a/include/linux/bitfield.h b/include/linux/bitfield.h index 7ad02f8cbb9..1b73ba6f9fa 100644 --- a/inc

[PATCH v2] cmd: bootmenu: permit to select bootmenu entry with a shortcut

2025-05-25 Thread Christian Marangi
and a-z. If a shortcut key not present in the bootmenu list is pressed, it is simply ignored and eventually the autoboot is interrupted. Capital A-Z are converted to lower a-z and the related option is selected. Suggested-by: Weijie Gao Signed-off-by: Christian Marangi --- Changes v2: - Fix

Re: [PATCH] cmd: bootmenu: permit to select bootmenu entry with a shortcut

2025-05-25 Thread Christian Marangi
On Sun, May 25, 2025 at 01:02:13PM +, Petr Štetiar wrote: > Christian Marangi [2025-05-25 00:12:52]: > > Hi, > > thanks a lot for your upstreaming efforts! > > > Permit to select a bootmenu entry with a key shortcut. This is > > especially useful in pro

[PATCH] cmd: bootmenu: permit to select bootmenu entry with a shortcut

2025-05-24 Thread Christian Marangi
and a-z. If a shortcut key not present in the bootmenu list is pressed, it is simply ignored and eventually the autoboot is interrupted. Capital A-Z are converted to lower a-z and the related option is selected. Suggested-by: Weijie Gao Signed-off-by: Christian Marangi --- cmd/bootmenu.c | 39

Re: [PATCH] env: mtd: fix usability with NAND flashes

2025-05-06 Thread Christian Marangi
e > > Fixes: 03fb08d4aef (env: Introduce support for MTD) > Signed-off-by: Weijie Gao Reviewed-by: Christian Marangi > --- > env/Kconfig | 2 +- > env/mtd.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/env/Kconfig b/env/Kconfig > ind

Re: [PATCH] env: Introduce support for MTD

2025-04-30 Thread Christian Marangi (Ansuel)
Il giorno lun 7 apr 2025 alle ore 21:00 Christian Marangi ha scritto: > > Introduce support for env in generic MTD. Currently we only support SPI > flash based on the lagacy sf cmd that assume SPI flash are always NOR. > This is not the case as to SPI controller also NAND can be atta

Re: [RESEND PATCH] clk: fix crash on clk_set_rate clean rate cache

2025-04-30 Thread Christian Marangi (Ansuel)
Il giorno mar 8 apr 2025 alle ore 07:56 Michael Nazzareno Trimarchi ha scritto: > > Hi > > Il lun 7 apr 2025, 22:03 Fabio Estevam ha scritto: >> >> On Mon, Apr 7, 2025 at 4:58 PM Michael Nazzareno Trimarchi >> wrote: >> >> > Can you review it and pick if needed? >> >> This is not assigned to me

[PATCH v2 05/14] mmc: mediatek: permit to also build for Airoha arch

2025-04-10 Thread Christian Marangi
Airoha new SoC implement the same Mediatek driver for MMC. Permit to also build for Airoha arch. Signed-off-by: Christian Marangi --- drivers/mmc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 4827834b4aa..2e33dbd3fb7

[PATCH v2 12/14] spi: airoha: Add Airoha SPI NAND driver

2025-04-10 Thread Christian Marangi
Add Airoha SPI NAND driver to permit usage of attached SNAND on the Airoha AN7581 SoC. While SPI controller supports DMA transation, due to U-Boot limitation we currently limit it to single command in Manual mode. Signed-off-by: Christian Marangi --- drivers/spi/Kconfig | 9

[PATCH v2 06/14] arch: arm: dts: an7581: Add eMMC nodes

2025-04-10 Thread Christian Marangi
Add eMMC nodes with the fixed regulator and fixed clock. It's also needed to assign the clock and set it to 200MHz as it's set to 150Mhz by default. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 33 + 1 file changed, 33

[PATCH v2 07/14] airoha: Add eMMC config to defconfig

2025-04-10 Thread Christian Marangi
Enable Mediatek MMC driver in Airoha AN7581 EVB defconfig to add support for it in default images. Signed-off-by: Christian Marangi --- configs/an7581_evb_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig index f5bd647cb6e

Re: [RESEND PATCH] clk: fix crash on clk_set_rate clean rate cache

2025-04-10 Thread Christian Marangi
On Sat, Mar 15, 2025 at 10:24:14AM +0100, Christian Marangi wrote: > It's currently possible to make the bootloader crash on calling > clk_set_rate caused by the loop in clk_clean_rate_cache. > > The loop assume that every child of the clock node are also clock > device but th

[PATCH] env: Introduce support for MTD

2025-04-08 Thread Christian Marangi
generic MTD device by adding an env driver that base entirely on the MTD api. Introduce a new kconfig CONFIG_ENV_IS_IN_MTD and CONFIG_ENV_MTD_DEV to define the name of the MTD device as exposed by mtd list. Signed-off-by: Christian Marangi --- env/Kconfig| 33 +++- env/Makefile

[PATCH v2 09/14] spi: drop unneeded spi.h header include from spinand.h

2025-04-07 Thread Christian Marangi
Drop unneeded spi.h header include from spinand.h, nothing included by spi.h is actually used in this header and .c should correctly included spi.h if actually needed. Replace spi.h with linux/bitops.h as this is what is actually required for spinand.h Signed-off-by: Christian Marangi

[PATCH v2 14/14] configs: airoha: an7581_evb: Enable Airoha SNFI SPI config

2025-04-07 Thread Christian Marangi
Enable Airoha SNFI SPI config to enable support for SNAND flash. Signed-off-by: Christian Marangi --- configs/an7581_evb_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig index fa41a4bca97..c74247e13db 100644 --- a/configs

[PATCH v2 10/14] spi: Introduce setup_for_spinand()

2025-04-07 Thread Christian Marangi
A common device attached to SPI are SPI NAND and some device might require to have info on the attached NAND to know the flash page size and spare size. To support this, introduce setup_for_spinand() that pass the attached spinand info from manufacturer. Signed-off-by: Christian Marangi

[PATCH v2 13/14] arm: dts: an7581: Add SNAND node

2025-04-07 Thread Christian Marangi
Add SNAND node to Airoha AN7581 EVB DTS to enable support for attached SNAND flash. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/dts/an7581-u-boot.dtsi b/arch/arm/dts/an7581-u-boot.dtsi

[PATCH v2 11/14] spinand: call SPI setup_for_spinand if supported

2025-04-07 Thread Christian Marangi
with select_op_variant detection. Signed-off-by: Christian Marangi --- drivers/mtd/nand/spi/core.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index f5ddfbf4b83..3a1e7e18736 100644 --- a/drivers/mtd/nand/spi

[PATCH v2 08/14] regmap: Add regmap_set/clear_bits shorthands

2025-04-07 Thread Christian Marangi
Port Linux kernel regmap_set/clear_bits shorthands to set and clear bits in a regmap. These are handy if only specific bits needs to be applied or cleared and makes it easier to port regmap based driver from kernel upstream. Signed-off-by: Christian Marangi --- include/regmap.h | 28

[PATCH v2 03/14] airoha: Add Ethernet config to defconfig

2025-04-07 Thread Christian Marangi
Add Ethrnet config to defconfig to enable Ethernet support. Signed-off-by: Christian Marangi --- configs/an7581_evb_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig index f09b5b603a2..f5bd647cb6e 100644 --- a/configs

[PATCH v2 04/14] arch: arm: dts: an7581: Add Ethernet nodes

2025-04-07 Thread Christian Marangi
Add Ethrnet nodes for Airoha AN7581 EVB board. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 30 ++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/dts/an7581-u-boot.dtsi b/arch/arm/dts/an7581-u-boot.dtsi index 9f8abfc3bcf

[PATCH v2 02/14] net: airoha: Add Airoha Ethernet driver

2025-04-07 Thread Christian Marangi
ned-off-by: Christian Marangi --- drivers/net/Kconfig | 8 + drivers/net/Makefile | 1 + drivers/net/airoha_eth.c | 948 +++ 3 files changed, 957 insertions(+) create mode 100644 drivers/net/airoha_eth.c diff --git a/drivers/net/Kconfig b/drivers/n

[PATCH v2 01/14] arch: arm: dts: an7581: add Chip SCU node

2025-04-07 Thread Christian Marangi
Add pending Chip SCU node for clock node. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/dts/an7581-u-boot.dtsi b/arch/arm/dts/an7581-u-boot.dtsi index 0316b73f3a5..9f8abfc3bcf 100644 --- a/arch/arm/dts

[PATCH v2 00/14] airoha: add support spi/mmc/ethernet

2025-04-07 Thread Christian Marangi
ed in upstream kernel. Changes v2: - Drop unused define in ethernet driver - Use remap in ethernet driver Christian Marangi (14): arch: arm: dts: an7581: add Chip SCU node net: airoha: Add Airoha Ethernet driver airoha: Add Ethernet config to defconfig arch: arm: dts: an7581: Add Ethernet

[PATCH 02/14] net: airoha: Add Airoha Ethernet driver

2025-04-05 Thread Christian Marangi
ned-off-by: Christian Marangi --- drivers/net/Kconfig |8 + drivers/net/Makefile |1 + drivers/net/airoha_eth.c | 1448 ++ 3 files changed, 1457 insertions(+) create mode 100644 drivers/net/airoha_eth.c diff --git a/drivers/net/Kconfig b/d

[PATCH 12/14] spi: airoha: Add Airoha SPI NAND driver

2025-04-05 Thread Christian Marangi
Add Airoha SPI NAND driver to permit usage of attached SNAND on the Airoha AN7581 SoC. While SPI controller supports DMA transation, due to U-Boot limitation we currently limit it to single command in Manual mode. Signed-off-by: Christian Marangi --- drivers/spi/Kconfig | 9

Re: [PATCH 02/14] net: airoha: Add Airoha Ethernet driver

2025-04-02 Thread Christian Marangi
On Wed, Apr 02, 2025 at 09:19:51AM -0600, Tom Rini wrote: > On Wed, Apr 02, 2025 at 12:51:34AM +0200, Christian Marangi wrote: > > > Add airoha Ethernet driver for Airoha AN7581 SoC. This is a majorly > > rewritten and simplified version of the Linux airoha_eth.c driver. >

Re: [PATCH 02/14] net: airoha: Add Airoha Ethernet driver

2025-04-02 Thread Christian Marangi
On Wed, Apr 02, 2025 at 09:31:04AM -0600, Tom Rini wrote: > On Wed, Apr 02, 2025 at 05:21:49PM +0200, Christian Marangi wrote: > > On Wed, Apr 02, 2025 at 09:19:51AM -0600, Tom Rini wrote: > > > On Wed, Apr 02, 2025 at 12:51:34AM +0200, Christian Marangi wrote: > > >

Re: [PATCH] env: Introduce support for SPI NAND flash

2025-04-02 Thread Christian Marangi
On Wed, Apr 02, 2025 at 09:05:42AM -0600, Tom Rini wrote: > On Wed, Apr 02, 2025 at 12:57:57AM +0200, Christian Marangi wrote: > > > Introduce support for SPI NAND flash. Currently we only support SPI > > flash based on the lagacy sf cmd that assume SPI flash are always NOR. &

[PATCH] env: Introduce support for SPI NAND flash

2025-04-02 Thread Christian Marangi
new kconfig ENV_IS_IN_SPI_NAND_FLASH and CONFIG_SYS_SNAND_ENV_DEV to define the name of the SPI nand as exposed by mtd list. Signed-off-by: Christian Marangi --- env/Kconfig| 41 - env/Makefile | 1 + env/env.c | 3 + env/snand.c| 338

[PATCH 14/14] configs: airoha: an7581_evb: Enable Airoha SNFI SPI config

2025-04-02 Thread Christian Marangi
Enable Airoha SNFI SPI config to enable support for SNAND flash. Signed-off-by: Christian Marangi --- configs/an7581_evb_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig index fa41a4bca97..c74247e13db 100644 --- a/configs

[PATCH 05/14] mmc: mediatek: permit to also build for Airoha arch

2025-04-01 Thread Christian Marangi
Airoha new SoC implement the same Mediatek driver for MMC. Permit to also build for Airoha arch. Signed-off-by: Christian Marangi --- drivers/mmc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 4827834b4aa..2e33dbd3fb7

[PATCH 06/14] arch: arm: dts: an7581: Add eMMC nodes

2025-04-01 Thread Christian Marangi
Add eMMC nodes with the fixed regulator and fixed clock. It's also needed to assign the clock and set it to 200MHz as it's set to 150Mhz by default. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 33 + 1 file changed, 33

[PATCH 01/14] arch: arm: dts: an7581: add Chip SCU node

2025-04-01 Thread Christian Marangi
Add pending Chip SCU node for clock node. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/dts/an7581-u-boot.dtsi b/arch/arm/dts/an7581-u-boot.dtsi index 0316b73f3a5..9f8abfc3bcf 100644 --- a/arch/arm/dts

[PATCH 03/14] airoha: Add Ethernet config to defconfig

2025-04-01 Thread Christian Marangi
Add Ethrnet config to defconfig to enable Ethernet support. Signed-off-by: Christian Marangi --- configs/an7581_evb_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig index f09b5b603a2..f5bd647cb6e 100644 --- a/configs

[PATCH 09/14] spi: drop unneeded spi.h header include from spinand.h

2025-04-01 Thread Christian Marangi
Drop unneeded spi.h header include from spinand.h, nothing included by spi.h is actually used in this header and .c should correctly included spi.h if actually needed. Replace spi.h with linux/bitops.h as this is what is actually required for spinand.h Signed-off-by: Christian Marangi

[PATCH 08/14] regmap: Add regmap_set/clear_bits shorthands

2025-04-01 Thread Christian Marangi
Port Linux kernel regmap_set/clear_bits shorthands to set and clear bits in a regmap. These are handy if only specific bits needs to be applied or cleared and makes it easier to port regmap based driver from kernel upstream. Signed-off-by: Christian Marangi --- include/regmap.h | 28

[PATCH 13/14] arm: dts: an7581: Add SNAND node

2025-04-01 Thread Christian Marangi
Add SNAND node to Airoha AN7581 EVB DTS to enable support for attached SNAND flash. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm/dts/an7581-u-boot.dtsi b/arch/arm/dts/an7581-u-boot.dtsi

[PATCH 11/14] spinand: call SPI setup_for_spinand if supported

2025-04-01 Thread Christian Marangi
with select_op_variant detection. Signed-off-by: Christian Marangi --- drivers/mtd/nand/spi/core.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index f5ddfbf4b83..3a1e7e18736 100644 --- a/drivers/mtd/nand/spi

[PATCH 10/14] spi: Introduce setup_for_spinand()

2025-04-01 Thread Christian Marangi
A common device attached to SPI are SPI NAND and some device might require to have info on the attached NAND to know the flash page size and spare size. To support this, introduce setup_for_spinand() that pass the attached spinand info from manufacturer. Signed-off-by: Christian Marangi

[PATCH 07/14] airoha: Add eMMC config to defconfig

2025-04-01 Thread Christian Marangi
Enable Mediatek MMC driver in Airoha AN7581 EVB defconfig to add support for it in default images. Signed-off-by: Christian Marangi --- configs/an7581_evb_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/an7581_evb_defconfig b/configs/an7581_evb_defconfig index f5bd647cb6e

[PATCH 04/14] arch: arm: dts: an7581: Add Ethernet nodes

2025-04-01 Thread Christian Marangi
Add Ethrnet nodes for Airoha AN7581 EVB board. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-u-boot.dtsi | 30 ++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/dts/an7581-u-boot.dtsi b/arch/arm/dts/an7581-u-boot.dtsi index 9f8abfc3bcf

[PATCH 00/14] airoha: add support spi/mmc/ethernet

2025-04-01 Thread Christian Marangi
ed in upstream kernel. Christian Marangi (14): arch: arm: dts: an7581: add Chip SCU node net: airoha: Add Airoha Ethernet driver airoha: Add Ethernet config to defconfig arch: arm: dts: an7581: Add Ethernet nodes mmc: mediatek: permit to also build for Airoha arch arch: arm: dts: an7581

Re: [PATCH v2 0/6] airoha: Add initial support AN7581

2025-04-01 Thread Christian Marangi
On Tue, Apr 01, 2025 at 12:45:21PM +0200, Andreas Gnau wrote: > On 2025-03-14 19:59, Christian Marangi wrote: > > This little series adds initial support for Airoha AN7581 SoC. > > Very nice. Will you (or someone else) upstream or at least open-source ATF > parts as well, simil

Re: [PATCH v2 5/6] dt-bindings: clock: drop NUM_CLOCKS define for EN7581

2025-03-27 Thread Christian Marangi
On Thu, Mar 27, 2025 at 03:43:47PM +0100, Krzysztof Kozlowski wrote: > On 14/03/2025 19:59, Christian Marangi wrote: > > Drop NUM_CLOCKS define for EN7581 dts/upstream/src/include. This is not a > > binding and > > should not be placed here. Value is derived internally i

Re: [PATCH v2 0/6] airoha: Add initial support AN7581

2025-03-27 Thread Christian Marangi
On Fri, Mar 14, 2025 at 02:26:11PM -0600, Tom Rini wrote: > On Fri, Mar 14, 2025 at 07:59:20PM +0100, Christian Marangi wrote: > ` > > This little series adds initial support for Airoha AN7581 SoC. > > > > With the help of some backport patch, this use OF_UPSTREAM > &

[PATCH v2 1/6] airoha: Add initial support for Airoha AN7581 SoC

2025-03-15 Thread Christian Marangi
Add initial support for Airoha AN7581 SoC. This adds the initial Kconfig and Makefile entry for the SoC, an U-Boot specific DTSI and initial config for it. Also add the initial code for CPU and RAM initialization. Signed-off-by: Christian Marangi --- arch/arm/Kconfig | 9

[RESEND PATCH] clk: fix crash on clk_set_rate clean rate cache

2025-03-15 Thread Christian Marangi
fix set_rate to clean up cached rates for the hierarchy") Signed-off-by: Christian Marangi --- RESEND as there was a problem with email To: drivers/clk/clk-uclass.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c index 353ae476068..8f33

[PATCH v2 3/6] reset: airoha: Add driver for controlling reset line of AN7581

2025-03-14 Thread Christian Marangi
sters. Signed-off-by: Christian Marangi --- drivers/clk/airoha/clk-airoha.c | 16 +++ drivers/reset/Kconfig | 7 ++ drivers/reset/Makefile | 1 + drivers/reset/reset-airoha.c| 173 4 files changed, 197 insertions(+) create mode 1

[PATCH v2 6/6] dt-bindings: clock: add ID for eMMC for EN7581

2025-03-14 Thread Christian Marangi
Add ID for eMMC for EN7581. This is to control clock selection of eMMC between 200MHz and 150MHz. Signed-off-by: Christian Marangi Acked-by: Conor Dooley Link: https://lore.kernel.org/r/20250113231030.6735-4-ansuels...@gmail.com Signed-off-by: Stephen Boyd [ upstream commit

[PATCH v2 4/6] arm64: dts: airoha: en7581: Add Clock Controller node

2025-03-14 Thread Christian Marangi
Add Clock Controller node for EN7581 SoC to correctly expose supported clock for any user in the SoC. Signed-off-by: Christian Marangi Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250105150328.15172-1-ansuels...@gmail.com Signed-off-by: AngeloGioacchino Del Regno

[PATCH v2 5/6] dt-bindings: clock: drop NUM_CLOCKS define for EN7581

2025-03-14 Thread Christian Marangi
Drop NUM_CLOCKS define for EN7581 dts/upstream/src/include. This is not a binding and should not be placed here. Value is derived internally in the user driver. Signed-off-by: Christian Marangi Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20250113231030.6735-3-ansuels

[PATCH v2 2/6] clk: airoha: Add support for Airoha AN7581 SoC clock

2025-03-14 Thread Christian Marangi
e and split for reset part to a different driver. Signed-off-by: Christian Marangi --- drivers/clk/Makefile| 1 + drivers/clk/airoha/Makefile | 3 + drivers/clk/airoha/clk-airoha.c | 438 3 files changed, 442 insertions(+) create mode 100644 driver

[PATCH v2 0/6] airoha: Add initial support AN7581

2025-03-14 Thread Christian Marangi
- Fix defconfig - Use pattern for MAINTAINERS file - Correctly handle SYS_BOARD/SYS_CONFIG_NAME - Drop config for header file Christian Marangi (6): airoha: Add initial support for Airoha AN7581 SoC clk: airoha: Add support for Airoha AN7581 SoC clock reset: airoha: Add driver for controlling

[PATCH 2/4] clk: airoha: Add support for Airoha AN7581 SoC clock

2025-03-09 Thread Christian Marangi
e and split for reset part to a different driver. Signed-off-by: Christian Marangi --- drivers/clk/Makefile | 1 + drivers/clk/airoha/Makefile| 3 + drivers/clk/airoha/clk-airoha.c| 438 + include/dt-bindings/clock/en7523-clk.h | 17

[PATCH 4/4] arch: arm: dts: an7581-evb: Add clock and reset nodes

2025-03-09 Thread Christian Marangi
Add clock ande reset nodes in preparation for adding support for Ethernet and eMMC. Signed-off-by: Christian Marangi --- arch/arm/dts/an7581-evb.dts | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm/dts/an7581-evb.dts b/arch/arm/dts/an7581-evb.dts index

[PATCH 3/4] reset: airoha: Add driver for controlling reset line of AN7581

2025-03-09 Thread Christian Marangi
sters. Signed-off-by: Christian Marangi --- drivers/clk/airoha/clk-airoha.c | 16 ++ drivers/reset/Kconfig | 7 + drivers/reset/Makefile| 1 + drivers/reset/reset-airoha.c | 173 ++ .../dt-bindings/

[PATCH 0/4] airoha: Add initial support AN7581

2025-03-09 Thread Christian Marangi
downstream and will be posted shortly after this gets approved. Having the first driver ready permits to separately push dedicate series for SNAND, eMMC and Ethrnet as they all depends on basic support of clock and reset and nothing else. Christian Marangi (4): airoha: Add initial support for Airoha

[PATCH 1/4] airoha: Add initial support for Airoha AN7581 SoC

2025-03-09 Thread Christian Marangi
Add initial support for Airoha AN7581 SoC. This adds the initial Kconfig and Makefile entry for the SoC, an initial RFB DTS and initial config for it. Also add the initial code for cpu and RAM initialization. Signed-off-by: Christian Marangi --- arch/arm/Kconfig | 9

[PATCH 8/8] arm: dts: mediatek: add PCIe node for MT7981

2025-01-27 Thread Christian Marangi
Add PCIe node for MT7981 with all the required properties to make PCIe work. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981.dtsi | 35 +++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi index

[PATCH 7/8] arm: dts: mediatek: add USB nodes for MT7981

2025-01-27 Thread Christian Marangi
From: John Crispin Add USB PHY nodes for MT7981. These are needed for USB support and also for PCIe support as the u3 PHY can also be used for PHY. Signed-off-by: John Crispin Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981.dtsi | 48 1 file

[PATCH 6/8] mediatek: mt7981: move gpio-controller up and rename pinctrl to pio

2025-01-27 Thread Christian Marangi
Move gpio-controller up to pinctrl node and rename label to "pio" to match the label used in upstream kernel linux. Update any DTS that reference the pinctrl to follow the new naming and structure. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981-emmc-rfb.dts | 4 ++-- ar

[PATCH 5/8] mediatek: mt7988: move gpio-controller up and rename pinctrl to pio

2025-01-27 Thread Christian Marangi
Move gpio-controller up to pinctrl node and rename label to "pio" to match the label used in upstream kernel linux. Update any DTS that reference the pinctrl to follow the new naming and structure. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7988-rfb.dts| 2 +- arch/arm/

[PATCH 4/8] pinctrl: mediatek: mt7988: rename reg-names to upstream linux format

2025-01-27 Thread Christian Marangi
Rename reg-names to upstream linux format. Upstream linux drop the "_base". To make use of upstream DTSI, align to the upstream naming. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7988.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/dts/m

[PATCH 3/8] mediatek: mt7986: move gpio-controller up and rename pinctrl to pio

2025-01-27 Thread Christian Marangi
Move gpio-controller up to pinctrl node and rename label to "pio" to match the label used in upstream kernel linux. Update any DTS that reference the pinctrl to follow the new naming and structure. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7986.dtsi | 8 +++-

[PATCH 2/8] pinctrl: mediatek: mt7986: rename reg-names to upstream linux format

2025-01-27 Thread Christian Marangi
Rename reg-names to upstream linux format. Upstream linux drop the "_base". To make use of upstream DTSI, align to the upstream naming. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7986.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/

[PATCH 1/8] pinctrl: mediatek: mt7981: rename reg-names to upstream linux format

2025-01-27 Thread Christian Marangi
Rename reg-names to upstream linux format. Upstream linux drop the "_base". To make use of upstream DTSI, align to the upstream naming. Signed-off-by: Christian Marangi --- arch/arm/dts/mt7981.dtsi | 6 +++--- drivers/pinctrl/mediatek/pinctrl-mt7981.c | 5 +++-- 2 fil

[PATCH 0/8] mediatek: final preparation for OF_UPSTREAM support

2025-01-27 Thread Christian Marangi
same node downstream and upstream. Mediatek is working hard upstream to also push all the remaining nodes. All patch are the final changes after the pinctrl patch merged previously. All patch pass CI tests tested in this PR [0] [0] https://github.com/u-boot/u-boot/pull/731 Christian Maran

Re: [PATCH v2 0/8] led: update LED boot/activity to new property implementation

2024-12-06 Thread Christian Marangi
On Fri, Nov 22, 2024 at 08:41:13PM -0600, Tom Rini wrote: > On Wed, Nov 13, 2024 at 09:24:59PM +0100, Christian Marangi wrote: > > On Wed, Nov 13, 2024 at 12:00:59PM -0600, Tom Rini wrote: > > > On Sun, Nov 10, 2024 at 12:50:19PM +0100, Christian Marangi wrote: > > > &

Re: [PATCH v2 0/8] led: update LED boot/activity to new property implementation

2024-11-13 Thread Christian Marangi
On Wed, Nov 13, 2024 at 12:00:59PM -0600, Tom Rini wrote: > On Sun, Nov 10, 2024 at 12:50:19PM +0100, Christian Marangi wrote: > > > This series is split in 2 part. > > > > While adapting the LED boot and activity code to the new property > > accepted by Rob in d

[PATCH v2 8/8] test: dm: Update test for LED activity and boot

2024-11-10 Thread Christian Marangi
Update test for LED activity and boot to follow new implementation with property set to the LED node phandle. Also update a copy-paste error in the function name for the activity tests and actually enable the test with the DM_TEST macro. Signed-off-by: Christian Marangi --- arch/sandbox/dts

[PATCH v2 7/8] led: update LED boot/activity to new property implementation

2024-11-10 Thread Christian Marangi
to have a suffix. While at it generalize the LED node label parsing since the logic is common for generic LED bind and LED activity/boot. Signed-off-by: Christian Marangi --- drivers/led/led-uclass.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git

[PATCH v2 6/8] test: dm: Add test for ofnode options phandle helper

2024-11-10 Thread Christian Marangi
Add test for ofnode options phandle helper and add new property in the sandbox test dts. Signed-off-by: Christian Marangi --- arch/sandbox/dts/test.dts | 1 + test/dm/ofnode.c | 11 +++ 2 files changed, 12 insertions(+) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox

[PATCH v2 5/8] dm: core: implement phandle ofnode_options helper

2024-11-10 Thread Christian Marangi
Implement ofnode_options phandle helper to get an ofnode from a phandle option in /options/u-boot. This helper can be useful since new DT yaml usually require to link a phandle of a node instead of referencing it by name or other indirect way. Signed-off-by: Christian Marangi --- drivers/core

[PATCH v2 4/8] test: dm: Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandle

2024-11-10 Thread Christian Marangi
Expand dm_test_ofnode_phandle(_ot) with new ofnode/tree_parse_phandle() op. Signed-off-by: Christian Marangi --- arch/sandbox/dts/other.dts | 7 ++ arch/sandbox/dts/test.dts | 7 ++ test/dm/ofnode.c | 44 ++ 3 files changed, 54 insertions

[PATCH v2 3/8] dm: core: implement ofnode/tree_parse_phandle() helper

2024-11-10 Thread Christian Marangi
Implement ofnode/tree_parse_phandle() helper as an equivalent of of_parse_phandle to handle simple single value phandle. Signed-off-by: Christian Marangi --- drivers/core/ofnode.c | 58 +++ include/dm/ofnode.h | 26 +++ 2 files changed

  1   2   3   4   >