Modifying unreasonable deps

Signed-off-by: libing3@huawei.com <libing3@huawei.com>
Change-Id: Id220e1e4c236ff570158ae74a448e162f2eaff2f
This commit is contained in:
libing3@huawei.com 2022-05-07 15:24:04 +08:00
parent 157bb9032f
commit a74265ff6f
58 changed files with 5224 additions and 0 deletions

View File

@ -0,0 +1,879 @@
{
"product_name": "hispark_taurus_standard",
"device_company": "hisilicon",
"device_build_path": "device/board/hisilicon/hispark_taurus/linux",
"target_cpu": "arm",
"type": "standard",
"version": "3.0",
"board": "hispark_taurus",
"enable_ramdisk": true,
"subsystems": [
{
"subsystem": "arkui",
"components": [
{
"component": "ace_engine_standard",
"features": []
},
{
"component": "napi",
"features": []
}
]
},
{
"subsystem": "account",
"components": [
{
"component": "os_account",
"features": []
}
]
},
{
"subsystem": "distributeddatamgr",
"components": [
{
"component": "native_appdatamgr",
"features": []
},
{
"component": "distributeddatamgr",
"features": []
},
{
"component": "distributeddataobject",
"features": []
},
{
"component": "distributedfilejs",
"features": []
},
{
"component": "storage_standard",
"features": []
},
{
"component": "e2fsprogs",
"features": []
}
]
},
{
"subsystem": "filemanagement",
"components": [
{
"component": "user_file_service",
"features": []
},
{
"component": "storage_service",
"features": []
},
{
"component": "dfs_service",
"features": []
},
{
"component": "app_file_service",
"features": []
}
]
},
{
"subsystem": "common",
"components": [
{
"component": "common",
"features": [
"common_feature_verify = true"
]
}
]
},
{
"subsystem": "security",
"components": [
{
"component": "permission_standard",
"features": []
},
{
"component": "appverify",
"features": []
},
{
"component": "huks",
"features": []
},
{
"component": "deviceauth_standard",
"features": []
},
{
"component": "dataclassification",
"features": []
},
{
"component": "device_security_level",
"features": []
},
{
"component": "selinux",
"features": []
},
{
"component": "access_token",
"features": []
}
]
},
{
"subsystem": "useriam",
"components": [
{
"component": "pin_auth",
"features": []
},
{
"component": "user_auth",
"features": []
},
{
"component": "face_auth",
"features": []
}
]
},
{
"subsystem": "startup",
"components": [
{
"component": "startup_l2",
"features": []
},
{
"component": "appspawn",
"features": []
},
{
"component": "init",
"features": []
}
]
},
{
"subsystem": "hiviewdfx",
"components": [
{
"component": "hiviewdfx_hilog_native",
"features": []
},
{
"component": "hilog_native",
"features": []
},
{
"component": "hilog_service",
"features": []
},
{
"component": "hisysevent_native",
"features": []
},
{
"component": "hiappevent_native",
"features": []
},
{
"component": "hiappevent_js",
"features": []
},
{
"component": "hichecker_native",
"features": []
},
{
"component": "hichecker_js",
"features": []
},
{
"component": "hidumper",
"features": []
},
{
"component": "hiview",
"features": []
},
{
"component": "faultloggerd",
"features": []
},
{
"component": "hitrace_native",
"features": []
},
{
"component": "hicollie_native",
"features": []
}
]
},
{
"subsystem": "utils",
"components": [
{
"component": "utils_base",
"features": []
},
{
"component": "jsapi_sys",
"features": []
},
{
"component": "jsapi_api",
"features": []
},
{
"component": "jsapi_util",
"features": []
},
{
"component": "jsapi_worker",
"features": []
},
{
"component": "utils_memory",
"features": []
}
]
},
{
"subsystem": "developertest",
"components": [
{
"component": "developertest",
"features": []
}
]
},
{
"subsystem": "hisilicon_products",
"components": [
{
"component": "hisilicon_products",
"features": []
}
]
},
{
"subsystem": "appexecfwk",
"components": [
{
"component": "eventhandler",
"features": []
},
{
"component": "bundle_framework",
"features": []
},
{
"component": "bundle_tool",
"features": []
},
{
"component": "distributed_bundle_framework",
"features": []
}
]
},
{
"subsystem": "aafwk",
"components": [
{
"component": "ability_runtime",
"features": []
},
{
"component": "ability_tools",
"features": []
},
{
"component": "idl",
"features": []
},
{
"component": "form_runtime",
"features": []
},
{
"component": "ability_base",
"features": []
}
]
},
{
"subsystem": "notification",
"components": [
{
"component": "common_event_service",
"features": []
},
{
"component": "ans_standard",
"features": []
}
]
},
{
"subsystem": "communication",
"components": [
{
"component": "ipc",
"features": []
},
{
"component": "ipc_js",
"features": []
},
{
"component": "net_manager",
"features": []
},
{
"component": "netmanager_base",
"features": []
},
{
"component": "netmanager_ext",
"features": []
},
{
"component": "netstack",
"features": []
},
{
"component": "dsoftbus_standard",
"features": []
},
{
"component": "wifi",
"features": []
},
{
"component": "dhcp",
"features": []
},
{
"component": "bluetooth_native_js",
"features": []
}
]
},
{
"subsystem": "customization",
"components": [
{
"component": "config_policy",
"features": []
}
]
},
{
"subsystem": "distributedschedule",
"components": [
{
"component": "samgr_standard",
"features": []
},
{
"component": "safwk",
"features": []
},
{
"component": "dmsfwk_standard",
"features": []
}
]
},
{
"subsystem": "hdf",
"components": [
{
"component": "device_driver_framework",
"features": []
},
{
"component": "bluetooth_device_driver",
"features": []
},
{
"component": "input_device_driver",
"features": []
},
{
"component": "display_device_driver",
"features": []
},
{
"component": "thermal_device_driver",
"features": []
},
{
"component": "wlan_device_driver",
"features": []
},
{
"component": "sensor_device_driver",
"features": []
},
{
"component": "audio_device_driver",
"features": []
},
{
"component": "usb_device_driver",
"features": []
},
{
"component": "camera_device_driver",
"features": []
},
{
"component": "vibrator_device_driver",
"features": []
},
{
"component": "light_device_driver",
"features": []
},
{
"component": "codec_device_driver",
"features": []
},
{
"component": "power_device_driver",
"features": []
},
{
"component": "battery_device_driver",
"features": []
},
{
"component": "faceauth_device_driver",
"features": []
},
{
"component": "sensor_device_driver_interface",
"features": []
},
{
"component": "light_device_driver_interface",
"features": []
},
{
"component": "vibrator_device_driver_interface",
"features": []
},
{
"component": "power_device_driver_interface",
"features": []
},
{
"component": "battery_device_driver_interface",
"features": []
},
{
"component": "thermal_device_driver_interface",
"features": []
},
{
"component": "pinauth_device_driver_interface",
"features": []
},
{
"component": "faceauth_device_driver_interface",
"features": []
}
]
},
{
"subsystem": "kernel",
"components": [
{
"component": "linux",
"features": []
}
]
},
{
"subsystem": "updater",
"components": [
{
"component": "updater",
"features": []
},
{
"component": "update_service",
"features": []
}
]
},
{
"subsystem": "developtools",
"components": [
{
"component": "bytrace",
"features": []
},
{
"component": "hdc",
"features": []
},
{
"component": "profiler",
"features": []
},
{
"component": "hiperf",
"features": []
}
]
},
{
"subsystem": "sensors",
"components": [
{
"component": "miscdevice",
"features": []
},
{
"component": "sensor",
"features": []
},
{
"component": "medical_sensor",
"features": []
},
{
"component": "start",
"features": []
}
]
},
{
"subsystem": "graphic",
"components": [
{
"component": "graphic_standard",
"features": [
"graphic_standard_feature_ace_enable_gpu = false"
]
},
{
"component": "graphic_chipsetsdk",
"features": []
}
]
},
{
"subsystem": "window",
"components": [
{
"component": "window_manager",
"features": []
}
]
},
{
"subsystem": "miscservices",
"components": [
{
"component": "time_native",
"features": []
},
{
"component": "inputmethod_native",
"features": []
},
{
"component": "pasteboard_native",
"features": []
},
{
"component": "screenlock",
"features": []
},
{
"component": "wallpaper_native",
"features": []
},
{
"component": "request",
"features": []
}
]
},
{
"subsystem": "multimedia",
"components": [
{
"component": "multimedia_histreamer",
"features": []
},
{
"component": "multimedia_media_standard",
"features": []
},
{
"component": "multimedia_audio_standard",
"features": []
},
{
"component": "multimedia_camera_standard",
"features": []
},
{
"component": "multimedia_image_standard",
"features": []
},
{
"component": "multimedia_media_library_standard",
"features": []
}
]
},
{
"subsystem": "multimodalinput",
"components": [
{
"component": "input",
"features": []
}
]
},
{
"subsystem": "telephony",
"components": [
{
"component": "core_service",
"features": []
},
{
"component": "ril_adapter",
"features": []
},
{
"component": "data_storage",
"features": []
},
{
"component": "state_registry",
"features": []
},
{
"component": "cellular_call",
"features": []
},
{
"component": "cellular_data",
"features": []
},
{
"component": "sms_mms",
"features": []
},
{
"component": "call_manager",
"features": []
}
]
},
{
"subsystem": "global",
"components": [
{
"component": "i18n",
"features": []
},
{
"component": "timezone",
"features": []
},
{
"component": "resource_management",
"features": []
},
{
"component": "systemres",
"features": []
}
]
},
{
"subsystem": "powermgr",
"components": [
{
"component": "power_manager_native",
"features": []
},
{
"component": "battery_manager_native",
"features": []
},
{
"component": "battery_statistics_native",
"features": []
},
{
"component": "display_manager_native",
"features": []
},
{
"component": "thermal_manager",
"features": []
}
]
},
{
"subsystem": "usb",
"components": [
{
"component": "usb_manager",
"features": []
}
]
},
{
"subsystem": "applications",
"components": [
{
"component": "prebuilt_hap",
"features": []
}
]
},
{
"subsystem": "contactsdata",
"components": [
{
"component": "contactsdata_hap",
"features": []
}
]
},
{
"subsystem": "settingsnapi",
"components": [
{
"component": "settings_standard",
"features": []
}
]
},
{
"subsystem": "wpa_supplicant-2.9",
"components": [
{
"component": "wpa_supplicant-2.9",
"features": []
}
]
},
{
"subsystem": "xts",
"components": [
{
"component": "xts_acts",
"features": []
},
{
"component": "xts_hats",
"features": []
},
{
"component": "xts_dcts",
"features": []
}
]
},
{
"subsystem": "distributedhardware",
"components": [
{
"component": "device_manager_base",
"features": []
},
{
"component": "distributed_hardware_fwk",
"features": []
},
{
"component": "distributed_camera",
"features": []
},
{
"component": "distributed_screen",
"features": []
}
]
},
{
"subsystem": "ark",
"components": [
{
"component": "ark",
"features": []
},
{
"component": "ark_js_runtime",
"features": []
},
{
"component": "ark_ts2abc",
"features": []
}
]
},
{
"subsystem": "deviceprofile",
"components": [
{
"component": "device_profile_core",
"features": []
}
]
},
{
"subsystem": "resourceschedule",
"components": [
{
"component": "background_task_mgr",
"features": []
},
{
"component": "device_usage_statistics",
"features": []
}
]
},
{
"subsystem": "securec",
"components": [
{
"component": "thirdparty_bounds_checking_function",
"features": []
}
]
},
{
"subsystem": "msdp",
"components": [
{
"component": "device_status",
"features": []
}
]
}
]
}

View File

@ -0,0 +1,17 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
enable_audio_alsa_mode = false
enable_hdf_proxy_stub = true
enable_audio_hal_notsupport_pathselect = false
enable_hdf_audio_full_test_suite = true

View File

@ -0,0 +1,15 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
enable_HDF_NL80211 = true
enable_HDF_UT = true

View File

@ -0,0 +1,67 @@
#
# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
ifeq ($(LOCAL_HCS_ROOT),)
LOCAL_HCS_ROOT := $(PRODUCT_PATH)
endif
CURRENT_DIR := $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
SOURCE_ROOT := $(abspath $(CURRENT_DIR)/../../../../../)
HC_GEN_DIR := $(abspath $(SOURCE_ROOT)/drivers/framework/tools/hc-gen)
ifneq ($(OUT_DIR),)
HC_GEN := $(OUT_DIR)/kernel/OBJ/${KERNEL_VERSION}/drivers/hdf/khdf/hc_gen_build/hc-gen
else
HC_GEN := $(HC_GEN_DIR)/build/hc-gen
endif
LOCAL_HCS_ROOT := $(CURRENT_DIR)
HCS_DIR := $(LOCAL_HCS_ROOT)
ifneq ($(TARGET_BOARD_PLATFORM),)
HCS_DIR := $(LOCAL_HCS_ROOT)/$(TARGET_BOARD_PLATFORM)
else
ifneq ($(CONFIG_ARCH_HI3516DV300),)
HCS_DIR := $(LOCAL_HCS_ROOT)
endif
ifneq ($(CONFIG_ARCH_HI3518EV300),)
HCS_DIR := $(LOCAL_HCS_ROOT)
endif
endif
$(info HCS_DIR = $(HCS_DIR))
HCB_FLAGS := -b -i -a
HCS_OBJ := hdf_hcs_hex.o
HCS_OBJ_SRC := $(subst .o,.c,$(notdir $(HCS_OBJ)))
CONFIG_GEN_HEX_SRC := $(addprefix $(LOCAL_HCS_ROOT)/, $(HCS_OBJ_SRC))
CONFIG_HCS_SRC := $(subst _hcs_hex.o,.hcs,$(addprefix $(HCS_DIR)/, $(HCS_OBJ)))
$(obj)/$(HCS_OBJ): $(CONFIG_GEN_HEX_SRC)
$(Q)$(CC) $(c_flags) -c -o $@ $<
$(Q)rm -f $<
$(CONFIG_GEN_HEX_SRC): $(LOCAL_HCS_ROOT)/%_hcs_hex.c: $(HCS_DIR)/%.hcs | $(HC_GEN)
$(Q)echo gen hdf built-in config
$(Q)if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
$(Q)$(HC_GEN) $(HCB_FLAGS) -o $(subst _hex.c,,$(@)) $<
$(CONFIG_GEN_SRCS): $(CONFIG_OUT_DIR)%.c: $(HCS_DIR)/%.hcs | $(HC_GEN)
$(Q)echo gen hdf driver config
$(Q)if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
$(Q)$(HC_GEN) -t -o $@ $<
$(HC_GEN):
$(HIDE)make -C $(HC_GEN_DIR) BUILD_DIR=$(dir $@)
obj-$(CONFIG_DRIVERS_HDF) += $(HCS_OBJ)

View File

@ -0,0 +1,36 @@
root {
platfrom {
template card_controller {
match_attr = "";
serviceName = "";
codecName = "";
platformName = "";
cpuDaiName = "";
codecDaiName = "";
accessoryName = "";
accessoryDaiName = "";
dspName = "";
dspDaiName = "";
}
controller_0x120c1000 :: card_controller {
match_attr = "hdf_audio_driver_0";
serviceName = "hdf_audio_codec_primary_dev0";
codecName = "codec_service_0";
platformName = "dma_service_0";
cpuDaiName = "dai_service";
codecDaiName = "codec_dai";
dspName = "dsp_service_0";
dspDaiName = "dsp_dai";
}
controller_0x120c1001 :: card_controller {
match_attr = "hdf_audio_driver_1";
serviceName = "hdf_audio_codec_primary_dev11";
accessoryName = "codec_service_1";
platformName = "dma_service_0";
cpuDaiName = "dai_service";
accessoryDaiName = "accessory_dai";
dspName = "dsp_service_0";
dspDaiName = "dsp_dai";
}
}
}

