* [PATCH 0/3] Support for Voipac X53-DMM-668 module and Voipac Baseboard @ 2013-11-05 14:42 Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy ` (2 more replies) 0 siblings, 3 replies; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-05 14:42 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa The first patch modifies the general imx53.dtsi file. The reason is to make it possible to add Devicetree definition for the board (later in this patch) as a copy from the Linux kernel -- such a DTS can be used also to boot Linux kernel. I am not sure if this should be in a separate patch or if this file (imx53.dtsi) is being regularly mirrored from the Linux kernel. The second patch modifies the IMX FEC driver to make it possible to parse the gpio reset pin from the Devicetree and perform the reset in the driver (thus saving unnecessary code duplication in different board.c files). The added code is very similar to one in Linux kernel driver. The 3rd patch adds the Devicetree definition for the Voipac x53-dmm-668 module (equipped with i.mx53 CPU) and Voipac Baseboard. More info about the module might be found at: http://www.voipac.com/#X53-DMM-668 The DTS files have already been accepted to Linux kernel (waiting in linux-next). The rest is the necessary hardware initialization etc. The devices successfully initialized (and tested) are uart0 and Ethernet. Rostislav Lisovy (3): ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree ARM: i.mx53: Support for Voipac board. Device definition is read from Devicetree arch/arm/boards/Makefile | 1 + arch/arm/boards/freescale-mx53-vmx53/Makefile | 3 + arch/arm/boards/freescale-mx53-vmx53/board.c | 42 +++++ arch/arm/boards/freescale-mx53-vmx53/env/config | 46 +++++ .../arm/boards/freescale-mx53-vmx53/flash_header.c | 103 ++++++++++ arch/arm/boards/freescale-mx53-vmx53/lowlevel.c | 9 + arch/arm/dts/Makefile | 4 +- arch/arm/dts/imx53-voipac-bsb.dts | 135 ++++++++++++++ arch/arm/dts/imx53-voipac-dmm-668.dtsi | 196 ++++++++++++++++++++ arch/arm/dts/imx53.dtsi | 15 ++ arch/arm/mach-imx/Kconfig | 9 + drivers/net/fec_imx.c | 21 +++ 12 files changed, 583 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boards/freescale-mx53-vmx53/Makefile create mode 100644 arch/arm/boards/freescale-mx53-vmx53/board.c create mode 100644 arch/arm/boards/freescale-mx53-vmx53/env/config create mode 100644 arch/arm/boards/freescale-mx53-vmx53/flash_header.c create mode 100644 arch/arm/boards/freescale-mx53-vmx53/lowlevel.c create mode 100644 arch/arm/dts/imx53-voipac-bsb.dts create mode 100644 arch/arm/dts/imx53-voipac-dmm-668.dtsi -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux 2013-11-05 14:42 [PATCH 0/3] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy @ 2013-11-05 14:42 ` Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read " Rostislav Lisovy 2 siblings, 0 replies; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-05 14:42 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi index 5c8608b..b355111 100644 --- a/arch/arm/dts/imx53.dtsi +++ b/arch/arm/dts/imx53.dtsi @@ -269,6 +269,14 @@ #interrupt-cells = <2>; }; + kpp: kpp@53f94000 { + compatible = "fsl,imx53-kpp", "fsl,imx21-kpp"; + reg = <0x53f94000 0x4000>; + interrupts = <60>; + clocks = <&clks 0>; + status = "disabled"; + }; + wdog1: wdog@53f98000 { compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; reg = <0x53f98000 0x4000>; @@ -587,6 +595,13 @@ MX53_PAD_GPIO_5__I2C3_SCL 0xc0000000 >; }; + + pinctrl_i2c3_2: i2c3grp-2 { + fsl,pins = < + MX53_PAD_GPIO_3__I2C3_SCL 0xc0000000 + MX53_PAD_GPIO_6__I2C3_SDA 0xc0000000 + >; + }; }; ipu_disp0 { -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree 2013-11-05 14:42 [PATCH 0/3] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy @ 2013-11-05 14:42 ` Rostislav Lisovy 2013-11-05 16:15 ` Jean-Christophe PLAGNIOL-VILLARD 2013-11-05 14:42 ` [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read " Rostislav Lisovy 2 siblings, 1 reply; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-05 14:42 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c index 2f31352..6f883bf 100644 --- a/drivers/net/fec_imx.c +++ b/drivers/net/fec_imx.c @@ -27,6 +27,8 @@ #include <linux/clk.h> #include <linux/err.h> #include <of_net.h> +#include <of_gpio.h> +#include <gpio.h> #include <asm/mmu.h> @@ -643,6 +645,9 @@ static int fec_probe(struct device_d *dev) void *base; int ret; enum fec_type type; +#ifdef CONFIG_OFDEVICE + int phy_reset; +#endif ret = dev_get_drvdata(dev, (unsigned long *)&type); if (ret) @@ -671,6 +676,22 @@ static int fec_probe(struct device_d *dev) fec->regs = dev_request_mem_region(dev, 0); +#ifdef CONFIG_OFDEVICE + phy_reset = of_get_named_gpio(dev->device_node, "phy-reset-gpios", 0); + if (!gpio_is_valid(phy_reset)) + goto err_free; + + ret = gpio_request(phy_reset, "phy-reset"); + if (ret) { + pr_err("Can not request gpio %d (phy-reset): %d\n", phy_reset, ret); + goto err_free; + } + + gpio_direction_output(phy_reset, 0); + udelay(10); + gpio_set_value(phy_reset, 1); +#endif + /* Reset chip. */ writel(FEC_ECNTRL_RESET, fec->regs + FEC_ECNTRL); while(readl(fec->regs + FEC_ECNTRL) & 1) { -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree 2013-11-05 14:42 ` [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree Rostislav Lisovy @ 2013-11-05 16:15 ` Jean-Christophe PLAGNIOL-VILLARD 2013-11-05 19:11 ` Pavel Pisa 0 siblings, 1 reply; 13+ messages in thread From: Jean-Christophe PLAGNIOL-VILLARD @ 2013-11-05 16:15 UTC (permalink / raw) To: Rostislav Lisovy; +Cc: barebox, pisa On 15:42 Tue 05 Nov , Rostislav Lisovy wrote: > Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> > > diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c > index 2f31352..6f883bf 100644 > --- a/drivers/net/fec_imx.c > +++ b/drivers/net/fec_imx.c > @@ -27,6 +27,8 @@ > #include <linux/clk.h> > #include <linux/err.h> > #include <of_net.h> > +#include <of_gpio.h> > +#include <gpio.h> > > #include <asm/mmu.h> > > @@ -643,6 +645,9 @@ static int fec_probe(struct device_d *dev) > void *base; > int ret; > enum fec_type type; > +#ifdef CONFIG_OFDEVICE > + int phy_reset; > +#endif > > ret = dev_get_drvdata(dev, (unsigned long *)&type); > if (ret) > @@ -671,6 +676,22 @@ static int fec_probe(struct device_d *dev) > > fec->regs = dev_request_mem_region(dev, 0); > > +#ifdef CONFIG_OFDEVICE use if (IS_ENABLED(CONFIG_OFDEVICE)) so we can improve the code coverage > + phy_reset = of_get_named_gpio(dev->device_node, "phy-reset-gpios", 0); > + if (!gpio_is_valid(phy_reset)) > + goto err_free; > + > + ret = gpio_request(phy_reset, "phy-reset"); > + if (ret) { > + pr_err("Can not request gpio %d (phy-reset): %d\n", phy_reset, ret); > + goto err_free; > + } > + > + gpio_direction_output(phy_reset, 0); you need to check the return too > + udelay(10); > + gpio_set_value(phy_reset, 1); > +#endif > + > /* Reset chip. */ > writel(FEC_ECNTRL_RESET, fec->regs + FEC_ECNTRL); > while(readl(fec->regs + FEC_ECNTRL) & 1) { > -- > 1.7.10.4 > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree 2013-11-05 16:15 ` Jean-Christophe PLAGNIOL-VILLARD @ 2013-11-05 19:11 ` Pavel Pisa 2013-11-06 8:39 ` Sascha Hauer 0 siblings, 1 reply; 13+ messages in thread From: Pavel Pisa @ 2013-11-05 19:11 UTC (permalink / raw) To: Jean-Christophe PLAGNIOL-VILLARD, Rostislav Lisovy; +Cc: barebox Hello Jean-Christophe and Rosta, On Tuesday 05 of November 2013 17:15:16 Jean-Christophe PLAGNIOL-VILLARD wrote: > On 15:42 Tue 05 Nov , Rostislav Lisovy wrote: > > Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> > > > > diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c > > index 2f31352..6f883bf 100644 > > --- a/drivers/net/fec_imx.c > > +++ b/drivers/net/fec_imx.c > > @@ -671,6 +676,22 @@ static int fec_probe(struct device_d *dev) > > > > fec->regs = dev_request_mem_region(dev, 0); > > > > +#ifdef CONFIG_OFDEVICE > > use if (IS_ENABLED(CONFIG_OFDEVICE)) > > so we can improve the code coverage > > > + phy_reset = of_get_named_gpio(dev->device_node, "phy-reset-gpios", 0); I have question if the missing definition of reset pin should/must lead to whole ethernet interface removal/initialization abort. I think, that there can be design where PHY reset is not controlled by MCU pin (it is usually possible even reset device through MDIO) and then it would be better to check if "phy-reset-gpios" is present and if not then skip whole attempt to manipulate GPIO. On the other hand if "phy-reset-gpios", it is required to configure it, because default pin state can/should lead to PHY reset. I.e. if (IS_ENABLED(CONFIG_OFDEVICE)) phy_reset = of_get_named_gpio(dev->device_node, "phy-reset-gpios", 0); if(phy_reset < 0) { print info ("\"phy-reset-gpios\" is not used for i.MX fec, skipping forced reset\n") } else { > > + if (!gpio_is_valid(phy_reset)) > > + goto err_free; > > + > > + ret = gpio_request(phy_reset, "phy-reset"); > > + if (ret) { > > + pr_err("Can not request gpio %d (phy-reset): %d\n", phy_reset, ret); > > + goto err_free; > > + } > > + > > + gpio_direction_output(phy_reset, 0); > > you need to check the return too > > > + udelay(10); > > + gpio_set_value(phy_reset, 1); } } > > + > > /* Reset chip. */ > > writel(FEC_ECNTRL_RESET, fec->regs + FEC_ECNTRL); > > while(readl(fec->regs + FEC_ECNTRL) & 1) { Best wishes, Pavel _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree 2013-11-05 19:11 ` Pavel Pisa @ 2013-11-06 8:39 ` Sascha Hauer 0 siblings, 0 replies; 13+ messages in thread From: Sascha Hauer @ 2013-11-06 8:39 UTC (permalink / raw) To: Pavel Pisa; +Cc: barebox, Rostislav Lisovy Hi Pavel, On Tue, Nov 05, 2013 at 08:11:05PM +0100, Pavel Pisa wrote: > Hello Jean-Christophe and Rosta, > > On Tuesday 05 of November 2013 17:15:16 Jean-Christophe PLAGNIOL-VILLARD > wrote: > > On 15:42 Tue 05 Nov , Rostislav Lisovy wrote: > > > Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> > > > > > > diff --git a/drivers/net/fec_imx.c b/drivers/net/fec_imx.c > > > index 2f31352..6f883bf 100644 > > > --- a/drivers/net/fec_imx.c > > > +++ b/drivers/net/fec_imx.c > > > @@ -671,6 +676,22 @@ static int fec_probe(struct device_d *dev) > > > > > > fec->regs = dev_request_mem_region(dev, 0); > > > > > > +#ifdef CONFIG_OFDEVICE > > > > use if (IS_ENABLED(CONFIG_OFDEVICE)) > > > > so we can improve the code coverage > > > > > + phy_reset = of_get_named_gpio(dev->device_node, "phy-reset-gpios", 0); > > I have question if the missing definition of reset pin should/must lead > to whole ethernet interface removal/initialization abort. Thanks for spotting. The gpio pin should indeed be optional. The driver should only fail if the gpio is specified, but not working. It should not fail if there's no gpio specified at all. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read from Devicetree 2013-11-05 14:42 [PATCH 0/3] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree Rostislav Lisovy @ 2013-11-05 14:42 ` Rostislav Lisovy 2013-11-08 8:42 ` Sascha Hauer 2 siblings, 1 reply; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-05 14:42 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> create mode 100644 arch/arm/boards/freescale-mx53-vmx53/Makefile create mode 100644 arch/arm/boards/freescale-mx53-vmx53/board.c create mode 100644 arch/arm/boards/freescale-mx53-vmx53/env/config create mode 100644 arch/arm/boards/freescale-mx53-vmx53/flash_header.c create mode 100644 arch/arm/boards/freescale-mx53-vmx53/lowlevel.c create mode 100644 arch/arm/dts/imx53-voipac-bsb.dts create mode 100644 arch/arm/dts/imx53-voipac-dmm-668.dtsi diff --git a/arch/arm/boards/Makefile b/arch/arm/boards/Makefile index c273f0c..3953c55 100644 --- a/arch/arm/boards/Makefile +++ b/arch/arm/boards/Makefile @@ -36,6 +36,7 @@ obj-$(CONFIG_MACH_FREESCALE_MX35_3STACK) += freescale-mx35-3-stack/ obj-$(CONFIG_MACH_FREESCALE_MX51_PDK) += freescale-mx51-pdk/ obj-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += freescale-mx53-loco/ obj-$(CONFIG_MACH_FREESCALE_MX53_SMD) += freescale-mx53-smd/ +obj-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += freescale-mx53-vmx53/ obj-$(CONFIG_MACH_GE863) += telit-evk-pro3/ obj-$(CONFIG_MACH_GK802) += gk802/ obj-$(CONFIG_MACH_GUF_CUPID) += guf-cupid/ diff --git a/arch/arm/boards/freescale-mx53-vmx53/Makefile b/arch/arm/boards/freescale-mx53-vmx53/Makefile new file mode 100644 index 0000000..d44f697 --- /dev/null +++ b/arch/arm/boards/freescale-mx53-vmx53/Makefile @@ -0,0 +1,3 @@ +obj-y += board.o +lwl-y += flash_header.o +lwl-y += lowlevel.o diff --git a/arch/arm/boards/freescale-mx53-vmx53/board.c b/arch/arm/boards/freescale-mx53-vmx53/board.c new file mode 100644 index 0000000..4270832 --- /dev/null +++ b/arch/arm/boards/freescale-mx53-vmx53/board.c @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2013 Rostislav Lisovy <lisovy@gmail.com>, PiKRON s.r.o. + * + * Board specific file for Voipac X53-DMM-668 module equipped + * with i.MX53 CPU + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <common.h> +#include <init.h> + +#include <generated/mach-types.h> +#include <mach/imx5.h> +#include <asm/armlinux.h> + + +static int vmx53_console_init(void) +{ + if (!of_machine_is_compatible("voipac,imx53-dmm-668")) + return 0; + + imx53_init_lowlevel(800); + + armlinux_set_bootparams((void *)0x70000100); + armlinux_set_architecture(MACH_TYPE_VMX53); + + barebox_set_model("Voipac VMX53"); + barebox_set_hostname("vmx53"); + + return 0; +} +postcore_initcall(vmx53_console_init); diff --git a/arch/arm/boards/freescale-mx53-vmx53/env/config b/arch/arm/boards/freescale-mx53-vmx53/env/config new file mode 100644 index 0000000..3d90172 --- /dev/null +++ b/arch/arm/boards/freescale-mx53-vmx53/env/config @@ -0,0 +1,46 @@ +#!/bin/sh + +global.hostname=vmx53 +eth0.serverip= +user= + +# use 'dhcp' to do dhcp in barebox and in kernel +# use 'none' if you want to skip kernel ip autoconfiguration +ip=dhcp + +# or set your networking parameters here +#eth0.ipaddr=a.b.c.d +#eth0.netmask=a.b.c.d +#eth0.gateway=a.b.c.d +#eth0.serverip=a.b.c.d + +# can be either 'nfs', 'tftp', 'nor' or 'nand' +kernel_loc=tftp +# can be either 'net', 'nor', 'nand' or 'initrd' +rootfs_loc=net + +# can be either 'jffs2' or 'ubifs' +rootfs_type=ubifs +rootfsimage=root-${global.hostname}.$rootfs_type + +kernelimage=zImage-${global.hostname} +#kernelimage=uImage-${global.hostname} +#kernelimage=Image-${global.hostname} +#kernelimage=Image-${global.hostname}.lzo + +if [ -n $user ]; then + kernelimage="$user"-"$kernelimage" + nfsroot="$eth0.serverip:/home/$user/nfsroot/${global.hostname}" + rootfsimage="$user"-"$rootfsimage" +else + nfsroot="$eth0.serverip:/path/to/nfs/root" +fi + +autoboot_timeout=3 + +bootargs="console=ttymxc0,115200" + +nand_parts="512k(barebox)ro,512k(bareboxenv),4M(kernel),-(rootfs)" + +# set a fancy prompt (if support is compiled in) +PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m " diff --git a/arch/arm/boards/freescale-mx53-vmx53/flash_header.c b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c new file mode 100644 index 0000000..a6864a6 --- /dev/null +++ b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2011 Marc Kleine-Budde <mkl@pengutronix.de> + * Copyright (C) 2013 Rostislav Lisovy <lisovy@gmail.com>, PiKRON s.r.o. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#include <common.h> +#include <asm/byteorder.h> +#include <mach/imx-flash-header.h> +#include <asm/barebox-arm-head.h> + +void __naked __flash_header_start go(void) +{ + barebox_arm_imx_fcb_head(); +} + +struct imx_dcd_v2_entry __dcd_entry_section dcd_entry[] = { + { .addr = cpu_to_be32(0x53fa8554), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8558), .val = cpu_to_be32(0x00300040), }, + { .addr = cpu_to_be32(0x53fa8560), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8564), .val = cpu_to_be32(0x00300040), }, + { .addr = cpu_to_be32(0x53fa8568), .val = cpu_to_be32(0x00300040), }, + { .addr = cpu_to_be32(0x53fa8570), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8574), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8578), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa857c), .val = cpu_to_be32(0x00300040), }, + { .addr = cpu_to_be32(0x53fa8580), .val = cpu_to_be32(0x00300040), }, + { .addr = cpu_to_be32(0x53fa8584), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8588), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8590), .val = cpu_to_be32(0x00300040), }, + { .addr = cpu_to_be32(0x53fa8594), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa86f0), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa86f4), .val = cpu_to_be32(0x00000000), }, + { .addr = cpu_to_be32(0x53fa86fc), .val = cpu_to_be32(0x00000000), }, + { .addr = cpu_to_be32(0x53fa8714), .val = cpu_to_be32(0x00000000), }, + { .addr = cpu_to_be32(0x53fa8718), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa871c), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8720), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa8724), .val = cpu_to_be32(0x04000000), }, + { .addr = cpu_to_be32(0x53fa8728), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x53fa872c), .val = cpu_to_be32(0x00300000), }, + { .addr = cpu_to_be32(0x63fd9088), .val = cpu_to_be32(0x35343535), }, + { .addr = cpu_to_be32(0x63fd9090), .val = cpu_to_be32(0x4d444c44), }, + { .addr = cpu_to_be32(0x63fd907c), .val = cpu_to_be32(0x01370138), }, + { .addr = cpu_to_be32(0x63fd9080), .val = cpu_to_be32(0x013b013c), }, + { .addr = cpu_to_be32(0x63fd9018), .val = cpu_to_be32(0x00011740), }, + { .addr = cpu_to_be32(0x63fd9000), .val = cpu_to_be32(0xc4190000), }, + { .addr = cpu_to_be32(0x63fd900c), .val = cpu_to_be32(0x9f5152e3), }, + { .addr = cpu_to_be32(0x63fd9010), .val = cpu_to_be32(0xb68e8a63), }, + { .addr = cpu_to_be32(0x63fd9014), .val = cpu_to_be32(0x01ff00db), }, + { .addr = cpu_to_be32(0x63fd902c), .val = cpu_to_be32(0x000026d2), }, + { .addr = cpu_to_be32(0x63fd9030), .val = cpu_to_be32(0x009f0e21), }, + { .addr = cpu_to_be32(0x63fd9008), .val = cpu_to_be32(0x12273030), }, + { .addr = cpu_to_be32(0x63fd9004), .val = cpu_to_be32(0x0002002d), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008032), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00008033), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00028031), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x052080b0), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008040), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x0000803a), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x0000803b), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00028039), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x05208138), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x04008048), }, + { .addr = cpu_to_be32(0x63fd9020), .val = cpu_to_be32(0x00005800), }, + { .addr = cpu_to_be32(0x63fd9040), .val = cpu_to_be32(0x04b80003), }, + { .addr = cpu_to_be32(0x63fd9058), .val = cpu_to_be32(0x00022227), }, + { .addr = cpu_to_be32(0x63fd901c), .val = cpu_to_be32(0x00000000), }, +}; + +#define APP_DEST 0x70000000 + +struct imx_flash_header_v2 __flash_header_section flash_header = { + .header.tag = IVT_HEADER_TAG, + .header.length = cpu_to_be16(32), + .header.version = IVT_VERSION, + + .entry = APP_DEST + 0x1000, + .dcd_ptr = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, dcd), + .boot_data_ptr = APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, boot_data), + .self = APP_DEST + 0x400, + + .boot_data.start = APP_DEST, + .boot_data.size = DCD_BAREBOX_SIZE, + + .dcd.header.tag = DCD_HEADER_TAG, + .dcd.header.length = cpu_to_be16(sizeof(struct imx_dcd) + sizeof(dcd_entry)), + .dcd.header.version = DCD_VERSION, + + .dcd.command.tag = DCD_COMMAND_WRITE_TAG, + .dcd.command.length = cpu_to_be16(sizeof(struct imx_dcd_command) + sizeof(dcd_entry)), + .dcd.command.param = DCD_COMMAND_WRITE_PARAM, +}; diff --git a/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c new file mode 100644 index 0000000..60c28f7 --- /dev/null +++ b/arch/arm/boards/freescale-mx53-vmx53/lowlevel.c @@ -0,0 +1,9 @@ +#include <common.h> +#include <mach/esdctl.h> +#include <asm/barebox-arm-head.h> + +void __naked barebox_arm_reset_vector(void) +{ + arm_cpu_lowlevel_init(); + imx53_barebox_entry(0); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 511adf4..f90aa51 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -1,6 +1,7 @@ dtb-$(CONFIG_ARCH_IMX51) += imx51-babbage.dtb \ imx51-genesi-efika-sb.dtb -dtb-$(CONFIG_ARCH_IMX53) += imx53-qsb.dtb +dtb-$(CONFIG_ARCH_IMX53) += imx53-qsb.dtb \ + imx53-voipac-bsb.dtb dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \ imx6dl-dfi-fs700-m60-6s.dtb \ imx6q-dfi-fs700-m60-6q.dtb \ @@ -23,6 +24,7 @@ obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o pbl-$(CONFIG_MACH_EFIKA_MX_SMARTBOOK) += imx51-genesi-efika-sb.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX51_PDK) += imx51-babbage.dtb.o pbl-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += imx53-qsb.dtb.o +pbl-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += imx53-voipac-bsb.dtb.o pbl-$(CONFIG_MACH_DFI_FS700_M60) += imx6q-dfi-fs700-m60-6q.dtb.o imx6dl-dfi-fs700-m60-6s.dtb.o pbl-$(CONFIG_MACH_PHYTEC_PFLA02) += imx6q-phytec-pbab01.dtb.o pbl-$(CONFIG_MACH_REALQ7) += imx6q-dmo-realq7.dtb.o diff --git a/arch/arm/dts/imx53-voipac-bsb.dts b/arch/arm/dts/imx53-voipac-bsb.dts new file mode 100644 index 0000000..5c88c0e --- /dev/null +++ b/arch/arm/dts/imx53-voipac-bsb.dts @@ -0,0 +1,135 @@ +/* + * Copyright 2013 Rostislav Lisovy <lisovy@gmail.com>, PiKRON s.r.o. + * + * 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 + */ + +/dts-v1/; +#include "imx53-voipac-dmm-668.dtsi" + +/ { + sound { + compatible = "fsl,imx53-voipac-sgtl5000", + "fsl,imx-audio-sgtl5000"; + model = "imx53-voipac-sgtl5000"; + ssi-controller = <&ssi2>; + audio-codec = <&sgtl5000>; + audio-routing = + "Headphone Jack", "HP_OUT"; + mux-int-port = <2>; + mux-ext-port = <5>; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pin_gpio>; + + led1 { + label = "led-red"; + gpios = <&gpio3 29 0>; + default-state = "off"; + }; + + led2 { + label = "led-orange"; + gpios = <&gpio2 31 0>; + default-state = "off"; + }; + }; +}; + +&iomuxc { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hog>; + + hog { + pinctrl_hog: hoggrp { + fsl,pins = < + /* SD2_CD */ + MX53_PAD_EIM_D25__GPIO3_25 0x80000000 + /* SD2_WP */ + MX53_PAD_EIM_A19__GPIO2_19 0x80000000 + >; + }; + + led_pin_gpio: led_gpio { + fsl,pins = < + MX53_PAD_EIM_D29__GPIO3_29 0x80000000 + MX53_PAD_EIM_EB3__GPIO2_31 0x80000000 + >; + }; + }; + + /* Keyboard controller */ + kpp { + pinctrl_kpp_1: kppgrp-1 { + fsl,pins = < + MX53_PAD_GPIO_9__KPP_COL_6 0xe8 + MX53_PAD_GPIO_4__KPP_COL_7 0xe8 + MX53_PAD_KEY_COL2__KPP_COL_2 0xe8 + MX53_PAD_KEY_COL3__KPP_COL_3 0xe8 + MX53_PAD_KEY_COL4__KPP_COL_4 0xe8 + + MX53_PAD_GPIO_2__KPP_ROW_6 0xe0 + MX53_PAD_GPIO_5__KPP_ROW_7 0xe0 + MX53_PAD_KEY_ROW2__KPP_ROW_2 0xe0 + MX53_PAD_KEY_ROW3__KPP_ROW_3 0xe0 + MX53_PAD_KEY_ROW4__KPP_ROW_4 0xe0 + >; + }; + }; +}; + +&audmux { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_audmux_1>; /* SSI1 */ + status = "okay"; +}; + +&esdhc2 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_esdhc2_1>; + cd-gpios = <&gpio3 25 0>; + wp-gpios = <&gpio2 19 0>; + vmmc-supply = <®_3p3v>; + status = "okay"; +}; + +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c3_2>; + status = "okay"; + + sgtl5000: codec@0a { + compatible = "fsl,sgtl5000"; + reg = <0x0a>; + VDDA-supply = <®_3p3v>; + VDDIO-supply = <®_3p3v>; + clocks = <&clks 150>; + }; +}; + +&kpp { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_kpp_1>; + linux,keymap = < + 0x0203003b /* KEY_F1 */ + 0x0603003c /* KEY_F2 */ + 0x0207003d /* KEY_F3 */ + 0x0607003e /* KEY_F4 */ + >; + keypad,num-rows = <8>; + keypad,num-columns = <1>; + status = "okay"; +}; + +&ssi2 { + fsl,mode = "i2s-slave"; + status = "okay"; +}; diff --git a/arch/arm/dts/imx53-voipac-dmm-668.dtsi b/arch/arm/dts/imx53-voipac-dmm-668.dtsi new file mode 100644 index 0000000..4f1d8fa --- /dev/null +++ b/arch/arm/dts/imx53-voipac-dmm-668.dtsi @@ -0,0 +1,196 @@ +/* + * Copyright 2013 Rostislav Lisovy <lisovy@gmail.com>, PiKRON s.r.o. + * + * 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 "imx53.dtsi" + +/ { + model = "Voipac i.MX53 X53-DMM-668"; + compatible = "voipac,imx53-dmm-668", "fsl,imx53"; + + memory@70000000 { + device_type = "memory"; + reg = <0x70000000 0x20000000>; + }; + + memory@b0000000 { + device_type = "memory"; + reg = <0xb0000000 0x20000000>; + }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + reg_3p3v: regulator@0 { + compatible = "regulator-fixed"; + reg = <0>; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; +}; + +&iomuxc { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hog>; + + hog { + pinctrl_hog: hoggrp { + fsl,pins = < + /* Make DA9053 regulator functional */ + MX53_PAD_GPIO_16__GPIO7_11 0x80000000 + /* FEC Power enable */ + MX53_PAD_GPIO_11__GPIO4_1 0x80000000 + /* FEC RST */ + MX53_PAD_GPIO_12__GPIO4_2 0x80000000 + >; + }; + }; +}; + +&ecspi1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ecspi1_1>; + fsl,spi-num-chipselects = <4>; + cs-gpios = <&gpio2 30 0>, <&gpio3 19 0>, <&gpio2 16 0>, <&gpio2 17 0>; + status = "okay"; +}; + +&fec { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_fec_1>; + phy-mode = "rmii"; + phy-reset-gpios = <&gpio4 2 0>; + status = "okay"; +}; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c1_2>; + status = "okay"; + + pmic: dialog@48 { + compatible = "dlg,da9053-aa", "dlg,da9052"; + reg = <0x48>; + interrupt-parent = <&gpio7>; + interrupts = <11 0x8>; /* low-level active IRQ at GPIO7_11 */ + + regulators { + buck1_reg: buck1 { + regulator-name = "BUCKCORE"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1400000>; + regulator-always-on; + }; + + buck2_reg: buck2 { + regulator-name = "BUCKPRO"; + regulator-min-microvolt = <900000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + buck3_reg: buck3 { + regulator-name = "BUCKMEM"; + regulator-min-microvolt = <1420000>; + regulator-max-microvolt = <1580000>; + regulator-always-on; + }; + + buck4_reg: buck4 { + regulator-name = "BUCKPERI"; + regulator-min-microvolt = <2370000>; + regulator-max-microvolt = <2630000>; + regulator-always-on; + }; + + ldo1_reg: ldo1 { + regulator-name = "ldo1_1v3"; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; + regulator-boot-on; + regulator-always-on; + }; + + ldo2_reg: ldo2 { + regulator-name = "ldo2_1v3"; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + ldo3_reg: ldo3 { + regulator-name = "ldo3_3v3"; + regulator-min-microvolt = <3250000>; + regulator-max-microvolt = <3350000>; + regulator-always-on; + }; + + ldo4_reg: ldo4 { + regulator-name = "ldo4_2v775"; + regulator-min-microvolt = <2770000>; + regulator-max-microvolt = <2780000>; + regulator-always-on; + }; + + ldo5_reg: ldo5 { + regulator-name = "ldo5_3v3"; + regulator-min-microvolt = <3250000>; + regulator-max-microvolt = <3350000>; + regulator-always-on; + }; + + ldo6_reg: ldo6 { + regulator-name = "ldo6_1v3"; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + + ldo7_reg: ldo7 { + regulator-name = "ldo7_2v75"; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2800000>; + regulator-always-on; + }; + + ldo8_reg: ldo8 { + regulator-name = "ldo8_1v8"; + regulator-min-microvolt = <1750000>; + regulator-max-microvolt = <1850000>; + regulator-always-on; + }; + + ldo9_reg: ldo9 { + regulator-name = "ldo9_1v5"; + regulator-min-microvolt = <1450000>; + regulator-max-microvolt = <1550000>; + regulator-always-on; + }; + + ldo10_reg: ldo10 { + regulator-name = "ldo10_1v3"; + regulator-min-microvolt = <1250000>; + regulator-max-microvolt = <1350000>; + regulator-always-on; + }; + }; + }; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart1_2>; + status = "okay"; +}; diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 973aa37..dd32fcd 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -20,6 +20,7 @@ config ARCH_TEXT_BASE default 0x97f00000 if MACH_FREESCALE_MX51_PDK default 0x7ff00000 if MACH_FREESCALE_MX53_LOCO default 0x7ff00000 if MACH_FREESCALE_MX53_SMD + default 0x7ff00000 if MACH_FREESCALE_MX53_VMX53 default 0x87f00000 if MACH_GUF_CUPID default 0x93d00000 if MACH_TX25 default 0x7ff00000 if MACH_TQMA53 @@ -426,6 +427,14 @@ config MACH_FREESCALE_MX53_SMD bool "Freescale i.MX53 SMD" select ARCH_IMX53 +config MACH_FREESCALE_MX53_VMX53 + bool "Voipac i.MX53" + select ARCH_IMX53 + select HAVE_DEFAULT_ENVIRONMENT_NEW + help + Say Y here if you are using the Voipac Technologies VMX53 module + equipped with a Freescale i.MX53 Processor + config MACH_TQMA53 bool "TQ i.MX53 TQMa53" select ARCH_IMX53 -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read from Devicetree 2013-11-05 14:42 ` [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read " Rostislav Lisovy @ 2013-11-08 8:42 ` Sascha Hauer 2013-11-09 22:14 ` Rostislav Lisovy 0 siblings, 1 reply; 13+ messages in thread From: Sascha Hauer @ 2013-11-08 8:42 UTC (permalink / raw) To: Rostislav Lisovy; +Cc: barebox, pisa Hi Rostislav, On Tue, Nov 05, 2013 at 03:42:07PM +0100, Rostislav Lisovy wrote: > Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> > > diff --git a/arch/arm/boards/freescale-mx53-vmx53/env/config b/arch/arm/boards/freescale-mx53-vmx53/env/config > new file mode 100644 > index 0000000..3d90172 > --- /dev/null > +++ b/arch/arm/boards/freescale-mx53-vmx53/env/config Why not use defenv-2? > diff --git a/arch/arm/boards/freescale-mx53-vmx53/flash_header.c b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c > new file mode 100644 > index 0000000..a6864a6 > --- /dev/null > +++ b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c I'm currently generating the flash images for new boards using the imx-image tool and also generate multi board images. This is a very flexible, though maybe hard to understand mechanism. Is this the reason you haven't used it or were you not aware of it? I would rather see this board taking part in this new mechanism. Are you willing to port this over? Otherwise I could try and convert this patch, but I would depend on you testing the result. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read from Devicetree 2013-11-08 8:42 ` Sascha Hauer @ 2013-11-09 22:14 ` Rostislav Lisovy 2013-11-11 9:54 ` Sascha Hauer 0 siblings, 1 reply; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-09 22:14 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox, pisa Hello Sascha; On Fri, 2013-11-08 at 09:42 +0100, Sascha Hauer wrote: > Hi Rostislav, > > On Tue, Nov 05, 2013 at 03:42:07PM +0100, Rostislav Lisovy wrote: > > Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> > > > > diff --git a/arch/arm/boards/freescale-mx53-vmx53/env/config b/arch/arm/boards/freescale-mx53-vmx53/env/config > > new file mode 100644 > > index 0000000..3d90172 > > --- /dev/null > > +++ b/arch/arm/boards/freescale-mx53-vmx53/env/config > > Why not use defenv-2? Ok; I will use it; > > > diff --git a/arch/arm/boards/freescale-mx53-vmx53/flash_header.c b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c > > new file mode 100644 > > index 0000000..a6864a6 > > --- /dev/null > > +++ b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c > > I'm currently generating the flash images for new boards using the > imx-image tool and also generate multi board images. This is a very > flexible, though maybe hard to understand mechanism. Is this the reason > you haven't used it or were you not aware of it? > I would rather see this board taking part in this new mechanism. Are you > willing to port this over? Otherwise I could try and convert this patch, > but I would depend on you testing the result. I was investigating how the imx53-loco support is done, however I was not sure if the 'multiboard' is the preferred way. I found your patchset http://www.spinics.net/lists/u-boot-v2/msg15296.html shortly describing the functionality of the multiboard barebox -- I still do not understand the concept. The final binary has to hold just one particular 'flash_header', thus be able to boot just on one particular board. I do understand the flexibility of the devicetree, however something like the SDRAM configuration can not be chosen 'on the fly' by the PBL? It will save me (and probably others) a lot of time if you could quickly explain the functionality. I do agree the flash-header-imx53-loco.imxcfg looks much cleaner. I will try to write the flash_header for the Voipac board in the same way. Regards; Rostislav _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read from Devicetree 2013-11-09 22:14 ` Rostislav Lisovy @ 2013-11-11 9:54 ` Sascha Hauer 2013-11-12 22:57 ` Rostislav Lisovy 0 siblings, 1 reply; 13+ messages in thread From: Sascha Hauer @ 2013-11-11 9:54 UTC (permalink / raw) To: Rostislav Lisovy; +Cc: barebox, pisa On Sat, Nov 09, 2013 at 11:14:14PM +0100, Rostislav Lisovy wrote: > Hello Sascha; > > On Fri, 2013-11-08 at 09:42 +0100, Sascha Hauer wrote: > > Hi Rostislav, > > > > On Tue, Nov 05, 2013 at 03:42:07PM +0100, Rostislav Lisovy wrote: > > > Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> > > > > > > diff --git a/arch/arm/boards/freescale-mx53-vmx53/env/config b/arch/arm/boards/freescale-mx53-vmx53/env/config > > > new file mode 100644 > > > index 0000000..3d90172 > > > --- /dev/null > > > +++ b/arch/arm/boards/freescale-mx53-vmx53/env/config > > > > Why not use defenv-2? > > Ok; I will use it; > > > > > > diff --git a/arch/arm/boards/freescale-mx53-vmx53/flash_header.c b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c > > > new file mode 100644 > > > index 0000000..a6864a6 > > > --- /dev/null > > > +++ b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c > > > > I'm currently generating the flash images for new boards using the > > imx-image tool and also generate multi board images. This is a very > > flexible, though maybe hard to understand mechanism. Is this the reason > > you haven't used it or were you not aware of it? > > I would rather see this board taking part in this new mechanism. Are you > > willing to port this over? Otherwise I could try and convert this patch, > > but I would depend on you testing the result. > > I was investigating how the imx53-loco support is done, however I was > not sure if the 'multiboard' is the preferred way. > I found your patchset > http://www.spinics.net/lists/u-boot-v2/msg15296.html shortly describing > the functionality of the multiboard barebox -- I still do not understand > the concept. The final binary has to hold just one particular > 'flash_header', thus be able to boot just on one particular board. The multi image support (I think multi image is more appropriate than multi board) doesn't mean that the same image is being run on multiple boards, it instead means that the same binary is used to generate multiple images. Each of these images is for a particular board. The advantage over the traditional mechanism is that you can have a single config for multiple boards. Of course this could be used to have a single config for completely different SoCs/Boards. This gives you a better compile coverage with less compilation. A more real life scenario might be that you have two boards which differ only in the amount of SDRAM. Instead of maintaining two configs for it you could use a single config and generate two images from it. > I do > understand the flexibility of the devicetree, however something like the > SDRAM configuration can not be chosen 'on the fly' by the PBL? The basic trick with the multi image support is that we compile multiple entry points (ENTRY_FUNCTION()). Which one is used for a particular image is later specified with the -e option to ld. So each image has one entry function specified with ENTRY_FUNCTION(). What you then do in this entry function is up to you. If your boards offer some possibility to detect the SDRAM setup then you can use it to dynamically detect and configure SDRAM. Then you would be able to use a single binary image on multiple boards with different SDRAM configuration. On i.MX with the DCD header format the DCD is normally used to setup SDRAM. In this case it's not possible to have the same image for multiple boards. However, you could remove the SDRAM setup from DCD data and configure the flash header to load to the i.MX internal SRAM. then when in SRAM you could determine your board and setup the SDRAM from early code. This way a single image for multiple boards would be possible on i.MX aswell. With multi image support we shift away from "compiling for a single board". Instead a board is simply an additional option. If this option makes a new image necessary, then this image will be generated along with images for other boards. My vision is that we should not have defconfigs for particular boards. Instead we should have defconfigs which enable a certain feature set, for example: - arm_full_defconfig: All features and all boards enabled, huge binary nobody uses in projects, but is useful for compile testing and development - imx_defconfig: All i.MX boards enabled and all features necessary for i.MX. More practical in real life. - noninteractive_defconfig: Do not prompt users, just boot. - $VENDOR_defconfig: supports all boards from a vendor - $PROJECT_defconfig: supports all boards for a particular project which uses different boards or variants of boards. I hope this makes it a bit more clearer. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read from Devicetree 2013-11-11 9:54 ` Sascha Hauer @ 2013-11-12 22:57 ` Rostislav Lisovy 0 siblings, 0 replies; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-12 22:57 UTC (permalink / raw) To: Sascha Hauer; +Cc: barebox, pisa On Mon, 2013-11-11 at 10:54 +0100, Sascha Hauer wrote: > On Sat, Nov 09, 2013 at 11:14:14PM +0100, Rostislav Lisovy wrote: > > Hello Sascha; > > > > On Fri, 2013-11-08 at 09:42 +0100, Sascha Hauer wrote: > > > Hi Rostislav, > > > > > > On Tue, Nov 05, 2013 at 03:42:07PM +0100, Rostislav Lisovy wrote: > > > > Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> > > > > > > > > diff --git a/arch/arm/boards/freescale-mx53-vmx53/env/config b/arch/arm/boards/freescale-mx53-vmx53/env/config > > > > new file mode 100644 > > > > index 0000000..3d90172 > > > > --- /dev/null > > > > +++ b/arch/arm/boards/freescale-mx53-vmx53/env/config > > > > > > Why not use defenv-2? > > > > Ok; I will use it; > > > > > > > > > diff --git a/arch/arm/boards/freescale-mx53-vmx53/flash_header.c b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c > > > > new file mode 100644 > > > > index 0000000..a6864a6 > > > > --- /dev/null > > > > +++ b/arch/arm/boards/freescale-mx53-vmx53/flash_header.c > > > > > > I'm currently generating the flash images for new boards using the > > > imx-image tool and also generate multi board images. This is a very > > > flexible, though maybe hard to understand mechanism. Is this the reason > > > you haven't used it or were you not aware of it? > > > I would rather see this board taking part in this new mechanism. Are you > > > willing to port this over? Otherwise I could try and convert this patch, > > > but I would depend on you testing the result. > > > > I was investigating how the imx53-loco support is done, however I was > > not sure if the 'multiboard' is the preferred way. > > I found your patchset > > http://www.spinics.net/lists/u-boot-v2/msg15296.html shortly describing > > the functionality of the multiboard barebox -- I still do not understand > > the concept. The final binary has to hold just one particular > > 'flash_header', thus be able to boot just on one particular board. > > The multi image support (I think multi image is more appropriate than > multi board) doesn't mean that the same image is being run on multiple > boards, it instead means that the same binary is used to generate > multiple images. Each of these images is for a particular board. The > advantage over the traditional mechanism is that you can have a single > config for multiple boards. Of course this could be used to have a > single config for completely different SoCs/Boards. This gives you > a better compile coverage with less compilation. A more real life > scenario might be that you have two boards which differ only in the > amount of SDRAM. Instead of maintaining two configs for it you could > use a single config and generate two images from it. > > > I do > > understand the flexibility of the devicetree, however something like the > > SDRAM configuration can not be chosen 'on the fly' by the PBL? > > The basic trick with the multi image support is that we compile multiple > entry points (ENTRY_FUNCTION()). Which one is used for a particular > image is later specified with the -e option to ld. So each image has > one entry function specified with ENTRY_FUNCTION(). What you then do > in this entry function is up to you. If your boards offer some > possibility to detect the SDRAM setup then you can use it to dynamically > detect and configure SDRAM. Then you would be able to use a single > binary image on multiple boards with different SDRAM configuration. > > On i.MX with the DCD header format the DCD is normally used to setup > SDRAM. In this case it's not possible to have the same image for > multiple boards. However, you could remove the SDRAM setup from DCD > data and configure the flash header to load to the i.MX internal SRAM. > then when in SRAM you could determine your board and setup the SDRAM > from early code. This way a single image for multiple boards would > be possible on i.MX aswell. > > With multi image support we shift away from "compiling for a single > board". Instead a board is simply an additional option. If this option > makes a new image necessary, then this image will be generated along > with images for other boards. > My vision is that we should not have defconfigs for particular boards. > Instead we should have defconfigs which enable a certain feature set, > for example: > > - arm_full_defconfig: All features and all boards enabled, huge binary > nobody uses in projects, but is useful for compile testing and > development > - imx_defconfig: All i.MX boards enabled and all features necessary for > i.MX. More practical in real life. > - noninteractive_defconfig: Do not prompt users, just boot. > - $VENDOR_defconfig: supports all boards from a vendor > - $PROJECT_defconfig: supports all boards for a particular project > which uses different boards or variants of boards. > > I hope this makes it a bit more clearer. > > Sascha > Thank you for the explanation. I just resent the patch-set for the 'multi-board/multi-image' support. Regards; Rostislav _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/3 v2] Support for Voipac X53-DMM-668 module and Voipac Baseboard @ 2013-11-12 22:46 Rostislav Lisovy 2013-11-12 22:46 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy 0 siblings, 1 reply; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-12 22:46 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa This patchset adds support for Voipac Baseboard using x53-dmm-668 module (equipped with i.mx53 CPU). More info about the module may be found at: http://www.voipac.com/#X53-DMM-668 Changes since v1: * Fixed error checking in fec_imx.c * Board support is now done in the 'multiboard way' Rostislav Lisovy (3): ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree ARM: i.mx53: Support for Voipac board with X53-DMM-668 module. arch/arm/boards/Makefile | 1 + arch/arm/boards/freescale-mx53-vmx53/Makefile | 3 + arch/arm/boards/freescale-mx53-vmx53/board.c | 42 +++++ .../boards/freescale-mx53-vmx53/env/config-board | 8 + .../flash-header-imx53-vmx53.imxcfg | 54 ++++++ arch/arm/boards/freescale-mx53-vmx53/lowlevel.c | 19 ++ arch/arm/dts/Makefile | 4 +- arch/arm/dts/imx53-voipac-bsb.dts | 135 ++++++++++++++ arch/arm/dts/imx53-voipac-dmm-668.dtsi | 196 ++++++++++++++++++++ arch/arm/dts/imx53.dtsi | 15 ++ arch/arm/mach-imx/Kconfig | 8 + drivers/net/fec_imx.c | 33 ++++ images/Makefile.imx | 5 + 13 files changed, 522 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boards/freescale-mx53-vmx53/Makefile create mode 100644 arch/arm/boards/freescale-mx53-vmx53/board.c create mode 100644 arch/arm/boards/freescale-mx53-vmx53/env/config-board create mode 100644 arch/arm/boards/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg create mode 100644 arch/arm/boards/freescale-mx53-vmx53/lowlevel.c create mode 100644 arch/arm/dts/imx53-voipac-bsb.dts create mode 100644 arch/arm/dts/imx53-voipac-dmm-668.dtsi -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux 2013-11-12 22:46 [PATCH 0/3 v2] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy @ 2013-11-12 22:46 ` Rostislav Lisovy 0 siblings, 0 replies; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-12 22:46 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi index 09c5772..678547c 100644 --- a/arch/arm/dts/imx53.dtsi +++ b/arch/arm/dts/imx53.dtsi @@ -269,6 +269,14 @@ #interrupt-cells = <2>; }; + kpp: kpp@53f94000 { + compatible = "fsl,imx53-kpp", "fsl,imx21-kpp"; + reg = <0x53f94000 0x4000>; + interrupts = <60>; + clocks = <&clks 0>; + status = "disabled"; + }; + wdog1: wdog@53f98000 { compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; reg = <0x53f98000 0x4000>; @@ -587,6 +595,13 @@ MX53_PAD_GPIO_5__I2C3_SCL 0xc0000000 >; }; + + pinctrl_i2c3_2: i2c3grp-2 { + fsl,pins = < + MX53_PAD_GPIO_3__I2C3_SCL 0xc0000000 + MX53_PAD_GPIO_6__I2C3_SDA 0xc0000000 + >; + }; }; ipu_disp0 { -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/3 v3] Support for Voipac X53-DMM-668 module and Voipac Baseboard @ 2013-11-20 21:22 Rostislav Lisovy 2013-11-20 21:22 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy 0 siblings, 1 reply; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-20 21:22 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa This patchset adds support for Voipac Baseboard using x53-dmm-668 module (equipped with i.mx53 CPU). More info about the module may be found at: http://www.voipac.com/#X53-DMM-668 Changes since v2: * Fix errorhandling in fec_imx * Define flash controller in DTS * Use imx53_bbu_internal_nand_register_handler Rostislav Lisovy (3): ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree ARM: i.mx53: Support for Voipac board with X53-DMM-668 module. arch/arm/boards/Makefile | 1 + arch/arm/boards/freescale-mx53-vmx53/Makefile | 3 + arch/arm/boards/freescale-mx53-vmx53/board.c | 57 ++++++ .../boards/freescale-mx53-vmx53/env/config-board | 8 + .../flash-header-imx53-vmx53.imxcfg | 54 ++++++ arch/arm/boards/freescale-mx53-vmx53/lowlevel.c | 19 ++ arch/arm/dts/Makefile | 4 +- arch/arm/dts/imx53-voipac-bsb.dts | 135 +++++++++++++ arch/arm/dts/imx53-voipac-dmm-668.dtsi | 204 ++++++++++++++++++++ arch/arm/dts/imx53.dtsi | 15 ++ arch/arm/mach-imx/Kconfig | 8 + drivers/net/fec_imx.c | 21 ++ images/Makefile.imx | 5 + 13 files changed, 533 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boards/freescale-mx53-vmx53/Makefile create mode 100644 arch/arm/boards/freescale-mx53-vmx53/board.c create mode 100644 arch/arm/boards/freescale-mx53-vmx53/env/config-board create mode 100644 arch/arm/boards/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg create mode 100644 arch/arm/boards/freescale-mx53-vmx53/lowlevel.c create mode 100644 arch/arm/dts/imx53-voipac-bsb.dts create mode 100644 arch/arm/dts/imx53-voipac-dmm-668.dtsi -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux 2013-11-20 21:22 [PATCH 0/3 v3] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy @ 2013-11-20 21:22 ` Rostislav Lisovy 0 siblings, 0 replies; 13+ messages in thread From: Rostislav Lisovy @ 2013-11-20 21:22 UTC (permalink / raw) To: barebox; +Cc: Rostislav Lisovy, pisa Signed-off-by: Rostislav Lisovy <lisovy@gmail.com> diff --git a/arch/arm/dts/imx53.dtsi b/arch/arm/dts/imx53.dtsi index 09c5772..678547c 100644 --- a/arch/arm/dts/imx53.dtsi +++ b/arch/arm/dts/imx53.dtsi @@ -269,6 +269,14 @@ #interrupt-cells = <2>; }; + kpp: kpp@53f94000 { + compatible = "fsl,imx53-kpp", "fsl,imx21-kpp"; + reg = <0x53f94000 0x4000>; + interrupts = <60>; + clocks = <&clks 0>; + status = "disabled"; + }; + wdog1: wdog@53f98000 { compatible = "fsl,imx53-wdt", "fsl,imx21-wdt"; reg = <0x53f98000 0x4000>; @@ -587,6 +595,13 @@ MX53_PAD_GPIO_5__I2C3_SCL 0xc0000000 >; }; + + pinctrl_i2c3_2: i2c3grp-2 { + fsl,pins = < + MX53_PAD_GPIO_3__I2C3_SCL 0xc0000000 + MX53_PAD_GPIO_6__I2C3_SDA 0xc0000000 + >; + }; }; ipu_disp0 { -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-11-20 21:22 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-11-05 14:42 [PATCH 0/3] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy 2013-11-05 14:42 ` [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree Rostislav Lisovy 2013-11-05 16:15 ` Jean-Christophe PLAGNIOL-VILLARD 2013-11-05 19:11 ` Pavel Pisa 2013-11-06 8:39 ` Sascha Hauer 2013-11-05 14:42 ` [PATCH 3/3] ARM: i.mx53: Support for Voipac board. Device definition is read " Rostislav Lisovy 2013-11-08 8:42 ` Sascha Hauer 2013-11-09 22:14 ` Rostislav Lisovy 2013-11-11 9:54 ` Sascha Hauer 2013-11-12 22:57 ` Rostislav Lisovy 2013-11-12 22:46 [PATCH 0/3 v2] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy 2013-11-12 22:46 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy 2013-11-20 21:22 [PATCH 0/3 v3] Support for Voipac X53-DMM-668 module and Voipac Baseboard Rostislav Lisovy 2013-11-20 21:22 ` [PATCH 1/3] ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux Rostislav Lisovy
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox