Re: [U-Boot] [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC

2016-10-07 Thread Stefano Babic
Hi Patrick,

I see a couple of small issues by merging this:

On 28/09/2016 17:46, linux-kernel-...@beckhoff.com wrote:
> From: Patrick Bruenn 
> 
> Add CX9020 board based on mx53loco.
> Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse
> serial_mxc with DTE and prepare for device tree migration of other
> functions and imx53 devices.
> 
> The CX9020 differs from i.MX53 Quick Start Board by:
> - use uart2 instead of uart1
> - DVI-D connector instead of VGA
> - no audio
> - CCAT FPGA connected to emi
> - enable rtc
> 
> Signed-off-by: Patrick Bruenn 
> 
> ---


CONFIG_CMD_CCAT: you add an own CONFIG_, and all CONFIG_ should be
selected via Kconfig. This generates a build error for your board.

> +++ b/board/beckhoff/mx53cx9020/mx53cx9020.c
> @@ -0,0 +1,564 @@
> +/*
> + * Copyright (C) 2015  Beckhoff Automation GmbH & Co. KG
> + * Patrick Bruenn 
> + *
> + * Based on Freescale's Linux i.MX mx53loco.c file:
> + * Copyright (C) 2011 Freescale Semiconductor, Inc.
> + *
> + * SPDX-License-Identifier:  GPL-2.0+
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 

This is not found and you do not need it (tested with gcc 5.4). If you
rely on toolchain's header, you can drop it. This generates a build
error as well.

Best regards,
Stefano Babic


-- 
=
DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC

2016-09-29 Thread Simon Glass
Hi Patrick,

On 29 September 2016 at 00:24, Patrick Brünn  wrote:
>>From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass
>>Sent: Mittwoch, 28. September 2016 19:52
>>Subject: Re: [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
>>
>>Hi,
> Hi Simon,
> thanks for the fast feedback.
>>
>>On 28 September 2016 at 09:46,   wrote:
>>> From: Patrick Bruenn 
>>>
>>> Add CX9020 board based on mx53loco.
>>> Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse
>>> serial_mxc with DTE and prepare for device tree migration of other
>>> functions and imx53 devices.
>>>
>>> The CX9020 differs from i.MX53 Quick Start Board by:
>>> - use uart2 instead of uart1
>>> - DVI-D connector instead of VGA
>>> - no audio
>>> - CCAT FPGA connected to emi
>>> - enable rtc
>>>
>>> Signed-off-by: Patrick Bruenn 
>>>
>>> ---
>>>
>>>  arch/arm/Kconfig |   7 +
>>>  arch/arm/dts/Makefile|   2 +
>>>  arch/arm/dts/imx53-cx9020.dts|  26 ++
>>>  arch/arm/dts/imx53.dtsi  |  41 ++
>>>  board/beckhoff/mx53cx9020/Kconfig|  15 +
>>>  board/beckhoff/mx53cx9020/MAINTAINERS|   6 +
>>>  board/beckhoff/mx53cx9020/Makefile   |   9 +
>>>  board/beckhoff/mx53cx9020/imximage.cfg   |  82 
>>>  board/beckhoff/mx53cx9020/mx53cx9020.c   | 564
>>+++
>>>  board/beckhoff/mx53cx9020/mx53cx9020_video.c |  83 
>>>  configs/mx53cx9020_defconfig |  19 +
>>>  include/configs/mx53cx9020.h | 211 ++
>>>  12 files changed, 1065 insertions(+)
>>>  create mode 100644 arch/arm/dts/imx53-cx9020.dts
>>>  create mode 100644 arch/arm/dts/imx53.dtsi
>>>  create mode 100644 board/beckhoff/mx53cx9020/Kconfig
>>>  create mode 100644 board/beckhoff/mx53cx9020/MAINTAINERS
>>>  create mode 100644 board/beckhoff/mx53cx9020/Makefile
>>>  create mode 100644 board/beckhoff/mx53cx9020/imximage.cfg
>>>  create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020.c
>>>  create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020_video.c
>>>  create mode 100644 configs/mx53cx9020_defconfig
>>>  create mode 100644 include/configs/mx53cx9020.h
>>
>>There are a few things here that should use driver model:
>>
>>- Video
>>- LED GPIOs
>>- Pinctrl
>>
>>Is that future work?
>>
> Yes. As this is my first patch, I tried to keep it as less invasive as 
> possible.
> Pinctrl would be the first thing on my list, but it looked like I would have
> to add something similar to pinctrl-imx6/7.c for imx5 so I didn't include it
> into this patch.
> Same thing for imx53.dtsi. Right now, it is a stripped down (but diffable)
> version from kernel.org. My plan was to gradually migrate parts of that
> dtsi to u-boot, when I use them.
> Is that compliant with u-boot development style?
> Would you prefer a series with all the imx5 infrastructure patches first
> and the cx9020 board as last patch?

I think it is fine for now, however you want to do it.

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC

2016-09-29 Thread Patrick Brünn
>From: s...@google.com [mailto:s...@google.com] On Behalf Of Simon Glass
>Sent: Mittwoch, 28. September 2016 19:52
>Subject: Re: [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC
>
>Hi,
Hi Simon,
thanks for the fast feedback.
>
>On 28 September 2016 at 09:46,   wrote:
>> From: Patrick Bruenn 
>>
>> Add CX9020 board based on mx53loco.
>> Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse
>> serial_mxc with DTE and prepare for device tree migration of other
>> functions and imx53 devices.
>>
>> The CX9020 differs from i.MX53 Quick Start Board by:
>> - use uart2 instead of uart1
>> - DVI-D connector instead of VGA
>> - no audio
>> - CCAT FPGA connected to emi
>> - enable rtc
>>
>> Signed-off-by: Patrick Bruenn 
>>
>> ---
>>
>>  arch/arm/Kconfig |   7 +
>>  arch/arm/dts/Makefile|   2 +
>>  arch/arm/dts/imx53-cx9020.dts|  26 ++
>>  arch/arm/dts/imx53.dtsi  |  41 ++
>>  board/beckhoff/mx53cx9020/Kconfig|  15 +
>>  board/beckhoff/mx53cx9020/MAINTAINERS|   6 +
>>  board/beckhoff/mx53cx9020/Makefile   |   9 +
>>  board/beckhoff/mx53cx9020/imximage.cfg   |  82 
>>  board/beckhoff/mx53cx9020/mx53cx9020.c   | 564
>+++
>>  board/beckhoff/mx53cx9020/mx53cx9020_video.c |  83 
>>  configs/mx53cx9020_defconfig |  19 +
>>  include/configs/mx53cx9020.h | 211 ++
>>  12 files changed, 1065 insertions(+)
>>  create mode 100644 arch/arm/dts/imx53-cx9020.dts
>>  create mode 100644 arch/arm/dts/imx53.dtsi
>>  create mode 100644 board/beckhoff/mx53cx9020/Kconfig
>>  create mode 100644 board/beckhoff/mx53cx9020/MAINTAINERS
>>  create mode 100644 board/beckhoff/mx53cx9020/Makefile
>>  create mode 100644 board/beckhoff/mx53cx9020/imximage.cfg
>>  create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020.c
>>  create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020_video.c
>>  create mode 100644 configs/mx53cx9020_defconfig
>>  create mode 100644 include/configs/mx53cx9020.h
>
>There are a few things here that should use driver model:
>
>- Video
>- LED GPIOs
>- Pinctrl
>
>Is that future work?
>
Yes. As this is my first patch, I tried to keep it as less invasive as possible.
Pinctrl would be the first thing on my list, but it looked like I would have
to add something similar to pinctrl-imx6/7.c for imx5 so I didn't include it
into this patch.
Same thing for imx53.dtsi. Right now, it is a stripped down (but diffable)
version from kernel.org. My plan was to gradually migrate parts of that
dtsi to u-boot, when I use them.
Is that compliant with u-boot development style?
Would you prefer a series with all the imx5 infrastructure patches first
and the cx9020 board as last patch?

Regards,
Patrick
Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC

2016-09-28 Thread Simon Glass
Hi,

On 28 September 2016 at 09:46,   wrote:
> From: Patrick Bruenn 
>
> Add CX9020 board based on mx53loco.
> Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse
> serial_mxc with DTE and prepare for device tree migration of other
> functions and imx53 devices.
>
> The CX9020 differs from i.MX53 Quick Start Board by:
> - use uart2 instead of uart1
> - DVI-D connector instead of VGA
> - no audio
> - CCAT FPGA connected to emi
> - enable rtc
>
> Signed-off-by: Patrick Bruenn 
>
> ---
>
>  arch/arm/Kconfig |   7 +
>  arch/arm/dts/Makefile|   2 +
>  arch/arm/dts/imx53-cx9020.dts|  26 ++
>  arch/arm/dts/imx53.dtsi  |  41 ++
>  board/beckhoff/mx53cx9020/Kconfig|  15 +
>  board/beckhoff/mx53cx9020/MAINTAINERS|   6 +
>  board/beckhoff/mx53cx9020/Makefile   |   9 +
>  board/beckhoff/mx53cx9020/imximage.cfg   |  82 
>  board/beckhoff/mx53cx9020/mx53cx9020.c   | 564 
> +++
>  board/beckhoff/mx53cx9020/mx53cx9020_video.c |  83 
>  configs/mx53cx9020_defconfig |  19 +
>  include/configs/mx53cx9020.h | 211 ++
>  12 files changed, 1065 insertions(+)
>  create mode 100644 arch/arm/dts/imx53-cx9020.dts
>  create mode 100644 arch/arm/dts/imx53.dtsi
>  create mode 100644 board/beckhoff/mx53cx9020/Kconfig
>  create mode 100644 board/beckhoff/mx53cx9020/MAINTAINERS
>  create mode 100644 board/beckhoff/mx53cx9020/Makefile
>  create mode 100644 board/beckhoff/mx53cx9020/imximage.cfg
>  create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020.c
>  create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020_video.c
>  create mode 100644 configs/mx53cx9020_defconfig
>  create mode 100644 include/configs/mx53cx9020.h

There are a few things here that should use driver model:

- Video
- LED GPIOs
- Pinctrl

Is that future work?

Regards,
Simon
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] arm: imx: add i.MX53 Beckhoff CX9020 Embedded PC

2016-09-28 Thread linux-kernel-dev
From: Patrick Bruenn 

Add CX9020 board based on mx53loco.
Add simplified imx53 base device tree from kernel v4.8-rc8, to reuse
serial_mxc with DTE and prepare for device tree migration of other
functions and imx53 devices.

The CX9020 differs from i.MX53 Quick Start Board by:
- use uart2 instead of uart1
- DVI-D connector instead of VGA
- no audio
- CCAT FPGA connected to emi
- enable rtc

Signed-off-by: Patrick Bruenn 

---

 arch/arm/Kconfig |   7 +
 arch/arm/dts/Makefile|   2 +
 arch/arm/dts/imx53-cx9020.dts|  26 ++
 arch/arm/dts/imx53.dtsi  |  41 ++
 board/beckhoff/mx53cx9020/Kconfig|  15 +
 board/beckhoff/mx53cx9020/MAINTAINERS|   6 +
 board/beckhoff/mx53cx9020/Makefile   |   9 +
 board/beckhoff/mx53cx9020/imximage.cfg   |  82 
 board/beckhoff/mx53cx9020/mx53cx9020.c   | 564 +++
 board/beckhoff/mx53cx9020/mx53cx9020_video.c |  83 
 configs/mx53cx9020_defconfig |  19 +
 include/configs/mx53cx9020.h | 211 ++
 12 files changed, 1065 insertions(+)
 create mode 100644 arch/arm/dts/imx53-cx9020.dts
 create mode 100644 arch/arm/dts/imx53.dtsi
 create mode 100644 board/beckhoff/mx53cx9020/Kconfig
 create mode 100644 board/beckhoff/mx53cx9020/MAINTAINERS
 create mode 100644 board/beckhoff/mx53cx9020/Makefile
 create mode 100644 board/beckhoff/mx53cx9020/imximage.cfg
 create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020.c
 create mode 100644 board/beckhoff/mx53cx9020/mx53cx9020_video.c
 create mode 100644 configs/mx53cx9020_defconfig
 create mode 100644 include/configs/mx53cx9020.h

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index c871eaf..82afd55 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -573,6 +573,12 @@ config TARGET_MX53LOCO
bool "Support mx53loco"
select CPU_V7
 
+config TARGET_MX53CX9020
+   bool "Support mx53cx9020"
+   select CPU_V7
+   select DM
+   select DM_SERIAL
+
 config TARGET_MX53SMD
bool "Support mx53smd"
select CPU_V7
@@ -994,6 +1000,7 @@ source "board/freescale/mx51evk/Kconfig"
 source "board/freescale/mx53ard/Kconfig"
 source "board/freescale/mx53evk/Kconfig"
 source "board/freescale/mx53loco/Kconfig"
+source "board/beckhoff/mx53cx9020/Kconfig"
 source "board/freescale/mx53smd/Kconfig"
 source "board/freescale/s32v234evb/Kconfig"
 source "board/freescale/vf610twr/Kconfig"
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 74d6ed2..5a926cb 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -275,6 +275,8 @@ dtb-$(CONFIG_MX7) += imx7-colibri.dtb
 
 dtb-$(CONFIG_MX6) += imx6ull-14x14-evk.dtb
 
+dtb-$(CONFIG_TARGET_MX53CX9020) += imx53-cx9020.dtb
+
 dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
k2l-evm.dtb \
k2e-evm.dtb \
diff --git a/arch/arm/dts/imx53-cx9020.dts b/arch/arm/dts/imx53-cx9020.dts
new file mode 100644
index 000..4fc6214
--- /dev/null
+++ b/arch/arm/dts/imx53-cx9020.dts
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2016 Beckhoff Automation
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * SPDX-License-Identifier: GPL-2.0+ or X11
+ */
+
+/dts-v1/;
+#include "imx53.dtsi"
+
+/ {
+   model = "Beckhoff CX9020-0100 i.MX53";
+   compatible = "fsl,imx53-qsb", "fsl,imx53";
+
+   chosen {
+   stdout-path = 
+   };
+};
+
+ {
+   pinctrl-names = "default";
+   uart-has-rtscts;
+   fsl,dte-mode;
+   status = "okay";
+};
diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi
new file mode 100644
index 000..3da0765
--- /dev/null
+++ b/arch/arm/dts/imx53.dtsi
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016 Beckhoff Automation
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ * Copyright 2011 Linaro Ltd.
+ *
+ * The code contained herein is licensed under the GNU General Public
+ * License. You may obtain a copy of the GNU General Public License
+ * Version 2 or later at the following locations:
+ *
+ * http://www.opensource.org/licenses/gpl-license.html
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+
+#include "skeleton.dtsi"
+
+/ {
+   aliases {
+   serial1 = 
+   };
+
+   soc {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "simple-bus";
+   ranges;
+
+   aips@5000 { /* AIPS1 */
+   compatible = "fsl,aips-bus", "simple-bus";
+   #address-cells = <1>;
+   #size-cells = <1>;
+   reg = <0x5000 0x1000>;
+   ranges;
+
+   uart2: serial@53fc {
+   compatible = "fsl,imx7d-uart", 
"fsl,imx53-uart", "fsl,imx21-uart";
+   reg = <0x53fc 0x4000>;
+