View File

@ -0,0 +1,212 @@
root {
platfrom {
template codec_controller {
match_attr = "";
serviceName = "";
codecDaiName = "";
}
controller_0x120c1030 :: codec_controller {
match_attr = "hdf_codec_driver";
serviceName = "codec_service_0";
codecDaiName = "codec_dai";
idInfo {
chipName = "hi3516";
chipIdRegister = 0x113c0000;
chipIdSize = 0x1000;
}
regConfig {
/* reg, value */
initSeqConfig = [
0x14, 0x04000002,
0x18, 0xFD200004,
0x1C, 0x00180018,
0x20, 0x83830028,
0x24, 0x00005C5C,
0x28, 0x00130000,
0x30, 0xFF035A00,
0x34, 0x08000001,
0x38, 0x06062424,
0x3C, 0x1E1EC001,
0x14, 0x04000002
];
/* reg: register address
rreg: register address
shift: shift bits
rshift: rshift bits
min: min value
max: max value
mask: mask of value
invert: enum InvertVal 0-uninvert 1-invert
value: value
*/
ctrlParamsSeqConfig = [
0x2004, 0x2004, 8, 8, 0x28, 0x7F, 0x7F, 0, 0, //"Main Playback Volume"
0x3c, 0x3c, 24, 24, 0x0, 0x57, 0x7F, 1, 0, //"Main Capture Volume"
0x38, 0x38, 31, 31, 0x0, 0x1, 0x1, 0, 0, //"Playback Mute"
0x3c, 0x3c, 31, 31, 0x0, 0x1, 0x1, 0, 0, //"Capture Mute"
0x20, 0x20, 16, 16, 0x0, 0xF, 0x1F, 0, 0, //"Mic Left Gain"
0x20, 0x20, 24, 24, 0x0, 0xF, 0x1F, 0, 0, //"Mic Right Gain"
0x2000, 0x2000, 16, 16, 0x0, 0x7, 0x7, 0, 0, //"Render Channel Mode"
0x1000, 0x1000, 16, 16, 0x0, 0x7, 0x7, 0, 0 //"Captrue Channel Mode"
];
controlsConfig = [
/*
"Master Playback Volume",
"Master Capture Volume",
"Playback Mute",
"Capture Mute",
"Mic Left Gain",
"Mic Right Gain",
"External Codec Enable",
"Internally Codec Enable",
"Render Channel Mode",
"Captrue Channel Mode"
*/
/*array index, iface, enable*/
0, 0, 0,
1, 1, 1,
2, 0, 1,
3, 1, 1,
4, 2, 1,
5, 2, 1,
8, 6, 0,
9, 6, 0,
];
/* reg, rreg, shift, rshift, min, max, mask, invert, value */
daiStartupSeqConfig = [
0x24, 0x24, 11, 11, 0x0, 0x1, 0x1, 0, 0x1 // adc_tune_En09
];
/* reg, rreg, shift, rshift, min, max, mask, invert, value */
daiParamsSeqConfig = [
0x30, 0x30, 13, 13, 0x0, 0x1F, 0x1F, 0, 0x0, // i2s_frequency
0x1C, 0x1C, 6, 6, 0x0, 0x3, 0x3, 0, 0x0, // adc_mode_sel
0x30, 0x30, 22, 22, 0x0, 0x3, 0x3, 0, 0x0, // i2s_datawith
];
ctrlSapmParamsSeqConfig = [
0x20, 0x20, 23, 23, 0x0, 0x1, 0x1, 0, 0, //LPGA MIC 0 -- connect MIC
0x20, 0x20, 31, 31, 0x0, 0x1, 0x1, 0, 0, //RPGA MIC 0 -- connect MIC
0x30, 0x30, 27, 27, 0x0, 0x1, 0x1, 0, 0, //dacl to dacr mixer
0x30, 0x30, 26, 26, 0x0, 0x1, 0x1, 0, 0 //dacr to dacl mixer
];
/* index = "ADCL", "ADCR", "DACL", "DACR", "LPGA", "RPGA", "SPKL", "SPKR", "MIC"*/
sapmComponent = [
10, 0, 0x20, 0x1, 15, 1, 0, 0, //ADCL
10, 1, 0x20, 0x1, 14, 1, 0, 0, //ADCR
11, 2, 0x14, 0x1, 11, 1, 0, 0, //DACL
11, 3, 0x14, 0x1, 12, 1, 0, 0, //DACR
8, 4, 0x20, 0x1, 13, 1, 1, 1, //LPGA
8, 5, 0x20, 0x1, 12, 1, 2, 1, //RPGA
15, 6, 0, 0x1, 0, 0, 3, 1, //SPKL
15, 7, 0, 0x1, 0, 0, 4, 1, //SPKR
0, 8, 0, 0x1, 0, 0, 0, 0 //MIC
];
/*array index, iface, enable*/
sapmConfig = [
0, 5, 1,
1, 5, 1,
2, 0, 1,
3, 0, 1
];
}
}
controller_0x120c1031 :: codec_controller {
match_attr = "hdf_codec_driver_ex";
serviceName = "codec_service_1";
codecDaiName = "accessory_dai";
regConfig {
/* regAddr: register address
regValue: config register value
mask: mask of value
shift: shift bits
max: max value
min: min value
invert: enum Tfa9879InvertVal 0-uninvert 1-invert
*/
/* reg, value */
/* regAddr, regValue, mask, shift, max, min, invert, opsType */
/* reg, rreg, shift, value, min, max, mask, invert */
resetSeqConfig = [
0x00, 0x0
];
/* reg, value */
initSeqConfig = [
0x00, 0x0001,
0x01, 0x0a18,
0x02, 0x0007,
0x03, 0x0a18,
0x04, 0x0007,
0x05, 0x59DD,
0x06, 0xC63E,
0x07, 0x651A,
0x08, 0xE53E,
0x09, 0x4616,
0x0A, 0xD33E,
0x0B, 0x4DF3,
0x0C, 0xEA3E,
0x0D, 0x5EE0,
0x0E, 0xF93E,
0x0F, 0x0008,
0x10, 0x92BA,
0x11, 0x12A5,
0x12, 0x0004,
0x13, 0x1031,
0x14, 0x0000
];
/* reg: register address
rreg: register address
shift: shift bits
rshift: rshift bits
min: min value
max: max value
mask: mask of value
invert: enum InvertVal 0-uninvert 1-invert
value: value
*/
/* reg, rreg, shift, rshift, min, max, mask, invert, value */
ctrlParamsSeqConfig = [
0x13, 0x13, 0, 0, 0x0, 0xBC, 0xFF, 1, 0x0, // output volume
0x14, 0x14, 9, 9, 0x0, 0x1, 0x1, 0, 0x0, // output mute
0x01, 0x01, 10, 10, 0x0, 0x3, 0x3, 0, 0x0 // output channel
];
/* reg, rreg, shift, rshift, min, max, mask, invert, value */
daiStartupSeqConfig = [
0x00, 0x00, 0, 0, 0x0, 0xF, 0xF, 0, 0x9 // work
];
/* reg, rreg, shift, rshift, min, max, mask, invert, value */
daiParamsSeqConfig = [
0x01, 0x01, 6, 6, 0x0, 0xF, 0xF, 0, 0x0, // i2s_frequency
0x01, 0x01, 3, 3, 0x0, 0x7, 0x7, 0, 0x0, // i2s_format
0x01, 0x01, 10, 10, 0x0, 0x3, 0x3, 0, 0x0 // i2s_channel
];
controlsConfig = [
/*
"Master Playback Volume",
"Playback Mute",
"Render Channel Mode"
*/
/*array index, iface, enable*/
0, 0, 1,
2, 0, 1,
8, 6, 1
];
}
}
}
}

View File

@ -0,0 +1,67 @@
root {
platfrom {
template dai_controller {
match_attr = "";
serviceName = "";
}
controller_0x120c1020 :: dai_controller {
match_attr = "hdf_dai_driver";
serviceName = "dai_service";
idInfo {
chipName = "hi3516";
chipIdRegister = 0x113b0000;
chipIdSize = 0x10000;
}
regConfig {
/* reg: register address
rreg: register address
shift: shift bits
rshift: rshift bits
min: min value
max: max value
mask: mask of value
invert: enum InvertVal 0-uninvert 1-invert
value: value
reg, rreg, shift, value, min, max, mask, invert value
*/
ctrlParamsSeqConfig = [
0x48, 0x48, 0, 0, 0x0, 0x2, 0x3, 0, 0, // accessory enable
0x48, 0x48, 0, 0, 0x0, 0x2, 0x3, 0, 0 // codec enable
];
controlsConfig = [
/*
"External Codec Enable",
"Internally Codec Enable",
*/
/*array index, iface, enable*/
6, 4, 0,
7, 4, 0
];
daiStartupSeqConfig = [
0x0100, 0x0100, 0, 0, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, 0x152ef0, // AIP_I2S_REG_CFG0
0x0104, 0x0104, 0, 0, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, 0x0000c115, // AIP_I2S_REG_CFG1
0x0140, 0x0140, 0, 0, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, 0x152ef0, // AOP_I2S_REG_CFG0
0x0144, 0x0144, 0, 0, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0, 0x0000c115, // AOP_I2S_REG_CFG1
];
daiParamsSeqConfig = [
0x0140, 0x0140, 0, 0, 0x0, 0x7FFFFFF, 0x7FFFFFF, 0, 0x0, // ao i2s_frequency
0x0144, 0x0144, 0, 0, 0x0, 0x7F, 0x7F, 0, 0x0, // ao i2s_frequency
0x2000, 0x2000, 2, 2, 0x0, 0x2, 0x3, 0, 0x0, // ao i2s_format
0x2000, 0x2000, 4, 4, 0x0, 0x1, 0x3, 0, 0x0, // ao i2s_channel
0x0100, 0x0100, 0, 0, 0x0, 0x7FFFFFF, 0x7FFFFFF, 0, 0x0, // ai i2s_frequency
0x0104, 0x0104, 0, 0, 0x0, 0x7F, 0x7F, 0, 0x0, // ai i2s_frequency
0x1000, 0x1000, 2, 2, 0x0, 0x2, 0x3, 0, 0x0, // ai i2s_format
0x1000, 0x1000, 4, 4, 0x0, 0x1, 0x3, 0, 0x0, // ai i2s_channel
];
}
}
}
}

View File

@ -0,0 +1,12 @@
root {
platfrom {
template dma_controller {
match_attr = "";
serviceName = "";
}
controller_0x120c1010 :: dma_controller {
match_attr = "hdf_dma_driver";
serviceName = "dma_service_0";
}
}
}

View File

@ -0,0 +1,19 @@
root {
platfrom {
template dsp_controller {
match_attr = "";
serviceName = "";
dspDaiName = "";
}
controller_0x120c1040 :: dsp_controller {
match_attr = "hdf_dsp_driver";
serviceName = "dsp_service_0";
dspDaiName = "dsp_dai";
}
controller_0x120c1041 :: dsp_controller {
match_attr = "hdf_dsp_driver";
serviceName = "dsp_service_0";
dspDaiName = "dsp_dai";
}
}
}

View File

