zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.48k stars 6.41k forks source link

Kconfig WIFI_AIROC should not depend on infineon SOC family selection #77012

Closed ivanwagner closed 1 week ago

ivanwagner commented 1 month ago

Describe the bug Murata manufactures the 1YN module which includes both WiFi and BT modules. The module hosts an Infineon CYW43439 processor and this module can comunicate via UART (BT) and SDIO (WiFi) with a host processor thus offloading the main processor in regards of networking. It is not possible to select the following because of wrong Kconfig rules:

CONFIG_NETWORKING=y
CONFIG_WIFI=y
CONFIG_WIFI_AIROC=y
CONFIG_CYW43439=y
CONFIG_CYW43439_MURATA_1YN=y
CONFIG_WIFI_OFFLOAD=y
CONFIG_NET_OFFLOAD=y

To Reproduce

dts:

/dts-v1/;
#include <st/u5/stm32u5a9Xj.dtsi>
#include <st/u5/stm32u5a9njhxq-pinctrl.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
    model = "Board module";
    compatible = "st,stm32u5a9j_dk";

};

&sdmmc1 {
    pinctrl-0 = <&sdmmc1_d0_pc8 &sdmmc1_d1_pc9
        &sdmmc1_d2_pc10 &sdmmc1_d3_pc11
        &sdmmc1_d4_pb8 &sdmmc1_ck_pc12
        &sdmmc1_cmd_pd2>;
    pinctrl-names = "default";
    status = "okay";

    /* Wifi configuration */
    airoc-wifi {
        status = "okay";
        compatible = "infineon,airoc-wifi", "infineon,airoc-wifi-sdio";

        /* Wi-Fi control gpios */
        wifi-reg-on-gpios    = <&gpioi 12 GPIO_ACTIVE_HIGH>;
        wifi-host-wake-gpios = <&gpioi 14 GPIO_ACTIVE_HIGH>;
    };

};

Steps to reproduce the behavior:

  1. west build -b stm32u5a9j_dk -t menuconfig
  2. See error

Expected behavior It should include the necessary drivers in order to communicate with the 1YN module via SDIO (Wifi).

Impact It's not possible to use a 1YN module connected to a host processor which is different than an Infieon chip.

Logs and console output

Loading Zephyr default modules (Zephyr base (cached)).
-- Application: /home/user/projects/board/board_sw_workspace/board_sw/app
-- CMake version: 3.22.1
-- Cache files will be written to: /home/user/.cache/zephyr
-- Zephyr version: 3.7.99 (/home/user/projects/board/board_sw_workspace/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.14.0")
-- Board: board1, qualifiers: stm32u5a9xx
-- Found host-tools: zephyr 0.16.8 (/home/user/zephyr-sdk-0.16.8)
-- Found toolchain: zephyr 0.16.8 (/home/user/zephyr-sdk-0.16.8)
-- Found BOARD.dts: /home/user/projects/board/board_sw_workspace/board_sw/app/boards/tinv/board1/board1.dts
-- Generated zephyr.dts: /home/user/projects/board/board_sw_workspace/board_sw/app/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: /home/user/projects/board/board_sw_workspace/board_sw/app/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/user/projects/board/board_sw_workspace/board_sw/app/build/zephyr/dts.cmake
Parsing /home/user/projects/board/board_sw_workspace/board_sw/app/Kconfig
Loaded configuration '/home/user/projects/board/board_sw_workspace/board_sw/app/build/zephyr/.config'

warning: USE_INFINEON_ABSTRACTION_RTOS (defined at modules/hal_infineon/Kconfig:80, modules/hal_infineon/Kconfig:80) has direct dependencies SOC_FAMILY_INFINEON_CAT1 || SOC_FAMILY_PSOC6_LEGACY || ((SOC_FAMILY_INFINEON_CAT1 || SOC_FAMILY_PSOC6_LEGACY) && 0) with value n, but is currently being y-selected by the following symbols:
 - WIFI_AIROC (defined at drivers/wifi/infineon/Kconfig.airoc:5), with value y, direct dependencies DT_HAS_INFINEON_AIROC_WIFI_ENABLED && WIFI (value: y), and select condition DT_HAS_INFINEON_AIROC_WIFI_ENABLED && WIFI (value: y)

error: Aborting due to Kconfig warnings

CMake Error at /home/user/projects/board/board_sw_workspace/zephyr/cmake/modules/kconfig.cmake:389 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  /home/user/projects/board/board_sw_workspace/zephyr/cmake/modules/zephyr_default.cmake:132 (include)
  /home/user/projects/board/board_sw_workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
  /home/user/projects/board/board_sw_workspace/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:97 (include_boilerplate)
  CMakeLists.txt:12 (find_package)

Environment:

Additional context

ifyall commented 4 weeks ago

We have filed an internal ticket to address this and should have a fix up in the next 24 hours. We had previously fixed this, but some MR regressed it. We are also going to develop an internal CI test to make sure future regressions don't occur or are detected ASAP.

npal-cy commented 4 weeks ago

Hi @ivanwagner ,

Also notice, that AIROC driver requires SDHC driver for SDIO communication, currently Zephyr doesn't support this driver for STM32 platforms (see https://github.com/zephyrproject-rtos/zephyr/tree/main/drivers/sdhc).

Regards, Nazar

ivanwagner commented 4 weeks ago

Hi @ifyall and @npal-cy, thank you for the prompt reply.