Message ID | 1535029653-7418-4-git-send-email-fabrizio.castro@bp.renesas.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Series | Add CAN support to rcar_can driver | expand |
On Thu, Aug 23, 2018 at 02:07:33PM +0100, Fabrizio Castro wrote: > Document RZ/G2M (r8a774a1) SoC specific bindings and RZ/G2 > generic bindings. > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com> > Signed-off-by: Chris Paterson <Chris.Paterson2@renesas.com> > Reviewed-by: Biju Das <biju.das@bp.renesas.com> Are we sure these clocks are for all RZ/G2 SoCs? If so: Reviewed-by: Simon Horman <horms+renesas@verge.net.au> > --- > > This patch applies on next-20180823 > > Documentation/devicetree/bindings/net/can/rcar_can.txt | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt > index 94a7f33..ae8fccc 100644 > --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt > +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt > @@ -4,6 +4,7 @@ Renesas R-Car CAN controller Device Tree Bindings > Required properties: > - compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC. > "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC. > + "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC. > "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. > @@ -17,6 +18,7 @@ Required properties: > "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1 > compatible device. > "renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device. > + "renesas,rzg-gen2-can" for a generic RZ/G2 compatible device. > When compatible with the generic version, nodes must list the > SoC-specific version corresponding to the platform first > followed by the generic version. > @@ -24,7 +26,9 @@ Required properties: > - 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". > +- clock-names: 2 clock input name strings for RZ/G2: "clkp1", "can_clk". > + 3 clock input name strings for every other SoC: "clkp1", "clkp2", > + "can_clk". > - pinctrl-0: pin control group to be used for this controller. > - pinctrl-names: must be "default". > > @@ -41,8 +45,9 @@ using the below properties: > 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 > + <0x1> : Peripheral clock (clkp2) (not supported by > + RZ/G2 devices) > + <0x3> : External input clock > > Example > ------- > -- > 2.7.4 >
Hello Simon, Thank you for your feedback! > Subject: Re: [PATCH 3/3] dt-bindings: can: rcar_can: Add r8a774a1 support > > On Thu, Aug 23, 2018 at 02:07:33PM +0100, Fabrizio Castro wrote: > > Document RZ/G2M (r8a774a1) SoC specific bindings and RZ/G2 > > generic bindings. > > > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com> > > Signed-off-by: Chris Paterson <Chris.Paterson2@renesas.com> > > Reviewed-by: Biju Das <biju.das@bp.renesas.com> > > Are we sure these clocks are for all RZ/G2 SoCs? Yeah, that's the expectation. Thanks, Fab > If so: > > Reviewed-by: Simon Horman <horms+renesas@verge.net.au> > > > --- > > > > This patch applies on next-20180823 > > > > Documentation/devicetree/bindings/net/can/rcar_can.txt | 11 ++++++++--- > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt > > index 94a7f33..ae8fccc 100644 > > --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt > > +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt > > @@ -4,6 +4,7 @@ Renesas R-Car CAN controller Device Tree Bindings > > Required properties: > > - compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC. > > "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC. > > + "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC. > > "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. > > @@ -17,6 +18,7 @@ Required properties: > > "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1 > > compatible device. > > "renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device. > > + "renesas,rzg-gen2-can" for a generic RZ/G2 compatible device. > > When compatible with the generic version, nodes must list the > > SoC-specific version corresponding to the platform first > > followed by the generic version. > > @@ -24,7 +26,9 @@ Required properties: > > - 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". > > +- clock-names: 2 clock input name strings for RZ/G2: "clkp1", "can_clk". > > + 3 clock input name strings for every other SoC: "clkp1", "clkp2", > > + "can_clk". > > - pinctrl-0: pin control group to be used for this controller. > > - pinctrl-names: must be "default". > > > > @@ -41,8 +45,9 @@ using the below properties: > > 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 > > + <0x1> : Peripheral clock (clkp2) (not supported by > > + RZ/G2 devices) > > + <0x3> : External input clock > > > > Example > > ------- > > -- > > 2.7.4 > > Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
Hi Fabrizio, On Thu, Aug 23, 2018 at 3:08 PM Fabrizio Castro <fabrizio.castro@bp.renesas.com> wrote:> > Document RZ/G2M (r8a774a1) SoC specific bindings and RZ/G2 > generic bindings. > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com> > Signed-off-by: Chris Paterson <Chris.Paterson2@renesas.com> > Reviewed-by: Biju Das <biju.das@bp.renesas.com> Thanks for your patch! > --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt > +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt > @@ -4,6 +4,7 @@ Renesas R-Car CAN controller Device Tree Bindings > Required properties: > - compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC. > "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC. > + "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC. Looks good to me. > "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. > @@ -17,6 +18,7 @@ Required properties: > "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1 > compatible device. > "renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device. > + "renesas,rzg-gen2-can" for a generic RZ/G2 compatible device. AFAIK, the actual CAN module in RZ/G2M is fully compatible with the CAN module in R-Car Gen3 SoCs. The lack of clkp2 is merely an integration difference: as RZ/G2 SoCs do not have the CANFD module, and their CPG block doesn't provide the CANFD clock (so the CAN device node in DT cannot refer to that clock anyway). Hence I don't think there's a need to introduce a "renesas,rzg-gen2-can" compatible value. > When compatible with the generic version, nodes must list the > SoC-specific version corresponding to the platform first > followed by the generic version. > @@ -24,7 +26,9 @@ Required properties: > - 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. You still have "3" here. Perhaps "Must contain a phandle and clock-specifier pair for each entry in clock-names."? > -- clock-names: 3 clock input name strings: "clkp1", "clkp2", "can_clk". > +- clock-names: 2 clock input name strings for RZ/G2: "clkp1", "can_clk". > + 3 clock input name strings for every other SoC: "clkp1", "clkp2", > + "can_clk". OK. > @@ -41,8 +45,9 @@ using the below properties: > 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 > + <0x1> : Peripheral clock (clkp2) (not supported by > + RZ/G2 devices) > + <0x3> : External input clock I already expressed my feelings about this property in my reply to the first patch ;-) Gr{oetje,eeting}s, Geert
Hello Geert, Thank you for your feedback. > Subject: Re: [PATCH 3/3] dt-bindings: can: rcar_can: Add r8a774a1 support > > Hi Fabrizio, > > On Thu, Aug 23, 2018 at 3:08 PM Fabrizio Castro > <fabrizio.castro@bp.renesas.com> wrote:> > > Document RZ/G2M (r8a774a1) SoC specific bindings and RZ/G2 > > generic bindings. > > > > Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com> > > Signed-off-by: Chris Paterson <Chris.Paterson2@renesas.com> > > Reviewed-by: Biju Das <biju.das@bp.renesas.com> > > Thanks for your patch! > > > --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt > > +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt > > @@ -4,6 +4,7 @@ Renesas R-Car CAN controller Device Tree Bindings > > Required properties: > > - compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC. > > "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC. > > + "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC. > > Looks good to me. > > > "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. > > @@ -17,6 +18,7 @@ Required properties: > > "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1 > > compatible device. > > "renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device. > > + "renesas,rzg-gen2-can" for a generic RZ/G2 compatible device. > > AFAIK, the actual CAN module in RZ/G2M is fully compatible with the CAN > module in R-Car Gen3 SoCs. The lack of clkp2 is merely an integration > difference: as RZ/G2 SoCs do not have the CANFD module, and their CPG block > doesn't provide the CANFD clock (so the CAN device node in DT cannot refer > to that clock anyway). > > Hence I don't think there's a need to introduce a "renesas,rzg-gen2-can" > compatible value. Agreed, will drop RZ/G2 specific compatible string. > > > When compatible with the generic version, nodes must list the > > SoC-specific version corresponding to the platform first > > followed by the generic version. > > @@ -24,7 +26,9 @@ Required properties: > > - 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. > > You still have "3" here. Perhaps > "Must contain a phandle and clock-specifier pair for each entry in > clock-names."? Good spot, we overlooked it. > > > -- clock-names: 3 clock input name strings: "clkp1", "clkp2", "can_clk". > > +- clock-names: 2 clock input name strings for RZ/G2: "clkp1", "can_clk". > > + 3 clock input name strings for every other SoC: "clkp1", "clkp2", > > + "can_clk". > > OK. > > > @@ -41,8 +45,9 @@ using the below properties: > > 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 > > + <0x1> : Peripheral clock (clkp2) (not supported by > > + RZ/G2 devices) > > + <0x3> : External input clock > > I already expressed my feelings about this property in my reply to the first > patch ;-) I know, I am not super happy about it either, maybe we will get a proper solution for this at some point in the future. Thanks, Fab > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt index 94a7f33..ae8fccc 100644 --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt @@ -4,6 +4,7 @@ Renesas R-Car CAN controller Device Tree Bindings Required properties: - compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC. "renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC. + "renesas,can-r8a774a1" if CAN controller is a part of R8A774A1 SoC. "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. @@ -17,6 +18,7 @@ Required properties: "renesas,rcar-gen2-can" for a generic R-Car Gen2 or RZ/G1 compatible device. "renesas,rcar-gen3-can" for a generic R-Car Gen3 compatible device. + "renesas,rzg-gen2-can" for a generic RZ/G2 compatible device. When compatible with the generic version, nodes must list the SoC-specific version corresponding to the platform first followed by the generic version. @@ -24,7 +26,9 @@ Required properties: - 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". +- clock-names: 2 clock input name strings for RZ/G2: "clkp1", "can_clk". + 3 clock input name strings for every other SoC: "clkp1", "clkp2", + "can_clk". - pinctrl-0: pin control group to be used for this controller. - pinctrl-names: must be "default". @@ -41,8 +45,9 @@ using the below properties: 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 + <0x1> : Peripheral clock (clkp2) (not supported by + RZ/G2 devices) + <0x3> : External input clock Example -------