diff mbox

[U-Boot,2/2] mx6: add example DTB for mx6qsabreauto

Message ID 1395046709-5453-2-git-send-email-sbabic@denx.de
State Changes Requested
Delegated to: Stefano Babic
Headers show

Commit Message

Stefano Babic March 17, 2014, 8:58 a.m. UTC
Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
---

 arch/arm/dts/Makefile           |    1 +
 arch/arm/dts/mx6qsabreauto.dts  |   13 +++++++++++++
 include/configs/mx6qsabreauto.h |    3 +++
 3 files changed, 17 insertions(+)
 create mode 100644 arch/arm/dts/mx6qsabreauto.dts

Comments

Fabio Estevam March 17, 2014, 12:54 p.m. UTC | #1
Hi Stefano,

On Mon, Mar 17, 2014 at 5:58 AM, Stefano Babic <sbabic@denx.de> wrote:

> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -2,6 +2,7 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
>         exynos5250-snow.dtb \
>         exynos5250-smdk5250.dtb \
>         exynos5420-smdk5420.dtb
> +dtb-$(CONFIG_MX6) += mx6qsabreauto.dtb

It would be better to use the name as 'imx6q-sabresd.dtb' to make it
consistent with the name we currently use in the kernel.

>  dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
>         tegra20-medcom-wide.dtb \
>         tegra20-paz00.dtb \
> diff --git a/arch/arm/dts/mx6qsabreauto.dts b/arch/arm/dts/mx6qsabreauto.dts
> new file mode 100644
> index 0000000..a3c9c91
> --- /dev/null
> +++ b/arch/arm/dts/mx6qsabreauto.dts
> @@ -0,0 +1,13 @@
> +/*
> +    + * Copyright 2012 Freescale Semiconductor, Inc.
> +    + * Copyright 2011 Linaro Ltd.
> +    + *
> +    + * SPDX-License-Identifier:     GPL-2.0+
> +    + */
> +
> +/dts-v1/;
> +
> +/ {
> +       model = "Freescale i.MX6 Quad SABRE Automotive Board";
> +       compatible = "fsl,imx6q-sabreauto", "fsl,imx6q";
> +};

Don't we need imx6qdl-sabresd.dtsi as well?

imx6q-sabresd.dts only contains the support that is mx6quad specific
(sata, extra IPU, etc).

imx6qdl-sabresd.dtsi contains the common part.

Regards,

Fabio Estevam
Stefano Babic March 17, 2014, 2:22 p.m. UTC | #2
Hi Fabio,

On 17/03/2014 13:54, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Mon, Mar 17, 2014 at 5:58 AM, Stefano Babic <sbabic@denx.de> wrote:
> 
>> --- a/arch/arm/dts/Makefile
>> +++ b/arch/arm/dts/Makefile
>> @@ -2,6 +2,7 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
>>         exynos5250-snow.dtb \
>>         exynos5250-smdk5250.dtb \
>>         exynos5420-smdk5420.dtb
>> +dtb-$(CONFIG_MX6) += mx6qsabreauto.dtb
> 
> It would be better to use the name as 'imx6q-sabresd.dtb' to make it
> consistent with the name we currently use in the kernel.

ok, got it.

> 
>>  dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
>>         tegra20-medcom-wide.dtb \
>>         tegra20-paz00.dtb \
>> diff --git a/arch/arm/dts/mx6qsabreauto.dts b/arch/arm/dts/mx6qsabreauto.dts
>> new file mode 100644
>> index 0000000..a3c9c91
>> --- /dev/null
>> +++ b/arch/arm/dts/mx6qsabreauto.dts
>> @@ -0,0 +1,13 @@
>> +/*
>> +    + * Copyright 2012 Freescale Semiconductor, Inc.
>> +    + * Copyright 2011 Linaro Ltd.
>> +    + *
>> +    + * SPDX-License-Identifier:     GPL-2.0+
>> +    + */
>> +
>> +/dts-v1/;
>> +
>> +/ {
>> +       model = "Freescale i.MX6 Quad SABRE Automotive Board";
>> +       compatible = "fsl,imx6q-sabreauto", "fsl,imx6q";
>> +};
> 
> Don't we need imx6qdl-sabresd.dtsi as well?
> 
> imx6q-sabresd.dts only contains the support that is mx6quad specific
> (sata, extra IPU, etc).
> 
> imx6qdl-sabresd.dtsi contains the common part.

