WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
board.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2021-2023. All rights reserved.
3 * Description: Host board config header file.
4 * Author:
5 * Create: 2021-06-01
6 */
7
8#ifndef __BOARD_H__
9#define __BOARD_H__
10/*****************************************************************************
11 1 Include other Head file
12*****************************************************************************/
13#include <linux/platform_device.h>
14#include <linux/regulator/consumer.h>
15#include <linux/regulator/driver.h>
16#include <linux/regulator/machine.h>
17
18#include "oal_plat_type.h"
19#include "hcc_bus.h"
20
21/*****************************************************************************
22 2 Define macro
23*****************************************************************************/
24
25#define BOARD_SUCC (0)
26#define BOARD_FAIL (-1)
27
28#define VERSION_FPGA (0)
29#define VERSION_ASIC (1)
30
31#define WIFI_TAS_DISABLE (0)
32#define WIFI_TAS_ENABLE (1)
33
34#define PMU_CLK_REQ_DISABLE (0)
35#define PMU_CLK_REQ_ENABLE (1)
36
37#define GPIO_LOWLEVEL (0)
38#define GPIO_HIGHLEVEL (1)
39
40#define NO_NEED_POWER_PREPARE (0)
41#define NEED_POWER_PREPARE (1)
42
43#define PINMUX_SET_INIT (0)
44#define PINMUX_SET_SUCC (1)
45
46/* ini cfg */
47#define INI_BT_BUS "board_info.bt_bus"
48#define INI_WIFI_BUS "board_info.wlan_bus"
49
50#define DOWNLOAD_MODE_SDIO "sdio"
51#define DOWNLOAD_MODE_PCIE "pcie"
52#define DOWNLOAD_MODE_UART "uart"
53#define DOWNLOAD_MODE_USB "usb"
54
55#define BOARD_VERSION_LEN (128)
56#define DOWNLOAD_CHANNEL_LEN (64)
57#define BT_BUS_NAME_LEN 5
58
59#define INI_SSI_DUMP_EN "ssi_dump_enable"
60
61/*****************************************************************************
62 3 STRUCT DEFINE
63*****************************************************************************/
71
72/* private data for pm driver */
73typedef struct {
74 /* board init ops */
75 struct bd_init_s bd_ops;
76
77 /* power */
79
80 /* wakeup gpio */
85
86 /* how to download firmware */
89
90 /* irq info */
93
94 /* uart info */
95 const char *uart_port;
97
98 /* ini cfg */
100} board_info;
101
106
116
124extern osal_s32 board_wifi_tas_set(int value);
132extern osal_s32 get_board_gpio_etc(const char *gpio_node, const char *gpio_prop, osal_s32 *physical_gpio);
134extern osal_s32 get_board_custmize_etc(const char *cust_node, const char *cust_prop, const char **cust_prop_val);
135extern osal_s32 get_board_dts_node_etc(struct device_node **np, const char *node_prop);
137#endif
138
struct bd_init_s bd_init_t
int board_get_wlan_wkup_gpio_val_etc(void)
osal_s32 board_wlan_gpio_power_off(void)
osal_s32 get_wlan_bus_type(void)
osal_s32 get_board_gpio_etc(const char *gpio_node, const char *gpio_prop, osal_s32 *physical_gpio)
osal_s32 board_wifi_tas_set(int value)
osal_s32 get_board_dts_node_etc(struct device_node **np, const char *node_prop)
board_power
Definition board.h:107
@ POWER_BUTT
Definition board.h:110
@ WLAN_POWER
Definition board.h:108
@ BFGX_POWER
Definition board.h:109
osal_s32 board_power_on_etc(osal_u32 subsystem)
board_power_state
Definition board.h:112
@ BOARD_POWER_OFF
Definition board.h:113
@ BOARD_POWER_ON
Definition board.h:114
osal_s32 board_power_off_etc(osal_u32 subsystem)
board_info * get_board_info(void)
osal_s32 hh503_board_init(void)
osal_s32 board_wlan_gpio_power_on(void)
osal_s32 get_bt_bus_type(void)
osal_s32 board_get_host_wakeup_dev_stat(void)
osal_s32 board_power_reset(osal_u32 subsystem)
int board_get_bwkup_gpio_val_etc(void)
osal_s32 board_host_wakeup_dev_set(int value)
osal_s32 get_board_custmize_etc(const char *cust_node, const char *cust_prop, const char **cust_prop_val)
int board_is_support_wkup_gpio(void)
void hh503_board_exit(void)
void boart_power_state_change(osal_s32 flag)
#define DOWNLOAD_CHANNEL_LEN
Definition board.h:56
int osal_s32
Definition osal_types.h:19
unsigned char osal_u8
Definition osal_types.h:11
unsigned int osal_u32
Definition osal_types.h:13
Definition board.h:64
osal_s32(* wlan_power_on_etc)(void)
Definition board.h:66
osal_s32(* board_power_reset)(osal_u32 subsystem)
Definition board.h:69
osal_s32(* board_power_on_etc)(osal_u32 subsystem)
Definition board.h:67
osal_s32(* board_power_off_etc)(osal_u32 subsystem)
Definition board.h:68
osal_s32(* wlan_power_off_etc)(void)
Definition board.h:65
Definition board.h:73
osal_s32 bt_bus
Definition board.h:88
osal_u32 wlan_irq
Definition board.h:91
osal_u32 bt_irq
Definition board.h:92
osal_s32 host_wakeup_wlan
Definition board.h:84
osal_s32 wlan_wakeup_host
Definition board.h:82
osal_s32 bt_wakeup_host
Definition board.h:83
osal_s32 wkup_gpio_support
Definition board.h:81
char * ini_file_name
Definition board.h:99
osal_s32 wlan_bus
Definition board.h:87
const char * uart_port
Definition board.h:95
osal_s32 uart_pclk
Definition board.h:96
osal_s32 power_gpio
Definition board.h:78
Definition board.h:102
osal_u32 index
Definition board.h:103