Skip to contentSkip to conversation

powerpc/mpc5200: add dts files for ifm camera machines

PATCH New Anatolij Gustschin 2 participants 3 messages Aug 24, 2012 – Aug 30, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

Anatolij Gustschin

author maintainer
#0 lore raw

PATCH 1/2 powerpc/mpc5200: add dts files for ifm camera machines

Add common o2d dtsi file to reuse it for other configurations. Add machine compatible string to mpc5200 simple platform file. Add dts files for O2D, O2I, O2MNT, O2DNT2, O2D300 and O3DNT boards.

---
 arch/powerpc/boot/dts/o2d.dts                |   33 ++++++
 arch/powerpc/boot/dts/o2d.dtsi               |  139 ++++++++++++++++++++++++++
 arch/powerpc/boot/dts/o2d300.dts             |   52 ++++++++++
 arch/powerpc/boot/dts/o2dnt2.dts             |   48 +++++++++
 arch/powerpc/boot/dts/o2i.dts                |   33 ++++++
 arch/powerpc/boot/dts/o2mnt.dts              |   33 ++++++
 arch/powerpc/boot/dts/o3dnt.dts              |   48 +++++++++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |    1 +
 8 files changed, 387 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/o2d.dts
 create mode 100644 arch/powerpc/boot/dts/o2d.dtsi
 create mode 100644 arch/powerpc/boot/dts/o2d300.dts
 create mode 100644 arch/powerpc/boot/dts/o2dnt2.dts
 create mode 100644 arch/powerpc/boot/dts/o2i.dts
 create mode 100644 arch/powerpc/boot/dts/o2mnt.dts
 create mode 100644 arch/powerpc/boot/dts/o3dnt.dts
arch/powerpc/boot/dts/o2d.dts new file +33 -0
new file mode 100644
index 0000000..460064b
@@ -0,0 +1,33 @@
+/*
+ * O2D Device Tree Source
+ *
+ * Copyright (C) 2012 DENX Software Engineering
+ * Anatolij Gustschin <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/include/ "o2d.dtsi"
+
+/ {
+	model = "ifm,o2d";
+	compatible = "ifm,o2d";
+
+	localbus {
+		flash@0,0 {
+			partition@60000 {
+				label = "kernel";
+				reg = <0x00060000 0x00260000>;
+				read-only;
+			};
+			/* o2d specific partitions */
+                        partition@2c0000 {
+                                label = "o2d user defined";
+                                reg = <0x002c0000 0x00d40000>;
+                        };
+		};
+	};
+};
arch/powerpc/boot/dts/o2d.dtsi new file +139 -0

139 lines not on this page · raw message

arch/powerpc/boot/dts/o2d300.dts new file +52 -0

52 lines not on this page · raw message

arch/powerpc/boot/dts/o2dnt2.dts new file +48 -0

48 lines not on this page · raw message

arch/powerpc/boot/dts/o2i.dts new file +33 -0
new file mode 100644
index 0000000..e3cc99d
@@ -0,0 +1,33 @@
+/*
+ * O2I Device Tree Source
+ *
+ * Copyright (C) 2012 DENX Software Engineering
+ * Anatolij Gustschin <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/include/ "o2d.dtsi"
+
+/ {
+	model = "ifm,o2i";
+	compatible = "ifm,o2d";
+
+	localbus {
+		flash@0,0 {
+			partition@60000 {
+				label = "kernel";
+				reg = <0x00060000 0x00260000>;
+				read-only;
+			};
+			/* o2i specific partitions */
+			partition@2c0000 {
+				label = "o2i user defined";
+				reg = <0x002c0000 0x00d40000>;
+			};
+		};
+	};
+};
arch/powerpc/boot/dts/o2mnt.dts new file +33 -0
new file mode 100644
index 0000000..2fa4349
@@ -0,0 +1,33 @@
+/*
+ * O2MNT Device Tree Source
+ *
+ * Copyright (C) 2012 DENX Software Engineering
+ * Anatolij Gustschin <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/include/ "o2d.dtsi"
+
+/ {
+	model = "ifm,o2mnt";
+	compatible = "ifm,o2d";
+
+	localbus {
+		flash@0,0 {
+			partition@60000 {
+				label = "kernel";
+				reg = <0x00060000 0x00260000>;
+				read-only;
+			};
+			/* add o2mnt specific partitions */
+                        partition@2c0000 {
+                                label = "o2mnt user defined";
+                                reg = <0x002c0000 0x00d40000>;
+                        };
+		};
+	};
+};
arch/powerpc/boot/dts/o3dnt.dts new file +48 -0

