diff options
-rw-r--r-- | overlays/Makefile | 2 | ||||
-rw-r--r-- | overlays/aquila-am69_csi1_ov5640_overlay.dts | 70 | ||||
-rw-r--r-- | overlays/aquila-am69_csi2_ov5640_overlay.dts | 70 |
3 files changed, 142 insertions, 0 deletions
diff --git a/overlays/Makefile b/overlays/Makefile index 85ce95a..ae4c621 100644 --- a/overlays/Makefile +++ b/overlays/Makefile @@ -19,6 +19,8 @@ HOSTCC := gcc $(DTS_INCLUDES) PWD := $(shell pwd) +dtb-y += aquila-am69_csi1_ov5640_overlay.dtbo +dtb-y += aquila-am69_csi2_ov5640_overlay.dtbo dtb-y += aquila-am69_dsi-to-hdmi_overlay.dtbo dtb-y += aquila-am69_dsi-to-lvds_panel-cap-touch-10inch-lvds_overlay.dtbo dtb-y += aquila-am69_spi1_spidev_overlay.dtbo diff --git a/overlays/aquila-am69_csi1_ov5640_overlay.dts b/overlays/aquila-am69_csi1_ov5640_overlay.dts new file mode 100644 index 0000000..7e6ced0 --- /dev/null +++ b/overlays/aquila-am69_csi1_ov5640_overlay.dts @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +// Aquila CSI_1 with 5MP OV5640 CSI Camera Module + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> + +/ { + compatible = "toradex,aquila-am69"; +}; + +&{/} { + clk_csi1_ov5640: ov5640-csi1-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; +}; + +&csi0_port0 { + status = "okay"; + + csi2rx0_in_sensor: endpoint { + remote-endpoint = <&csi2rx0_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; +}; + +&dphy_rx0 { + status = "okay"; +}; + +/* Aquila I2C_4_CSI1 */ +&main_i2c1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_09_csi_1>, <&pinctrl_gpio_10_csi_1>; + clocks = <&clk_csi1_ov5640>; + clock-names = "xclk"; + /* Aquila GPIO_10_CSI_1 */ + powerdown-gpios = <&main_gpio0 2 GPIO_ACTIVE_HIGH>; + /* Aquila GPIO_09_CSI_1 */ + reset-gpios = <&main_gpio0 1 GPIO_ACTIVE_LOW>; + + port { + csi2rx0_cam0: endpoint { + remote-endpoint = <&csi2rx0_in_sensor>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&ti_csi2rx0 { + status = "okay"; +}; diff --git a/overlays/aquila-am69_csi2_ov5640_overlay.dts b/overlays/aquila-am69_csi2_ov5640_overlay.dts new file mode 100644 index 0000000..3425ede --- /dev/null +++ b/overlays/aquila-am69_csi2_ov5640_overlay.dts @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright 2024 Toradex + */ + +// Aquila CSI_2 with 5MP OV5640 CSI Camera Module + +/dts-v1/; +/plugin/; + +#include <dt-bindings/gpio/gpio.h> + +/ { + compatible = "toradex,aquila-am69"; +}; + +&{/} { + clk_csi2_ov5640: ov5640-csi2-clock { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; +}; + +&csi1_port0 { + status = "okay"; + + csi2rx1_in_sensor: endpoint { + remote-endpoint = <&csi2rx1_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; +}; + +&dphy_rx1 { + status = "okay"; +}; + +/* Aquila I2C_5_CSI2 */ +&main_i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_13_csi_1>, <&pinctrl_gpio_14_csi_1>; + clocks = <&clk_csi2_ov5640>; + clock-names = "xclk"; + /* Aquila GPIO_14_CSI_2 */ + powerdown-gpios = <&main_gpio0 33 GPIO_ACTIVE_HIGH>; + /* Aquila GPIO_13_CSI_2 */ + reset-gpios = <&main_gpio0 32 GPIO_ACTIVE_LOW>; + + port { + csi2rx1_cam0: endpoint { + remote-endpoint = <&csi2rx1_in_sensor>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&ti_csi2rx1 { + status = "okay"; +}; |