Renesas ARM SoC board updates for v3.10 #3
Subsystems (6)
Hi Olof, Hi Arnd,
The following changes since commit eb0ae7280939fda741ad6ae9b108725517652f56:
Merge tag 'renesas-pinmux2-for-v3.10' into boards-base (2013-04-03 10:49:18 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-boards3-for-v3.10
for you to fetch changes up to 00ae962f8051bb143fa1c43c6a9c8274c3a9c593:
ARM: shmobile: mackerel: clean up MMCIF vs. SDHI1 selection (2013-04-03 10:50:44 +0900)
----------------------------------------------------------------
Third round of Renesas ARM SoC board updates for v3.10
Highlights:
* Add Lager board support
* Add ape6evm board support
* Add Bock-W board support
* Mackerel MMCIF/SDHI clean ups
* Add ethernet support to kzm9g-reference
This pull request is based on a merge of:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-pinmux2-for-v3.10git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas renesas-boards2-for-v3.10
The merge with renesas-pinmux2-for-v3.10 was made to provide run-time dependencies for the following changes:
ARM: shmobile: APE6EVM LAN9220 support
ARM: shmobile: APE6EVM PFC support
----------------------------------------------------------------
Guennadi Liakhovetski (6):
ARM: shmobile: kzm9g-reference: add ethernet support
ARM: shmobile: mackerel: SDHI resources do not have to be numbered
ARM: shmobile: mackerel: remove OCR masks, where regulators are used
ARM: shmobile: mackerel: switch SDHI and MMCIF interfaces to slot-gpio
ARM: shmobile: mackerel: add interrupt names for SDHI0
ARM: shmobile: mackerel: clean up MMCIF vs. SDHI1 selection
Kuninori Morimoto (1):
ARM: shmobile: add R-Car M1A Bock-W platform support
Magnus Damm (4):
ARM: shmobile: APE6EVM base support
ARM: shmobile: APE6EVM PFC support
ARM: shmobile: APE6EVM LAN9220 support
ARM: shmobile: Initial r8a7790 Lager board support
arch/arm/boot/dts/Makefile | 3 + arch/arm/boot/dts/r8a73a4-ape6evm.dts | 52 ++++++++++++ arch/arm/boot/dts/r8a7778-bockw.dts | 32 ++++++++ arch/arm/boot/dts/r8a7790-lager.dts | 31 +++++++ arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 13 +++ arch/arm/configs/bockw_defconfig | 66 +++++++++++++++ arch/arm/mach-shmobile/Kconfig | 21 ++++- arch/arm/mach-shmobile/Makefile | 3 + arch/arm/mach-shmobile/board-ape6evm.c | 94 ++++++++++++++++++++++ arch/arm/mach-shmobile/board-bockw.c | 43 ++++++++++ arch/arm/mach-shmobile/board-lager.c | 46 +++++++++++ arch/arm/mach-shmobile/board-mackerel.c | 111 ++++++++++---------------- 12 files changed, 443 insertions(+), 72 deletions(-) create mode 100644 arch/arm/boot/dts/r8a73a4-ape6evm.dts create mode 100644 arch/arm/boot/dts/r8a7778-bockw.dts create mode 100644 arch/arm/boot/dts/r8a7790-lager.dts create mode 100644 arch/arm/configs/bockw_defconfig create mode 100644 arch/arm/mach-shmobile/board-ape6evm.c create mode 100644 arch/arm/mach-shmobile/board-bockw.c create mode 100644 arch/arm/mach-shmobile/board-lager.c
PATCH 1/11 ARM: shmobile: add R-Car M1A Bock-W platform support
From: Kuninori Morimoto <[email protected]>
Add basic Bock-W board support
More devices will be added on top of this patch after PICNTRL and clock framework are in better shape.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7778-bockw.dts | 32 +++++++++++++++++ arch/arm/configs/bockw_defconfig | 66 ++++++++++++++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 6 ++++ arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/board-bockw.c | 43 ++++++++++++++++++++++ 6 files changed, 149 insertions(+) create mode 100644 arch/arm/boot/dts/r8a7778-bockw.dts create mode 100644 arch/arm/configs/bockw_defconfig create mode 100644 arch/arm/mach-shmobile/board-bockw.c
arch/arm/boot/dts/Makefile +1 -0
@@ -136,6 +136,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \ ccu9540.dtb dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ r8a7740-armadillo800eva.dtb \ + r8a7778-bockw.dtb \ r8a7779-marzen-reference.dtb \ sh73a0-kzm9g.dtb \ sh73a0-kzm9g-reference.dtb \
arch/arm/boot/dts/r8a7778-bockw.dts new file +32 -0
@@ -0,0 +1,32 @@ +/* + * Reference Device Tree Source for the Bock-W board + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Kuninori Morimoto <[email protected]> + * + * based on r8a7779 + * + * Copyright (C) 2013 Renesas Solutions Corp. + * Copyright (C) 2013 Simon Horman + * + * 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/ "r8a7778.dtsi" + +/ { + model = "bockw"; + compatible = "renesas,bockw", "renesas,r8a7778"; + + chosen { + bootargs = "console=ttySC0,115200 ignore_loglevel"; + }; + + memory { + device_type = "memory"; + reg = <0x60000000 0x10000000>; + }; +};
arch/arm/configs/bockw_defconfig new file +66 -0
66 lines not on this page · raw message
arch/arm/mach-shmobile/Kconfig +6 -0
@@ -124,6 +124,12 @@ config MACH_ARMADILLO800EVA select SND_SOC_WM8978 if SND_SIMPLE_CARD select USE_OF +config MACH_BOCKW + bool "BOCK-W platform" + depends on ARCH_R8A7778 + select ARCH_REQUIRE_GPIOLIB + select USE_OF + config MACH_MARZEN bool "MARZEN board" depends on ARCH_R8A7779
arch/arm/mach-shmobile/Makefile +1 -0
@@ -40,6 +40,7 @@ obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o obj-$(CONFIG_MACH_KOTA2) += board-kota2.o obj-$(CONFIG_MACH_BONITO) += board-bonito.o +obj-$(CONFIG_MACH_BOCKW) += board-bockw.o obj-$(CONFIG_MACH_MARZEN) += board-marzen.o obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
arch/arm/mach-shmobile/board-bockw.c new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 2/11 ARM: shmobile: kzm9g-reference: add ethernet support
In reply to Simon HormanFrom: Guennadi Liakhovetski <[email protected]>
Add a DT node for the SMSC 9221 ethernet chip, found on kzm9g, to its reference implementation.
--- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm/boot/dts/sh73a0-kzm9g-reference.dts +13 -0
@@ -44,6 +44,19 @@ regulator-always-on; regulator-boot-on; }; + + lan9220 at 10000000 { + compatible = "smsc,lan9220", "smsc,lan9115"; + reg = <0x10000000 0x100>; + phy-mode = "mii"; + interrupt-parent = <&irqpin0>; + interrupts = <3 0>; /* active low */ + reg-io-width = <4>; + smsc,irq-push-pull; + smsc,save-mac-address; + vddvario-supply = <®_1p8v>; + vdd33a-supply = <®_3p3v>; + }; }; &mmcif {
Signature · 1 line
1.7.10.4
PATCH 3/11 ARM: shmobile: APE6EVM base support
In reply to Simon HormanFrom: 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.
--- 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(-) create mode 100644 arch/arm/boot/dts/r8a73a4-ape6evm.dts create mode 100644 arch/arm/mach-shmobile/board-ape6evm.c
arch/arm/boot/dts/Makefile +1 -0
@@ -140,6 +140,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ 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 at 40000000 { + device_type = "memory"; + reg = <0 0x40000000 0 0x40000000>; + }; + + lbsc { + #address-cells = <1>; + #size-cells = <1>; + }; +};
arch/arm/mach-shmobile/Kconfig +7 -1
@@ -96,6 +96,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
@@ -189,7 +194,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---
@@ -199,6 +204,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
@@ -37,6 +37,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
Signature · 1 line
1.7.10.4
PATCH 4/11 ARM: shmobile: APE6EVM PFC support
In reply to Simon HormanFrom: Magnus Damm <[email protected]>
Start using the r8a73a4 PFC on the APE6EVM board
and configure the SCIFA0 console signals in the
PFC via PINCTRL.
--- 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 (); }
Signature · 1 line
1.7.10.4
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
In reply to Simon HormanFrom: 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.
--- 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 at 40000000 {
@@ -24,8 +24,29 @@ reg = <0 0x40000000 0 0x40000000>; }; + ape6evm_fixed_3v3: fixedregulator at 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 at 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_devices(void) 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 = {
Signature · 1 line
1.7.10.4
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Hi Simon, Magnus
Quoted 46 lines · Simon Horman
From: 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.
Signed-off-by Magnus Damm <[email protected]>Signed-off-by Simon Horman <[email protected]>--- 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 +14
-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 at 40000000 {@@ -24,8 +24,29 @@ reg = <0 0x40000000 0 0x40000000>; }; + ape6evm_fixed_3v3: fixedregulator at 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 at 8000000 { + compatible = "smsc,lan9118", "smsc,lan9115"; + reg = <0x08000000 0x1000>; + interrupt-parent = <&irqc1>;
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 52
Quoted 10 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +8
-0+ 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>; + }; }; };
The above didn't work in my tests without this:
(quoted diff) +0 -0
b/arch/arm/boot/dts/r8a73a4-ape6evm.dts
index f603c69..4fb0102 100644
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2 -0
@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>; ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Quoted 70 lines · Guennadi Liakhovetski
Hi Simon, Magnus
Quoted 46 lines · Simon Horman
From: 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.
Signed-off-by Magnus Damm <[email protected]>Signed-off-by Simon Horman <[email protected]>--- 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 +14
-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 at 40000000 {@@ -24,8 +24,29 @@ reg = <0 0x40000000 0 0x40000000>; }; + ape6evm_fixed_3v3: fixedregulator at 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 at 8000000 { + compatible = "smsc,lan9118", "smsc,lan9115"; + reg = <0x08000000 0x1000>; + interrupt-parent = <&irqc1>;arch/arm/boot/dts/r8a73a4-ape6evm.dts line 52
Quoted 10 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +8
-0+ 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>; + }; }; };The above didn't work in my tests without this:
arch/arm/boot/dts/r8a73a4-ape6evm.dts +0
-0
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 42
Quoted 10 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2
-0@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>; ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";
Could you please post this as a formal patch and indicate if you would like it included as a fix in v3.10 or not?
Also, I am curious to know what your tests are.
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Hi Simon
Quoted 78 lines · Simon Horman
Quoted 77 lines · Guennadi Liakhovetski
Hi Simon, Magnus
Quoted 46 lines · Simon Horman
From: 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.
Signed-off-by Magnus Damm <[email protected]>Signed-off-by Simon Horman <[email protected]>--- 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 +14
-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 at 40000000 {@@ -24,8 +24,29 @@ reg = <0 0x40000000 0 0x40000000>; }; + ape6evm_fixed_3v3: fixedregulator at 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 at 8000000 { + compatible = "smsc,lan9118", "smsc,lan9115"; + reg = <0x08000000 0x1000>; + interrupt-parent = <&irqc1>;arch/arm/boot/dts/r8a73a4-ape6evm.dts line 52
Quoted 10 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +8
-0+ 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>; + }; }; };The above didn't work in my tests without this:
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2
-0@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>;
Quoted 6 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 42
Quoted 3 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +0
-0ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";Could you please post this as a formal patch and indicate if you would like it included as a fix in v3.10 or not?
Can do that, sure, just thought maybe it would be better to fix the original patch. Besides, I wasn't sure what the correct values for "ranges" are, I just picked up something, that would be sufficient for ethernet. But if more devices are added to it in the future, maybe different ranges values would be needed. I think actually, lbsc should map the 3 BSC areas, so, the correct property would be
+ ranges = <0 0 0 0x14000000>;
Quoted 1 line
Also, I am curious to know what your tests are.
Just booting with NFS root. I think, anything involving ethernet. Without the "simple-bus" property the lbsc node doesn't get scanned, so, no device is added. Without "ranges" addresses cannot be mapped correctly.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Quoted 89 lines · Guennadi Liakhovetski
Hi Simon
Quoted 78 lines · Simon Horman
Quoted 77 lines · Guennadi Liakhovetski
Hi Simon, Magnus
Quoted 46 lines · Simon Horman
From: 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.
Signed-off-by Magnus Damm <[email protected]>Signed-off-by Simon Horman <[email protected]>--- 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 +14
-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 at 40000000 {@@ -24,8 +24,29 @@ reg = <0 0x40000000 0 0x40000000>; }; + ape6evm_fixed_3v3: fixedregulator at 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 at 8000000 { + compatible = "smsc,lan9118", "smsc,lan9115"; + reg = <0x08000000 0x1000>; + interrupt-parent = <&irqc1>;arch/arm/boot/dts/r8a73a4-ape6evm.dts line 52
Quoted 10 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +8
-0+ 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>; + }; }; };The above didn't work in my tests without this:
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2
-0@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>;Quoted 6 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 42
Quoted 3 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +0
-0ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";Could you please post this as a formal patch and indicate if you would like it included as a fix in v3.10 or not?
Quoted 6 lines
Can do that, sure, just thought maybe it would be better to fix the original patch. Besides, I wasn't sure what the correct values for "ranges" are, I just picked up something, that would be sufficient for ethernet. But if more devices are added to it in the future, maybe different ranges values would be needed. I think actually, lbsc should map the 3 BSC areas, so, the correct property would be
I believe the original patches are past the point where they can be updated.
With regards to the correct values, perhaps Magnus can help here?
Quoted 8 lines
(quoted diff) +1
-0+ ranges = <0 0 0 0x14000000>;Quoted 2 lines
Also, I am curious to know what your tests are.
Just booting with NFS root. I think, anything involving ethernet. Without the "simple-bus" property the lbsc node doesn't get scanned, so, no device is added. Without "ranges" addresses cannot be mapped correctly.
Ok, it sounds like it should be fixed for v3.10.
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
In reply to Guennadi LiakhovetskiHi,
Sorry, a bit behind on email and just discovered this.
Quoted 32 lines · Guennadi Liakhovetski
Quoted 16 lines
Quoted 16 lines
The above didn't work in my tests without this:
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2
-0@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>;Quoted 6 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 42
Quoted 3 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +0
-0ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";Could you please post this as a formal patch and indicate if you would like it included as a fix in v3.10 or not?
Can do that, sure, just thought maybe it would be better to fix the original patch. Besides, I wasn't sure what the correct values for "ranges" are, I just picked up something, that would be sufficient for ethernet. But if more devices are added to it in the future, maybe different ranges values would be needed. I think actually, lbsc should map the 3 BSC areas, so, the correct property would be
(quoted diff) +1
-0+ ranges = <0 0 0 0x14000000>;
Quoted 5 lines
Quoted 1 line
Also, I am curious to know what your tests are.
Just booting with NFS root. I think, anything involving ethernet. Without the "simple-bus" property the lbsc node doesn't get scanned, so, no device is added. Without "ranges" addresses cannot be mapped correctly.
Since it's a flat mapping you can just specify an empty "ranges" property, no need to actually define contents.
For more info, see http://devicetree.org/Device_Tree_Usage#Ranges_.28Address_Translation.29
-Olof
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Hi Olof
Quoted 38 lines · Olof Johansson
Hi,
Sorry, a bit behind on email and just discovered this.
Quoted 32 lines · Guennadi Liakhovetski
Quoted 16 lines
Quoted 16 lines
The above didn't work in my tests without this:
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2
-0@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>;Quoted 6 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 42
Quoted 3 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +0
-0ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";Could you please post this as a formal patch and indicate if you would like it included as a fix in v3.10 or not?
Can do that, sure, just thought maybe it would be better to fix the original patch. Besides, I wasn't sure what the correct values for "ranges" are, I just picked up something, that would be sufficient for ethernet. But if more devices are added to it in the future, maybe different ranges values would be needed. I think actually, lbsc should map the 3 BSC areas, so, the correct property would be
(quoted diff) +1
-0+ ranges = <0 0 0 0x14000000>;
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Also, I am curious to know what your tests are.
Just booting with NFS root. I think, anything involving ethernet. Without the "simple-bus" property the lbsc node doesn't get scanned, so, no device is added. Without "ranges" addresses cannot be mapped correctly.
Since it's a flat mapping you can just specify an empty "ranges" property, no need to actually define contents.
Yes, I knew about that, but does this also hold for busses with different #address-cells properties, i.e. between 64- and 32-bit busses?
Quoted 1 line
For more info, see http://devicetree.org/Device_Tree_Usage#Ranges_.28Address_Translation.29
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Quoted 48 lines · Guennadi Liakhovetski
Hi Olof
Quoted 44 lines · Olof Johansson
Hi,
Sorry, a bit behind on email and just discovered this.
Quoted 37 lines · Guennadi Liakhovetski
Quoted 16 lines
Quoted 16 lines
The above didn't work in my tests without this:
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2
-0@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>;Quoted 6 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 42
Quoted 3 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +0
-0ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";Could you please post this as a formal patch and indicate if you would like it included as a fix in v3.10 or not?
Can do that, sure, just thought maybe it would be better to fix the original patch. Besides, I wasn't sure what the correct values for "ranges" are, I just picked up something, that would be sufficient for ethernet. But if more devices are added to it in the future, maybe different ranges values would be needed. I think actually, lbsc should map the 3 BSC areas, so, the correct property would be
+ ranges = <0 0 0
0x14000000>;Quoted 1 line
Also, I am curious to know what your tests are.
Just booting with NFS root. I think, anything involving ethernet. Without the "simple-bus" property the lbsc node doesn't get scanned, so, no device is added. Without "ranges" addresses cannot be mapped correctly.
Quoted 5 lines
Quoted 2 lines
Since it's a flat mapping you can just specify an empty "ranges" property, no need to actually define contents.
Yes, I knew about that, but does this also hold for busses with different #address-cells properties, i.e. between 64- and 32-bit busses?
Oh, good question -- I don't think it does. But why go down, you might as well use 2 cells in that part of the tree too?
-Olof
PATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Quoted 50 lines · Olof Johansson
Quoted 48 lines · Guennadi Liakhovetski
Hi Olof
Quoted 44 lines · Olof Johansson
Hi,
Sorry, a bit behind on email and just discovered this.
Quoted 37 lines · Guennadi Liakhovetski
Quoted 16 lines
Quoted 16 lines
The above didn't work in my tests without this:
arch/arm/boot/dts/r8a73a4-ape6evm.dts +2
-0@@ -33,8 +33,10 @@ }; lbsc { + compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0 0x80000000>;Quoted 6 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts line 42
Quoted 3 lines
arch/arm/boot/dts/r8a73a4-ape6evm.dts +0
-0ethernet at 8000000 { compatible = "smsc,lan9118", "smsc,lan9115";Could you please post this as a formal patch and indicate if you would like it included as a fix in v3.10 or not?
Can do that, sure, just thought maybe it would be better to fix the original patch. Besides, I wasn't sure what the correct values for "ranges" are, I just picked up something, that would be sufficient for ethernet. But if more devices are added to it in the future, maybe different ranges values would be needed. I think actually, lbsc should map the 3 BSC areas, so, the correct property would be
+ ranges = <0 0 0
0x14000000>;Quoted 1 line
Also, I am curious to know what your tests are.
Just booting with NFS root. I think, anything involving ethernet. Without the "simple-bus" property the lbsc node doesn't get scanned, so, no device is added. Without "ranges" addresses cannot be mapped correctly.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Since it's a flat mapping you can just specify an empty "ranges" property, no need to actually define contents.
Yes, I knew about that, but does this also hold for busses with different #address-cells properties, i.e. between 64- and 32-bit busses?
Oh, good question -- I don't think it does. But why go down, you might as well use 2 cells in that part of the tree too?
Ok, I didn't write the original implementation of that bus and, therefore, didn't decide how many address cells it shall use. My task was to fix it. And yes, I agree, that there are 2 ways to fix the memory mapping: either define ranges to map from 64-bits to 32-bits, or to change all devices on the bus (currently there's only 1) to use 64-bit "reg" property and use "ranges" with no arguments. Since that bus is clearly within a 32-bit area, I would prefer the former solution not to have to drag 64 bits around an make device nodes simpler. Can we keep this approach or are you strongly against it?
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
Arnd Bergmann
maintainerPATCH 5/11 ARM: shmobile: APE6EVM LAN9220 support
Quoted 9 lines · Guennadi Liakhovetski
Ok, I didn't write the original implementation of that bus and, therefore, didn't decide how many address cells it shall use. My task was to fix it. And yes, I agree, that there are 2 ways to fix the memory mapping: either define ranges to map from 64-bits to 32-bits, or to change all devices on the bus (currently there's only 1) to use 64-bit "reg" property and use "ranges" with no arguments. Since that bus is clearly within a 32-bit area, I would prefer the former solution not to have to drag 64 bits around an make device nodes simpler. Can we keep this approach or are you strongly against it?
I believe we should attempt to have the DT representation as close as possible to what the hardware actually does. If this is a AHB bus or something else that is known to be always 32 bit, I would use a ranges property and #address-cells=<1>, but if this is a 64-bit wide AXIv4 instance I would use #address-cells=<2> and probably omit the ranges.
There is also the case where a device is attached to an external bus that has 0-based addressing. In that case I would put the actual translation into the ranges property, with all addresses that are translated by the bus controller, such as
lbsc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x08000000 0 0x1000000>; /* 16 MB @ 128 MB */
ethernet at 0 {
compatible = "smsc,lan9118", "smsc,lan9115";
reg = <0 0x1000>;
...
ArndPATCH 6/11 ARM: shmobile: Initial r8a7790 Lager board support
In reply to Simon HormanFrom: Magnus Damm <[email protected]>
Lager base board support making use of 2 GiB of memory, the r8a7790 SoC with the SCIF0 serial port and CA15 with ARM architected timer.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/r8a7790-lager.dts | 31 +++++++++++++++++++++++ arch/arm/mach-shmobile/Kconfig | 9 ++++++- arch/arm/mach-shmobile/Makefile | 1 + arch/arm/mach-shmobile/board-lager.c | 46 ++++++++++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/r8a7790-lager.dts create mode 100644 arch/arm/mach-shmobile/board-lager.c
arch/arm/boot/dts/Makefile +1 -0
@@ -138,6 +138,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \ r8a7740-armadillo800eva.dtb \ r8a7778-bockw.dtb \ r8a7779-marzen-reference.dtb \ + r8a7790-lager.dtb \ sh73a0-kzm9g.dtb \ sh73a0-kzm9g-reference.dtb \ r8a73a4-ape6evm.dtb \
arch/arm/boot/dts/r8a7790-lager.dts new file +31 -0
@@ -0,0 +1,31 @@ +/* + * Device Tree Source for the Lager 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/ "r8a7790.dtsi" + +/ { + model = "Lager"; + compatible = "renesas,lager", "renesas,r8a7790"; + + chosen { + bootargs = "console=ttySC6,115200 ignore_loglevel"; + }; + + memory at 40000000 { + device_type = "memory"; + reg = <0 0x40000000 0 0x80000000>; + }; + + lbsc { + #address-cells = <1>; + #size-cells = <1>; + }; +};
arch/arm/mach-shmobile/Kconfig +8 -1
@@ -154,6 +154,11 @@ config MACH_MARZEN_REFERENCE This is intended to aid developers +config MACH_LAGER + bool "Lager board" + depends on ARCH_R8A7790 + select USE_OF + config MACH_KZM9D bool "KZM9D board" depends on ARCH_EMEV2
@@ -194,7 +199,8 @@ config MEMORY_START hex "Physical memory start address" default "0x40000000" if MACH_AP4EVB || MACH_AG5EVM || \ MACH_MACKEREL || MACH_BONITO || \ - MACH_ARMADILLO800EVA || MACH_APE6EVM + MACH_ARMADILLO800EVA || MACH_APE6EVM || \ + MACH_LAGER default "0x41000000" if MACH_KOTA2 default "0x00000000" ---help---
@@ -204,6 +210,7 @@ config MEMORY_START config MEMORY_SIZE hex "Physical memory size" + default "0x80000000" if MACH_LAGER default "0x40000000" if MACH_APE6EVM default "0x20000000" if MACH_AG5EVM || MACH_BONITO || \ MACH_ARMADILLO800EVA
arch/arm/mach-shmobile/Makefile +1 -0
@@ -44,6 +44,7 @@ obj-$(CONFIG_MACH_BONITO) += board-bonito.o obj-$(CONFIG_MACH_BOCKW) += board-bockw.o obj-$(CONFIG_MACH_MARZEN) += board-marzen.o obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o +obj-$(CONFIG_MACH_LAGER) += board-lager.o obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o
arch/arm/mach-shmobile/board-lager.c new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 7/11 ARM: shmobile: mackerel: SDHI resources do not have to be numbered
In reply to Simon HormanFrom: Guennadi Liakhovetski <[email protected]>
The SDHI driver doesn't care about platform resource order, explicit resource numbering is redundant.
--- arch/arm/mach-shmobile/board-mackerel.c | 33 +++++++++++-------------------- 1 file changed, 12 insertions(+), 21 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +12 -21
@@ -982,21 +982,18 @@ static struct sh_mobile_sdhi_info sdhi0_info = { };static struct resource sdhi0_resources[] = { - [0 ] = { + { .name ="SDHI0" , .start =0xe6850000 , .end =0xe68500ff , .flags =IORESOURCE_MEM , - }, - [1 ] = { + }, { .start =evt2irq (0x0e00 )/* SDHI0_SDHI0I0 */ , .flags =IORESOURCE_IRQ , - }, - [2 ] = { + }, { .start =evt2irq (0x0e20 )/* SDHI0_SDHI0I1 */ , .flags =IORESOURCE_IRQ , - }, - [3 ] = { + }, { .start =evt2irq (0x0e40 )/* SDHI0_SDHI0I2 */ , .flags =IORESOURCE_IRQ , },
@@ -1025,23 +1022,20 @@ static struct sh_mobile_sdhi_info sdhi1_info = { };static struct resource sdhi1_resources[] = { - [0 ] = { + { .name ="SDHI1" , .start =0xe6860000 , .end =0xe68600ff , .flags =IORESOURCE_MEM , - }, - [1 ] = { + }, { .name =SH_MOBILE_SDHI_IRQ_CARD_DETECT , .start =evt2irq (0x0e80 ),/* SDHI1_SDHI1I0 */ .flags =IORESOURCE_IRQ , - }, - [2 ] = { + }, { .name =SH_MOBILE_SDHI_IRQ_SDCARD , .start =evt2irq (0x0ea0 ),/* SDHI1_SDHI1I1 */ .flags =IORESOURCE_IRQ , - }, - [3 ] = { + }, { .name =SH_MOBILE_SDHI_IRQ_SDIO , .start =evt2irq (0x0ec0 ),/* SDHI1_SDHI1I2 */ .flags =IORESOURCE_IRQ ,
@@ -1079,23 +1073,20 @@ static struct sh_mobile_sdhi_info sdhi2_info = { };static struct resource sdhi2_resources[] = { - [0 ] = { + { .name ="SDHI2" , .start =0xe6870000 , .end =0xe68700ff , .flags =IORESOURCE_MEM , - }, - [1 ] = { + }, { .name =SH_MOBILE_SDHI_IRQ_CARD_DETECT , .start =evt2irq (0x1200 ),/* SDHI2_SDHI2I0 */ .flags =IORESOURCE_IRQ , - }, - [2 ] = { + }, { .name =SH_MOBILE_SDHI_IRQ_SDCARD , .start =evt2irq (0x1220 ),/* SDHI2_SDHI2I1 */ .flags =IORESOURCE_IRQ , - }, - [3 ] = { + }, { .name =SH_MOBILE_SDHI_IRQ_SDIO , .start =evt2irq (0x1240 ),/* SDHI2_SDHI2I2 */ .flags =IORESOURCE_IRQ ,
Signature · 1 line
1.7.10.4
PATCH 8/11 ARM: shmobile: mackerel: remove OCR masks, where regulators are used
In reply to Simon HormanFrom: Guennadi Liakhovetski <[email protected]>
Both SDHI and MMCIF drivers ignore their OCR platform values, when available voltages can be retrieved from regulators.
--- arch/arm/mach-shmobile/board-mackerel.c | 2 -- 1 file changed, 2 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +0 -2
@@ -1014,7 +1014,6 @@ static struct platform_device sdhi0_device = {static struct sh_mobile_sdhi_info sdhi1_info = { .dma_slave_tx =SHDMA_SLAVE_SDHI1_TX , .dma_slave_rx =SHDMA_SLAVE_SDHI1_RX , - .tmio_ocr_mask =MMC_VDD_165_195 , .tmio_flags =TMIO_MMC_WRPROTECT_DISABLE , .tmio_caps =MMC_CAP_SD_HIGHSPEED |MMC_CAP_SDIO_IRQ |MMC_CAP_NEEDS_POLL ,
@@ -1125,7 +1124,6 @@ static struct resource sh_mmcif_resources[] = {static struct sh_mmcif_plat_data sh_mmcif_plat = { .sup_pclk =0 , - .ocr =MMC_VDD_165_195 |MMC_VDD_32_33 |MMC_VDD_33_34 , .caps =MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA |MMC_CAP_NEEDS_POLL ,
Signature · 1 line
1.7.10.4
PATCH 9/11 ARM: shmobile: mackerel: switch SDHI and MMCIF interfaces to slot-gpio
In reply to Simon HormanFrom: Guennadi Liakhovetski <[email protected]>
Both SDHI and MMCIF drivers can use the standard slot-gpio card-detection functions. Switch mackerel to using them instead of platform callbacks.
--- arch/arm/mach-shmobile/board-mackerel.c | 39 ++++++++++--------------------- 1 file changed, 12 insertions(+), 27 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +12 -27
@@ -963,15 +963,6 @@ static struct platform_device nand_flash_device = { }, }; -/* -* The card detect pin of the top SD/MMC slot (CN7) is active low and is -* connected to GPIO A22 of SH7372 (GPIO 41). -*/ -static int slot_cn7_get_cd (struct platform_device *pdev) -{ -return !gpio_get_value (41 ); -} -/* SDHI0 */ static struct sh_mobile_sdhi_info sdhi0_info = { .dma_slave_tx =SHDMA_SLAVE_SDHI0_TX ,
@@ -1011,13 +1002,15 @@ static struct platform_device sdhi0_device = {#if !defined(CONFIG_MMC_SH_MMCIF ) && !defined(CONFIG_MMC_SH_MMCIF_MODULE )/* SDHI1 */ + +/* GPIO 41 can trigger IRQ8, but it is used by USBHS1, we have to poll */ static struct sh_mobile_sdhi_info sdhi1_info = { .dma_slave_tx =SHDMA_SLAVE_SDHI1_TX , .dma_slave_rx =SHDMA_SLAVE_SDHI1_RX , - .tmio_flags =TMIO_MMC_WRPROTECT_DISABLE , + .tmio_flags =TMIO_MMC_WRPROTECT_DISABLE |TMIO_MMC_USE_GPIO_CD , .tmio_caps =MMC_CAP_SD_HIGHSPEED |MMC_CAP_SDIO_IRQ |MMC_CAP_NEEDS_POLL , - .get_cd = slot_cn7_get_cd, + .cd_gpio =41 , }; static struct resource sdhi1_resources[] = {
@@ -1052,23 +1045,19 @@ static struct platform_device sdhi1_device = { };#endif +/* SDHI2 */ +/* * The card detect pin of the top SD/MMC slot (CN23) is active low and is -* connected to GPIO SCIFB_SCK of SH7372 (162). +* connected to GPIO SCIFB_SCK of SH7372 (GPIO 162). */ -static int slot_cn23_get_cd (struct platform_device *pdev) -{ -return !gpio_get_value (162 ); -} - -/* SDHI2 */ static struct sh_mobile_sdhi_info sdhi2_info = { .dma_slave_tx =SHDMA_SLAVE_SDHI2_TX , .dma_slave_rx =SHDMA_SLAVE_SDHI2_RX , - .tmio_flags =TMIO_MMC_WRPROTECT_DISABLE , + .tmio_flags =TMIO_MMC_WRPROTECT_DISABLE |TMIO_MMC_USE_GPIO_CD , .tmio_caps =MMC_CAP_SD_HIGHSPEED |MMC_CAP_SDIO_IRQ |MMC_CAP_NEEDS_POLL , - .get_cd = slot_cn23_get_cd, + .cd_gpio =162 , };static struct resource sdhi2_resources[] = {
@@ -1127,7 +1116,9 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { .caps = MMC_CAP_4_BIT_DATA |MMC_CAP_8_BIT_DATA | MMC_CAP_NEEDS_POLL, - .get_cd = slot_cn7_get_cd, + .use_cd_gpio = true, +/* card detect pin for SD/MMC slot (CN7) */ + .cd_gpio = 41, .slave_id_tx = SHDMA_SLAVE_MMCIF_TX, .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, };
@@ -1475,12 +1466,6 @@ static void __init mackerel_init(void)/* SDHI0 PORT172 card-detect IRQ26 */ gpio_request (GPIO_FN_IRQ26_172 ,NULL ); -/* card detect pin for MMC slot (CN7) */ -gpio_request_one (41 ,GPIOF_IN ,NULL ); - -/* card detect pin for microSD slot (CN23) */ -gpio_request_one (162 ,GPIOF_IN ,NULL ); -/* FLCTL */ gpio_request (GPIO_FN_D0_NAF0 ,NULL );gpio_request (GPIO_FN_D1_NAF1 ,NULL );
Signature · 1 line
1.7.10.4
PATCH 10/11 ARM: shmobile: mackerel: add interrupt names for SDHI0
In reply to Simon HormanFrom: Guennadi Liakhovetski <[email protected]>
To unify with SDHI1 also use named IRQs for SDHI0. This also clarifies which specific IRQs are used.
--- arch/arm/mach-shmobile/board-mackerel.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +2 -7
@@ -979,12 +979,11 @@ static struct resource sdhi0_resources[] = { .end = 0xe68500ff, .flags = IORESOURCE_MEM, }, { - .start = evt2irq(0x0e00) /* SDHI0_SDHI0I0 */, - .flags = IORESOURCE_IRQ, - }, { + .name = SH_MOBILE_SDHI_IRQ_SDCARD, .start = evt2irq(0x0e20) /* SDHI0_SDHI0I1 */, .flags = IORESOURCE_IRQ, }, { + .name = SH_MOBILE_SDHI_IRQ_SDIO, .start = evt2irq(0x0e40) /* SDHI0_SDHI0I2 */, .flags = IORESOURCE_IRQ, },
@@ -1020,10 +1019,6 @@ static struct resource sdhi1_resources[] = { .end = 0xe68600ff, .flags = IORESOURCE_MEM, }, { - .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT, - .start = evt2irq(0x0e80), /* SDHI1_SDHI1I0 */ - .flags = IORESOURCE_IRQ, - }, { .name = SH_MOBILE_SDHI_IRQ_SDCARD, .start = evt2irq(0x0ea0), /* SDHI1_SDHI1I1 */ .flags = IORESOURCE_IRQ,
Signature · 1 line
1.7.10.4
PATCH 11/11 ARM: shmobile: mackerel: clean up MMCIF vs. SDHI1 selection
In reply to Simon HormanFrom: Guennadi Liakhovetski <[email protected]>
MMCIF and SDHI1 share the same slot on mackerel. One of them is selected by a jumper, which cannot be queried from software. Currently in software one of the two interfaces is selected, depending whether or not the MMCIF driver is enabled. This is not optimal, since the kernel has to be rebuilt to switch from one interface to another. Still, so far there isn't a better option. At least make this selection consistent.
--- arch/arm/mach-shmobile/board-mackerel.c | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-)
arch/arm/mach-shmobile/board-mackerel.c +17 -17
@@ -999,7 +999,7 @@ static struct platform_device sdhi0_device = { }, }; -#if !defined(CONFIG_MMC_SH_MMCIF ) && !defined(CONFIG_MMC_SH_MMCIF_MODULE ) +#if !IS_ENABLED (CONFIG_MMC_SH_MMCIF )/* SDHI1 */ /* GPIO 41 can trigger IRQ8, but it is used by USBHS1, we have to poll */
@@ -1062,10 +1062,6 @@ static struct resource sdhi2_resources[] = { .end = 0xe68700ff, .flags = IORESOURCE_MEM, }, { - .name = SH_MOBILE_SDHI_IRQ_CARD_DETECT, - .start = evt2irq(0x1200), /* SDHI2_SDHI2I0 */ - .flags = IORESOURCE_IRQ, - }, { .name = SH_MOBILE_SDHI_IRQ_SDCARD, .start = evt2irq(0x1220), /* SDHI2_SDHI2I1 */ .flags = IORESOURCE_IRQ,
@@ -1087,6 +1083,7 @@ static struct platform_device sdhi2_device = { };/* SH_MMCIF */ +#if IS_ENABLED(CONFIG_MMC_SH_MMCIF) static struct resource sh_mmcif_resources[] = { [0] = { .name = "MMCIF",
@@ -1118,7 +1115,7 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { .slave_id_rx = SHDMA_SLAVE_MMCIF_RX, }; -static struct platform_device sh_mmcif_device__maybe_unused = { +static struct platform_device sh_mmcif_device = { .name ="sh_mmcif" , .id =0 , .dev = {
@@ -1129,7 +1126,7 @@ static struct platform_device sh_mmcif_device __maybe_unused = { .num_resources = ARRAY_SIZE(sh_mmcif_resources), .resource = sh_mmcif_resources, }; - +#endif static int mackerel_camera_add (struct soc_camera_device *icd);static void mackerel_camera_del (struct soc_camera_device *icd);
@@ -1236,11 +1233,12 @@ static struct platform_device *mackerel_devices[] __initdata = { &fsi_hdmi_device, &nand_flash_device, &sdhi0_device, -#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) +#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF) &sdhi1_device, +#else + &sh_mmcif_device, #endif &sdhi2_device, - &sh_mmcif_device, &ceu_device, &mackerel_camera, &hdmi_device,
@@ -1305,11 +1303,6 @@ static struct i2c_board_info i2c1_devices[] = { };static const struct pinctrl_map mackerel_pinctrl_map[] = { -/* MMCIF */ -PIN_MAP_MUX_GROUP_DEFAULT ("sh_mmcif.0" ,"pfc-sh7372" , -"mmc0_data8_0" ,"mmc0" ), -PIN_MAP_MUX_GROUP_DEFAULT ("sh_mmcif.0" ,"pfc-sh7372" , -"mmc0_ctrl_0" ,"mmc0" ),/* SDHI0 */ PIN_MAP_MUX_GROUP_DEFAULT ("sh_mobile_sdhi.0" ,"pfc-sh7372" ,"sdhi0_data4" ,"sdhi0" ),
@@ -1318,11 +1311,17 @@ static const struct pinctrl_map mackerel_pinctrl_map[] = { PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-sh7372", "sdhi0_wp", "sdhi0"),/* SDHI1 */ -#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) +#if !IS_ENABLED (CONFIG_MMC_SH_MMCIF )PIN_MAP_MUX_GROUP_DEFAULT ("sh_mobile_sdhi.1" ,"pfc-sh7372" ,"sdhi1_data4" ,"sdhi1" ),PIN_MAP_MUX_GROUP_DEFAULT ("sh_mobile_sdhi.1" ,"pfc-sh7372" ,"sdhi1_ctrl" ,"sdhi1" ), +#else +/* MMCIF */ +PIN_MAP_MUX_GROUP_DEFAULT ("sh_mmcif.0" ,"pfc-sh7372" , +"mmc0_data8_0" ,"mmc0" ), +PIN_MAP_MUX_GROUP_DEFAULT ("sh_mmcif.0" ,"pfc-sh7372" , +"mmc0_ctrl_0" ,"mmc0" ), #endif/* SDHI2 */ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-sh7372",
@@ -1347,10 +1346,11 @@ static void __init mackerel_init(void) { "A3SP", &usbhs0_device, }, { "A3SP", &usbhs1_device, }, { "A3SP", &nand_flash_device, }, - { "A3SP", &sh_mmcif_device, }, { "A3SP", &sdhi0_device, }, -#if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE) +#if !IS_ENABLED(CONFIG_MMC_SH_MMCIF) { "A3SP", &sdhi1_device, }, +#else + { "A3SP", &sh_mmcif_device, }, #endif { "A3SP", &sdhi2_device, }, { "A4R", &ceu_device, },
Signature · 1 line
1.7.10.4
Hi,
Quoted 10 lines · Simon Horman
Hi Olof, Hi Arnd,
The following changes since commit
eb0ae7280939fda741ad6ae9b108725517652f56:Merge tag 'renesas-pinmux2-for-v3.10' into boards-base (2013-04-03 10:49:18 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.gittags/renesas-boards3-for-v3.10
Pulled in in a next/boards2 since it depends on next/soc2.
Quoted 1 line
arch/arm/configs/bockw_defconfig | 66 +++++++++++++++
shmobile is now up to 11 defconfigs in arch/arm/configs. It'd be nice if you could move towards what OMAP and many other platforms have started doing for a while now, with one superset defconfig for the platform (well, one for v4/v5 harware and one for v6+).
-Olof
Quoted 14 lines · Olof Johansson
Hi,
Quoted 10 lines · Simon Horman
Hi Olof, Hi Arnd,
The following changes since commit
eb0ae7280939fda741ad6ae9b108725517652f56:Merge tag 'renesas-pinmux2-for-v3.10' into boards-base (2013-04-03 10:49:18 +0900)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.gittags/renesas-boards3-for-v3.10
Quoted 8 lines
Pulled in in a next/boards2 since it depends on next/soc2.
Quoted 1 line
arch/arm/configs/bockw_defconfig | 66 +++++++++++++++shmobile is now up to 11 defconfigs in
arch/arm/configs. It'd be nice if you could move towards what OMAP and many other platforms have started doing for a while now, with one superset defconfig for the platform (well, one for v4/v5 harware and one for v6+).
The not so good news is that there is one more in the pipeline for the lager board.
The more positive news is that this morning I sent out a series to try and kick of consolidation. I have CCed you on that series.