48 lines not on this page · raw message

arch/powerpc/platforms/52xx/mpc5200_simple.c +1 -0
index c0aa040..9cf3602 100644
@@ -52,6 +52,7 @@ static void __init mpc5200_simple_setup_arch(void)
 static const char *board[] __initdata = {
 	"anonymous,a4m072",
 	"anon,charon",
+	"ifm,o2d",
 	"intercontrol,digsy-mtc",
 	"manroland,mucmc52",
 	"manroland,uc101",
Signature · 1 line
1.7.1
author maintainer
#1 lore raw

PATCH 2/2 dt/misc: add bindings documentation for ifm camera sensor interface

IFM O2D cameras use special sensor bus interface glue-logic to connect camera sensors to mpc5200 LocalPlus bus. Add device tree bindings documentation for it.

---
 Documentation/devicetree/bindings/misc/ifm-csi.txt |   41 ++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/misc/ifm-csi.txt
Documentation/devicetree/bindings/misc/ifm-csi.txt new file +41 -0
new file mode 100644
index 0000000..5bdfffb
@@ -0,0 +1,41 @@
+IFM camera sensor interface on mpc5200 LocalPlus bus
+
+Required properties:
+- compatible: "ifm,o2d-csi"
+- reg: specifies sensor chip select number and associated address range
+- interrupts: external interrupt line number and interrupt sense mode
+  of the interrupt line signaling frame valid events
+- gpios: three gpio-specifiers for "capture", "reset" and "master enable"
+  GPIOs (strictly in this order).
+- ifm,csi-clk-handle: the phandle to a node in the DT describing the sensor
+  clock generator. This node is usually a general purpose timer controller.
+- ifm,csi-addr-bus-width: address bus width (valid values are 16, 24, 25)
+- ifm,csi-data-bus-width: data bus width (valid values are 8 and 16)
+- ifm,csi-wait-cycles: sensor bus wait cycles
+
+Optional properties:
+- ifm,csi-byte-swap: if this property is present, the byte swapping on
+  the bus will be enabled.
+
+Example:
+
+	csi@3,0 {
+		compatible = "ifm,o2d-csi";
+		reg = <3 0 0x00100000>;		/* CS 3, 1 MiB range */
+		interrupts = <1 1 2>;		/* IRQ1, edge falling */
+
+		ifm,csi-clk-handle = <&timer7>;
+		gpios = <&gpio_simple 23 0	/* image_capture */
+			 &gpio_simple 26 0	/* image_reset */
+			 &gpio_simple 29 0>;	/* image_master_en */
+
+		ifm,csi-addr-bus-width = <24>;
+		ifm,csi-data-bus-width = <8>;
+		ifm,csi-wait-cycles = <0>;
+	};
+
+The base address of the used chip select is specified in the
+ranges property of the parent localbus node, for example:
+
+	ranges = <0 0 0xff000000 0x01000000
+		  3 0 0xe3000000 0x00100000>;
Signature · 1 line
1.7.1
#3 lore raw

PATCH v2 1/2 powerpc/mpc5200: add dts files for ifm camera machines

In reply to a message not in the archive

Add common o2d dtsi file to reuse it for other configurations. Add machine compatible string to mpc5200 simple platform file. Add dts files for O2D, O2I, O2MNT, O2DNT2, O2D300 and O3DNT boards.

---
v2:
- changed flash node description in o2d.dts and tested it on this board
- fixed white spaces in o2d.dts and o2mnt.dts files

 arch/powerpc/boot/dts/o2d.dts                |   47 +++++++++
 arch/powerpc/boot/dts/o2d.dtsi               |  139 ++++++++++++++++++++++++++
 arch/powerpc/boot/dts/o2d300.dts             |   52 ++++++++++
 arch/powerpc/boot/dts/o2dnt2.dts             |   48 +++++++++
 arch/powerpc/boot/dts/o2i.dts                |   33 ++++++
 arch/powerpc/boot/dts/o2mnt.dts              |   33 ++++++
 arch/powerpc/boot/dts/o3dnt.dts              |   48 +++++++++
 arch/powerpc/platforms/52xx/mpc5200_simple.c |    1 +
 8 files changed, 401 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/o2d.dts
 create mode 100644 arch/powerpc/boot/dts/o2d.dtsi
 create mode 100644 arch/powerpc/boot/dts/o2d300.dts
 create mode 100644 arch/powerpc/boot/dts/o2dnt2.dts
 create mode 100644 arch/powerpc/boot/dts/o2i.dts
 create mode 100644 arch/powerpc/boot/dts/o2mnt.dts
 create mode 100644 arch/powerpc/boot/dts/o3dnt.dts
arch/powerpc/boot/dts/o2d.dts new file +47 -0
new file mode 100644
index 0000000..9f6dd4d
@@ -0,0 +1,47 @@
+/*
+ * O2D Device Tree Source
+ *
+ * Copyright (C) 2012 DENX Software Engineering
+ * Anatolij Gustschin <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/include/ "o2d.dtsi"
+
+/ {
+	model = "ifm,o2d";
+	compatible = "ifm,o2d";
+
+	memory {
+		reg = <0x00000000 0x08000000>;  // 128MB
+	};
+
+	localbus {
+		ranges = <0 0 0xfc000000 0x02000000
+			  3 0 0xe3000000 0x00100000>;
+
+		flash@0,0 {
+			compatible = "cfi-flash";
+			reg = <0 0 0x02000000>;
+			bank-width = <2>;
+			device-width = <2>;
+			#size-cells = <1>;
+			#address-cells = <1>;
+
+			partition@60000 {
+				label = "kernel";
+				reg = <0x00060000 0x00260000>;
+				read-only;
+			};
+			/* o2d specific partitions */
+			partition@2c0000 {
+				label = "o2d user defined";
+				reg = <0x002c0000 0x01d40000>;
+			};
+		};
+	};
+};
arch/powerpc/boot/dts/o2d.dtsi new file +139 -0