@ -0,0 +1,683 @@
root {
device_info {
match_attr = "hdf_manager";
template host {
hostName = "";
priority = 100;
template device {
template deviceNode {
policy = 0;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "";
serviceName = "";
deviceMatchAttr = "";
}
}
}
base :: host {
hostName = "base_host";
priority = 50;
device_support :: device {
device0 :: deviceNode {
policy = 2;
priority = 10;
permission = 0644;
moduleName = "HDF_KEVENT";
serviceName = "hdf_kevent";
}
}
}
platform :: host {
hostName = "platform_host";
priority = 50;
device_gpio :: device {
device0 :: deviceNode {
policy = 2;
priority = 10;
permission = 0644;
moduleName = "HDF_PLATFORM_GPIO_MANAGER";
serviceName = "HDF_PLATFORM_GPIO_MANAGER";
}
device1 :: deviceNode {
policy = 0;
priority = 10;
permission = 0644;
moduleName = "linux_gpio_adapter";
deviceMatchAttr = "linux_gpio_adapter";
}
}
device_watchdog :: device {
device0 :: deviceNode {
policy = 1;
priority = 20;
permission = 0644;
moduleName = "HDF_PLATFORM_WATCHDOG";
serviceName = "HDF_PLATFORM_WATCHDOG_0";
deviceMatchAttr = "hisilicon_hi35xx_watchdog_0";
}
}
device_rtc :: device {
device0 :: deviceNode {
policy = 1;
priority = 30;
permission = 0644;
moduleName = "HDF_PLATFORM_RTC";
serviceName = "HDF_PLATFORM_RTC";
deviceMatchAttr = "hisilicon_hi35xx_rtc";
}
}
device_uart :: device {
device0 :: deviceNode {
policy = 1;
priority = 40;
permission = 0644;
moduleName = "HDF_PLATFORM_UART";
serviceName = "HDF_PLATFORM_UART_0";
deviceMatchAttr = "hisilicon_hi35xx_uart_0";
}
device1 :: deviceNode {
policy = 2;
permission = 0644;
priority = 40;
moduleName = "HDF_PLATFORM_UART";
serviceName = "HDF_PLATFORM_UART_1";
deviceMatchAttr = "hisilicon_hi35xx_uart_1";
}
}
device_i2c :: device {
device0 :: deviceNode {
policy = 2;
priority = 50;
permission = 0644;
moduleName = "HDF_PLATFORM_I2C_MANAGER";
serviceName = "HDF_PLATFORM_I2C_MANAGER";
deviceMatchAttr = "hdf_platform_i2c_manager";
}
device1 :: deviceNode {
policy = 0;
priority = 55;
permission = 0644;
moduleName = "linux_i2c_adapter";
deviceMatchAttr = "linux_i2c_adapter";
}
}
device_spi :: device {
device0 :: deviceNode {
policy = 1;
priority = 60;
permission = 0644;
moduleName = "HDF_PLATFORM_SPI";
serviceName = "HDF_PLATFORM_SPI_0";
deviceMatchAttr = "hisilicon_hi35xx_spi_0";
}
device1 :: deviceNode {
policy = 1;
priority = 60;
permission = 0644;
moduleName = "HDF_PLATFORM_SPI";
serviceName = "HDF_PLATFORM_SPI_1";
deviceMatchAttr = "hisilicon_hi35xx_spi_1";
}
device2 :: deviceNode {
policy = 1;
priority = 60;
permission = 0644;
moduleName = "HDF_PLATFORM_SPI";
serviceName = "HDF_PLATFORM_SPI_2";
deviceMatchAttr = "hisilicon_hi35xx_spi_2";
}
}
device_sdio :: device {
device0 :: deviceNode {
policy = 1;
priority = 70;
permission = 0644;
moduleName = "HDF_PLATFORM_SDIO";
serviceName = "HDF_PLATFORM_MMC_2";
deviceMatchAttr = "hisilicon_hi35xx_sdio_0";
}
}
device_emmc :: device {
device0 :: deviceNode {
policy = 2;
priority = 20;
permission = 0644;
moduleName = "HDF_PLATFORM_EMMC";
serviceName = "HDF_PLATFORM_MMC_0";
deviceMatchAttr = "hisilicon_hi35xx_emmc_0";
}
}
device_pwm :: device {
device0 :: deviceNode {
policy = 1;
priority = 80;
permission = 0644;
moduleName = "HDF_PLATFORM_PWM";
serviceName = "HDF_PLATFORM_PWM_0";
deviceMatchAttr = "hisilicon_hi35xx_pwm_0";
}
device1 :: deviceNode {
policy = 1;
priority = 80;
permission = 0644;
moduleName = "HDF_PLATFORM_PWM";
serviceName = "HDF_PLATFORM_PWM_1";
deviceMatchAttr = "hisilicon_hi35xx_pwm_1";
}
}
device_mipi_dsi:: device {
device0 :: deviceNode {
policy = 0;
priority = 150;
permission = 0644;
moduleName = "HDF_MIPI_TX";
serviceName = "HDF_MIPI_TX";
}
}
}
display :: host {
hostName = "display_host";
device_hdf_disp :: device {
device0 :: deviceNode {
policy = 2;
priority = 140;
permission = 0660;
moduleName = "HDF_DISP";
serviceName = "hdf_disp";
}
}
device_hi35xx_disp :: device {
device0 :: deviceNode {
policy = 0;
priority = 120;
moduleName = "HI351XX_DISP";
}
}
device_lcd :: device {
device0 :: deviceNode {
policy = 0;
priority = 100;
preload = 0;
moduleName = "LCD_ICN9700";
}
}
device_pwm_bl :: device {
device0 :: deviceNode {
policy = 0;
priority = 95;
preload = 0;
moduleName = "PWM_BL";
deviceMatchAttr = "pwm_bl_dev";
}
}
device_backlight :: device {
device0 :: deviceNode {
policy = 2;
priority = 90;
preload = 0;
permission = 0660;
moduleName = "HDF_BL";
serviceName = "hdf_bl";
}
}
}
input :: host {
hostName = "input_host";
priority = 100;
device_input_manager :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0660;
moduleName = "HDF_INPUT_MANAGER";
serviceName = "hdf_input_host";
deviceMatchAttr = "";
}
}
device_hdf_touch :: device {
device0 :: deviceNode {
policy = 2;
priority = 120;
preload = 0;
permission = 0660;
moduleName = "HDF_TOUCH";
serviceName = "hdf_input_event1";
deviceMatchAttr = "touch_device1";
}
}
device_touch_chip :: device {
device0 :: deviceNode {
policy = 0;
priority = 130;
preload = 0;
permission = 0660;
moduleName = "HDF_TOUCH_GT911";
serviceName = "hdf_touch_gt911_service";
deviceMatchAttr = "zsj_gt911_5p5";
}
}
device_hdf_hid :: device {
device0 :: deviceNode {
policy = 2;
priority = 200;
preload = 0;
permission = 0660;
moduleName = "HDF_HID";
}
}
device_hdf_encoder :: device {
device0 :: deviceNode {
policy = 2;
priority = 200;
preload = 0;
permission = 0660;
moduleName = "HDF_ENCODER";
deviceMatchAttr = "EC11";
}
}
}
network :: host {
hostName = "network_host";
device_wifi :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "HDF_WIFI";
deviceMatchAttr = "hdf_wlan_driver";
serviceName = "hdfwifi";
}
}
device_wlan_chips :: device {
device0 :: deviceNode {
policy = 0;
preload = 2;
moduleName = "HDF_WLAN_CHIPS";
deviceMatchAttr = "hdf_wlan_chips_hi3881";
serviceName = "hisi";
}
}
}
sensor :: host {
hostName = "sensor_host";
device_sensor_manager :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_MGR_AP";
serviceName = "hdf_sensor_manager_ap";
}
}
device_sensor_accel :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_ACCEL";
serviceName = "hdf_sensor_accel";
deviceMatchAttr = "hdf_sensor_accel_driver";
}
}
device_sensor_bmi160 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_ACCEL_BMI160";
serviceName = "hdf_accel_bmi160";
deviceMatchAttr = "hdf_sensor_accel_bmi160_driver";
}
}
device_sensor_als :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_ALS";
serviceName = "hdf_sensor_als";
deviceMatchAttr = "hdf_sensor_als_driver";
}
}
device_sensor_bh1745 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_ALS_BH1745";
serviceName = "hdf_als_bh1745";
deviceMatchAttr = "hdf_sensor_als_bh1745_driver";
}
}
device_sensor_gyro :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_GYRO";
serviceName = "hdf_sensor_gyro";
deviceMatchAttr = "hdf_sensor_gyro_driver";
}
}
device_sensor_gyro_bmi160 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_GYRO_BMI160";
serviceName = "hdf_gyro_bmi160";
deviceMatchAttr = "hdf_sensor_gyro_bmi160_driver";
}
}
device_sensor_barometer :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_BAROMETER";
serviceName = "hdf_sensor_barometer";
deviceMatchAttr = "hdf_sensor_barometer_driver";
}
}
device_sensor_bmp180 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_BAROMETER_BMP180";
serviceName = "hdf_barometer_bmp180";
deviceMatchAttr = "hdf_sensor_barometer_bmp180_driver";
}
}
device_sensor_hall :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 2;
permission = 0664;
moduleName = "HDF_SENSOR_HALL";
serviceName = "hdf_sensor_hall";
deviceMatchAttr = "hdf_sensor_hall_driver";
}
}
device_sensor_ak8789 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 2;
permission = 0664;
moduleName = "HDF_SENSOR_HALL_AK8789";
serviceName = "hdf_hall_ak8789";
deviceMatchAttr = "hdf_sensor_hall_ak8789_driver";
}
}
device_sensor_magnetic :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_MAGNETIC";
serviceName = "hdf_sensor_magnetic";
deviceMatchAttr = "hdf_sensor_magnetic_driver";
}
}
device_sensor_lsm303 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_MAGNETIC_LSM303";
serviceName = "hdf_magnetic_lsm303";
deviceMatchAttr = "hdf_sensor_magnetic_lsm303_driver";
}
}
device_sensor_proximity :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_PROXIMITY";
serviceName = "hdf_sensor_proximity";
deviceMatchAttr = "hdf_sensor_proximity_driver";
}
}
device_sensor_apds9960 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_PROXIMITY_APDS9960";
serviceName = "hdf_proximity_apds9960";
deviceMatchAttr = "hdf_sensor_proximity_adps9960_driver";
}
}
device_sensor_gravity :: device {
device0 :: deviceNode {
policy = 1;
priority = 130;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_GRAVITY";
serviceName = "hdf_sensor_gravity";
deviceMatchAttr = "hdf_sensor_gravity_driver";
}
}
device_sensor_pedometer :: device {
device0 :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_PEDOMETER";
serviceName = "hdf_sensor_pedometer";
deviceMatchAttr = "hdf_sensor_pedometer_driver";
}
}
device_sensor_pedometer_bmi160 :: device {
device0 :: deviceNode {
policy = 1;
priority = 120;
preload = 0;
permission = 0664;
moduleName = "HDF_SENSOR_PEDOMETER_BMI160";
serviceName = "hdf_pedometer_bmi160";
deviceMatchAttr = "hdf_sensor_pedometer_bmi160_driver";
}
}
}
usb_pnp_linux :: host {
hostName = "usb_pnp_linux_host";
device_usb_pnp_linux :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "HDF_USB_PNP_NOTIFY";
serviceName = "hdf_usb_pnp_notify_service";
deviceMatchAttr = "hdf_usb_pnp_notify_config";
}
}
}
audio :: host {
hostName = "audio_host";
priority = 60;
device_dai0 :: device {
device0 :: deviceNode {
policy = 1;
priority = 50;
preload = 0;
permission = 0666;
moduleName = "DAI_HI3516";
serviceName = "dai_service";
deviceMatchAttr = "hdf_dai_driver";
}
}
device_codec :: device {
device0 :: deviceNode {
policy = 1;
priority = 50;
preload = 0;
permission = 0666;
moduleName = "CODEC_HI3516";
serviceName = "codec_service_0";
deviceMatchAttr = "hdf_codec_driver";
}
}
device_codec_ex :: device {
device0 :: deviceNode {
policy = 1;
priority = 50;
preload = 0;
permission = 0666;
moduleName = "CODEC_TFA9879";
serviceName = "codec_service_1";
deviceMatchAttr = "hdf_codec_driver_ex";
}
}
device_dsp :: device {
device0 :: deviceNode {
policy = 1;
priority = 50;
preload = 0;
permission = 0666;
moduleName = "DSP";
serviceName = "dsp_service_0";
deviceMatchAttr = "hdf_dsp_driver";
}
}
device_dma :: device {
device0 :: deviceNode {
policy = 1;
priority = 50;
preload = 0;
permission = 0666;
moduleName = "DMA_HI3516";
serviceName = "dma_service_0";
deviceMatchAttr = "hdf_dma_driver";
}
}
device_audio :: device {
device0 :: deviceNode {
policy = 2;
priority = 60;
preload = 0;
permission = 0666;
moduleName = "HDF_AUDIO";
deviceMatchAttr = "hdf_audio_driver_0";
serviceName = "hdf_audio_codec_primary_dev0";
}
device1 :: deviceNode {
policy = 2;
priority = 60;
preload = 0;
permission = 0666;
moduleName = "HDF_AUDIO";
deviceMatchAttr = "hdf_audio_driver_1";
serviceName = "hdf_audio_codec_primary_dev11";
}
}
device_stream :: device {
device0 :: deviceNode {
policy = 2;
priority = 80;
preload = 0;
permission = 0666;
moduleName = "HDF_AUDIO_STREAM";
serviceName = "hdf_audio_render";
}
device1 :: deviceNode {
policy = 2;
priority = 80;
preload = 0;
permission = 0666;
moduleName = "HDF_AUDIO_STREAM";
serviceName = "hdf_audio_capture";
}
}
device_control :: device {
device0 :: deviceNode {
policy = 2;
priority = 80;
preload = 0;
permission = 0666;
moduleName = "HDF_AUDIO_CONTROL";
serviceName = "hdf_audio_control";
}
}
}
vibrator :: host {
hostName = "vibrator_host";
device_vibrator :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "HDF_VIBRATOR";
serviceName = "hdf_misc_vibrator";
deviceMatchAttr = "hdf_vibrator_driver";
}
}
device_linear_vibrator :: device {
device0 :: deviceNode {
policy = 1;
priority = 105;
preload = 0;
permission = 0664;
moduleName = "HDF_LINEAR_VIBRATOR";
serviceName = "hdf_misc_linear_vibrator";
deviceMatchAttr = "hdf_linear_vibrator_driver";
}
}
}
dsoftbus :: host {
hostName = "dsoftbus_host";
device_dsoftbus :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "HDF_DSOFTBUS";
serviceName = "hdf_dsoftbus";
}
}
}
light :: host {
hostName = "light_host";
device_light :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "HDF_LIGHT";
serviceName = "hdf_light";
deviceMatchAttr = "hdf_light_driver";
}
}
}
}
}

View File

@ -0,0 +1,25 @@
#include "device_info/device_info.hcs"
#include "platform/i2c_config.hcs"
#include "platform/hi35xx_watchdog_config.hcs"
#include "platform/hi35xx_pwm_config.hcs"
#include "platform/hi35xx_uart_config.hcs"
#include "platform/sdio_config.hcs"
#include "platform/emmc_config.hcs"
#include "platform/hi35xx_spi_config.hcs"
#include "input/input_config.hcs"
#include "wifi/wlan_platform.hcs"
#include "wifi/wlan_chip_hi3881.hcs"
#include "sensor/sensor_config.hcs"
#include "audio/audio_config.hcs"
#include "audio/codec_config.hcs"
#include "audio/dai_config.hcs"
#include "audio/dma_config.hcs"
#include "audio/dsp_config.hcs"
#include "light/light_config.hcs"
#include "vibrator/vibrator_config.hcs"
#include "vibrator/linear_vibrator_config.hcs"
#include "lcd/lcd_config.hcs"
root {
module = "hisilicon,hi35xx_chip";
}

View File

@ -0,0 +1,89 @@
#
# Copyright (c) 2020-2021 Huawei Device Co., Ltd.
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
ccflags-$(CONFIG_DRIVERS_HDF_TEST) += -I$(srctree)/include/hdf \
-I$(srctree)/include/hdf/osal \
-I$(srctree)/include/hdf/utils \
-I$(srctree)/drivers/hdf/khdf/osal/include \
-I$(srctree)/drivers/hdf/framework/utils/include
ifeq ($(LOCAL_HCS_ROOT),)
LOCAL_HCS_ROOT := $(PRODUCT_PATH)
endif
CURRENT_DIR := $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
SOURCE_ROOT := $(abspath $(CURRENT_DIR)/../../../../../../)
HC_GEN_DIR := $(abspath $(SOURCE_ROOT)/drivers/framework/tools/hc-gen)
ifneq ($(OUT_DIR),)
HC_GEN := $(OUT_DIR)/kernel/OBJ/${KERNEL_VERSION}/drivers/hdf/khdf/hc_gen_build/hc-gen
else
HC_GEN := $(HC_GEN_DIR)/build/hc-gen
endif
LOCAL_HCS_ROOT := $(CURRENT_DIR)
HCS_DIR := $(LOCAL_HCS_ROOT)
ifneq ($(TARGET_BOARD_PLATFORM),)
HCS_DIR := $(LOCAL_HCS_ROOT)/$(TARGET_BOARD_PLATFORM)
else
ifneq ($(CONFIG_ARCH_HI3516DV300),)
HCS_DIR := $(LOCAL_HCS_ROOT)
endif
ifneq ($(CONFIG_ARCH_HI3518EV300),)
HCS_DIR := $(LOCAL_HCS_ROOT)
endif
endif
$(info HCS_DIR = $(HCS_DIR))
HCB_FLAGS := -b -i -a
HCS_OBJ := hdf_hcs_hex.o
HCS_OBJ_SRC := $(subst .o,.c,$(notdir $(HCS_OBJ)))
CONFIG_GEN_HEX_SRC := $(addprefix $(LOCAL_HCS_ROOT)/, $(HCS_OBJ_SRC))
CONFIG_HCS_SRC := $(subst _hcs_hex.o,.hcs,$(addprefix $(HCS_DIR)/, $(HCS_OBJ)))
HDF_FRAMWORK_TEST_ROOT = $(abspath $(SOURCE_ROOT)/drivers/framework/test/unittest/utils/hcs_parser/unittest)
HCS_MACRO_OBJ := hcs_macro_cases.o
HCS_MACRO_SRC := $(HDF_FRAMWORK_TEST_ROOT)/hcs_macro_cases.c
HCS_DEP := $(HDF_FRAMWORK_TEST_ROOT)/hdf_macro_test.h
HCS_MACRO_GEN_FILE := $(HDF_FRAMWORK_TEST_ROOT)/hdf_macro_test
HCS_FILE := $(HCS_DIR)/hdf.hcs
$(obj)/$(HCS_OBJ): $(CONFIG_GEN_HEX_SRC)
$(Q)$(CC) $(c_flags) -c -o $@ $<
$(Q)rm -f $<
$(CONFIG_GEN_HEX_SRC): $(LOCAL_HCS_ROOT)/%_hcs_hex.c: $(HCS_DIR)/%.hcs | $(HC_GEN)
$(Q)echo gen hdf built-in config
$(Q)if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
$(Q)$(HC_GEN) $(HCB_FLAGS) -o $(subst _hex.c,,$(@)) $<
$(CONFIG_GEN_SRCS): $(CONFIG_OUT_DIR)%.c: $(HCS_DIR)/%.hcs | $(HC_GEN)
$(Q)echo gen hdf driver config
$(Q)if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi
$(Q)$(HC_GEN) -t -o $@ $<
$(HC_GEN):
$(HIDE)make -C $(HC_GEN_DIR) BUILD_DIR=$(dir $@)
$(obj)/$(HCS_MACRO_OBJ): $(HCS_MACRO_SRC) $(HCS_DEP)
$(Q)$(CC) $(c_flags) -c -o $@ $<
$(HCS_DEP): $(HC_GEN)
$(Q)echo gen hdf built-in config macro
$(Q)$(HC_GEN) -m -o $(HCS_MACRO_GEN_FILE) $(HCS_FILE)
obj-$(CONFIG_DRIVERS_HDF) += $(HCS_OBJ) \
$(HCS_MACRO_OBJ)

