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