From 4d9595a4c420bbe2987adbb3ca338953d1e45b05 Mon Sep 17 00:00:00 2001 From: wjy Date: Thu, 13 Feb 2025 15:40:28 +0800 Subject: [PATCH] feat: enable rockchip saradc driver fix: enable usb dwc2 driver and disable dwc3 driver, otherwise, kernel will crash in dwc3 driver --- .../arch/arm/boot/dts/rv1106-board.dtsi | 20 +++++++++++++++++-- .../kernel/arch/arm/configs/rv1106-evb.config | 12 +++++++---- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sysdrv/source/kernel/arch/arm/boot/dts/rv1106-board.dtsi b/sysdrv/source/kernel/arch/arm/boot/dts/rv1106-board.dtsi index b2f567754..b2a7760f5 100755 --- a/sysdrv/source/kernel/arch/arm/boot/dts/rv1106-board.dtsi +++ b/sysdrv/source/kernel/arch/arm/boot/dts/rv1106-board.dtsi @@ -10,7 +10,6 @@ /{ model = "rv1106-board"; compatible = "rockchip,rv1106g-evb1-v11", "rockchip,rv1106"; - adc-keys { compatible = "adc-keys"; io-channels = <&saradc 0>; @@ -144,4 +143,21 @@ &pwm0 { // rpdzkj: If the internal rtc is not used, must be disabled it!!! otherwise it will affect the system startup. &rtc { status = "disabled"; -}; \ No newline at end of file +}; + +/{ + vcc_virtual: vcc-virtual { + compatible = "regulator-fixed"; + regulator-name = "vcc-virtual"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + status = "okay"; + }; +}; + +&saradc { + status = "okay"; + vref-supply = <&vcc_virtual>; +}; diff --git a/sysdrv/source/kernel/arch/arm/configs/rv1106-evb.config b/sysdrv/source/kernel/arch/arm/configs/rv1106-evb.config index 3c79bded1..534d9d040 100644 --- a/sysdrv/source/kernel/arch/arm/configs/rv1106-evb.config +++ b/sysdrv/source/kernel/arch/arm/configs/rv1106-evb.config @@ -853,12 +853,12 @@ CONFIG_USB_CONFIGFS_UEVENT=y # CONFIG_USB_CYTHERM is not set CONFIG_USB_DEFAULT_PERSIST=y # CONFIG_USB_DUMMY_HCD is not set -# CONFIG_USB_DWC2 is not set -CONFIG_USB_DWC3=y -CONFIG_USB_DWC3_DUAL_ROLE=y +CONFIG_USB_DWC2 is not set +# CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_DUAL_ROLE=y # CONFIG_USB_DWC3_GADGET is not set # CONFIG_USB_DWC3_HOST is not set -CONFIG_USB_DWC3_OF_SIMPLE=y +# CONFIG_USB_DWC3_OF_SIMPLE=y # CONFIG_USB_DYNAMIC_MINORS is not set # CONFIG_USB_EHSET_TEST_FIXTURE is not set # CONFIG_USB_EMI26 is not set @@ -1063,3 +1063,7 @@ CONFIG_MEDIA_USB_SUPPORT=y CONFIG_USB_VIDEO_CLASS=y CONFIG_SUSPEND=y + +CONFIG_REGULATOR_VIRTUAL_CONSUMER=y +CONFIG_ROCKCHIP_SARADC=y +CONFIG_RESET_CONTROLLER=y -- 2.25.1