From a597154dae5ade9a640ddd1b27a588dfaf1ae12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=AD=90=E6=87=BF?= Date: Wed, 16 Oct 2024 11:30:16 +0800 Subject: [PATCH] dts: k230: update CSI dts, support bananapi K230D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 黄子懿 --- .../dts/canaan/bananapi-canmv-k230d-zero.dts | 17 ++++++++ arch/riscv/boot/dts/canaan/k230.dtsi | 42 ++++++++++++++++++- arch/riscv/configs/k230_defconfig | 2 + 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/arch/riscv/boot/dts/canaan/bananapi-canmv-k230d-zero.dts b/arch/riscv/boot/dts/canaan/bananapi-canmv-k230d-zero.dts index 51e889e45c50..694352e4c764 100644 --- a/arch/riscv/boot/dts/canaan/bananapi-canmv-k230d-zero.dts +++ b/arch/riscv/boot/dts/canaan/bananapi-canmv-k230d-zero.dts @@ -59,3 +59,20 @@ &lcd { dsi_reset-gpios = <&gpio1_ports 5 GPIO_ACTIVE_HIGH>; }; + +&mipi0 { + // set to csi2 + id = <2>; + reg = <0x0 0x9000a800 0x0 0x800>; + interrupts = <121 IRQ_TYPE_LEVEL_HIGH>; + resets = <&sysctl_reset + K230_RESET_CSI2_REG_OFFSET + K230_RESET_CSI2_TYPE + K230_RESET_CSI2_DONE_BIT + K230_RESET_CSI2_ASSERT_BIT>, + <&sysctl_reset + K230_RESET_M2_REG_OFFSET + K230_RESET_M2_TYPE + K230_RESET_M2_DONE_BIT + K230_RESET_M2_ASSERT_BIT>; +}; diff --git a/arch/riscv/boot/dts/canaan/k230.dtsi b/arch/riscv/boot/dts/canaan/k230.dtsi index 5cc906de044d..d5f7b221bbb6 100644 --- a/arch/riscv/boot/dts/canaan/k230.dtsi +++ b/arch/riscv/boot/dts/canaan/k230.dtsi @@ -552,9 +552,9 @@ status = "okay"; }; - mipi: mipi.0 { + mipi0: mipi.0 { compatible = "verisilicon,mipi"; - id = <1>; + id = <0>; reg = <0x0 0x90009800 0x0 0x800>; interrupts = <115 IRQ_TYPE_LEVEL_HIGH>; resets = <&sysctl_reset @@ -571,6 +571,44 @@ status = "okay"; }; + mipi1: mipi.1 { + compatible = "verisilicon,mipi"; + id = <1>; + reg = <0x0 0x9000a000 0x0 0x800>; + interrupts = <118 IRQ_TYPE_LEVEL_HIGH>; + resets = <&sysctl_reset + K230_RESET_CSI1_REG_OFFSET + K230_RESET_CSI1_TYPE + K230_RESET_CSI1_DONE_BIT + K230_RESET_CSI1_ASSERT_BIT>, + <&sysctl_reset + K230_RESET_M1_REG_OFFSET + K230_RESET_M1_TYPE + K230_RESET_M1_DONE_BIT + K230_RESET_M1_ASSERT_BIT>; + reset-names = "csi", "sensor"; + status = "disabled"; + }; + + mipi2: mipi.2 { + compatible = "verisilicon,mipi"; + id = <2>; + reg = <0x0 0x9000a800 0x0 0x800>; + interrupts = <121 IRQ_TYPE_LEVEL_HIGH>; + resets = <&sysctl_reset + K230_RESET_CSI2_REG_OFFSET + K230_RESET_CSI2_TYPE + K230_RESET_CSI2_DONE_BIT + K230_RESET_CSI2_ASSERT_BIT>, + <&sysctl_reset + K230_RESET_M2_REG_OFFSET + K230_RESET_M2_TYPE + K230_RESET_M2_DONE_BIT + K230_RESET_M2_ASSERT_BIT>; + reset-names = "csi", "sensor"; + status = "disabled"; + }; + display: display-subsystem { compatible = "canaan,display-subsystem"; ports = <&vo_out>; diff --git a/arch/riscv/configs/k230_defconfig b/arch/riscv/configs/k230_defconfig index 09cc462682bb..6e579f78c5e8 100644 --- a/arch/riscv/configs/k230_defconfig +++ b/arch/riscv/configs/k230_defconfig @@ -301,3 +301,5 @@ CONFIG_DRM_LONTIUM_LT9611=y CONFIG_CFG80211=y CONFIG_CFG80211_WEXT=y CONFIG_MAC80211=y +CONFIG_MEDIA_USB_SUPPORT=y +CONFIG_USB_VIDEO_CLASS=y