View File

@ -0,0 +1,10 @@
root {
module = "emmc";
emmc_config {
emmc_controller_tester {
match_attr = "EMMC_TEST";
busNum = 0;
hostId = 0;
}
}
}

View File

@ -0,0 +1,10 @@
root {
module = "gpio";
gpio_config {
gpio_controller_tester {
match_attr = "GPIO_TEST";
gpio = 83;
gpioIrq = 83;
}
}
}

View File

@ -0,0 +1,14 @@
#include "../hdf.hcs"
#include "hdf_config_test.hcs"
#include "hdf_test_manager/device_info.hcs"
#include "gpio_test_config.hcs"
#include "i2c_test_config.hcs"
#include "pwm_test_config.hcs"
#include "spi_test_config.hcs"
#include "sdio_test_config.hcs"
#include "emmc_test_config.hcs"
#include "uart_test_config.hcs"
root {
module = "hisilicon,hi35xx_chip";
}

View File

@ -0,0 +1,52 @@
root {
module = "ConfigTest";
match_attr = "test,config";
audio_info {
match_attr = "hw,hw_audio_info";
pa_identifier = "smartpakit";
smartpa_addr = 65536;
smartpa_num = 1;
builtin_primary_mic_exist = true;
builtin_second_mic_exist = true;
voice_vol_level = 256;
cust_name = "audio_custom_v2";
dual_smartpa_delay = "true";
read_u64data = 0x100000000;
status = "ok";
}
fingerprint_info {
match_attr = "hw,hw_fingerprint_info";
read_u32_index = [1, 256, 65536];
finger_info = &fingerprint_one;
audio_info = &root.audio_info;
fingerprint_one {
product = "test";
chip = "one";
one_child {
status = "ok";
}
status = "ok";
}
dual_fingerprint = "false";
fingerprint_two: fingerprint_one {
chip = "two";
status = "disable";
}
string_list_names = ["first", "second", "third"];
status = "ok";
}
data_type_test {
match_attr = "hw,data_type_test";
read_four_data_type = [0x1, 0x100, 0x10000, 0x100000000];
test_u8_elem_data = [0, 1, 2, 3, 4, 5, 6, 7];
test_u16_elem_data = [0, 1, 2, 3, 4, 5, 256, 257];
}
board_id = [65536, 256];
support_Device = "TP LCD Sensor";
fingerprint_three: root.fingerprint_info.fingerprint_one {
chip = "three";
status = "disable";
}
modem_id = [0xF6B40136, 0x0];
boardId = 8000;
}

View File

@ -0,0 +1,135 @@
root {
device_info {
test_host :: host {
hostName = "test_host";
priority = 180;
device_hdf_test :: device {
device0 :: deviceNode {
policy = 2;
priority = 10;
preload = 0;
permission = 0644;
moduleName = "HDF_TEST";
serviceName = "HDF_TEST";
}
device1 :: deviceNode {
policy = 2;
priority = 10;
preload = 0;
permission = 0644;
moduleName = "sample_driver";
serviceName = "sample_service";
}
device2 :: deviceNode {
policy = 2;
priority = 10;
preload = 0;
permission = 0644;
moduleName = "pm_test_driver";
serviceName = "pm_test_service";
}
device3 :: deviceNode {
policy = 2;
priority = 10;
preload = 2;
permission = 0644;
moduleName = "hdf_test_helper";
serviceName = "hdf_test_helper";
}
}
device_platform_test :: device {
gpio_tester :: deviceNode {
policy = 1;
priority = 101;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_GPIO_TEST";
deviceMatchAttr = "GPIO_TEST";
serviceName = "GPIO_TEST";
}
i2c_tester :: deviceNode {
policy = 2;
priority = 101;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_I2C_TEST";
deviceMatchAttr = "I2C_TEST";
serviceName = "I2C_TEST";
}
pwm_test :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_PWM_TEST";
serviceName = "PWM_TEST";
deviceMatchAttr = "PWM_TEST";
}
spi_test :: deviceNode {
policy = 1;
priority = 100;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_SPI_TEST";
serviceName = "SPI_TEST";
deviceMatchAttr = "SPI_TEST";
}
emmc_tester :: deviceNode {
policy = 1;
priority = 100;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_EMMC_TEST";
serviceName = "EMMC_TEST";
deviceMatchAttr = "EMMC_TEST";
}
sdio_tester :: deviceNode {
policy = 1;
priority = 100;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_SDIO_TEST";
serviceName = "SDIO_TEST";
deviceMatchAttr = "SDIO_TEST";
}
watchdog_test :: deviceNode {
policy = 1;
priority = 110;
preload = 0;
permission = 0660;
moduleName = "PLATFORM_WATCHDOG_TEST";
serviceName = "WATCHDOG_TEST";
deviceMatchAttr = "WATCHDOG_TEST";
}
mipi_dsi_test :: deviceNode {
policy = 1;
priority = 100;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_MIPI_DSI_TEST";
serviceName = "PLATFORM_MIPI_DSI_TEST";
deviceMatchAttr = "PLATFORM_MIPI_DSI_TEST";
}
uart_tester :: deviceNode {
policy = 1;
priority = 100;
preload = 0;
permission = 0644;
moduleName = "PLATFORM_UART_TEST";
serviceName = "UART_TEST";
deviceMatchAttr = "UART_TEST";
}
}
device_sensor_test :: device {
sensor_tester :: deviceNode {
policy = 0;
priority = 100;
preload = 0;
permission = 0644;
moduleName = "HDF_SENSOR_TEST_DRIVER";
}
}
}
}
}

View File

@ -0,0 +1,13 @@
root {
module = "i2c";
i2c_config {
i2c_controller_tester {
match_attr = "I2C_TEST";
bus_num = 6;
dev_addr = 0x5d;
reg_addr = 0xd0;
reg_len = 2;
buf_size = 7;
}
}
}

View File

@ -0,0 +1,11 @@
root {
pwm_test {
module = "pwm_test";
match_attr = "PWM_TEST";
num = 0;
period = 999;
duty = 333;
polarity = 0;
status = 1;
}
}

View File

@ -0,0 +1,12 @@
root {
module = "sdio";
sdio_config {
sdio_controller_tester {
match_attr = "SDIO_TEST";
busNum = 2;
funcNum = 1;
vendorId = 0x296;
deviceId = 0x5347;
}
}
}

View File

@ -0,0 +1,10 @@
root {
spi_test {
module = "spi_test";
match_attr = "SPI_TEST";
bus = 0;
cs = 0;
len = 8;
wbuf = [0xa1, 0xb2, 0xc3, 0xd4, 0xe5, 0xf6, 0x78, 0x90];
}
}

View File

@ -0,0 +1,9 @@
root {
uart_test {
module = "uart_test";
match_attr = "UART_TEST";
port = 1;
len = 8;
wbuf = [0xa1, 0xb2, 0xc3, 0xd4, 0xe5, 0xf6, 0x78, 0x90];
}
}

View File

@ -0,0 +1,207 @@
root {
input_config {
touchConfig {
touch0 {
boardConfig {
match_attr = "touch_device1";
inputAttr {
/* 0:touch 1:key 2:keyboard 3:mouse 4:button 5:crown 6:encoder */
inputType = 0;
solutionX = 480;
solutionY = 960;
devName = "main_touch";
}
// Hi3516DV300-Runhe gt911--5p5 & 4p0
busConfig {
// 0:i2c 1:spi
busType = 0;
busNum = 6;
clkGpio = 86;
dataGpio = 87;
i2cClkIomux = [0x114f0048, 0x403];
i2cDataIomux = [0x114f004c, 0x403];
}
pinConfig {
rstGpio = 3;
intGpio = 4;
rstRegCfg = [0x112f0094, 0x400];
intRegCfg = [0x112f0098, 0x400];
}
// Hi3516DV300-Ruishi gt911--7p0
/*
busConfig {
// 0:i2c 1:spi
busType = 0;
busNum = 6;
clkGpio = 26;
dataGpio = 27;
i2cClkIomux = [0x114f0048, 0x403];
i2cDataIomux = [0x114f004c, 0x403];
}
pinConfig {
rstGpio = 13;
intGpio = 12;
rstRegCfg = [0x10ff0030, 0x400];
intRegCfg = [0x10ff002C, 0x400];
}
*/
// Hi3516DV300-Demo board: ft6336--2p35
/*
busConfig {
// 0:i2c 1:spi
busType = 0;
busNum = 3;
clkGpio = 2;
dataGpio = 1;
i2cClkIomux = [0x112f0090, 0x5f1];
i2cDataIomux = [0x112f008c, 0x5f1];
}
pinConfig {
rstGpio = 3;
intGpio = 4;
rstRegCfg = [0x0, 0x0];
intRegCfg = [0x112f0098, 0x5f0];
}
*/
powerConfig {
/* 0:unused 1:ldo 2:gpio 3:pmic */
vccType = 2;
vccNum = 20; // gpio20
vccValue = 1800;
vciType = 1;
vciNum = 12; // ldo12
vciValue = 3300;
}
featureConfig {
capacitanceTest = 0;
gestureMode = 0;
gloverMOde = 0;
coverMode = 0;
chargerMode = 0;
knuckleMode = 0;
}
}
chipConfig {
template touchChip {
match_attr = "";
chipName = "gt911";
vendorName = "zsj";
chipInfo = "AAAA11222"; // 4-ProjectName, 2-TP IC, 3-TP Module
/* 0:i2c 1:spi*/
busType = 0;
deviceAddr = 0x5D;
/* 0:None 1:Rising 2:Failing 4:High-level 8:Low-level */
irqFlag = 2;
maxSpeed = 400;
chipVersion = 0; //parse Coord TypeA
powerSequence {
/* [type, status, dir , delay]
<type> 0:none 1:vcc-1.8v 2:vci-3.3v 3:reset 4:int
<status> 0:off or low 1:on or high 2:no ops
<dir> 0:input 1:output 2:no ops
<delay> meanings delay xms, 20: delay 20ms
*/
powerOnSeq = [4, 0, 1, 0,
3, 0, 1, 10,
3, 1, 2, 60,
4, 2, 0, 0];
suspendSeq = [3, 0, 2, 10];
resumeSeq = [3, 1, 2, 10];
powerOffSeq = [3, 0, 2, 10,
1, 0, 2, 20];
}
}
chip0 :: touchChip {
match_attr = "zsj_gt911_5p5";
chipInfo = "ZIDN45100"; // 4-ProjectName, 2-TP IC, 3-TP Module
chipVersion = 0; //parse point by TypeA
}
chip1 :: touchChip {
match_attr = "zsj_gt911_4p0";
chipInfo = "ZIDN45101";
chipVersion = 1; //parse point by TypeB
}
chip2 :: touchChip {
match_attr = "tg_gt911_7p0";
vendorName = "tg";
chipInfo = "ZIDN45102";
chipVersion = 2; //parse point by TypeC
}
chip3 :: touchChip {
match_attr = "st_ft6336_2p35";
chipName = "ft6336";
vendorName = "st";
chipInfo = "ZIDN53200";
deviceAddr = 0x38;
irqFlag = 1; // Rising
powerSequence {
/* [type, status, dir , delay]
<type> 0:none 1:vcc-1.8v 2:vci-3.3v 3:reset 4:int
<status> 0:off or low 1:on or high 2:no ops
<dir> 0:input 1:output 2:no ops
<delay> meanings delay xms, 20: delay 20ms
*/
powerOnSeq = [4, 2, 0, 0,
3, 1, 1, 2,
3, 0, 2, 5,
3, 1, 2, 200];
suspendSeq = [3, 0, 2, 10];
resumeSeq = [3, 1, 2, 10];
powerOffSeq = [3, 0, 2, 10,
1, 0, 2, 20];
}
}
}
}
}
keyConfig {
keyList = ["power", "VolUp", "VolDown", "Up", "Down", "Left", "Right"];
keyInfoList {
key1 {
match_attr = "key_device0";
/* 0:touch 1:key 2:keyboard 3:mouse 4:button 5:crown 34:encoder */
inputType = 1;
keyName = "power";
gpioNum = 1;
irqFlag = 3;
debounceTime = 80;
}
key2 {
keyName = "volUp";
gpioNum = 31;
irqFlag = 1;
debounceTime = 80;
}
key3 {
keyName = "volDown";
gpioNum = 32;
irqFlag = 1;
debounceTime = 80;
}
}
}
encoderConfig {
encoder1 {
match_attr = "EC11";
inputType = 34;
gpioClk = 29;
gpioDT = 30;
gpioSW = 31;
}
}
}
}

View File

@ -0,0 +1,13 @@
root {
backlightConfig {
pwmBacklightConfig {
match_attr = "pwm_bl_dev";
pwmDevNum = 1;
pwmMaxPeroid = 100000;
backlightDevName = "hdf_pwm";
minBrightness = 0;
defBrightness = 127;
maxBrightness = 255;
}
}
}

View File

@ -0,0 +1,18 @@
root {
lightConfig {
boardConfig {
match_attr = "hdf_light_driver";
lightAttr {
light01 {
lightId = [1, 2];
busRNum = 31;
busGNum = 30;
busBNum = 29;
lightBrightness = 0X80000000;
onTime = 50;
offTime = 50;
}
}
}
}
}

View File

@ -0,0 +1,16 @@
root {
platform {
emmc_config {
template emmc_controller {
match_attr = "";
hostId = 0;
devType = 0;
}
controller_0x00 :: emmc_controller {
match_attr = "hisilicon_hi35xx_emmc_0";
}
}
}
}

View File

@ -0,0 +1,24 @@
root {
platform {
pwm_config {
template pwm_device {
serviceName = "";
match_attr = "";
num = 0;
base = 0x12070000;
}
device_0x12070000 :: pwm_device {
match_attr = "hisilicon_hi35xx_pwm_0";
}
device_0x12070020 :: pwm_device {
match_attr = "hisilicon_hi35xx_pwm_1";
num = 1;
base = 0x12070020;
}
}
}
}

View File

@ -0,0 +1,32 @@
root {
platform {
spi_config {
template spi_controller {
serviceName = "";
match_attr = "";
busNum = 0;
numCs = 0;
}
controller_0x120c0000 :: spi_controller {
busNum = 0;
numCs = 1;
match_attr = "hisilicon_hi35xx_spi_0";
}
controller_0x120c1000 :: spi_controller {
match_attr = "hisilicon_hi35xx_spi_1";
busNum = 1;
numCs = 2;
}
controller_0x120c2000 :: spi_controller {
match_attr = "hisilicon_hi35xx_spi_2";
busNum = 2;
numCs = 1;
}
}
}
}

