Skip to content

drivers: wifi: add Infineon AIROC WIFI driver #63721

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards/arm/arduino_giga_r1/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ config BOARD

if BT

choice CYW43XXX_PART
choice AIROC_PART
default CYW4343W
endchoice

Expand Down
19 changes: 17 additions & 2 deletions boards/arm/cy8cproto_062_4343w/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ config BOARD

if WIFI || BT

# Select CYW43XXX part and module
choice CYW43XXX_PART
# Select AIROC part and module
choice AIROC_PART
default CYW4343W
endchoice

Expand All @@ -21,6 +21,16 @@ endchoice

endif # WIFI || BT

if WIFI

config WIFI_AIROC
default y

# Enable L2 Ethernet
config NET_L2_ETHERNET
default y

endif # WIFI

if BT

Expand All @@ -38,4 +48,9 @@ endchoice

endif # BT

# Heap Pool Size
config HEAP_MEM_POOL_SIZE
default 15000 if WIFI
default 4096

endif # BOARD_CY8CPROTO_062_4343W
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
status = "okay";
};

&gpio_prt2 {
status = "okay";
};

&gpio_prt3 {
status = "okay";
};
Expand Down
41 changes: 40 additions & 1 deletion boards/arm/cy8cproto_062_4343w/cy8cproto_062_4343w-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Rtone.
* Copyright (c) 2023 Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down Expand Up @@ -28,3 +28,42 @@
&p5_0_scb5_uart_rx {
input-enable;
};

&pinctrl {
/* Configure pin control bias mode for SDIO */
p2_5_sdio_clk: p2_5_sdio_clk {
pinmux = <DT_CAT1_PINMUX(2, 5, HSIOM_SEL_ACT_14)>;
drive-push-pull;
input-enable;
};

p2_4_sdio_cmd: p2_4_sdio_cmd {
pinmux = <DT_CAT1_PINMUX(2, 4, HSIOM_SEL_ACT_14)>;
drive-push-pull;
input-enable;
};

p2_0_sdio_data0: p2_0_sdio_data0 {
pinmux = <DT_CAT1_PINMUX(2, 0, HSIOM_SEL_ACT_14)>;
drive-push-pull;
input-enable;
};

p2_1_sdio_data1: p2_1_sdio_data1 {
pinmux = <DT_CAT1_PINMUX(2, 1, HSIOM_SEL_ACT_14)>;
drive-push-pull;
input-enable;
};

p2_2_sdio_data2: p2_2_sdio_data2 {
pinmux = <DT_CAT1_PINMUX(2, 2, HSIOM_SEL_ACT_14)>;
drive-push-pull;
input-enable;
};

p2_3_sdio_data3: p2_3_sdio_data3 {
pinmux = <DT_CAT1_PINMUX(2, 3, HSIOM_SEL_ACT_14)>;
drive-push-pull;
input-enable;
};
};
22 changes: 21 additions & 1 deletion boards/arm/cy8cproto_062_4343w/cy8cproto_062_4343w.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
uart-5 = &uart5;
i2c-0 = &i2c3;
watchdog0 = &watchdog0;
sdhc0 = &sdhc0;
};

