This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit e158e68339ce2e825dc15b66e7b61a863dadba43
Author: Ricard Rosson <[email protected]>
AuthorDate: Wed Oct 28 08:54:39 2026 +0000

    boards/arm/rp23xx: Share the CYW43439 Kconfig options between boards.
    
    raspberrypi-pico-2-w and pimoroni-pico-plus-2-w carried identical
    copies of the CYW43439 options (RP23XX_INFINEON_CYW43439, the
    firmware path and length) and of the ARCH_LEDS default.
    
    Move them to the rp23xx common Kconfig, under a new hidden option,
    RP23XX_HAVE_CYW43439, that both boards select.  The resolved
    configuration of every defconfig of the two boards is unchanged apart
    from the new option.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Ricard Rosson <[email protected]>
---
 boards/Kconfig                                   |  2 +
 boards/arm/rp23xx/common/Kconfig                 | 62 ++++++++++++++++++++++++
 boards/arm/rp23xx/pimoroni-pico-plus-2-w/Kconfig | 47 ------------------
 boards/arm/rp23xx/raspberrypi-pico-2-w/Kconfig   | 47 ------------------
 4 files changed, 64 insertions(+), 94 deletions(-)

diff --git a/boards/Kconfig b/boards/Kconfig
index 6484cc2880d..52450277701 100644
--- a/boards/Kconfig
+++ b/boards/Kconfig
@@ -2486,6 +2486,7 @@ config ARCH_BOARD_RASPBERRYPI_PICO_2_W
        bool "Raspberry Pi Pico 2 W board"
        depends on ARCH_CHIP_RP23XX
        select ARCH_HAVE_LEDS
+       select RP23XX_HAVE_CYW43439
        ---help---
                This is a port to the Raspberry Pi Pico 2 W board, with support 
for
                the onboard Infineon CYW43439 Wi-Fi chip.
@@ -2521,6 +2522,7 @@ config ARCH_BOARD_PIMORONI_PICO_PLUS_2_W
        select ARCH_HAVE_BUTTONS
        select ARCH_HAVE_IRQBUTTONS
        select RP23XX_RP2350B
+       select RP23XX_HAVE_CYW43439
        ---help---
                This is a port to the Pimoroni Pico Plus 2 W board, which adds 
an
                Infineon CYW43439 WiFi/Bluetooth chip to the Pico Plus 2.
diff --git a/boards/arm/rp23xx/common/Kconfig b/boards/arm/rp23xx/common/Kconfig
index aceef7ee7a0..beb59674b08 100644
--- a/boards/arm/rp23xx/common/Kconfig
+++ b/boards/arm/rp23xx/common/Kconfig
@@ -13,6 +13,68 @@ config RP23XX_UF2_BINARY
        ---help---
                Create nuttx.uf2 binary format used on RP23XX based arch.
 
+#####################################################################
+#  Infineon CYW43439 Wi-Fi Configuration
+#####################################################################
+
+config RP23XX_HAVE_CYW43439
+       bool
+       default n
+       ---help---
+               Selected by boards that carry an Infineon CYW43439 Wi-Fi chip 
on the
+               gSPI pins used by the Raspberry Pi Pico 2 W (GPIO 23, 24, 25 
and 29),
+               with the board LED on the chip's GPIO 0.
+
+if RP23XX_HAVE_CYW43439
+
+# On these boards the only LED hangs off a GPIO of the CYW43439, so setting it
+# means a transaction on the gSPI bus.  board_autoled_on() is called from
+# interrupt handlers and from assertion handling, where that is not
+# permissible, so these boards support the CONFIG_USERLED interface only.
+# Override the generic "default y" so that a fresh configuration does not
+# select something these boards cannot implement.
+
+config ARCH_LEDS
+       default n
+
+menuconfig RP23XX_INFINEON_CYW43439
+       bool "Has Infineon cyw43439 WiFi chip"
+       depends on IEEE80211_INFINEON_CYW43439
+       default y
+
+endif # RP23XX_HAVE_CYW43439
+
+if RP23XX_INFINEON_CYW43439
+
+config CYW43439_FIRMWARE_BIN_PATH
+       string "Path to Infineon 43439 firmware file"
+       default 
"${PICO_SDK_PATH}/lib/cyw43-driver/firmware/43439A0-7.95.49.00.combined"
+       ---help---
+               This should be a path to a file containing both the cyw43439 
firmware and
+               the CLM blob.  The firmware should be padded to a 256 byte 
boundary and
+               then the CLM blob should be appended.
+
+               If this file is updated, check the CYW43439_FIRMWARE_LEN below 
to make sure
+               it reflects the un-padded length of the firmware part.
+
+               pico-sdk 2.x no longer ships this blob as a binary, only as the 
C header
+               lib/cyw43-driver/firmware/w43439A0_7_95_49_00_combined.h.  If 
that is all
+               you have, convert the byte array in that header back to a 
binary and point
+               this option at the result.
+
+config CYW43439_FIRMWARE_LEN
+       int "Infineon 43439 firmware length (bytes)"
+       default 224190
+       ---help---
+               This is the length of just the base firmware in the firmware 
file specified
+               by the "Path to Infineon 43439 firmware file" configuration 
option.
+
+               This length does not include the length of any padding nor the 
length of
+               the appended clm_blob. If a clm_blob is present in the firmware 
file, this
+               length will be less than the length of the whole file.
+
+endif
+
 #####################################################################
 #  PSRAM Configuration
 #####################################################################