View File

@ -0,0 +1,20 @@
root {
platform {
uart_config {
template uart_device {
serviceName = "";
match_attr = "";
driver_name = "ttyAMA";
num = 0;
}
device_uart_0x0000 :: uart_device {
match_attr = "hisilicon_hi35xx_uart_0";
}
device_uart_0x0001 :: uart_device {
num = 1;
match_attr = "hisilicon_hi35xx_uart_1";
}
}
}
}

View File

@ -0,0 +1,16 @@
root {
platform {
watchdog_config {
template watchdog_device {
serviceName = "HDF_PLATFORM_WATCHDOG_0";
match_attr = "";
id = 0;
}
device_0x12050000 :: watchdog_device {
id = 0;
match_attr = "hisilicon_hi35xx_watchdog_0";
}
}
}
}

View File

@ -0,0 +1,36 @@
root {
platform {
i2c_config {
match_attr = "linux_i2c_adapter";
template i2c_controller {
bus = 0;
}
controller_0x120b0000 :: i2c_controller {
bus = 0;
}
controller_0x120b1000 :: i2c_controller {
bus = 1;
}
controller_0x120b2000 :: i2c_controller {
bus = 2;
}
controller_0x120b3000 :: i2c_controller {
bus = 3;
}
controller_0x120b4000 :: i2c_controller {
bus = 4;
}
controller_0x120b5000 :: i2c_controller {
bus = 5;
}
controller_0x120b6000 :: i2c_controller {
bus = 6;
}
controller_0x120b7000 :: i2c_controller {
bus = 7;
}
}
}
}

View File

@ -0,0 +1,15 @@
root {
platform {
sdio_config {
template sdio_controller {
match_attr = "";
hostId = 2;
devType = 2;
}
controller_0x2dd1 :: sdio_controller {
match_attr = "hisilicon_hi35xx_sdio_0";
}
}
}
}

View File

@ -0,0 +1,67 @@
#include "../sensor_common.hcs"
root {
accel_bmi160_chip_config : sensorConfig {
match_attr = "hdf_sensor_accel_bmi160_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "accelerometer";
vendorName = "borsh_bmi160"; // max string length is 16 bytes
sensorTypeId = 1; // enum SensorTypeTag
sensorId = 1; // user define sensor id
power = 850;
}
sensorBusConfig :: sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0x68;
regWidth = 1; // 1btye
}
sensorIdAttr :: sensorIdInfo {
chipName = "bmi160";
chipIdRegister = 0x00;
chipIdValue = 0xd1;
}
sensorDirection {
direction = 5; // chip direction range of value:0-7
/* <sign> 1:negative 0:positive
<map> 0:AXIS_X 1:AXIS_Y 2:AXIS_Z
*/
/* sign[AXIS_X], sign[AXIS_Y], sign[AXIS_Z], map[AXIS_X], map[AXIS_Y], map[AXIS_Z] */
convert = [
0, 0, 0, 0, 1, 2,
1, 0, 0, 1, 0, 2,
0, 0, 1, 0, 1, 2,
0, 1, 0, 1, 0, 2,
1, 0, 1, 0, 1, 2,
0, 0, 1, 1, 0, 2,
0, 1, 1, 0, 1, 2,
1, 1, 1, 1, 0, 2
];
}
sensorRegConfig {
/* regAddr: register address
value: config register value
len: size of value
mask: mask of value
delay: config register delay time (ms)
opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit
calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift
shiftNum: shift bits
debug: 0-no debug 1-debug
save: 0-no save 1-save
*/
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
initSeqConfig = [
0x7e, 0xb6, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x7e, 0x10, 0xff, 1, 5, 2, 0, 0, 0, 0
];
enableSeqConfig = [
0x7e, 0x11, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x41, 0x03, 0xff, 1, 0, 2, 0, 0, 0, 0,
0x40, 0x08, 0xff, 1, 0, 2, 0, 0, 0, 0
];
disableSeqConfig = [
0x7e, 0x10, 0xff, 1, 5, 2, 0, 0, 0, 0
];
}
}
}

View File

@ -0,0 +1,13 @@
#include "../sensor_common.hcs"
root {
gravity_vitural_config : sensorConfig {
match_attr = "hdf_sensor_gravity_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "gravity";
vendorName = "virtual chip"; // max string length is 16 bytes
sensorTypeId = 257; // enum SensorTypeTag
sensorId = 257; // user define sensor id
power = 200;
}
}
}

View File

@ -0,0 +1,69 @@
#include "../sensor_common.hcs"
root {
als_bh1745_chip_config : sensorConfig {
match_attr = "hdf_sensor_als_bh1745_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "als";
vendorName = "rohm_bh1745"; // max string length is 16 bytes
sensorTypeId = 5; // enum SensorTypeTag
sensorId = 5; // user define sensor id
power = 230;
}
sensorBusConfig :: sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0x38;
regWidth = 1; // 1btye
}
sensorIdAttr :: sensorIdInfo {
chipName = "bh1745";
chipIdRegister = 0x92;
chipIdValue = 0xE0;
}
sensorRegConfig {
/* regAddr: register address
value: config register value
len: size of value
mask: mask of value
delay: config register delay time (ms)
opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit
calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift
shiftNum: shift bits
debug: 0-no debug 1-debug
save: 0-no save 1-save
*/
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
initSeqConfig = [
0x40, 0xc0, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x42, 0x90, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x44, 0x02, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x41, 0x01, 0xff, 1, 5, 2, 0, 0, 0, 0
];
enableSeqConfig = [
0x42, 0x10, 0x10, 1, 5, 4, 0, 0, 0, 0,
0x44, 0x02, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x42, 0x02, 0x03, 1, 5, 4, 1, 0, 0, 0 //16X
];
disableSeqConfig = [
0x42, 0x00, 0x10, 1, 5, 4, 0, 0, 0, 0
];
}
extendAlsRegConfig {
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
time = [
0x41, 0x00, 0x07, 1, 5, 0, 1, 0, 0, 0, //160msec
0x41, 0x01, 0x07, 1, 5, 0, 1, 0, 0, 0, //320msec
0x41, 0x02, 0x07, 1, 5, 0, 1, 0, 0, 0, //640msec
0x41, 0x03, 0x07, 1, 5, 0, 1, 0, 0, 0, //1280msec
0x41, 0x04, 0x07, 1, 5, 0, 1, 0, 0, 0, //2560msec
0x41, 0x05, 0x07, 1, 5, 0, 1, 0, 0, 0, //5120msec
];
gain = [
0x42, 0x00, 0x03, 1, 5, 0, 1, 0, 0, 0, //1X
0x42, 0x01, 0x03, 1, 5, 0, 1, 0, 0, 0, //2X
0x42, 0x02, 0x03, 1, 5, 0, 1, 0, 0, 0 //16X
];
}
}
}

View File

@ -0,0 +1,45 @@
#include "../sensor_common.hcs"
root {
barometer_bmp180_chip_config : sensorConfig {
match_attr = "hdf_sensor_barometer_bmp180_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "barometer";
vendorName = "borsh_bmp180"; // max string length is 16 bytes
sensorTypeId = 8; // enum SensorTypeTag
sensorId = 8; // user define sensor id
power = 650;
}
sensorBusConfig :: sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0x77;
regWidth = 1; // 1btye
}
sensorIdAttr :: sensorIdInfo {
chipName = "bmp180";
chipIdRegister = 0xD0;
chipIdValue = 0x55;
}
sensorRegConfig {
/* regAddr: register address
value: config register value
len: size of value
mask: mask of value
delay: config register delay time (ms)
opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit
calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift
shiftNum: shift bits
debug: 0-no debug 1-debug
save: 0-no save 1-save
*/
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
initSeqConfig = [
0xE0, 0xb6, 0xff, 1, 5, 2, 0, 0, 0, 0,
];
enableSeqConfig = [];
disableSeqConfig = [
0xE0, 0xb6, 0xff, 1, 5, 2, 0, 0, 0, 0
];
}
}
}

View File

@ -0,0 +1,67 @@
#include "../sensor_common.hcs"
root {
gyro_bmi160_chip_config : sensorConfig {
match_attr = "hdf_sensor_gyro_bmi160_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "gyroscope";
vendorName = "borsh_bmi160"; // max string length is 16 bytes
sensorTypeId = 2; // enum SensorTypeTag
sensorId = 2; // user define sensor id
power = 180;
}
sensorBusConfig :: sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0x68;
regWidth = 1; // 1btye
}
sensorIdAttr :: sensorIdInfo {
chipName = "bmi160";
chipIdRegister = 0x00;
chipIdValue = 0xd1;
}
sensorDirection {
direction = 5; // chip direction range of value:0-7
/* <sign> 1:negative 0:positive
<map> 0:AXIS_X 1:AXIS_Y 2:AXIS_Z
*/
/* sign[AXIS_X], sign[AXIS_Y], sign[AXIS_Z], map[AXIS_X], map[AXIS_Y], map[AXIS_Z] */
convert = [
0, 0, 0, 0, 1, 2,
1, 0, 0, 1, 0, 2,
0, 0, 1, 0, 1, 2,
0, 1, 0, 1, 0, 2,
1, 0, 1, 0, 1, 2,
0, 0, 1, 1, 0, 2,
0, 1, 1, 0, 1, 2,
1, 1, 1, 1, 0, 2
];
}
sensorRegConfig {
/* regAddr: register address
value: config register value
len: size of value
mask: mask of value
delay: config register delay time (ms)
opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit
calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift
shiftNum: shift bits
debug: 0-no debug 1-debug
save: 0-no save 1-save
*/
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
initSeqConfig = [
0x7e, 0xb6, 0xff, 1, 55, 2, 0, 0, 0, 0,
0x7e, 0x14, 0xff, 1, 5, 2, 0, 0, 0, 0
];
enableSeqConfig = [
0x7e, 0x15, 0xff, 1, 55, 2, 0, 0, 0, 0,
0x43, 0x00, 0xff, 1, 0, 4, 0, 0, 0, 0,
0x42, 0x08, 0xff, 1, 0, 2, 0, 0, 0, 0
];
disableSeqConfig = [
0x7e, 0x14, 0xff, 1, 5, 2, 0, 0, 0, 0
];
}
}
}

View File

@ -0,0 +1,26 @@
#include "../sensor_common.hcs"
root {
hall_ak8789_chip_config : sensorConfig {
match_attr = "hdf_sensor_hall_ak8789_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "hallrometer";
vendorName = "akm_ak8789"; // max string length is 16 bytes
sensorTypeId = 10; // enum SensorTypeTag
sensorId = 10; // user define sensor id
power = 9;
}
sensorBusConfig :: sensorBusInfo {
busType = 2; // 0:i2c 1:spi 2:gpio
gpioIrq1 = 24;
gpioIrq2 = 25;
}
sensorIdAttr :: sensorIdInfo {
chipName = "ak8789";
chipIdRegister = 0;
chipIdValue = 0;
}
hallDelayedConfig {
delayedTime = 100;
}
}
}

View File

@ -0,0 +1,66 @@
#include "../sensor_common.hcs"
root {
magnetic_lsm303_chip_config : sensorConfig {
match_attr = "hdf_sensor_magnetic_lsm303_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "magnetometer";
vendorName = "st_lsm303"; // max string length is 16 bytes
sensorTypeId = 6; // enum SensorTypeTag
sensorId = 6; // user define sensor id
power = 110;
}
sensorBusConfig :: sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0x1e;
regWidth = 1; // 1btye
}
sensorIdAttr :: sensorIdInfo {
chipName = "lsm303";
chipIdRegister = 0x0a;
chipIdValue = 0x48;
}
sensorDirection {
direction = 0; // chip direction range of value:0-7
/* <sign> 1:negative 0:positive
<map> 0:AXIS_X 1:AXIS_Y 2:AXIS_Z
*/
/* sign[AXIS_X], sign[AXIS_Y], sign[AXIS_Z], map[AXIS_X], map[AXIS_Y], map[AXIS_Z] */
convert = [
0, 0, 0, 0, 1, 2,
1, 0, 0, 1, 0, 2,
0, 0, 1, 0, 1, 2,
0, 1, 0, 1, 0, 2,
1, 0, 1, 0, 1, 2,
0, 0, 1, 1, 0, 2,
0, 1, 1, 0, 1, 2,
1, 1, 1, 1, 0, 2
];
}
sensorRegConfig {
/* regAddr: register address
value: config register value
len: size of value
mask: mask of value
delay: config register delay time (ms)
opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit
calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift
shiftNum: shift bits
debug: 0-no debug 1-debug
save: 0-no save 1-save
*/
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
initSeqConfig = [
0x00, 0x14, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x01, 0xa0, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x02, 0x00, 0xff, 1, 5, 2, 0, 0, 0, 0
];
enableSeqConfig = [
0x02, 0x00, 0xff, 1, 5, 2, 0, 0, 0, 0
];
disableSeqConfig = [
0x02, 0x03, 0xff, 1, 5, 2, 0, 0, 0, 0
];
}
}
}

View File

@ -0,0 +1,53 @@
#include "../sensor_common.hcs"
root {
pedometer_bmi160_chip_config : sensorConfig {
match_attr = "hdf_sensor_pedometer_bmi160_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "pedometer";
vendorName = "borsh_bmi160"; // max string length is 16 bytes
sensorTypeId = 266; // enum SensorTypeTag
sensorId = 266; // user define sensor id
power = 120;
}
sensorBusConfig :: sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0x68;
regWidth = 1; // 1btye
}
sensorIdAttr :: sensorIdInfo {
chipName = "bmi160";
chipIdRegister = 0x00;
chipIdValue = 0xd1;
}
sensorRegConfig {
/* regAddr: register address
value: config register value
len: size of value
mask: mask of value
delay: config register delay time (ms)
opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit
calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift
shiftNum: shift bits
debug: 0-no debug 1-debug
save: 0-no save 1-save
*/
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
initSeqConfig = [
0x7e, 0xb6, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x7e, 0x10, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x7e, 0x14, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x7a, 0x15, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x7b, 0x03, 0xff, 1, 5, 2, 0, 0, 0, 0
];
enableSeqConfig = [
0x7e, 0x11, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x41, 0x03, 0xff, 1, 0, 2, 0, 0, 0, 0,
0x7b, 0x0b, 0xff, 1, 5, 2, 0, 0, 0, 0
];
disableSeqConfig = [
0x7b, 0x03, 0xff, 1, 5, 2, 0, 0, 0, 0
];
}
}
}

View File

@ -0,0 +1,48 @@
#include "../sensor_common.hcs"
root {
proximity_apds9960_chip_config : sensorConfig {
match_attr = "hdf_sensor_proximity_adps9960_driver";
sensorInfo :: sensorDeviceInfo {
sensorName = "proximity";
vendorName = "adps9960"; // max string length is 16 bytes
sensorTypeId = 12; // enum SensorTypeTag
sensorId = 12; // user define sensor id
power = 230;
}
sensorBusConfig :: sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0x39;
regWidth = 1; // 1btye
}
sensorIdAttr :: sensorIdInfo {
chipName = "adps9960";
chipIdRegister = 0x92;
chipIdValue = 0xAB;
}
sensorRegConfig {
/* regAddr: register address
value: config register value
len: size of value
mask: mask of value
delay: config register delay time (ms)
opsType: enum SensorOpsType 0-none 1-read 2-write 3-read_check 4-update_bit
calType: enum SensorBitCalType 0-none 1-set 2-revert 3-xor 4-left shift 5-right shift
shiftNum: shift bits
debug: 0-no debug 1-debug
save: 0-no save 1-save
*/
/* regAddr, value, mask, len, delay, opsType, calType, shiftNum, debug, save */
initSeqConfig = [
0x80, 0x05, 0xff, 1, 5, 2, 0, 0, 0, 0,
0x8f, 0x00, 0xff, 1, 5, 2, 0, 0, 0, 0
];
enableSeqConfig = [
0x80, 0x05, 0xff, 1, 5, 2, 0, 0, 0, 0
];
disableSeqConfig = [
0x80, 0x00, 0xff, 1, 5, 2, 0, 0, 0, 0
];
}
}
}

