ARM: mach-moxart: add MOXA ART SoC support
Subsystems (12)
cover ARM: mach-moxart: add MOXA ART SoC support
This set adds support for MOXA ART SoC.
Applies to arm-soc/for-next.
Note: no boot without clocksource and irqchip drivers (I'll submit these separately to the correct maintainers).
The main thread of discussion can be found here:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-May/168438.html
Full source (including drivers) here:
https://code.google.com/p/linux-3-10-rc1-moxart/source/list
Jonas Jensen (3):
ARM: mach-moxart: add MOXA ART SoC files
ARM: mach-moxart: add MOXA ART device tree files
ARM: mach-moxart: add MOXA ART UART debug files
arch/arm/Kconfig | 2 + arch/arm/Kconfig.debug | 10 +++ arch/arm/Makefile | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts | 89 ++++++++++++++++++++++ arch/arm/boot/dts/moxart.dtsi | 84 +++++++++++++++++++++ arch/arm/configs/moxart_uc7112lx_defconfig | 112 ++++++++++++++++++++++++++++ arch/arm/include/debug/moxart.S | 14 ++++ arch/arm/mach-moxart/Kconfig | 28 +++++++ arch/arm/mach-moxart/Makefile | 10 +++ arch/arm/mach-moxart/idle.c | 21 +++++ arch/arm/mach-moxart/moxart.c | 23 ++++++ 12 files changed, 395 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/moxart-uc7112lx.dts create mode 100644 arch/arm/boot/dts/moxart.dtsi create mode 100644 arch/arm/configs/moxart_uc7112lx_defconfig create mode 100644 arch/arm/include/debug/moxart.S create mode 100644 arch/arm/mach-moxart/Kconfig create mode 100644 arch/arm/mach-moxart/Makefile create mode 100644 arch/arm/mach-moxart/idle.c create mode 100644 arch/arm/mach-moxart/moxart.c
Signature · 1 line
1.7.2.5
PATCH 1/3 ARM: mach-moxart: add MOXA ART SoC files
--- arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/configs/moxart_uc7112lx_defconfig | 112 ++++++++++++++++++++++++++++ arch/arm/mach-moxart/Kconfig | 28 +++++++ arch/arm/mach-moxart/Makefile | 10 +++ arch/arm/mach-moxart/idle.c | 21 +++++ arch/arm/mach-moxart/moxart.c | 23 ++++++ 7 files changed, 197 insertions(+), 0 deletions(-) create mode 100644 arch/arm/configs/moxart_uc7112lx_defconfig create mode 100644 arch/arm/mach-moxart/Kconfig create mode 100644 arch/arm/mach-moxart/Makefile create mode 100644 arch/arm/mach-moxart/idle.c create mode 100644 arch/arm/mach-moxart/moxart.c
arch/arm/Kconfig +2 -0
@@ -937,6 +937,8 @@ source "arch/arm/mach-footbridge/Kconfig" source "arch/arm/mach-gemini/Kconfig" +source "arch/arm/mach-moxart/Kconfig" + source "arch/arm/mach-highbank/Kconfig" source "arch/arm/mach-integrator/Kconfig"
arch/arm/Makefile +1 -0
@@ -148,6 +148,7 @@ machine-$(CONFIG_ARCH_DOVE) += dove machine-$(CONFIG_ARCH_EBSA110) += ebsa110 machine-$(CONFIG_ARCH_EP93XX) += ep93xx machine-$(CONFIG_ARCH_GEMINI) += gemini +machine-$(CONFIG_ARCH_MOXART) += moxart machine-$(CONFIG_ARCH_HIGHBANK) += highbank machine-$(CONFIG_ARCH_INTEGRATOR) += integrator machine-$(CONFIG_ARCH_IOP13XX) += iop13xx
arch/arm/configs/moxart_uc7112lx_defconfig new file +112 -0
112 lines not on this page · raw message
arch/arm/mach-moxart/Kconfig new file +28 -0
@@ -0,0 +1,28 @@ +config ARCH_MOXART + bool "MOXA ART SoC" if (ARCH_MULTI_V4) + select CPU_FA526 + select ARM_DMA_MEM_BUFFERABLE + select USE_OF + select CLKSRC_OF + select HAVE_CLK + select COMMON_CLK + select GENERIC_IRQ_CHIP + select ARCH_REQUIRE_GPIOLIB + help + Say Y here if you want to run your kernel on hardware with a MOXA ART SoC. + This is a Faraday FA526 ARMv4 32-bit 192 MHz processor with MMU and 16KB/8KB D/I-cache (UC-7112-LX) + This perticular SoC is used on models UC-7101, UC-7112/UC-7110, IA240/IA241, IA3341. + +if ARCH_MOXART + +menu "MOXA ART SoC Implementation" + +config MACH_UC7112LX + bool "MOXA UC-7112-LX" + depends on ARCH_MOXART + help + Say Y here if you intend to run this kernel on a MOXA UC-7112-LX embedded computer. + +endmenu + +endif
arch/arm/mach-moxart/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +# +# Makefile for the linux kernel. +# + +# Object file lists. + +obj-y := idle.o + +obj-$(CONFIG_MACH_UC7112LX) += moxart.o +
arch/arm/mach-moxart/idle.c new file +21 -0
@@ -0,0 +1,21 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, +* or (at your option) any later version. */ + +#include <linux/init.h> +#include <asm/system.h> +#include <asm/proc-fns.h> + +static void moxart_idle (void ) +{ +} + +static int __init moxart_idle_init (void ) +{ + arm_pm_idle = moxart_idle; +return 0 ; +} + +arch_initcall (moxart_idle_init);
arch/arm/mach-moxart/moxart.c new file +23 -0
@@ -0,0 +1,23 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, +* or (at your option) any later version. */ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/of_platform.h> +#include <linux/clk-provider.h> + +#include <asm/mach/arch.h> + +static const char *const moxart_dt_compat[] = { +"moxa,moxart-uc-7112-lx" , +NULL , +}; + +DT_MACHINE_START (MOXART ,"MOXA UC-7112-LX" ) + .dt_compat = moxart_dt_compat, +MACHINE_END +
Signature · 1 line
1.7.2.5
Re: [PATCH 1/3] ARM: mach-moxart: add MOXA ART SoC files
Hi,
This looks pretty good. I have mostly a bunch of nits below.
Please feel free to cc [email protected] (which goes to us arm-soc maintainers) on future postings.
Quoted 2 lines · Jonas Jensen
Signed-off-by Jonas Jensen <[email protected]>
You should provide a commit message, ideally with a short introduction of the platform.
arch/arm/configs/moxart_uc7112lx_defconfig
Quoted 45 lines
--- arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/configs/moxart_uc7112lx_defconfig | 112 ++++++++++++++++++++++++++++ arch/arm/mach-moxart/Kconfig | 28 +++++++ arch/arm/mach-moxart/Makefile | 10 +++ arch/arm/mach-moxart/idle.c | 21 +++++ arch/arm/mach-moxart/moxart.c | 23 ++++++ 7 files changed, 197 insertions(+), 0 deletions(-) create mode 100644 arch/arm/configs/moxart_uc7112lx_defconfig create mode 100644 arch/arm/mach-moxart/Kconfig create mode 100644 arch/arm/mach-moxart/Makefile create mode 100644 arch/arm/mach-moxart/idle.c create mode 100644 arch/arm/mach-moxart/moxart.carch/arm/Kconfig +2
-0@@ -937,6 +937,8 @@ source "arch/arm/mach-footbridge/Kconfig" source "arch/arm/mach-gemini/Kconfig" +source "arch/arm/mach-moxart/Kconfig" + source "arch/arm/mach-highbank/Kconfig" source "arch/arm/mach-integrator/Kconfig"arch/arm/Makefile +1
-0@@ -148,6 +148,7 @@ machine-$(CONFIG_ARCH_DOVE) += dove machine-$(CONFIG_ARCH_EBSA110) += ebsa110 machine-$(CONFIG_ARCH_EP93XX) += ep93xx machine-$(CONFIG_ARCH_GEMINI) += gemini +machine-$(CONFIG_ARCH_MOXART) += moxart machine-$(CONFIG_ARCH_HIGHBANK) += highbank machine-$(CONFIG_ARCH_INTEGRATOR) += integrator machine-$(CONFIG_ARCH_IOP13XX) += iop13xxarch/arm/configs/moxart_uc7112lx_defconfig new file +0
-0
It'd be nice to keep the defconfig generic, and make sure to enable all boards in it -- we're generally OK with adding one defconfig per platform upstream but not more.
arch/arm/mach-moxart/Kconfig line 2
Quoted 8 lines
arch/arm/mach-moxart/Kconfig new file +2
-0@@ -0,0 +1,28 @@ +config ARCH_MOXART + bool "MOXA ART SoC" if (ARCH_MULTI_V4)
No parens needed
arch/arm/mach-moxart/Kconfig line 14
Quoted 12 lines
arch/arm/mach-moxart/Kconfig new file +12
-0+ select CPU_FA526 + select ARM_DMA_MEM_BUFFERABLE + select USE_OF + select CLKSRC_OF + select HAVE_CLK + select COMMON_CLK + select GENERIC_IRQ_CHIP + select ARCH_REQUIRE_GPIOLIB + help + Say Y here if you want to run your kernel on hardware with a MOXA ART SoC. + This is a Faraday FA526 ARMv4 32-bit 192 MHz processor with MMU and 16KB/8KB D/I-cache (UC-7112-LX) + This perticular SoC is used on models UC-7101, UC-7112/UC-7110, IA240/IA241, IA3341.
This should probably be line-wrapped so it doesn't get too wide when looking at the help text.
arch/arm/mach-moxart/Kconfig line 22
Quoted 8 lines
arch/arm/mach-moxart/Kconfig new file +8
-0+ +if ARCH_MOXART + +menu "MOXA ART SoC Implementation" + +config MACH_UC7112LX + bool "MOXA UC-7112-LX" + depends on ARCH_MOXART
Since the menu is already wrapped with if ARCH_MOXART, you don't need it here.
arch/arm/mach-moxart/Kconfig line 24
Quoted 2 lines
arch/arm/mach-moxart/Kconfig new file +2
-0+ help + Say Y here if you intend to run this kernel on a MOXA UC-7112-LX embedded computer.
Same here w.r.t wrapping
arch/arm/mach-moxart/Makefile line 3
Quoted 13 lines
arch/arm/mach-moxart/Kconfig new file +4
-0+ +endmenu + +endifarch/arm/mach-moxart/Makefile new file +3
-0@@ -0,0 +1,10 @@ +# +# Makefile for the linux kernel. +#
Stale comment, can just remove it.
Quoted 13 lines
arch/arm/mach-moxart/Makefile new file +7
-0+ +# Object file lists. + +obj-y := idle.o + +obj-$(CONFIG_MACH_UC7112LX) += moxart.o +arch/arm/mach-moxart/idle.c new file +0
-0
arch/arm/mach-moxart/idle.c line 5
Quoted 5 lines
arch/arm/mach-moxart/idle.c new file +5
-0@@ -0,0 +1,21 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, +* or (at your option) any later version. */
These are sort of non-standard format. While I can't tell you what copyright text to use (within reason), please format it similarly to how others do, please.
arch/arm/mach-moxart/idle.c line 9
Quoted 3 lines
arch/arm/mach-moxart/idle.c new file +3
-0+#include <linux/init.h> +#include <asm/system.h> +#include <asm/proc-fns.h>
arm_pm_idle is defined in <asm/system_misc.h>, so it's a good idea to include that directly.
arch/arm/mach-moxart/idle.c line 21
Quoted 12 lines
arch/arm/mach-moxart/idle.c new file +12
-0+ +static void moxart_idle (void ) +{ +} + +static int __init moxart_idle_init (void ) +{ + arm_pm_idle = moxart_idle; +return 0 ; +} + +arch_initcall (moxart_idle_init);
If you multiplatform enable this, then you need to have a check in moxart_idle_init() to make sure you're running on a moxart soc. Otherwise this will still be called and override the arm_pm_idle setting on other platforms as well.
arch/arm/mach-moxart/moxart.c line 5
Quoted 11 lines
arch/arm/mach-moxart/moxart.c new file +5
-0@@ -0,0 +1,23 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, +* or (at your option) any later version. */
Same here w.r.t. copyright formatting.
arch/arm/mach-moxart/moxart.c line 11
Quoted 6 lines
arch/arm/mach-moxart/moxart.c new file +6
-0+ +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/of_platform.h> +#include <linux/clk-provider.h>
I'm guessing some of these will be needed later when you add more code, so it might not make sense to remove them just for that, but they sure aren't all needed now. :)
Quoted 15 lines
arch/arm/mach-moxart/moxart.c new file +12
-0+ +#include <asm/mach/arch.h> + +static const char *const moxart_dt_compat[] = { +"moxa,moxart-uc-7112-lx" , +NULL , +}; + +DT_MACHINE_START (MOXART ,"MOXA UC-7112-LX" ) + .dt_compat = moxart_dt_compat, +MACHINE_END +Signature · 1 line
1.7.2.5
Re: [PATCH 1/3] ARM: mach-moxart: add MOXA ART SoC files
Hi,
Thanks for the replies.
What isn't commented below should already be fixed. I'll resubmit the entire set when it looks like there's nothing left to amend.
Quoted 2 lines · Olof Johansson
You should provide a commit message, ideally with a short introduction of the platform.
Will do. I was thinking I should do that, this is the first time I used git format-patch / git send-email.
Quoted 5 lines
Quoted 1 line
+++ b/arch/arm/configs/moxart_uc7112lx_defconfig
It'd be nice to keep the defconfig generic, and make sure to enable all boards in it -- we're generally OK with adding one defconfig per platform upstream but not more.
Since MACH_UC7112LX is the only board right now, how can it "enable all boards"?
One way I can think of is to remove CONFIG_MACH_UC7112LX=y from defconfig and have it (and all future boards) "default y" in arch/arm/mach-moxart/Kconfig.
I focus on a single hardware, UC-7112-LX. There's at least one more board with only minor differences (RAM / flash size). But for now, MACH_UC7112LX is the one I have access to and can test. I think UC-7110 is already supported, that it would boot, just copy arch/arm/boot/dts/moxart-uc7112lx.dts and modify ranges for RAM and MTD. I want to leave this in a state where remaining hardware can easily be added, albeit by someone that isn't me :)
Quoted 4 lines
If you multiplatform enable this, then you need to have a check in
moxart_idle_init()to make sure you're running on a moxart soc. Otherwise this will still be called and override thearm_pm_idlesetting on other platforms as well.
I can't find a good example of how other platforms do this, is a DT lookup an accepted solution? :
static const struct of_device_id moxart_match[] = {
{ .compatible = "moxa,moxart" },
{ }
};
static int __init moxart_idle_init(void)
{
struct device_node *node;
node = of_find_matching_node(NULL, moxart_match);
if (!node)
return -ENODEV;
arm_pm_idle = moxart_idle;
return 0;
}arch_initcall(moxart_idle_init);
Best regards,
Jonas
Re: [PATCH 1/3] ARM: mach-moxart: add MOXA ART SoC files
Hi,
Quoted 14 lines · Jonas Jensen
Hi,
Thanks for the replies.
What isn't commented below should already be fixed. I'll resubmit the entire set when it looks like there's nothing left to amend.
Quoted 2 lines · Olof Johansson
You should provide a commit message, ideally with a short introduction of the platform.
Will do. I was thinking I should do that, this is the first time I used git format-patch / git send-email.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
+++ b/arch/arm/configs/moxart_uc7112lx_defconfig
It'd be nice to keep the defconfig generic, and make sure to enable all boards in it -- we're generally OK with adding one defconfig per platform upstream but not more.
Since
MACH_UC7112LXis the only board right now, how can it "enable all boards"?
Yeah, that was more with respect to future use of the defconfig. So keeping it generic in name for now (moxart_defconfig) is really all I am asking for.
Quoted 3 lines
One way I can think of is to remove
CONFIG_MACH_UC7112LX=yfrom defconfig and have it (and all future boards) "default y" inarch/arm/mach-moxart/Kconfig.
Enabling it in the defconfig is just fine, no need to change anything there at this time.
Quoted 7 lines
I focus on a single hardware, UC-7112-LX. There's at least one more board with only minor differences (RAM / flash size). But for now,
MACH_UC7112LXis the one I have access to and can test. I think UC-7110 is already supported, that it would boot, just copyarch/arm/boot/dts/moxart-uc7112lx.dtsand modify ranges for RAM and MTD. I want to leave this in a state where remaining hardware can easily be added, albeit by someone that isn't me :)
Sure, that's a fair stance.
Quoted 25 lines
Quoted 4 lines
If you multiplatform enable this, then you need to have a check in
moxart_idle_init()to make sure you're running on a moxart soc. Otherwise this will still be called and override thearm_pm_idlesetting on other platforms as well.I can't find a good example of how other platforms do this, is a DT lookup an accepted solution? :
static const struct
of_device_idmoxart_match[] = {
{ .compatible = "moxa,moxart" },
{ }
};static int
__initmoxart_idle_init(void){ struct device_node *node; node = of_find_matching_node(NULL, moxart_match); if (!node) return -ENODEV; arm_pm_idle = moxart_idle; return 0; }
Quoted 1 line
arch_initcall(moxart_idle_init);
Easiest of all is if you have a "moxa,moxart" compatible field as the most-specific one for your machine, then you can just do:
...
{
if (!of_machine_is_compatible("moxa,moxart"))
return -ENODEV;
arm_pm_idle = moxart_idle;
return 0;
}-Olof
Arnd Bergmann
maintainerRe: [PATCH 1/3] ARM: mach-moxart: add MOXA ART SoC files
In reply to Jonas JensenQuoted 17 lines · On Wednesday 12 June 2013 14:34:06 Jonas Jensen wrote:
arch/arm/mach-moxart/idle.c new file +11
-0@@ -0,0 +1,21 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, +* or (at your option) any later version. */ + +#include <linux/init.h> +#include <asm/system.h> +#include <asm/proc-fns.h> + +static void moxart_idle (void )
arch/arm/mach-moxart/idle.c line 21
Quoted 10 lines
arch/arm/mach-moxart/idle.c new file +10
-0+{ +} + +static int __init moxart_idle_init (void ) +{ + arm_pm_idle = moxart_idle; +return 0 ; +} + +arch_initcall (moxart_idle_init);
IIRC Russell suggested changing cpu_fa526_do_idle() to not call WFI instead, since the only other platform with fa526 has the same problem.
Your change above is actually wrong and breaks non-fa526 platforms in a multiplatform kernel because it overrides arm_pm_idle without checking what machine it currently runs on.
Quoted 7 lines
arch/arm/mach-moxart/moxart.c new file +1
-0@@ -0,0 +1,23 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]>
arch/arm/mach-moxart/moxart.c line 11
Quoted 10 lines
arch/arm/mach-moxart/moxart.c new file +10
-0+* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, +* or (at your option) any later version. */ + +#include <linux/kernel.h> +#include <linux/init.h> +#include <linux/io.h> +#include <linux/of_platform.h> +#include <linux/clk-provider.h>
Most of these are probably unneeded now.
arch/arm/mach-moxart/moxart.c line 22
Quoted 10 lines
arch/arm/mach-moxart/moxart.c new file +10
-0+#include <asm/mach/arch.h> + +static const char *const moxart_dt_compat[] = { +"moxa,moxart-uc-7112-lx" , +NULL , +}; + +DT_MACHINE_START (MOXART ,"MOXA UC-7112-LX" ) + .dt_compat = moxart_dt_compat, +MACHINE_END
If the .dt_compat fields is the only field in the machine descriptor, you can leave out the entire descriptor!
Olof, do you have a preference to how we want to handle this? The only advantage of having this file at all is to have the "MOXA UC-7112-LX" string in /proc/cpuinfo.
Should we just remove the entire directory or leave it as the trivial file above?
Arnd
Re: [PATCH 1/3] ARM: mach-moxart: add MOXA ART SoC files
On Fri, Jun 14, 2013 at 7:47 AM, Arnd Bergmann <[email protected]> wrote:arch.h>
Quoted 13 lines
arch/arm/mach-moxart/moxart.c line 22
Quoted 9 lines
arch/arm/mach-moxart/moxart.c new file +9
-0+ +static const char *const moxart_dt_compat[] = { +"moxa,moxart-uc-7112-lx" , +NULL , +}; + +DT_MACHINE_START (MOXART ,"MOXA UC-7112-LX" ) + .dt_compat = moxart_dt_compat, +MACHINE_END If the .dt_compat fields is the only field in the machine descriptor, you can leave out the entire descriptor!
Quoted 5 lines
Olof, do you have a preference to how we want to handle this? The only advantage of having this file at all is to have the "MOXA UC-7112-LX" string in
/proc/cpuinfo.
Should we just remove the entire directory or leave it as the trivial file above?
I sort of presumed that there might be need for _some_ platform code later on, just not quite yet, so I didn't want to be quite that drastic. I suppose leaving it with the trivial file for now is OK, and we can make a sweeping change down the road in case we want to clean up and consolidate all the trivial platforms.
-Olof
Arnd Bergmann
maintainerRe: [PATCH 1/3] ARM: mach-moxart: add MOXA ART SoC files
Quoted 5 lines · On Friday 14 June 2013 09:41:36 Olof Johansson wrote:
I sort of presumed that there might be need for _some_ platform code later on, just not quite yet, so I didn't want to be quite that drastic. I suppose leaving it with the trivial file for now is OK, and we can make a sweeping change down the road in case we want to clean up and consolidate all the trivial platforms.
Yes, good idea.
Arnd
PATCH v3 1/4 ARM: mach-moxart: add MOXA ART SoC files
In reply to Jonas JensenAdd MOXA ART SoC support.
The MOXA ART SoC is based on a Faraday FA526 ARMv4 32-bit 192 MHz CPU with MMU and 16KB/8KB D/I-cache (UC-7112-LX).
---
Notes:
Applies to next-20130703
Changes since v2:
1. add CLKSRC_MMIO and GENERIC_CLOCKEVENTS to ARCH_MOXART
2. call of_clk_init(NULL) from .init_time hook
arch/arm/Kconfig | 2 + arch/arm/Makefile | 1 + arch/arm/configs/moxart_defconfig | 116 ++++++++++++++++++++++++++++++++++++++ arch/arm/mach-moxart/Kconfig | 29 ++++++++++ arch/arm/mach-moxart/Makefile | 3 + arch/arm/mach-moxart/moxart.c | 43 ++++++++++++++ 6 files changed, 194 insertions(+) create mode 100644 arch/arm/configs/moxart_defconfig create mode 100644 arch/arm/mach-moxart/Kconfig create mode 100644 arch/arm/mach-moxart/Makefile create mode 100644 arch/arm/mach-moxart/moxart.c
arch/arm/Kconfig +2 -0
@@ -964,6 +964,8 @@ source "arch/arm/mach-ks8695/Kconfig" source "arch/arm/mach-msm/Kconfig" +source "arch/arm/mach-moxart/Kconfig" + source "arch/arm/mach-mv78xx0/Kconfig" source "arch/arm/mach-imx/Kconfig"
arch/arm/Makefile +1 -0
@@ -158,6 +158,7 @@ machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood machine-$(CONFIG_ARCH_KS8695) += ks8695 machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx machine-$(CONFIG_ARCH_MMP) += mmp +machine-$(CONFIG_ARCH_MOXART) += moxart machine-$(CONFIG_ARCH_MSM) += msm machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 machine-$(CONFIG_ARCH_MXC) += imx
arch/arm/configs/moxart_defconfig new file +116 -0
116 lines not on this page · raw message
arch/arm/mach-moxart/Kconfig new file +29 -0
@@ -0,0 +1,29 @@ +config ARCH_MOXART + bool "MOXA ART SoC" if ARCH_MULTI_V4 + select CPU_FA526 + select ARM_DMA_MEM_BUFFERABLE + select USE_OF + select CLKSRC_OF + select CLKSRC_MMIO + select HAVE_CLK + select COMMON_CLK + select GENERIC_IRQ_CHIP + select ARCH_REQUIRE_GPIOLIB + select GENERIC_CLOCKEVENTS + help + Say Y here if you want to run your kernel on hardware with a + MOXA ART SoC. + The MOXA ART SoC is based on a Faraday FA526 ARMv4 32-bit + 192 MHz CPU with MMU and 16KB/8KB D/I-cache (UC-7112-LX). + Used on models UC-7101, UC-7112/UC-7110, IA240/IA241, IA3341. + +if ARCH_MOXART + +config MACH_UC7112LX + bool "MOXA UC-7112-LX" + depends on ARCH_MOXART + help + Say Y here if you intend to run this kernel on a MOXA + UC-7112-LX embedded computer. + +endif
arch/arm/mach-moxart/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +# Object file lists. + +obj-$(CONFIG_MACH_UC7112LX) += moxart.o
arch/arm/mach-moxart/moxart.c new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
1.8.2.1
PATCH 2/3 ARM: mach-moxart: add MOXA ART device tree files
In reply to Jonas Jensen--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts | 89 +++++++++++++++++++++++++++++++++ arch/arm/boot/dts/moxart.dtsi | 84 +++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/moxart-uc7112lx.dts create mode 100644 arch/arm/boot/dts/moxart.dtsi
arch/arm/boot/dts/Makefile +1 -0
@@ -217,6 +217,7 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \ wm8750-apc8750.dtb \ wm8850-w70v2.dtb dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb +dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb targets += dtbs targets += $(dtb-y)
arch/arm/boot/dts/moxart-uc7112lx.dts new file +89 -0
89 lines not on this page · raw message
arch/arm/boot/dts/moxart.dtsi new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
1.7.2.5
Re: [PATCH 2/3] ARM: mach-moxart: add MOXA ART device tree files
Quoted 2 lines · Jonas Jensen
Signed-off-by Jonas Jensen <[email protected]>
Hi,
You should add a bindings description for the MOXA SoC platforms, similar to how others do it, under Documentation/devicetree/bindings/arm/.
Same goes for other device bindings below -- they all need to be added to the bindings documentation. You might be better off removing some of them until you post and merge the corresponding drivers.
Quoted 26 lines
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts | 89 +++++++++++++++++++++++++++++++++ arch/arm/boot/dts/moxart.dtsi | 84 +++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+), 0 deletions(-) create mode 100644 arch/arm/boot/dts/moxart-uc7112lx.dts create mode 100644 arch/arm/boot/dts/moxart.dtsiarch/arm/boot/dts/Makefile +1
-0@@ -217,6 +217,7 @@ dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \ wm8750-apc8750.dtb \ wm8850-w70v2.dtb dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb +dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb targets += dtbs targets += $(dtb-y)arch/arm/boot/dts/moxart-uc7112lx.dts new file +0
-0
arch/arm/boot/dts/moxart-uc7112lx.dts line 5
Quoted 5 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +5
-0@@ -0,0 +1,89 @@ +/* moxart-uc7112lx.dts - Device Tree file for MOXA UC-7112-LX + * + * Copyright (C) 2013 Jonas Jensen <[email protected]> + * + * Licensed under GPLv2 or later. */
*/ on new line
arch/arm/boot/dts/moxart-uc7112lx.dts line 12
Quoted 7 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +7
-0+ +/dts-v1/; +/include/ "moxart.dtsi" + +/ { + model = "MOXA UC-7112-LX"; + compatible = "moxa,moxart-uc-7112-lx";
Is there a generic board design / eval board that you can have as a fallback compatible value? That way you won't have to add every board to the table in the c file.
Quoted 33 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +33
-0+ + memory { + reg = <0x00000000 0x02000000>; + }; + + flash@80000000,0 { + /* JS28F128 J3D75 A9087684 - Numonyx Embedded Flash Memory (J3 v. D) */ + compatible = "numonyx,js28f128", "cfi-flash"; + reg = <0x80000000 0x01000000>; + bank-width = <2>; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "bootloader"; + reg = <0x00000000 0x00040000>; + }; + partition@40000 { + label = "linux kernel"; + reg = <0x00040000 0x001C0000>; + }; + partition@200000 { + label = "root filesystem"; + reg = <0x00200000 0x00800000>; + }; + partition@a00000 { + label = "user filesystem"; + reg = <0x00a00000 0x00600000>; + }; + }; + + mmc@98e00000 { + compatible = "moxa,moxart-mmc"; + reg = <0x98e00000 0x00001000>;
arch/arm/boot/dts/moxart-uc7112lx.dts line 55
Quoted 10 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +10
-0+ interrupts = <5 0>; + clock-names = "sys_clk"; + clocks = <&sys_clk>; + }; + + mxser@98200040 { + compatible = "moxa,moxart-mxser"; + reg = <0x98200040 0x00000080>, /* UART "3" base */ + <0x982000e4 0x00000080>, /* UART mode base */ + <0x982000c0 0x00000020>; /* UART interrupt vector */
Are there other registers for other devices inbetween, or could you just do one large memory area here?
arch/arm/boot/dts/moxart-uc7112lx.dts line 62
Quoted 7 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +7
-0+ interrupts = <31 1>; + }; + + mac0: mac@90900000 { + compatible = "moxa,moxart-mac0"; + reg = <0x90900000 0x1000>, + <0x80000050 0x5>; /* MAC address stored on flash */
This is a pretty unusal way to indicate mac address location. While I suppose it works, I'd like to get the device tree maintainers in the loop. ADding them to cc.
Also, there should be a bindings doc for this device (and a driver)
I'm also surprised that you have a 5-byte mac address. 6 bytes is much more common. :)
Finally, are the two MACs using the same driver? if so, using the same compatible value makes more sense.
Also, while we're not super-strict about line lengths, please check your tabbing and try to bring the comments in a bit.
Quoted 14 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +14
-0+ interrupts = <25 0>; + }; + + mac1: mac@92000000 { + compatible = "moxa,moxart-mac1"; + reg = <0x92000000 0x1000>, + <0x80000056 0x5>; /* MAC address stored on flash */ + interrupts = <27 0>; + }; + + uart0: uart@98200000 { + compatible = "ns16550a"; + reg = <0x98200000 0x20>; + interrupts = <31 0>;
arch/arm/boot/dts/moxart-uc7112lx.dts line 86
Quoted 10 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +10
-0+ reg-shift = <2>; + reg-io-width = <4>; + clock-frequency = <14745600>; + status = "okay"; + }; + + chosen { + /* uncomment to use on board flash root + bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rootfstype=jffs2 rw"; + */
Just leave that out, I'd say.
Quoted 13 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +3
-0+ bootargs = "console=ttyS0,115200n8 root=/dev/mmcblk0p1 rw rootwait"; + }; +};arch/arm/boot/dts/moxart.dtsi new file +4
-0@@ -0,0 +1,84 @@ +/* moxart.dtsi - Device Tree Include file for MOXA ART family SoC + * + * Copyright (C) 2013 Jonas Jensen <[email protected]> + *
arch/arm/boot/dts/moxart.dtsi line 14
Quoted 10 lines
arch/arm/boot/dts/moxart.dtsi new file +10
-0+ * Licensed under GPLv2 or later. */ + +/include/ "skeleton.dtsi" + +/ { + interrupt-parent = <&intc>; + + cpus { + cpu@0 { + compatible = "faraday,fa526";
There are a couple of more properties required here. See recent postings on cpu bindings.
Quoted 17 lines
arch/arm/boot/dts/moxart.dtsi new file +17
-0+ }; + }; + + clocks { + #address-cells = <1>; + #size-cells = <0>; + + osc: oscillator { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24000000>; + }; + }; + + soc { + compatible = "simple-bus"; + #address-cells = <1>;
arch/arm/boot/dts/moxart.dtsi line 41
Quoted 10 lines
arch/arm/boot/dts/moxart.dtsi new file +10
-0+ #size-cells = <1>; + reg = <0x90000000 0x10000000>; + ranges; + + intc: interrupt-controller@98800000 { + compatible = "moxa,moxart-interrupt-controller"; + reg = <0x98800000 0x38>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-mask = <0x00080000>; /* single register vector, interrupts 0-31, 1s signify edge */
Very long line, here and below.
Quoted 51 lines
arch/arm/boot/dts/moxart.dtsi new file +43
-0+ }; + + timer: timer@98400000 { + compatible = "moxa,moxart-timer"; + reg = <0x98400000 0x10>; + interrupts = <19 1>; + }; + + gpio: gpio@98700000 { + compatible = "moxa,moxart-gpio"; + reg = <0x98700000 0x1000>, + <0x98100100 0x4>; /* Power Management Unit + enable/disable pin 0-31 (32bit register) */ + }; + + rtc: rtc { + compatible = "moxa,moxart-rtc"; + }; + + dma: dma@90500000 { + compatible = "moxa,moxart-dma"; + reg = <0x90500000 0x1000>; + interrupts = <24 0>; + }; + + watchdog: watchdog@98500000 { + compatible = "moxa,moxart-watchdog"; + reg = <0x98500000 0x1000>; + }; + + pmu: pmu@98100000 { /* Power Management Unit */ + compatible = "moxa,moxart-pmu"; + reg = <0x98100000 0x34>; /* offset mul @ 0x30, val @ 0x0c (2 * 32 bit registers) */ + clocks { + sys_clk: sys_clk { + #clock-cells = <0>; + compatible = "moxa,moxart-sysclk"; + clock-output-names = "sys_clk"; + }; + }; + }; + }; +};Signature · 7 lines
1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH 2/3] ARM: mach-moxart: add MOXA ART device tree files
Hi,
Thanks for the replies.
What isn't commented below should already be fixed.
Quoted 4 lines · Olof Johansson
Hi,
You should add a bindings description for the MOXA SoC platforms, similar to how others do it, under
Documentation/devicetree/bindings/arm/.
The following is now added under Documentation:
Documentation/devicetree/bindings/arm/moxart.txt | 8 +++ .../arm/moxart/moxart-interrupt-controller.txt | 29 ++++++++++++ .../bindings/arm/moxart/moxart-timer.txt | 17 +++++++
Quoted 3 lines
Same goes for other device bindings below -- they all need to be added to the bindings documentation. You might be better off removing some of them until you post and merge the corresponding drivers.
I'll remove them for now with the intent of adding them later. Maybe when (and if) all drivers are posted and merged.
Quoted 10 lines
arch/arm/boot/dts/moxart-uc7112lx.dts line 12
Quoted 6 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +6
-0+/dts-v1/; +/include/ "moxart.dtsi" + +/ { + model = "MOXA UC-7112-LX"; + compatible = "moxa,moxart-uc-7112-lx";Is there a generic board design / eval board that you can have as a fallback compatible value? That way you won't have to add every board to the table in the c file.
There isn't really a generic board but the same can be accomplished by adding "moxa,moxart" to compatible? New boards can then be added without patching arch/arm/mach-moxart/moxart.c.
Quoted 8 lines
arch/arm/boot/dts/moxart-uc7112lx.dts line 55
Quoted 5 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +5
-0+ mxser at 98200040 { + compatible = "moxa,moxart-mxser"; + reg = <0x98200040 0x00000080>, /* UART "3" base */ + <0x982000e4 0x00000080>, /* UART mode base */ + <0x982000c0 0x00000020>; /* UART interrupt vector */Are there other registers for other devices inbetween, or could you just do one large memory area here?
No, reg could simply be 0x98200040 to 0x982000e0. I split them out as documentation but those could be defined in the driver instead, also because it's sort of easier to assign values with of_iomap.
Quoted 8 lines
arch/arm/boot/dts/moxart-uc7112lx.dts line 62
Quoted 7 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +7
-0+ interrupts = <31 1>; + }; + + mac0: mac at 90900000 { + compatible = "moxa,moxart-mac0"; + reg = <0x90900000 0x1000>, + <0x80000050 0x5>; /* MAC address stored on flash */
Quoted 5 lines
This is a pretty unusal way to indicate mac address location. While I suppose it works, I'd like to get the device tree maintainers in the loop. ADding them to cc.
Also, there should be a bindings doc for this device (and a driver)
I'm removing ethernet until the driver is submitted. This allows me to submit bindings doc later?
Quoted 2 lines
I'm also surprised that you have a 5-byte mac address. 6 bytes is much more common. :)
That _is_ surprising :) Corrected to 6 bytes.
Quoted 2 lines
Finally, are the two MACs using the same driver? if so, using the same compatible value makes more sense.
Yes, using the same driver is the point. I see now they can use the same value, they'll still be probed from the DT entries.
Best regards,
Jonas
Re: [PATCH 2/3] ARM: mach-moxart: add MOXA ART device tree files
Quoted 36 lines · Jonas Jensen
Hi,
Thanks for the replies.
What isn't commented below should already be fixed.
Quoted 4 lines · Olof Johansson
Hi,
You should add a bindings description for the MOXA SoC platforms, similar to how others do it, under
Documentation/devicetree/bindings/arm/.The following is now added under Documentation:
Documentation/devicetree/bindings/arm/moxart.txt | 8 +++ .../arm/moxart/moxart-interrupt-controller.txt | 29 ++++++++++++ .../bindings/arm/moxart/moxart-timer.txt | 17 +++++++Quoted 3 lines
Same goes for other device bindings below -- they all need to be added to the bindings documentation. You might be better off removing some of them until you post and merge the corresponding drivers.
I'll remove them for now with the intent of adding them later. Maybe when (and if) all drivers are posted and merged.
Quoted 10 lines
arch/arm/boot/dts/moxart-uc7112lx.dts line 12
Quoted 6 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +6
-0+/dts-v1/; +/include/ "moxart.dtsi" + +/ { + model = "MOXA UC-7112-LX"; + compatible = "moxa,moxart-uc-7112-lx";Is there a generic board design / eval board that you can have as a fallback compatible value? That way you won't have to add every board to the table in the c file.
Quoted 3 lines
There isn't really a generic board but the same can be accomplished by adding "moxa,moxart" to compatible? New boards can then be added without patching
arch/arm/mach-moxart/moxart.c.
Sounds good. See comment on the other email about checking for machine compatible in the init setup function too, that'll work well.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +5
-0+ mxser@98200040 { + compatible = "moxa,moxart-mxser"; + reg = <0x98200040 0x00000080>, /* UART "3" base */ + <0x982000e4 0x00000080>, /* UART mode base */ + <0x982000c0 0x00000020>; /* UART interrupt vector */
Quoted 6 lines
Quoted 2 lines
Are there other registers for other devices inbetween, or could you just do one large memory area here?
No, reg could simply be
0x98200040to0x982000e0. I split them out as documentation but those could be defined in the driver instead, also because it's sort of easier to assign values withof_iomap.
I'd say just go with one register area, it's how most other drivers do it so it's most familiar to someone else coming in and reading your code to fix bugs or whatnot.
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
arch/arm/boot/dts/moxart-uc7112lx.dts new file +7
-0+ interrupts = <31 1>; + }; + + mac0: mac@90900000 { + compatible = "moxa,moxart-mac0"; + reg = <0x90900000 0x1000>, + <0x80000050 0x5>; /* MAC address stored on flash */
Quoted 8 lines
Quoted 5 lines
This is a pretty unusal way to indicate mac address location. While I suppose it works, I'd like to get the device tree maintainers in the loop. ADding them to cc.
Also, there should be a bindings doc for this device (and a driver)
I'm removing ethernet until the driver is submitted. This allows me to submit bindings doc later?
Yep.
Quoted 5 lines
Quoted 3 lines
I'm also surprised that you have a 5-byte mac address. 6 bytes is much more common. :)
That _is_ surprising :) Corrected to 6 bytes.
:)
Quoted 5 lines
Quoted 2 lines
Finally, are the two MACs using the same driver? if so, using the same compatible value makes more sense.
Yes, using the same driver is the point. I see now they can use the same value, they'll still be probed from the DT entries.
Yeah. Let's discuss that further when the driver is ready if needed.
-Olof
PATCH v3 2/4 ARM: mach-moxart: add MOXA ART device tree files
In reply to Jonas JensenAdd generic SoC include and UC-7112-LX platform device tree files and documentation.
---
Notes:
Applies to next-20130703
Changes since v2:
1. add and update documentation, new drivers: mmc, mac, rtc, watchdog, gpio, core-clock, apb-clock
.../bindings/arm/moxart/moxa,moxart-apb-clock.txt | 18 +++++ .../devicetree/bindings/arm/moxart/moxart.txt | 12 ++++ .../bindings/clock/moxa,moxart-core-clock | 19 +++++ .../devicetree/bindings/gpio/moxa,moxart-gpio.txt | 16 +++++ .../interrupt-controller/moxa,moxart-ic.txt | 28 ++++++++ .../devicetree/bindings/mmc/moxa,moxart-mmc.txt | 17 +++++ .../devicetree/bindings/net/moxa,moxart-mac.txt | 25 +++++++ .../devicetree/bindings/rtc/moxa,moxart-rtc.txt | 11 +++ .../bindings/timer/moxa,moxart-timer.txt | 17 +++++ .../bindings/watchdog/moxa,moxart-watchdog.txt | 15 ++++ arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/moxart-uc7112lx.dts | 82 ++++++++++++++++++++++ arch/arm/boot/dts/moxart.dtsi | 79 +++++++++++++++++++++ 13 files changed, 340 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/moxart/moxa,moxart-apb-clock.txt create mode 100644 Documentation/devicetree/bindings/arm/moxart/moxart.txt create mode 100644 Documentation/devicetree/bindings/clock/moxa,moxart-core-clock create mode 100644 Documentation/devicetree/bindings/gpio/moxa,moxart-gpio.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt create mode 100644 Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt create mode 100644 Documentation/devicetree/bindings/net/moxa,moxart-mac.txt create mode 100644 Documentation/devicetree/bindings/rtc/moxa,moxart-rtc.txt create mode 100644 Documentation/devicetree/bindings/timer/moxa,moxart-timer.txt create mode 100644 Documentation/devicetree/bindings/watchdog/moxa,moxart-watchdog.txt create mode 100644 arch/arm/boot/dts/moxart-uc7112lx.dts create mode 100644 arch/arm/boot/dts/moxart.dtsi
Documentation/devicetree/bindings/arm/moxart/moxa,moxart-apb-clock.txt new file +18 -0
@@ -0,0 +1,18 @@ +MOXA ART APB clock + +Required properties: + +- compatible : Should be "moxa,moxart-apb-clock" +- #clock-cells : Should be 0 + +Example: + + clocks { + #address-cells = <1>; + #size-cells = <0>; + + clkapb: clkapb { + compatible = "moxa,moxart-apb-clock"; + #clock-cells = <0>; + }; + };
Documentation/devicetree/bindings/arm/moxart/moxart.txt new file +12 -0
@@ -0,0 +1,12 @@ +MOXA ART device tree bindings + +Boards with the MOXA ART SoC shall have the following properties: + +Required root node property: + +compatible = "moxa,moxart"; + +Boards: + +- UC-7112-LX: embedded computer + compatible = "moxa,moxart-uc-7112-lx", "moxa,moxart"
Documentation/devicetree/bindings/clock/moxa,moxart-core-clock new file +19 -0
@@ -0,0 +1,19 @@ +Device Tree Clock bindings for arch-moxart + +This binding uses the common clock binding[1]. + +[1] Documentation/devicetree/bindings/clock/clock-bindings.txt + +MOXA ART SoCs allow to determine core clock frequencies by reading +a register. + +Required properties: +- compatible : Should be "moxa,moxart-core-clock" +- reg : Should contain registers location and length + +For example: + + clk: core-clock at 98100000 { + compatible = "moxa,moxart-core-clock"; + reg = <0x98100000 0x34>; + };
Documentation/devicetree/bindings/gpio/moxa,moxart-gpio.txt new file +16 -0
@@ -0,0 +1,16 @@ +MOXA ART GPIO Controller + +Required properties: + +- compatible : Should be "moxa,moxart-gpio" +- reg : Should contain registers location and length + index 0 : input, output, and direction control + index 1 : enable/disable individual pins, pin 0-31 + +Example: + + gpio: gpio at 98700000 { + compatible = "moxa,moxart-gpio"; + reg = <0x98700000 0xC>, + <0x98100100 0x4>; + };
Documentation/devicetree/bindings/interrupt-controller/moxa,moxart-ic.txt new file +28 -0
@@ -0,0 +1,28 @@ +* MOXA ART Interrupt Controller + +MOXA ART Interrupt Controller (moxart-ic) is used on MOXA ART SoCs +and supports 32 non-configurable number of interrupts + +Main node required properties: + +- compatible : "moxa,moxart-ic" +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. The type shall be a <u32> and the value shall be 2. + + The first cell contains the interrupt number in the range [0-31]. + The second cell contains the interrupt type + +- reg: physical base address and size of the intc registers map. +- interrupt-mask: Specifies if the interrupt is edge or level-triggered + each bit represent an interrupt 0-31 where 1 signify edge + +Example: + + intc: interrupt-controller at 98800000 { + compatible = "moxa,moxart-ic"; + reg = <0x98800000 0x38>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-mask = <0x00080000>; + };
Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt new file +17 -0
@@ -0,0 +1,17 @@ +MOXA ART SD Host Controller Interface + +Required properties: + +- compatible : Should be "moxa,moxart-mmc" +- reg : Should contain registers location and length +- interrupts : Should contain the interrupt number +- clocks : Should contain phandle for the internal bus clock "tclk" + +Example: + + mmc: mmc at 98e00000 { + compatible = "moxa,moxart-mmc"; + reg = <0x98e00000 0x0000005C>; + interrupts = <5 0>; + clocks = <&tclk>; + };
Documentation/devicetree/bindings/net/moxa,moxart-mac.txt new file +25 -0
@@ -0,0 +1,25 @@ +MOXA ART Ethernet Controller + +Required properties: + +- compatible : Should be "moxa,moxart-mac" +- reg : Should contain registers location and length + index 0 : main register + index 1 : mac address (stored on flash) +- interrupts : Should contain the mac interrupt number + +Example: + + mac0: mac at 90900000 { + compatible = "moxa,moxart-mac"; + reg = <0x90900000 0x1000>, + <0x80000050 0x6>; + interrupts = <25 0>; + }; + + mac1: mac at 92000000 { + compatible = "moxa,moxart-mac"; + reg = <0x92000000 0x1000>, + <0x80000056 0x6>; + interrupts = <27 0>; + };
Documentation/devicetree/bindings/rtc/moxa,moxart-rtc.txt new file +11 -0
@@ -0,0 +1,11 @@ +MOXA ART real-time clock + +Required properties: + +- compatible : Should be "moxa,moxart-rtc" + +Example: + + rtc: rtc { + compatible = "moxa,moxart-rtc"; + };
Documentation/devicetree/bindings/timer/moxa,moxart-timer.txt new file +17 -0
@@ -0,0 +1,17 @@ +MOXA ART timer + +Required properties: + +- compatible : Should be "moxa,moxart-timer" +- reg : Should contain registers location and length +- interrupts : Should contain the timer interrupt number +- clocks : Should contain phandle for the internal bus clock "tclk" + +Example: + + timer: timer at 98400000 { + compatible = "moxa,moxart-timer"; + reg = <0x98400000 0x10>; + interrupts = <19 1>; + clocks = <&tclk>; + };
Documentation/devicetree/bindings/watchdog/moxa,moxart-watchdog.txt new file +15 -0
@@ -0,0 +1,15 @@ +MOXA ART Watchdog timer + +Required properties: + +- compatible : Should be "moxa,moxart-watchdog" +- reg : Should contain registers location and length +- clocks : Should contain phandle for the internal bus clock "tclk" + +Example: + + watchdog: watchdog at 98500000 { + compatible = "moxa,moxart-watchdog"; + reg = <0x98500000 0x10>; + clocks = <&tclk>; + };
arch/arm/boot/dts/Makefile +1 -0
@@ -96,6 +96,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \ kirkwood-ts219-6282.dtb \ kirkwood-openblocks_a6.dtb dtb-$(CONFIG_ARCH_MARCO) += marco-evb.dtb +dtb-$(CONFIG_ARCH_MOXART) += moxart-uc7112lx.dtb dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ msm8960-cdp.dtb dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
arch/arm/boot/dts/moxart-uc7112lx.dts new file +82 -0
82 lines not on this page · raw message
arch/arm/boot/dts/moxart.dtsi new file +79 -0
79 lines not on this page · raw message
Signature · 1 line
1.8.2.1
Re: [PATCH v3 2/4] ARM: mach-moxart: add MOXA ART device tree files
Just as a reminder, I intend to update this set with some minor changes:
1. remove devicetree bindings for drivers, I will mail those out separately
2. a devicetree node for DMA was added
3. GPIO numbers are now in DT aswell
Best regards,
Jonas
PATCH 3/3 ARM: mach-moxart: add MOXA ART UART debug files
In reply to Jonas Jensen--- arch/arm/Kconfig.debug | 10 ++++++++++ arch/arm/include/debug/moxart.S | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/debug/moxart.S
arch/arm/Kconfig.debug +10 -0
@@ -422,6 +422,15 @@ choice Say Y here if you want kernel low-level debugging support on Allwinner A1X based platforms on the UART1. + config DEBUG_MOXART_UART0 + bool "Kernel low-level debugging messages via MOXART UART0" + depends on ARCH_MOXART + help + Say Y here if you want kernel low-level debugging support + on MOXART based platforms on the UART0. + select this to make sure "putc" in arch/arm/boot/compressed/debug.S + uses arch/arm/include/debug/moxart.S:s "addruart" macro + config DEBUG_TEGRA_UART depends on ARCH_TEGRA bool "Use Tegra UART for low-level debug"
@@ -642,6 +651,7 @@ config DEBUG_LL_INCLUDE default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 + default "debug/moxart.S" if DEBUG_MOXART_UART0 default "debug/tegra.S" if DEBUG_TEGRA_UART default "debug/ux500.S" if DEBUG_UX500_UART default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \
arch/arm/include/debug/moxart.S new file +14 -0
@@ -0,0 +1,14 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. */ + +#define MOXART_UART_DEBUG_PHYS_BASE 0x98200000 + +.macro addruart, rp, rv, tmp + ldr \rp, =MOXART_UART_DEBUG_PHYS_BASE @ physical +.endm + +#define UART_SHIFT 2 +#include <asm/hardware/debug-8250.S>
Signature · 1 line
1.7.2.5
Re: [PATCH 3/3] ARM: mach-moxart: add MOXA ART UART debug files
Hi,
Quoted 13 lines · Jonas Jensen
Signed-off-by Jonas Jensen <[email protected]>--- arch/arm/Kconfig.debug | 10 ++++++++++ arch/arm/include/debug/moxart.S | 14 ++++++++++++++ 2 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 arch/arm/include/debug/moxart.Sarch/arm/Kconfig.debug +0
-0@@ -422,6 +422,15 @@ choice Say Y here if you want kernel low-level debugging support
arch/arm/Kconfig.debug choice · line 432
Quoted 10 lines
arch/arm/Kconfig.debug +8
-0on Allwinner A1X based platforms on the UART1. + config DEBUG_MOXART_UART0 + bool "Kernel low-level debugging messages via MOXART UART0" + depends on ARCH_MOXART + help + Say Y here if you want kernel low-level debugging support + on MOXART based platforms on the UART0. + select this to make sure "putc" in arch/arm/boot/compressed/debug.S + uses arch/arm/include/debug/moxart.S:s "addruart" macro
Looks like the last two lines above are leftovers? It's not super-helpful for someone trying to figure out if they want this option or not; the first two lines covers that quite nicely.
Quoted 18 lines
arch/arm/Kconfig.debug +2
-0+ config DEBUG_TEGRA_UART depends on ARCH_TEGRA bool "Use Tegra UART for low-level debug"@@ -642,6 +651,7 @@ config DEBUG_LL_INCLUDE default "debug/sirf.S" if DEBUG_SIRFPRIMA2_UART1 || DEBUG_SIRFMARCO_UART1 default "debug/socfpga.S" if DEBUG_SOCFPGA_UART default "debug/sunxi.S" if DEBUG_SUNXI_UART0 || DEBUG_SUNXI_UART1 + default "debug/moxart.S" if DEBUG_MOXART_UART0 default "debug/tegra.S" if DEBUG_TEGRA_UART default "debug/ux500.S" if DEBUG_UX500_UART default "debug/vexpress.S" if DEBUG_VEXPRESS_UART0_DETECT || \arch/arm/include/debug/moxart.S new file +0
-0
arch/arm/include/debug/moxart.S line 10
Quoted 10 lines
arch/arm/include/debug/moxart.S new file +10
-0@@ -0,0 +1,14 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, + * or (at your option) any later version. */ + +#define MOXART_UART_DEBUG_PHYS_BASE 0x98200000 + +.macro addruart, rp, rv, tmp + ldr \rp, =MOXART_UART_DEBUG_PHYS_BASE @ physical
You need to set rv here too.
-Olof
Re: [PATCH 3/3] ARM: mach-moxart: add MOXA ART UART debug files
Hi,
Thanks for the replies.
Quoted 8 lines · Olof Johansson
Quoted 8 lines
arch/arm/Kconfig.debug +0
-0@@ -422,6 +422,15 @@ choice Say Y here if you want kernel low-level debugging support on Allwinner A1X based platforms on the UART1.
Quoted 12 lines
arch/arm/Kconfig.debug choice · line 432
Quoted 8 lines
arch/arm/Kconfig.debug +8
-0+ config DEBUG_MOXART_UART0 + bool "Kernel low-level debugging messages via MOXART UART0" + depends on ARCH_MOXART + help + Say Y here if you want kernel low-level debugging support + on MOXART based platforms on the UART0. + select this to make sure "putc" in arch/arm/boot/compressed/debug.S + uses arch/arm/include/debug/moxart.S:s "addruart" macroLooks like the last two lines above are leftovers? It's not super-helpful for someone trying to figure out if they want this option or not; the first two lines covers that quite nicely.
Leftovers removed. I only added them because I spent some time figuring out the call chain around putc.
Quoted 6 lines
Quoted 6 lines
arch/arm/Kconfig.debug +5
-0+++ b/arch/arm/include/debug/moxart.S@@ -0,0 +1,14 @@ +/* Copyright (C) 2013 Jonas Jensen <[email protected]> + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License,
Quoted 8 lines
arch/arm/Kconfig.debug line 10
Quoted 6 lines
arch/arm/Kconfig.debug +6
-0+ * or (at your option) any later version. */ + +#define MOXART_UART_DEBUG_PHYS_BASE 0x98200000 + +.macro addruart, rp, rv, tmp + ldr \rp, =MOXART_UART_DEBUG_PHYS_BASE @ physicalYou need to set rv here too.
Done. Used to be set with the IO_ADDRESS macro I worked so hard to remove. Looking at other platforms, it seems accepted to set a hardcoded value here.
Best regards,
Jonas
PATCH v3 3/4 ARM: mach-moxart: add MOXA ART UART debug files
In reply to Jonas JensenAdd MOXA ART kernel low-level debugging port support.
---
Notes:
Applies to next-20130703
Changes since v2:
1. use alphabetic ordering in Kconfig
arch/arm/Kconfig.debug | 8 ++++++++ arch/arm/include/debug/moxart.S | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 arch/arm/include/debug/moxart.S
arch/arm/Kconfig.debug +8 -0
@@ -286,6 +286,13 @@ choice Say Y here if you want kernel low-level debugging support on MMP UART3. + config DEBUG_MOXART_UART0 + bool "Kernel low-level debugging messages via MOXART UART0" + depends on ARCH_MOXART + help + Say Y here if you want kernel low-level debugging support + on MOXART based platforms on the UART0. + config DEBUG_MSM_UART1 bool "Kernel low-level debugging messages via MSM UART1" depends on ARCH_MSM7X00A || ARCH_MSM7X30 || ARCH_QSD8X50
@@ -777,6 +784,7 @@ config DEBUG_LL_INCLUDE DEBUG_IMX6SL_UART default "debug/keystone.S" if DEBUG_KEYSTONE_UART0 || \ DEBUG_KEYSTONE_UART1 + default "debug/moxart.S" if DEBUG_MOXART_UART0 default "debug/mvebu.S" if DEBUG_MVEBU_UART || \ DEBUG_MVEBU_UART_ALTERNATE default "debug/mxs.S" if DEBUG_IMX23_UART || DEBUG_IMX28_UART
arch/arm/include/debug/moxart.S new file +20 -0
@@ -0,0 +1,20 @@ +/* + * Debugging macro include header + * + * Copyright (C) 2013 Jonas Jensen + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#define MOXART_UART_DEBUG_PHYS_BASE 0x98200000 +#define MOXART_UART_DEBUG_VIRT_BASE 0xf9820000 + + .macro addruart, rp, rv, tmp + ldr \rp, =MOXART_UART_DEBUG_PHYS_BASE + ldr \rv, =MOXART_UART_DEBUG_VIRT_BASE + .endm + +#define UART_SHIFT 2 +#include <asm/hardware/debug-8250.S>
Signature · 1 line
1.8.2.1