ARM: shmobile: r8a73a4 APE6EVM board support
Subsystems (6)
Magnus Damm
maintainerv4 cover ARM: shmobile: r8a73a4 APE6EVM board support
ARM: shmobile: r8a73a4 APE6EVM board support (V4)
[PATCH 01/03 v3] ARM: shmobile: APE6EVM base support [PATCH 02/03 v2] ARM: shmobile: APE6EVM PFC support [PATCH 03/03 v3] ARM: shmobile: APE6EVM LAN9220 support
This series is V4 of initial support for the APE6EVM board.
The APE6EVM board makes use of the r8a73a4 SoC and has a couple of different I/O devices on board, but with this series only support for the SCIFA0 UART and the Ethernet chip is included.
In the future support for more I/O devices will be added as incremental feature patches.
Changes since V3:
- Make use of 64-bit DT addresses
Changes since V2:
- Use PINCTRL instead of function GPIOs.
- Modify bootargs to enable DHCP and NFS root.
- Now depends on r8a73a4 PFC V2
Changes since V1:
- Went from single patch to series
- Use ape6evm_add_standard_devices() to setup SoC devices and clocks
- Use PFC to configure SCIFA0
- Add Ethernet support including PFC support
For more details please see the individual patches.
---
Written against renesas-next-20130329 in renesas.git
Depends on the following patch:
[PATCH] ARM: shmobile: r8a73a4 SoC 64-bit DT support
arch/arm/boot/dts/Makefile | 1 arch/arm/boot/dts/r8a73a4-ape6evm.dts | 54 ++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 8 ++ arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/board-ape6evm.c | 94 ++++++++++++++++++++++++++++++++ 5 files changed, 156 insertions(+), 2 deletions(-)
Magnus Damm
maintainerPATCH v3 1/3 ARM: shmobile: APE6EVM base support
From: Magnus Damm <[email protected]>
V3 of APE6EVM base board support making use of
1 GiB of memory, the SCIFA0 serial port and
ARM architected timer.
---
Changes since V2:
- Use 64-bit DT addresses
Changes since V1:
- Sorted headers
- Use ape6evm_add_standard_devices() to setup SoC devices and clocks
arch/arm/boot/dts/Makefile | 1 arch/arm/boot/dts/r8a73a4-ape6evm.dts | 31 +++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 8 ++++- arch/arm/mach-shmobile/Makefile | 1 arch/arm/mach-shmobile/board-ape6evm.c | 46 ++++++++++++++++++++++++++++++++ 5 files changed, 86 insertions(+), 1 deletion(-)
arch/arm/boot/dts/Makefile +1 -0
@@ -140,6 +140,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm r8a7779-marzen-reference.dtb \ sh73a0-kzm9g.dtb \ sh73a0-kzm9g-reference.dtb \ + r8a73a4-ape6evm.dtb \ sh7372-mackerel.dtb dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_cyclone5.dtb \ socfpga_vt.dtb
arch/arm/boot/dts/r8a73a4-ape6evm.dts new file +31 -0
@@ -0,0 +1,31 @@ +/* + * Device Tree Source for the APE6EVM board + * + * Copyright (C) 2013 Renesas Solutions Corp. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +/dts-v1/; +/include/ "r8a73a4.dtsi" + +/ { + model = "APE6EVM"; + compatible = "renesas,ape6evm", "renesas,r8a73a4"; + + chosen { + bootargs = "console=ttySC0,115200 ignore_loglevel"; + }; + + memory@40000000 { + device_type = "memory"; + reg = <0 0x40000000 0 0x40000000>; + }; + + lbsc { + #address-cells = <1>; + #size-cells = <1>; + }; +};
arch/arm/mach-shmobile/Kconfig +7 -1
@@ -87,6 +87,11 @@ config MACH_AG5EVM select REGULATOR_FIXED_VOLTAGE if REGULATOR select SH_LCD_MIPI_DSI +config MACH_APE6EVM + bool "APE6EVM board" + depends on ARCH_R8A73A4 + select USE_OF + config MACH_MACKEREL bool "mackerel board" depends on ARCH_SH7372
@@ -180,7 +185,7 @@ config MEMORY_START hex "Physical memory start address" default "0x40000000" if MACH_AP4EVB || MACH_AG5EVM || \ MACH_MACKEREL || MACH_BONITO || \ - MACH_ARMADILLO800EVA + MACH_ARMADILLO800EVA || MACH_APE6EVM default "0x41000000" if MACH_KOTA2 default "0x00000000" ---help---
@@ -190,6 +195,7 @@ config MEMORY_START config MEMORY_SIZE hex "Physical memory size" + default "0x40000000" if MACH_APE6EVM default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ MACH_ARMADILLO800EVA default "0x1e000000" if MACH_KOTA2
arch/arm/mach-shmobile/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o # Board objects obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o +obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o obj-$(CONFIG_MACH_KOTA2) += board-kota2.o obj-$(CONFIG_MACH_BONITO) += board-bonito.o
arch/arm/mach-shmobile/board-ape6evm.c new file +46 -0
46 lines not on this page · raw message
Magnus Damm
maintainerPATCH v2 2/3 ARM: shmobile: APE6EVM PFC support
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Start using the r8a73a4 PFC on the APE6EVM board
and configure the SCIFA0 console signals in the
PFC via PINCTRL.
---
Changes since V1:
- Use PINCTRL instead of function GPIOs
arch/arm/mach-shmobile/board-ape6evm.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/mach-shmobile/board-ape6evm.c +10 -0
@@ -21,15 +21,25 @@#include <linux/interrupt.h> #include <linux/irqchip.h> #include <linux/kernel.h> +#include <linux/pinctrl/machine.h> #include <linux/platform_device.h> #include <mach/common.h> #include <mach/r8a73a4.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> +static const struct pinctrl_map ape6evm_pinctrl_map[] = { +/* SCIFA0 console */ +PIN_MAP_MUX_GROUP_DEFAULT ("sh-sci.0" ,"pfc-r8a73a4" , +"scifa0_data" ,"scifa0" ), +}; +static void __init ape6evm_add_standard_devices (void ) {r8a73a4_clock_init (); +pinctrl_register_mappings (ape6evm_pinctrl_map, +ARRAY_SIZE (ape6evm_pinctrl_map)); +r8a73a4_pinmux_init ();r8a73a4_add_standard_devices (); }
Magnus Damm
maintainerPATCH v3 3/3 ARM: shmobile: APE6EVM LAN9220 support
In reply to Magnus DammFrom: Magnus Damm <[email protected]>
Add LAN9220 support to the APE6EVM board using C and DT. At this point the PFC driver lacks DT bindings so to configure the PFC we use PINCTRL in C board code.
---
Changes since V2:
- Put SMSC chip in case of DT inside 32-bit lbsc
Changes since V1:
- Use PINCTRL instead of function GPIOs.
- Modify bootargs to enable DHCP and NFS root.
arch/arm/boot/dts/r8a73a4-ape6evm.dts | 23 ++++++++++++++++++- arch/arm/mach-shmobile/board-ape6evm.c | 38 ++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 1 deletion(-)
arch/arm/boot/dts/r8a73a4-ape6evm.dts +22 -1
@@ -16,7 +16,7 @@ compatible = "renesas,ape6evm", "renesas,r8a73a4"; chosen { - bootargs = "console=ttySC0,115200 ignore_loglevel"; + bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp"; }; memory@40000000 {
@@ -24,8 +24,29 @@ reg = <0 0x40000000 0 0x40000000>; }; + ape6evm_fixed_3v3: fixedregulator@0 { + compatible = "regulator-fixed"; + regulator-name = "3V3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + lbsc { #address-cells = <1>; #size-cells = <1>; + + ethernet@8000000 { + compatible = "smsc,lan9118", "smsc,lan9115"; + reg = <0x08000000 0x1000>; + interrupt-parent = <&irqc1>; + interrupts = <8 0x4>; + phy-mode = "mii"; + reg-io-width = <4>; + smsc,irq-active-high; + smsc,irq-push-pull; + vdd33a-supply = <&ape6evm_fixed_3v3>; + vddvario-supply = <&ape6evm_fixed_3v3>; + }; }; };
arch/arm/mach-shmobile/board-ape6evm.c +38 -0
@@ -18,20 +18,49 @@* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <linux/gpio.h> #include <linux/interrupt.h> #include <linux/irqchip.h> #include <linux/kernel.h> #include <linux/pinctrl/machine.h> #include <linux/platform_device.h> +#include <linux/regulator/fixed.h> +#include <linux/regulator/machine.h> +#include <linux/smsc911x.h> #include <mach/common.h> +#include <mach/irqs.h> #include <mach/r8a73a4.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> +/* Dummy supplies, where voltage doesn't matter */ +static struct regulator_consumer_supply dummy_supplies[] = { +REGULATOR_SUPPLY ("vddvario" ,"smsc911x" ), +REGULATOR_SUPPLY ("vdd33a" ,"smsc911x" ), +}; + +/* SMSC LAN9220 */ +static const struct resource lan9220_res[] = { +DEFINE_RES_MEM (0x08000000 ,0x1000 ), + { + .start =irq_pin (40 ),/* IRQ40 */ + .flags =IORESOURCE_IRQ |IRQF_TRIGGER_HIGH , + }, +}; + +static const struct smsc911x_platform_config lan9220_data = { + .flags =SMSC911X_USE_32BIT , + .irq_type =SMSC911X_IRQ_TYPE_PUSH_PULL , + .irq_polarity =SMSC911X_IRQ_POLARITY_ACTIVE_HIGH , +}; +static const struct pinctrl_map ape6evm_pinctrl_map[] = {/* SCIFA0 console */ PIN_MAP_MUX_GROUP_DEFAULT ("sh-sci.0" ,"pfc-r8a73a4" ,"scifa0_data" ,"scifa0" ), +/* SMSC */ +PIN_MAP_MUX_GROUP_DEFAULT ("smsc911x" ,"pfc-r8a73a4" , +"irqc_irq40" ,"irqc" ), };static void __init ape6evm_add_standard_devices (void )
@@ -41,6 +70,15 @@ static void __init ape6evm_add_standard_ ARRAY_SIZE(ape6evm_pinctrl_map));r8a73a4_pinmux_init ();r8a73a4_add_standard_devices (); + +/* LAN9220 ethernet */ +gpio_request_one (270 ,GPIOF_OUT_INIT_HIGH ,NULL );/* smsc9220 RESET */ + +regulator_register_fixed (0 , dummy_supplies,ARRAY_SIZE (dummy_supplies)); + +platform_device_register_resndata (&platform_bus,"smsc911x" ,-1 , + lan9220_res,ARRAY_SIZE (lan9220_res), + &lan9220_data,sizeof (lan9220_data)); }static const char *ape6evm_boards_compat_dt[]__initdata = {
v4 cover ARM: shmobile: r8a73a4 APE6EVM board support
In reply to Magnus DammQuoted 8 lines · Magnus Damm
ARM: shmobile: r8a73a4 APE6EVM board support (V4)
[PATCH 01/03 v3] ARM: shmobile: APE6EVM base support [PATCH 02/03 v2] ARM: shmobile: APE6EVM PFC support [PATCH 03/03 v3] ARM: shmobile: APE6EVM LAN9220 support
This series is V4 of initial support for the APE6EVM board.
Quoted 7 lines
The APE6EVM board makes use of the r8a73a4 SoC and has a couple of different I/O devices on board, but with this series only support for the SCIFA0 UART and the Ethernet chip is included.
In the future support for more I/O devices will be added as incremental feature patches.
Thanks, queued up for v3.10 in the boards branch.