diff mbox series

[2/2] dt-bindings: pinctrl: add support for RZ/A1L

Message ID 20171003073334.18917-3-chris.brandt@renesas.com
State New
Headers show
Series pinctrl: rza1: add support for RZ/A1L | expand

Commit Message

Chris Brandt Oct. 3, 2017, 7:33 a.m. UTC
Compatible "r7s72102-ports" was added for RZ/A1L devices

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
---
 Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Geert Uytterhoeven Oct. 4, 2017, 1:58 p.m. UTC | #1
Hi Chris,

On Tue, Oct 3, 2017 at 9:33 AM, Chris Brandt <chris.brandt@renesas.com> wrote:
> Compatible "r7s72102-ports" was added for RZ/A1L devices
>
> Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
> ---
>  Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> index 43e21474528a..2a3366cee848 100644
> --- a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> @@ -13,7 +13,8 @@ Pin controller node
>
>  Required properties:
>    - compatible
> -    this shall be "renesas,r7s72100-ports".
> +    this shall be "renesas,r7s72100-ports" for RZ/A1H and RZ/A1M or
> +    "renesas,r7s72102-ports" for RZ/A1L

Shouldn't you also document "renesas,r7s72101-ports" for RZ/A1M?
You could use "renesas,r7s72100-ports" as a fallback property for RZ/A1M,
though.

BTW, is there a way to distinguish the various RZ/A1 SoCs at runtime?

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
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chris Brandt Oct. 4, 2017, 2:16 p.m. UTC | #2
Hi Geert,

On Wednesday, October 04, 2017, Geert Uytterhoeven wrote:
> >  Required properties:

> >    - compatible

> > -    this shall be "renesas,r7s72100-ports".

> > +    this shall be "renesas,r7s72100-ports" for RZ/A1H and RZ/A1M or

> > +    "renesas,r7s72102-ports" for RZ/A1L

> 

> Shouldn't you also document "renesas,r7s72101-ports" for RZ/A1M?


I was wondering if you were going to ask for that.

I put "for RZ/A1H and RZ/A1M" in the DT documentation, but if you 
prefer, I can also just add to pinctrl-rza1.c:

static const struct of_device_id rza1_pinctrl_of_match[] = {
	{
		/* RZ/A1H */
		.compatible	= "renesas,r7s72100-ports",
		.data		= &rza1h_pmx_conf,
	},
+	{
+		/* RZ/A1M */
+		.compatible	= "renesas,r7s72101-ports",
+		.data		= &rza1h_pmx_conf,
+	},	{
		/* RZ/A1L */
		.compatible	= "renesas,r7s72102-ports",
		.data		= &rza1l_pmx_conf,
	},
	{ }
};



> You could use "renesas,r7s72100-ports" as a fallback property for RZ/A1M,

> though.


Do you mean in the DT? Or in pinctrl-rza1.c?

> BTW, is there a way to distinguish the various RZ/A1 SoCs at runtime?


Sadly there is not.

There is a unique ID number, but it is only accessible via JTAG 
externally.

Internally, you would have to look for registers that don't exist (for 
the RZ/A1L). But for RZ/A1H vs RZ/A1M, the only actual difference is the 
amount of RAM, so you would have to do a set-and-test method on RAM.


Chris
Geert Uytterhoeven Oct. 4, 2017, 2:27 p.m. UTC | #3
Hi Chris,

On Wed, Oct 4, 2017 at 4:16 PM, Chris Brandt <Chris.Brandt@renesas.com> wrote:
> On Wednesday, October 04, 2017, Geert Uytterhoeven wrote:
>> >  Required properties:
>> >    - compatible
>> > -    this shall be "renesas,r7s72100-ports".
>> > +    this shall be "renesas,r7s72100-ports" for RZ/A1H and RZ/A1M or
>> > +    "renesas,r7s72102-ports" for RZ/A1L
>>
>> Shouldn't you also document "renesas,r7s72101-ports" for RZ/A1M?
>
> I was wondering if you were going to ask for that.

