3. Configuration Description¶
3.1. Kernel Configuration¶
Edit build/boards/{processor_name}/{board_name}/linux/ cvitek_{board_name}_defconfig,
Ex. build/boards/cv1801c_wevb_0009a_spinor/linux/cvitek_cv1801c_wevb_0009a_spinor_defconfig, enable Wifi-related Configuration (the red part is marked as the basic configuration that must be enabled, the other parts are enabled as needed).

Since the Wi-Fi interface is SDIO, it needs to be turned on Build/boards/cv180x/cv1801c_wevb_0009a_spinor/dts_riscv/{board_name}.dtsi
Confirm the wifisd node configuration as follows:
wifisd:wifi-sd@4320000 {
compatible = "cvitek,cv181x-sdio";
bus-width = <4>;
reg = <0x0 0x4320000 0x0 0x1000>;
reg_names = "core_mem";
src-frequency = <375000000>;
min-frequency = <400000>;
max-frequency = <50000000>;
64_addressing;
reset_tx_rx_phy;
non-removable;
pll_index = <0x7>;
pll_reg = <0x300207C>;
no-mmc;
no-sd;
};
Also edit build/boards/default/dts/cv180x/{board_name}_{bga or qfn}.dtsi ,
ex. build/boards/default/dts/cv180x/cv180x_asic_bga.dtsi or the dtsi file of the corresponding project to confirm no-delete configuration of wifi-sd@5000000 node, example as follows:
/* /delete-node/ wifi-sd@5000000; */ /* comment or delete this row */
/delete-node/ i2c@04010000;
/delete-node/ i2c@04020000;
/delete-node/ ethernet@04520000;
/delete-node/ i2s@04120000;
…
3.2. Configure SDIO¶
Please refer to the relevant chapters of SDIO in <Peripheral Driver Operation Guide>. The SDIO IO voltage is 3.3V. Make sure the Wi-Fi module IO voltage is the same as the SDIO voltage.
3.3. Configure Pinmux¶
If the interface of Wi-Fi module is SDIO, the SDIO pinmux configuration can be set for the CV180X/1X by adding the required pinmux settings in the cvi_board_init.c file located at build/boards/{processor_name}/{board_name}/u-boot/, ex. (Following is the EVB configuration of 181xH, and the pin configured is the pin from SoC to the processor_en of WiFi module (according to the circuit diagram))
int cvi_board_init(void)
{
…
//#########WIFI
pinmux_config(PINMUX_SDIO1);
PINMUX_CONFIG(JTAG_CPU_TCK, XGPIOA_18);
…
return 0;
}
For pin configuration details, please refer to u-boot-2021.10/board/cvitek/cv181x/board.c
3.4. Configure Wifi GPIO¶
Since the processor_en pin of the Wi-Fi module is controlled by a GPIO on the SOC, in order to operate this GPIO, we specially made a simple module and used the interface provided by the module to power up and down the wifi in the wifi driver. GPIO used by wifi can be specified through the device tree: (where the wakeup function is not used and can be removed; The poweron pin corresponds to the pinmux set in the previous section)

This configuration is in the file build/boards/default/{processor_name}/{processor_name}_base.dtsi