Support for Voipac X53-DMM-668 module and Voipac Baseboard
Subsystems (5)
v2 cover Support for Voipac X53-DMM-668 module and Voipac Baseboard
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
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 1/3 ARM: dts: i.mx53: Internal keyboard controller + i2c pinmux
arch/arm/dts/imx53.dtsi +15 -0
@@ -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 {
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 2/3 ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree
In reply to Rostislav Lisovydrivers/net/fec_imx.c +33 -0
@@ -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,7 @@ static int fec_probe(struct device_d *dev)void *base;int ret;enum fec_type type; +int phy_reset; ret =dev_get_drvdata (dev, (unsigned long *)&type);if (ret)
@@ -671,6 +674,36 @@ static int fec_probe(struct device_d *dev) fec->regs =dev_request_mem_region (dev,0 ); +if (IS_ENABLED (CONFIG_OFDEVICE )) { + phy_reset =of_get_named_gpio (dev->device_node,"phy-reset-gpios" ,0 ); +if (phy_reset <0 ) { +pr_info ("%s: 'phy-reset-gpios' not used. Skipping hardware PHY reset.\n" , __func__); + }else { +if (!gpio_is_valid (phy_reset)) { +pr_err ("%s: 'phy-reset' gpio is not valid:\n" , + __func__); + goto err_free; + } + + ret =gpio_request (phy_reset,"phy-reset" ); +if (ret) { +pr_err ("%s: can not request gpio %d (phy-reset): %d\n" , + __func__, phy_reset, ret); + goto err_free; + } + + ret =gpio_direction_output (phy_reset,0 ); +if (ret) { +pr_err ("%s: can not set gpio %d (phy-reset) direction: %d\n" , + __func__, phy_reset, ret); + goto err_free; + } + +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 ) {
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 2/3] ARM: i.mx53: Parse Reset GPIO pin in FEC driver from Devicetree
Quoted 24 lines · Rostislav Lisovy
Signed-off-by Rostislav Lisovy <[email protected]>drivers/net/fec_imx.c +3
-0@@ -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,7 @@ static int fec_probe(struct device_d *dev)void *base;int ret;enum fec_type type; +int phy_reset; ret =dev_get_drvdata (dev, (unsigned long *)&type);if (ret)
drivers/net/fec_imx.c static int fec_probe(struct device_d *dev) · line 677
Quoted 4 lines
drivers/net/fec_imx.c +1
-0@@ -671,6 +674,36 @@ static int fec_probe(struct device_d *dev) fec->regs =dev_request_mem_region (dev,0 ); +if (IS_ENABLED (CONFIG_OFDEVICE )) {
This check shouldn't be needed. of_get_named_gpio() epxands to a static inline function returning -ENOSYS if we are compiling without devicetree support.
drivers/net/fec_imx.c static int fec_probe(struct device_d *dev) · line 679
Quoted 2 lines
drivers/net/fec_imx.c +2
-0+ phy_reset =of_get_named_gpio (dev->device_node,"phy-reset-gpios" ,0 ); +if (phy_reset <0 ) {
Use gpio_is_valid(phy_reset) directly here...
drivers/net/fec_imx.c static int fec_probe(struct device_d *dev) · line 682
Quoted 3 lines
drivers/net/fec_imx.c +3
-0+pr_info ("%s: 'phy-reset-gpios' not used. Skipping hardware PHY reset.\n" , __func__); + }else { +if (!gpio_is_valid (phy_reset)) {
...and drop this check.
drivers/net/fec_imx.c static int fec_probe(struct device_d *dev) · line 684
Quoted 2 lines
drivers/net/fec_imx.c +2
-0+pr_err ("%s: 'phy-reset' gpio is not valid:\n" , + __func__);
Driver messages should be done with dev_* functions, but in this case most of the messages should be dropped as they all add to the binary size of the image. Even without messages barebox will print an error message if probing of a device fails. This message is a good enough hint for the developer to find out where the problem is.
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH v2 3/3 ARM: i.mx53: Support for Voipac board with X53-DMM-668 module.
In reply to Rostislav LisovyDevice definitions are read from the devicetree description. The board support is using 'multiboard' approach.
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
arch/arm/boards/Makefile +1 -0
@@ -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/
arch/arm/boards/freescale-mx53-vmx53/Makefile new file +3 -0
@@ -0,0 +1,3 @@ +obj-y += board.o flash-header-imx53-vmx53.dcd.o +extra-y += flash-header-imx53-vmx53.dcd.S flash-header-imx53-vmx53.dcd +lwl-y += lowlevel.o
arch/arm/boards/freescale-mx53-vmx53/board.c new file +42 -0
42 lines not on this page · raw message
arch/arm/boards/freescale-mx53-vmx53/env/config-board new file +8 -0
@@ -0,0 +1,8 @@ +#!/bin/sh + +# board defaults, do not change in running system. Change /env/config +# instead + +global.hostname=vmx53 +global.linux.bootargs.base="console=ttymxc0,115200" +
arch/arm/boards/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg new file +54 -0
54 lines not on this page · raw message
arch/arm/boards/freescale-mx53-vmx53/lowlevel.c new file +19 -0
@@ -0,0 +1,19 @@ +#include <common.h> +#include <mach/esdctl.h> +#include <asm/barebox-arm-head.h> +#include <asm/barebox-arm.h> + +extern char __dtb_imx53_voipac_bsb_start[]; + +ENTRY_FUNCTION (start_imx53_vmx53)(void ) +{ +uint32_t fdt; + +__barebox_arm_head (); + +arm_cpu_lowlevel_init (); + + fdt = (uint32_t )__dtb_imx53_voipac_bsb_start -get_runtime_offset (); + +imx53_barebox_entry (fdt); +}
arch/arm/dts/Makefile +3 -1
@@ -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
arch/arm/dts/imx53-voipac-bsb.dts new file +135 -0
135 lines not on this page · raw message
arch/arm/dts/imx53-voipac-dmm-668.dtsi new file +196 -0
196 lines not on this page · raw message
arch/arm/mach-imx/Kconfig +8 -0
@@ -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
@@ -197,6 +198,13 @@ config MACH_FREESCALE_MX53_LOCO bool "Freescale i.MX53 LOCO" select ARCH_IMX53 +config MACH_FREESCALE_MX53_VMX53 + bool "Voipac i.MX53" + select ARCH_IMX53 + help + Say Y here if you are using the Voipac Technologies X53-DMM-668 + module equipped with a Freescale i.MX53 Processor + config MACH_PHYTEC_PFLA02 bool "Phytec phyFLEX-i.MX6 Ouad" select ARCH_IMX6
images/Makefile.imx +5 -0
@@ -26,6 +26,11 @@ CFG_start_imx53_loco.pblx.imximg = $(board)/freescale-mx53-loco/flash-header-imx FILE_barebox-freescale-imx53-loco.img = start_imx53_loco.pblx.imximg image-$(CONFIG_MACH_FREESCALE_MX53_LOCO) += barebox-freescale-imx53-loco.img +pblx-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += start_imx53_vmx53 +CFG_start_imx53_vmx53.pblx.imximg = $(board)/freescale-mx53-vmx53/flash-header-imx53-vmx53.imxcfg +FILE_barebox-freescale-imx53-vmx53.img = start_imx53_vmx53.pblx.imximg +image-$(CONFIG_MACH_FREESCALE_MX53_VMX53) += barebox-freescale-imx53-vmx53.img + # ----------------------- i.MX6 based boards --------------------------- pblx-$(CONFIG_MACH_REALQ7) += start_imx6_realq7 CFG_start_imx6_realq7.pblx.imximg = $(board)/dmo-mx6-realq7/flash-header.imxcfg
Signature · 7 lines
1.7.10.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 3/3] ARM: i.mx53: Support for Voipac board with X53-DMM-668 module.
Quoted 4 lines · Rostislav Lisovy
Device definitions are read from the devicetree description. The board support is using 'multiboard' approach.
Signed-off-by Rostislav Lisovy <[email protected]>
Thanks for converting it. The patch looks ready to be applied now.
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
One small issue I am facing:
The board has a jumper to switch between 'internal boot' and 'serial boot'. If I set it to 'serial boot' and then use imx-usb-loader to load barebox to RAM, everything works just fine. When I then try to flash it (flash controller support is missing in this patch-set), flashing is successful, however I am not able to boot it later when switched to 'internal boot' mode. If I try to flash some old version of the barebox (from my version running in RAM -- thus the problem is probably not in the flash support), it not only flashes successfully, this older version is even able to boot in the 'internal boot' mode.
I also noticed that when I am using CONFIG_IMX_MULTI_BOARDS the whole set of CONFIG_ARCH_IMX_INTERNAL_BOOT_* disappears.
Commands I am using to flash barebox:
erase /dev/nand0
addpart /dev/nand0 512k(barebox)ro,512k(bareboxenv),4M(kernel),-(rootfs) nand -a /dev/nand0.*
erase /dev/nand0.barebox.bb
tftp /vmx53/barebox.bin /dev/nand0.barebox.bb
Thanks in advance for any suggestions.
Rostislav
Quoted 26 lines · Rostislav Lisovy
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 infec_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 +
Quoted 9 lines
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
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerQuoted 14 lines · Rostislav Lisovy
One small issue I am facing:
The board has a jumper to switch between 'internal boot' and 'serial boot'. If I set it to 'serial boot' and then use imx-usb-loader to load barebox to RAM, everything works just fine. When I then try to flash it (flash controller support is missing in this patch-set), flashing is successful, however I am not able to boot it later when switched to 'internal boot' mode. If I try to flash some old version of the barebox (from my version running in RAM -- thus the problem is probably not in the flash support), it not only flashes successfully, this older version is even able to boot in the 'internal boot' mode.I also noticed that when I am using
CONFIG_IMX_MULTI_BOARDSthe whole set of CONFIG_ARCH_IMX_INTERNAL_BOOT_* disappears.
Quoted 6 lines
Commands I am using to flash barebox:
erase/dev/nand0
addpart/dev/nand0512k(barebox)ro,512k(bareboxenv),4M(kernel),-(rootfs) nand -a/dev/nand0.*
erase/dev/nand0.barebox.bb
tftp /vmx53/barebox.bin/dev/nand0.barebox.bb
You should use the barebox_update infrastructure. See imx53_bbu_internal_nand_register_handler(). With this you would exeute on the commandline:
barebox_update /path/to/barebox.bin
As a bonus this command also creates a bad block table the imx53 ROM is able to read.
Sascha
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox