Added support for SPI in 4-wire and 3-wire configurations to the Infineon AIROC WiFi driver (drivers/wifi/infineon). Review changes: Move DT_DRV_COMPAT to common header file Correct board-specific preprocessor lines Removed AIROC_MAP_COUNTRY_CODE Move Pico W configuration details to devicetree Use pinctrl to manage shared data/interrupt GPIO Clean up bus selection in Kconfig.airoc Make SDIO and SPI bus struct independent Replace LOG_DBG with LOG_ERR Remove functionally duplicate operation Remove spurious Kconfig option Minor cleanup in CMakeLists.txt Signed-off-by: Steve Boylan <stephen.boylan@beechwoods.com>
51 lines
1.6 KiB
C
51 lines
1.6 KiB
C
/*
|
|
* Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or
|
|
* an affiliate of Cypress Semiconductor Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <whd.h>
|
|
#include <zephyr/device.h>
|
|
|
|
/** Defines the amount of stack memory available for the wifi thread. */
|
|
#if !defined(CY_WIFI_THREAD_STACK_SIZE)
|
|
#define CY_WIFI_THREAD_STACK_SIZE (5120)
|
|
#endif
|
|
|
|
/** Defines the priority of the thread that services wifi packets. Legal values are defined by the
|
|
* RTOS being used.
|
|
*/
|
|
#if !defined(CY_WIFI_THREAD_PRIORITY)
|
|
#define CY_WIFI_THREAD_PRIORITY (CY_RTOS_PRIORITY_HIGH)
|
|
#endif
|
|
|
|
/** Defines the country this will operate in for wifi initialization parameters. See the
|
|
* wifi-host-driver's whd_country_code_t for legal options.
|
|
*/
|
|
#if !defined(CY_WIFI_COUNTRY)
|
|
#define CY_WIFI_COUNTRY (WHD_COUNTRY_AUSTRALIA)
|
|
#endif
|
|
|
|
/** Defines the priority of the interrupt that handles out-of-band notifications from the wifi
|
|
* chip. Legal values are defined by the MCU running this code.
|
|
*/
|
|
#if !defined(CY_WIFI_OOB_INTR_PRIORITY)
|
|
#define CY_WIFI_OOB_INTR_PRIORITY (2)
|
|
#endif
|
|
|
|
/** Defines whether to use the out-of-band pin to allow the WIFI chip to wake up the MCU. */
|
|
#if defined(CY_WIFI_HOST_WAKE_SW_FORCE)
|
|
#define CY_USE_OOB_INTR (CY_WIFI_HOST_WAKE_SW_FORCE)
|
|
#else
|
|
#define CY_USE_OOB_INTR (1u)
|
|
#endif /* defined(CY_WIFI_HOST_WAKE_SW_FORCE) */
|
|
|
|
#define CY_WIFI_HOST_WAKE_IRQ_EVENT GPIO_INT_TRIG_LOW
|
|
#define DEFAULT_OOB_PIN (0)
|
|
#define WLAN_POWER_UP_DELAY_MS (250)
|
|
#define WLAN_CBUCK_DISCHARGE_MS (10)
|
|
|
|
extern whd_resource_source_t resource_ops;
|
|
|
|
int airoc_wifi_power_on(const struct device *dev);
|