:-)

> I put "for RZ/A1H and RZ/A1M" in the DT documentation, but if you
> prefer, I can also just add to pinctrl-rza1.c:
>
> static const struct of_device_id rza1_pinctrl_of_match[] = {
>         {
>                 /* RZ/A1H */
>                 .compatible     = "renesas,r7s72100-ports",
>                 .data           = &rza1h_pmx_conf,
>         },
> +       {
> +               /* RZ/A1M */
> +               .compatible     = "renesas,r7s72101-ports",
> +               .data           = &rza1h_pmx_conf,
> +       },      {
>                 /* RZ/A1L */
>                 .compatible     = "renesas,r7s72102-ports",
>                 .data           = &rza1l_pmx_conf,
>         },
>         { }
> };
>
>
>
>> You could use "renesas,r7s72100-ports" as a fallback property for RZ/A1M,
>> though.
>
> Do you mean in the DT? Or in pinctrl-rza1.c?

I mean in DT, i.e.:

        pinctrl: pin-controller@fcfe3000 {
                compatible = "renesas,r7s72101-ports", "renesas,r7s72100-ports";
                ...

That way you don't have to extend the pinctrl driver.

>> BTW, is there a way to distinguish the various RZ/A1 SoCs at runtime?
>
> Sadly there is not.
>
> There is a unique ID number, but it is only accessible via JTAG
> externally.
>
> Internally, you would have to look for registers that don't exist (for
> the RZ/A1L). But for RZ/A1H vs RZ/A1M, the only actual difference is the
> amount of RAM, so you would have to do a set-and-test method on RAM.

If RZ/A1H and RZ/A1M differ in the amount of RAM only, I think you can
just consider them the same, though, and use the same DTS (assumed
the boot loader fills/corrects in the memory node).

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
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chris Brandt Oct. 4, 2017, 2:43 p.m. UTC | #4
Hi Geert,

To be clear:

On Wednesday, October 04, 2017 1, Geert Uytterhoeven wrote:
> >> You could use "renesas,r7s72100-ports" as a fallback property for

> RZ/A1M,

> >> though.

> >

> > Do you mean in the DT? Or in pinctrl-rza1.c?

> 

> I mean in DT, i.e.:

> 