View File

@ -0,0 +1,30 @@
// sensor common config template
root {
sensorConfig {
template sensorDeviceInfo {
sensorName = "sensor"; // max string length is 16 bytes
vendorName = "vondorXXX_XXX"; // max string length is 16 bytes
firmwareVersion = "1.0";
hardwareVersion = "1.0";
sensorTypeId = 0; // enum SensorTypeTag
sensorId = 0; // user define sensor id, defaultenum SensorTypeTag
maxRange = 8;
accuracy = 0;
power = 0;
}
template sensorBusInfo {
busType = 0; // 0:i2c 1:spi
busNum = 6;
busAddr = 0;
regWidth = 1;
regBigEndian = 0;
}
template sensorIdInfo {
chipName = "";
chipIdRegister = 0xf;
chipIdValue = 0xd1;
}
}
}

View File

@ -0,0 +1,9 @@
#include "accel/accel_bmi160_config.hcs"
#include "als/bh1745_config.hcs"
#include "gyro/gyro_bmi160_config.hcs"
#include "barometer/barometer_bmp180_config.hcs"
#include "hall/hall_ak8789_config.hcs"
#include "magnetic/magnetic_lsm303_config.hcs"
#include "proximity/proximity_apds9960_config.hcs"
#include "accel/gravity_config.hcs"
#include "pedometer/pedometer_bmi160_config.hcs"

View File

@ -0,0 +1,14 @@
root {
linearVibratorConfig {
boardConfig {
match_attr = "hdf_linear_vibrator_driver";
vibratorChipConfig {
busType = 1; // 0:i2c 1:gpio
gpioNum = 31;
startReg = 0;
stopReg = 0;
startMask = 0;
}
}
}
}

View File

@ -0,0 +1,24 @@
root {
vibratorConfig {
boardConfig {
match_attr = "hdf_vibrator_driver";
vibratorAttr {
/* 0:rotor 1:linear */
deviceType = 1;
supportPreset = 1;
}
vibratorHapticConfig {
haptic_clock_timer {
effectName = "haptic.clock.timer";
type = 1; // 0 means built-in, 1 time series
seq = [600, 600, 200, 600]; // time seq
}
haptic_default_effect {
effectName = "haptic.default.effect";
type = 0;
seq = [0, 3, 800, 1];
}
}
}
}
}

View File

@ -0,0 +1,14 @@
root {
wlan_config {
hi3881 :& chipList {
chipHi3881 :: chipInst {
match_attr = "hdf_wlan_chips_hi3881";
driverName = "hisi";
sdio {
vendorId = 0x0296;
deviceId = [0x5347];
}
}
}
}
}

View File

@ -0,0 +1,112 @@
root {
module = "wlan";
wlan_config {
match_attr = "hdf_wlan_driver";
hostChipName = "hi3516dv300";
moduleConfig {
featureMap = 0xFFFF;
msgName = "WalService";
Station {
name = "sta";
mode = true;
}
HostAp {
name = "ap";
mode = 0; /* 0-- notsupported; 1--softap-host; 2--soft AP DMAC HOST; 3-IOT 1:DMAC OFFLOAD: IPC */
vapResNum = 1; /*virtual ap*/
userResNum = 8; /*max users support each ap*/
}
P2P {
name = "p2p";
mode = false;
}
Mac80211 {
mode = true;
}
Phy {
mode = true;
}
}
deviceList {
template deviceInst {
deviceInstId = 0;
powers {
power0 {
powerSeqDelay = 0;
powerType = 1; /* AlwaysON(0);GPIO(1) */
gpioId = 1;
activeLevel=1; /* High(1); Low(0) */
}
power1 {
/* to support two-stage power supply */
powerSeqDelay = 0;
powerType = 0;
gpioId = 1;
activeLevel=1; /* High(1); Low(0) */
}
}
reset {
resetType = 1; /* NotManaged(0);GPIO(1) */
gpioId = 2;
activeLevel = 1; /* High(1); Low(0) */
resetHoldTime = 30; /*In ms*/
}
bootUpTimeOut = 30;
bus {
busType = 0; /* 0-sdio 1-usb 2-spi etc. */
busIdx = 2;
funcNum = [1,2];
timeout = 1000;
blockSize = 512;
}
}
}
hisi :& deviceList {
device0 :: deviceInst {
deviceInstId = 0;
powers {
power0 {
powerSeqDelay = 0;
powerType = 1; /* AlwaysON(0);GPIO(1) */
gpioId = 91;
activeLevel=1; /* High(1); Low(0) */
}
power1 {
powerSeqDelay = 0;
powerType = 0;
gpioId = 1;
activeLevel = 1; /* High(1); Low(0) */
}
}
reset {
resetType = 1; /* NotManaged(0);GPIO(1) */
gpioId = 90;
activeLevel = 0; /* High(1); Low(0) */
resetHoldTime = 16; /*In ms*/
}
bootUpTimeOut = 32;
bus {
busType = 0; /* 0-sdio 1-usb 2-spi etc. */
busIdx = 2;
funcNum = [1];
timeout = 1000;
blockSize = 512;
}
}
}
chipList {
template chipInst {
match_attr = "hdf_wlan_chips_hi3881";
driverName = "hi3881";
sdio {
vendorId = 0x0296;
deviceId = [0x5347];
}
}
}
}
}

View File

@ -0,0 +1,268 @@
root {
module="sample";
mpp_config {
vbConfig {
maxPoolCnt = 5;
pool0 {
image_width = 2592;
image_height = 1944;
pix_format = 19;
data_bitwidth = 0;
compress_mode = 0;
default_align = 8;
blk_count = 7;
}
pool1 {
image_width = 2592;
image_height = 1944;
pix_format = 26;
data_bitwidth = 0;
compress_mode = 0;
default_align = 8;
blk_count = 7;
}
pool2 {
image_width = 1920;
image_height = 1080;
pix_format = 26;
data_bitwidth = 0;
compress_mode = 0;
default_align = 8;
blk_count = 7;
}
pool3 {
image_width = 1280;
image_height = 960;
pix_format = 26;
data_bitwidth = 0;
compress_mode = 0;
default_align = 8;
blk_count = 7;
}
pool4 {
image_width = 640;
image_height = 480;
pix_format = 26;
data_bitwidth = 0;
compress_mode = 0;
default_align = 8;
blk_count = 7;
}
}
vcapDev {
sensocnt = 1;
sensor_type0 = 12;
sensor_mode = 0;
sensor_width = 2592;
sensor_height = 1944;
bas_width = 2592;
bas_height = 1944;
wdr_mode = 0;
data_type = 2;
componentmask0 = 4293918720;
componentmask1 = 0;
}
vcapMipi {
enable = 1;
combo_dev_t = 0;
input_mode_t = 0;
mipi_data_rate_t = 0;
img_rect_x = 0;
img_rect_y = 0;
img_rect_w = 2592;
img_rect_h = 1944;
data_type_t = 1;
mipi_wdr_mode_t = 0;
lane_id_num = 4;
lane_id_0 = 0;
lane_id_1 = 1;
lane_id_2 = 2;
lane_id_3 = 3;
}
vcapIspPub {
enable = 1;
stWndRect_x = 0;
stWndRect_y = 0;
stWndRect_w = 2592;
stWndRect_h = 1944;
outImageSize_x = 2592;
outImageSize_y = 1944;
frameRate = 30;
enBayer = 0;
wdrMode = 0;
snsMode = 0;
}
vcapPipe {
pipecnt = 2;
pipe0 {
chncnt = 1;
vivpssmode = 0;
enPipeBypassMode = 0;
bYuvSkip = 0;
bIspBypass = 0;
u32MaxW = 2592;
u32MaxH = 1944;
enPixFmt = 19;
enCompressMode = 0;
enBitWidth = 2;
bNrEn = 1;
enNrRefSource = 0;
bSharpenEn = 1;
src_framerate = 30;
dst_framerate = 30;
bDiscardProPic = 0;
chl0 {
out_width = 2592;
out_height = 1944;
enPixelFormat = 26;
enDynamicRange = 0;
enVideoFormat = 0;
enCompressMode = 0;
bMirror = 0;
bFlip = 0;
u32Depth = 0;
src_framerate = 30;
dst_framerate = 30;
}
}
pipe1 {
chncnt = 1;
vivpssmode = 0;
enPipeBypassMode = 0;
bYuvSkip = 0;
bIspBypass = 0;
u32MaxW = 2592;
u32MaxH = 1944;
enPixFmt = 19;
enCompressMode = 0;
enBitWidth = 2;
bNrEn = 1;
enNrRefSource = 0;
bSharpenEn = 1;
src_framerate = 30;
dst_framerate = 30;
bDiscardProPic = 0;
chl0 {
out_width = 2592;
out_height = 1944;
enPixelFormat = 26;
enDynamicRange = 0;
enVideoFormat = 0;
enCompressMode = 0;
bMirror = 0;
bFlip = 0;
u32Depth = 0;
src_framerate = 30;
dst_framerate = 30;
}
}
}
vpss0 {
vportcnt = 3;
max_width = 2592;
max_height = 1944;
src_framerate = 30;
dst_framerate = 30;
pix_format = 26;
vport0 {
enable = 1;
res_width = 2592;
res_height = 1944;
src_framerate = 30;
dst_framerate = 30;
video_format = 0;
pix_format = 26;
compressMode = 0;
depth = 0;
mirror = 0;
flip = 0;
}
vport1 {
enable = 1;
res_width = 1280;
res_height = 960;
src_framerate = 30;
dst_framerate = 30;
video_format = 0;
pix_format = 26;
compressMode = 0;
depth = 0;
mirror = 0;
flip = 0;
}
vport2 {
enable = 1;
res_width = 640;
res_height = 480;
src_framerate = 30;
dst_framerate = 30;
video_format = 0;
pix_format = 26;
compressMode = 0;
depth = 0;
mirror = 0;
flip = 0;
}
extvport0 {
enable = 0;
res_width = 160;
res_height = 120;
src_framerate = 30;
dst_framerate = 30;
video_format = 0;
pix_format = 26;
compressMode = 0;
depth = 0;
mirror = 0;
flip = 0;
}
}
venc {
venccnt = 4;
venc0 {
res_width = 1920;
res_height = 1080;
bufsize = 1258290;
gop = 30;
src_framerate = 30;
dst_framerate = 30;
h265bitrate = 10240;
h264bitrate = 12288;
stat_time = 2;
}
venc1 {
res_width = 640;
res_height = 360;
bufsize = 230400;
gop = 30;
src_framerate = 30;
dst_framerate = 30;
h265bitrate = 2048;
h264bitrate = 2048;
stat_time = 2;
}
venc2 {
res_width = 1920;
res_height = 1080;
bufsize = 1258290;
gop = 0;
src_framerate = 30;
dst_framerate = 30;
h265bitrate = 0;
h264bitrate = 0;
stat_time = 2;
}
venc3 {
res_width = 320;
res_height = 180;
bufsize = 57600;
gop = 0;
src_framerate = 30;
dst_framerate = 30;
h265bitrate = 0;
h264bitrate = 0;
stat_time = 2;
}
}
}
}

View File

