devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] rcar_can: document device tree bindings
@ 2014-07-31 21:24 Sergei Shtylyov
  2014-07-31 21:31 ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2014-07-31 21:24 UTC (permalink / raw)
  To: robh+dt, pawel.moll, mark.rutland, ijc+devicetree, galak,
	devicetree
  Cc: netdev, wg, mkl, linux-can, linux-sh, vksavl

Document the R-Car CAN device tree bindings.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
The patch is against the 'linux-can-next.git' repo.

Changes in version 2:
- new patch, split from the driver's device tree support patch;
- adjusted "clocks" property to refer to 3 clocks instead of 1;
- added mandatory "clock-names" property;
- renamed the "clock-select" property to "renesas,can-clock-select".

 Documentation/devicetree/bindings/net/can/rcar_can.txt |   43 +++++++++++++++++
 1 file changed, 43 insertions(+)

Index: linux-can-next/Documentation/devicetree/bindings/net/can/rcar_can.txt
===================================================================
--- /dev/null
+++ linux-can-next/Documentation/devicetree/bindings/net/can/rcar_can.txt
@@ -0,0 +1,43 @@
+Renesas R-Car CAN controller Device Tree Bindings
+-------------------------------------------------
+
+Required properties:
+- compatible: "renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
+	      "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
+	      "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
+	      "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
+- reg: physical base address and size of the R-Car CAN register map.
+- interrupts: interrupt specifier for the sole interrupt.
+- clocks: phandles and clock specifiers for 3 CAN clock inputs.
+- clock-names: 3 clock input name strings: "clkp1", "clkp2", "can_clk".
+- pinctrl-0: pin control group to be used for this controller.
+- pinctrl-names: must be "default".
+
+Optional properties:
+- renesas,can-clock-select: R-Car CAN Clock Source Select. Valid values are:
+			    <0x0> (default) : Peripheral clock (clkp1)
+			    <0x1> : Peripheral clock (clkp2)
+			    <0x3> : Externally input clock
+
+Example
+-------
+
+SoC common .dtsi file:
+
+	can0: can@e6e80000 {
+		compatible = "renesas,can-r8a7791";
+		reg = <0 0xe6e80000 0 0x1000>;
+		interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
+		       	 <&cpg_clocks R8A7791_CLK_RCAN>, <&can_clk>;
+		clock-names = "clkp1", "clkp2", "can_clk";
+		status = "disabled";
+	};
+
+Board specific .dts file:
+
+&can0 {
+	pinctrl-0 = <&can0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-14 10:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-31 21:24 [PATCH v3 1/2] rcar_can: document device tree bindings Sergei Shtylyov
2014-07-31 21:31 ` Marc Kleine-Budde
2014-08-04 17:20   ` Sergei Shtylyov
2014-08-05  6:15     ` Marc Kleine-Budde
2014-08-14 10:07   ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).