* [PATCH 0/6] Initial Device Tree support for S3C64xx
@ 2013-01-13 1:10 Tomasz Figa
2013-01-13 1:10 ` [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
` (6 more replies)
0 siblings, 7 replies; 18+ messages in thread
From: Tomasz Figa @ 2013-01-13 1:10 UTC (permalink / raw)
To: linux-arm-kernel
This series is adds Device Tree support for Samsung S3C64xx SoC series.
It fixes several problems preventing from booting an S3C64xx-based system
using Device Tree, adds all the infrastructure for Device Tree-based board
support, including mach-s3c64xx-dt and dts include files for S3C64xx SoCs, and
(very) basic device tree source for FriendlyARM Mini6410 board.
Current support is very limited and allows only basic bootup with UART and
SDHCI, but should be fine as a start and will be extended in future, hopefully
with help of S3C64xx board maintainers.
Tomasz Figa (6):
ARM: common: vic: Parse interrupt and resume masks from device tree
ARM: common: vic: Fix invalid first IRQ number in OF-based
registration
ARM: s3c64xx: Add support for OF-based VIC initialization
ARM: s3c64xx: Add board file for boot using Device Tree
ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
ARM: dts: Add dts file for S3C6410-based Mini6410 board
Documentation/devicetree/bindings/arm/vic.txt | 6 ++
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/s3c6400.dtsi | 33 +++++++++
arch/arm/boot/dts/s3c6410-mini6410.dts | 50 ++++++++++++++
arch/arm/boot/dts/s3c6410.dtsi | 33 +++++++++
arch/arm/boot/dts/s3c64xx.dtsi | 97 +++++++++++++++++++++++++++
arch/arm/common/vic.c | 9 ++-
arch/arm/mach-s3c64xx/Kconfig | 13 ++++
arch/arm/mach-s3c64xx/Makefile | 1 +
arch/arm/mach-s3c64xx/common.c | 16 +++++
arch/arm/mach-s3c64xx/common.h | 4 ++
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 84 +++++++++++++++++++++++
12 files changed, 345 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/boot/dts/s3c6400.dtsi
create mode 100644 arch/arm/boot/dts/s3c6410-mini6410.dts
create mode 100644 arch/arm/boot/dts/s3c6410.dtsi
create mode 100644 arch/arm/boot/dts/s3c64xx.dtsi
create mode 100644 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
--
1.8.1
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
@ 2013-01-13 1:10 ` Tomasz Figa
2013-01-14 1:08 ` Rob Herring
2013-01-13 1:10 ` [PATCH 2/6] ARM: common: vic: Fix invalid first IRQ number in OF-based registration Tomasz Figa
` (5 subsequent siblings)
6 siblings, 1 reply; 18+ messages in thread
From: Tomasz Figa @ 2013-01-13 1:10 UTC (permalink / raw)
To: linux-arm-kernel
This patch extends vic_of_init to parse valid interrupt sources
and resume sources masks from device tree.
If mask values are not specified in device tree, all sources
are assumed to be valid, as before this patch.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
Documentation/devicetree/bindings/arm/vic.txt | 6 ++++++
arch/arm/common/vic.c | 7 ++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/arm/vic.txt
index 266716b..bb7137c 100644
--- a/Documentation/devicetree/bindings/arm/vic.txt
+++ b/Documentation/devicetree/bindings/arm/vic.txt
@@ -18,6 +18,9 @@ Required properties:
Optional properties:
- interrupts : Interrupt source for parent controllers if the VIC is nested.
+- interrupt-mask : Bit mask of valid interrupt sources (defaults to all valid)
+- wakeup-mask : Bit mask of interrupt sources that can wake up the system
+ (defaults to all allowed)
Example:
@@ -26,4 +29,7 @@ Example:
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x60000 0x1000>;
+
+ interrupt-mask = <0xffffff7f>;
+ wakeup-mask = <0x0000ff7f>;
};
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index e4df17c..c2889da 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -407,6 +407,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
int __init vic_of_init(struct device_node *node, struct device_node *parent)
{
void __iomem *regs;
+ u32 interrupt_mask = ~0;
+ u32 wakeup_mask = ~0;
if (WARN(parent, "non-root VICs are not supported"))
return -EINVAL;
@@ -415,10 +417,13 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
if (WARN_ON(!regs))
return -EIO;
+ of_property_read_u32(node, "interrupt-mask", &interrupt_mask);
+ of_property_read_u32(node, "wakeup-mask", &wakeup_mask);
+
/*
* Passing -1 as first IRQ makes the simple domain allocate descriptors
*/
- __vic_init(regs, -1, ~0, ~0, node);
+ __vic_init(regs, -1, interrupt_mask, wakeup_mask, node);
return 0;
}
--
1.8.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 2/6] ARM: common: vic: Fix invalid first IRQ number in OF-based registration
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
2013-01-13 1:10 ` [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
@ 2013-01-13 1:10 ` Tomasz Figa
2013-01-13 1:10 ` [PATCH 3/6] ARM: s3c64xx: Add support for OF-based VIC initialization Tomasz Figa
` (4 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Tomasz Figa @ 2013-01-13 1:10 UTC (permalink / raw)
To: linux-arm-kernel
Without this patch, vic_of_init passed -1 as first IRQ number to
__vic_init (as signed int), then to vic_register (now as unsigned int
equals to 0xffffffff) and finally to irq_domain_add_simple (again as
unsigned 0xffffffff), which tries to allocate irq descriptors starting
from IRQ 0xffffffff, which obviously is bound to fail.
This patch corrects OF-based VIC registration by locating VICs in IRQ
address space starting from IRQ 32 and then placing one VIC after
another. This is similar to the solution used with GIC and allows to
maintain compatibility with legacy code using static IRQ numbers.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
arch/arm/common/vic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
index c2889da..8001994 100644
--- a/arch/arm/common/vic.c
+++ b/arch/arm/common/vic.c
@@ -421,9 +421,9 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
of_property_read_u32(node, "wakeup-mask", &wakeup_mask);
/*
- * Passing -1 as first IRQ makes the simple domain allocate descriptors
+ * Use IRQ numbers starting from 32 and placing each VIC after another
*/
- __vic_init(regs, -1, interrupt_mask, wakeup_mask, node);
+ __vic_init(regs, 32 + (32 * vic_id), interrupt_mask, wakeup_mask, node);
return 0;
}
--
1.8.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 3/6] ARM: s3c64xx: Add support for OF-based VIC initialization
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
2013-01-13 1:10 ` [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
2013-01-13 1:10 ` [PATCH 2/6] ARM: common: vic: Fix invalid first IRQ number in OF-based registration Tomasz Figa
@ 2013-01-13 1:10 ` Tomasz Figa
2013-01-13 1:10 ` [PATCH 4/6] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
` (3 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Tomasz Figa @ 2013-01-13 1:10 UTC (permalink / raw)
To: linux-arm-kernel
This patch modifies IRQ initialization code of S3C64xx to support
Device Tree-based initialization of VICs.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
arch/arm/mach-s3c64xx/common.c | 16 ++++++++++++++++
arch/arm/mach-s3c64xx/common.h | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/arch/arm/mach-s3c64xx/common.c b/arch/arm/mach-s3c64xx/common.c
index aef303b..b9c5bec 100644
--- a/arch/arm/mach-s3c64xx/common.c
+++ b/arch/arm/mach-s3c64xx/common.c
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
+#include <linux/of_irq.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/io.h>
@@ -181,6 +182,21 @@ core_initcall(s3c64xx_dev_init);
1 << (IRQ_HSMMC1 - IRQ_VIC1_BASE) | \
1 << (IRQ_HSMMC2 - IRQ_VIC1_BASE))
+#ifdef CONFIG_OF
+static const struct of_device_id s3c64xx_dt_irq_match[] = {
+ { .compatible = "arm,pl192-vic", .data = vic_of_init, },
+ {},
+};
+
+void __init s3c64xx_of_init_irq(void)
+{
+ of_irq_init(s3c64xx_dt_irq_match);
+
+ /* FIXME: add the timer sub-irqs */
+ s3c_init_vic_timer_irq(5, IRQ_TIMER0);
+}
+#endif
+
void __init s3c64xx_init_irq(u32 vic0_valid, u32 vic1_valid)
{
printk(KERN_DEBUG "%s: initialising interrupts\n", __func__);
diff --git a/arch/arm/mach-s3c64xx/common.h b/arch/arm/mach-s3c64xx/common.h
index 6cfc99b..711f3e0 100644
--- a/arch/arm/mach-s3c64xx/common.h
+++ b/arch/arm/mach-s3c64xx/common.h
@@ -58,4 +58,8 @@ int __init s3c64xx_pm_late_initcall(void);
static inline int s3c64xx_pm_late_initcall(void) { return 0; }
#endif
+#ifdef CONFIG_OF
+extern void s3c64xx_of_init_irq(void);
+#endif
+
#endif /* __ARCH_ARM_MACH_S3C64XX_COMMON_H */
--
1.8.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 4/6] ARM: s3c64xx: Add board file for boot using Device Tree
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
` (2 preceding siblings ...)
2013-01-13 1:10 ` [PATCH 3/6] ARM: s3c64xx: Add support for OF-based VIC initialization Tomasz Figa
@ 2013-01-13 1:10 ` Tomasz Figa
2013-01-13 1:10 ` [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
` (2 subsequent siblings)
6 siblings, 0 replies; 18+ messages in thread
From: Tomasz Figa @ 2013-01-13 1:10 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds board file that will be used to boot S3C64xx-based boards
using Device Tree.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
arch/arm/mach-s3c64xx/Kconfig | 13 +++++
arch/arm/mach-s3c64xx/Makefile | 1 +
arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 84 +++++++++++++++++++++++++++++++++
3 files changed, 98 insertions(+)
create mode 100644 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
diff --git a/arch/arm/mach-s3c64xx/Kconfig b/arch/arm/mach-s3c64xx/Kconfig
index 283cb77..b1c7106 100644
--- a/arch/arm/mach-s3c64xx/Kconfig
+++ b/arch/arm/mach-s3c64xx/Kconfig
@@ -311,3 +311,16 @@ config MACH_WLF_CRAGG_6410
select SAMSUNG_GPIO_EXTRA128
help
Machine support for the Wolfson Cragganmore S3C6410 variant.
+
+config MACH_S3C64XX_DT
+ bool "Samsung S3C6400/S3C6410 machine using Device Tree"
+ select CPU_S3C6400
+ select CPU_S3C6410
+ select USE_OF
+ help
+ Machine support for Samsung S3C6400/S3C6410 machines with Device Tree
+ enabled.
+ Select this if a fdt blob is available for your S3C64XX SoC based
+ board.
+ Note: This is under development and not all peripherals can be
+ supported with this machine file.
diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index f9ce1dc..59b3d06 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -58,3 +58,4 @@ obj-$(CONFIG_MACH_SMARTQ7) += mach-smartq7.o
obj-$(CONFIG_MACH_SMDK6400) += mach-smdk6400.o
obj-$(CONFIG_MACH_SMDK6410) += mach-smdk6410.o
obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o
+obj-$(CONFIG_MACH_S3C64XX_DT) += mach-s3c64xx-dt.o
diff --git a/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
new file mode 100644
index 0000000..974af2a
--- /dev/null
+++ b/arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
@@ -0,0 +1,84 @@
+/*
+ * Samsung's S3C64XX flattened device tree enabled machine
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * 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.
+*/
+
+#include <linux/of_platform.h>
+#include <linux/serial_core.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/vic.h>
+#include <mach/map.h>
+
+#include <plat/cpu.h>
+#include <plat/regs-serial.h>
+#include <plat/samsung-time.h>
+
+#include "common.h"
+
+/*
+ * The following lookup table is used to override device names when devices
+ * are registered from device tree. This is temporarily added to enable
+ * device tree support addition for the S3C64xx architecture.
+ *
+ * For drivers that require platform data to be provided from the machine
+ * file, a platform data pointer can also be supplied along with the
+ * devices names. Usually, the platform data elements that cannot be parsed
+ * from the device tree by the drivers (example: function pointers) are
+ * supplied. But it should be noted that this is a temporary mechanism and
+ * at some point, the drivers should be capable of parsing all the platform
+ * data from the device tree.
+ */
+static const struct of_dev_auxdata s3c64xx_auxdata_lookup[] __initconst = {
+ OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005000,
+ "s3c6400-uart.0", NULL),
+ OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005400,
+ "s3c6400-uart.1", NULL),
+ OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005800,
+ "s3c6400-uart.2", NULL),
+ OF_DEV_AUXDATA("samsung,s3c6400-uart", 0x7f005c00,
+ "s3c6400-uart.3", NULL),
+ OF_DEV_AUXDATA("samsung,s3c6410-sdhci", 0x7c200000,
+ "s3c-sdhci.0", NULL),
+ OF_DEV_AUXDATA("samsung,s3c6410-sdhci", 0x7c300000,
+ "s3c-sdhci.1", NULL),
+ OF_DEV_AUXDATA("samsung,s3c6410-sdhci", 0x7c400000,
+ "s3c-sdhci.2", NULL),
+ {},
+};
+
+static void __init s3c64xx_dt_map_io(void)
+{
+ s3c64xx_init_io(NULL, 0);
+ s3c24xx_init_clocks(12000000);
+ samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
+}
+
+static void __init s3c64xx_dt_machine_init(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table,
+ s3c64xx_auxdata_lookup, NULL);
+}
+
+static char const *s3c64xx_dt_compat[] __initdata = {
+ "samsung,s3c6400",
+ "samsung,s3c6410",
+ NULL
+};
+
+DT_MACHINE_START(S3C6400_DT, "Samsung S3C64xx (Flattened Device Tree)")
+ /* Maintainer: Tomasz Figa <tomasz.figa@gmail.com> */
+ .init_irq = s3c64xx_of_init_irq,
+ .map_io = s3c64xx_dt_map_io,
+ .handle_irq = vic_handle_irq,
+ .init_machine = s3c64xx_dt_machine_init,
+ .init_late = s3c64xx_init_late,
+ .timer = &samsung_timer,
+ .dt_compat = s3c64xx_dt_compat,
+ .restart = s3c64xx_restart,
+MACHINE_END
--
1.8.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
` (3 preceding siblings ...)
2013-01-13 1:10 ` [PATCH 4/6] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
@ 2013-01-13 1:10 ` Tomasz Figa
2013-01-14 14:48 ` Mark Rutland
2013-01-13 1:10 ` [PATCH 6/6] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
2013-01-25 19:09 ` [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
6 siblings, 1 reply; 18+ messages in thread
From: Tomasz Figa @ 2013-01-13 1:10 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds basic device tree definitions for Samsung S3C64xx SoCs.
Since all the SoCs in the series are very similar, the files are created
hierarchically - one file for the whole series and then separate files
for particular SoCs including the common one.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
arch/arm/boot/dts/s3c6400.dtsi | 33 ++++++++++++++
arch/arm/boot/dts/s3c6410.dtsi | 33 ++++++++++++++
arch/arm/boot/dts/s3c64xx.dtsi | 97 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 163 insertions(+)
create mode 100644 arch/arm/boot/dts/s3c6400.dtsi
create mode 100644 arch/arm/boot/dts/s3c6410.dtsi
create mode 100644 arch/arm/boot/dts/s3c64xx.dtsi
diff --git a/arch/arm/boot/dts/s3c6400.dtsi b/arch/arm/boot/dts/s3c6400.dtsi
new file mode 100644
index 0000000..76106b8
--- /dev/null
+++ b/arch/arm/boot/dts/s3c6400.dtsi
@@ -0,0 +1,33 @@
+/*
+ * Samsung's S3C6400 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6400 SoC device nodes are listed in this file. S3C6400
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6400 SoC. As device tree coverage for S3C6400 increases, additional
+ * nodes can be added to this file.
+ *
+ * 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.
+*/
+
+/include/ "s3c64xx.dtsi"
+
+/ {
+ compatible = "samsung,s3c6400";
+
+ vic0: interrupt-controller at 71200000 {
+ interrupt-mask = <0xfffffe1f>;
+ wakeup-mask = <0x00200004>;
+ };
+
+ vic1: interrupt-controller at 71300000 {
+ interrupt-mask = <0xffffffff>;
+ wakeup-mask = <0x53020000>;
+ };
+};
diff --git a/arch/arm/boot/dts/s3c6410.dtsi b/arch/arm/boot/dts/s3c6410.dtsi
new file mode 100644
index 0000000..4a74df9
--- /dev/null
+++ b/arch/arm/boot/dts/s3c6410.dtsi
@@ -0,0 +1,33 @@
+/*
+ * Samsung's S3C6410 SoC device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C6410 SoC device nodes are listed in this file. S3C6410
+ * based board files can include this file and provide values for board specfic
+ * bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C6410 SoC. As device tree coverage for S3C6410 increases, additional
+ * nodes can be added to this file.
+ *
+ * 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.
+*/
+
+/include/ "s3c64xx.dtsi"
+
+/ {
+ compatible = "samsung,s3c6410";
+
+ vic0: interrupt-controller at 71200000 {
+ interrupt-mask = <0xffffff7f>;
+ wakeup-mask = <0x00200004>;
+ };
+
+ vic1: interrupt-controller at 71300000 {
+ interrupt-mask = <0xffffffff>;
+ wakeup-mask = <0x53020000>;
+ };
+};
diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
new file mode 100644
index 0000000..55d6e08
--- /dev/null
+++ b/arch/arm/boot/dts/s3c64xx.dtsi
@@ -0,0 +1,97 @@
+/*
+ * Samsung's S3C64xx SoC series common device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Samsung's S3C64xx SoC series device nodes are listed in this file.
+ * Particular SoCs from S3C64xx series can include this file and provide
+ * values for SoCs specfic bindings.
+ *
+ * Note: This file does not include device nodes for all the controllers in
+ * S3C64xx SoCs. As device tree coverage for S3C64xx increases, additional
+ * nodes can be added to this file.
+ *
+ * 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.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+ cpus {
+ cpu at 0 {
+ compatible = "arm,arm1176jzf-s";
+ };
+ };
+
+ vic0: interrupt-controller at 71200000 {
+ compatible = "arm,pl192-vic";
+ interrupt-controller;
+ reg = <0x71200000 0x1000>;
+ #interrupt-cells = <1>;
+ };
+
+ vic1: interrupt-controller at 71300000 {
+ compatible = "arm,pl192-vic";
+ interrupt-controller;
+ reg = <0x71300000 0x1000>;
+ #interrupt-cells = <1>;
+ };
+
+ serial at 7f005000 {
+ compatible = "samsung,s3c6400-uart";
+ reg = <0x7f005000 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <5 0>;
+ status = "disabled";
+ };
+
+ serial at 7f005400 {
+ compatible = "samsung,s3c6400-uart";
+ reg = <0x7f005400 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <6 0>;
+ status = "disabled";
+ };
+
+ serial at 7f005800 {
+ compatible = "samsung,s3c6400-uart";
+ reg = <0x7f005800 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <7 0>;
+ status = "disabled";
+ };
+
+ serial at 7f005c00 {
+ compatible = "samsung,s3c6400-uart";
+ reg = <0x7f005c00 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <8 0>;
+ status = "disabled";
+ };
+
+ sdhci at 7c200000 {
+ compatible = "samsung,s3c6410-sdhci";
+ reg = <0x7c200000 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <24 0>;
+ status = "disabled";
+ };
+
+ sdhci at 7c300000 {
+ compatible = "samsung,s3c6410-sdhci";
+ reg = <0x7c300000 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <25 0>;
+ status = "disabled";
+ };
+
+ sdhci at 7c400000 {
+ compatible = "samsung,s3c6410-sdhci";
+ reg = <0x7c400000 0x100>;
+ interrupt-parent = <&vic1>;
+ interrupts = <17 0>;
+ status = "disabled";
+ };
+};
--
1.8.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 6/6] ARM: dts: Add dts file for S3C6410-based Mini6410 board
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
` (4 preceding siblings ...)
2013-01-13 1:10 ` [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
@ 2013-01-13 1:10 ` Tomasz Figa
2013-01-25 19:09 ` [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
6 siblings, 0 replies; 18+ messages in thread
From: Tomasz Figa @ 2013-01-13 1:10 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds basic device tree sources for FriendlyARM Mini6410 board
based on Samsung S3C6410 SoC.
Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/s3c6410-mini6410.dts | 50 ++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 arch/arm/boot/dts/s3c6410-mini6410.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e44da40..9ca30ea 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -120,6 +120,7 @@ dtb-$(CONFIG_ARCH_U8500) += snowball.dtb \
hrefprev60.dtb \
hrefv60plus.dtb \
ccu9540.dtb
+dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb
dtb-$(CONFIG_ARCH_SHMOBILE) += emev2-kzm9d.dtb \
r8a7740-armadillo800eva.dtb \
sh73a0-kzm9g.dtb \
diff --git a/arch/arm/boot/dts/s3c6410-mini6410.dts b/arch/arm/boot/dts/s3c6410-mini6410.dts
new file mode 100644
index 0000000..9ac82c2
--- /dev/null
+++ b/arch/arm/boot/dts/s3c6410-mini6410.dts
@@ -0,0 +1,50 @@
+/*
+ * Samsung's S3C6410 based Mini6410 board device tree source
+ *
+ * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
+ *
+ * Device tree source file for FriendlyARM Mini6410 board which is based on
+ * Samsung's S3C6410 SoC.
+ *
+ * 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.
+*/
+
+/dts-v1/;
+/include/ "s3c6410.dtsi"
+
+/ {
+ model = "FriendlyARM Mini6410 board based on S3C6410";
+ compatible = "friendlyarm,mini6410", "samsung,s3c6410";
+
+ memory {
+ reg = <0x50000000 0x10000000>;
+ };
+
+ chosen {
+ bootargs = "console=ttySAC0,115200n8 earlyprintk rootwait root=/dev/mmcblk0p1";
+ };
+
+ serial at 7f005000 {
+ status = "okay";
+ };
+
+ serial at 7f005400 {
+ status = "okay";
+ };
+
+ serial at 7f005800 {
+ status = "okay";
+ };
+
+ serial at 7f005c00 {
+ status = "okay";
+ };
+
+ sdhci at 7c200000 {
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+ };
+};
--
1.8.1
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree
2013-01-13 1:10 ` [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
@ 2013-01-14 1:08 ` Rob Herring
2013-01-14 10:44 ` Tomasz Figa
0 siblings, 1 reply; 18+ messages in thread
From: Rob Herring @ 2013-01-14 1:08 UTC (permalink / raw)
To: linux-arm-kernel
On 01/12/2013 07:10 PM, Tomasz Figa wrote:
> This patch extends vic_of_init to parse valid interrupt sources
> and resume sources masks from device tree.
>
> If mask values are not specified in device tree, all sources
> are assumed to be valid, as before this patch.
>
> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
> ---
> Documentation/devicetree/bindings/arm/vic.txt | 6 ++++++
> arch/arm/common/vic.c | 7 ++++++-
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/arm/vic.txt
> index 266716b..bb7137c 100644
> --- a/Documentation/devicetree/bindings/arm/vic.txt
> +++ b/Documentation/devicetree/bindings/arm/vic.txt
> @@ -18,6 +18,9 @@ Required properties:
> Optional properties:
>
> - interrupts : Interrupt source for parent controllers if the VIC is nested.
> +- interrupt-mask : Bit mask of valid interrupt sources (defaults to all valid)
Can you explain why this is needed and is not just the OR of all
interrupts described in the DT?
> +- wakeup-mask : Bit mask of interrupt sources that can wake up the system
> + (defaults to all allowed)
Seems like this would be all VIC interrupts unless the wake-up handling
is done in some shadow controller. If the former is true, then wake-up
capability is really a property of individual devices. If the later,
then this property would belong in that shadow controller.
Rob
>
> Example:
>
> @@ -26,4 +29,7 @@ Example:
> interrupt-controller;
> #interrupt-cells = <1>;
> reg = <0x60000 0x1000>;
> +
> + interrupt-mask = <0xffffff7f>;
> + wakeup-mask = <0x0000ff7f>;
> };
> diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
> index e4df17c..c2889da 100644
> --- a/arch/arm/common/vic.c
> +++ b/arch/arm/common/vic.c
> @@ -407,6 +407,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
> int __init vic_of_init(struct device_node *node, struct device_node *parent)
> {
> void __iomem *regs;
> + u32 interrupt_mask = ~0;
> + u32 wakeup_mask = ~0;
>
> if (WARN(parent, "non-root VICs are not supported"))
> return -EINVAL;
> @@ -415,10 +417,13 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
> if (WARN_ON(!regs))
> return -EIO;
>
> + of_property_read_u32(node, "interrupt-mask", &interrupt_mask);
> + of_property_read_u32(node, "wakeup-mask", &wakeup_mask);
> +
> /*
> * Passing -1 as first IRQ makes the simple domain allocate descriptors
> */
> - __vic_init(regs, -1, ~0, ~0, node);
> + __vic_init(regs, -1, interrupt_mask, wakeup_mask, node);
>
> return 0;
> }
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree
2013-01-14 1:08 ` Rob Herring
@ 2013-01-14 10:44 ` Tomasz Figa
0 siblings, 0 replies; 18+ messages in thread
From: Tomasz Figa @ 2013-01-14 10:44 UTC (permalink / raw)
To: linux-arm-kernel
Hi Rob,
2013/1/14 Rob Herring <robherring2@gmail.com>:
> On 01/12/2013 07:10 PM, Tomasz Figa wrote:
>> This patch extends vic_of_init to parse valid interrupt sources
>> and resume sources masks from device tree.
>>
>> If mask values are not specified in device tree, all sources
>> are assumed to be valid, as before this patch.
>>
>> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
>> ---
>> Documentation/devicetree/bindings/arm/vic.txt | 6 ++++++
>> arch/arm/common/vic.c | 7 ++++++-
>> 2 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/arm/vic.txt
>> index 266716b..bb7137c 100644
>> --- a/Documentation/devicetree/bindings/arm/vic.txt
>> +++ b/Documentation/devicetree/bindings/arm/vic.txt
>> @@ -18,6 +18,9 @@ Required properties:
>> Optional properties:
>>
>> - interrupts : Interrupt source for parent controllers if the VIC is nested.
>> +- interrupt-mask : Bit mask of valid interrupt sources (defaults to all valid)
>
> Can you explain why this is needed and is not just the OR of all
> interrupts described in the DT?
Well, it depends what you mean with interrupts described in the DT.
Basically this mask is used for sanity checks of request_irq calls,
by denying interrupts non-existent on given platform.
>> +- wakeup-mask : Bit mask of interrupt sources that can wake up the system
>> + (defaults to all allowed)
>
> Seems like this would be all VIC interrupts unless the wake-up handling
> is done in some shadow controller. If the former is true, then wake-up
> capability is really a property of individual devices. If the later,
> then this property would belong in that shadow controller.
Yes, there is a shadow controller used for configuring which of the available
wake-up signals shall be used.
Still, I don't see how I should model it in the device tree, since its VIC whose
set_irq_wake callback is called.
Before Device Tree, both interrupt and wake-up masks were being passed
as arguments to vic_init function. This is what made me add them as
DT attributes of VIC.
Best regards,
Tomasz Figa
P.S. Rob, sorry for the original message. I have clicked "reply"
instead of "reply to all" in the mobile GMail client.
> Rob
>
>>
>> Example:
>>
>> @@ -26,4 +29,7 @@ Example:
>> interrupt-controller;
>> #interrupt-cells = <1>;
>> reg = <0x60000 0x1000>;
>> +
>> + interrupt-mask = <0xffffff7f>;
>> + wakeup-mask = <0x0000ff7f>;
>> };
>> diff --git a/arch/arm/common/vic.c b/arch/arm/common/vic.c
>> index e4df17c..c2889da 100644
>> --- a/arch/arm/common/vic.c
>> +++ b/arch/arm/common/vic.c
>> @@ -407,6 +407,8 @@ void __init vic_init(void __iomem *base, unsigned int irq_start,
>> int __init vic_of_init(struct device_node *node, struct device_node *parent)
>> {
>> void __iomem *regs;
>> + u32 interrupt_mask = ~0;
>> + u32 wakeup_mask = ~0;
>>
>> if (WARN(parent, "non-root VICs are not supported"))
>> return -EINVAL;
>> @@ -415,10 +417,13 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
>> if (WARN_ON(!regs))
>> return -EIO;
>>
>> + of_property_read_u32(node, "interrupt-mask", &interrupt_mask);
>> + of_property_read_u32(node, "wakeup-mask", &wakeup_mask);
>> +
>> /*
>> * Passing -1 as first IRQ makes the simple domain allocate descriptors
>> */
>> - __vic_init(regs, -1, ~0, ~0, node);
>> + __vic_init(regs, -1, interrupt_mask, wakeup_mask, node);
>>
>> return 0;
>> }
>>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-13 1:10 ` [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
@ 2013-01-14 14:48 ` Mark Rutland
2013-01-14 15:05 ` Lorenzo Pieralisi
0 siblings, 1 reply; 18+ messages in thread
From: Mark Rutland @ 2013-01-14 14:48 UTC (permalink / raw)
To: linux-arm-kernel
Hello,
This all looks good. I just have a couple of comments about the cpus node.
On Sun, Jan 13, 2013 at 01:10:57AM +0000, Tomasz Figa wrote:
> This patch adds basic device tree definitions for Samsung S3C64xx SoCs.
>
> Since all the SoCs in the series are very similar, the files are created
> hierarchically - one file for the whole series and then separate files
> for particular SoCs including the common one.
>
> Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[...]
> diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
> new file mode 100644
> index 0000000..55d6e08
> --- /dev/null
> +++ b/arch/arm/boot/dts/s3c64xx.dtsi
> @@ -0,0 +1,97 @@
> +/*
> + * Samsung's S3C64xx SoC series common device tree source
> + *
> + * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
> + *
> + * Samsung's S3C64xx SoC series device nodes are listed in this file.
> + * Particular SoCs from S3C64xx series can include this file and provide
> + * values for SoCs specfic bindings.
> + *
> + * Note: This file does not include device nodes for all the controllers in
> + * S3C64xx SoCs. As device tree coverage for S3C64xx increases, additional
> + * nodes can be added to this file.
> + *
> + * 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.
> + */
> +
> +/include/ "skeleton.dtsi"
> +
> +/ {
> + cpus {
> + cpu at 0 {
> + compatible = "arm,arm1176jzf-s";
> + };
> + };
You can drop the unit address from the cpu node - it's meant to be there to
differentiate multiple nodes (and is supposed to match the reg property, which
the 1176jzf-s can't have, as it doesn't have an MPIDR).
Also, "arm,arm1176jzf-s" isn't listed in the binding doc. There was a question
about how to maintain this list [1], but I can't seem to find a conclusion, if
any were reached. It might be worth appending "arm,arm1176" to the compatible
list for the cpu node in case we want to enable something via dt for all 1176
variations.
Dave, Lorenzo, any thoughts?
[...]
Thanks,
Mark.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/131362.html
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-14 14:48 ` Mark Rutland
@ 2013-01-14 15:05 ` Lorenzo Pieralisi
2013-01-16 10:59 ` Dave Martin
0 siblings, 1 reply; 18+ messages in thread
From: Lorenzo Pieralisi @ 2013-01-14 15:05 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 14, 2013 at 02:48:41PM +0000, Mark Rutland wrote:
> Hello,
>
> This all looks good. I just have a couple of comments about the cpus node.
>
> On Sun, Jan 13, 2013 at 01:10:57AM +0000, Tomasz Figa wrote:
> > This patch adds basic device tree definitions for Samsung S3C64xx SoCs.
> >
> > Since all the SoCs in the series are very similar, the files are created
> > hierarchically - one file for the whole series and then separate files
> > for particular SoCs including the common one.
> >
> > Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
>
> [...]
>
> > diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
> > new file mode 100644
> > index 0000000..55d6e08
> > --- /dev/null
> > +++ b/arch/arm/boot/dts/s3c64xx.dtsi
> > @@ -0,0 +1,97 @@
> > +/*
> > + * Samsung's S3C64xx SoC series common device tree source
> > + *
> > + * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
> > + *
> > + * Samsung's S3C64xx SoC series device nodes are listed in this file.
> > + * Particular SoCs from S3C64xx series can include this file and provide
> > + * values for SoCs specfic bindings.
> > + *
> > + * Note: This file does not include device nodes for all the controllers in
> > + * S3C64xx SoCs. As device tree coverage for S3C64xx increases, additional
> > + * nodes can be added to this file.
> > + *
> > + * 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.
> > + */
> > +
> > +/include/ "skeleton.dtsi"
> > +
> > +/ {
> > + cpus {
> > + cpu at 0 {
> > + compatible = "arm,arm1176jzf-s";
> > + };
> > + };
>
> You can drop the unit address from the cpu node - it's meant to be there to
> differentiate multiple nodes (and is supposed to match the reg property, which
> the 1176jzf-s can't have, as it doesn't have an MPIDR).
Well, this is a point that I should consider since the kernel docs I wrote are
misleading, they require the reg property that can not be there on UP.
True, MPIDR does not exist in this case, but I have to document this in the
bindings since it is unclear.
>
> Also, "arm,arm1176jzf-s" isn't listed in the binding doc. There was a question
> about how to maintain this list [1], but I can't seem to find a conclusion, if
> any were reached. It might be worth appending "arm,arm1176" to the compatible
> list for the cpu node in case we want to enable something via dt for all 1176
> variations.
>
> Dave, Lorenzo, any thoughts?
Eh, frankly I do not know how to handle this. Either we add a compatible
string to the bindings anytime a DT gets merged in the kernel but how
to maintain it, it has to be defined. Happy to hear some feedback on
this.
Lorenzo
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-14 15:05 ` Lorenzo Pieralisi
@ 2013-01-16 10:59 ` Dave Martin
2013-01-25 19:08 ` Tomasz Figa
0 siblings, 1 reply; 18+ messages in thread
From: Dave Martin @ 2013-01-16 10:59 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 14, 2013 at 03:05:32PM +0000, Lorenzo Pieralisi wrote:
> On Mon, Jan 14, 2013 at 02:48:41PM +0000, Mark Rutland wrote:
> > Hello,
> >
> > This all looks good. I just have a couple of comments about the cpus node.
> >
> > On Sun, Jan 13, 2013 at 01:10:57AM +0000, Tomasz Figa wrote:
> > > This patch adds basic device tree definitions for Samsung S3C64xx SoCs.
> > >
> > > Since all the SoCs in the series are very similar, the files are created
> > > hierarchically - one file for the whole series and then separate files
> > > for particular SoCs including the common one.
> > >
> > > Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
> >
> > [...]
> >
> > > diff --git a/arch/arm/boot/dts/s3c64xx.dtsi b/arch/arm/boot/dts/s3c64xx.dtsi
> > > new file mode 100644
> > > index 0000000..55d6e08
> > > --- /dev/null
> > > +++ b/arch/arm/boot/dts/s3c64xx.dtsi
> > > @@ -0,0 +1,97 @@
> > > +/*
> > > + * Samsung's S3C64xx SoC series common device tree source
> > > + *
> > > + * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
> > > + *
> > > + * Samsung's S3C64xx SoC series device nodes are listed in this file.
> > > + * Particular SoCs from S3C64xx series can include this file and provide
> > > + * values for SoCs specfic bindings.
> > > + *
> > > + * Note: This file does not include device nodes for all the controllers in
> > > + * S3C64xx SoCs. As device tree coverage for S3C64xx increases, additional
> > > + * nodes can be added to this file.
> > > + *
> > > + * 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.
> > > + */
> > > +
> > > +/include/ "skeleton.dtsi"
> > > +
> > > +/ {
> > > + cpus {
> > > + cpu at 0 {
> > > + compatible = "arm,arm1176jzf-s";
> > > + };
> > > + };
> >
> > You can drop the unit address from the cpu node - it's meant to be there to
> > differentiate multiple nodes (and is supposed to match the reg property, which
> > the 1176jzf-s can't have, as it doesn't have an MPIDR).
>
> Well, this is a point that I should consider since the kernel docs I wrote are
> misleading, they require the reg property that can not be there on UP.
> True, MPIDR does not exist in this case, but I have to document this in the
> bindings since it is unclear.
>
> >
> > Also, "arm,arm1176jzf-s" isn't listed in the binding doc. There was a question
> > about how to maintain this list [1], but I can't seem to find a conclusion, if
> > any were reached. It might be worth appending "arm,arm1176" to the compatible
> > list for the cpu node in case we want to enable something via dt for all 1176
> > variations.
> >
> > Dave, Lorenzo, any thoughts?
>
> Eh, frankly I do not know how to handle this. Either we add a compatible
> string to the bindings anytime a DT gets merged in the kernel but how
> to maintain it, it has to be defined. Happy to hear some feedback on
> this.
Well, the number of CPU types does not grow rapidly. It will be much
less than one per SoC -- so keeping the list up to date shouldn't be
that much effort.
For ARM1176JZF-S, it could make sense for the comatible list to be
"arm,arm1176jzf-s", "arm,arm1176"
...since the differences between 1176 variants are software probeable
(i.e., whether there is an FPU or not). AFAIK the J, Z apply to all
ARM1176, and the -S (synthesisable RTL) is nothing to do with software.
The kernel probably only really needs to know "arm,arm1176".
Cheers
---Dave
>
> Lorenzo
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-16 10:59 ` Dave Martin
@ 2013-01-25 19:08 ` Tomasz Figa
2013-01-25 19:15 ` Kukjin Kim
0 siblings, 1 reply; 18+ messages in thread
From: Tomasz Figa @ 2013-01-25 19:08 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Wednesday 16 of January 2013 10:59:57 Dave Martin wrote:
> On Mon, Jan 14, 2013 at 03:05:32PM +0000, Lorenzo Pieralisi wrote:
> > On Mon, Jan 14, 2013 at 02:48:41PM +0000, Mark Rutland wrote:
> > > Hello,
> > >
> > > This all looks good. I just have a couple of comments about the cpus
> > > node.> >
> > > On Sun, Jan 13, 2013 at 01:10:57AM +0000, Tomasz Figa wrote:
> > > > This patch adds basic device tree definitions for Samsung S3C64xx
> > > > SoCs.
> > > >
> > > > Since all the SoCs in the series are very similar, the files are
> > > > created hierarchically - one file for the whole series and then
> > > > separate files for particular SoCs including the common one.
> > > >
> > > > Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
> > >
> > > [...]
> > >
> > > > diff --git a/arch/arm/boot/dts/s3c64xx.dtsi
> > > > b/arch/arm/boot/dts/s3c64xx.dtsi new file mode 100644
> > > > index 0000000..55d6e08
> > > > --- /dev/null
> > > > +++ b/arch/arm/boot/dts/s3c64xx.dtsi
> > > > @@ -0,0 +1,97 @@
> > > > +/*
> > > > + * Samsung's S3C64xx SoC series common device tree source
> > > > + *
> > > > + * Copyright (c) 2013 Tomasz Figa <tomasz.figa@gmail.com>
> > > > + *
> > > > + * Samsung's S3C64xx SoC series device nodes are listed in this
> > > > file.
> > > > + * Particular SoCs from S3C64xx series can include this file and
> > > > provide + * values for SoCs specfic bindings.
> > > > + *
> > > > + * Note: This file does not include device nodes for all the
> > > > controllers in + * S3C64xx SoCs. As device tree coverage for
> > > > S3C64xx increases, additional + * nodes can be added to this
> > > > file.
> > > > + *
> > > > + * 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.
> > > > + */
> > > > +
> > > > +/include/ "skeleton.dtsi"
> > > > +
> > > > +/ {
> > > > + cpus {
> > > > + cpu at 0 {
> > > > + compatible = "arm,arm1176jzf-s";
> > > > + };
> > > > + };
> > >
> > > You can drop the unit address from the cpu node - it's meant to be
> > > there to differentiate multiple nodes (and is supposed to match the
> > > reg property, which the 1176jzf-s can't have, as it doesn't have an
> > > MPIDR).
> >
> > Well, this is a point that I should consider since the kernel docs I
> > wrote are misleading, they require the reg property that can not be
> > there on UP. True, MPIDR does not exist in this case, but I have to
> > document this in the bindings since it is unclear.
> >
> > > Also, "arm,arm1176jzf-s" isn't listed in the binding doc. There was
> > > a question about how to maintain this list [1], but I can't seem to
> > > find a conclusion, if any were reached. It might be worth
> > > appending "arm,arm1176" to the compatible list for the cpu node in
> > > case we want to enable something via dt for all 1176 variations.
> > >
> > > Dave, Lorenzo, any thoughts?
> >
> > Eh, frankly I do not know how to handle this. Either we add a
> > compatible string to the bindings anytime a DT gets merged in the
> > kernel but how to maintain it, it has to be defined. Happy to hear
> > some feedback on this.
>
> Well, the number of CPU types does not grow rapidly. It will be much
> less than one per SoC -- so keeping the list up to date shouldn't be
> that much effort.
>
> For ARM1176JZF-S, it could make sense for the comatible list to be
>
> "arm,arm1176jzf-s", "arm,arm1176"
>
> ...since the differences between 1176 variants are software probeable
> (i.e., whether there is an FPU or not). AFAIK the J, Z apply to all
> ARM1176, and the -S (synthesisable RTL) is nothing to do with software.
> The kernel probably only really needs to know "arm,arm1176".
OK. So the conclusion is that I should change the cpus node to following:
cpus {
cpu {
compatible = "arm,arm1176jzf-s", "arm,arm1176";
};
};
Am I right?
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 0/6] Initial Device Tree support for S3C64xx
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
` (5 preceding siblings ...)
2013-01-13 1:10 ` [PATCH 6/6] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
@ 2013-01-25 19:09 ` Tomasz Figa
2013-01-25 19:25 ` Kukjin Kim
6 siblings, 1 reply; 18+ messages in thread
From: Tomasz Figa @ 2013-01-25 19:09 UTC (permalink / raw)
To: linux-arm-kernel
On Sunday 13 of January 2013 02:10:52 Tomasz Figa wrote:
> This series is adds Device Tree support for Samsung S3C64xx SoC series.
>
> It fixes several problems preventing from booting an S3C64xx-based
> system using Device Tree, adds all the infrastructure for Device
> Tree-based board support, including mach-s3c64xx-dt and dts include
> files for S3C64xx SoCs, and (very) basic device tree source for
> FriendlyARM Mini6410 board.
>
> Current support is very limited and allows only basic bootup with UART
> and SDHCI, but should be fine as a start and will be extended in
> future, hopefully with help of S3C64xx board maintainers.
>
> Tomasz Figa (6):
> ARM: common: vic: Parse interrupt and resume masks from device tree
> ARM: common: vic: Fix invalid first IRQ number in OF-based
> registration
> ARM: s3c64xx: Add support for OF-based VIC initialization
> ARM: s3c64xx: Add board file for boot using Device Tree
> ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
> ARM: dts: Add dts file for S3C6410-based Mini6410 board
>
> Documentation/devicetree/bindings/arm/vic.txt | 6 ++
> arch/arm/boot/dts/Makefile | 1 +
> arch/arm/boot/dts/s3c6400.dtsi | 33 +++++++++
> arch/arm/boot/dts/s3c6410-mini6410.dts | 50 ++++++++++++++
> arch/arm/boot/dts/s3c6410.dtsi | 33 +++++++++
> arch/arm/boot/dts/s3c64xx.dtsi | 97
> +++++++++++++++++++++++++++ arch/arm/common/vic.c
> | 9 ++-
> arch/arm/mach-s3c64xx/Kconfig | 13 ++++
> arch/arm/mach-s3c64xx/Makefile | 1 +
> arch/arm/mach-s3c64xx/common.c | 16 +++++
> arch/arm/mach-s3c64xx/common.h | 4 ++
> arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 84
> +++++++++++++++++++++++ 12 files changed, 345 insertions(+), 2
> deletions(-)
> create mode 100644 arch/arm/boot/dts/s3c6400.dtsi
> create mode 100644 arch/arm/boot/dts/s3c6410-mini6410.dts
> create mode 100644 arch/arm/boot/dts/s3c6410.dtsi
> create mode 100644 arch/arm/boot/dts/s3c64xx.dtsi
> create mode 100644 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
Any other comments on this series?
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-25 19:08 ` Tomasz Figa
@ 2013-01-25 19:15 ` Kukjin Kim
2013-01-28 9:02 ` Mark Rutland
0 siblings, 1 reply; 18+ messages in thread
From: Kukjin Kim @ 2013-01-25 19:15 UTC (permalink / raw)
To: linux-arm-kernel
Tomasz Figa wrote:
[...]
> > Well, the number of CPU types does not grow rapidly. It will be much
> > less than one per SoC -- so keeping the list up to date shouldn't be
> > that much effort.
> >
> > For ARM1176JZF-S, it could make sense for the comatible list to be
> >
> > "arm,arm1176jzf-s", "arm,arm1176"
> >
> > ...since the differences between 1176 variants are software probeable
> > (i.e., whether there is an FPU or not). AFAIK the J, Z apply to all
> > ARM1176, and the -S (synthesisable RTL) is nothing to do with software.
> > The kernel probably only really needs to know "arm,arm1176".
>
> OK. So the conclusion is that I should change the cpus node to following:
>
> cpus {
> cpu {
cpu at 0 { ?
> compatible = "arm,arm1176jzf-s", "arm,arm1176";
> };
> };
>
> Am I right?
>
I think so :-)
- Kukjin
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 0/6] Initial Device Tree support for S3C64xx
2013-01-25 19:09 ` [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
@ 2013-01-25 19:25 ` Kukjin Kim
0 siblings, 0 replies; 18+ messages in thread
From: Kukjin Kim @ 2013-01-25 19:25 UTC (permalink / raw)
To: linux-arm-kernel
Tomasz Figa wrote:
>
> On Sunday 13 of January 2013 02:10:52 Tomasz Figa wrote:
> > This series is adds Device Tree support for Samsung S3C64xx SoC series.
> >
> > It fixes several problems preventing from booting an S3C64xx-based
> > system using Device Tree, adds all the infrastructure for Device
> > Tree-based board support, including mach-s3c64xx-dt and dts include
> > files for S3C64xx SoCs, and (very) basic device tree source for
> > FriendlyARM Mini6410 board.
> >
> > Current support is very limited and allows only basic bootup with UART
> > and SDHCI, but should be fine as a start and will be extended in
> > future, hopefully with help of S3C64xx board maintainers.
> >
> > Tomasz Figa (6):
> > ARM: common: vic: Parse interrupt and resume masks from device tree
> > ARM: common: vic: Fix invalid first IRQ number in OF-based
> > registration
> > ARM: s3c64xx: Add support for OF-based VIC initialization
> > ARM: s3c64xx: Add board file for boot using Device Tree
> > ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
> > ARM: dts: Add dts file for S3C6410-based Mini6410 board
> >
> > Documentation/devicetree/bindings/arm/vic.txt | 6 ++
> > arch/arm/boot/dts/Makefile | 1 +
> > arch/arm/boot/dts/s3c6400.dtsi | 33 +++++++++
> > arch/arm/boot/dts/s3c6410-mini6410.dts | 50 ++++++++++++++
> > arch/arm/boot/dts/s3c6410.dtsi | 33 +++++++++
> > arch/arm/boot/dts/s3c64xx.dtsi | 97
> > +++++++++++++++++++++++++++ arch/arm/common/vic.c
> > | 9 ++-
> > arch/arm/mach-s3c64xx/Kconfig | 13 ++++
> > arch/arm/mach-s3c64xx/Makefile | 1 +
> > arch/arm/mach-s3c64xx/common.c | 16 +++++
> > arch/arm/mach-s3c64xx/common.h | 4 ++
> > arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c | 84
> > +++++++++++++++++++++++ 12 files changed, 345 insertions(+), 2
> > deletions(-)
> > create mode 100644 arch/arm/boot/dts/s3c6400.dtsi
> > create mode 100644 arch/arm/boot/dts/s3c6410-mini6410.dts
> > create mode 100644 arch/arm/boot/dts/s3c6410.dtsi
> > create mode 100644 arch/arm/boot/dts/s3c64xx.dtsi
> > create mode 100644 arch/arm/mach-s3c64xx/mach-s3c64xx-dt.c
>
> Any other comments on this series?
>
Looks good to me. But would be better if the vic changes could get ack ;-)
Thanks.
- Kukjin
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-25 19:15 ` Kukjin Kim
@ 2013-01-28 9:02 ` Mark Rutland
2013-01-28 13:04 ` Dave Martin
0 siblings, 1 reply; 18+ messages in thread
From: Mark Rutland @ 2013-01-28 9:02 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Jan 25, 2013 at 07:15:48PM +0000, Kukjin Kim wrote:
> Tomasz Figa wrote:
>
> [...]
>
> > > Well, the number of CPU types does not grow rapidly. It will be much
> > > less than one per SoC -- so keeping the list up to date shouldn't be
> > > that much effort.
> > >
> > > For ARM1176JZF-S, it could make sense for the comatible list to be
> > >
> > > "arm,arm1176jzf-s", "arm,arm1176"
> > >
> > > ...since the differences between 1176 variants are software probeable
> > > (i.e., whether there is an FPU or not). AFAIK the J, Z apply to all
> > > ARM1176, and the -S (synthesisable RTL) is nothing to do with software.
> > > The kernel probably only really needs to know "arm,arm1176".
> >
> > OK. So the conclusion is that I should change the cpus node to following:
> >
> > cpus {
> > cpu {
>
> cpu at 0 { ?
As the CPU has no MPIDR, and thus doesn't have a reg property, there's no reason
to have a unit address. Just "cpu" should be fine.
>
> > compatible = "arm,arm1176jzf-s", "arm,arm1176";
> > };
> > };
> >
> > Am I right?
> >
> I think so :-)
>
> - Kukjin
>
As Dave pointed out, the "jzf-s" portion might be superfluous. It's worth
having the "arm,arm1176", though.
Thanks,
Mark.
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs
2013-01-28 9:02 ` Mark Rutland
@ 2013-01-28 13:04 ` Dave Martin
0 siblings, 0 replies; 18+ messages in thread
From: Dave Martin @ 2013-01-28 13:04 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Jan 28, 2013 at 09:02:40AM +0000, Mark Rutland wrote:
> On Fri, Jan 25, 2013 at 07:15:48PM +0000, Kukjin Kim wrote:
> > Tomasz Figa wrote:
> >
> > [...]
> >
> > > > Well, the number of CPU types does not grow rapidly. It will be much
> > > > less than one per SoC -- so keeping the list up to date shouldn't be
> > > > that much effort.
> > > >
> > > > For ARM1176JZF-S, it could make sense for the comatible list to be
> > > >
> > > > "arm,arm1176jzf-s", "arm,arm1176"
> > > >
> > > > ...since the differences between 1176 variants are software probeable
> > > > (i.e., whether there is an FPU or not). AFAIK the J, Z apply to all
> > > > ARM1176, and the -S (synthesisable RTL) is nothing to do with software.
> > > > The kernel probably only really needs to know "arm,arm1176".
> > >
> > > OK. So the conclusion is that I should change the cpus node to following:
> > >
> > > cpus {
> > > cpu {
> >
> > cpu at 0 { ?
>
> As the CPU has no MPIDR, and thus doesn't have a reg property, there's no reason
> to have a unit address. Just "cpu" should be fine.
>
> >
> > > compatible = "arm,arm1176jzf-s", "arm,arm1176";
> > > };
> > > };
> > >
> > > Am I right?
> > >
> > I think so :-)
> >
> > - Kukjin
> >
>
> As Dave pointed out, the "jzf-s" portion might be superfluous. It's worth
> having the "arm,arm1176", though.
I think we should always have a fully-qualified part name as the first
compatible entry, following general devicetree policy. It's better to
have this and not need it than to discover later that we want it and
incompatibly backport it in.
Before deciding, do we follow a consistent policy for other CPUs, such
as arm1136?
The issues there are similar: the only software-visible difference between
arm1136j-s and arm1136jf-s should be the absence/presence of VFP, and it
looks like the code in vfpmodule.c should be able to probe it.
Cheers
---Dave
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2013-01-28 13:04 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-13 1:10 [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
2013-01-13 1:10 ` [PATCH 1/6] ARM: common: vic: Parse interrupt and resume masks from device tree Tomasz Figa
2013-01-14 1:08 ` Rob Herring
2013-01-14 10:44 ` Tomasz Figa
2013-01-13 1:10 ` [PATCH 2/6] ARM: common: vic: Fix invalid first IRQ number in OF-based registration Tomasz Figa
2013-01-13 1:10 ` [PATCH 3/6] ARM: s3c64xx: Add support for OF-based VIC initialization Tomasz Figa
2013-01-13 1:10 ` [PATCH 4/6] ARM: s3c64xx: Add board file for boot using Device Tree Tomasz Figa
2013-01-13 1:10 ` [PATCH 5/6] ARM: dts: Add basic dts include files for Samsung S3C64xx SoCs Tomasz Figa
2013-01-14 14:48 ` Mark Rutland
2013-01-14 15:05 ` Lorenzo Pieralisi
2013-01-16 10:59 ` Dave Martin
2013-01-25 19:08 ` Tomasz Figa
2013-01-25 19:15 ` Kukjin Kim
2013-01-28 9:02 ` Mark Rutland
2013-01-28 13:04 ` Dave Martin
2013-01-13 1:10 ` [PATCH 6/6] ARM: dts: Add dts file for S3C6410-based Mini6410 board Tomasz Figa
2013-01-25 19:09 ` [PATCH 0/6] Initial Device Tree support for S3C64xx Tomasz Figa
2013-01-25 19:25 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).