mirror of
https://gitee.com/openharmony/vendor_unionman
synced 2024-11-27 01:01:06 +00:00
根据master分支规范要求,提交a311d芯片平台的vendor_unionman仓适配
Signed-off-by: minjie.yu <minjie.yu@unionman.com.cn>
This commit is contained in:
parent
a9da6a75a8
commit
a2d243a296
176
LICENSE
Executable file
176
LICENSE
Executable file
@ -0,0 +1,176 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
88
OAT.xml
Executable file
88
OAT.xml
Executable file
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- 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.
|
||||
|
||||
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
|
||||
All configurations in this file will be merged to OAT-Default.xml, if you have any questions or concerns, please create issue in OpenHarmony/tools_oat and @jalenchen or chenyaxun.
|
||||
|
||||
licensefile:
|
||||
1.If the project don't have "LICENSE" in root dir, please define all the license files in this project in , OAT will check license files according to this rule.
|
||||
|
||||
policylist:
|
||||
1. policy: If the OAT-Default.xml policies do not meet your requirements, please add policies here.
|
||||
2. policyitem: The fields type, name, path, desc is required, and the fields rule, group, filefilter is optional,the default value is:
|
||||
<policyitem type="" name="" path="" desc="" rule="may" group="defaultGroup" filefilter="defaultPolicyFilter"/>
|
||||
3. policyitem type:
|
||||
"compatibility" is used to check license compatibility in the specified path;
|
||||
"license" is used to check source license header in the specified path;
|
||||
"copyright" is used to check source copyright header in the specified path;
|
||||
"import" is used to check source dependency in the specified path, such as import ... ,include ...
|
||||
"filetype" is used to check file type in the specified path, supported file types: archive, binary
|
||||
"filename" is used to check whether the specified file exists in the specified path(projectroot means the root dir of the project), supported file names: LICENSE, README, README.OpenSource
|
||||
4. policyitem name: This field is used for define the license, copyright, "*" means match all, the "!" prefix means could not match this value. For example, "!GPL" means can not use GPL license.
|
||||
5. policyitem path: This field is used for define the source file scope to apply this policyitem, the "!" prefix means exclude the files. For example, "!.*/lib/.*" means files in lib dir will be exclude while process this policyitem.
|
||||
6. policyitem rule and group: These two fields are used together to merge policy results. "may" policyitems in the same group means any one in this group passed, the result will be passed.
|
||||
7. policyitem filefilter: Used to bind filefilter which define filter rules.
|
||||
7. policyitem desc: Used to describe the reason of this policy item, committers will check this while merging the code.
|
||||
8. filefilter: Filter rules, the type filename is used to filter file name, the type filepath is used to filter file path.
|
||||
|
||||
Note:If the text contains special characters, please escape them according to the following rules:
|
||||
" == "
|
||||
& == &
|
||||
' == '
|
||||
< == <
|
||||
> == >
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<oatconfig>
|
||||
<licensefile></licensefile>
|
||||
<policylist>
|
||||
<policy name="projectPolicy" desc="">
|
||||
<!--policyitem type="compatibility" name="GPL-2.0+" path=".*" desc="Process that runs independently, invoked by the X process."/-->
|
||||
<!--policyitem type="license" name="LGPL" path=".*" desc="Dynamically linked by module X"/-->
|
||||
<policyitem type="copyright" name="Huawei Technologies Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="华为技术有限公司版权声明"/>
|
||||
<policyitem type="copyright" name="Huawei Device Co., Ltd." path=".*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="华为终端有限公司版权声明"/>
|
||||
<policyitem type="copyright" name="Unionman Technology Co., Ltd." path=".*" desc="Unionman copyright"/>
|
||||
</policy>
|
||||
</policylist>
|
||||
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name="*.iml|*.json|*.txt" desc="desc files"/>
|
||||
<filteritem type="filepath" name="target/.*" desc="Compile output files"/>
|
||||
<filteritem type="filepath" name="out/.*" desc="Compile output files"/>
|
||||
<filteritem type="filepath" name="log/.*" desc="log files"/>
|
||||
<filteritem type="filepath" name=".idea/.*" desc="IDE temp files"/>
|
||||
<filteritem type="filepath" name="projectroot/[a-zA-Z0-9]{20,}.sh" desc="Temp files"/>
|
||||
<filteritem type="filepath" name="src/test/.*" desc="Test files"/>
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
<filteritem type="filename" name="BUILD.gn" desc="Compilation scripts do not declare license"/>
|
||||
<filteritem type="filename" name="fstab" desc="This type configuration file can not declare license"/>
|
||||
</filefilter>
|
||||
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
||||
<filteritem type="filename" name="fstab" desc="This type configuration file can not declare copyright"/>
|
||||
</filefilter>
|
||||
<filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
</filefilter>
|
||||
</filefilterlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
||||
# vendor_unionpi
|
||||
|
||||
#### Description
|
||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||
|
||||
#### Software Architecture
|
||||
Software architecture description
|
||||
|
||||
#### Installation
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Instructions
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create Feat_xxx branch
|
||||
3. Commit your code
|
||||
4. Create Pull Request
|
||||
|
||||
|
||||
#### Gitee Feature
|
||||
|
||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
||||
# vendor_unionpi
|
||||
|
||||
#### 介绍
|
||||
{**以下是 Gitee 平台说明,您可以替换此简介**
|
||||
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
36
README_zh.md
Executable file
36
README_zh.md
Executable file
@ -0,0 +1,36 @@
|
||||
# vendor_unionman
|
||||
|
||||
## 介绍
|
||||
|
||||
该仓库托管Unionman产品:Unionpi Tiger(Amlogic A311D)系列OpenHarmony硬件。
|
||||
|
||||
## 软件架构
|
||||
|
||||
支持基于Amlogic A311D芯片进行开发。
|
||||
|
||||
代码路径:
|
||||
|
||||
```
|
||||
vendor/unionman/ // vendor_unionman 仓的仓库路径
|
||||
├── a311d // Unionpi Tiger开发板
|
||||
└── ...
|
||||
|
||||
```
|
||||
|
||||
## 使用教程
|
||||
|
||||
Unionpi Tiger使用参考 [使用教程](https://gitee.com/openharmony-sig/device_board_unionman/blob/master/a311d/README_zh.md)
|
||||
|
||||
|
||||
## 贡献
|
||||
|
||||
[如何参与](https://gitee.com/openharmony/docs/blob/HEAD/zh-cn/contribute/%E5%8F%82%E4%B8%8E%E8%B4%A1%E7%8C%AE.md)
|
||||
|
||||
[Commit message规范](https://gitee.com/openharmony/device_qemu/wikis/Commit%20message%E8%A7%84%E8%8C%83?sort_id=4042860)
|
||||
|
||||
## 相关仓
|
||||
|
||||
[device_board_unionman](https://gitee.com/openharmony-sig/device_board_unionman)
|
||||
|
||||
[device_soc_amlogic](https://gitee.com/openharmony-sig/device_soc_amlogic)
|
||||
|
1025
a311d/config.json
Executable file
1025
a311d/config.json
Executable file
File diff suppressed because it is too large
Load Diff
16
a311d/hals/audio/product.gni
Executable file
16
a311d/hals/audio/product.gni
Executable file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2022 Unionman Technology 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 = true
|
||||
enable_hdf_proxy_stub = true
|
||||
enable_audio_hal_notsupport_pathselect = false
|
15
a311d/hals/wlan/product.gni
Executable file
15
a311d/hals/wlan/product.gni
Executable file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2022 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 = false
|
67
a311d/hdf_config/khdf/Makefile
Executable file
67
a311d/hdf_config/khdf/Makefile
Executable 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/src_tmp/${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)
|
36
a311d/hdf_config/khdf/audio/audio_config.hcs
Executable file
36
a311d/hdf_config/khdf/audio/audio_config.hcs
Executable 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_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_smartpa_dev0";
|
||||
accessoryName = "codec_service_1";
|
||||
platformName = "dma_service_0";
|
||||
cpuDaiName = "dai_service";
|
||||
accessoryDaiName = "accessory_dai";
|
||||
dspName = "dsp_service_0";
|
||||
dspDaiName = "dsp_dai";
|
||||
}
|
||||
}
|
||||
}
|
19
a311d/hdf_config/khdf/audio/codec_config.hcs
Executable file
19
a311d/hdf_config/khdf/audio/codec_config.hcs
Executable file
@ -0,0 +1,19 @@
|
||||
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";
|
||||
}
|
||||
controller_0x120c1031 :: codec_controller {
|
||||
match_attr = "hdf_codec_driver_ex";
|
||||
serviceName = "codec_service_1";
|
||||
codecDaiName = "accessory_dai";
|
||||
}
|
||||
}
|
||||
}
|
12
a311d/hdf_config/khdf/audio/dai_config.hcs
Executable file
12
a311d/hdf_config/khdf/audio/dai_config.hcs
Executable file
@ -0,0 +1,12 @@
|
||||
root {
|
||||
platfrom {
|
||||
template dai_controller {
|
||||
match_attr = "";
|
||||
serviceName = "";
|
||||
}
|
||||
controller_0x120c1020 :: dai_controller {
|
||||
match_attr = "hdf_dai_driver";
|
||||
serviceName = "dai_service";
|
||||
}
|
||||
}
|
||||
}
|
12
a311d/hdf_config/khdf/audio/dma_config.hcs
Executable file
12
a311d/hdf_config/khdf/audio/dma_config.hcs
Executable 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";
|
||||
}
|
||||
}
|
||||
}
|
19
a311d/hdf_config/khdf/audio/dsp_config.hcs
Executable file
19
a311d/hdf_config/khdf/audio/dsp_config.hcs
Executable 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";
|
||||
}
|
||||
}
|
||||
}
|
519
a311d/hdf_config/khdf/device_info/device_info.hcs
Executable file
519
a311d/hdf_config/khdf/device_info/device_info.hcs
Executable file
@ -0,0 +1,519 @@
|
||||
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 = 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 = "amlogic_a311d_watchdog_0";
|
||||
}
|
||||
}
|
||||
device_rtc :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 30;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_RTC";
|
||||
serviceName = "HDF_PLATFORM_RTC";
|
||||
deviceMatchAttr = "amlogic_a311d_rtc";
|
||||
}
|
||||
}
|
||||
|
||||
device_uart :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 40;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_UART";
|
||||
serviceName = "HDF_PLATFORM_UART_0";
|
||||
deviceMatchAttr = "amlogic_a311d_uart_0";
|
||||
}
|
||||
device1 :: deviceNode {
|
||||
policy = 2;
|
||||
permission = 0644;
|
||||
priority = 40;
|
||||
moduleName = "HDF_PLATFORM_UART";
|
||||
serviceName = "HDF_PLATFORM_UART_1";
|
||||
deviceMatchAttr = "amlogic_a311d_uart_1";
|
||||
}
|
||||
device2 :: deviceNode {
|
||||
policy = 2;
|
||||
permission = 0644;
|
||||
priority = 40;
|
||||
moduleName = "HDF_PLATFORM_UART";
|
||||
serviceName = "HDF_PLATFORM_UART_2";
|
||||
deviceMatchAttr = "amlogic_a311d_uart_2";
|
||||
}
|
||||
}
|
||||
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 = "amlogic_a311d_spi_0";
|
||||
}
|
||||
device1 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 60;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_SPI";
|
||||
serviceName = "HDF_PLATFORM_SPI_1";
|
||||
deviceMatchAttr = "amlogic_a311d_spi_1";
|
||||
}
|
||||
device2 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 60;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_SPI";
|
||||
serviceName = "HDF_PLATFORM_SPI_2";
|
||||
deviceMatchAttr = "amlogic_a311d_spi_2";
|
||||
}
|
||||
}
|
||||
device_sdio :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 70;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_SDIO";
|
||||
serviceName = "HDF_PLATFORM_MMC_2";
|
||||
deviceMatchAttr = "amlogic_a311d_sdio_0";
|
||||
}
|
||||
}
|
||||
device_emmc :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 20;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_EMMC";
|
||||
serviceName = "HDF_PLATFORM_MMC_0";
|
||||
deviceMatchAttr = "amlogic_a311d_emmc_0";
|
||||
}
|
||||
}
|
||||
device_pwm :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 80;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_PWM";
|
||||
serviceName = "HDF_PLATFORM_PWM_0";
|
||||
deviceMatchAttr = "linux_pwm_adapter_0";
|
||||
}
|
||||
device1 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 80;
|
||||
permission = 0644;
|
||||
moduleName = "HDF_PLATFORM_PWM";
|
||||
serviceName = "HDF_PLATFORM_PWM_1";
|
||||
deviceMatchAttr = "linux_pwm_adapter_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_drm_panel :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 0;
|
||||
priority = 197;
|
||||
preload = 0;
|
||||
moduleName = "HDF_DRMPANEL";
|
||||
}
|
||||
}
|
||||
device_hdf_disp :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 196;
|
||||
permission = 0660;
|
||||
moduleName = "HDF_DISP";
|
||||
serviceName = "hdf_disp";
|
||||
}
|
||||
}
|
||||
device_hi35xx_disp :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 0;
|
||||
priority = 195;
|
||||
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_FT5406";
|
||||
serviceName = "hdf_touch_ft5406_service";
|
||||
deviceMatchAttr = "st_ft5406_5p43";
|
||||
}
|
||||
}
|
||||
device_hdf_hid :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 200;
|
||||
preload = 0;
|
||||
permission = 0660;
|
||||
moduleName = "HDF_HID";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
network :: host {
|
||||
hostName = "network_host";
|
||||
device_wifi :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 180;
|
||||
preload = 0;
|
||||
permission = 0664;
|
||||
moduleName = "HDF_WIFI";
|
||||
deviceMatchAttr = "hdf_wlan_driver";
|
||||
serviceName = "hdfwifi";
|
||||
}
|
||||
}
|
||||
device_wlan_chips :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 0;
|
||||
preload = 0;
|
||||
priority = 200;
|
||||
moduleName = "HDF_WLAN_CHIPS";
|
||||
deviceMatchAttr = "hdf_wlan_chips_rtl8822cs";
|
||||
serviceName = "rtlwifi";
|
||||
}
|
||||
}
|
||||
}
|
||||
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 = "sensor_accel";
|
||||
deviceMatchAttr = "hdf_sensor_accel_driver";
|
||||
}
|
||||
}
|
||||
device_sensor_mxc6655xa :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 120;
|
||||
preload = 0;
|
||||
permission = 0664;
|
||||
moduleName = "HDF_SENSOR_ACCEL_MXC6655XA";
|
||||
serviceName = "hdf_accel_mxc6655xa";
|
||||
deviceMatchAttr = "hdf_sensor_accel_mxc6655xa_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_A311D";
|
||||
serviceName = "dai_service";
|
||||
deviceMatchAttr = "hdf_dai_driver";
|
||||
}
|
||||
}
|
||||
device_codec :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 50;
|
||||
preload = 0;
|
||||
permission = 0666;
|
||||
moduleName = "CODEC_A311D";
|
||||
serviceName = "codec_service_0";
|
||||
deviceMatchAttr = "hdf_codec_driver";
|
||||
}
|
||||
}
|
||||
device_codec_ex :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 50;
|
||||
preload = 0;
|
||||
permission = 0666;
|
||||
moduleName = "CODEC_NAU8540";
|
||||
serviceName = "codec_service_1";
|
||||
deviceMatchAttr = "hdf_codec_driver_ex";
|
||||
}
|
||||
}
|
||||
device_dsp :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 50;
|
||||
preload = 0;
|
||||
permission = 0666;
|
||||
moduleName = "DSP_A311D";
|
||||
serviceName = "dsp_service_0";
|
||||
deviceMatchAttr = "hdf_dsp_driver";
|
||||
}
|
||||
}
|
||||
device_dma :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 1;
|
||||
priority = 50;
|
||||
preload = 0;
|
||||
permission = 0666;
|
||||
moduleName = "DMA_A311D";
|
||||
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_dev0";
|
||||
}
|
||||
device1 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 60;
|
||||
preload = 0;
|
||||
permission = 0666;
|
||||
moduleName = "HDF_AUDIO";
|
||||
deviceMatchAttr = "hdf_audio_driver_1";
|
||||
serviceName = "hdf_audio_smartpa_dev0";
|
||||
}
|
||||
}
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
23
a311d/hdf_config/khdf/hdf.hcs
Executable file
23
a311d/hdf_config/khdf/hdf.hcs
Executable file
@ -0,0 +1,23 @@
|
||||
#include "device_info/device_info.hcs"
|
||||
#include "platform/pwm_config.hcs"
|
||||
#include "platform/a311d_watchdog_config.hcs"
|
||||
#include "platform/a311d_uart_config.hcs"
|
||||
#include "platform/sdio_config.hcs"
|
||||
#include "platform/emmc_config.hcs"
|
||||
#include "platform/a311d_spi_config.hcs"
|
||||
#include "input/input_config.hcs"
|
||||
#include "wifi/wlan_platform.hcs"
|
||||
#include "wifi/wlan_chip_rtl8822cs.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"
|
||||
|
||||
root {
|
||||
module = "amlogic,a311d_chip";
|
||||
}
|
63
a311d/hdf_config/khdf/hdf_test/Makefile
Executable file
63
a311d/hdf_config/khdf/hdf_test/Makefile
Executable file
@ -0,0 +1,63 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
SOURCE_ROOT:=$(abspath ../../../../../)
|
||||
|
||||
HC_GEN_DIR := $(abspath $(SOURCE_ROOT)/drivers/framework/tools/hc-gen)
|
||||
HC_GEN := $(HC_GEN_DIR)/build/hc-gen
|
||||
LOCAL_HCS_ROOT := $(abspath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
|
||||
|
||||
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)
|
||||
|
||||
obj-$(CONFIG_DRIVERS_HDF) += $(HCS_OBJ)
|
10
a311d/hdf_config/khdf/hdf_test/emmc_test_config.hcs
Executable file
10
a311d/hdf_config/khdf/hdf_test/emmc_test_config.hcs
Executable file
@ -0,0 +1,10 @@
|
||||
root {
|
||||
module = "emmc";
|
||||
emmc_config {
|
||||
emmc_controller_tester {
|
||||
match_attr = "EMMC_TEST";
|
||||
busNum = 0;
|
||||
hostId = 0;
|
||||
}
|
||||
}
|
||||
}
|
10
a311d/hdf_config/khdf/hdf_test/gpio_test_config.hcs
Executable file
10
a311d/hdf_config/khdf/hdf_test/gpio_test_config.hcs
Executable file
@ -0,0 +1,10 @@
|
||||
root {
|
||||
module = "gpio";
|
||||
gpio_config {
|
||||
gpio_controller_tester {
|
||||
match_attr = "GPIO_TEST";
|
||||
gpio = 83;
|
||||
gpioIrq = 83;
|
||||
}
|
||||
}
|
||||
}
|
14
a311d/hdf_config/khdf/hdf_test/hdf.hcs
Executable file
14
a311d/hdf_config/khdf/hdf_test/hdf.hcs
Executable 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";
|
||||
}
|
52
a311d/hdf_config/khdf/hdf_test/hdf_config_test.hcs
Executable file
52
a311d/hdf_config/khdf/hdf_test/hdf_config_test.hcs
Executable 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;
|
||||
}
|
135
a311d/hdf_config/khdf/hdf_test/hdf_test_manager/device_info.hcs
Executable file
135
a311d/hdf_config/khdf/hdf_test/hdf_test_manager/device_info.hcs
Executable 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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
13
a311d/hdf_config/khdf/hdf_test/i2c_test_config.hcs
Executable file
13
a311d/hdf_config/khdf/hdf_test/i2c_test_config.hcs
Executable 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;
|
||||
}
|
||||
}
|
||||
}
|
11
a311d/hdf_config/khdf/hdf_test/pwm_test_config.hcs
Executable file
11
a311d/hdf_config/khdf/hdf_test/pwm_test_config.hcs
Executable 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;
|
||||
}
|
||||
}
|
12
a311d/hdf_config/khdf/hdf_test/sdio_test_config.hcs
Executable file
12
a311d/hdf_config/khdf/hdf_test/sdio_test_config.hcs
Executable file
@ -0,0 +1,12 @@
|
||||
root {
|
||||
module = "sdio";
|
||||
sdio_config {
|
||||
sdio_controller_tester {
|
||||
match_attr = "SDIO_TEST";
|
||||
busNum = 2;
|
||||
funcNum = 1;
|
||||
vendorId = 0x024c;
|
||||
deviceId = 0xc822;
|
||||
}
|
||||
}
|
||||
}
|
10
a311d/hdf_config/khdf/hdf_test/spi_test_config.hcs
Executable file
10
a311d/hdf_config/khdf/hdf_test/spi_test_config.hcs
Executable 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];
|
||||
}
|
||||
}
|
9
a311d/hdf_config/khdf/hdf_test/uart_test_config.hcs
Executable file
9
a311d/hdf_config/khdf/hdf_test/uart_test_config.hcs
Executable 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];
|
||||
}
|
||||
}
|
182
a311d/hdf_config/khdf/input/input_config.hcs
Executable file
182
a311d/hdf_config/khdf/input/input_config.hcs
Executable file
@ -0,0 +1,182 @@
|
||||
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 = 800;
|
||||
solutionY = 480;
|
||||
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];
|
||||
}
|
||||
*/
|
||||
// Amlogic A311D board: ft5406--5p43
|
||||
busConfig {
|
||||
// 0:i2c 1:spi
|
||||
busType = 0;
|
||||
busNum = 3;
|
||||
clkGpio = 2;
|
||||
dataGpio = 1;
|
||||
i2cClkIomux = [0x0, 0x0];
|
||||
i2cDataIomux = [0x0, 0x0];
|
||||
}
|
||||
pinConfig {
|
||||
rstGpio = 3;
|
||||
intGpio = 4;
|
||||
rstRegCfg = [0x0, 0x0];
|
||||
intRegCfg = [0x0, 0x0];
|
||||
}
|
||||
powerConfig {
|
||||
/* 0:unused 1:ldo 2:gpio 3:pmic */
|
||||
vccType = 0;
|
||||
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 = "ft5406";
|
||||
vendorName = "zsj";
|
||||
chipInfo = "AAAA11222"; // 4-ProjectName, 2-TP IC, 3-TP Module
|
||||
/* 0:i2c 1:spi*/
|
||||
busType = 0;
|
||||
deviceAddr = 0x38;
|
||||
/* 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 = "st_ft5406_5p43";
|
||||
chipName = "ft5406";
|
||||
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"];
|
||||
keyInfoList {
|
||||
key1 {
|
||||
match_attr = "key_device0";
|
||||
/* 0:touch 1:key 2:keyboard 3:mouse 4:button 5:crown 6:encoder */
|
||||
inputType = 1;
|
||||
keyName = "power";
|
||||
gpioNum = 475;
|
||||
irqFlag = 8;
|
||||
debounceTime = 80;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
18
a311d/hdf_config/khdf/light/light_config.hcs
Executable file
18
a311d/hdf_config/khdf/light/light_config.hcs
Executable file
@ -0,0 +1,18 @@
|
||||
root {
|
||||
lightConfig {
|
||||
boardConfig {
|
||||
match_attr = "hdf_light_driver";
|
||||
lightAttr {
|
||||
light01 {
|
||||
lightType = [1, 2];
|
||||
busRNum = 403;
|
||||
busGNum = 407;
|
||||
busBNum = 409;
|
||||
lightBrightness = 0X80000000;
|
||||
onTime = 50;
|
||||
offTime = 50;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
26
a311d/hdf_config/khdf/platform/a311d_spi_config.hcs
Executable file
26
a311d/hdf_config/khdf/platform/a311d_spi_config.hcs
Executable file
@ -0,0 +1,26 @@
|
||||
root {
|
||||
platform {
|
||||
spi_config {
|
||||
template spi_controller {
|
||||
serviceName = "";
|
||||
match_attr = "";
|
||||
busNum = 0;
|
||||
numCs = 0;
|
||||
}
|
||||
|
||||
controller_0x120c0000 :: spi_controller {
|
||||
busNum = 0;
|
||||
numCs = 1;
|
||||
match_attr = "amlogic_a311d_spi_0";
|
||||
}
|
||||
|
||||
controller_0x120c1000 :: spi_controller {
|
||||
match_attr = "amlogic_a311d_spi_1";
|
||||
busNum = 1;
|
||||
numCs = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
27
a311d/hdf_config/khdf/platform/a311d_uart_config.hcs
Executable file
27
a311d/hdf_config/khdf/platform/a311d_uart_config.hcs
Executable file
@ -0,0 +1,27 @@
|
||||
root {
|
||||
platform {
|
||||
uart_config {
|
||||
template uart_device {
|
||||
serviceName = "";
|
||||
match_attr = "";
|
||||
driver_name = "ttyS";
|
||||
num = 0;
|
||||
}
|
||||
|
||||
device_uart_0x0000 :: uart_device {
|
||||
driver_name = "ttyS0";
|
||||
match_attr = "amlogic_a311d_uart_0";
|
||||
}
|
||||
|
||||
device_uart_0x0001 :: uart_device {
|
||||
num = 1;
|
||||
match_attr = "amlogic_a311d_uart_1";
|
||||
}
|
||||
|
||||
device_uart_0x0002 :: uart_device {
|
||||
num = 1;
|
||||
match_attr = "amlogic_a311d_uart_2";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
a311d/hdf_config/khdf/platform/a311d_watchdog_config.hcs
Executable file
16
a311d/hdf_config/khdf/platform/a311d_watchdog_config.hcs
Executable file
@ -0,0 +1,16 @@
|
||||
root {
|
||||
platform {
|
||||
watchdog_config {
|
||||
template watchdog_device {
|
||||
serviceName = "HDF_PLATFORM_WATCHDOG_0";
|
||||
match_attr = "";
|
||||
id = 0;
|
||||
}
|
||||
|
||||
device_0xffd0f0d0 :: watchdog_device {
|
||||
id = 0;
|
||||
match_attr = "amlogic_a311d_watchdog_0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
16
a311d/hdf_config/khdf/platform/emmc_config.hcs
Executable file
16
a311d/hdf_config/khdf/platform/emmc_config.hcs
Executable file
@ -0,0 +1,16 @@
|
||||
root {
|
||||
platform {
|
||||
emmc_config {
|
||||
template emmc_controller {
|
||||
match_attr = "";
|
||||
hostId = 0;
|
||||
devType = 0;
|
||||
}
|
||||
|
||||
controller_0x00 :: emmc_controller {
|
||||
match_attr = "amlogic_a311d_emmc_0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
27
a311d/hdf_config/khdf/platform/i2c_config.hcs
Executable file
27
a311d/hdf_config/khdf/platform/i2c_config.hcs
Executable file
@ -0,0 +1,27 @@
|
||||
root {
|
||||
platform {
|
||||
i2c_config {
|
||||
match_attr = "linux_i2c_adapter";
|
||||
|
||||
template i2c_controller {
|
||||
bus = 0;
|
||||
}
|
||||
|
||||
controller_0xffd01f00 :: i2c_controller {
|
||||
bus = 0;
|
||||
}
|
||||
|
||||
controller_0xffd01e00 :: i2c_controller {
|
||||
bus = 1;
|
||||
}
|
||||
|
||||
controller_0xffd01d00 :: i2c_controller {
|
||||
bus = 2;
|
||||
}
|
||||
|
||||
controller_0xffd01c00 :: i2c_controller {
|
||||
bus = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
22
a311d/hdf_config/khdf/platform/pwm_config.hcs
Executable file
22
a311d/hdf_config/khdf/platform/pwm_config.hcs
Executable file
@ -0,0 +1,22 @@
|
||||
root {
|
||||
platform {
|
||||
pwm_config {
|
||||
template pwm_device {
|
||||
serviceName = "";
|
||||
match_attr = "";
|
||||
num = 0;
|
||||
}
|
||||
|
||||
device_pwm_0x00000000 :: pwm_device {
|
||||
num = 0;
|
||||
match_attr = "linux_pwm_adapter_0";
|
||||
}
|
||||
|
||||
device_pwm_0x00000001 :: pwm_device {
|
||||
num = 1;
|
||||
match_attr = "linux_pwm_adapter_1";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
16
a311d/hdf_config/khdf/platform/sdio_config.hcs
Executable file
16
a311d/hdf_config/khdf/platform/sdio_config.hcs
Executable file
@ -0,0 +1,16 @@
|
||||
root {
|
||||
platform {
|
||||
sdio_config {
|
||||
template sdio_controller {
|
||||
match_attr = "";
|
||||
hostId = 2;
|
||||
devType = 2;
|
||||
}
|
||||
|
||||
controller_0xffe03000 :: sdio_controller {
|
||||
match_attr = "amlogic_a311d_sdio_0";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
50
a311d/hdf_config/khdf/sensor/accel/bmi160_config.hcs
Executable file
50
a311d/hdf_config/khdf/sensor/accel/bmi160_config.hcs
Executable file
@ -0,0 +1,50 @@
|
||||
#include "../sensor_common.hcs"
|
||||
root {
|
||||
accel_bmi160_chip_config : sensorConfig {
|
||||
match_attr = "hdf_sensor_accel_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 = 230;
|
||||
}
|
||||
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
|
||||
];
|
||||
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
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
67
a311d/hdf_config/khdf/sensor/accel/mxc6655xa_config.hcs
Executable file
67
a311d/hdf_config/khdf/sensor/accel/mxc6655xa_config.hcs
Executable file
@ -0,0 +1,67 @@
|
||||
#include "../sensor_common.hcs"
|
||||
root {
|
||||
accel_mxc6655xa_chip_config : sensorConfig {
|
||||
match_attr = "hdf_sensor_accel_mxc6655xa_driver";
|
||||
sensorInfo :: sensorDeviceInfo {
|
||||
sensorName = "accelerometer";
|
||||
vendorName = "memsi_mxc6655xa"; // max string length is 16 bytes
|
||||
sensorTypeId = 1; // enum SensorTypeTag
|
||||
sensorId = 1; // user define sensor id
|
||||
power = 230;
|
||||
}
|
||||
sensorBusConfig :: sensorBusInfo {
|
||||
busType = 0; // 0:i2c 1:spi
|
||||
busNum = 5;
|
||||
busAddr = 0x15;
|
||||
regWidth = 1; // 1btye
|
||||
}
|
||||
sensorIdAttr :: sensorIdInfo {
|
||||
chipName = "mxc6655xa";
|
||||
chipIdRegister = 0x0f;
|
||||
chipIdValue = 0x05;
|
||||
}
|
||||
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
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
30
a311d/hdf_config/khdf/sensor/sensor_common.hcs
Executable file
30
a311d/hdf_config/khdf/sensor/sensor_common.hcs
Executable 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;
|
||||
}
|
||||
}
|
||||
}
|
2
a311d/hdf_config/khdf/sensor/sensor_config.hcs
Executable file
2
a311d/hdf_config/khdf/sensor/sensor_config.hcs
Executable file
@ -0,0 +1,2 @@
|
||||
#include "accel/bmi160_config.hcs"
|
||||
#include "accel/mxc6655xa_config.hcs"
|
14
a311d/hdf_config/khdf/vibrator/linear_vibrator_config.hcs
Executable file
14
a311d/hdf_config/khdf/vibrator/linear_vibrator_config.hcs
Executable file
@ -0,0 +1,14 @@
|
||||
root {
|
||||
linearVibratorConfig {
|
||||
boardConfig {
|
||||
match_attr = "hdf_linear_vibrator_driver";
|
||||
vibratorChipConfig {
|
||||
busType = 1; // 0:i2c 1:gpio
|
||||
gpioNum = 403;
|
||||
startReg = 0;
|
||||
stopReg = 0;
|
||||
startMask = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
24
a311d/hdf_config/khdf/vibrator/vibrator_config.hcs
Executable file
24
a311d/hdf_config/khdf/vibrator/vibrator_config.hcs
Executable 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];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
14
a311d/hdf_config/khdf/wifi/wlan_chip_rtl8822cs.hcs
Executable file
14
a311d/hdf_config/khdf/wifi/wlan_chip_rtl8822cs.hcs
Executable file
@ -0,0 +1,14 @@
|
||||
root {
|
||||
wlan_config {
|
||||
rtl882x :& chipList {
|
||||
chipRtl882x:: chipInst {
|
||||
match_attr = "hdf_wlan_chips_rtl8822cs";
|
||||
driverName = "rtl882x";
|
||||
bus {
|
||||
vendorId = 0x024c;
|
||||
deviceId = [0xc822];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
112
a311d/hdf_config/khdf/wifi/wlan_platform.hcs
Executable file
112
a311d/hdf_config/khdf/wifi/wlan_platform.hcs
Executable file
@ -0,0 +1,112 @@
|
||||
root {
|
||||
module = "wlan";
|
||||
wlan_config {
|
||||
match_attr = "hdf_wlan_driver";
|
||||
hostChipName = "a311d";
|
||||
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 = 4; /*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;
|
||||
}
|
||||
}
|
||||
}
|
||||
rtlwifi :& deviceList {
|
||||
device0 :: deviceInst {
|
||||
deviceInstId = 0;
|
||||
powers {
|
||||
power0 {
|
||||
powerSeqDelay = 0;
|
||||
powerType = 0; /* 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_rtl8822cs";
|
||||
driverName = "rtl882x";
|
||||
bus {
|
||||
vendorId = 0x024c;
|
||||
deviceId = [0xc822];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
177
a311d/hdf_config/uhdf/camera/hdi_impl/camera_host_config.hcs
Executable file
177
a311d/hdf_config/uhdf/camera/hdi_impl/camera_host_config.hcs
Executable file
@ -0,0 +1,177 @@
|
||||
root {
|
||||
module="sample";
|
||||
camera_host_config {
|
||||
match_attr = "camera_host_interface";
|
||||
template ability {
|
||||
logicCameraId = "lcam001";
|
||||
physicsCameraIds = [
|
||||
"CAMERA_FIRST"
|
||||
];
|
||||
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"
|
||||
];
|
||||
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"
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
361
a311d/hdf_config/uhdf/camera/pipeline_core/config.hcs
Executable file
361
a311d/hdf_config/uhdf/camera/pipeline_core/config.hcs
Executable file
@ -0,0 +1,361 @@
|
||||
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";
|
||||
v4l2_source :: node_spec {
|
||||
name = "v4l2_source#0";
|
||||
status = "new";
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "AMLCodec#0";
|
||||
direction = 1;
|
||||
width = 0;
|
||||
height = 0;
|
||||
format = 0;
|
||||
}
|
||||
}
|
||||
AMLCodec_1 :: node_spec {
|
||||
name = "AMLCodec#0";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "v4l2_source#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 = "preview";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "AMLCodec#0";
|
||||
direction = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
normal_snapshot :: pipeline_spec {
|
||||
name = "normal_snapshot";
|
||||
v4l2_source :: node_spec {
|
||||
name = "v4l2_source#0";
|
||||
status = "new";
|
||||
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 = "v4l2_source#0";
|
||||
direction = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
normal_preview_snapshot :: pipeline_spec {
|
||||
name = "normal_preview_snapshot";
|
||||
v4l2_source :: node_spec {
|
||||
name = "v4l2_source#0";
|
||||
status = "new";
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "fork#0";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
fork :: node_spec {
|
||||
name = "fork#0";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "v4l2_source#0";
|
||||
direction = 0;
|
||||
}
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "AMLCodec#0";
|
||||
direction = 1;
|
||||
}
|
||||
out_port_1 :: port_spec {
|
||||
name = "out1";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "AMLCodec#1";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
AMLCodec_1 :: node_spec {
|
||||
name = "AMLCodec#0";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "fork#0";
|
||||
direction = 0;
|
||||
}
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "sink#0";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
AMLCodec_2 :: node_spec {
|
||||
name = "AMLCodec#1";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out1";
|
||||
peer_port_node_name = "fork#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 = "AMLCodec#1";
|
||||
direction = 0;
|
||||
}
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "sink#1";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
sink_1 :: node_spec {
|
||||
name = "sink#0";
|
||||
status = "new";
|
||||
stream_type = "preview";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "AMLCodec#0";
|
||||
direction = 0;
|
||||
}
|
||||
}
|
||||
sink_2 :: node_spec {
|
||||
name = "sink#1";
|
||||
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";
|
||||
v4l2_source :: node_spec {
|
||||
name = "v4l2_source#0";
|
||||
status = "new";
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "fork#0";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
fork :: node_spec {
|
||||
name = "fork#0";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "v4l2_source#0";
|
||||
direction = 0;
|
||||
}
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "AMLCodec#0";
|
||||
direction = 1;
|
||||
}
|
||||
out_port_1 :: port_spec {
|
||||
name = "out1";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "AMLCodec#1";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
AMLCodec_1 :: node_spec {
|
||||
name = "AMLCodec#0";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "fork#0";
|
||||
direction = 0;
|
||||
}
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "sink#0";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
AMLCodec_2 :: node_spec {
|
||||
name = "AMLCodec#1";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out1";
|
||||
peer_port_node_name = "fork#0";
|
||||
direction = 0;
|
||||
}
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "sink#1";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
sink_1 :: node_spec {
|
||||
name = "sink#0";
|
||||
status = "new";
|
||||
stream_type = "preview";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "AMLCodec#0";
|
||||
direction = 0;
|
||||
}
|
||||
}
|
||||
sink_2 :: node_spec {
|
||||
name = "sink#1";
|
||||
status = "new";
|
||||
stream_type = "video";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "AMLCodec#1";
|
||||
direction = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
dual_privew :: pipeline_spec {
|
||||
name = "dual_preview";
|
||||
uvc :: node_spec {
|
||||
name = "uvc#0";
|
||||
status = "new";
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in1";
|
||||
peer_port_node_name = "merge#0";
|
||||
direction = 1;
|
||||
width = 0;
|
||||
height = 0;
|
||||
format = 0;
|
||||
need_allocation = 1;
|
||||
buffer_count = 8;
|
||||
}
|
||||
}
|
||||
v4l2_source :: node_spec {
|
||||
name = "v4l2_source#0";
|
||||
status = "new";
|
||||
out_port_0 :: port_spec {
|
||||
name = "out0";
|
||||
peer_port_name = "in0";
|
||||
peer_port_node_name = "merge#0";
|
||||
direction = 1;
|
||||
}
|
||||
}
|
||||
merge :: node_spec {
|
||||
name = "merge#0";
|
||||
status = "new";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "v4l2_source#0";
|
||||
direction = 0;
|
||||
}
|
||||
in_port_1 :: port_spec {
|
||||
name = "in1";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "uvc#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 = "merge#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 = "preview";
|
||||
in_port_0 :: port_spec {
|
||||
name = "in0";
|
||||
peer_port_name = "out0";
|
||||
peer_port_node_name = "ipp#0";
|
||||
direction = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
a311d/hdf_config/uhdf/camera/pipeline_core/ipp_algo_config.hcs
Executable file
11
a311d/hdf_config/uhdf/camera/pipeline_core/ipp_algo_config.hcs
Executable 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";
|
||||
}
|
||||
}
|
||||
}
|
31
a311d/hdf_config/uhdf/camera/pipeline_core/params.hcs
Executable file
31
a311d/hdf_config/uhdf/camera/pipeline_core/params.hcs
Executable file
@ -0,0 +1,31 @@
|
||||
root {
|
||||
module = "";
|
||||
template stream_info {
|
||||
id = 0;
|
||||
name = "";
|
||||
}
|
||||
template scene_info {
|
||||
id = 0;
|
||||
name = "";
|
||||
}
|
||||
priview :: 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";
|
||||
}
|
||||
dual :: scene_info {
|
||||
id = 1;
|
||||
name = "dual";
|
||||
}
|
||||
}
|
275
a311d/hdf_config/uhdf/device_info.hcs
Executable file
275
a311d/hdf_config/uhdf/device_info.hcs
Executable file
@ -0,0 +1,275 @@
|
||||
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 = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
platform :: host {
|
||||
hostName = "sample_host";
|
||||
priority = 50;
|
||||
sample_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
preload = 2;
|
||||
moduleName = "libsample_driver.z.so";
|
||||
serviceName = "sample_driver_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
bluetooth :: host {
|
||||
hostName = "blue_host";
|
||||
priority = 50;
|
||||
bluetooth_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
moduleName = "libbluetooth_hdi_server.z.so";
|
||||
serviceName = "BtHciService";
|
||||
}
|
||||
}
|
||||
}
|
||||
audio_bluetooth :: host {
|
||||
hostName = "a2dp_host";
|
||||
priority = 50;
|
||||
bluetooth_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
preload = 2;
|
||||
moduleName = "libaudio_bluetooth_hdi_adapter_server.z.so";
|
||||
serviceName = "audio_bluetooth_hdi_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
usb :: host {
|
||||
hostName = "usb_host";
|
||||
priority = 50;
|
||||
usb_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
moduleName = "libusbd.z.so";
|
||||
serviceName = "usbd";
|
||||
}
|
||||
}
|
||||
}
|
||||
usbfnMaster :: host {
|
||||
hostName = "usbfnMaster_host";
|
||||
priority = 50;
|
||||
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;
|
||||
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;
|
||||
wifi_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
moduleName = "libwifi_hdi_device.z.so";
|
||||
serviceName = "wlan_hal_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
wifi :: host {
|
||||
hostName = "wifi_c_host";
|
||||
priority = 50;
|
||||
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;
|
||||
audio_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
moduleName = "libhdi_audio_server.z.so";
|
||||
serviceName = "audio_hdi_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
hdi_server :: host {
|
||||
hostName = "camera_host";
|
||||
priority = 50;
|
||||
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_media_layer_service.z.so";
|
||||
serviceName = "hdi_media_layer_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
input_hal :: host {
|
||||
hostName = "input_user_host";
|
||||
priority = 50;
|
||||
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;
|
||||
input_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 160;
|
||||
moduleName = "libhdi_display_gralloc_stub.z.so";
|
||||
serviceName = "hdi_display_gralloc_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
sensor_dal :: host {
|
||||
hostName = "sensor_dal_host";
|
||||
priority = 50;
|
||||
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;
|
||||
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;
|
||||
light_dal_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
moduleName = "liblight_driver.z.so";
|
||||
serviceName = "light_interface_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
distributed_camera_host :: host {
|
||||
hostName = "dcamera_host";
|
||||
priority = 50;
|
||||
distributed_camera_device :: device {
|
||||
device0 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
moduleName = "libdistributed_camera_host_config.z.so";
|
||||
serviceName = "distributed_camera_service";
|
||||
}
|
||||
device1 :: deviceNode {
|
||||
policy = 2;
|
||||
priority = 100;
|
||||
moduleName = "libdistributed_camera_provider_config.z.so";
|
||||
serviceName = "distributed_camera_provider_service";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
a311d/hdf_config/uhdf/hdf.hcs
Executable file
7
a311d/hdf_config/uhdf/hdf.hcs
Executable file
@ -0,0 +1,7 @@
|
||||
#include "device_info.hcs"
|
||||
#include "usb_pnp_device.hcs"
|
||||
#include "usb_cdcacm.hcs"
|
||||
|
||||
root {
|
||||
module = "default";
|
||||
}
|
7
a311d/hdf_config/uhdf/hdf_ecm.hcs
Executable file
7
a311d/hdf_config/uhdf/hdf_ecm.hcs
Executable file
@ -0,0 +1,7 @@
|
||||
#include "device_info.hcs"
|
||||
#include "usb_pnp_device.hcs"
|
||||
#include "usb_cdcecm.hcs"
|
||||
|
||||
root {
|
||||
module = "default";
|
||||
}
|
7
a311d/hdf_config/uhdf/hdf_ecm_acm.hcs
Executable file
7
a311d/hdf_config/uhdf/hdf_ecm_acm.hcs
Executable file
@ -0,0 +1,7 @@
|
||||
#include "device_info.hcs"
|
||||
#include "usb_pnp_device.hcs"
|
||||
#include "usb_ecm_acm.hcs"
|
||||
|
||||
root {
|
||||
module = "default";
|
||||
}
|
421
a311d/hdf_config/uhdf/usb_cdcacm.hcs
Executable file
421
a311d/hdf_config/uhdf/usb_cdcacm.hcs
Executable file
@ -0,0 +1,421 @@
|
||||
root {
|
||||
module = "master";
|
||||
master_config {
|
||||
match_attr = "usbfn_master_driver";
|
||||
use_hcs = 1;
|
||||
udc_name = "ff400000.usb";
|
||||
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_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 = 0x00;
|
||||
bInterfaceCount = 0x02;
|
||||
bFunctionClass = 0x02;
|
||||
bFunctionSubClass = 0x02;
|
||||
bFunctionProtocol = 0x01;
|
||||
iFunction = 0x03;
|
||||
}
|
||||
ControlInterface {
|
||||
bLength = 0x09;
|
||||
bDescriptorType = 0x04;
|
||||
bInterfaceNumber = 0x00;
|
||||
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, 0x00, 0x01];
|
||||
}
|
||||
FsNotify_endpoint {
|
||||
bLength = 0x07;
|
||||
bDescriptorType = 0x05;
|
||||
bEndpointAddress = 0x81;
|
||||
bmAttributes = 0x03;
|
||||
wMaxPacketSize = 10;
|
||||
bInterval = 32;
|
||||
}
|
||||
DataInterface {
|
||||
bLength = 0x09;
|
||||
bDescriptorType = 0x04;
|
||||
bInterfaceNumber = 0x01;
|
||||
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 = 0;
|
||||
propList = ["prop_1", "prop_2"];
|
||||
prop_1 {
|
||||
name = "testx";
|
||||
value = "xxxxxx";
|
||||
}
|
||||
prop_2 {
|
||||
name = "testy";
|
||||
value = "yyyyyy";
|
||||
}
|
||||
}
|
||||
propList_2 {
|
||||
configNum = 1;
|
||||
interfaceNum = 1;
|
||||
propList = ["prop_1", "prop_2"];
|
||||
prop_1 {
|
||||
name = "testm";
|
||||
value = "mmmmm";
|
||||
}
|
||||
prop_2 {
|
||||
name = "testn";
|
||||
value = "nnnnn";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
421
a311d/hdf_config/uhdf/usb_cdcecm.hcs
Executable file
421
a311d/hdf_config/uhdf/usb_cdcecm.hcs
Executable file
@ -0,0 +1,421 @@
|
||||
root {
|
||||
module = "master";
|
||||
master_config {
|
||||
match_attr = "usbfn_master_driver";
|
||||
use_hcs = 1;
|
||||
udc_name = "ff400000.usb";
|
||||
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_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 = 0x00;
|
||||
bInterfaceCount = 0x02;
|
||||
bFunctionClass = 0x02;
|
||||
bFunctionSubClass = 0x02;
|
||||
bFunctionProtocol = 0x01;
|
||||
iFunction = 0x03;
|
||||
}
|
||||
ControlInterface {
|
||||
bLength = 0x09;
|
||||
bDescriptorType = 0x04;
|
||||
bInterfaceNumber = 0x00;
|
||||
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, 0x00, 0x01];
|
||||
}
|
||||
FsNotify_endpoint {
|
||||
bLength = 0x07;
|
||||
bDescriptorType = 0x05;
|
||||
bEndpointAddress = 0x81;
|
||||
bmAttributes = 0x03;
|
||||
wMaxPacketSize = 10;
|
||||
bInterval = 32;
|
||||
}
|
||||
DataInterface {
|
||||
bLength = 0x09;
|
||||
bDescriptorType = 0x04;
|
||||
bInterfaceNumber = 0x01;
|
||||
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 = 0;
|
||||
propList = ["prop_1", "prop_2"];
|
||||
prop_1 {
|
||||
name = "testx";
|
||||
value = "xxxxxx";
|
||||
}
|
||||
prop_2 {
|
||||
name = "testy";
|
||||
value = "yyyyyy";
|
||||
}
|
||||
}
|
||||
propList_2 {
|
||||
configNum = 1;
|
||||
interfaceNum = 1;
|
||||
propList = ["prop_1", "prop_2"];
|
||||
prop_1 {
|
||||
name = "testm";
|
||||
value = "mmmmm";
|
||||
}
|
||||
prop_2 {
|
||||
name = "testn";
|
||||
value = "nnnnn";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
421
a311d/hdf_config/uhdf/usb_ecm_acm.hcs
Executable file
421
a311d/hdf_config/uhdf/usb_ecm_acm.hcs
Executable file
@ -0,0 +1,421 @@
|
||||
root {
|
||||
module = "master";
|
||||
master_config {
|
||||
match_attr = "usbfn_master_driver";
|
||||
use_hcs = 1;
|
||||
udc_name = "ff400000.usb";
|
||||
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";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
106
a311d/hdf_config/uhdf/usb_pnp_device.hcs
Executable file
106
a311d/hdf_config/uhdf/usb_pnp_device.hcs
Executable 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 = 0x0003;
|
||||
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 = 0x0303;
|
||||
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 = 0x0303;
|
||||
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 = 0x0303;
|
||||
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 = 0x0003;
|
||||
vendorId = 0x05E3;
|
||||
productId = 0x0749;
|
||||
bcdDeviceLow = 0x0000;
|
||||
bcdDeviceHigh = 0x0000;
|
||||
deviceClass = 0;
|
||||
deviceSubClass = 0;
|
||||
deviceProtocol = 0;
|
||||
interfaceClass = [0];
|
||||
interfaceSubClass = [0];
|
||||
interfaceProtocol = [0];
|
||||
interfaceNumber = [0];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
49
a311d/power_config/power_mode_config.xml
Executable file
49
a311d/power_config/power_mode_config.xml
Executable 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>
|
14
a311d/product.gni
Executable file
14
a311d/product.gni
Executable 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/unionman/${device_name}/device.gni")
|
26
a311d/resourceschedule/cgroup_sched/cgroup_action_config.json
Executable file
26
a311d/resourceschedule/cgroup_sched/cgroup_action_config.json
Executable file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"Cgroups": [
|
||||
{
|
||||
"controller": "cpu",
|
||||
"path": "/dev/cpuctl",
|
||||
"sched_policy": {
|
||||
"sp_default": "",
|
||||
"sp_background": "background",
|
||||
"sp_foreground": "foreground",
|
||||
"sp_system_background": "system-background",
|
||||
"sp_top_app": "top-app"
|
||||
}
|
||||
},
|
||||
{
|
||||
"controller": "cpuset",
|
||||
"path": "/dev/cpuset",
|
||||
"sched_policy": {
|
||||
"sp_default": "",
|
||||
"sp_background": "background",
|
||||
"sp_foreground": "foreground",
|
||||
"sp_system_background": "system-background",
|
||||
"sp_top_app": "top-app"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
17
a311d/resourceschedule/ressched/res_sched_config.xml
Executable file
17
a311d/resourceschedule/ressched/res_sched_config.xml
Executable file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2022 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.
|
||||
-->
|
||||
<ressched>
|
||||
</ressched>
|
20
a311d/resourceschedule/ressched/res_sched_plugin_switch.xml
Executable file
20
a311d/resourceschedule/ressched/res_sched_plugin_switch.xml
Executable file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2022 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.
|
||||
-->
|
||||
<pluginlist>
|
||||
<plugin libpath="libsocperf_plugin.z.so" switch="1" />
|
||||
<plugin libpath="libframe_aware_plugin.z.so" switch="1" />
|
||||
<plugin libpath="libdev_sched_plugin.z.so" switch="0" />
|
||||
</pluginlist>
|
45
a311d/resourceschedule/soc_perf/socperf_boost_config.xml
Executable file
45
a311d/resourceschedule/soc_perf/socperf_boost_config.xml
Executable file
@ -0,0 +1,45 @@
|
||||
<?xml version='1.0' encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2022 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.
|
||||
-->
|
||||
<Configs>
|
||||
<cmd id="10000" name="app_cold_start1">
|
||||
<duration>1500</duration>
|
||||
<lit_cpu_min_freq>1800000</lit_cpu_min_freq>
|
||||
</cmd>
|
||||
<cmd id="10002" name="app_warm_start1">
|
||||
<duration>400</duration>
|
||||
<lit_cpu_min_freq>1704000</lit_cpu_min_freq>
|
||||
</cmd>
|
||||
<cmd id="10004" name="window_switch1">
|
||||
<duration>400</duration>
|
||||
<lit_cpu_min_freq>1608000</lit_cpu_min_freq>
|
||||
</cmd>
|
||||
<cmd id="10006" name="click_normal">
|
||||
<duration>250</duration>
|
||||
<lit_cpu_min_freq>1608000</lit_cpu_min_freq>
|
||||
</cmd>
|
||||
<cmd id="10007" name="push_page">
|
||||
<duration>300</duration>
|
||||
<lit_cpu_min_freq>1608000</lit_cpu_min_freq>
|
||||
</cmd>
|
||||
<cmd id="10008" name="list_fling">
|
||||
<duration>5000</duration>
|
||||
<lit_cpu_min_freq>1608000</lit_cpu_min_freq>
|
||||
</cmd>
|
||||
<cmd id="10009" name="slide_normal">
|
||||
<duration>280</duration>
|
||||
<lit_cpu_min_freq>1608000</lit_cpu_min_freq>
|
||||
</cmd>
|
||||
</Configs>
|
17
a311d/resourceschedule/soc_perf/socperf_power_config.xml
Executable file
17
a311d/resourceschedule/soc_perf/socperf_power_config.xml
Executable file
@ -0,0 +1,17 @@
|
||||
<?xml version='1.0' encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2022 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.
|
||||
-->
|
||||
<Configs>
|
||||
</Configs>
|
29
a311d/resourceschedule/soc_perf/socperf_resource_config.xml
Executable file
29
a311d/resourceschedule/soc_perf/socperf_resource_config.xml
Executable file
@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2022 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.
|
||||
-->
|
||||
<Configs>
|
||||
<Resource>
|
||||
<res id="1000" name="lit_cpu_min_freq" pair="1001">
|
||||
<default>1000000</default>
|
||||
<path>/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq</path>
|
||||
<node>1000000 1200000 1398000 1512000 1608000 1704000 1800000</node>
|
||||
</res>
|
||||
<res id="1001" name="lit_cpu_max_freq" pair="1000" mode="1">
|
||||
<default>1800000</default>
|
||||
<path>/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq</path>
|
||||
<node>1000000 1200000 1398000 1512000 1608000 1704000 1800000</node>
|
||||
</res>
|
||||
</Resource>
|
||||
</Configs>
|
17
a311d/resourceschedule/soc_perf/socperf_thermal_config.xml
Executable file
17
a311d/resourceschedule/soc_perf/socperf_thermal_config.xml
Executable file
@ -0,0 +1,17 @@
|
||||
<?xml version='1.0' encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2022 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.
|
||||
-->
|
||||
<Configs>
|
||||
</Configs>
|
Loading…
Reference in New Issue
Block a user