Right, but it is to configure the kernel. What I am trying now is to
start adding U-Boot configuration via dtb for i.MX, not kernel
configuration, similar as we can already see for other SOC (Tegra,
zync,..). I can imagine we will have a .dtsi as well, as in kernel, but
at the moment we are starting with DT in U-Boot. Have I relly understood
your point ?

Best regards,
Stefano Babic
Fabio Estevam March 17, 2014, 2:27 p.m. UTC | #3
Hi Stefano,

On Mon, Mar 17, 2014 at 11:22 AM, Stefano Babic <sbabic@denx.de> wrote:

> Right, but it is to configure the kernel. What I am trying now is to
> start adding U-Boot configuration via dtb for i.MX, not kernel
> configuration, similar as we can already see for other SOC (Tegra,

Yes, I understand your goal.

The device tree is OS agnostic, so we should really try to use the
exact same device tree for configuring kernel or U-boot.

Also, the current dts you submitted is really empty, so I suggest you
to use the same imx6qdl-sabresd.dtsi and imx6q-sabresd.dts that we
have in the kernel.

No need for U-boot use a different dts.

Regards,

Fabio Estevam
Stefano Babic March 17, 2014, 2:40 p.m. UTC | #4
Hi Fabio,

On 17/03/2014 15:27, Fabio Estevam wrote:
> Hi Stefano,
> 
> On Mon, Mar 17, 2014 at 11:22 AM, Stefano Babic <sbabic@denx.de> wrote:
> 
>> Right, but it is to configure the kernel. What I am trying now is to
>> start adding U-Boot configuration via dtb for i.MX, not kernel
>> configuration, similar as we can already see for other SOC (Tegra,
> 
> Yes, I understand your goal.
> 
> The device tree is OS agnostic, 

Right.

> so we should really try to use the
> exact same device tree for configuring kernel or U-boot.
> 
> Also, the current dts you submitted is really empty, so I suggest you
> to use the same imx6qdl-sabresd.dtsi and imx6q-sabresd.dts that we
> have in the kernel.

Understood. As first draft, we can start exactly with the same files. I
do not know now if we will remain in sync with kernel. In the last
U-boot mini summit, we had a discussion on this point, and it is hard to
foresee if U-Boot and kernel will share the same dts or if it will be
required to diverge. But I understand the point, and we can start in
sync, and see later if we really need a different file for U-Boot.

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index e2fcca5..6316a7d 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -2,6 +2,7 @@  dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
 	exynos5250-snow.dtb \
 	exynos5250-smdk5250.dtb \
 	exynos5420-smdk5420.dtb
+dtb-$(CONFIG_MX6) += mx6qsabreauto.dtb
 dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
 	tegra20-medcom-wide.dtb \
 	tegra20-paz00.dtb \
diff --git a/arch/arm/dts/mx6qsabreauto.dts b/arch/arm/dts/mx6qsabreauto.dts
new file mode 100644
index 0000000..a3c9c91
--- /dev/null
+++ b/arch/arm/dts/mx6qsabreauto.dts
@@ -0,0 +1,13 @@ 
+/*
+    + * Copyright 2012 Freescale Semiconductor, Inc.
+    + * Copyright 2011 Linaro Ltd.
+    + *
+    + * SPDX-License-Identifier:     GPL-2.0+
+    + */
+
+/dts-v1/;
+
+/ {
+	model = "Freescale i.MX6 Quad SABRE Automotive Board";
+	compatible = "fsl,imx6q-sabreauto", "fsl,imx6q";
+};
diff --git a/include/configs/mx6qsabreauto.h b/include/configs/mx6qsabreauto.h
index dbbb6f0..8e82487 100644
--- a/include/configs/mx6qsabreauto.h
+++ b/include/configs/mx6qsabreauto.h
@@ -41,4 +41,7 @@ 
 #define CONFIG_SYS_I2C_MXC
 #define CONFIG_SYS_I2C_SPEED		100000
 
+#define CONFIG_OF_SEPARATE
+#define CONFIG_DEFAULT_DEVICE_TREE   mx6qsabreauto
+
 #endif                         /* __MX6QSABREAUTO_CONFIG_H */