@ -0,0 +1,179 @@
root {
module="sample";
camera_host_config {
match_attr = "camera_host_interface";
template ability {
logicCameraId = "lcam001";
physicsCameraIds = [
"CAMERA_FIRST",
"CAMERA_SECOND"
];
metadata {
aeAvailableAntiBandingModes = [
"OHOS_CONTROL_AE_ANTIBANDING_MODE_OFF",
"OHOS_CONTROL_AE_ANTIBANDING_MODE_50HZ",
"OHOS_CONTROL_AE_ANTIBANDING_MODE_60HZ",
"OHOS_CONTROL_AE_ANTIBANDING_MODE_AUTO"
];
aeAvailableModes = ["OHOS_CONTROL_AE_MODE_ON"];
availableAeFpsTargets = [15, 30];
aeCompensationRange = [0, 0];
aeCompensationSteps = [0, 1];
availableAwbModes = [
"OHOS_CONTROL_AWB_MODE_OFF"
];
sceneModesOverrides = [
"OHOS_CONTROL_AE_MODE_ON",
"OHOS_CONTROL_AWB_MODE_AUTO"
];
aeLockAvailable = "OHOS_CONTROL_AE_LOCK_AVAILABLE_FALSE";
awbLockAvailable = "OHOS_CONTROL_AWB_LOCK_AVAILABLE_FALSE";
sensitivityRange = [32, 2400];
exposureTimeRange = [100000, 200000000];
faceDetectMode = "OHOS_STATISTICS_FACE_DETECT_MODE_OFF";
maxFaceCount = 0;
flashAvailable = "OHOS_FLASH_INFO_AVAILABLE_FALSE";
lensFacing = "OHOS_LENS_FACING_FRONT";
opticalStabilizations = ["OHOS_LENS_OPTICAL_STABILIZATION_MODE_OFF"];
maxDigitalZoom = "1";
availableCharacteristicsKeys = [
"OHOS_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES",
"OHOS_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES",
"OHOS_CONTROL_AE_AVAILABLE_MODES",
"OHOS_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES",
"OHOS_CONTROL_AE_COMPENSATION_RANGE",
"OHOS_CONTROL_AE_COMPENSATION_STEP",
"OHOS_CONTROL_AVAILABLE_EFFECTS",
"OHOS_CONTROL_AVAILABLE_SCENE_MODES",
"OHOS_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES",
"OHOS_CONTROL_AWB_AVAILABLE_MODES",
"OHOS_CONTROL_MAX_REGIONS",
"OHOS_CONTROL_SCENE_MODE_OVERRIDES",
"OHOS_CONTROL_AE_LOCK_AVAILABLE",
"OHOS_CONTROL_AWB_LOCK_AVAILABLE",
"OHOS_CONTROL_AVAILABLE_MODES",
"OHOS_JPEG_AVAILABLE_THUMBNAIL_SIZES",
"OHOS_JPEG_MAX_SIZE",
"OHOS_SENSOR_INFO_PIXEL_ARRAY_SIZE",
"OHOS_SENSOR_INFO_ACTIVE_ARRAY_SIZE",
"OHOS_SENSOR_INFO_SENSITIVITY_RANGE",
"OHOS_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT",
"OHOS_SENSOR_INFO_EXPOSURE_TIME_RANGE",
"OHOS_SENSOR_ORIENTATION",
"OHOS_SENSOR_AVAILABLE_TEST_PATTERN_MODES",
"OHOS_SENSOR_INFO_PHYSICAL_SIZE",
"OHOS_SENSOR_INFO_TIMESTAMP_SOURCE",
"OHOS_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES",
"OHOS_STATISTICS_INFO_MAX_FACE_COUNT",
"OHOS_SYNC_MAX_LATENCY",
"OHOS_FLASH_INFO_AVAILABLE",
"OHOS_LENS_INFO_AVAILABLE_APERTURES",
"OHOS_LENS_FACING",
"OHOS_LENS_INFO_AVAILABLE_FOCAL_LENGTHS",
"OHOS_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION",
"OHOS_LENS_INFO_HYPERFOCAL_DISTANCE",
"OHOS_LENS_INFO_MINIMUM_FOCUS_DISTANCE",
"OHOS_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES",
"OHOS_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM",
"OHOS_SCALER_AVAILABLE_STREAM_CONFIGURATIONS",
"OHOS_SCALER_AVAILABLE_STALL_DURATIONS",
"OHOS_SCALER_AVAILABLE_MIN_FRAME_DURATIONS",
"OHOS_SCALER_CROPPING_TYPE",
"OHOS_INFO_SUPPORTED_HARDWARE_LEVEL",
"OHOS_REQUEST_PARTIAL_RESULT_COUNT",
"OHOS_REQUEST_PIPELINE_MAX_DEPTH",
"OHOS_REQUEST_MAX_NUM_OUTPUT_STREAMS",
"OHOS_REQUEST_MAX_NUM_INPUT_STREAMS",
"OHOS_REQUEST_AVAILABLE_CAPABILITIES"
];
availableRequestKeys = [
"OHOS_CONTROL_AE_MODE",
"OHOS_CONTROL_AE_EXPOSURE_COMPENSATION",
"OHOS_CONTROL_AE_PRECAPTURE_TRIGGER",
"OHOS_CONTROL_AE_TARGET_FPS_RANGE",
"OHOS_CONTROL_AE_ANTIBANDING_MODE",
"OHOS_CONTROL_AWB_MODE",
"OHOS_CONTROL_AWB_LOCK",
"OHOS_FLASH_MODE",
"OHOS_STATISTICS_FACE_DETECT_MODE",
"OHOS_NOISE_REDUCTION_MODE",
"OHOS_COLOR_CORRECTION_ABERRATION_MODE",
"OHOS_LENS_APERTURE",
"OHOS_LENS_OPTICAL_STABILIZATION_MODE",
"OHOS_CONTROL_MODE",
"OHOS_CONTROL_CAPTURE_INTENT"
];
availableResultKeys = [
"OHOS_CONTROL_AE_STATE",
"OHOS_CONTROL_AE_LOCK",
"OHOS_CONTROL_AWB_STATE",
"OHOS_CONTROL_AWB_LOCK",
"OHOS_LENS_STATE",
"OHOS_REQUEST_PIPELINE_DEPTH",
"OHOS_SCALER_CROP_REGION",
"OHOS_SENSOR_TIMESTAMP",
"OHOS_SENSOR_ROLLING_SHUTTER_SKEW",
"OHOS_SENSOR_EXPOSURE_TIME",
"OHOS_STATISTICS_LENS_SHADING_MAP_MODE",
"OHOS_STATISTICS_SCENE_FLICKER",
"OHOS_JPEG_SIZE",
"OHOS_JPEG_QUALITY",
"OHOS_JPEG_ORIENTATION"
];
}
}
ability_01 :: ability {
logicCameraId = "lcam001";
physicsCameraIds = [
"CAMERA_FIRST",
"CAMERA_SECOND"
];
metadata {
aeAvailableAntiBandingModes = [
"OHOS_CAMERA_AE_ANTIBANDING_MODE_OFF"
];
aeAvailableModes = ["OHOS_CAMERA_AE_MODE_OFF"];
availableAeFpsTargets = [30, 30];
aeCompensationRange = [0, 0];
aeCompensationSteps = [0, 0];
availableAwbModes = [
"OHOS_CAMERA_AWB_MODE_OFF"
];
sensitivityRange = [32, 2400];
faceDetectMode = "OHOS_CAMERA_FACE_DETECT_MODE_OFF";
availableCharacteristicsKeys = [
"OHOS_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES",
"OHOS_CONTROL_AE_AVAILABLE_MODES",
"OHOS_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES",
"OHOS_CONTROL_AE_COMPENSATION_RANGE",
"OHOS_CONTROL_AE_COMPENSATION_STEP",
"OHOS_CONTROL_AWB_AVAILABLE_MODES",
"OHOS_JPEG_AVAILABLE_THUMBNAIL_SIZES",
"OHOS_JPEG_MAX_SIZE",
"OHOS_SENSOR_INFO_PIXEL_ARRAY_SIZE",
"OHOS_SENSOR_INFO_ACTIVE_ARRAY_SIZE",
"OHOS_SENSOR_INFO_SENSITIVITY_RANGE",
"OHOS_SENSOR_INFO_PHYSICAL_SIZE",
];
availableRequestKeys = [
"OHOS_CONTROL_AE_MODE",
"OHOS_CONTROL_AE_EXPOSURE_COMPENSATION",
"OHOS_CONTROL_AE_TARGET_FPS_RANGE",
"OHOS_CONTROL_AE_ANTIBANDING_MODE",
"OHOS_CONTROL_AWB_MODE",
"OHOS_CONTROL_AWB_LOCK",
"OHOS_STATISTICS_FACE_DETECT_MODE"
];
availableResultKeys = [
"OHOS_CONTROL_AE_LOCK",
"OHOS_CONTROL_AWB_LOCK",
"OHOS_SENSOR_EXPOSURE_TIME",
"OHOS_JPEG_SIZE",
"OHOS_JPEG_QUALITY",
"OHOS_JPEG_ORIENTATION"
];
}
}
}
}

View File

@ -0,0 +1,402 @@
root {
module = "pipeline_specs";
template pipeline_spec {
name = "";
template node_spec {
name = "";
status = "";
stream_type = "";
template port_spec {
name = "";
peer_port_name = "";
peer_port_node_name = "";
direction = 0;
width = 0;
height = 0;
format = 0;
usage = 0x10000000000000;
need_allocation = 0;
buffer_count = 0;
}
}
}
normal_privew :: pipeline_spec {
name = "normal_preview";
sensor :: node_spec {
name = "sensor#0";
status = "new";
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vi#0";
direction = 1;
width = 0;
height = 0;
format = 0;
}
}
vi :: node_spec {
name = "vi#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "sensor#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vpss#0";
direction = 1;
}
}
vpss :: node_spec {
name = "vpss#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vi#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vo#0";
direction = 1;
}
}
vo :: node_spec {
name = "vo#0";
status = "new";
stream_type = "preview";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vpss#0";
direction = 0;
}
}
}
normal_snapshot :: pipeline_spec {
name = "normal_snapshot";
sensor :: node_spec {
name = "sensor#0";
status = "new";
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vi#0";
direction = 1;
width = 0;
height = 0;
format = 0;
}
}
vi :: node_spec {
name = "vi#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "sensor#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vpss#0";
direction = 1;
}
}
vpss :: node_spec {
name = "vpss#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vi#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "ipp#0";
direction = 1;
}
}
ipp :: node_spec {
name = "ipp#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vpss#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "sink#0";
direction = 1;
}
}
sink :: node_spec {
name = "sink#0";
status = "new";
stream_type = "snapshot";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "ipp#0";
direction = 0;
}
}
}
normal_preview_snapshot :: pipeline_spec {
name = "normal_preview_snapshot";
sensor :: node_spec {
name = "sensor#0";
status = "new";
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vi#0";
direction = 1;
width = 0;
height = 0;
format = 0;
}
}
vi :: node_spec {
name = "vi#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "sensor#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vpss#0";
direction = 1;
}
}
vpss :: node_spec {
name = "vpss#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vi#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vo#0";
direction = 1;
}
out_port_1 :: port_spec {
name = "out1";
peer_port_name = "in0";
peer_port_node_name = "ipp#0";
direction = 1;
}
}
ipp :: node_spec {
name = "ipp#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out1";
peer_port_node_name = "vpss#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "sink#0";
direction = 1;
}
}
vo :: node_spec {
name = "vo#0";
status = "new";
stream_type = "preview";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vpss#0";
direction = 0;
}
}
sink :: node_spec {
name = "sink#0";
status = "new";
stream_type = "snapshot";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "ipp#0";
direction = 0;
}
}
}
normal_preview_video :: pipeline_spec {
name = "normal_preview_video";
sensor :: node_spec {
name = "sensor#0";
status = "new";
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vi#0";
direction = 1;
width = 0;
height = 0;
format = 0;
}
}
vi :: node_spec {
name = "vi#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "sensor#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vpss#0";
direction = 1;
}
}
vpss :: node_spec {
name = "vpss#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vi#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vo#0";
direction = 1;
}
out_port_1 :: port_spec {
name = "out1";
peer_port_name = "in0";
peer_port_node_name = "venc#0";
direction = 1;
}
}
vo :: node_spec {
name = "vo#0";
status = "new";
stream_type = "preview";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vpss#0";
direction = 0;
}
}
venc :: node_spec {
name = "venc#0";
status = "new";
stream_type = "video";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out1";
peer_port_node_name = "vpss#0";
direction = 0;
}
}
}
normal_preview_preview :: pipeline_spec {
name = "normal_preview_preview";
sensor :: node_spec {
name = "sensor#0";
status = "new";
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vi#0";
direction = 1;
width = 0;
height = 0;
format = 0;
}
}
vi :: node_spec {
name = "vi#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "sensor#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vpss#0";
direction = 1;
}
}
vpss :: node_spec {
name = "vpss#0";
status = "new";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vi#0";
direction = 0;
}
out_port_0 :: port_spec {
name = "out0";
peer_port_name = "in0";
peer_port_node_name = "vo#0";
direction = 1;
}
out_port_1 :: port_spec {
name = "out1";
peer_port_name = "in0";
peer_port_node_name = "vo#1";
direction = 1;
}
}
vo :: node_spec {
name = "vo#0";
status = "new";
stream_type = "preview";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out0";
peer_port_node_name = "vpss#0";
direction = 0;
}
}
vo_preview :: node_spec {
name = "vo#1";
status = "new";
stream_type = "preview";
in_port_0 :: port_spec {
name = "in0";
peer_port_name = "out1";
peer_port_node_name = "vpss#0";
direction = 0;
}
}
}
}

View File

@ -0,0 +1,11 @@
root {
module="sample";
ipp_algo_config {
algo1 {
name = "example";
description = "example algorithm";
path = "libcamera_ipp_algo_example.z.so";
mode = "IPP_ALGO_MODE_NORMAL";
}
}
}

View File

@ -0,0 +1,27 @@
root {
module = "";
template stream_info {
id = 0;
name = "";
}
template scene_info {
id = 0;
name = "";
}
privew :: stream_info {
id = 0;
name = "preview";
}
video :: stream_info {
id = 1;
name = "video";
}
snapshot :: stream_info {
id = 2;
name = "snapshot";
}
normal :: scene_info {
id = 0;
name = "normal";
}
}

View File

@ -0,0 +1,289 @@
root {
device_info {
match_attr = "hdf_manager";
template host {
hostName = "";
priority = 100;
uid = "";
gid = "";
caps = [""];
template device {
template deviceNode {
policy = 0;
priority = 100;
preload = 0;
permission = 0664;
moduleName = "";
serviceName = "";
deviceMatchAttr = "";
}
}
}
platform :: host {
hostName = "sample_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
sample_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
preload = 2;
moduleName = "libsample_driver.z.so";
serviceName = "sample_driver_service";
}
}
}
usb :: host {
hostName = "usb_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
usb_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libusbd.z.so";
serviceName = "usbd";
}
}
}
usbfnMaster :: host {
hostName = "usbfnMaster_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
usb_pnp_manager_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 70;
moduleName = "libusb_pnp_manager.z.so";
serviceName = "usb_pnp_manager";
}
}
usbfn_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 80;
moduleName = "libusbfn_master.z.so";
serviceName = "usbfn_master";
deviceMatchAttr = "usbfn_master_driver";
}
}
ecm_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 81;
moduleName = "libusbfn_cdcecm.z.so";
serviceName = "usbfn_cdcecm";
deviceMatchAttr = "usbfn_cdcecm_driver";
}
}
acm_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libusbfn_cdcacm.z.so";
serviceName = "usbfn_cdcacm";
deviceMatchAttr = "usbfn_cdcacm_driver";
}
}
}
power :: host {
hostName = "power_host";
priority = 50;
uid = "system";
gid = "system";
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
power_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libpower_driver.z.so";
serviceName = "power_interface_service";
}
}
battery_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libbattery_driver.z.so";
serviceName = "battery_interface_service";
}
}
thermal_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libthermal_driver.z.so";
serviceName = "thermal_interface_service";
}
}
}
wlan :: host {
hostName = "wifi_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
wifi_c_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libwifi_hdi_c_device.z.so";
serviceName = "wlan_hal_c_service";
}
}
}
audio :: host {
hostName = "audio_hdi_server_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
audio_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libhdi_audio_primary_server.z.so";
serviceName = "audio_hdi_service";
}
}
audio_usb_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libhdi_audio_usb_server.z.so";
serviceName = "audio_hdi_usb_service";
}
}
audio_a2dp_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libhdi_audio_a2dp_server.z.so";
serviceName = "audio_hdi_a2dp_service";
}
}
audio_pnp_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 110;
moduleName = "libhdi_audio_pnp_server.z.so";
serviceName = "audio_hdi_pnp_service";
}
}
}
hdi_server :: host {
hostName = "camera_mpp_host";
priority = 50;
uid = "root";
gid = "system";
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
camera_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libcamera_hdi_impl.z.so";
serviceName = "camera_service";
}
}
display_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 120;
moduleName = "libhdi_video_layer_service.z.so";
serviceName = "hdi_video_layer_service";
}
}
}
input_hal :: host {
hostName = "input_user_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
input_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 150;
moduleName = "libhdf_input_hotplug.z.so";
serviceName = "input_service";
}
}
}
display_gralloc :: host {
hostName = "display_gralloc_host";
priority = 40;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
input_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 160;
moduleName = "libhdi_display_gralloc_stub.z.so";
serviceName = "hdi_display_gralloc_service";
}
}
}
codec :: host {
hostName = "codec_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
codec_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 200;
moduleName = "libcodec_server.z.so";
serviceName = "codec_hdi_service";
}
}
}
riladapter :: host {
hostName = "riladapter_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
riladapter_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libhril_hdf.z.so";
serviceName = "cellular_radio1";
}
}
}
sensor_dal :: host {
hostName = "sensor_dal_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
sensor_dal_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libsensor_driver.z.so";
serviceName = "sensor_interface_service";
}
}
}
vibrator_dal :: host {
hostName = "vibrator_dal_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
vibrator_dal_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "libvibrator_driver.z.so";
serviceName = "vibrator_interface_service";
}
}
}
light_dal :: host {
hostName = "light_dal_host";
priority = 50;
caps = ["DAC_OVERRIDE", "DAC_READ_SEARCH"];
light_dal_device :: device {
device0 :: deviceNode {
policy = 2;
priority = 100;
moduleName = "liblight_driver.z.so";
serviceName = "light_interface_service";
}
}
}
}
}

View File

@ -0,0 +1,7 @@
#include "device_info.hcs"
#include "usb_pnp_device.hcs"
#include "usb_ecm_acm.hcs"
root {
module = "default";
}

View File

