* [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT
@ 2013-10-02 6:14 Kuninori Morimoto
2013-10-02 8:04 ` Simon Horman
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2013-10-02 6:14 UTC (permalink / raw)
To: linux-sh
This patch enables SMSC on BockW board via DT.
SMSC interrupt is connected to FPGA, and is connected
to IRQ0 on BockW.
This patch enabled INTC IRQ too
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
arch/arm/boot/dts/r8a7778-bockw-reference.dts | 27 +++++++++++++++++++++++-
arch/arm/mach-shmobile/board-bockw-reference.c | 20 ++++++++++++++++++
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
index 9bb903a..4425fd2 100644
--- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
@@ -22,11 +22,36 @@
compatible = "renesas,bockw-reference", "renesas,r8a7778";
chosen {
- bootargs = "console=ttySC0,115200 ignore_loglevel rw";
+ bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
};
memory {
device_type = "memory";
reg = <0x60000000 0x10000000>;
};
+
+ fixedregulator3v3: fixedregulator@0 {
+ compatible = "regulator-fixed";
+ regulator-name = "fixed-3.3V";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ regulator-always-on;
+ };
+
+ lan0@18300000 {
+ compatible = "smsc,lan9220", "smsc,lan9115";
+ reg = <0x18300000 0x1000>;
+
+ phy-mode = "mii";
+ interrupt-parent = <&irqpin>;
+ interrupts = <0 0>; /* IRQ0: hwirq 0 on irqpin */
+ reg-io-width = <4>;
+ vddvario-supply = <&fixedregulator3v3>;
+ vdd33a-supply = <&fixedregulator3v3>;
+ };
+};
+
+&irqpin {
+ status = "okay";
};
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
index 1a7c893..ae88fda 100644
--- a/arch/arm/mach-shmobile/board-bockw-reference.c
+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
@@ -36,15 +36,35 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
"scif0_ctrl", "scif0"),
};
+#define FPGA 0x18200000
+#define IRQ0MR 0x30
+#define COMCTLR 0x101c
static void __init bockw_init(void)
{
+ static void __iomem *fpga;
+
r8a7778_clock_init();
+ r8a7778_init_irq_extpin_dt(1);
pinctrl_register_mappings(bockw_pinctrl_map,
ARRAY_SIZE(bockw_pinctrl_map));
r8a7778_pinmux_init();
r8a7778_add_dt_devices();
+ fpga = ioremap_nocache(FPGA, SZ_1M);
+ if (fpga) {
+ /*
+ * CAUTION
+ *
+ * IRQ0/1 is cascaded interrupt from FPGA.
+ * it should be cared in the future
+ * Now, it is assuming IRQ0 was used only from SMSC.
+ */
+ u16 val = ioread16(fpga + IRQ0MR);
+ val &= ~(1 << 4); /* enable SMSC911x */
+ iowrite16(val, fpga + IRQ0MR);
+ }
+
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT
2013-10-02 6:14 [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT Kuninori Morimoto
@ 2013-10-02 8:04 ` Simon Horman
2013-10-02 8:06 ` Kuninori Morimoto
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-10-02 8:04 UTC (permalink / raw)
To: linux-sh
On Tue, Oct 01, 2013 at 11:14:12PM -0700, Kuninori Morimoto wrote:
> This patch enables SMSC on BockW board via DT.
> SMSC interrupt is connected to FPGA, and is connected
> to IRQ0 on BockW.
> This patch enabled INTC IRQ too
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/boot/dts/r8a7778-bockw-reference.dts | 27 +++++++++++++++++++++++-
> arch/arm/mach-shmobile/board-bockw-reference.c | 20 ++++++++++++++++++
> 2 files changed, 46 insertions(+), 1 deletion(-)
Please split this into two patches.
1. A DT patch that modifies r8a7778-bockw-reference.dts
2. A board patch that modifies board-bockw-reference.c
>
> diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> index 9bb903a..4425fd2 100644
> --- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> +++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> @@ -22,11 +22,36 @@
> compatible = "renesas,bockw-reference", "renesas,r8a7778";
>
> chosen {
> - bootargs = "console=ttySC0,115200 ignore_loglevel rw";
> + bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
> };
>
> memory {
> device_type = "memory";
> reg = <0x60000000 0x10000000>;
> };
> +
> + fixedregulator3v3: fixedregulator@0 {
> + compatible = "regulator-fixed";
> + regulator-name = "fixed-3.3V";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-boot-on;
> + regulator-always-on;
> + };
> +
> + lan0@18300000 {
> + compatible = "smsc,lan9220", "smsc,lan9115";
> + reg = <0x18300000 0x1000>;
> +
> + phy-mode = "mii";
> + interrupt-parent = <&irqpin>;
> + interrupts = <0 0>; /* IRQ0: hwirq 0 on irqpin */
> + reg-io-width = <4>;
> + vddvario-supply = <&fixedregulator3v3>;
> + vdd33a-supply = <&fixedregulator3v3>;
> + };
> +};
> +
> +&irqpin {
> + status = "okay";
> };
> diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
> index 1a7c893..ae88fda 100644
> --- a/arch/arm/mach-shmobile/board-bockw-reference.c
> +++ b/arch/arm/mach-shmobile/board-bockw-reference.c
> @@ -36,15 +36,35 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
> "scif0_ctrl", "scif0"),
> };
>
> +#define FPGA 0x18200000
> +#define IRQ0MR 0x30
> +#define COMCTLR 0x101c
> static void __init bockw_init(void)
> {
> + static void __iomem *fpga;
> +
> r8a7778_clock_init();
> + r8a7778_init_irq_extpin_dt(1);
>
> pinctrl_register_mappings(bockw_pinctrl_map,
> ARRAY_SIZE(bockw_pinctrl_map));
> r8a7778_pinmux_init();
> r8a7778_add_dt_devices();
>
> + fpga = ioremap_nocache(FPGA, SZ_1M);
> + if (fpga) {
> + /*
> + * CAUTION
> + *
> + * IRQ0/1 is cascaded interrupt from FPGA.
> + * it should be cared in the future
> + * Now, it is assuming IRQ0 was used only from SMSC.
> + */
> + u16 val = ioread16(fpga + IRQ0MR);
> + val &= ~(1 << 4); /* enable SMSC911x */
> + iowrite16(val, fpga + IRQ0MR);
> + }
> +
> of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
> }
>
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT
2013-10-02 6:14 [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT Kuninori Morimoto
2013-10-02 8:04 ` Simon Horman
@ 2013-10-02 8:06 ` Kuninori Morimoto
2013-10-03 21:21 ` Sergei Shtylyov
2013-10-03 23:56 ` Simon Horman
3 siblings, 0 replies; 5+ messages in thread
From: Kuninori Morimoto @ 2013-10-02 8:06 UTC (permalink / raw)
To: linux-sh
Hi Simon
> > This patch enables SMSC on BockW board via DT.
> > SMSC interrupt is connected to FPGA, and is connected
> > to IRQ0 on BockW.
> > This patch enabled INTC IRQ too
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> > arch/arm/boot/dts/r8a7778-bockw-reference.dts | 27 +++++++++++++++++++++++-
> > arch/arm/mach-shmobile/board-bockw-reference.c | 20 ++++++++++++++++++
> > 2 files changed, 46 insertions(+), 1 deletion(-)
>
> Please split this into two patches.
>
> 1. A DT patch that modifies r8a7778-bockw-reference.dts
> 2. A board patch that modifies board-bockw-reference.c
OK, will do
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT
2013-10-02 6:14 [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT Kuninori Morimoto
2013-10-02 8:04 ` Simon Horman
2013-10-02 8:06 ` Kuninori Morimoto
@ 2013-10-03 21:21 ` Sergei Shtylyov
2013-10-03 23:56 ` Simon Horman
3 siblings, 0 replies; 5+ messages in thread
From: Sergei Shtylyov @ 2013-10-03 21:21 UTC (permalink / raw)
To: linux-sh
Hello.
On 02-10-2013 8:14, Kuninori Morimoto wrote:
> This patch enables SMSC on BockW board via DT.
> SMSC interrupt is connected to FPGA, and is connected
> to IRQ0 on BockW.
> This patch enabled INTC IRQ too
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> arch/arm/boot/dts/r8a7778-bockw-reference.dts | 27 +++++++++++++++++++++++-
> arch/arm/mach-shmobile/board-bockw-reference.c | 20 ++++++++++++++++++
> 2 files changed, 46 insertions(+), 1 deletion(-)
> diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> index 9bb903a..4425fd2 100644
> --- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> +++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> @@ -22,11 +22,36 @@
[...]
> + lan0@18300000 {
According to the ePAPR spec, the node name should be "ethernet", not "lan0".
WBR, Sergei
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT
2013-10-02 6:14 [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT Kuninori Morimoto
` (2 preceding siblings ...)
2013-10-03 21:21 ` Sergei Shtylyov
@ 2013-10-03 23:56 ` Simon Horman
3 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2013-10-03 23:56 UTC (permalink / raw)
To: linux-sh
On Fri, Oct 04, 2013 at 12:21:08AM +0200, Sergei Shtylyov wrote:
> Hello.
>
> On 02-10-2013 8:14, Kuninori Morimoto wrote:
>
> >This patch enables SMSC on BockW board via DT.
> >SMSC interrupt is connected to FPGA, and is connected
> >to IRQ0 on BockW.
> >This patch enabled INTC IRQ too
>
> >Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >---
> > arch/arm/boot/dts/r8a7778-bockw-reference.dts | 27 +++++++++++++++++++++++-
> > arch/arm/mach-shmobile/board-bockw-reference.c | 20 ++++++++++++++++++
> > 2 files changed, 46 insertions(+), 1 deletion(-)
>
> >diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> >index 9bb903a..4425fd2 100644
> >--- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> >+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
> >@@ -22,11 +22,36 @@
> [...]
> >+ lan0@18300000 {
>
> According to the ePAPR spec, the node name should be "ethernet", not "lan0".
>
> WBR, Sergei
Morimoto-san, Sergei,
could one of you send a follow-up patch to fix this?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-03 23:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-02 6:14 [PATCH 3/3] ARM: shmobile: bockw: add SMSC support on DT Kuninori Morimoto
2013-10-02 8:04 ` Simon Horman
2013-10-02 8:06 ` Kuninori Morimoto
2013-10-03 21:21 ` Sergei Shtylyov
2013-10-03 23:56 ` Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.