* [PATCH v2 0/2] pinctrl: rza1: add support for RZ/A1L
@ 2017-10-04 16:31 Chris Brandt
2017-10-04 16:31 ` [PATCH v2 1/2] " Chris Brandt
2017-10-04 16:31 ` [PATCH v2 2/2] dt-bindings: pinctrl: add support for RZ/A1M and RZ/A1L Chris Brandt
0 siblings, 2 replies; 4+ messages in thread
From: Chris Brandt @ 2017-10-04 16:31 UTC (permalink / raw)
To: Linus Walleij, Rob Herring, Mark Rutland, Geert Uytterhoeven
Cc: linux-gpio, devicetree, linux-renesas-soc, Simon Horman,
Jacopo Mondi, Chris Brandt
The RZ/A series has 3 main device: RZ/A1L, RZ/A1M, RZ/A1H.
In terms of pinctrl, RZ/A1H and RZ/A1M are exactly the same.
Aspects like the number of ports and the location where peripherals are
brought out differ between the RZ/A1H and RZ/A1L.
Basically this series adds a new set of tables for RZ/A1L and a new
compatible "renesas,r7s72102-ports"
This was tested on a Renesas Stream it board which contains an RZ/A1L and
external SDRAM.
v2:
* Added RZ/A1M to DT documentation
* Added Reviewed-by for pinctrl-rza1.c
Chris Brandt (2):
pinctrl: rza1: add support for RZ/A1L
dt-bindings: pinctrl: add support for RZ/A1M and RZ/A1L
.../bindings/pinctrl/renesas,rza1-pinctrl.txt | 4 +-
drivers/pinctrl/pinctrl-rza1.c | 134 +++++++++++++++++++++
2 files changed, 137 insertions(+), 1 deletion(-)
--
2.14.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] pinctrl: rza1: add support for RZ/A1L
2017-10-04 16:31 [PATCH v2 0/2] pinctrl: rza1: add support for RZ/A1L Chris Brandt
@ 2017-10-04 16:31 ` Chris Brandt
2017-10-04 16:31 ` [PATCH v2 2/2] dt-bindings: pinctrl: add support for RZ/A1M and RZ/A1L Chris Brandt
1 sibling, 0 replies; 4+ messages in thread
From: Chris Brandt @ 2017-10-04 16:31 UTC (permalink / raw)
To: Linus Walleij, Rob Herring, Mark Rutland, Geert Uytterhoeven
Cc: linux-gpio, devicetree, linux-renesas-soc, Simon Horman,
Jacopo Mondi, Chris Brandt
Aspects like the number of ports and the location where peripherals are
brought out differ between the RZ/A1H and RZ/A1L.
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
v2:
* added Reviewed-by
---
drivers/pinctrl/pinctrl-rza1.c | 134 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 134 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
index 04d058706b80..717c0f4449a0 100644
--- a/drivers/pinctrl/pinctrl-rza1.c
+++ b/drivers/pinctrl/pinctrl-rza1.c
@@ -302,6 +302,134 @@ static const struct rza1_pinmux_conf rza1h_pmx_conf = {
.swio_entries = rza1h_swio_entries,
};
+/* ----------------------------------------------------------------------------
+ * RZ/A1L (r7s72102) pinmux flags
+ */
+
+static const struct rza1_bidir_pin rza1l_bidir_pins_p1[] = {
+ { .pin = 0, .func = 1 },
+ { .pin = 1, .func = 1 },
+ { .pin = 2, .func = 1 },
+ { .pin = 3, .func = 1 },
+ { .pin = 4, .func = 1 },
+ { .pin = 5, .func = 1 },
+ { .pin = 6, .func = 1 },
+ { .pin = 7, .func = 1 },
+};
+
+static const struct rza1_bidir_pin rza1l_bidir_pins_p3[] = {
+ { .pin = 0, .func = 2 },
+ { .pin = 1, .func = 2 },
+ { .pin = 2, .func = 2 },
+ { .pin = 4, .func = 2 },
+ { .pin = 5, .func = 2 },
+ { .pin = 10, .func = 2 },
+ { .pin = 11, .func = 2 },
+ { .pin = 12, .func = 2 },
+ { .pin = 13, .func = 2 },
+};
+
+static const struct rza1_bidir_pin rza1l_bidir_pins_p4[] = {
+ { .pin = 1, .func = 4 },
+ { .pin = 2, .func = 2 },
+ { .pin = 3, .func = 2 },
+ { .pin = 6, .func = 2 },
+ { .pin = 7, .func = 2 },
+};
+
+static const struct rza1_bidir_pin rza1l_bidir_pins_p5[] = {
+ { .pin = 0, .func = 1 },
+ { .pin = 1, .func = 1 },
+ { .pin = 2, .func = 1 },
+ { .pin = 3, .func = 1 },
+ { .pin = 4, .func = 1 },
+ { .pin = 5, .func = 1 },
+ { .pin = 6, .func = 1 },
+ { .pin = 7, .func = 1 },
+ { .pin = 8, .func = 1 },
+ { .pin = 9, .func = 1 },
+ { .pin = 10, .func = 1 },
+ { .pin = 11, .func = 1 },
+ { .pin = 12, .func = 1 },
+ { .pin = 13, .func = 1 },
+ { .pin = 14, .func = 1 },
+ { .pin = 15, .func = 1 },
+ { .pin = 0, .func = 2 },
+ { .pin = 1, .func = 2 },
+ { .pin = 2, .func = 2 },
+ { .pin = 3, .func = 2 },
+};
+
+static const struct rza1_bidir_pin rza1l_bidir_pins_p6[] = {
+ { .pin = 0, .func = 1 },
+ { .pin = 1, .func = 1 },
+ { .pin = 2, .func = 1 },
+ { .pin = 3, .func = 1 },
+ { .pin = 4, .func = 1 },
+ { .pin = 5, .func = 1 },
+ { .pin = 6, .func = 1 },
+ { .pin = 7, .func = 1 },
+ { .pin = 8, .func = 1 },
+ { .pin = 9, .func = 1 },
+ { .pin = 10, .func = 1 },
+ { .pin = 11, .func = 1 },
+ { .pin = 12, .func = 1 },
+ { .pin = 13, .func = 1 },
+ { .pin = 14, .func = 1 },
+ { .pin = 15, .func = 1 },
+};
+
+static const struct rza1_bidir_pin rza1l_bidir_pins_p7[] = {
+ { .pin = 2, .func = 2 },
+ { .pin = 3, .func = 2 },
+ { .pin = 5, .func = 2 },
+ { .pin = 6, .func = 2 },
+ { .pin = 7, .func = 2 },
+ { .pin = 2, .func = 3 },
+ { .pin = 3, .func = 3 },
+ { .pin = 5, .func = 3 },
+ { .pin = 6, .func = 3 },
+ { .pin = 7, .func = 3 },
+};
+
+static const struct rza1_bidir_pin rza1l_bidir_pins_p9[] = {
+ { .pin = 1, .func = 2 },
+ { .pin = 0, .func = 3 },
+ { .pin = 1, .func = 3 },
+ { .pin = 3, .func = 3 },
+ { .pin = 4, .func = 3 },
+ { .pin = 5, .func = 3 },
+};
+
+static const struct rza1_swio_pin rza1l_swio_pins[] = {
+ { .port = 2, .pin = 8, .func = 2, .input = 0 },
+ { .port = 5, .pin = 6, .func = 3, .input = 0 },
+ { .port = 6, .pin = 6, .func = 3, .input = 0 },
+ { .port = 6, .pin = 10, .func = 3, .input = 0 },
+ { .port = 7, .pin = 10, .func = 2, .input = 0 },
+ { .port = 8, .pin = 2, .func = 3, .input = 0 },
+};
+
+static const struct rza1_bidir_entry rza1l_bidir_entries[RZA1_NPORTS] = {
+ [1] = { ARRAY_SIZE(rza1l_bidir_pins_p1), rza1l_bidir_pins_p1 },
+ [3] = { ARRAY_SIZE(rza1l_bidir_pins_p3), rza1l_bidir_pins_p3 },
+ [4] = { ARRAY_SIZE(rza1l_bidir_pins_p4), rza1l_bidir_pins_p4 },
+ [5] = { ARRAY_SIZE(rza1l_bidir_pins_p4), rza1l_bidir_pins_p5 },
+ [6] = { ARRAY_SIZE(rza1l_bidir_pins_p6), rza1l_bidir_pins_p6 },
+ [7] = { ARRAY_SIZE(rza1l_bidir_pins_p7), rza1l_bidir_pins_p7 },
+ [9] = { ARRAY_SIZE(rza1l_bidir_pins_p9), rza1l_bidir_pins_p9 },
+};
+
+static const struct rza1_swio_entry rza1l_swio_entries[] = {
+ [0] = { ARRAY_SIZE(rza1h_swio_pins), rza1h_swio_pins },
+};
+
+/* RZ/A1L (r7s72102x) pinmux flags table */
+static const struct rza1_pinmux_conf rza1l_pmx_conf = {
+ .bidir_entries = rza1l_bidir_entries,
+ .swio_entries = rza1l_swio_entries,
+};
+
/* ----------------------------------------------------------------------------
* RZ/A1 types
*/
@@ -1283,9 +1411,15 @@ static int rza1_pinctrl_probe(struct platform_device *pdev)
static const struct of_device_id rza1_pinctrl_of_match[] = {
{
+ /* RZ/A1H, RZ/A1M */
.compatible = "renesas,r7s72100-ports",
.data = &rza1h_pmx_conf,
},
+ {
+ /* RZ/A1L */
+ .compatible = "renesas,r7s72102-ports",
+ .data = &rza1l_pmx_conf,
+ },
{ }
};
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] dt-bindings: pinctrl: add support for RZ/A1M and RZ/A1L
2017-10-04 16:31 [PATCH v2 0/2] pinctrl: rza1: add support for RZ/A1L Chris Brandt
2017-10-04 16:31 ` [PATCH v2 1/2] " Chris Brandt
@ 2017-10-04 16:31 ` Chris Brandt
[not found] ` <20171004163111.54600-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
1 sibling, 1 reply; 4+ messages in thread
From: Chris Brandt @ 2017-10-04 16:31 UTC (permalink / raw)
To: Linus Walleij, Rob Herring, Mark Rutland, Geert Uytterhoeven
Cc: linux-gpio, devicetree, linux-renesas-soc, Simon Horman,
Jacopo Mondi, Chris Brandt
Describe how to specify RZ/A1M and RZ/A1L devices.
Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
---
v2:
* Added description for RZ/A1M
---
Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 4 +++-
1 file changed, 3 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..f2fc86f8dbab 100644
--- a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
+++ b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
@@ -13,7 +13,9 @@ Pin controller node
Required properties:
- compatible
- this shall be "renesas,r7s72100-ports".
+ this shall be "renesas,r7s72100-ports" for RZ/A1H, "renesas,r7s72101-ports"
+ with a fallback of "renesas,r7s72100-ports" for RZ/A1M (as A1M is compatible
+ with A1H), or "renesas,r7s72102-ports" for RZ/A1L
- reg
address base and length of the memory area where the pin controller
--
2.14.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 2/2] dt-bindings: pinctrl: add support for RZ/A1M and RZ/A1L
[not found] ` <20171004163111.54600-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
@ 2017-10-04 16:47 ` Geert Uytterhoeven
0 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2017-10-04 16:47 UTC (permalink / raw)
To: Chris Brandt
Cc: Linus Walleij, Rob Herring, Mark Rutland, Geert Uytterhoeven,
linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux-Renesas,
Simon Horman, Jacopo Mondi
Hi Chris,
On Wed, Oct 4, 2017 at 6:31 PM, Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote:
> Describe how to specify RZ/A1M and RZ/A1L devices.
>
> Signed-off-by: Chris Brandt <chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
> ---
> v2:
> * Added description for RZ/A1M
> ---
> Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt | 4 +++-
> 1 file changed, 3 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..f2fc86f8dbab 100644
> --- a/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/renesas,rza1-pinctrl.txt
> @@ -13,7 +13,9 @@ Pin controller node
>
> Required properties:
> - compatible
> - this shall be "renesas,r7s72100-ports".
> + this shall be "renesas,r7s72100-ports" for RZ/A1H, "renesas,r7s72101-ports"
> + with a fallback of "renesas,r7s72100-ports" for RZ/A1M (as A1M is compatible
> + with A1H), or "renesas,r7s72102-ports" for RZ/A1L
Sorry to bother you again, but having this in a single long sentence is hard
to read. What about splitting per SoC, like is done in other bindings?
For the actual content:
Reviewed-by: Geert Uytterhoeven <geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.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 devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-04 16:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-04 16:31 [PATCH v2 0/2] pinctrl: rza1: add support for RZ/A1L Chris Brandt
2017-10-04 16:31 ` [PATCH v2 1/2] " Chris Brandt
2017-10-04 16:31 ` [PATCH v2 2/2] dt-bindings: pinctrl: add support for RZ/A1M and RZ/A1L Chris Brandt
[not found] ` <20171004163111.54600-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-10-04 16:47 ` Geert Uytterhoeven
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).