Re: [PATCH 4/6] ARM: dts: Add initial device tree support for EXYNOS5410

2013-10-02 Thread Tomasz Figa
Hi Vyacheslav, Tarek,

On Tuesday 01 of October 2013 20:17:05 Vyacheslav Tyrtov wrote:
> From: Tarek Dakhran 
> 
> Add initial device tree nodes for EXYNOS5410 SoC and SMDK5410 board.
[snip]
> +/dts-v1/;
> +#include "exynos5410.dtsi"
> +/ {
> + model = "Samsung SMDK5410 board based on EXYNOS5410";
> + compatible = "samsung,smdk5410", "samsung,exynos5410";
> +
> + memory {
> + reg = <0x4000 0x8000>;
> + };
> +
> + chosen {
> + bootargs = "console=ttySAC2,115200";
> + };
> +
> + fixed-rate-clocks {
> + oscclk {
> + compatible = "samsung,exynos5410-oscclk";
> + clock-frequency = <2400>;
> + };
> + };

As I mentioned in my reply to the patch adding the clock driver, please 
consider using generic fixed rate clock bindings instead of introducing 
new platform specific ones. I know that previous Exynos SoCs do it this 
way, but this is no good.

> +
> + dwmmc0@1220 {

I believe there has been a patch series renaming these dwmmcX nodes to 
follow correct DT conventions and doing some more clean-up. IMHO you 
should consider basing your patch on top of that series.

> + num-slots = <1>;
> + supports-highspeed;
> + broken-cd;
> + fifo-depth = <0x80>;
> + card-detect-delay = <200>;
> + samsung,dw-mshc-ciu-div = <3>;
> + samsung,dw-mshc-sdr-timing = <2 3>;
> + samsung,dw-mshc-ddr-timing = <1 2>;

nit: Please separate subnodes from properties with a blank line.

> + slot@0 {
> + reg = <0>;
> + bus-width = <8>;
> + };
> + };
> +
> + dwmmc1@1221 {
> + status = "disabled";

Oh, the series I mentioned above also corrected the way the status 
property is used, so board level dtses need to enable nodes which they use 
instead of disabling nodes they can't use, which makes much more sense, 
since you don't need to specify nodes in board level dts just to say it's 
disabled.

> + };
> +
> + dwmmc2@1222 {
> + num-slots = <1>;
> + supports-highspeed;
> + fifo-depth = <0x80>;
> + card-detect-delay = <200>;
> + samsung,dw-mshc-ciu-div = <3>;
> + samsung,dw-mshc-sdr-timing = <2 3>;
> + samsung,dw-mshc-ddr-timing = <1 2>;

nit: A blank line would be nice here.

> + slot@0 {
> + reg = <0>;
> + bus-width = <4>;
> + disable-wp;
> + };
> + };
> +
> +};
> diff --git a/arch/arm/boot/dts/exynos5410.dtsi
> b/arch/arm/boot/dts/exynos5410.dtsi new file mode 100644
> index 000..c0ea166
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos5410.dtsi
> @@ -0,0 +1,189 @@
> +/*
> + * SAMSUNG EXYNOS5410 SoC device tree source
> + *
> + * Copyright (c) 2013 Samsung Electronics Co., Ltd.
> + *   http://www.samsung.com
> + *
> + * SAMSUNG EXYNOS5410 SoC device nodes are listed in this file.
> + * EXYNOS5410 based board files can include this file and provide
> + * values for board specfic bindings.
> + *
> + * 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 "exynos5.dtsi"
> +/ {
> + compatible = "samsung,exynos5410";
> +
> + cpus {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + CPU0: cpu@0 {
> + device_type = "cpu";
> + compatible = "arm,cortex-a15";
> + reg = <0>;
> + cci-control-port = <&cci_control2>;
> + clock-frequency = <16>;
> + };

nit: Please keep spacing between nodes.

> + CPU1: cpu@1 {
> + device_type = "cpu";
> + compatible = "arm,cortex-a15";
> + reg = <1>;
> + cci-control-port = <&cci_control2>;
> + clock-frequency = <16>;
> + };
> + CPU2: cpu@2 {
> + device_type = "cpu";
> + compatible = "arm,cortex-a15";
> + reg = <2>;
> + cci-control-port = <&cci_control2>;
> + clock-frequency = <16>;
> + };
> + CPU3: cpu@3 {
> + device_type = "cpu";
> + compatible = "arm,cortex-a15";
> + reg = <3>;
> + cci-control-port = <&cci_control2>;
> + clock-frequency = <16>;
> + };
> + CPU4: cpu@4 {

The @unit-address suffix of node name must be equal to first address entry 
of reg property.

> + devic

[PATCH 4/6] ARM: dts: Add initial device tree support for EXYNOS5410

2013-10-01 Thread Vyacheslav Tyrtov
From: Tarek Dakhran 

Add initial device tree nodes for EXYNOS5410 SoC and SMDK5410 board.

Signed-off-by: Tarek Dakhran 
Signed-off-by: Vyacheslav Tyrtov 
---
 arch/arm/boot/dts/Makefile|   1 +
 arch/arm/boot/dts/exynos5410-smdk5410.dts |  67 +++
 arch/arm/boot/dts/exynos5410.dtsi | 189 ++
 3 files changed, 257 insertions(+)
 create mode 100644 arch/arm/boot/dts/exynos5410-smdk5410.dts
 create mode 100644 arch/arm/boot/dts/exynos5410.dtsi

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index e95af3f..374d446 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -61,6 +61,7 @@ dtb-$(CONFIG_ARCH_EXYNOS) += exynos4210-origen.dtb \
exynos5250-arndale.dtb \
exynos5250-smdk5250.dtb \
exynos5250-snow.dtb \
+   exynos5410-smdk5410.dtb \
exynos5420-smdk5420.dtb \
exynos5440-sd5v1.dtb \
exynos5440-ssdk5440.dtb
diff --git a/arch/arm/boot/dts/exynos5410-smdk5410.dts 
b/arch/arm/boot/dts/exynos5410-smdk5410.dts
new file mode 100644
index 000..7abb2aa
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5410-smdk5410.dts
@@ -0,0 +1,67 @@
+/*
+ * SAMSUNG SMDK5410 board device tree source
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.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.
+*/
+
+/dts-v1/;
+#include "exynos5410.dtsi"
+/ {
+   model = "Samsung SMDK5410 board based on EXYNOS5410";
+   compatible = "samsung,smdk5410", "samsung,exynos5410";
+
+   memory {
+   reg = <0x4000 0x8000>;
+   };
+
+   chosen {
+   bootargs = "console=ttySAC2,115200";
+   };
+
+   fixed-rate-clocks {
+   oscclk {
+   compatible = "samsung,exynos5410-oscclk";
+   clock-frequency = <2400>;
+   };
+   };
+
+   dwmmc0@1220 {
+   num-slots = <1>;
+   supports-highspeed;
+   broken-cd;
+   fifo-depth = <0x80>;
+   card-detect-delay = <200>;
+   samsung,dw-mshc-ciu-div = <3>;
+   samsung,dw-mshc-sdr-timing = <2 3>;
+   samsung,dw-mshc-ddr-timing = <1 2>;
+   slot@0 {
+   reg = <0>;
+   bus-width = <8>;
+   };
+   };
+
+   dwmmc1@1221 {
+   status = "disabled";
+   };
+
+   dwmmc2@1222 {
+   num-slots = <1>;
+   supports-highspeed;
+   fifo-depth = <0x80>;
+   card-detect-delay = <200>;
+   samsung,dw-mshc-ciu-div = <3>;
+   samsung,dw-mshc-sdr-timing = <2 3>;
+   samsung,dw-mshc-ddr-timing = <1 2>;
+   slot@0 {
+   reg = <0>;
+   bus-width = <4>;
+   disable-wp;
+   };
+   };
+
+};
diff --git a/arch/arm/boot/dts/exynos5410.dtsi 
b/arch/arm/boot/dts/exynos5410.dtsi
new file mode 100644
index 000..c0ea166
--- /dev/null
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -0,0 +1,189 @@
+/*
+ * SAMSUNG EXYNOS5410 SoC device tree source
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * SAMSUNG EXYNOS5410 SoC device nodes are listed in this file.
+ * EXYNOS5410 based board files can include this file and provide
+ * values for board specfic bindings.
+ *
+ * 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 "exynos5.dtsi"
+/ {
+   compatible = "samsung,exynos5410";
+
+   cpus {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   CPU0: cpu@0 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a15";
+   reg = <0>;
+   cci-control-port = <&cci_control2>;
+   clock-frequency = <16>;
+   };
+   CPU1: cpu@1 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a15";
+   reg = <1>;
+   cci-control-port = <&cci_control2>;
+   clock-frequency = <16>;
+   };
+   CPU2: cpu@2 {
+   device_type = "cpu";
+   compatible = "arm,cortex-a15";
+   reg = <2>;
+   cci-control-port = <&cci_control2>;
+   clock-frequency = <16>;
+   };
+   CPU3: cpu@3 {
+   device_type = "cpu";
+