Skip to content

Commit

Permalink
boards: arm: cy8cproto-062-4343w: enable WIFI feature
Browse files Browse the repository at this point in the history
Enable WIFI feature for cy8cproto-062-4343w board.

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
  • Loading branch information
npal-cy committed Nov 7, 2023
1 parent 65ee823 commit 228e480
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 4 deletions.
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

0 comments on commit 228e480

Please sign in to comment.