>         pinctrl: pin-controller@fcfe3000 {

>                 compatible = "renesas,r7s72101-ports", "renesas,r7s72100-

> ports";

>                 ...

> 

> That way you don't have to extend the pinctrl driver.


I will submit a v2 with:

[ renesas,rza1-pinctrl.txt ]

Required properties:
  - compatible
    this shall be "renesas,r7s72100-ports" for RZ/A1H, 
    "renesas,r7s72101-ports" for RZ/M or
    "renesas,r7s72102-ports" for RZ/A1L


[ r7s72100.dtsi ]
	pinctrl: pin-controller@fcfe3000 {
		compatible = "renesas,r7s72101-ports", "renesas,r7s72100-ports";


[ pinctrl-rza1.c ] 
  No change from V1



Unless you say something different, I will submit a V2 in a little 
while.

As always, thank you for your guidance!

Chris
Geert Uytterhoeven Oct. 4, 2017, 2:49 p.m. UTC | #5
Hi Chris,

On Wed, Oct 4, 2017 at 4:43 PM, Chris Brandt <Chris.Brandt@renesas.com> wrote:
> To be clear:
>
> On Wednesday, October 04, 2017 1, Geert Uytterhoeven wrote:
>> >> You could use "renesas,r7s72100-ports" as a fallback property for
>> RZ/A1M,
>> >> though.
>> >
>> > Do you mean in the DT? Or in pinctrl-rza1.c?
>>
>> I mean in DT, i.e.:
>>
>>         pinctrl: pin-controller@fcfe3000 {
>>                 compatible = "renesas,r7s72101-ports", "renesas,r7s72100-
>> ports";
>>                 ...
>>
>> That way you don't have to extend the pinctrl driver.
>
> I will submit a v2 with:
>
> [ renesas,rza1-pinctrl.txt ]
>
> Required properties:
>   - compatible
>     this shall be "renesas,r7s72100-ports" for RZ/A1H,
>     "renesas,r7s72101-ports" for RZ/M or

... with a fallback for "renesas,r7s72100-ports, as RZ/A1M is compatible
with RZ/A1H (and I assume RZ/A1H is the predecessor?).

>     "renesas,r7s72102-ports" for RZ/A1L
>
>
> [ r7s72100.dtsi ]
>         pinctrl: pin-controller@fcfe3000 {
>                 compatible = "renesas,r7s72101-ports", "renesas,r7s72100-ports";

I meant in r7s72101.dtsi (which we don't have!).

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
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chris Brandt Oct. 4, 2017, 2:57 p.m. UTC | #6
SGkgR2VlcnQsDQoNCk9uIFdlZG5lc2RheSwgT2N0b2JlciAwNCwgMjAxNyAxLCBHZWVydCBVeXR0
ZXJob2V2ZW4gd3JvdGU6DQo+ID4gSSB3aWxsIHN1Ym1pdCBhIHYyIHdpdGg6DQo+ID4NCj4gPiBb
IHJlbmVzYXMscnphMS1waW5jdHJsLnR4dCBdDQo+ID4NCj4gPiBSZXF1aXJlZCBwcm9wZXJ0aWVz
Og0KPiA+ICAgLSBjb21wYXRpYmxlDQo+ID4gICAgIHRoaXMgc2hhbGwgYmUgInJlbmVzYXMscjdz
NzIxMDAtcG9ydHMiIGZvciBSWi9BMUgsDQo+ID4gICAgICJyZW5lc2FzLHI3czcyMTAxLXBvcnRz
IiBmb3IgUlovTSBvcg0KPiANCj4gLi4uIHdpdGggYSBmYWxsYmFjayBmb3IgInJlbmVzYXMscjdz
NzIxMDAtcG9ydHMsIGFzIFJaL0ExTSBpcyBjb21wYXRpYmxlDQo+IHdpdGggUlovQTFIIChhbmQg
SSBhc3N1bWUgUlovQTFIIGlzIHRoZSBwcmVkZWNlc3Nvcj8pLg0KDQpPSy4NCg0KKGFuZCB5ZXMs
IFJaL0ExSCB3YXMgdGhlIHByZWRlY2Vzc29yIG9mIFJaL0ExTSkNCg0KDQo+ID4gICAgICJyZW5l
c2FzLHI3czcyMTAyLXBvcnRzIiBmb3IgUlovQTFMDQo+ID4NCj4gPg0KPiA+IFsgcjdzNzIxMDAu
ZHRzaSBdDQo+ID4gICAgICAgICBwaW5jdHJsOiBwaW4tY29udHJvbGxlckBmY2ZlMzAwMCB7DQo+
ID4gICAgICAgICAgICAgICAgIGNvbXBhdGlibGUgPSAicmVuZXNhcyxyN3M3MjEwMS1wb3J0cyIs
DQo+ICJyZW5lc2FzLHI3czcyMTAwLXBvcnRzIjsNCj4gDQo+IEkgbWVhbnQgaW4gcjdzNzIxMDEu
ZHRzaSAod2hpY2ggd2UgZG9uJ3QgaGF2ZSEpLg0KDQpPaGhoaGgsIEkgc2VlICA6KQ0KDQoNClRo
YW5rIHlvdS4NCg0KQ2hyaXMNCg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
index 43e21474528a..2a3366cee848 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
@@ -13,7 +13,8 @@  Pin controller node
 
 Required properties:
   - compatible
-    this shall be "renesas,r7s72100-ports".
+    this shall be "renesas,r7s72100-ports" for RZ/A1H and RZ/A1M or
+    "renesas,r7s72102-ports" for RZ/A1L
 
   - reg
     address base and length of the memory area where the pin controller