@ -0,0 +1,421 @@
root {
module = "master";
master_config {
match_attr = "usbfn_master_driver";
use_hcs = 1;
udc_name = "100e0000.hidwc3_0";
usb_dev_desc = "UsbDeviceDescriptor";
usb_dev_string = "UsbDeviceStrings";
usb_configuration = "UsbConfigs";
UsbDeviceDescriptor {
bLength = 18;
bDescriptorType = 0x01;
bcdUSB = 0x0200;
bDeviceClass = 0;
bDeviceSubClass = 0;
bDeviceProtocol = 0;
bMaxPacketSize0 = 0x40;
idVendor = 0x12D1;
idProduct = 0x5000;
bcdDevice = 0x0223;
manufacturer = 0;
product = 1;
serialnumber = 2;
numConfigurations = 1;
}
UsbDeviceStrings {
stringTabList = ["string_1"];
string_1 {
language = 0x0409;
stringList = ["str_1", "str_2","str_3", "str_4"];
str_1 {
id = 0;
str = "HISILICON";
}
str_2 {
id = 1;
str = "HDC Device";
}
str_3 {
id = 2;
str = "0123456789POPLAR";
}
str_4 {
id = 3;
str = "hdc";
}
}
}
UsbConfigs {
configList = ["config_1"];
config_1 {
configurationValue = 1;
iConfiguration = 3;
attributes = 0xC0;
maxPower = 500;
functionList = ["func_ecm", "func_acm"];
func_ecm {
funcName = "f_generic.e";
stringTabList = ["fnString_1"];
fnString_1 {
language = 0x0409;
stringList = ["str_1", "str_2", "str_3", "str_4"];
str_1 {
id = 0;
str = "CDC Ethernet Control Model (ECM)";
}
str_2 {
id = 1;
str = "0ac75ae91c79";
}
str_3 {
id = 2;
str = "CDC Ethernet Data";
}
str_4 {
id = 3;
str = "CDC ECM";
}
}
fsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
"cdc_union", "cdc_ether", "FsNotify_endpoint", "DataNopInterface",
"DataInterface", "FsIn_endpoint", "FsOut_endpoint"];
assoc_interface {
bLength = 0x08;
bDescriptorType = 0x0B;
bFirstInterface = 0x00;
bInterfaceCount = 0x02;
bFunctionClass = 0x02;
bFunctionSubClass = 0x06;
bFunctionProtocol = 0x00;
iFunction = 0x04;
}
ControlInterface {
bLength = 0x09;
bDescriptorType = 0x04;
bInterfaceNumber = 0x00;
bAlternateSetting = 0x00;
bNumEndpoints = 0x01;
bInterfaceClass = 0x02;
bInterfaceSubClass = 0x06;
bInterfaceProtocol = 0x00;
iInterface = 0x1;
}
cdc_header {
bLength = 0x05;
bDescriptorType = 0x24;
desc_data = [0x05, 0x24, 0x00, 0x10, 0x01];
}
cdc_union {
bLength = 0x05;
bDescriptorType = 0x24;
desc_data = [0x05, 0x24, 0x06, 0x00, 0x01];
}
cdc_ether {
bLength = 0x0D;
bDescriptorType = 0x24;
desc_data = [0x0D, 0x24, 0x0F, 0x06, 0x00, 0x00, 0x00, 0x00,
0xEA, 0x05, 0x00, 0x00, 0x00];
}
DataNopInterface {
bLength = 0x09;
bDescriptorType = 0x04;
bInterfaceNumber = 0x01;
bAlternateSetting = 0x00;
bNumEndpoints = 0x00;
bInterfaceClass = 0x0A;
bInterfaceSubClass = 0x00;
bInterfaceProtocol = 0x06;
iInterface = 0x00;
}
DataInterface {
bLength = 0x09;
bDescriptorType = 0x04;
bInterfaceNumber = 0x01;
bAlternateSetting = 0x01;
bNumEndpoints = 0x02;
bInterfaceClass = 0x0A;
bInterfaceSubClass = 0x00;
bInterfaceProtocol = 0x06;
iInterface = 0x03;
}
FsNotify_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x81;
bmAttributes = 0x03;
wMaxPacketSize = 16;
bInterval = 32;
}
FsIn_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x82;
bmAttributes = 0x02;
wMaxPacketSize = 0;
bInterval = 0;
}
FsOut_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x3;
bmAttributes = 0x02;
wMaxPacketSize = 0;
bInterval = 0;
}
hsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
"cdc_union", "cdc_ether", "HsNotify_endpoint", "DataNopInterface",
"DataInterface", "HsIn_endpoint", "HsOut_endpoint"];
HsNotify_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x81;
bmAttributes = 0x03;
wMaxPacketSize = 16;
bInterval = 9;
}
HsIn_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x82;
bmAttributes = 0x02;
wMaxPacketSize = 512;
bInterval = 0;
}
HsOut_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x3;
bmAttributes = 0x02;
wMaxPacketSize = 512;
bInterval = 0;
}
ssDescList = ["assoc_interface", "ControlInterface", "cdc_header",
"cdc_union", "cdc_ether", "SsNotify_endpoint", "ss_ep_comp_0",
"DataNopInterface", "DataInterface", "SsIn_endpoint",
"ss_ep_comp", "SsOut_endpoint", "ss_ep_comp"];
SsNotify_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x81;
bmAttributes = 0x03;
wMaxPacketSize = 16;
bInterval = 9;
}
ss_ep_comp_0 {
bLength = 0x06;
bDescriptorType = 0x30;
bMaxBurst = 0x00;
bmAttributes = 0x00;
wBytesPerInterval = 16;
}
ss_ep_comp {
bLength = 0x06;
bDescriptorType = 0x30;
bMaxBurst = 0x00;
bmAttributes = 0x00;
wBytesPerInterval = 0x00;
}
SsIn_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x82;
bmAttributes = 0x02;
wMaxPacketSize = 1024;
bInterval = 0;
}
SsOut_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x3;
bmAttributes = 0x02;
wMaxPacketSize = 1024;
bInterval = 0;
}
}
func_acm {
funcName = "f_generic.a";
stringTabList = ["fnString_1"];
fnString_1 {
language = 0x0409;
stringList = ["str_1", "str_2", "str_3"];
str_1 {
id = 0;
str = "CDC Abstract Control Model (ACM)";
}
str_2 {
id = 1;
str = "CDC ACM Data";
}
str_3 {
id = 2;
str = "CDC Serial";
}
}
fsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
"cdc_call_mgmt", "cdc_acm", "cdc_union", "FsNotify_endpoint",
"DataInterface", "FsIn_endpoint", "FsOut_endpoint"];
assoc_interface {
bLength = 0x08;
bDescriptorType = 0x0B;
bFirstInterface = 0x02;
bInterfaceCount = 0x02;
bFunctionClass = 0x02;
bFunctionSubClass = 0x02;
bFunctionProtocol = 0x01;
iFunction = 0x03;
}
ControlInterface {
bLength = 0x09;
bDescriptorType = 0x04;
bInterfaceNumber = 0x02;
bAlternateSetting = 0x00;
bNumEndpoints = 0x01;
bInterfaceClass = 0x02;
bInterfaceSubClass = 0x02;
bInterfaceProtocol = 0x01;
iInterface = 0x01;
}
cdc_header {
bLength = 0x05;
bDescriptorType = 0x24;
desc_data = [0x05, 0x24, 0x00, 0x10, 0x01];
}
cdc_call_mgmt {
bLength = 0x05;
bDescriptorType = 0x24;
desc_data = [0x05, 0x24, 0x01, 0x00, 0x01];
}
cdc_acm {
bLength = 0x04;
bDescriptorType = 0x24;
desc_data = [0x04, 0x24, 0x02, 0x02];
}
cdc_union {
bLength = 0x05;
bDescriptorType = 0x24;
desc_data = [0x05, 0x24, 0x06, 0x02, 0x03];
}
FsNotify_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x81;
bmAttributes = 0x03;
wMaxPacketSize = 10;
bInterval = 32;
}
DataInterface {
bLength = 0x09;
bDescriptorType = 0x04;
bInterfaceNumber = 0x03;
bAlternateSetting = 0x00;
bNumEndpoints = 0x02;
bInterfaceClass = 0x0A;
bInterfaceSubClass = 0x00;
bInterfaceProtocol = 0x02;
iInterface = 0x02;
}
FsIn_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x82;
bmAttributes = 0x02;
wMaxPacketSize = 0;
bInterval = 0;
}
FsOut_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x3;
bmAttributes = 0x02;
wMaxPacketSize = 0;
bInterval = 0;
}
hsDescList = ["assoc_interface", "ControlInterface", "cdc_header",
"cdc_call_mgmt", "cdc_acm", "cdc_union", "HsNotify_endpoint",
"DataInterface", "HsIn_endpoint", "HsOut_endpoint"];
HsNotify_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x81;
bmAttributes = 0x03;
wMaxPacketSize = 10;
bInterval = 9;
}
HsIn_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x82;
bmAttributes = 0x02;
wMaxPacketSize = 512;
bInterval = 0;
}
HsOut_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x3;
bmAttributes = 0x02;
wMaxPacketSize = 512;
bInterval = 0;
}
ssDescList = ["assoc_interface", "ControlInterface", "cdc_header",
"cdc_call_mgmt", "cdc_acm", "cdc_union", "HsNotify_endpoint",
"ss_ep_comp", "DataInterface", "SsIn_endpoint",
"ss_ep_comp","SsOut_endpoint","ss_ep_comp"];
ss_ep_comp {
bLength = 0x06;
bDescriptorType = 0x30;
bMaxBurst = 0x00;
bmAttributes = 0x00;
wBytesPerInterval = 0x00;
}
SsIn_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x82;
bmAttributes = 0x02;
wMaxPacketSize = 1024;
bInterval = 0;
}
SsOut_endpoint {
bLength = 0x07;
bDescriptorType = 0x05;
bEndpointAddress = 0x3;
bmAttributes = 0x02;
wMaxPacketSize = 1024;
bInterval = 0;
}
}
}
}
custom_prop {
propTable = ["propList_1", "propList_2"];
propList_1 {
configNum = 1;
interfaceNum = 2;
propList = ["prop_1", "prop_2"];
prop_1 {
name = "testx";
value = "xxxxxx";
}
prop_2 {
name = "testy";
value = "yyyyyy";
}
}
propList_2 {
configNum = 1;
interfaceNum = 3;
propList = ["prop_1", "prop_2"];
prop_1 {
name = "testm";
value = "mmmmm";
}
prop_2 {
name = "testn";
value = "nnnnn";
}
}
}
}
}

View File

@ -0,0 +1,106 @@
root {
module = "usb_pnp_device";
usb_pnp_config {
match_attr = "usb_pnp_match";
usb_pnp_device_id = "UsbPnpDeviceId";
UsbPnpDeviceId {
idTableList = [
"sample_table",
"host_acm_table",
"host_acm_rawapi_table",
"host_ecm_table",
"host_acm_test_table"
];
sample_table {
moduleName = "usb_pnp_sample_driver";
serviceName = "usb_pnp_sample_service";
deviceMatchAttr = "usb_pnp_sample_matchAttr";
length = 19;
matchFlag = 0x0000;
vendorId = 0xFFF0;
productId = 0xFFF0;
bcdDeviceLow = 0x0000;
bcdDeviceHigh = 0x0000;
deviceClass = 0;
deviceSubClass = 0;
deviceProtocol = 0;
interfaceClass = [0];
interfaceSubClass = [0];
interfaceProtocol = [0];
interfaceNumber = [0, 1];
}
host_acm_table {
moduleName = "usbhost_acm";
serviceName = "usbhost_acm_pnp_service";
deviceMatchAttr = "usbhost_acm_pnp_matchAttr";
length = 21;
matchFlag = 0x0300;
vendorId = 0x12D1;
productId = 0x5000;
bcdDeviceLow = 0x0000;
bcdDeviceHigh = 0x0000;
deviceClass = 0;
deviceSubClass = 0;
deviceProtocol = 0;
interfaceClass = [0];
interfaceSubClass = [2, 0];
interfaceProtocol = [1, 2];
interfaceNumber = [2, 3];
}
host_acm_rawapi_table {
moduleName = "usbhost_acm_rawapi";
serviceName = "usbhost_acm_rawapi_service";
deviceMatchAttr = "usbhost_acm_rawapi_matchAttr";
length = 21;
matchFlag = 0x0300;
vendorId = 0x12D1;
productId = 0x5000;
bcdDeviceLow = 0x0000;
bcdDeviceHigh = 0x0000;
deviceClass = 0;
deviceSubClass = 0;
deviceProtocol = 0;
interfaceClass = [0];
interfaceSubClass = [2, 0];
interfaceProtocol = [1, 2];
interfaceNumber = [2, 3];
}
host_ecm_table {
moduleName = "usbhost_ecm";
serviceName = "usbhost_ecm_pnp_service";
deviceMatchAttr = "usbhost_ecm_pnp_matchAttr";
length = 21;
matchFlag = 0x0300;
vendorId = 0x12D1;
productId = 0x5000;
bcdDeviceLow = 0x0000;
bcdDeviceHigh = 0x0000;
deviceClass = 0;
deviceSubClass = 0;
deviceProtocol = 0;
interfaceClass = [0];
interfaceSubClass = [6, 0];
interfaceProtocol = [0, 6];
interfaceNumber = [0, 1];
}
host_acm_test_table {
moduleName = "usbhost_acm";
serviceName = "usbhost_acm_pnp_test_service";
deviceMatchAttr = "usbhost_acm_pnp_test_matchAttr";
length = 18;
matchFlag = 0x0000;
vendorId = 0x05E3;
productId = 0x0749;
bcdDeviceLow = 0x0000;
bcdDeviceHigh = 0x0000;
deviceClass = 0;
deviceSubClass = 0;
deviceProtocol = 0;
interfaceClass = [0];
interfaceSubClass = [0];
interfaceProtocol = [0];
interfaceNumber = [0];
}
}
}
}

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Power Mode Definitions:
NORMAL_MODE = 600,
POWER_SAVE_MODE = 601,
EXTREME_MODE = 602,
-->
<!--
Action Definitions:
DisplayOffTime = 101,
SystemAutoSleepTime = 102,
AutoAdjustBrightness = 103,
AutoWindownRoration = 107,
SetBrightness = 115,
VibratorsState = 120,
-->
<switch_proxy version="1">
<proxy id="600">
<switch id="101" value="-1" recover_flag="0"/>
<switch id="102" value="-1" recover_flag="0"/>
<switch id="103" value="-1" recover_flag="0"/>
<switch id="107" value="1" recover_flag="0"/>
<switch id="120" value="1" recover_flag="0"/>
</proxy>
<proxy id="601">
<switch id="101" value="-1" recover_flag="0"/>
<switch id="102" value="-1" recover_flag="0"/>
<switch id="103" value="-1" recover_flag="0"/>
<switch id="107" value="-1" recover_flag="0"/>
<switch id="115" value="50" recover_flag="0"/>
<switch id="120" value="-1" recover_flag="0"/>
</proxy>
<proxy id="602">
<switch id="101" value="-1" recover_flag="0"/>
<switch id="102" value="-1" recover_flag="0"/>
<switch id="103" value="-1" recover_flag="0"/>
<switch id="107" value="1" recover_flag="0"/>
<switch id="115" value="255" recover_flag="0"/>
<switch id="120" value="1" recover_flag="0"/>
</proxy>
<proxy id="603">
<switch id="101" value="-1" recover_flag="0"/>
<switch id="102" value="-1" recover_flag="0"/>
<switch id="103" value="-1" recover_flag="0"/>
<switch id="107" value="-1" recover_flag="0"/>
<switch id="115" value="25" recover_flag="0"/>
<switch id="120" value="-1" recover_flag="0"/>
</proxy>
</switch_proxy>

View File

@ -0,0 +1,14 @@
# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//device/board/${device_company}/hispark_taurus/device.gni")