From c7c79eaf769b0ea2e2cc470432d129b57686c746 Mon Sep 17 00:00:00 2001 From: yanghongliang Date: Wed, 15 Sep 2021 21:59:09 +0800 Subject: [PATCH] add vendor_rockchip source Signed-off-by: yanghongliang --- rk3568/hdf_config/khdf/Makefile | 64 +++ rk3568/hdf_config/khdf/audio/audio_config.hcs | 36 ++ rk3568/hdf_config/khdf/audio/codec_config.hcs | 19 + rk3568/hdf_config/khdf/audio/dai_config.hcs | 12 + rk3568/hdf_config/khdf/audio/dma_config.hcs | 12 + rk3568/hdf_config/khdf/audio/dsp_config.hcs | 19 + .../khdf/device_info/device_info.hcs | 474 ++++++++++++++++++ rk3568/hdf_config/khdf/hdf.hcs | 22 + rk3568/hdf_config/khdf/hdf_test/Makefile | 63 +++ .../khdf/hdf_test/emmc_test_config.hcs | 10 + .../khdf/hdf_test/gpio_test_config.hcs | 10 + rk3568/hdf_config/khdf/hdf_test/hdf.hcs | 14 + .../khdf/hdf_test/hdf_config_test.hcs | 52 ++ .../hdf_test/hdf_test_manager/device_info.hcs | 119 +++++ .../khdf/hdf_test/i2c_test_config.hcs | 13 + .../khdf/hdf_test/pwm_test_config.hcs | 11 + .../khdf/hdf_test/sdio_test_config.hcs | 12 + .../khdf/hdf_test/spi_test_config.hcs | 10 + .../khdf/hdf_test/uart_test_config.hcs | 9 + rk3568/hdf_config/khdf/input/input_config.hcs | 198 ++++++++ .../hdf_config/khdf/platform/emmc_config.hcs | 16 + .../khdf/platform/hi35xx_spi_config.hcs | 32 ++ .../khdf/platform/hi35xx_uart_config.hcs | 20 + .../khdf/platform/hi35xx_watchdog_config.hcs | 16 + .../hdf_config/khdf/platform/i2c_config.hcs | 36 ++ .../hdf_config/khdf/platform/pwm_config.hcs | 32 ++ .../hdf_config/khdf/platform/sdio_config.hcs | 15 + .../khdf/sensor/accel/bmi160_config.hcs | 50 ++ .../hdf_config/khdf/sensor/sensor_common.hcs | 30 ++ .../hdf_config/khdf/sensor/sensor_config.hcs | 1 + .../khdf/vibrator/linear_vibrator_config.hcs | 14 + .../khdf/vibrator/vibrator_config.hcs | 16 + .../hdf_config/khdf/wifi/wlan_chip_hi3881.hcs | 14 + rk3568/hdf_config/khdf/wifi/wlan_platform.hcs | 112 +++++ .../mpp/hispark_taurus/driver/mpp_config.hcs | 250 +++++++++ .../hdi_impl/camera_host_config.hcs | 179 +++++++ .../hdi_impl/stream_supported_config.hcs | 58 +++ .../hispark_taurus/pipeline_core/config.hcs | 402 +++++++++++++++ .../pipeline_core/ipp_algo_config.hcs | 11 + .../hispark_taurus/pipeline_core/params.hcs | 27 + .../rpi4b/hdi_impl/camera_host_config.hcs | 179 +++++++ .../hdi_impl/stream_supported_config.hcs | 58 +++ .../hal/v4l2/rpi4b/pipeline_core/config.hcs | 265 ++++++++++ .../rpi4b/pipeline_core/ipp_algo_config.hcs | 11 + .../hal/v4l2/rpi4b/pipeline_core/params.hcs | 31 ++ rk3568/hdf_config/uhdf/device_info.hcs | 132 +++++ rk3568/hdf_config/uhdf/hdf.hcs | 7 + rk3568/hdf_config/uhdf/hdf_ecm.hcs | 7 + rk3568/hdf_config/uhdf/hdf_ecm_acm.hcs | 7 + rk3568/hdf_config/uhdf/usb_cdcacm.hcs | 421 ++++++++++++++++ rk3568/hdf_config/uhdf/usb_cdcecm.hcs | 421 ++++++++++++++++ rk3568/hdf_config/uhdf/usb_ecm_acm.hcs | 421 ++++++++++++++++ rk3568/hdf_config/uhdf/usb_pnp_device.hcs | 106 ++++ 53 files changed, 4576 insertions(+) create mode 100755 rk3568/hdf_config/khdf/Makefile create mode 100755 rk3568/hdf_config/khdf/audio/audio_config.hcs create mode 100755 rk3568/hdf_config/khdf/audio/codec_config.hcs create mode 100755 rk3568/hdf_config/khdf/audio/dai_config.hcs create mode 100755 rk3568/hdf_config/khdf/audio/dma_config.hcs create mode 100755 rk3568/hdf_config/khdf/audio/dsp_config.hcs create mode 100755 rk3568/hdf_config/khdf/device_info/device_info.hcs create mode 100755 rk3568/hdf_config/khdf/hdf.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/Makefile create mode 100755 rk3568/hdf_config/khdf/hdf_test/emmc_test_config.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/gpio_test_config.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/hdf.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/hdf_config_test.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/hdf_test_manager/device_info.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/i2c_test_config.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/pwm_test_config.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/sdio_test_config.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/spi_test_config.hcs create mode 100755 rk3568/hdf_config/khdf/hdf_test/uart_test_config.hcs create mode 100755 rk3568/hdf_config/khdf/input/input_config.hcs create mode 100755 rk3568/hdf_config/khdf/platform/emmc_config.hcs create mode 100755 rk3568/hdf_config/khdf/platform/hi35xx_spi_config.hcs create mode 100755 rk3568/hdf_config/khdf/platform/hi35xx_uart_config.hcs create mode 100755 rk3568/hdf_config/khdf/platform/hi35xx_watchdog_config.hcs create mode 100755 rk3568/hdf_config/khdf/platform/i2c_config.hcs create mode 100755 rk3568/hdf_config/khdf/platform/pwm_config.hcs create mode 100755 rk3568/hdf_config/khdf/platform/sdio_config.hcs create mode 100755 rk3568/hdf_config/khdf/sensor/accel/bmi160_config.hcs create mode 100755 rk3568/hdf_config/khdf/sensor/sensor_common.hcs create mode 100755 rk3568/hdf_config/khdf/sensor/sensor_config.hcs create mode 100755 rk3568/hdf_config/khdf/vibrator/linear_vibrator_config.hcs create mode 100755 rk3568/hdf_config/khdf/vibrator/vibrator_config.hcs create mode 100755 rk3568/hdf_config/khdf/wifi/wlan_chip_hi3881.hcs create mode 100755 rk3568/hdf_config/khdf/wifi/wlan_platform.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/driver/mpp_config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/camera_host_config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/stream_supported_config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/ipp_algo_config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/params.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/camera_host_config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/stream_supported_config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/ipp_algo_config.hcs create mode 100755 rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/params.hcs create mode 100755 rk3568/hdf_config/uhdf/device_info.hcs create mode 100755 rk3568/hdf_config/uhdf/hdf.hcs create mode 100755 rk3568/hdf_config/uhdf/hdf_ecm.hcs create mode 100755 rk3568/hdf_config/uhdf/hdf_ecm_acm.hcs create mode 100755 rk3568/hdf_config/uhdf/usb_cdcacm.hcs create mode 100755 rk3568/hdf_config/uhdf/usb_cdcecm.hcs create mode 100755 rk3568/hdf_config/uhdf/usb_ecm_acm.hcs create mode 100755 rk3568/hdf_config/uhdf/usb_pnp_device.hcs diff --git a/rk3568/hdf_config/khdf/Makefile b/rk3568/hdf_config/khdf/Makefile new file mode 100755 index 00000000..0fb450d3 --- /dev/null +++ b/rk3568/hdf_config/khdf/Makefile @@ -0,0 +1,64 @@ +# +# 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 $(dir $(lastword $(MAKEFILE_LIST)))/../../../../../../) +$(info SOURCE_ROOT = $(SOURCE_ROOT)) + +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) diff --git a/rk3568/hdf_config/khdf/audio/audio_config.hcs b/rk3568/hdf_config/khdf/audio/audio_config.hcs new file mode 100755 index 00000000..0f0fad37 --- /dev/null +++ b/rk3568/hdf_config/khdf/audio/audio_config.hcs @@ -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"; + } + } +} diff --git a/rk3568/hdf_config/khdf/audio/codec_config.hcs b/rk3568/hdf_config/khdf/audio/codec_config.hcs new file mode 100755 index 00000000..919e55b0 --- /dev/null +++ b/rk3568/hdf_config/khdf/audio/codec_config.hcs @@ -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"; + } + } +} diff --git a/rk3568/hdf_config/khdf/audio/dai_config.hcs b/rk3568/hdf_config/khdf/audio/dai_config.hcs new file mode 100755 index 00000000..af6791cb --- /dev/null +++ b/rk3568/hdf_config/khdf/audio/dai_config.hcs @@ -0,0 +1,12 @@ +root { + platfrom { + template dai_controller { + match_attr = ""; + serviceName = ""; + } + controller_0x120c1020 :: dai_controller { + match_attr = "hdf_dai_driver"; + serviceName = "dai_service"; + } + } +} diff --git a/rk3568/hdf_config/khdf/audio/dma_config.hcs b/rk3568/hdf_config/khdf/audio/dma_config.hcs new file mode 100755 index 00000000..dc8a162b --- /dev/null +++ b/rk3568/hdf_config/khdf/audio/dma_config.hcs @@ -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"; + } + } +} diff --git a/rk3568/hdf_config/khdf/audio/dsp_config.hcs b/rk3568/hdf_config/khdf/audio/dsp_config.hcs new file mode 100755 index 00000000..c234c790 --- /dev/null +++ b/rk3568/hdf_config/khdf/audio/dsp_config.hcs @@ -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"; + } + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/device_info/device_info.hcs b/rk3568/hdf_config/khdf/device_info/device_info.hcs new file mode 100755 index 00000000..c8e63c7b --- /dev/null +++ b/rk3568/hdf_config/khdf/device_info/device_info.hcs @@ -0,0 +1,474 @@ + 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 = "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 = "hisilicon_hi35xx_watchdog_0"; + } + } + device_rtc :: device { + device0 :: deviceNode { + policy = 1; + priority = 30; + permission = 0644; + moduleName = "HDF_PLATFORM_RTC"; + serviceName = "HDF_PLATFORM_RTC"; + deviceMatchAttr = "hisilicon_hi35xx_rtc"; + } + } + + device_uart :: device { + device0 :: deviceNode { + policy = 1; + priority = 40; + permission = 0644; + moduleName = "HDF_PLATFORM_UART"; + serviceName = "HDF_PLATFORM_UART_0"; + deviceMatchAttr = "hisilicon_hi35xx_uart_0"; + } + device1 :: deviceNode { + policy = 2; + permission = 0644; + priority = 40; + moduleName = "HDF_PLATFORM_UART"; + serviceName = "HDF_PLATFORM_UART_1"; + deviceMatchAttr = "hisilicon_hi35xx_uart_1"; + } + } + device_i2c :: device { + device0 :: deviceNode { + policy = 2; + priority = 50; + permission = 0644; + moduleName = "HDF_PLATFORM_I2C_MANAGER"; + serviceName = "HDF_PLATFORM_I2C_MANAGER"; + deviceMatchAttr = "hdf_platform_i2c_manager"; + } + device1 :: deviceNode { + policy = 0; + priority = 55; + permission = 0644; + moduleName = "linux_i2c_adapter"; + deviceMatchAttr = "linux_i2c_adapter"; + } + } + device_spi :: device { + device0 :: deviceNode { + policy = 1; + priority = 60; + permission = 0644; + moduleName = "HDF_PLATFORM_SPI"; + serviceName = "HDF_PLATFORM_SPI_0"; + deviceMatchAttr = "hisilicon_hi35xx_spi_0"; + } + device1 :: deviceNode { + policy = 1; + priority = 60; + permission = 0644; + moduleName = "HDF_PLATFORM_SPI"; + serviceName = "HDF_PLATFORM_SPI_1"; + deviceMatchAttr = "hisilicon_hi35xx_spi_1"; + } + device2 :: deviceNode { + policy = 1; + priority = 60; + permission = 0644; + moduleName = "HDF_PLATFORM_SPI"; + serviceName = "HDF_PLATFORM_SPI_2"; + deviceMatchAttr = "hisilicon_hi35xx_spi_2"; + } + } + device_sdio :: device { + device0 :: deviceNode { + policy = 1; + priority = 70; + permission = 0644; + moduleName = "HDF_PLATFORM_SDIO"; + serviceName = "HDF_PLATFORM_MMC_2"; + deviceMatchAttr = "hisilicon_hi35xx_sdio_0"; + } + } + device_emmc :: device { + device0 :: deviceNode { + policy = 2; + priority = 20; + permission = 0644; + moduleName = "HDF_PLATFORM_EMMC"; + serviceName = "HDF_PLATFORM_MMC_0"; + deviceMatchAttr = "hisilicon_hi35xx_emmc_0"; + } + } + device_pwm :: device { + device0 :: deviceNode { + policy = 1; + priority = 80; + permission = 0644; + moduleName = "HDF_PLATFORM_PWM"; + serviceName = "HDF_PLATFORM_PWM_0"; + deviceMatchAttr = "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"; + } + device2 :: deviceNode { + policy = 1; + priority = 80; + permission = 0644; + moduleName = "HDF_PLATFORM_PWM"; + serviceName = "HDF_PLATFORM_PWM_2"; + deviceMatchAttr = "linux_pwm_adapter_2"; + } + device3 :: deviceNode { + policy = 1; + priority = 80; + permission = 0644; + moduleName = "HDF_PLATFORM_PWM"; + serviceName = "HDF_PLATFORM_PWM_3"; + deviceMatchAttr = "linux_pwm_adapter_3"; + } + } + 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 = 2; + moduleName = "LITE_LCDKIT"; + deviceMatchAttr = "hdf_lcdkit_driver"; + } + device1 :: deviceNode { + policy = 0; + priority = 100; + preload = 0; + moduleName = "LCD_ICN9700"; + } + device2 :: deviceNode { + policy = 0; + priority = 100; + preload = 2; + moduleName = "LCD_ST7789"; + } + device3 :: deviceNode { + policy = 0; + priority = 100; + preload = 0; + moduleName = "LCD_ILI9881CBOE"; + } + } + } + + 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 = 2; + permission = 0660; + moduleName = "HDF_TOUCH"; + serviceName = "hdf_input_event1"; + deviceMatchAttr = "touch_device1"; + } + } + + device_touch_chip :: device { + device0 :: deviceNode { + policy = 0; + priority = 130; + preload = 2; + permission = 0660; + moduleName = "HDF_TOUCH_GT911"; + serviceName = "hdf_touch_gt911_service"; + deviceMatchAttr = "zsj_gt911_5p5"; + } + } + device_hdf_hid :: device { + device0 :: deviceNode { + policy = 2; + priority = 200; + preload = 0; + permission = 0660; + moduleName = "HDF_HID"; + } + } + } + + network :: host { + hostName = "network_host"; + device_wifi :: device { + device0 :: deviceNode { + policy = 2; + priority = 100; + preload = 0; + permission = 0664; + moduleName = "HDF_WIFI"; + deviceMatchAttr = "hdf_wlan_driver"; + serviceName = "hdfwifi"; + } + } + device_wlan_chips :: device { + device0 :: deviceNode { + policy = 0; + preload = 2; + moduleName = "HDF_WLAN_CHIPS"; + deviceMatchAttr = "hdf_wlan_chips_hi3881"; + serviceName = "hisi"; + } + } + } + sensor :: host { + hostName = "sensor_host"; + device_sensor_manager :: device { + device0 :: deviceNode { + policy = 2; + priority = 100; + preload = 0; + permission = 0664; + moduleName = "HDF_SENSOR_MGR_AP"; + serviceName = "hdf_sensor_manager_ap"; + } + } + device_sensor_accel :: device { + device0 :: deviceNode { + policy = 1; + priority = 105; + preload = 2; + permission = 0664; + moduleName = "HDF_SENSOR_ACCEL"; + serviceName = "sensor_accel"; + deviceMatchAttr = "hdf_sensor_accel_driver"; + } + } + } + usb_pnp_linux :: host { + hostName = "usb_pnp_linux_host"; + device_usb_pnp_linux :: device { + device0 :: deviceNode { + policy = 2; + priority = 100; + preload = 0; + permission = 0664; + moduleName = "HDF_USB_PNP_NOTIFY"; + serviceName = "hdf_usb_pnp_notify_service"; + deviceMatchAttr = "hdf_usb_pnp_notify_config"; + } + } + } + audio :: host { + hostName = "audio_host"; + priority = 60; + device_dai0 :: device { + device0 :: deviceNode { + policy = 1; + priority = 50; + preload = 0; + permission = 0666; + moduleName = "DAI_HI3516"; + serviceName = "dai_service"; + deviceMatchAttr = "hdf_dai_driver"; + } + } + device_codec :: device { + device0 :: deviceNode { + policy = 1; + priority = 50; + preload = 0; + permission = 0666; + moduleName = "CODEC_HI3516"; + serviceName = "codec_service_0"; + deviceMatchAttr = "hdf_codec_driver"; + } + } + device_codec_ex :: device { + device0 :: deviceNode { + policy = 1; + priority = 50; + preload = 0; + permission = 0666; + moduleName = "CODEC_TFA9879"; + serviceName = "codec_service_1"; + deviceMatchAttr = "hdf_codec_driver_ex"; + } + } + device_dsp :: device { + device0 :: deviceNode { + policy = 1; + priority = 50; + preload = 0; + permission = 0666; + moduleName = "DSP"; + serviceName = "dsp_service_0"; + deviceMatchAttr = "hdf_dsp_driver"; + } + } + device_dma :: device { + device0 :: deviceNode { + policy = 1; + priority = 50; + preload = 0; + permission = 0666; + moduleName = "DMA_HI3516"; + serviceName = "dma_service_0"; + deviceMatchAttr = "hdf_dma_driver"; + } + } + device_audio :: device { + device0 :: deviceNode { + policy = 2; + priority = 60; + preload = 0; + permission = 0666; + moduleName = "HDF_AUDIO"; + deviceMatchAttr = "hdf_audio_driver_0"; + serviceName = "hdf_audio_codec_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"; + } + } + } + } +} diff --git a/rk3568/hdf_config/khdf/hdf.hcs b/rk3568/hdf_config/khdf/hdf.hcs new file mode 100755 index 00000000..d31b5a13 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf.hcs @@ -0,0 +1,22 @@ +#include "device_info/device_info.hcs" +#include "platform/pwm_config.hcs" +#include "platform/hi35xx_watchdog_config.hcs" +#include "platform/hi35xx_uart_config.hcs" +#include "platform/sdio_config.hcs" +#include "platform/emmc_config.hcs" +#include "platform/hi35xx_spi_config.hcs" +#include "input/input_config.hcs" +#include "wifi/wlan_platform.hcs" +#include "wifi/wlan_chip_hi3881.hcs" +#include "sensor/sensor_config.hcs" +#include "audio/audio_config.hcs" +#include "audio/codec_config.hcs" +#include "audio/dai_config.hcs" +#include "audio/dma_config.hcs" +#include "audio/dsp_config.hcs" +#include "vibrator/vibrator_config.hcs" +#include "vibrator/linear_vibrator_config.hcs" + +root { + module = "hisilicon,hi35xx_chip"; +} diff --git a/rk3568/hdf_config/khdf/hdf_test/Makefile b/rk3568/hdf_config/khdf/hdf_test/Makefile new file mode 100755 index 00000000..f986bdb2 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/Makefile @@ -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) diff --git a/rk3568/hdf_config/khdf/hdf_test/emmc_test_config.hcs b/rk3568/hdf_config/khdf/hdf_test/emmc_test_config.hcs new file mode 100755 index 00000000..fe1d8765 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/emmc_test_config.hcs @@ -0,0 +1,10 @@ +root { + module = "emmc"; + emmc_config { + emmc_controller_tester { + match_attr = "EMMC_TEST"; + busNum = 0; + hostId = 0; + } + } +} diff --git a/rk3568/hdf_config/khdf/hdf_test/gpio_test_config.hcs b/rk3568/hdf_config/khdf/hdf_test/gpio_test_config.hcs new file mode 100755 index 00000000..093f52a9 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/gpio_test_config.hcs @@ -0,0 +1,10 @@ +root { + module = "gpio"; + gpio_config { + gpio_controller_tester { + match_attr = "GPIO_TEST"; + gpio = 83; + gpioIrq = 83; + } + } +} diff --git a/rk3568/hdf_config/khdf/hdf_test/hdf.hcs b/rk3568/hdf_config/khdf/hdf_test/hdf.hcs new file mode 100755 index 00000000..c253b38b --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/hdf.hcs @@ -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"; +} diff --git a/rk3568/hdf_config/khdf/hdf_test/hdf_config_test.hcs b/rk3568/hdf_config/khdf/hdf_test/hdf_config_test.hcs new file mode 100755 index 00000000..ddc7b096 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/hdf_config_test.hcs @@ -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; +} diff --git a/rk3568/hdf_config/khdf/hdf_test/hdf_test_manager/device_info.hcs b/rk3568/hdf_config/khdf/hdf_test/hdf_test_manager/device_info.hcs new file mode 100755 index 00000000..7b723fb6 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/hdf_test_manager/device_info.hcs @@ -0,0 +1,119 @@ +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"; + } + } + 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"; + } + } + } + } +} + diff --git a/rk3568/hdf_config/khdf/hdf_test/i2c_test_config.hcs b/rk3568/hdf_config/khdf/hdf_test/i2c_test_config.hcs new file mode 100755 index 00000000..596e2369 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/i2c_test_config.hcs @@ -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; + } + } +} diff --git a/rk3568/hdf_config/khdf/hdf_test/pwm_test_config.hcs b/rk3568/hdf_config/khdf/hdf_test/pwm_test_config.hcs new file mode 100755 index 00000000..d29d8cee --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/pwm_test_config.hcs @@ -0,0 +1,11 @@ +root { + pwm_test { + module = "pwm_test"; + match_attr = "PWM_TEST"; + num = 0; + period = 999; + duty = 333; + polarity = 0; + status = 1; + } +} diff --git a/rk3568/hdf_config/khdf/hdf_test/sdio_test_config.hcs b/rk3568/hdf_config/khdf/hdf_test/sdio_test_config.hcs new file mode 100755 index 00000000..9f1835a7 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/sdio_test_config.hcs @@ -0,0 +1,12 @@ +root { + module = "sdio"; + sdio_config { + sdio_controller_tester { + match_attr = "SDIO_TEST"; + busNum = 2; + funcNum = 1; + vendorId = 0x296; + deviceId = 0x5347; + } + } +} diff --git a/rk3568/hdf_config/khdf/hdf_test/spi_test_config.hcs b/rk3568/hdf_config/khdf/hdf_test/spi_test_config.hcs new file mode 100755 index 00000000..028707ed --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/spi_test_config.hcs @@ -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]; + } +} diff --git a/rk3568/hdf_config/khdf/hdf_test/uart_test_config.hcs b/rk3568/hdf_config/khdf/hdf_test/uart_test_config.hcs new file mode 100755 index 00000000..54ae69c7 --- /dev/null +++ b/rk3568/hdf_config/khdf/hdf_test/uart_test_config.hcs @@ -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]; + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/input/input_config.hcs b/rk3568/hdf_config/khdf/input/input_config.hcs new file mode 100755 index 00000000..55205423 --- /dev/null +++ b/rk3568/hdf_config/khdf/input/input_config.hcs @@ -0,0 +1,198 @@ +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 = 720; + solutionY = 1280; + devName = "main_touch"; + } + +// Hi3516DV300-Runhe gt911--5p5 & 4p0 + busConfig { + // 0:i2c 1:spi + busType = 0; + busNum = 1; + clkGpio = 86; + dataGpio = 87; + i2cClkIomux = [0x114f0048, 0x403]; + i2cDataIomux = [0x114f004c, 0x403]; + } + + pinConfig { + rstGpio = 14; + intGpio = 13; + rstRegCfg = [0x112f0094, 0x400]; + intRegCfg = [0x112f0098, 0x400]; + } + +// Hi3516DV300-Ruishi gt911--7p0 +/* + busConfig { + // 0:i2c 1:spi + busType = 0; + busNum = 6; + clkGpio = 26; + dataGpio = 27; + i2cClkIomux = [0x114f0048, 0x403]; + i2cDataIomux = [0x114f004c, 0x403]; + } + + pinConfig { + rstGpio = 13; + intGpio = 12; + rstRegCfg = [0x10ff0030, 0x400]; + intRegCfg = [0x10ff002C, 0x400]; + } +*/ +// Hi3516DV300-Demo board: ft6336--2p35 +/* + busConfig { + // 0:i2c 1:spi + busType = 0; + busNum = 3; + clkGpio = 2; + dataGpio = 1; + i2cClkIomux = [0x112f0090, 0x5f1]; + i2cDataIomux = [0x112f008c, 0x5f1]; + } + + pinConfig { + rstGpio = 3; + intGpio = 4; + rstRegCfg = [0x0, 0x0]; + intRegCfg = [0x112f0098, 0x5f0]; + } +*/ + powerConfig { + /* 0:unused 1:ldo 2:gpio 3:pmic */ + vccType = 2; + vccNum = 20; // gpio20 + vccValue = 1800; + vciType = 1; + vciNum = 12; // ldo12 + vciValue = 3300; + } + + featureConfig { + capacitanceTest = 0; + gestureMode = 0; + gloverMOde = 0; + coverMode = 0; + chargerMode = 0; + knuckleMode = 0; + } + } + + chipConfig { + template touchChip { + match_attr = ""; + chipName = "gt911"; + vendorName = "zsj"; + chipInfo = "AAAA11222"; // 4-ProjectName, 2-TP IC, 3-TP Module + /* 0:i2c 1:spi*/ + busType = 0; + deviceAddr = 0x14; + /* 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] + 0:none 1:vcc-1.8v 2:vci-3.3v 3:reset 4:int + 0:off or low 1:on or high 2:no ops + 0:input 1:output 2:no ops + meanings delay xms, 20: delay 20ms + */ + powerOnSeq = [4, 0, 1, 0, + 3, 0, 1, 10, + 3, 1, 2, 60, + 4, 2, 0, 0]; + suspendSeq = [3, 0, 2, 10]; + resumeSeq = [3, 1, 2, 10]; + powerOffSeq = [3, 0, 2, 10, + 1, 0, 2, 20]; + } + } + + chip0 :: touchChip { + match_attr = "zsj_gt911_5p5"; + chipInfo = "ZIDN45100"; // 4-ProjectName, 2-TP IC, 3-TP Module + chipVersion = 0; //parse point by TypeA + } + + chip1 :: touchChip { + match_attr = "zsj_gt911_4p0"; + chipInfo = "ZIDN45101"; + chipVersion = 1; //parse point by TypeB + } + + chip2 :: touchChip { + match_attr = "tg_gt911_7p0"; + vendorName = "tg"; + chipInfo = "ZIDN45102"; + chipVersion = 2; //parse point by TypeC + } + + chip3 :: touchChip { + match_attr = "st_ft6336_2p35"; + chipName = "ft6336"; + vendorName = "st"; + chipInfo = "ZIDN53200"; + deviceAddr = 0x38; + irqFlag = 1; // Rising + powerSequence { + /* [type, status, dir , delay] + 0:none 1:vcc-1.8v 2:vci-3.3v 3:reset 4:int + 0:off or low 1:on or high 2:no ops + 0:input 1:output 2:no ops + meanings delay xms, 20: delay 20ms + */ + powerOnSeq = [4, 2, 0, 0, + 3, 1, 1, 2, + 3, 0, 2, 5, + 3, 1, 2, 200]; + suspendSeq = [3, 0, 2, 10]; + resumeSeq = [3, 1, 2, 10]; + powerOffSeq = [3, 0, 2, 10, + 1, 0, 2, 20]; + } + } + } + } + } + + keyConfig { + keyList = ["power", "VolUp", "VolDown", "Up", "Down", "Left", "Right"]; + keyInfoList { + key1 { + match_attr = "key_device0"; + /* 0:touch 1:key 2:keyboard 3:mouse 4:button 5:crown 6:encoder */ + inputType = 1; + keyName = "power"; + gpioNum = 1; + irqFlag = 3; + debounceTime = 80; + } + + key2 { + keyName = "volUp"; + gpioNum = 31; + irqFlag = 1; + debounceTime = 80; + } + + key3 { + keyName = "volDown"; + gpioNum = 32; + irqFlag = 1; + debounceTime = 80; + } + } + } + } +} diff --git a/rk3568/hdf_config/khdf/platform/emmc_config.hcs b/rk3568/hdf_config/khdf/platform/emmc_config.hcs new file mode 100755 index 00000000..3351c0c4 --- /dev/null +++ b/rk3568/hdf_config/khdf/platform/emmc_config.hcs @@ -0,0 +1,16 @@ +root { + platform { + emmc_config { + template emmc_controller { + match_attr = ""; + hostId = 0; + devType = 0; + } + + controller_0x00 :: emmc_controller { + match_attr = "hisilicon_hi35xx_emmc_0"; + } + } + } +} + diff --git a/rk3568/hdf_config/khdf/platform/hi35xx_spi_config.hcs b/rk3568/hdf_config/khdf/platform/hi35xx_spi_config.hcs new file mode 100755 index 00000000..edb459c7 --- /dev/null +++ b/rk3568/hdf_config/khdf/platform/hi35xx_spi_config.hcs @@ -0,0 +1,32 @@ +root { + platform { + spi_config { + template spi_controller { + serviceName = ""; + match_attr = ""; + busNum = 0; + numCs = 0; + } + + controller_0x120c0000 :: spi_controller { + busNum = 0; + numCs = 1; + match_attr = "hisilicon_hi35xx_spi_0"; + } + + controller_0x120c1000 :: spi_controller { + match_attr = "hisilicon_hi35xx_spi_1"; + busNum = 1; + numCs = 2; + } + + controller_0x120c2000 :: spi_controller { + match_attr = "hisilicon_hi35xx_spi_2"; + busNum = 2; + numCs = 1; + } + } + } +} + + diff --git a/rk3568/hdf_config/khdf/platform/hi35xx_uart_config.hcs b/rk3568/hdf_config/khdf/platform/hi35xx_uart_config.hcs new file mode 100755 index 00000000..1a3f8e8a --- /dev/null +++ b/rk3568/hdf_config/khdf/platform/hi35xx_uart_config.hcs @@ -0,0 +1,20 @@ +root { + platform { + uart_config { + template uart_device { + serviceName = ""; + match_attr = ""; + driver_name = "ttyAMA"; + num = 0; + } + + device_uart_0x0000 :: uart_device { + match_attr = "hisilicon_hi35xx_uart_0"; + } + device_uart_0x0001 :: uart_device { + num = 1; + match_attr = "hisilicon_hi35xx_uart_1"; + } + } + } +} diff --git a/rk3568/hdf_config/khdf/platform/hi35xx_watchdog_config.hcs b/rk3568/hdf_config/khdf/platform/hi35xx_watchdog_config.hcs new file mode 100755 index 00000000..91eaf822 --- /dev/null +++ b/rk3568/hdf_config/khdf/platform/hi35xx_watchdog_config.hcs @@ -0,0 +1,16 @@ +root { + platform { + watchdog_config { + template watchdog_device { + serviceName = "HDF_PLATFORM_WATCHDOG_0"; + match_attr = ""; + id = 0; + } + + device_0x12050000 :: watchdog_device { + id = 0; + match_attr = "hisilicon_hi35xx_watchdog_0"; + } + } + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/platform/i2c_config.hcs b/rk3568/hdf_config/khdf/platform/i2c_config.hcs new file mode 100755 index 00000000..7bc3d003 --- /dev/null +++ b/rk3568/hdf_config/khdf/platform/i2c_config.hcs @@ -0,0 +1,36 @@ +root { + platform { + i2c_config { + match_attr = "linux_i2c_adapter"; + + template i2c_controller { + bus = 0; + } + + controller_0x120b0000 :: i2c_controller { + bus = 0; + } + controller_0x120b1000 :: i2c_controller { + bus = 1; + } + controller_0x120b2000 :: i2c_controller { + bus = 2; + } + controller_0x120b3000 :: i2c_controller { + bus = 3; + } + controller_0x120b4000 :: i2c_controller { + bus = 4; + } + controller_0x120b5000 :: i2c_controller { + bus = 5; + } + controller_0x120b6000 :: i2c_controller { + bus = 6; + } + controller_0x120b7000 :: i2c_controller { + bus = 7; + } + } + } +} diff --git a/rk3568/hdf_config/khdf/platform/pwm_config.hcs b/rk3568/hdf_config/khdf/platform/pwm_config.hcs new file mode 100755 index 00000000..489c6c35 --- /dev/null +++ b/rk3568/hdf_config/khdf/platform/pwm_config.hcs @@ -0,0 +1,32 @@ +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"; + } + + device_pwm_0x00000002 :: pwm_device { + num = 2; + match_attr = "linux_pwm_adapter_2"; + } + + device_pwm_0x00000003 :: pwm_device { + num = 3; + match_attr = "linux_pwm_adapter_3"; + } + } + } +} + diff --git a/rk3568/hdf_config/khdf/platform/sdio_config.hcs b/rk3568/hdf_config/khdf/platform/sdio_config.hcs new file mode 100755 index 00000000..5e1018fb --- /dev/null +++ b/rk3568/hdf_config/khdf/platform/sdio_config.hcs @@ -0,0 +1,15 @@ +root { + platform { + sdio_config { + template sdio_controller { + match_attr = ""; + hostId = 2; + devType = 2; + } + controller_0x2dd1 :: sdio_controller { + match_attr = "hisilicon_hi35xx_sdio_0"; + } + } + } +} + diff --git a/rk3568/hdf_config/khdf/sensor/accel/bmi160_config.hcs b/rk3568/hdf_config/khdf/sensor/accel/bmi160_config.hcs new file mode 100755 index 00000000..2f65f409 --- /dev/null +++ b/rk3568/hdf_config/khdf/sensor/accel/bmi160_config.hcs @@ -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 + ]; + } + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/sensor/sensor_common.hcs b/rk3568/hdf_config/khdf/sensor/sensor_common.hcs new file mode 100755 index 00000000..e6ed1f92 --- /dev/null +++ b/rk3568/hdf_config/khdf/sensor/sensor_common.hcs @@ -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; + } + } +} diff --git a/rk3568/hdf_config/khdf/sensor/sensor_config.hcs b/rk3568/hdf_config/khdf/sensor/sensor_config.hcs new file mode 100755 index 00000000..fa1bbc01 --- /dev/null +++ b/rk3568/hdf_config/khdf/sensor/sensor_config.hcs @@ -0,0 +1 @@ +#include "accel/bmi160_config.hcs" \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/vibrator/linear_vibrator_config.hcs b/rk3568/hdf_config/khdf/vibrator/linear_vibrator_config.hcs new file mode 100755 index 00000000..5871521a --- /dev/null +++ b/rk3568/hdf_config/khdf/vibrator/linear_vibrator_config.hcs @@ -0,0 +1,14 @@ +root { + linearVibratorConfig { + boardConfig { + match_attr = "hdf_linear_vibrator_driver"; + vibratorChipConfig { + busType = 1; // 0:i2c 1:gpio + gpioNum = 31; + startReg = 0; + stopReg = 0; + startMask = 0; + } + } + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/vibrator/vibrator_config.hcs b/rk3568/hdf_config/khdf/vibrator/vibrator_config.hcs new file mode 100755 index 00000000..c800c1b5 --- /dev/null +++ b/rk3568/hdf_config/khdf/vibrator/vibrator_config.hcs @@ -0,0 +1,16 @@ +root { + vibratorConfig { + boardConfig { + match_attr = "hdf_vibrator_driver"; + vibratorAttr { + /* 0:rotor 1:linear */ + deviceType = 1; + supportPreset = 1; + } + vibratorHapticConfig { + vibrator_haptic_default_time = [1, 0, 600, 800, 600, 1100, 0]; // time seq + vibrator_haptic_default_effect = [0, 0, 3, 800, 1]; // build-in effect + } + } + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/wifi/wlan_chip_hi3881.hcs b/rk3568/hdf_config/khdf/wifi/wlan_chip_hi3881.hcs new file mode 100755 index 00000000..2454e79e --- /dev/null +++ b/rk3568/hdf_config/khdf/wifi/wlan_chip_hi3881.hcs @@ -0,0 +1,14 @@ +root { + wlan_config { + hi3881 :& chipList { + chipHi3881 :: chipInst { + match_attr = "hdf_wlan_chips_hi3881"; + driverName = "hisi"; + sdio { + vendorId = 0x0296; + deviceId = [0x5347]; + } + } + } + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/khdf/wifi/wlan_platform.hcs b/rk3568/hdf_config/khdf/wifi/wlan_platform.hcs new file mode 100755 index 00000000..b71c14a8 --- /dev/null +++ b/rk3568/hdf_config/khdf/wifi/wlan_platform.hcs @@ -0,0 +1,112 @@ +root { + module = "wlan"; + wlan_config { + match_attr = "hdf_wlan_driver"; + hostChipName = "hi3516dv300"; + moduleConfig { + featureMap = 0xFFFF; + msgName = "WalService"; + Station { + name = "sta"; + mode = true; + } + + HostAp { + name = "ap"; + mode = 0; /* 0-- notsupported; 1--softap-host; 2--soft AP DMAC HOST; 3-IOT 1:DMAC OFFLOAD: IPC */ + vapResNum = 1; /*virtual ap*/ + userResNum = 8; /*max users support each ap*/ + } + + P2P { + name = "p2p"; + mode = false; + } + + Mac80211 { + mode = true; + } + + Phy { + mode = true; + } + } + deviceList { + template deviceInst { + deviceInstId = 0; + powers { + power0 { + powerSeqDelay = 0; + powerType = 1; /* AlwaysON(0);GPIO(1) */ + gpioId = 1; + activeLevel=1; /* High(1); Low(0) */ + } + power1 { + /* to support two-stage power supply */ + powerSeqDelay = 0; + powerType = 0; + gpioId = 1; + activeLevel=1; /* High(1); Low(0) */ + } + } + reset { + resetType = 1; /* NotManaged(0);GPIO(1) */ + gpioId = 2; + activeLevel = 1; /* High(1); Low(0) */ + resetHoldTime = 30; /*In ms*/ + } + bootUpTimeOut = 30; + bus { + busType = 0; /* 0-sdio 1-usb 2-spi etc. */ + busIdx = 2; + funcNum = [1,2]; + timeout = 1000; + blockSize = 512; + } + } + } + hisi :& deviceList { + device0 :: deviceInst { + deviceInstId = 0; + powers { + power0 { + powerSeqDelay = 0; + powerType = 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_hi3881"; + driverName = "hi3881"; + sdio { + vendorId = 0x0296; + deviceId = [0x5347]; + } + } + } + } +} \ No newline at end of file diff --git a/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/driver/mpp_config.hcs b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/driver/mpp_config.hcs new file mode 100755 index 00000000..67262348 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/driver/mpp_config.hcs @@ -0,0 +1,250 @@ +root { + module="sample"; + mpp_config { + vbConfig { + maxPoolCnt = 5; + pool0 { + image_width = 2592; + image_height = 1944; + pix_format = 19; + data_bitwidth = 0; + compress_mode = 0; + default_align = 8; + blk_count = 7; + } + pool1 { + image_width = 2592; + image_height = 1944; + pix_format = 26; + data_bitwidth = 0; + compress_mode = 0; + default_align = 8; + blk_count = 7; + } + pool2 { + image_width = 1280; + image_height = 720; + pix_format = 26; + data_bitwidth = 0; + compress_mode = 0; + default_align = 8; + blk_count = 12; + } + } + vcapDev { + sensocnt = 1; + sensor_type0 = 12; + sensor_mode = 0; + sensor_width = 2592; + sensor_height = 1944; + bas_width = 2592; + bas_height = 1944; + wdr_mode = 0; + data_type = 2; + componentmask0 = 4293918720; + componentmask1 = 0; + } + vcapMipi { + enable = 1; + combo_dev_t = 0; + input_mode_t = 0; + mipi_data_rate_t = 0; + img_rect_x = 0; + img_rect_y = 0; + img_rect_w = 2592; + img_rect_h = 1944; + data_type_t = 1; + mipi_wdr_mode_t = 0; + lane_id_num = 4; + lane_id_0 = 0; + lane_id_1 = 1; + lane_id_2 = 2; + lane_id_3 = 3; + } + vcapIspPub { + enable = 1; + stWndRect_x = 0; + stWndRect_y = 0; + stWndRect_w = 2592; + stWndRect_h = 1944; + outImageSize_x = 2592; + outImageSize_y = 1944; + frameRate = 30; + enBayer = 0; + wdrMode = 0; + snsMode = 0; + } + vcapPipe { + pipecnt = 2; + pipe0 { + chncnt = 1; + vivpssmode = 0; + enPipeBypassMode = 0; + bYuvSkip = 0; + bIspBypass = 0; + u32MaxW = 2592; + u32MaxH = 1944; + enPixFmt = 19; + enCompressMode = 0; + enBitWidth = 2; + bNrEn = 1; + enNrRefSource = 0; + bSharpenEn = 1; + src_framerate = 30; + dst_framerate = 30; + bDiscardProPic = 0; + chl0 { + out_width = 2592; + out_height = 1944; + enPixelFormat = 26; + enDynamicRange = 0; + enVideoFormat = 0; + enCompressMode = 0; + bMirror = 0; + bFlip = 0; + u32Depth = 0; + src_framerate = 30; + dst_framerate = 30; + } + } + pipe1 { + chncnt = 1; + vivpssmode = 0; + enPipeBypassMode = 0; + bYuvSkip = 0; + bIspBypass = 0; + u32MaxW = 2592; + u32MaxH = 1944; + enPixFmt = 19; + enCompressMode = 0; + enBitWidth = 2; + bNrEn = 1; + enNrRefSource = 0; + bSharpenEn = 1; + src_framerate = 30; + dst_framerate = 30; + bDiscardProPic = 0; + chl0 { + out_width = 2592; + out_height = 1944; + enPixelFormat = 26; + enDynamicRange = 0; + enVideoFormat = 0; + enCompressMode = 0; + bMirror = 0; + bFlip = 0; + u32Depth = 0; + src_framerate = 30; + dst_framerate = 30; + } + } + } + vpss0 { + vportcnt = 3; + max_width = 2592; + max_height = 1944; + src_framerate = 30; + dst_framerate = 30; + pix_format = 26; + vport0 { + enable = 1; + res_width = 2592; + res_height = 1944; + src_framerate = 30; + dst_framerate = 30; + video_format = 0; + pix_format = 26; + compressMode = 0; + depth = 0; + mirror = 0; + flip = 0; + } + vport1 { + enable = 1; + res_width = 1280; + res_height = 720; + src_framerate = 30; + dst_framerate = 30; + video_format = 0; + pix_format = 26; + compressMode = 0; + depth = 0; + mirror = 0; + flip = 0; + } + vport2 { + enable = 1; + res_width = 640; + res_height = 480; + src_framerate = 30; + dst_framerate = 30; + video_format = 0; + pix_format = 26; + compressMode = 0; + depth = 0; + mirror = 0; + flip = 0; + } + extvport0 { + enable = 0; + res_width = 160; + res_height = 120; + src_framerate = 30; + dst_framerate = 30; + video_format = 0; + pix_format = 26; + compressMode = 0; + depth = 0; + mirror = 0; + flip = 0; + } + } + venc { + venccnt = 4; + venc0 { + res_width = 1920; + res_height = 1080; + bufsize = 1258290; + gop = 30; + src_framerate = 30; + dst_framerate = 30; + h265bitrate = 10240; + h264bitrate = 12288; + stat_time = 2; + } + venc1 { + res_width = 640; + res_height = 360; + bufsize = 230400; + gop = 30; + src_framerate = 30; + dst_framerate = 30; + h265bitrate = 2048; + h264bitrate = 2048; + stat_time = 2; + } + venc2 { + res_width = 1920; + res_height = 1080; + bufsize = 1258290; + gop = 0; + src_framerate = 30; + dst_framerate = 30; + h265bitrate = 0; + h264bitrate = 0; + stat_time = 2; + } + venc3 { + res_width = 320; + res_height = 180; + bufsize = 57600; + gop = 0; + src_framerate = 30; + dst_framerate = 30; + h265bitrate = 0; + h264bitrate = 0; + stat_time = 2; + } + } + } +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/camera_host_config.hcs b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/camera_host_config.hcs new file mode 100755 index 00000000..4328b1c8 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/camera_host_config.hcs @@ -0,0 +1,179 @@ +root { + module="sample"; + camera_host_config { + match_attr = "camera_host_interface"; + template ability { + logicCameraId = "lcam001"; + physicsCameraIds = [ + "CAMERA_FIRST", + "CAMERA_SECOND" + ]; + metadata { + aeAvailableAntiBandingModes = [ + "OHOS_CONTROL_AE_ANTIBANDING_MODE_OFF", + "OHOS_CONTROL_AE_ANTIBANDING_MODE_50HZ", + "OHOS_CONTROL_AE_ANTIBANDING_MODE_60HZ", + "OHOS_CONTROL_AE_ANTIBANDING_MODE_AUTO" + ]; + aeAvailableModes = ["OHOS_CONTROL_AE_MODE_ON"]; + availableAeFpsTargets = [15, 30]; + aeCompensationRange = [0, 0]; + aeCompensationSteps = [0, 1]; + availableAwbModes = [ + "OHOS_CONTROL_AWB_MODE_OFF" + ]; + sceneModesOverrides = [ + "OHOS_CONTROL_AE_MODE_ON", + "OHOS_CONTROL_AWB_MODE_AUTO" + ]; + aeLockAvailable = "OHOS_CONTROL_AE_LOCK_AVAILABLE_FALSE"; + awbLockAvailable = "OHOS_CONTROL_AWB_LOCK_AVAILABLE_FALSE"; + sensitivityRange = [32, 2400]; + exposureTimeRange = [100000, 200000000]; + faceDetectMode = "OHOS_STATISTICS_FACE_DETECT_MODE_OFF"; + maxFaceCount = 0; + flashAvailable = "OHOS_FLASH_INFO_AVAILABLE_FALSE"; + lensFacing = "OHOS_LENS_FACING_FRONT"; + opticalStabilizations = ["OHOS_LENS_OPTICAL_STABILIZATION_MODE_OFF"]; + maxDigitalZoom = "1"; + availableCharacteristicsKeys = [ + "OHOS_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES", + "OHOS_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES", + "OHOS_CONTROL_AE_AVAILABLE_MODES", + "OHOS_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES", + "OHOS_CONTROL_AE_COMPENSATION_RANGE", + "OHOS_CONTROL_AE_COMPENSATION_STEP", + "OHOS_CONTROL_AVAILABLE_EFFECTS", + "OHOS_CONTROL_AVAILABLE_SCENE_MODES", + "OHOS_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES", + "OHOS_CONTROL_AWB_AVAILABLE_MODES", + "OHOS_CONTROL_MAX_REGIONS", + "OHOS_CONTROL_SCENE_MODE_OVERRIDES", + "OHOS_CONTROL_AE_LOCK_AVAILABLE", + "OHOS_CONTROL_AWB_LOCK_AVAILABLE", + "OHOS_CONTROL_AVAILABLE_MODES", + "OHOS_JPEG_AVAILABLE_THUMBNAIL_SIZES", + "OHOS_JPEG_MAX_SIZE", + "OHOS_SENSOR_INFO_PIXEL_ARRAY_SIZE", + "OHOS_SENSOR_INFO_ACTIVE_ARRAY_SIZE", + "OHOS_SENSOR_INFO_SENSITIVITY_RANGE", + "OHOS_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT", + "OHOS_SENSOR_INFO_EXPOSURE_TIME_RANGE", + "OHOS_SENSOR_ORIENTATION", + "OHOS_SENSOR_AVAILABLE_TEST_PATTERN_MODES", + "OHOS_SENSOR_INFO_PHYSICAL_SIZE", + "OHOS_SENSOR_INFO_TIMESTAMP_SOURCE", + "OHOS_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES", + "OHOS_STATISTICS_INFO_MAX_FACE_COUNT", + "OHOS_SYNC_MAX_LATENCY", + "OHOS_FLASH_INFO_AVAILABLE", + "OHOS_LENS_INFO_AVAILABLE_APERTURES", + "OHOS_LENS_FACING", + "OHOS_LENS_INFO_AVAILABLE_FOCAL_LENGTHS", + "OHOS_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION", + "OHOS_LENS_INFO_HYPERFOCAL_DISTANCE", + "OHOS_LENS_INFO_MINIMUM_FOCUS_DISTANCE", + "OHOS_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES", + "OHOS_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM", + "OHOS_SCALER_AVAILABLE_STREAM_CONFIGURATIONS", + "OHOS_SCALER_AVAILABLE_STALL_DURATIONS", + "OHOS_SCALER_AVAILABLE_MIN_FRAME_DURATIONS", + "OHOS_SCALER_CROPPING_TYPE", + "OHOS_INFO_SUPPORTED_HARDWARE_LEVEL", + "OHOS_REQUEST_PARTIAL_RESULT_COUNT", + "OHOS_REQUEST_PIPELINE_MAX_DEPTH", + "OHOS_REQUEST_MAX_NUM_OUTPUT_STREAMS", + "OHOS_REQUEST_MAX_NUM_INPUT_STREAMS", + "OHOS_REQUEST_AVAILABLE_CAPABILITIES" + ]; + availableRequestKeys = [ + "OHOS_CONTROL_AE_MODE", + "OHOS_CONTROL_AE_EXPOSURE_COMPENSATION", + "OHOS_CONTROL_AE_PRECAPTURE_TRIGGER", + "OHOS_CONTROL_AE_TARGET_FPS_RANGE", + "OHOS_CONTROL_AE_ANTIBANDING_MODE", + "OHOS_CONTROL_AWB_MODE", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_FLASH_MODE", + "OHOS_STATISTICS_FACE_DETECT_MODE", + "OHOS_NOISE_REDUCTION_MODE", + "OHOS_COLOR_CORRECTION_ABERRATION_MODE", + "OHOS_LENS_APERTURE", + "OHOS_LENS_OPTICAL_STABILIZATION_MODE", + "OHOS_CONTROL_MODE", + "OHOS_CONTROL_CAPTURE_INTENT" + ]; + availableResultKeys = [ + "OHOS_CONTROL_AE_STATE", + "OHOS_CONTROL_AE_LOCK", + "OHOS_CONTROL_AWB_STATE", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_LENS_STATE", + "OHOS_REQUEST_PIPELINE_DEPTH", + "OHOS_SCALER_CROP_REGION", + "OHOS_SENSOR_TIMESTAMP", + "OHOS_SENSOR_ROLLING_SHUTTER_SKEW", + "OHOS_SENSOR_EXPOSURE_TIME", + "OHOS_STATISTICS_LENS_SHADING_MAP_MODE", + "OHOS_STATISTICS_SCENE_FLICKER", + "OHOS_JPEG_SIZE", + "OHOS_JPEG_QUALITY", + "OHOS_JPEG_ORIENTATION" + ]; + } + } + ability_01 :: ability { + logicCameraId = "lcam001"; + physicsCameraIds = [ + "CAMERA_FIRST", + "CAMERA_SECOND" + ]; + metadata { + aeAvailableAntiBandingModes = [ + "OHOS_CAMERA_AE_ANTIBANDING_MODE_OFF" + ]; + aeAvailableModes = ["OHOS_CAMERA_AE_MODE_OFF"]; + availableAeFpsTargets = [30, 30]; + aeCompensationRange = [0, 0]; + aeCompensationSteps = [0, 0]; + availableAwbModes = [ + "OHOS_CAMERA_AWB_MODE_OFF" + ]; + sensitivityRange = [32, 2400]; + faceDetectMode = "OHOS_CAMERA_FACE_DETECT_MODE_OFF"; + availableCharacteristicsKeys = [ + "OHOS_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES", + "OHOS_CONTROL_AE_AVAILABLE_MODES", + "OHOS_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES", + "OHOS_CONTROL_AE_COMPENSATION_RANGE", + "OHOS_CONTROL_AE_COMPENSATION_STEP", + "OHOS_CONTROL_AWB_AVAILABLE_MODES", + "OHOS_JPEG_AVAILABLE_THUMBNAIL_SIZES", + "OHOS_JPEG_MAX_SIZE", + "OHOS_SENSOR_INFO_PIXEL_ARRAY_SIZE", + "OHOS_SENSOR_INFO_ACTIVE_ARRAY_SIZE", + "OHOS_SENSOR_INFO_SENSITIVITY_RANGE", + "OHOS_SENSOR_INFO_PHYSICAL_SIZE", + ]; + availableRequestKeys = [ + "OHOS_CONTROL_AE_MODE", + "OHOS_CONTROL_AE_EXPOSURE_COMPENSATION", + "OHOS_CONTROL_AE_TARGET_FPS_RANGE", + "OHOS_CONTROL_AE_ANTIBANDING_MODE", + "OHOS_CONTROL_AWB_MODE", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_STATISTICS_FACE_DETECT_MODE" + ]; + availableResultKeys = [ + "OHOS_CONTROL_AE_LOCK", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_SENSOR_EXPOSURE_TIME", + "OHOS_JPEG_SIZE", + "OHOS_JPEG_QUALITY", + "OHOS_JPEG_ORIENTATION" + ]; + } + } + } +} + diff --git a/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/stream_supported_config.hcs b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/stream_supported_config.hcs new file mode 100755 index 00000000..4e84fddd --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/hdi_impl/stream_supported_config.hcs @@ -0,0 +1,58 @@ +root { + module="huawei,camera"; + stream_supported_config { + match_attr = "stream_supported"; + template supported { + operationMode = "NORMAL"; + template streamInfo { + width = 1280; + height = 720; + format = 24; + dataspace = 1; + intent = 0; + tunneledMode = 1; + minFrameDuration = 1; + } + streamSupportType = "DYNAMIC_SUPPORTED"; + } + supported_01 :: supported { + operationMode = "NORMAL"; + streamInfo01 :: streamInfo { + width = 640; + height = 480; + format = 24; + dataspace = 1; + intent = 0; + tunneledMode = 1; + minFrameDuration = 33333; + } + streamSupportType = "NOT_SUPPORTED"; + } + supported_02 :: supported { + operationMode = "NORMAL"; + streamInfo01 :: streamInfo { + width = 1280; + height = 720; + format = 24; + dataspace = 1; + intent = 1; + tunneledMode = 1; + minFrameDuration = 33333; + } + streamSupportType = "NOT_SUPPORTED"; + } + supported_03 :: supported { + operationMode = "NORMAL"; + streamInfo01 :: streamInfo { + width = 1280; + height = 720; + format = 24; + dataspace = 1; + intent = 2; + tunneledMode = 1; + minFrameDuration = 33333; + } + streamSupportType = "NOT_SUPPORTED"; + } + } +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/config.hcs b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/config.hcs new file mode 100755 index 00000000..8d6d5d54 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/config.hcs @@ -0,0 +1,402 @@ + root { + module = "pipeline_specs"; + template pipeline_spec { + name = ""; + template node_spec { + name = ""; + status = ""; + stream_type = ""; + template port_spec { + name = ""; + peer_port_name = ""; + peer_port_node_name = ""; + direction = 0; + width = 0; + height = 0; + format = 0; + usage = 0x10000000000000; + need_allocation = 0; + buffer_count = 0; + } + } + } + normal_privew :: pipeline_spec { + name = "normal_preview"; + sensor :: node_spec { + name = "sensor#0"; + status = "new"; + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vi#0"; + direction = 1; + width = 0; + height = 0; + format = 0; + } + } + vi :: node_spec { + name = "vi#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "sensor#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vpss#0"; + direction = 1; + } + } + vpss :: node_spec { + name = "vpss#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vi#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vo#0"; + direction = 1; + } + } + vo :: node_spec { + name = "vo#0"; + status = "new"; + stream_type = "preview"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + } + } + normal_snapshot :: pipeline_spec { + name = "normal_snapshot"; + sensor :: node_spec { + name = "sensor#0"; + status = "new"; + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vi#0"; + direction = 1; + width = 0; + height = 0; + format = 0; + } + } + vi :: node_spec { + name = "vi#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "sensor#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vpss#0"; + direction = 1; + } + } + vpss :: node_spec { + name = "vpss#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vi#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "ipp#0"; + direction = 1; + } + } + ipp :: node_spec { + name = "ipp#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "sink#0"; + direction = 1; + } + } + sink :: node_spec { + name = "sink#0"; + status = "new"; + stream_type = "snapshot"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "ipp#0"; + direction = 0; + } + } + } + normal_preview_snapshot :: pipeline_spec { + name = "normal_preview_snapshot"; + sensor :: node_spec { + name = "sensor#0"; + status = "new"; + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vi#0"; + direction = 1; + width = 0; + height = 0; + format = 0; + } + } + vi :: node_spec { + name = "vi#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "sensor#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vpss#0"; + direction = 1; + } + } + vpss :: node_spec { + name = "vpss#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vi#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vo#0"; + direction = 1; + } + out_port_1 :: port_spec { + name = "out1"; + peer_port_name = "in0"; + peer_port_node_name = "ipp#0"; + direction = 1; + } + } + ipp :: node_spec { + name = "ipp#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out1"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "sink#0"; + direction = 1; + } + } + vo :: node_spec { + name = "vo#0"; + status = "new"; + stream_type = "preview"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + } + sink :: node_spec { + name = "sink#0"; + status = "new"; + stream_type = "snapshot"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "ipp#0"; + direction = 0; + } + } + } + normal_preview_video :: pipeline_spec { + name = "normal_preview_video"; + sensor :: node_spec { + name = "sensor#0"; + status = "new"; + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vi#0"; + direction = 1; + width = 0; + height = 0; + format = 0; + } + } + vi :: node_spec { + name = "vi#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "sensor#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vpss#0"; + direction = 1; + } + } + vpss :: node_spec { + name = "vpss#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vi#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vo#0"; + direction = 1; + } + out_port_1 :: port_spec { + name = "out1"; + peer_port_name = "in0"; + peer_port_node_name = "venc#0"; + direction = 1; + } + } + vo :: node_spec { + name = "vo#0"; + status = "new"; + stream_type = "preview"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + } + venc :: node_spec { + name = "venc#0"; + status = "new"; + stream_type = "video"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out1"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + } + } + normal_preview_preview :: pipeline_spec { + name = "normal_preview_preview"; + sensor :: node_spec { + name = "sensor#0"; + status = "new"; + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vi#0"; + direction = 1; + width = 0; + height = 0; + format = 0; + } + } + vi :: node_spec { + name = "vi#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "sensor#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vpss#0"; + direction = 1; + } + } + vpss :: node_spec { + name = "vpss#0"; + status = "new"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vi#0"; + direction = 0; + } + out_port_0 :: port_spec { + name = "out0"; + peer_port_name = "in0"; + peer_port_node_name = "vo#0"; + direction = 1; + } + out_port_1 :: port_spec { + name = "out1"; + peer_port_name = "in0"; + peer_port_node_name = "vo#1"; + direction = 1; + } + } + vo :: node_spec { + name = "vo#0"; + status = "new"; + stream_type = "preview"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out0"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + } + vo_preview :: node_spec { + name = "vo#1"; + status = "new"; + stream_type = "preview"; + in_port_0 :: port_spec { + name = "in0"; + peer_port_name = "out1"; + peer_port_node_name = "vpss#0"; + direction = 0; + } + } + } + +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/ipp_algo_config.hcs b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/ipp_algo_config.hcs new file mode 100755 index 00000000..c5953616 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/ipp_algo_config.hcs @@ -0,0 +1,11 @@ +root { + module="sample"; + ipp_algo_config { + algo1 { + name = "example"; + description = "example algorithm"; + path = "/system/lib/libcamera_ipp_algo_example.z.so"; + mode = "IPP_ALGO_MODE_NORMAL"; + } + } +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/params.hcs b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/params.hcs new file mode 100755 index 00000000..29124c33 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/mpp/hispark_taurus/pipeline_core/params.hcs @@ -0,0 +1,27 @@ + root { + module = ""; + template stream_info { + id = 0; + name = ""; + } + template scene_info { + id = 0; + name = ""; + } + privew :: stream_info { + id = 0; + name = "preview"; + } + video :: stream_info { + id = 1; + name = "video"; + } + snapshot :: stream_info { + id = 2; + name = "snapshot"; + } + normal :: scene_info { + id = 0; + name = "normal"; + } +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/camera_host_config.hcs b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/camera_host_config.hcs new file mode 100755 index 00000000..4328b1c8 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/camera_host_config.hcs @@ -0,0 +1,179 @@ +root { + module="sample"; + camera_host_config { + match_attr = "camera_host_interface"; + template ability { + logicCameraId = "lcam001"; + physicsCameraIds = [ + "CAMERA_FIRST", + "CAMERA_SECOND" + ]; + metadata { + aeAvailableAntiBandingModes = [ + "OHOS_CONTROL_AE_ANTIBANDING_MODE_OFF", + "OHOS_CONTROL_AE_ANTIBANDING_MODE_50HZ", + "OHOS_CONTROL_AE_ANTIBANDING_MODE_60HZ", + "OHOS_CONTROL_AE_ANTIBANDING_MODE_AUTO" + ]; + aeAvailableModes = ["OHOS_CONTROL_AE_MODE_ON"]; + availableAeFpsTargets = [15, 30]; + aeCompensationRange = [0, 0]; + aeCompensationSteps = [0, 1]; + availableAwbModes = [ + "OHOS_CONTROL_AWB_MODE_OFF" + ]; + sceneModesOverrides = [ + "OHOS_CONTROL_AE_MODE_ON", + "OHOS_CONTROL_AWB_MODE_AUTO" + ]; + aeLockAvailable = "OHOS_CONTROL_AE_LOCK_AVAILABLE_FALSE"; + awbLockAvailable = "OHOS_CONTROL_AWB_LOCK_AVAILABLE_FALSE"; + sensitivityRange = [32, 2400]; + exposureTimeRange = [100000, 200000000]; + faceDetectMode = "OHOS_STATISTICS_FACE_DETECT_MODE_OFF"; + maxFaceCount = 0; + flashAvailable = "OHOS_FLASH_INFO_AVAILABLE_FALSE"; + lensFacing = "OHOS_LENS_FACING_FRONT"; + opticalStabilizations = ["OHOS_LENS_OPTICAL_STABILIZATION_MODE_OFF"]; + maxDigitalZoom = "1"; + availableCharacteristicsKeys = [ + "OHOS_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES", + "OHOS_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES", + "OHOS_CONTROL_AE_AVAILABLE_MODES", + "OHOS_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES", + "OHOS_CONTROL_AE_COMPENSATION_RANGE", + "OHOS_CONTROL_AE_COMPENSATION_STEP", + "OHOS_CONTROL_AVAILABLE_EFFECTS", + "OHOS_CONTROL_AVAILABLE_SCENE_MODES", + "OHOS_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES", + "OHOS_CONTROL_AWB_AVAILABLE_MODES", + "OHOS_CONTROL_MAX_REGIONS", + "OHOS_CONTROL_SCENE_MODE_OVERRIDES", + "OHOS_CONTROL_AE_LOCK_AVAILABLE", + "OHOS_CONTROL_AWB_LOCK_AVAILABLE", + "OHOS_CONTROL_AVAILABLE_MODES", + "OHOS_JPEG_AVAILABLE_THUMBNAIL_SIZES", + "OHOS_JPEG_MAX_SIZE", + "OHOS_SENSOR_INFO_PIXEL_ARRAY_SIZE", + "OHOS_SENSOR_INFO_ACTIVE_ARRAY_SIZE", + "OHOS_SENSOR_INFO_SENSITIVITY_RANGE", + "OHOS_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT", + "OHOS_SENSOR_INFO_EXPOSURE_TIME_RANGE", + "OHOS_SENSOR_ORIENTATION", + "OHOS_SENSOR_AVAILABLE_TEST_PATTERN_MODES", + "OHOS_SENSOR_INFO_PHYSICAL_SIZE", + "OHOS_SENSOR_INFO_TIMESTAMP_SOURCE", + "OHOS_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES", + "OHOS_STATISTICS_INFO_MAX_FACE_COUNT", + "OHOS_SYNC_MAX_LATENCY", + "OHOS_FLASH_INFO_AVAILABLE", + "OHOS_LENS_INFO_AVAILABLE_APERTURES", + "OHOS_LENS_FACING", + "OHOS_LENS_INFO_AVAILABLE_FOCAL_LENGTHS", + "OHOS_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION", + "OHOS_LENS_INFO_HYPERFOCAL_DISTANCE", + "OHOS_LENS_INFO_MINIMUM_FOCUS_DISTANCE", + "OHOS_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES", + "OHOS_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM", + "OHOS_SCALER_AVAILABLE_STREAM_CONFIGURATIONS", + "OHOS_SCALER_AVAILABLE_STALL_DURATIONS", + "OHOS_SCALER_AVAILABLE_MIN_FRAME_DURATIONS", + "OHOS_SCALER_CROPPING_TYPE", + "OHOS_INFO_SUPPORTED_HARDWARE_LEVEL", + "OHOS_REQUEST_PARTIAL_RESULT_COUNT", + "OHOS_REQUEST_PIPELINE_MAX_DEPTH", + "OHOS_REQUEST_MAX_NUM_OUTPUT_STREAMS", + "OHOS_REQUEST_MAX_NUM_INPUT_STREAMS", + "OHOS_REQUEST_AVAILABLE_CAPABILITIES" + ]; + availableRequestKeys = [ + "OHOS_CONTROL_AE_MODE", + "OHOS_CONTROL_AE_EXPOSURE_COMPENSATION", + "OHOS_CONTROL_AE_PRECAPTURE_TRIGGER", + "OHOS_CONTROL_AE_TARGET_FPS_RANGE", + "OHOS_CONTROL_AE_ANTIBANDING_MODE", + "OHOS_CONTROL_AWB_MODE", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_FLASH_MODE", + "OHOS_STATISTICS_FACE_DETECT_MODE", + "OHOS_NOISE_REDUCTION_MODE", + "OHOS_COLOR_CORRECTION_ABERRATION_MODE", + "OHOS_LENS_APERTURE", + "OHOS_LENS_OPTICAL_STABILIZATION_MODE", + "OHOS_CONTROL_MODE", + "OHOS_CONTROL_CAPTURE_INTENT" + ]; + availableResultKeys = [ + "OHOS_CONTROL_AE_STATE", + "OHOS_CONTROL_AE_LOCK", + "OHOS_CONTROL_AWB_STATE", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_LENS_STATE", + "OHOS_REQUEST_PIPELINE_DEPTH", + "OHOS_SCALER_CROP_REGION", + "OHOS_SENSOR_TIMESTAMP", + "OHOS_SENSOR_ROLLING_SHUTTER_SKEW", + "OHOS_SENSOR_EXPOSURE_TIME", + "OHOS_STATISTICS_LENS_SHADING_MAP_MODE", + "OHOS_STATISTICS_SCENE_FLICKER", + "OHOS_JPEG_SIZE", + "OHOS_JPEG_QUALITY", + "OHOS_JPEG_ORIENTATION" + ]; + } + } + ability_01 :: ability { + logicCameraId = "lcam001"; + physicsCameraIds = [ + "CAMERA_FIRST", + "CAMERA_SECOND" + ]; + metadata { + aeAvailableAntiBandingModes = [ + "OHOS_CAMERA_AE_ANTIBANDING_MODE_OFF" + ]; + aeAvailableModes = ["OHOS_CAMERA_AE_MODE_OFF"]; + availableAeFpsTargets = [30, 30]; + aeCompensationRange = [0, 0]; + aeCompensationSteps = [0, 0]; + availableAwbModes = [ + "OHOS_CAMERA_AWB_MODE_OFF" + ]; + sensitivityRange = [32, 2400]; + faceDetectMode = "OHOS_CAMERA_FACE_DETECT_MODE_OFF"; + availableCharacteristicsKeys = [ + "OHOS_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES", + "OHOS_CONTROL_AE_AVAILABLE_MODES", + "OHOS_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES", + "OHOS_CONTROL_AE_COMPENSATION_RANGE", + "OHOS_CONTROL_AE_COMPENSATION_STEP", + "OHOS_CONTROL_AWB_AVAILABLE_MODES", + "OHOS_JPEG_AVAILABLE_THUMBNAIL_SIZES", + "OHOS_JPEG_MAX_SIZE", + "OHOS_SENSOR_INFO_PIXEL_ARRAY_SIZE", + "OHOS_SENSOR_INFO_ACTIVE_ARRAY_SIZE", + "OHOS_SENSOR_INFO_SENSITIVITY_RANGE", + "OHOS_SENSOR_INFO_PHYSICAL_SIZE", + ]; + availableRequestKeys = [ + "OHOS_CONTROL_AE_MODE", + "OHOS_CONTROL_AE_EXPOSURE_COMPENSATION", + "OHOS_CONTROL_AE_TARGET_FPS_RANGE", + "OHOS_CONTROL_AE_ANTIBANDING_MODE", + "OHOS_CONTROL_AWB_MODE", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_STATISTICS_FACE_DETECT_MODE" + ]; + availableResultKeys = [ + "OHOS_CONTROL_AE_LOCK", + "OHOS_CONTROL_AWB_LOCK", + "OHOS_SENSOR_EXPOSURE_TIME", + "OHOS_JPEG_SIZE", + "OHOS_JPEG_QUALITY", + "OHOS_JPEG_ORIENTATION" + ]; + } + } + } +} + diff --git a/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/stream_supported_config.hcs b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/stream_supported_config.hcs new file mode 100755 index 00000000..4e84fddd --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/hdi_impl/stream_supported_config.hcs @@ -0,0 +1,58 @@ +root { + module="huawei,camera"; + stream_supported_config { + match_attr = "stream_supported"; + template supported { + operationMode = "NORMAL"; + template streamInfo { + width = 1280; + height = 720; + format = 24; + dataspace = 1; + intent = 0; + tunneledMode = 1; + minFrameDuration = 1; + } + streamSupportType = "DYNAMIC_SUPPORTED"; + } + supported_01 :: supported { + operationMode = "NORMAL"; + streamInfo01 :: streamInfo { + width = 640; + height = 480; + format = 24; + dataspace = 1; + intent = 0; + tunneledMode = 1; + minFrameDuration = 33333; + } + streamSupportType = "NOT_SUPPORTED"; + } + supported_02 :: supported { + operationMode = "NORMAL"; + streamInfo01 :: streamInfo { + width = 1280; + height = 720; + format = 24; + dataspace = 1; + intent = 1; + tunneledMode = 1; + minFrameDuration = 33333; + } + streamSupportType = "NOT_SUPPORTED"; + } + supported_03 :: supported { + operationMode = "NORMAL"; + streamInfo01 :: streamInfo { + width = 1280; + height = 720; + format = 24; + dataspace = 1; + intent = 2; + tunneledMode = 1; + minFrameDuration = 33333; + } + streamSupportType = "NOT_SUPPORTED"; + } + } +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/config.hcs b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/config.hcs new file mode 100755 index 00000000..dc19c301 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/config.hcs @@ -0,0 +1,265 @@ +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 = "sink#0"; + direction = 1; + width = 0; + height = 0; + format = 0; + } + } + 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 = "v4l2_source#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 = "sink#0"; + direction = 1; + } + out_port_1 :: port_spec { + name = "out1"; + 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 = "fork#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 = "out1"; + peer_port_node_name = "fork#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 = "sink#0"; + direction = 1; + } + out_port_1 :: port_spec { + name = "out1"; + 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 = "fork#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 = "out1"; + peer_port_node_name = "fork#0"; + 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; + } + } + } +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/ipp_algo_config.hcs b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/ipp_algo_config.hcs new file mode 100755 index 00000000..c5953616 --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/ipp_algo_config.hcs @@ -0,0 +1,11 @@ +root { + module="sample"; + ipp_algo_config { + algo1 { + name = "example"; + description = "example algorithm"; + path = "/system/lib/libcamera_ipp_algo_example.z.so"; + mode = "IPP_ALGO_MODE_NORMAL"; + } + } +} diff --git a/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/params.hcs b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/params.hcs new file mode 100755 index 00000000..48492e2e --- /dev/null +++ b/rk3568/hdf_config/uhdf/camera/hal/v4l2/rpi4b/pipeline_core/params.hcs @@ -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"; + } +} diff --git a/rk3568/hdf_config/uhdf/device_info.hcs b/rk3568/hdf_config/uhdf/device_info.hcs new file mode 100755 index 00000000..884e4b5e --- /dev/null +++ b/rk3568/hdf_config/uhdf/device_info.hcs @@ -0,0 +1,132 @@ + 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; + moduleName = "libsample_driver.z.so"; + serviceName = "sample_driver_service"; + } + } + } + usbfnMaster :: host { + hostName = "usbfnMaster_host"; + priority = 50; + usbfn_device :: device { + device0 :: deviceNode { + policy = 2; + priority = 80; + preload = 2; + 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; + battery_device :: device { + device0 :: deviceNode { + policy = 2; + priority = 100; + moduleName = "libbatteryd.z.so"; + serviceName = "batteryd"; + } + } + } + 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"; + } + } + } + audio :: host { + hostName = "audio_hdi_server_host"; + priority = 50; + audio_device :: device { + device0 :: deviceNode { + policy = 2; + priority = 100; + moduleName = "libaudio_hdi_adapter_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_display_layer_service.z.so"; + serviceName = "hdi_display_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"; + } + } + } + } +} diff --git a/rk3568/hdf_config/uhdf/hdf.hcs b/rk3568/hdf_config/uhdf/hdf.hcs new file mode 100755 index 00000000..01b37ac8 --- /dev/null +++ b/rk3568/hdf_config/uhdf/hdf.hcs @@ -0,0 +1,7 @@ +#include "device_info.hcs" +#include "usb_pnp_device.hcs" +#include "usb_cdcacm.hcs" + +root { + module = "default"; +} diff --git a/rk3568/hdf_config/uhdf/hdf_ecm.hcs b/rk3568/hdf_config/uhdf/hdf_ecm.hcs new file mode 100755 index 00000000..4fa84e40 --- /dev/null +++ b/rk3568/hdf_config/uhdf/hdf_ecm.hcs @@ -0,0 +1,7 @@ +#include "device_info.hcs" +#include "usb_pnp_device.hcs" +#include "usb_cdcecm.hcs" + +root { + module = "default"; +} diff --git a/rk3568/hdf_config/uhdf/hdf_ecm_acm.hcs b/rk3568/hdf_config/uhdf/hdf_ecm_acm.hcs new file mode 100755 index 00000000..9fe3ccd1 --- /dev/null +++ b/rk3568/hdf_config/uhdf/hdf_ecm_acm.hcs @@ -0,0 +1,7 @@ +#include "device_info.hcs" +#include "usb_pnp_device.hcs" +#include "usb_ecm_acm.hcs" + +root { + module = "default"; +} diff --git a/rk3568/hdf_config/uhdf/usb_cdcacm.hcs b/rk3568/hdf_config/uhdf/usb_cdcacm.hcs new file mode 100755 index 00000000..b509f41b --- /dev/null +++ b/rk3568/hdf_config/uhdf/usb_cdcacm.hcs @@ -0,0 +1,421 @@ +root { + module = "master"; + master_config { + match_attr = "usbfn_master_driver"; + use_hcs = 1; + udc_name = "100e0000.hidwc3_0"; + usb_dev_desc = "UsbDeviceDescriptor"; + usb_dev_string = "UsbDeviceStrings"; + usb_configuration = "UsbConfigs"; + UsbDeviceDescriptor { + bLength = 18; + bDescriptorType = 0x01; + bcdUSB = 0x0200; + bDeviceClass = 0; + bDeviceSubClass = 0; + bDeviceProtocol = 0; + bMaxPacketSize0 = 0x40; + idVendor = 0x12D1; + idProduct = 0x5000; + bcdDevice = 0x0223; + manufacturer = 0; + product = 1; + serialnumber = 2; + numConfigurations = 1; + } + UsbDeviceStrings { + stringTabList = ["string_1"]; + string_1 { + language = 0x0409; + stringList = ["str_1", "str_2","str_3", "str_4"]; + str_1 { + id = 0; + str = "HISILICON"; + } + str_2 { + id = 1; + str = "HDC Device"; + } + str_3 { + id = 2; + str = "0123456789POPLAR"; + } + str_4 { + id = 3; + str = "hdc"; + } + } + } + UsbConfigs { + configList = ["config_1"]; + config_1 { + configurationValue = 1; + iConfiguration = 3; + attributes = 0xC0; + maxPower = 500; + functionList = ["func_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"; + } + } + } + } +} diff --git a/rk3568/hdf_config/uhdf/usb_cdcecm.hcs b/rk3568/hdf_config/uhdf/usb_cdcecm.hcs new file mode 100755 index 00000000..9e435ee2 --- /dev/null +++ b/rk3568/hdf_config/uhdf/usb_cdcecm.hcs @@ -0,0 +1,421 @@ +root { + module = "master"; + master_config { + match_attr = "usbfn_master_driver"; + use_hcs = 1; + udc_name = "100e0000.hidwc3_0"; + usb_dev_desc = "UsbDeviceDescriptor"; + usb_dev_string = "UsbDeviceStrings"; + usb_configuration = "UsbConfigs"; + UsbDeviceDescriptor { + bLength = 18; + bDescriptorType = 0x01; + bcdUSB = 0x0200; + bDeviceClass = 0; + bDeviceSubClass = 0; + bDeviceProtocol = 0; + bMaxPacketSize0 = 0x40; + idVendor = 0x12D1; + idProduct = 0x5000; + bcdDevice = 0x0223; + manufacturer = 0; + product = 1; + serialnumber = 2; + numConfigurations = 1; + } + UsbDeviceStrings { + stringTabList = ["string_1"]; + string_1 { + language = 0x0409; + stringList = ["str_1", "str_2","str_3", "str_4"]; + str_1 { + id = 0; + str = "HISILICON"; + } + str_2 { + id = 1; + str = "HDC Device"; + } + str_3 { + id = 2; + str = "0123456789POPLAR"; + } + str_4 { + id = 3; + str = "hdc"; + } + } + } + UsbConfigs { + configList = ["config_1"]; + config_1 { + configurationValue = 1; + iConfiguration = 3; + attributes = 0xC0; + maxPower = 500; + functionList = ["func_ecm"]; + func_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"; + } + } + } + } +} diff --git a/rk3568/hdf_config/uhdf/usb_ecm_acm.hcs b/rk3568/hdf_config/uhdf/usb_ecm_acm.hcs new file mode 100755 index 00000000..8199f2b0 --- /dev/null +++ b/rk3568/hdf_config/uhdf/usb_ecm_acm.hcs @@ -0,0 +1,421 @@ +root { + module = "master"; + master_config { + match_attr = "usbfn_master_driver"; + use_hcs = 1; + udc_name = "100e0000.hidwc3_0"; + usb_dev_desc = "UsbDeviceDescriptor"; + usb_dev_string = "UsbDeviceStrings"; + usb_configuration = "UsbConfigs"; + UsbDeviceDescriptor { + bLength = 18; + bDescriptorType = 0x01; + bcdUSB = 0x0200; + bDeviceClass = 0; + bDeviceSubClass = 0; + bDeviceProtocol = 0; + bMaxPacketSize0 = 0x40; + idVendor = 0x12D1; + idProduct = 0x5000; + bcdDevice = 0x0223; + manufacturer = 0; + product = 1; + serialnumber = 2; + numConfigurations = 1; + } + UsbDeviceStrings { + stringTabList = ["string_1"]; + string_1 { + language = 0x0409; + stringList = ["str_1", "str_2","str_3", "str_4"]; + str_1 { + id = 0; + str = "HISILICON"; + } + str_2 { + id = 1; + str = "HDC Device"; + } + str_3 { + id = 2; + str = "0123456789POPLAR"; + } + str_4 { + id = 3; + str = "hdc"; + } + } + } + UsbConfigs { + configList = ["config_1"]; + config_1 { + configurationValue = 1; + iConfiguration = 3; + attributes = 0xC0; + maxPower = 500; + functionList = ["func_ecm", "func_acm"]; + func_ecm { + funcName = "f_generic.e"; + stringTabList = ["fnString_1"]; + fnString_1 { + language = 0x0409; + stringList = ["str_1", "str_2", "str_3", "str_4"]; + str_1 { + id = 0; + str = "CDC Ethernet Control Model (ECM)"; + } + str_2 { + id = 1; + str = "0ac75ae91c79"; + } + str_3 { + id = 2; + str = "CDC Ethernet Data"; + } + str_4 { + id = 3; + str = "CDC ECM"; + } + } + fsDescList = ["assoc_interface", "ControlInterface", "cdc_header", + "cdc_union", "cdc_ether", "FsNotify_endpoint", "DataNopInterface", + "DataInterface", "FsIn_endpoint", "FsOut_endpoint"]; + assoc_interface { + bLength = 0x08; + bDescriptorType = 0x0B; + bFirstInterface = 0x00; + bInterfaceCount = 0x02; + bFunctionClass = 0x02; + bFunctionSubClass = 0x06; + bFunctionProtocol = 0x00; + iFunction = 0x04; + } + ControlInterface { + bLength = 0x09; + bDescriptorType = 0x04; + bInterfaceNumber = 0x00; + bAlternateSetting = 0x00; + bNumEndpoints = 0x01; + bInterfaceClass = 0x02; + bInterfaceSubClass = 0x06; + bInterfaceProtocol = 0x00; + iInterface = 0x1; + } + cdc_header { + bLength = 0x05; + bDescriptorType = 0x24; + desc_data = [0x05, 0x24, 0x00, 0x10, 0x01]; + } + cdc_union { + bLength = 0x05; + bDescriptorType = 0x24; + desc_data = [0x05, 0x24, 0x06, 0x00, 0x01]; + } + cdc_ether { + bLength = 0x0D; + bDescriptorType = 0x24; + desc_data = [0x0D, 0x24, 0x0F, 0x06, 0x00, 0x00, 0x00, 0x00, + 0xEA, 0x05, 0x00, 0x00, 0x00]; + } + DataNopInterface { + bLength = 0x09; + bDescriptorType = 0x04; + bInterfaceNumber = 0x01; + bAlternateSetting = 0x00; + bNumEndpoints = 0x00; + bInterfaceClass = 0x0A; + bInterfaceSubClass = 0x00; + bInterfaceProtocol = 0x06; + iInterface = 0x00; + } + DataInterface { + bLength = 0x09; + bDescriptorType = 0x04; + bInterfaceNumber = 0x01; + bAlternateSetting = 0x01; + bNumEndpoints = 0x02; + bInterfaceClass = 0x0A; + bInterfaceSubClass = 0x00; + bInterfaceProtocol = 0x06; + iInterface = 0x03; + } + FsNotify_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x81; + bmAttributes = 0x03; + wMaxPacketSize = 16; + bInterval = 32; + } + FsIn_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x82; + bmAttributes = 0x02; + wMaxPacketSize = 0; + bInterval = 0; + } + FsOut_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x3; + bmAttributes = 0x02; + wMaxPacketSize = 0; + bInterval = 0; + } + hsDescList = ["assoc_interface", "ControlInterface", "cdc_header", + "cdc_union", "cdc_ether", "HsNotify_endpoint", "DataNopInterface", + "DataInterface", "HsIn_endpoint", "HsOut_endpoint"]; + HsNotify_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x81; + bmAttributes = 0x03; + wMaxPacketSize = 16; + bInterval = 9; + } + HsIn_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x82; + bmAttributes = 0x02; + wMaxPacketSize = 512; + bInterval = 0; + } + HsOut_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x3; + bmAttributes = 0x02; + wMaxPacketSize = 512; + bInterval = 0; + } + ssDescList = ["assoc_interface", "ControlInterface", "cdc_header", + "cdc_union", "cdc_ether", "SsNotify_endpoint", "ss_ep_comp_0", + "DataNopInterface", "DataInterface", "SsIn_endpoint", + "ss_ep_comp", "SsOut_endpoint", "ss_ep_comp"]; + SsNotify_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x81; + bmAttributes = 0x03; + wMaxPacketSize = 16; + bInterval = 9; + } + ss_ep_comp_0 { + bLength = 0x06; + bDescriptorType = 0x30; + bMaxBurst = 0x00; + bmAttributes = 0x00; + wBytesPerInterval = 16; + } + ss_ep_comp { + bLength = 0x06; + bDescriptorType = 0x30; + bMaxBurst = 0x00; + bmAttributes = 0x00; + wBytesPerInterval = 0x00; + } + SsIn_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x82; + bmAttributes = 0x02; + wMaxPacketSize = 1024; + bInterval = 0; + } + SsOut_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x3; + bmAttributes = 0x02; + wMaxPacketSize = 1024; + bInterval = 0; + } + } + func_acm { + funcName = "f_generic.a"; + stringTabList = ["fnString_1"]; + fnString_1 { + language = 0x0409; + stringList = ["str_1", "str_2", "str_3"]; + str_1 { + id = 0; + str = "CDC Abstract Control Model (ACM)"; + } + str_2 { + id = 1; + str = "CDC ACM Data"; + } + str_3 { + id = 2; + str = "CDC Serial"; + } + } + fsDescList = ["assoc_interface", "ControlInterface", "cdc_header", + "cdc_call_mgmt", "cdc_acm", "cdc_union", "FsNotify_endpoint", + "DataInterface", "FsIn_endpoint", "FsOut_endpoint"]; + assoc_interface { + bLength = 0x08; + bDescriptorType = 0x0B; + bFirstInterface = 0x02; + bInterfaceCount = 0x02; + bFunctionClass = 0x02; + bFunctionSubClass = 0x02; + bFunctionProtocol = 0x01; + iFunction = 0x03; + } + ControlInterface { + bLength = 0x09; + bDescriptorType = 0x04; + bInterfaceNumber = 0x02; + bAlternateSetting = 0x00; + bNumEndpoints = 0x01; + bInterfaceClass = 0x02; + bInterfaceSubClass = 0x02; + bInterfaceProtocol = 0x01; + iInterface = 0x01; + } + cdc_header { + bLength = 0x05; + bDescriptorType = 0x24; + desc_data = [0x05, 0x24, 0x00, 0x10, 0x01]; + } + cdc_call_mgmt { + bLength = 0x05; + bDescriptorType = 0x24; + desc_data = [0x05, 0x24, 0x01, 0x00, 0x01]; + } + cdc_acm { + bLength = 0x04; + bDescriptorType = 0x24; + desc_data = [0x04, 0x24, 0x02, 0x02]; + } + cdc_union { + bLength = 0x05; + bDescriptorType = 0x24; + desc_data = [0x05, 0x24, 0x06, 0x02, 0x03]; + } + FsNotify_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x81; + bmAttributes = 0x03; + wMaxPacketSize = 10; + bInterval = 32; + } + DataInterface { + bLength = 0x09; + bDescriptorType = 0x04; + bInterfaceNumber = 0x03; + bAlternateSetting = 0x00; + bNumEndpoints = 0x02; + bInterfaceClass = 0x0A; + bInterfaceSubClass = 0x00; + bInterfaceProtocol = 0x02; + iInterface = 0x02; + } + FsIn_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x82; + bmAttributes = 0x02; + wMaxPacketSize = 0; + bInterval = 0; + } + FsOut_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x3; + bmAttributes = 0x02; + wMaxPacketSize = 0; + bInterval = 0; + } + hsDescList = ["assoc_interface", "ControlInterface", "cdc_header", + "cdc_call_mgmt", "cdc_acm", "cdc_union", "HsNotify_endpoint", + "DataInterface", "HsIn_endpoint", "HsOut_endpoint"]; + HsNotify_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x81; + bmAttributes = 0x03; + wMaxPacketSize = 10; + bInterval = 9; + } + HsIn_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x82; + bmAttributes = 0x02; + wMaxPacketSize = 512; + bInterval = 0; + } + HsOut_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x3; + bmAttributes = 0x02; + wMaxPacketSize = 512; + bInterval = 0; + } + ssDescList = ["assoc_interface", "ControlInterface", "cdc_header", + "cdc_call_mgmt", "cdc_acm", "cdc_union", "HsNotify_endpoint", + "ss_ep_comp", "DataInterface", "SsIn_endpoint", + "ss_ep_comp","SsOut_endpoint","ss_ep_comp"]; + ss_ep_comp { + bLength = 0x06; + bDescriptorType = 0x30; + bMaxBurst = 0x00; + bmAttributes = 0x00; + wBytesPerInterval = 0x00; + } + SsIn_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x82; + bmAttributes = 0x02; + wMaxPacketSize = 1024; + bInterval = 0; + } + SsOut_endpoint { + bLength = 0x07; + bDescriptorType = 0x05; + bEndpointAddress = 0x3; + bmAttributes = 0x02; + wMaxPacketSize = 1024; + bInterval = 0; + } + } + } + } + custom_prop { + propTable = ["propList_1", "propList_2"]; + propList_1 { + configNum = 1; + interfaceNum = 2; + propList = ["prop_1", "prop_2"]; + prop_1 { + name = "testx"; + value = "xxxxxx"; + } + prop_2 { + name = "testy"; + value = "yyyyyy"; + } + } + propList_2 { + configNum = 1; + interfaceNum = 3; + propList = ["prop_1", "prop_2"]; + prop_1 { + name = "testm"; + value = "mmmmm"; + } + prop_2 { + name = "testn"; + value = "nnnnn"; + } + } + } + } +} diff --git a/rk3568/hdf_config/uhdf/usb_pnp_device.hcs b/rk3568/hdf_config/uhdf/usb_pnp_device.hcs new file mode 100755 index 00000000..40ab090f --- /dev/null +++ b/rk3568/hdf_config/uhdf/usb_pnp_device.hcs @@ -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]; + } + } + } +} -- Gitee