chosen {
Expand Down Expand Up @@ -50,7 +51,7 @@ uart2: &scb2 {

current-speed = <115200>;

/* HCI-UART pins*/
/* HCI-UART pins */
pinctrl-0 = <&p3_1_scb2_uart_tx &p3_0_scb2_uart_rx &p3_2_scb2_uart_rts &p3_3_scb2_uart_cts>;
pinctrl-names = "default";

Expand All @@ -68,6 +69,25 @@ uart2: &scb2 {
};
};

&sdhc0 {
status = "okay";

/* SDIO pins */
pinctrl-0 = <&p2_4_sdio_cmd &p2_5_sdio_clk &p2_0_sdio_data0
&p2_1_sdio_data1 &p2_2_sdio_data2 &p2_3_sdio_data3>;
pinctrl-names = "default";

/* Wi-Fi configuration */
airoc-wifi {
status = "okay";
compatible = "infineon,airoc-wifi";

/* Wi-Fi control gpios */
wifi-reg-on-gpios = <&gpio_prt2 6 GPIO_ACTIVE_HIGH>;
wifi-host-wake-gpios = <&gpio_prt0 4 GPIO_ACTIVE_HIGH>;
};
};

/* System clock configuration */
&fll0 {
status = "okay";
Expand Down
4 changes: 4 additions & 0 deletions boards/arm/cy8cproto_062_4343w/cy8cproto_062_4343w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ toolchain:
- gnuarmemb
supported:
- adc
- bluetooth
- wifi
- airoc
- cyw4343w
- counter
- gpio
- uart
Expand Down
3 changes: 3 additions & 0 deletions boards/arm/cy8cproto_062_4343w/cy8cproto_062_4343w_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ CONFIG_GPIO=y

# Enable clock controller
CONFIG_CLOCK_CONTROL=y

# Main Stack Size
CONFIG_MAIN_STACK_SIZE=2048
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if(CONFIG_BT_HCI_IPC)
endif()

zephyr_library_sources_ifdef(CONFIG_BT_B91 hci_b91.c)
zephyr_library_sources_ifdef(CONFIG_BT_CYW43XXX cyw43xxx.c)
zephyr_library_sources_ifdef(CONFIG_BT_AIROC cyw43xxx.c)
zephyr_library_sources_ifdef(CONFIG_BT_ESP32 hci_esp32.c)
zephyr_library_sources_ifdef(CONFIG_BT_H4 h4.c)
zephyr_library_sources_ifdef(CONFIG_BT_H5 h5.c)
Expand Down
4 changes: 2 additions & 2 deletions drivers/bluetooth/hci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ config BT_STM32_IPM_RX_STACK_SIZE
depends on BT_STM32_IPM
default 512

menuconfig BT_CYW43XXX
bool "CYW43XXX BT connectivity"
menuconfig BT_AIROC
bool "AIROC BT connectivity"
default y
select BT_HCI_SETUP
depends on GPIO
Expand Down
20 changes: 10 additions & 10 deletions drivers/bluetooth/hci/Kconfig.infineon
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# an affiliate of Cypress Semiconductor Corporation
# SPDX-License-Identifier: Apache-2.0

if BT_CYW43XXX
if BT_AIROC

choice CYW43XXX_PART
prompt "Select CYW43XXX part"
choice AIROC_PART
prompt "Select AIROC part"

config CYW4343W
bool "CYW4343W"
Expand Down Expand Up @@ -42,12 +42,12 @@ config CYW43439
More information about CYW43439 device you can find on
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/cyw43439/

config BT_CYW43XXX_CUSTOM
bool "Custom CYW43xx device/module"
config BT_AIROC_CUSTOM
bool "Custom AIROC device/module"
help
Select Custom CYW43xx device/module. For this option,
Select Custom AIROC device/module. For this option,
user must to provide path to BT firmware HCD file for
custom or vendor CYW43xx modules in CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB.
custom or vendor AIROC modules in AIROC_CUSTOM_FIRMWARE_HCD_BLOB.

endchoice

Expand Down Expand Up @@ -117,8 +117,8 @@ config CYW43439_MURATA_1YN

endchoice

config CYW43XX_CUSTOM_FIRMWARE_HCD_BLOB
depends on BT_CYW43XXX_CUSTOM
config AIROC_CUSTOM_FIRMWARE_HCD_BLOB
depends on BT_AIROC_CUSTOM
string "Path to user BT firmware HCD file"
help
Path to BT firmware HCD file for custom or vendor CYW43xx modules.
Expand All @@ -134,7 +134,7 @@ config BT_BUF_CMD_TX_SIZE
config BT_ATT_ENFORCE_FLOW
default n

endif # BT_CYW43XXX
endif # BT_AIROC

if BT_PSOC6_BLESS

Expand Down
1 change: 1 addition & 0 deletions drivers/sdhc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ zephyr_library_sources_ifdef(CONFIG_SPI_SDHC sdhc_spi.c)
zephyr_library_sources_ifdef(CONFIG_MCUX_SDIF mcux_sdif.c)
zephyr_library_sources_ifdef(CONFIG_SAM_HSMCI sam_hsmci.c)
zephyr_library_sources_ifdef(CONFIG_INTEL_EMMC_HOST intel_emmc_host.c)
zephyr_library_sources_ifdef(CONFIG_SDHC_INFINEON_CAT1 ifx_cat1_sdio.c)
endif()
1 change: 1 addition & 0 deletions drivers/sdhc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ menuconfig SDHC

if SDHC

source "drivers/sdhc/Kconfig.ifx_cat1"
source "drivers/sdhc/Kconfig.imx"
source "drivers/sdhc/Kconfig.spi"
source "drivers/sdhc/Kconfig.mcux_sdif"
Expand Down
22 changes: 22 additions & 0 deletions drivers/sdhc/Kconfig.ifx_cat1
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Infineon CAT1 SDHC configuration options

# Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or
# an affiliate of Cypress Semiconductor Corporation
#
# SPDX-License-Identifier: Apache-2.0

config SDHC_INFINEON_CAT1
bool "Infineon CAT1 SDHC driver"
default y
depends on DT_HAS_INFINEON_CAT1_SDHC_SDIO_ENABLED
select USE_INFINEON_SDIO
select SDHC_SUPPORTS_NATIVE_MODE
help
This option enables the SDHC driver for Infineon CAT1 family.

if SDHC_INFINEON_CAT1

config SDHC_INIT_PRIORITY
default 70

endif
Loading