139 lines not on this page · raw message

arch/powerpc/boot/dts/o2d300.dts new file +52 -0

52 lines not on this page · raw message

arch/powerpc/boot/dts/o2dnt2.dts new file +48 -0

48 lines not on this page · raw message

arch/powerpc/boot/dts/o2i.dts new file +33 -0
new file mode 100644
index 0000000..e3cc99d
@@ -0,0 +1,33 @@
+/*
+ * O2I Device Tree Source
+ *
+ * Copyright (C) 2012 DENX Software Engineering
+ * Anatolij Gustschin <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/include/ "o2d.dtsi"
+
+/ {
+	model = "ifm,o2i";
+	compatible = "ifm,o2d";
+
+	localbus {
+		flash@0,0 {
+			partition@60000 {
+				label = "kernel";
+				reg = <0x00060000 0x00260000>;
+				read-only;
+			};
+			/* o2i specific partitions */
+			partition@2c0000 {
+				label = "o2i user defined";
+				reg = <0x002c0000 0x00d40000>;
+			};
+		};
+	};
+};
arch/powerpc/boot/dts/o2mnt.dts new file +33 -0
new file mode 100644
index 0000000..d91859a
@@ -0,0 +1,33 @@
+/*
+ * O2MNT Device Tree Source
+ *
+ * Copyright (C) 2012 DENX Software Engineering
+ * Anatolij Gustschin <[email protected]>
+ *
+ * This program is free software; you can redistribute  it and/or modify it
+ * under  the terms of  the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the  License, or (at your
+ * option) any later version.
+ */
+
+/include/ "o2d.dtsi"
+
+/ {
+	model = "ifm,o2mnt";
+	compatible = "ifm,o2d";
+
+	localbus {
+		flash@0,0 {
+			partition@60000 {
+				label = "kernel";
+				reg = <0x00060000 0x00260000>;
+				read-only;
+			};
+			/* add o2mnt specific partitions */
+			partition@2c0000 {
+				label = "o2mnt user defined";
+				reg = <0x002c0000 0x00d40000>;
+			};
+		};
+	};
+};
arch/powerpc/boot/dts/o3dnt.dts new file +48 -0

48 lines not on this page · raw message

arch/powerpc/platforms/52xx/mpc5200_simple.c +1 -0
index c0aa040..9cf3602 100644
@@ -52,6 +52,7 @@ static void __init mpc5200_simple_setup_arch(void)
 static const char *board[] __initdata = {
 	"anonymous,a4m072",
 	"anon,charon",
+	"ifm,o2d",
 	"intercontrol,digsy-mtc",
 	"manroland,mucmc52",
 	"manroland,uc101",
Signature · 1 line
1.7.1