xref: /freebsd-src/sys/contrib/device-tree/Bindings/misc/ifm-csi.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotIFM camera sensor interface on mpc5200 LocalPlus bus
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible: "ifm,o2d-csi"
5*c66ec88fSEmmanuel Vadot- reg: specifies sensor chip select number and associated address range
6*c66ec88fSEmmanuel Vadot- interrupts: external interrupt line number and interrupt sense mode
7*c66ec88fSEmmanuel Vadot  of the interrupt line signaling frame valid events
8*c66ec88fSEmmanuel Vadot- gpios: three gpio-specifiers for "capture", "reset" and "master enable"
9*c66ec88fSEmmanuel Vadot  GPIOs (strictly in this order).
10*c66ec88fSEmmanuel Vadot- ifm,csi-clk-handle: the phandle to a node in the DT describing the sensor
11*c66ec88fSEmmanuel Vadot  clock generator. This node is usually a general purpose timer controller.
12*c66ec88fSEmmanuel Vadot- ifm,csi-addr-bus-width: address bus width (valid values are 16, 24, 25)
13*c66ec88fSEmmanuel Vadot- ifm,csi-data-bus-width: data bus width (valid values are 8 and 16)
14*c66ec88fSEmmanuel Vadot- ifm,csi-wait-cycles: sensor bus wait cycles
15*c66ec88fSEmmanuel Vadot
16*c66ec88fSEmmanuel VadotOptional properties:
17*c66ec88fSEmmanuel Vadot- ifm,csi-byte-swap: if this property is present, the byte swapping on
18*c66ec88fSEmmanuel Vadot  the bus will be enabled.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel VadotExample:
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadot	csi@3,0 {
23*c66ec88fSEmmanuel Vadot		compatible = "ifm,o2d-csi";
24*c66ec88fSEmmanuel Vadot		reg = <3 0 0x00100000>;		/* CS 3, 1 MiB range */
25*c66ec88fSEmmanuel Vadot		interrupts = <1 1 2>;		/* IRQ1, edge falling */
26*c66ec88fSEmmanuel Vadot
27*c66ec88fSEmmanuel Vadot		ifm,csi-clk-handle = <&timer7>;
28*c66ec88fSEmmanuel Vadot		gpios = <&gpio_simple 23 0	/* image_capture */
29*c66ec88fSEmmanuel Vadot			 &gpio_simple 26 0	/* image_reset */
30*c66ec88fSEmmanuel Vadot			 &gpio_simple 29 0>;	/* image_master_en */
31*c66ec88fSEmmanuel Vadot
32*c66ec88fSEmmanuel Vadot		ifm,csi-addr-bus-width = <24>;
33*c66ec88fSEmmanuel Vadot		ifm,csi-data-bus-width = <8>;
34*c66ec88fSEmmanuel Vadot		ifm,csi-wait-cycles = <0>;
35*c66ec88fSEmmanuel Vadot	};
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel VadotThe base address of the used chip select is specified in the
38*c66ec88fSEmmanuel Vadotranges property of the parent localbus node, for example:
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel Vadot	ranges = <0 0 0xff000000 0x01000000
41*c66ec88fSEmmanuel Vadot		  3 0 0xe3000000 0x00100000>;
42