diff --git a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/Kconfig 
b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/Kconfig
index eab5f150fd0..6ca7c0afa8e 100644
--- a/boards/arm/rp23xx/pimoroni-pico-plus-2-w/Kconfig
+++ b/boards/arm/rp23xx/pimoroni-pico-plus-2-w/Kconfig
@@ -4,51 +4,4 @@
 #
 
 if ARCH_BOARD_PIMORONI_PICO_PLUS_2_W
-
-# The board's only LED hangs off a GPIO of the CYW43439, so setting it means a
-# transaction on the gSPI bus.  board_autoled_on() is called from interrupt
-# handlers and from assertion handling, where that is not permissible, so this
-# board supports the CONFIG_USERLED interface only.  Override the generic
-# "default y" so that a fresh configuration does not select something this
-# board cannot implement.
-
-config ARCH_LEDS
-       default n
-
-menuconfig RP23XX_INFINEON_CYW43439
-       bool "Has Infineon cyw43439 WiFi chip"
-       depends on IEEE80211_INFINEON_CYW43439
-       default y
-
-endif
-
-if RP23XX_INFINEON_CYW43439
-
-config CYW43439_FIRMWARE_BIN_PATH
-       string "Path to Infineon 43439 firmware file"
-       default 
"${PICO_SDK_PATH}/lib/cyw43-driver/firmware/43439A0-7.95.49.00.combined"
-       ---help---
-               This should be a path to a file containing both the cyw43439 
firmware and
-               the CLM blob.  The firmware should be padded to a 256 byte 
boundary and
-               then the CLM blob should be appended.
-
-               If this file is updated, check the CYW43439_FIRMWARE_LEN below 
to make sure
-               it reflects the un-padded length of the firmware part.
-
-               pico-sdk 2.x no longer ships this blob as a binary, only as the 
C header
-               lib/cyw43-driver/firmware/w43439A0_7_95_49_00_combined.h.  If 
that is all
-               you have, convert the byte array in that header back to a 
binary and point
-               this option at the result.
-
-config CYW43439_FIRMWARE_LEN
-       int "Infineon 43439 firmware length (bytes)"
-       default 224190
-       ---help---
-               This is the length of just the base firmware in the firmware 
file specified
-               by the "Path to Infineon 43439 firmware file" configuration 
option.
-
-               This length does not include the length of any padding nor the 
length of
-               the appended clm_blob. If a clm_blob is present in the firmware 
file, this
-               length will be less than the length of the whole file.
-
 endif
diff --git a/boards/arm/rp23xx/raspberrypi-pico-2-w/Kconfig 
b/boards/arm/rp23xx/raspberrypi-pico-2-w/Kconfig
index 5cc7b9618e8..534271e2d89 100644
--- a/boards/arm/rp23xx/raspberrypi-pico-2-w/Kconfig
+++ b/boards/arm/rp23xx/raspberrypi-pico-2-w/Kconfig
@@ -4,51 +4,4 @@
 #
 
 if ARCH_BOARD_RASPBERRYPI_PICO_2_W
-
-# The board's only LED hangs off a GPIO of the CYW43439, so setting it means a
-# transaction on the gSPI bus.  board_autoled_on() is called from interrupt
-# handlers and from assertion handling, where that is not permissible, so this
-# board supports the CONFIG_USERLED interface only.  Override the generic
-# "default y" so that a fresh configuration does not select something this
-# board cannot implement.
-
-config ARCH_LEDS
-       default n
-
-menuconfig RP23XX_INFINEON_CYW43439
-       bool "Has Infineon cyw43439 WiFi chip"
-       depends on IEEE80211_INFINEON_CYW43439
-       default y
-
-endif
-
-if RP23XX_INFINEON_CYW43439
-
-config CYW43439_FIRMWARE_BIN_PATH
-       string "Path to Infineon 43439 firmware file"
-       default 
"${PICO_SDK_PATH}/lib/cyw43-driver/firmware/43439A0-7.95.49.00.combined"
-       ---help---
-               This should be a path to a file containing both the cyw43439 
firmware and
-               the CLM blob.  The firmware should be padded to a 256 byte 
boundary and
-               then the CLM blob should be appended.
-
-               If this file is updated, check the CYW43439_FIRMWARE_LEN below 
to make sure
-               it reflects the un-padded length of the firmware part.
-
-               pico-sdk 2.x no longer ships this blob as a binary, only as the 
C header
-               lib/cyw43-driver/firmware/w43439A0_7_95_49_00_combined.h.  If 
that is all
-               you have, convert the byte array in that header back to a 
binary and point
-               this option at the result.
-
-config CYW43439_FIRMWARE_LEN
-       int "Infineon 43439 firmware length (bytes)"
-       default 224190
-       ---help---
-               This is the length of just the base firmware in the firmware 
file specified
-               by the "Path to Infineon 43439 firmware file" configuration 
option.
-
-               This length does not include the length of any padding nor the 
length of
-               the appended clm_blob. If a clm_blob is present in the firmware 
file, this
-               length will be less than the length of the whole file.
-
 endif

Reply via email to