* [PATCH RFC 0/2] pinctl: sh-pfc: r7s72100: Ethernet support @ 2013-12-15 8:23 Simon Horman 2013-12-15 8:23 ` [PATCH RFC 1/2] " Simon Horman 2013-12-15 8:24 ` [PATCH RFC 2/2] ARM: shmobile: r7s72100: Add ethernet PFC node to DT Simon Horman 0 siblings, 2 replies; 5+ messages in thread From: Simon Horman @ 2013-12-15 8:23 UTC (permalink / raw) To: linux-arm-kernel Hi, this is a first pass at adding ethernet support to sh-pfc for the r7s72100 SoC. It has been written with reference to the hardware documentation but not well tested. This series is based on the topic/r7s72100-v3.13-rc3-20131214v2 tag in my renesas tree. Simon Horman (2): pinctl: sh-pfc: r7s72100: Ethernet support ARM: shmobile: r7s72100: Add ethernet PFC node to DT arch/arm/boot/dts/r7s72100-genmai-reference.dts | 25 +++++++++- drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 64 +++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) - 1.8.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RFC 1/2] pinctl: sh-pfc: r7s72100: Ethernet support 2013-12-15 8:23 [PATCH RFC 0/2] pinctl: sh-pfc: r7s72100: Ethernet support Simon Horman @ 2013-12-15 8:23 ` Simon Horman 2013-12-18 0:46 ` Laurent Pinchart 2013-12-15 8:24 ` [PATCH RFC 2/2] ARM: shmobile: r7s72100: Add ethernet PFC node to DT Simon Horman 1 sibling, 1 reply; 5+ messages in thread From: Simon Horman @ 2013-12-15 8:23 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- This has not been well exercised. --- drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 64 +++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c index c5bb533..77b4ce7 100644 --- a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c +++ b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c @@ -141,15 +141,79 @@ static const unsigned int __RZ_STR(pfx, hw, bank, pin, _mux)[] = { \ SCIF2(RZ_PIN_AND_MUX) +#define ETHERNET(fn) \ + fn(ethernet, col, 1, 3, 3) \ + fn(ethernet, col, 1, 14, 4) \ + fn(ethernet, int, 1, 15, 1) \ + fn(ethernet, txclk, 2, 0, 2) \ + fn(ethernet, txer, 2, 1, 2) \ + fn(ethernet, txen, 2, 2, 2) \ + fn(ethernet, txcrs, 2, 3, 2) \ + fn(ethernet, txd, 2, 4, 2) \ + fn(ethernet, txd, 2, 5, 2) \ + fn(ethernet, txd, 2, 6, 2) \ + fn(ethernet, txd, 2, 7, 2) \ + fn(ethernet, rxd, 2, 8, 2) \ + fn(ethernet, rxd, 2, 9, 2) \ + fn(ethernet, rxd, 2, 10, 2) \ + fn(ethernet, rxd, 2, 11, 2) \ + fn(ethernet, txclk, 3, 0, 2) \ + fn(ethernet, txer, 3, 1, 2) \ + fn(ethernet, txen, 3, 2, 2) \ + fn(ethernet, mdio, 3, 3, 2) \ + fn(ethernet, rxclk, 3, 4, 2) \ + fn(ethernet, rxer, 3, 5, 2) \ + fn(ethernet, rxdv, 3, 6, 2) \ + fn(ethernet, mdc, 5, 9, 2) \ + fn(ethernet, mdc, 7, 0, 3) \ + fn(ethernet, txclk, 7, 1, 3) \ + fn(ethernet, txer, 7, 2, 3) \ + fn(ethernet, txen, 7, 3, 3) \ + fn(ethernet, txd, 7, 4, 3) \ + fn(ethernet, txd, 7, 5, 3) \ + fn(ethernet, txd, 7, 6, 3) \ + fn(ethernet, txd, 7, 7, 3) \ + fn(ethernet, rxd, 7, 9, 3) \ + fn(ethernet, rxd, 7, 10, 3) \ + fn(ethernet, rxd, 7, 11, 2) \ + fn(ethernet, rxd, 7, 12, 3) \ + fn(ethernet, mdio, 7, 13, 3) \ + fn(ethernet, crs, 7, 14, 3) \ + fn(ethernet, rxclk, 7, 15, 3) \ + fn(ethernet, rxer, 8, 0, 3) \ + fn(ethernet, rxd, 8, 1, 3) \ + fn(ethernet, col, 8, 7, 5) \ + fn(ethernet, txclk, 10, 0, 4) \ + fn(ethernet, txer, 10, 1, 4) \ + fn(ethernet, txen, 10, 2, 4) \ + fn(ethernet, crs, 10, 3, 4) \ + fn(ethernet, txd, 10, 4, 4) \ + fn(ethernet, txd, 10, 5, 4) \ + fn(ethernet, txd, 10, 6, 4) \ + fn(ethernet, txd, 10, 7, 4) \ + fn(ethernet, txd, 10, 8, 4) \ + fn(ethernet, txd, 10, 9, 4) \ + fn(ethernet, txd, 10, 10, 4) \ + fn(ethernet, txd, 10, 11, 4) \ + +ETHERNET(RZ_PIN_AND_MUX) + static const struct sh_pfc_pin_group pinmux_groups[] = { SCIF2(RZ_PMX_GRP) + ETHERNET(RZ_PMX_GRP) }; static const char * const scif2_groups[] = { SCIF2(RZ_GRPS) }; + +static const char * const ethernet_groups[] = { + ETHERNET(RZ_GRPS) +}; + static const struct sh_pfc_function pinmux_functions[] = { SH_PFC_FUNCTION(scif2), + SH_PFC_FUNCTION(ethernet), }; #define PFC_REG(idx, name, reg) \ -- 1.8.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH RFC 1/2] pinctl: sh-pfc: r7s72100: Ethernet support 2013-12-15 8:23 ` [PATCH RFC 1/2] " Simon Horman @ 2013-12-18 0:46 ` Laurent Pinchart 2013-12-18 1:19 ` Simon Horman 0 siblings, 1 reply; 5+ messages in thread From: Laurent Pinchart @ 2013-12-18 0:46 UTC (permalink / raw) To: linux-arm-kernel Hi Simon, Thank you for the patch. On Sunday 15 December 2013 17:23:59 Simon Horman wrote: > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > > --- > > This has not been well exercised. > --- > drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 64 ++++++++++++++++++++++++++++++++ > 1 file changed, 64 insertions(+) > > diff --git a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c > b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c index c5bb533..77b4ce7 100644 > --- a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c > +++ b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c > @@ -141,15 +141,79 @@ static const unsigned int __RZ_STR(pfx, hw, bank, pin, > _mux)[] = { \ > > SCIF2(RZ_PIN_AND_MUX) > > +#define ETHERNET(fn) \ > + fn(ethernet, col, 1, 3, 3) \ > + fn(ethernet, col, 1, 14, 4) \ > + fn(ethernet, int, 1, 15, 1) \ > + fn(ethernet, txclk, 2, 0, 2) \ > + fn(ethernet, txer, 2, 1, 2) \ > + fn(ethernet, txen, 2, 2, 2) \ > + fn(ethernet, txcrs, 2, 3, 2) \ > + fn(ethernet, txd, 2, 4, 2) \ > + fn(ethernet, txd, 2, 5, 2) \ > + fn(ethernet, txd, 2, 6, 2) \ > + fn(ethernet, txd, 2, 7, 2) \ Those pins should be called txd0, txd1, txd2 and txd3. Same below for the txd and rxd pins. > + fn(ethernet, rxd, 2, 8, 2) \ > + fn(ethernet, rxd, 2, 9, 2) \ > + fn(ethernet, rxd, 2, 10, 2) \ > + fn(ethernet, rxd, 2, 11, 2) \ > + fn(ethernet, txclk, 3, 0, 2) \ > + fn(ethernet, txer, 3, 1, 2) \ > + fn(ethernet, txen, 3, 2, 2) \ > + fn(ethernet, mdio, 3, 3, 2) \ > + fn(ethernet, rxclk, 3, 4, 2) \ > + fn(ethernet, rxer, 3, 5, 2) \ > + fn(ethernet, rxdv, 3, 6, 2) \ > + fn(ethernet, mdc, 5, 9, 2) \ > + fn(ethernet, mdc, 7, 0, 3) \ > + fn(ethernet, txclk, 7, 1, 3) \ > + fn(ethernet, txer, 7, 2, 3) \ > + fn(ethernet, txen, 7, 3, 3) \ > + fn(ethernet, txd, 7, 4, 3) \ > + fn(ethernet, txd, 7, 5, 3) \ > + fn(ethernet, txd, 7, 6, 3) \ > + fn(ethernet, txd, 7, 7, 3) \ > + fn(ethernet, rxd, 7, 9, 3) \ > + fn(ethernet, rxd, 7, 10, 3) \ > + fn(ethernet, rxd, 7, 11, 2) \ > + fn(ethernet, rxd, 7, 12, 3) \ > + fn(ethernet, mdio, 7, 13, 3) \ > + fn(ethernet, crs, 7, 14, 3) \ > + fn(ethernet, rxclk, 7, 15, 3) \ > + fn(ethernet, rxer, 8, 0, 3) \ > + fn(ethernet, rxd, 8, 1, 3) \ > + fn(ethernet, col, 8, 7, 5) \ > + fn(ethernet, txclk, 10, 0, 4) \ > + fn(ethernet, txer, 10, 1, 4) \ > + fn(ethernet, txen, 10, 2, 4) \ > + fn(ethernet, crs, 10, 3, 4) \ > + fn(ethernet, txd, 10, 4, 4) \ > + fn(ethernet, txd, 10, 5, 4) \ > + fn(ethernet, txd, 10, 6, 4) \ > + fn(ethernet, txd, 10, 7, 4) \ > + fn(ethernet, txd, 10, 8, 4) \ > + fn(ethernet, txd, 10, 9, 4) \ > + fn(ethernet, txd, 10, 10, 4) \ > + fn(ethernet, txd, 10, 11, 4) \ > + > +ETHERNET(RZ_PIN_AND_MUX) Could you please move this above the SCIF entries to keep the file alphabetically sorted ? Same for the groups and functions below. > + > static const struct sh_pfc_pin_group pinmux_groups[] = { > SCIF2(RZ_PMX_GRP) > + ETHERNET(RZ_PMX_GRP) > }; > > static const char * const scif2_groups[] = { > SCIF2(RZ_GRPS) > }; > + > +static const char * const ethernet_groups[] = { > + ETHERNET(RZ_GRPS) > +}; > + > static const struct sh_pfc_function pinmux_functions[] = { > SH_PFC_FUNCTION(scif2), > + SH_PFC_FUNCTION(ethernet), > }; > > #define PFC_REG(idx, name, reg) \ -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RFC 1/2] pinctl: sh-pfc: r7s72100: Ethernet support 2013-12-18 0:46 ` Laurent Pinchart @ 2013-12-18 1:19 ` Simon Horman 0 siblings, 0 replies; 5+ messages in thread From: Simon Horman @ 2013-12-18 1:19 UTC (permalink / raw) To: linux-arm-kernel On Wed, Dec 18, 2013 at 01:46:19AM +0100, Laurent Pinchart wrote: > Hi Simon, > > Thank you for the patch. > > On Sunday 15 December 2013 17:23:59 Simon Horman wrote: > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > > > > --- > > > > This has not been well exercised. > > --- > > drivers/pinctrl/sh-pfc/pfc-r7s72100.c | 64 ++++++++++++++++++++++++++++++++ > > 1 file changed, 64 insertions(+) > > > > diff --git a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c > > b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c index c5bb533..77b4ce7 100644 > > --- a/drivers/pinctrl/sh-pfc/pfc-r7s72100.c > > +++ b/drivers/pinctrl/sh-pfc/pfc-r7s72100.c > > @@ -141,15 +141,79 @@ static const unsigned int __RZ_STR(pfx, hw, bank, pin, > > _mux)[] = { \ > > > > SCIF2(RZ_PIN_AND_MUX) > > > > +#define ETHERNET(fn) \ > > + fn(ethernet, col, 1, 3, 3) \ > > + fn(ethernet, col, 1, 14, 4) \ > > + fn(ethernet, int, 1, 15, 1) \ > > + fn(ethernet, txclk, 2, 0, 2) \ > > + fn(ethernet, txer, 2, 1, 2) \ > > + fn(ethernet, txen, 2, 2, 2) \ > > + fn(ethernet, txcrs, 2, 3, 2) \ > > + fn(ethernet, txd, 2, 4, 2) \ > > + fn(ethernet, txd, 2, 5, 2) \ > > + fn(ethernet, txd, 2, 6, 2) \ > > + fn(ethernet, txd, 2, 7, 2) \ > > Those pins should be called txd0, txd1, txd2 and txd3. Same below for the txd > and rxd pins. Thanks, will do. > > + fn(ethernet, rxd, 2, 8, 2) \ > > + fn(ethernet, rxd, 2, 9, 2) \ > > + fn(ethernet, rxd, 2, 10, 2) \ > > + fn(ethernet, rxd, 2, 11, 2) \ > > + fn(ethernet, txclk, 3, 0, 2) \ > > + fn(ethernet, txer, 3, 1, 2) \ > > + fn(ethernet, txen, 3, 2, 2) \ > > + fn(ethernet, mdio, 3, 3, 2) \ > > + fn(ethernet, rxclk, 3, 4, 2) \ > > + fn(ethernet, rxer, 3, 5, 2) \ > > + fn(ethernet, rxdv, 3, 6, 2) \ > > + fn(ethernet, mdc, 5, 9, 2) \ > > + fn(ethernet, mdc, 7, 0, 3) \ > > + fn(ethernet, txclk, 7, 1, 3) \ > > + fn(ethernet, txer, 7, 2, 3) \ > > + fn(ethernet, txen, 7, 3, 3) \ > > + fn(ethernet, txd, 7, 4, 3) \ > > + fn(ethernet, txd, 7, 5, 3) \ > > + fn(ethernet, txd, 7, 6, 3) \ > > + fn(ethernet, txd, 7, 7, 3) \ > > + fn(ethernet, rxd, 7, 9, 3) \ > > + fn(ethernet, rxd, 7, 10, 3) \ > > + fn(ethernet, rxd, 7, 11, 2) \ > > + fn(ethernet, rxd, 7, 12, 3) \ > > + fn(ethernet, mdio, 7, 13, 3) \ > > + fn(ethernet, crs, 7, 14, 3) \ > > + fn(ethernet, rxclk, 7, 15, 3) \ > > + fn(ethernet, rxer, 8, 0, 3) \ > > + fn(ethernet, rxd, 8, 1, 3) \ > > + fn(ethernet, col, 8, 7, 5) \ > > + fn(ethernet, txclk, 10, 0, 4) \ > > + fn(ethernet, txer, 10, 1, 4) \ > > + fn(ethernet, txen, 10, 2, 4) \ > > + fn(ethernet, crs, 10, 3, 4) \ > > + fn(ethernet, txd, 10, 4, 4) \ > > + fn(ethernet, txd, 10, 5, 4) \ > > + fn(ethernet, txd, 10, 6, 4) \ > > + fn(ethernet, txd, 10, 7, 4) \ > > + fn(ethernet, txd, 10, 8, 4) \ > > + fn(ethernet, txd, 10, 9, 4) \ > > + fn(ethernet, txd, 10, 10, 4) \ > > + fn(ethernet, txd, 10, 11, 4) \ > > + > > +ETHERNET(RZ_PIN_AND_MUX) > > Could you please move this above the SCIF entries to keep the file > alphabetically sorted ? Same for the groups and functions below. Sure. > > + > > static const struct sh_pfc_pin_group pinmux_groups[] = { > > SCIF2(RZ_PMX_GRP) > > + ETHERNET(RZ_PMX_GRP) > > }; > > > > static const char * const scif2_groups[] = { > > SCIF2(RZ_GRPS) > > }; > > + > > +static const char * const ethernet_groups[] = { > > + ETHERNET(RZ_GRPS) > > +}; > > + > > static const struct sh_pfc_function pinmux_functions[] = { > > SH_PFC_FUNCTION(scif2), > > + SH_PFC_FUNCTION(ethernet), > > }; > > > > #define PFC_REG(idx, name, reg) \ > -- > Regards, > > Laurent Pinchart > ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH RFC 2/2] ARM: shmobile: r7s72100: Add ethernet PFC node to DT 2013-12-15 8:23 [PATCH RFC 0/2] pinctl: sh-pfc: r7s72100: Ethernet support Simon Horman 2013-12-15 8:23 ` [PATCH RFC 1/2] " Simon Horman @ 2013-12-15 8:24 ` Simon Horman 1 sibling, 0 replies; 5+ messages in thread From: Simon Horman @ 2013-12-15 8:24 UTC (permalink / raw) To: linux-arm-kernel Signed-off-by: Simon Horman <horms+renesas@verge.net.au> --- This has not been well exercised. --- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts index 040aa0f..2ca0196 100644 --- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts +++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts @@ -60,11 +60,34 @@ }; &pfc { - pinctrl-0 = <&scif2_pins>; + pinctrl-0 = <&scif2_pins ðernet_pins>; pinctrl-names = "default"; scif2_pins: serial2 { renesas,groups = "scif2_txd_p3_0", "scif2_rxd_p3_2"; renesas,function = "scif2"; }; + + ethernet_pins: ethernet { + renesas,groups = "ethernet_rxdv_p3_6", + "ethernet_rxer_p3_5", + "ethernet_rxclk_p3_4", + "ethernet_mdio_p3_3", + "ethernet_rxd_p2_11", + "ethernet_rxd_p2_10", + "ethernet_rxd_p2_9", + "ethernet_rxd_p2_8", + "ethernet_txd_p2_7", + "ethernet_txd_p2_6", + "ethernet_txd_p2_5", + "ethernet_txd_p2_4", + "ethernet_txcrs_p2_3", + "ethernet_txen_p2_2", + "ethernet_txer_p2_1", + "ethernet_txclk_p2_0", + "ethernet_mdc_p5_9", + "ethernet_col_p1_14", + "ethernet_int_p1_15"; + renesas,function = "ethernet"; + }; }; -- 1.8.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-12-18 1:19 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-15 8:23 [PATCH RFC 0/2] pinctl: sh-pfc: r7s72100: Ethernet support Simon Horman 2013-12-15 8:23 ` [PATCH RFC 1/2] " Simon Horman 2013-12-18 0:46 ` Laurent Pinchart 2013-12-18 1:19 ` Simon Horman 2013-12-15 8:24 ` [PATCH RFC 2/2] ARM: shmobile: r7s72100: Add ethernet PFC node to DT Simon Horman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox