ARM: shmobile: lager: enable Ether
Subsystems (5)
v7 cover ARM: shmobile: lager: enable Ether
this short series enables the on-board ethernet
of the r8a7790 SoC for on lager board.
This series has a run-time dependency on
"sh_eth: add support for r8a7790 SoC"
This series has been built on top of renesas-next-201300806.
Changes noted in changelogs of individual patches. Simon Horman (3):
ARM: shmobile: r8a7790: clocks for Ether support
ARM: shmobile: lager: enable Ether
ARM: shmobile: lager: enable nfsroot in DTS
arch/arm/boot/dts/r8a7790-lager.dts | 2 +- arch/arm/mach-shmobile/board-lager.c | 29 +++++++++++++++++++++++++++++ arch/arm/mach-shmobile/clock-r8a7790.c | 4 ++++ 3 files changed, 34 insertions(+), 1 deletion(-)
Signature · 1 line
1.8.3.2
PATCH v7 1/3 ARM: shmobile: r8a7790: clocks for Ether support
---
v5
* Split out from "ARM: shmobile: r8a7790: add Ether support"
--- arch/arm/mach-shmobile/clock-r8a7790.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/mach-shmobile/clock-r8a7790.c +4 -0
@@ -51,6 +51,7 @@#define SMSTPCR3 0xe615013c#define SMSTPCR5 0xe6150144#define SMSTPCR7 0xe615014c +#define SMSTPCR8 0xe6150990#define SDCKCR 0xE6150074#define SD2CKCR 0xE6150078
@@ -180,6 +181,7 @@ static struct clk div6_clks[DIV6_NR] = {/* MSTP */ enum { +MSTP813 ,MSTP721 ,MSTP720 ,MSTP717 ,MSTP716 ,MSTP522 ,
@@ -190,6 +192,7 @@ enum { };static struct clk mstp_clks[MSTP_NR ] = { + [MSTP813 ] =SH_CLK_MSTP32 (&p_clk,SMSTPCR8 ,13 ,0 ),/* Ether */ [MSTP721 ] =SH_CLK_MSTP32 (&p_clk,SMSTPCR7 ,21 ,0 ),/* SCIF0 */ [MSTP720 ] =SH_CLK_MSTP32 (&p_clk,SMSTPCR7 ,20 ,0 ),/* SCIF1 */ [MSTP717 ] =SH_CLK_MSTP32 (&zs_clk,SMSTPCR7 ,17 ,0 ),/* HSCIF0 */
@@ -258,6 +261,7 @@ static struct clk_lookup lookups[] = {CLKDEV_DEV_ID ("sh-sci.7" , &mstp_clks[MSTP720 ]),CLKDEV_DEV_ID ("sh-sci.8" , &mstp_clks[MSTP717 ]),CLKDEV_DEV_ID ("sh-sci.9" , &mstp_clks[MSTP716 ]), +CLKDEV_DEV_ID ("r8a7790-ether" , &mstp_clks[MSTP813 ]),CLKDEV_DEV_ID ("rcar_thermal" , &mstp_clks[MSTP522 ]),CLKDEV_DEV_ID ("ee200000.mmcif" , &mstp_clks[MSTP315 ]), CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
Signature · 1 line
1.8.3.2
PATCH v7 2/3 ARM: shmobile: lager: enable Ether
In reply to Simon Horman---
This patch has a run-time dependency on "sh_eth: add support for r8a7790 SoC".
v7
* Do not add spurious blank line
v6
* Correct first argument of PIN_MAP_MUX_GROUP_DEFAULT() to use "r8a7790-ether" instead of "sh-eth".
* Remove bogus "IRQ0" comment in ether_resources[]
v5
* As suggested by Laurent Pinchart
- Do not use eth_magic pinmux group, that pin is not used on Lager
* As suggested by Morimoto-san and Magnus Damm
- Refactor moving all setup code into boards-lager.c
v4
* Remove needs_gpio_reset and reset_gpio from ether_platdata as the patch that adds that feature and those fields has been dropped.
* Annotate ether_platdata as __initdata
v3
* Use newly added "r8a7790-ether" instead of "sh-eth"
v2
* Do not add MSTP812, EtherAVB. It is not used.
* As suggested by Sergei Shtylyov <[email protected]>
- Move Ethernet element of MSTP enum to a separate line
- Move declaration of r8a7790_add_ether_device() to immediately after that of r8a7790_add_standard_devices()
- Add __initdata annotation to ether_resource.
* As suggested by Laurent Pinchart
- Do not manipilate sh_eth reset GPIO directly,
rather, do so through newly proposed support for this in the sh_eth driver.
* A suggested by Sergei Shtylyov
- Move DTS portion into a separate patch
--- arch/arm/mach-shmobile/board-lager.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+)
arch/arm/mach-shmobile/board-lager.c +29 -0
@@ -31,6 +31,7 @@#include <linux/platform_device.h> #include <linux/regulator/fixed.h> #include <linux/regulator/machine.h> +#include <linux/sh_eth.h> #include <mach/common.h> #include <mach/irqs.h> #include <mach/r8a7790.h>
@@ -91,6 +92,20 @@ static struct resource mmcif1_resources[] __initdata = { DEFINE_RES_IRQ(gic_spi(170)), }; +/* Ether */ +static struct sh_eth_plat_data ether_pdata__initdata = { + .phy =0x1 , + .edmac_endian =EDMAC_LITTLE_ENDIAN , + .register_type =SH_ETH_REG_FAST_RCAR , + .phy_interface =PHY_INTERFACE_MODE_RMII , + .ether_link_active_low =1 , +}; + +static struct resource ether_resources[]__initdata = { +DEFINE_RES_MEM (0xee700000 ,0x400 ), +DEFINE_RES_IRQ (gic_spi (162 )), +}; +static const struct pinctrl_map lager_pinctrl_map[] = {/* SCIF0 (CN19: DEBUG SERIAL0) */ PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
@@ -103,6 +118,15 @@ static const struct pinctrl_map lager_pinctrl_map[] = { "mmc1_data8", "mmc1"),PIN_MAP_MUX_GROUP_DEFAULT ("sh_mmcif.1" ,"pfc-r8a7790" ,"mmc1_ctrl" ,"mmc1" ), +/* Ether */ +PIN_MAP_MUX_GROUP_DEFAULT ("r8a7790-ether" ,"pfc-r8a7790" , +"eth_link" ,"eth" ), +PIN_MAP_MUX_GROUP_DEFAULT ("r8a7790-ether" ,"pfc-r8a7790" , +"eth_mdio" ,"eth" ), +PIN_MAP_MUX_GROUP_DEFAULT ("r8a7790-ether" ,"pfc-r8a7790" , +"eth_rmii" ,"eth" ), +PIN_MAP_MUX_GROUP_DEFAULT ("r8a7790-ether" ,"pfc-r8a7790" , + "intc_irq0", "intc"), };static void __init lager_add_standard_devices (void )
@@ -125,6 +149,11 @@ static void __init lager_add_standard_devices(void)platform_device_register_resndata (&platform_bus,"sh_mmcif" ,1 , mmcif1_resources,ARRAY_SIZE (mmcif1_resources), &mmcif1_pdata,sizeof (mmcif1_pdata)); + +platform_device_register_resndata (&platform_bus,"r8a7790-ether" ,-1 , + ether_resources, +ARRAY_SIZE (ether_resources), + ðer_pdata,sizeof (ether_pdata)); }static const char *lager_boards_compat_dt[]__initdata = {
Signature · 1 line
1.8.3.2
PATCH v7 3/3 ARM: shmobile: lager: enable nfsroot in DTS
In reply to Simon HormanNow that Ether support has been added to the lager board it is possible to use nfsroot. This configuration is in line with that of other shmobile boards.
---
This patch has a run-time dependency on "ARM: shmobile: lager: enable Ether"
v6
* Do not add rsize and wsize settings.
These do not seem to be useful.
v2
* Split out as a new patch from "ARM: shmobile: lager: enable Ether"
--- arch/arm/boot/dts/r8a7790-lager.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/r8a7790-lager.dts +1 -1
@@ -16,7 +16,7 @@ compatible = "renesas,lager", "renesas,r8a7790"; chosen { - bootargs = "console=ttySC6,115200 ignore_loglevel rw"; + bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; }; memory at 40000000 {
Signature · 1 line
1.8.3.2
v7 cover ARM: shmobile: lager: enable Ether
In reply to Simon HormanHi Simon
Quoted 14 lines
this short series enables the on-board ethernet
of the r8a7790 SoC for on lager board.This series has a run-time dependency on
"sh_eth: add support for r8a7790 SoC"This series has been built on top of renesas-next-201300806.
Changes noted in changelogs of individual patches. Simon Horman (3):
ARM: shmobile: r8a7790: clocks for Ether support
ARM: shmobile: lager: enable Ether
ARM: shmobile: lager: enable nfsroot in DTS
Quoted 4 lines
arch/arm/boot/dts/r8a7790-lager.dts | 2 +- arch/arm/mach-shmobile/board-lager.c | 29 +++++++++++++++++++++++++++++ arch/arm/mach-shmobile/clock-r8a7790.c | 4 ++++ 3 files changed, 34 insertions(+), 1 deletion(-)
For all patches
Best regards
---
Kuninori Morimoto
v7 cover ARM: shmobile: lager: enable Ether
Quoted 17 lines · Kuninori Morimoto
Hi Simon
Quoted 14 lines
this short series enables the on-board ethernet
of the r8a7790 SoC for on lager board.This series has a run-time dependency on
"sh_eth: add support for r8a7790 SoC"This series has been built on top of renesas-next-201300806.
Changes noted in changelogs of individual patches. Simon Horman (3):
ARM: shmobile: r8a7790: clocks for Ether support
ARM: shmobile: lager: enable Ether
ARM: shmobile: lager: enable nfsroot in DTS
Quoted 8 lines
Quoted 4 lines
arch/arm/boot/dts/r8a7790-lager.dts | 2 +- arch/arm/mach-shmobile/board-lager.c | 29 +++++++++++++++++++++++++++++ arch/arm/mach-shmobile/clock-r8a7790.c | 4 ++++ 3 files changed, 34 insertions(+), 1 deletion(-)For all patches
Thanks, I will queue these up for v3.12.