diff mbox

[v6,1/3] can: Allwinner A10/A20 CAN Controller support - Devicetree bindings

Message ID 1442235299-5885-2-git-send-email-info@gerhard-bertelsmann.de
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Gerhard Bertelsmann Sept. 14, 2015, 12:54 p.m. UTC
Signed-off-by: Gerhard Bertelsmann <info@gerhard-bertelsmann.de>
---

 .../devicetree/bindings/net/can/sun4i_can.txt      |  37 +
 1 files changed, 37 insertions(+)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Maxime Ripard Sept. 14, 2015, 1:30 p.m. UTC | #1
Hi,

On Mon, Sep 14, 2015 at 02:58:21PM +0200, Marc Kleine-Budde wrote:
> On 09/14/2015 02:54 PM, Gerhard Bertelsmann wrote:
> > Signed-off-by: Gerhard Bertelsmann <info@gerhard-bertelsmann.de>
> > ---
> > 
> >  .../devicetree/bindings/net/can/sun4i_can.txt      |  37 +
> >  1 files changed, 37 insertions(+)
> > 
> > 
> > diff --git a/Documentation/devicetree/bindings/net/can/sun4i_can.txt b/Documentation/devicetree/bindings/net/can/sun4i_can.txt
> > new file mode 100644
> > index 0000000..b572e2b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/can/sun4i_can.txt
> > @@ -0,0 +1,37 @@
> > +Allwinner A10/A20 CAN controller Device Tree Bindings
> > +-----------------------------------------------------
> > +
> > +Required properties:
> > +- compatible: "allwinner,sunxican"
> > +- reg: physical base address and size of the Allwinner A10/A20 CAN register map.
> > +- interrupts: interrupt specifier for the sole interrupt.
> > +- clock: phandle and clock specifier.
> > +
> > +Example
> > +-------
> > +
> > +SoC common .dtsi file:
> > +
> > +	can0_pins_a: can0 <at> 0 {
> 
> That's supposed to be a proper "@":
> 
>     can0@0
> 
> > +		allwinner,pins = "PH20","PH21";
> > +		allwinner,function = "can";
> > +		allwinner,drive = <0>;
> > +		allwinner,pull = <0>;
> > +	};
> > +
> > +	can0: can <at> 01c2bc00 {
> 
>     can0@01c2bc00

Actually, beside '<at>' vs '@', he was right.

The name of the node in the DT should be:

<device class>@<address>

Which in our case is can@01c2bc00, like he used.

> 
> > +		compatible = "allwinner,sunxican";

However, the compatible is still not right.

Maxime
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/net/can/sun4i_can.txt b/Documentation/devicetree/bindings/net/can/sun4i_can.txt
new file mode 100644
index 0000000..b572e2b
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/can/sun4i_can.txt
@@ -0,0 +1,37 @@ 
+Allwinner A10/A20 CAN controller Device Tree Bindings
+-----------------------------------------------------
+
+Required properties:
+- compatible: "allwinner,sunxican"
+- reg: physical base address and size of the Allwinner A10/A20 CAN register map.
+- interrupts: interrupt specifier for the sole interrupt.
+- clock: phandle and clock specifier.
+
+Example
+-------
+
+SoC common .dtsi file:
+
+	can0_pins_a: can0 <at> 0 {
+		allwinner,pins = "PH20","PH21";
+		allwinner,function = "can";
+		allwinner,drive = <0>;
+		allwinner,pull = <0>;
+	};
+
+	can0: can <at> 01c2bc00 {
+		compatible = "allwinner,sunxican";
+		reg = <0x01c2bc00 0x400>;
+		interrupts = <0 26 4>;
+		clocks = <&apb1_gates 4>;
+		status = "disabled";
+	};
+
+Board specific .dts file:
+
+	can0: can <at> 01c2bc00 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&can0_pins_a>;
+		status = "okay";
+	};
+