Skip to content

Commit 6cddedb

Browse files
committed
dts: bindings: gpio: add arducam 20-pin camera connector
Add the 20-pin camera connector used by at least Arducam, Waveshare, Olimex, Arduino, NXP, ST, Adafruit that connects image sensor module boards and devkits. Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent cf6f9e3 commit 6cddedb

File tree

4 files changed

+96
-19
lines changed

4 files changed

+96
-19
lines changed

boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "frdm_mcxn947-pinctrl.dtsi"
88
#include <zephyr/dt-bindings/i2c/i2c.h>
99
#include <zephyr/dt-bindings/input/input-event-codes.h>
10+
#include <zephyr/dt-bindings/gpio/dvp-20pin-connector.h>
1011

1112
/ {
1213
aliases{
@@ -95,38 +96,22 @@ nxp_8080_touch_panel_i2c: &flexcomm2_lpi2c2 {
9596
pinctrl-0 = <&pinmux_flexcomm7_lpi2c>;
9697
pinctrl-names = "default";
9798
clock-frequency = <I2C_BITRATE_STANDARD>;
98-
ov7670: ov7670@21 {
99-
compatible = "ovti,ov7670";
100-
reset-gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
101-
pwdn-gpios = <&gpio1 18 GPIO_ACTIVE_HIGH>;
102-
reg = <0x21>;
103-
104-
port {
105-
ov7670_ep_out: endpoint {
106-
remote-endpoint-label = "sdma_ep_in";
107-
};
108-
};
109-
};
11099
};
111100

112101
/* SmartDMA is used for video driver on this board */
113102
&smartdma {
103+
/* Shields do not enable video-sdma parent node so enable it by default */
114104
status = "okay";
115105
program-mem = <0x4000000>;
106+
116107
video_sdma: video-sdma {
117-
status = "okay";
108+
status = "disabled";
118109
compatible = "nxp,video-smartdma";
119110
pinctrl-0 = <&pinmux_smartdma_camera>;
120111
pinctrl-names = "default";
121112
vsync-pin = <4>;
122113
hsync-pin = <11>;
123114
pclk-pin = <5>;
124-
125-
port {
126-
sdma_ep_in: endpoint {
127-
remote-endpoint-label = "ov7670_ep_out";
128-
};
129-
};
130115
};
131116
};
132117

@@ -300,3 +285,22 @@ zephyr_mipi_dbi_parallel: &flexio0_lcd {
300285
pinctrl-0 = <&pinmux_sctimer>;
301286
pinctrl-names = "default";
302287
};
288+
289+
/*
290+
* Connection with camera modules such as the dvp_20pin_ov7670 shield
291+
*/
292+
293+
/ {
294+
dvp_20pin_connector: dvp-20pin-connector {
295+
compatible = "arducam,dvp-20pin-connector";
296+
#gpio-cells = <2>;
297+
gpio-map-mask = <0xffffffff 0xffffffc0>;
298+
gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>;
299+
gpio-map = <DVP_20PIN_PEN 0 &gpio1 19 0>,
300+
<DVP_20PIN_PDN 0 &gpio1 18 0>;
301+
};
302+
};
303+
304+
dvp_20pin_i2c: &flexcomm7_lpi2c7 {};
305+
306+
dvp_20pin_interface: &video_sdma {};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2025 tinyVision.ai Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: |
5+
GPIO pins exposed on ArduCam 20-pin header camera connector,
6+
originally designed to connect Arducam modules to Arduino Giga R1,
7+
but further used by other vendors of camera and devkits.
8+
9+
The connector layout is depicted below:
10+
11+
1 3V3 2 GND
12+
3 SCL 4 SDA
13+
5 VS 6 HS
14+
7 PCLK 8 XCLK
15+
9 D7 10 D6
16+
11 D5 12 D4
17+
13 D3 14 D2
18+
15 D1 16 D0
19+
17 PEN 18 PDN
20+
19 GPIO0 20 GPIO1
21+
22+
In some variants, the last row containing the pins 19 and 20 is
23+
not present, and the module is only providing 18 pins out of 20.
24+
25+
The following node labels can be used in devicetree:
26+
27+
- dvp_20pin_interface: the video interface that receives the video
28+
feed and use with the zephyr,camera chosen node.
29+
30+
- dvp_20pin_i2c: the I2C device of the devkit on which the camera
31+
module is instantiated.
32+
33+
- dvp_20pin_connector: the GPIO nexus using the arducam,dvp-20pin-connector
34+
that defines the camera pins ('reset' (PEN), 'power-down' (PDN)...)
35+
36+
See <zephyr/dt-bindings/gpio/dvp-20pin-connector.h> for pin description.
37+
38+
compatible: "arducam,dvp-20pin-connector"
39+
40+
include: [gpio-nexus.yaml, base.yaml]

dts/bindings/vendor-prefixes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ arc Synopsys, Inc. (formerly ARC International PLC)
7070
archermind ArcherMind Technology (Nanjing) Co., Ltd.
7171
arctic Arctic Sand
7272
arcx arcx Inc. / Archronix Inc.
73+
arducam Arducam
7374
arduino Arduino
7475
aries Aries Embedded GmbH
7576
arm ARM Ltd.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2025 tinyVision.ai Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
#ifndef INCLUDE_ZEPHYR_DT_BINDINGS_GPIO_DVP_20PIN_CONNECTOR_H_
6+
#define INCLUDE_ZEPHYR_DT_BINDINGS_GPIO_DVP_20PIN_CONNECTOR_H_
7+
8+
/**
9+
* @name Arducam DVP 20-pin or 18-pin connector pinout
10+
* @{
11+
*/
12+
#define DVP_20PIN_SCL 3 /**< I2C pin */
13+
#define DVP_20PIN_SDA 4 /**< I2C pin */
14+
#define DVP_20PIN_VS 5 /**< Vertical sync */
15+
#define DVP_20PIN_HS 6 /**< Horizontal sync */
16+
#define DVP_20PIN_PCLK 7 /**< Pixel clock used to transmit the data */
17+
#define DVP_20PIN_XCLK 8 /**< System clock often needed for I2C communication */
18+
#define DVP_20PIN_D7 9 /**< Parallel port data */
19+
#define DVP_20PIN_D6 10 /**< Parallel port data */
20+
#define DVP_20PIN_D5 11 /**< Parallel port data */
21+
#define DVP_20PIN_D4 12 /**< Parallel port data */
22+
#define DVP_20PIN_D3 13 /**< Parallel port data */
23+
#define DVP_20PIN_D2 14 /**< Parallel port data */
24+
#define DVP_20PIN_D1 15 /**< Parallel port data */
25+
#define DVP_20PIN_D0 16 /**< Parallel port data */
26+
#define DVP_20PIN_PEN 17 /**< Power Enable */
27+
#define DVP_20PIN_PDN 18 /**< Power Down */
28+
#define DVP_20PIN_GPIO0 19 /**< Extra GPIO pin present on some modules */
29+
#define DVP_20PIN_GPIO1 20 /**< Extra GPIO pin present on some modules */
30+
/** @} */
31+
32+
#endif /* INCLUDE_ZEPHYR_DT_BINDINGS_GPIO_DVP_20PIN_CONNECTOR_H_ */

0 commit comments

Comments
 (0)