[PATCH 2/2] ARM: i.MX53: dts: add support for MCIMX53-START-R
The start-r QSB has a different pmic than the older start QSB. Add a new dts for the QSRB and let barebox generate two images when LOCO is selected. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- arch/arm/boards/freescale-mx53-loco/lowlevel.c | 13 +++ arch/arm/dts/Makefile | 3 +- arch/arm/dts/imx53-qsrb.dts| 141 + images/Makefile.imx| 5 + 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 arch/arm/dts/imx53-qsrb.dts diff --git a/arch/arm/boards/freescale-mx53-loco/lowlevel.c b/arch/arm/boards/freescale-mx53-loco/lowlevel.c index 7556a2e..c9e057a 100644 --- a/arch/arm/boards/freescale-mx53-loco/lowlevel.c +++ b/arch/arm/boards/freescale-mx53-loco/lowlevel.c @@ -15,3 +15,16 @@ ENTRY_FUNCTION(start_imx53_loco, r0, r1, r2) imx53_barebox_entry(fdt); } + +extern char __dtb_imx53_qsrb_start[]; + +ENTRY_FUNCTION(start_imx53_loco_r, r0, r1, r2) +{ + uint32_t fdt; + + arm_cpu_lowlevel_init(); + + fdt = (uint32_t)__dtb_imx53_qsrb_start - get_runtime_offset(); + + imx53_barebox_entry(fdt); +} diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index bc314e9..ec46c4f 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -5,6 +5,7 @@ dtb-$(CONFIG_ARCH_AM33XX) += \ dtb-$(CONFIG_ARCH_IMX51) += imx51-babbage.dtb \ imx51-genesi-efika-sb.dtb dtb-$(CONFIG_ARCH_IMX53) += imx53-qsb.dtb \ + imx53-qsrb.dtb \ imx53-voipac-bsb.dtb dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \ imx6dl-dfi-fs700-m60-6s.dtb \ @@ -29,7 +30,7 @@ obj-$(CONFIG_BUILTIN_DTB) += $(BUILTIN_DTB).dtb.o pbl-$(CONFIG_MACH_BEAGLEBONE) += am335x-bone.dtb.o am335x-boneblack.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_LOCO) += imx53-qsb.dtb.o imx53-qsrb.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_PCM051) += am335x-phytec-phycore.dtb.o diff --git a/arch/arm/dts/imx53-qsrb.dts b/arch/arm/dts/imx53-qsrb.dts new file mode 100644 index 000..e9a9bc6 --- /dev/null +++ b/arch/arm/dts/imx53-qsrb.dts @@ -0,0 +1,141 @@ +/* + * 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 imx53-qsb-common.dtsi + +/ { + model = Freescale i.MX53 Quick Start-R Board; + compatible = fsl,imx53-qsb, fsl,imx53; +}; + +iomuxc { + i2c1 { + /* open drain */ + pinctrl_i2c1_qsrb: i2c1grp-1 { + fsl,pins = + MX53_PAD_CSI0_DAT8__I2C1_SDA 0x41ec + MX53_PAD_CSI0_DAT9__I2C1_SCL 0x41ec + ; + }; + }; +}; + +i2c1 { + pinctrl-names = default; + pinctrl-0 = pinctrl_i2c1_qsrb; + + pmic: ripley@8 { + compatible = fsl,mc34708; + reg = 0x08; + interrupt-parent = gpio5; + interrupts = 23 0x8; + regulators { + mc34708__sw1a { + regulator-name = SW1; + regulator-min-microvolt = 65; + regulator-max-microvolt = 1437500; + regulator-boot-on; + regulator-always-on; + }; + mc34708__sw1b { + regulator-name = SW1B; + regulator-min-microvolt = 65; + regulator-max-microvolt = 1437500; + regulator-boot-on; + regulator-always-on; + }; + mc34708__sw2 { + regulator-name = SW2; + regulator-min-microvolt = 65; + regulator-max-microvolt = 1437500; + regulator-boot-on; + regulator-always-on; + }; + mc34708__sw3 { + regulator-name = SW3; + regulator-min-microvolt = 65; + regulator-max-microvolt = 1425000; + regulator-boot-on; + };
[PATCH 1/2] ARM: i.MX53: dts: move QSB pmic to own file
There are two versions of the i.MX53 LOCO: - the MCIMX53-START board - the MCIMX53-START-R board The MCIMX53-START-R has a mc34708 pmic and is otherwise the similar to the MCIMX53-START. To prepare for the START-R, move all common nodes to a new imx53-qsb-common.dtsi and remove everything but the board name and pmic from the imx53-qsb.dts. Signed-off-by: Steffen Trumtrar s.trumt...@pengutronix.de --- arch/arm/dts/imx53-qsb-common.dtsi | 225 + arch/arm/dts/imx53-qsb.dts | 210 +- 2 files changed, 226 insertions(+), 209 deletions(-) create mode 100644 arch/arm/dts/imx53-qsb-common.dtsi diff --git a/arch/arm/dts/imx53-qsb-common.dtsi b/arch/arm/dts/imx53-qsb-common.dtsi new file mode 100644 index 000..4ecb3ec --- /dev/null +++ b/arch/arm/dts/imx53-qsb-common.dtsi @@ -0,0 +1,225 @@ +/* + * 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 + */ + +/dts-v1/; +#include imx53.dtsi + +/ { + chosen { + linux,stdout-path = /soc/aips@5000/serial@53fbc000; + + environment@0 { + compatible = barebox,environment; + device-path = esdhc1, partname:barebox-environment; + }; + }; + + display@di0 { + compatible = fsl,imx-parallel-display; + crtcs = ipu 0; + interface-pix-fmt = rgb565; + pinctrl-names = default; + pinctrl-0 = pinctrl_ipu_disp0_1; + status = disabled; + display-timings { + claawvga { + native-mode; + clock-frequency = 2700; + hactive = 800; + vactive = 480; + hback-porch = 40; + hfront-porch = 60; + vback-porch = 10; + vfront-porch = 10; + hsync-len = 20; + vsync-len = 10; + hsync-active = 0; + vsync-active = 0; + de-active = 1; + pixelclk-active = 0; + }; + }; + }; + + gpio-keys { + compatible = gpio-keys; + + power { + label = Power Button; + gpios = gpio1 8 0; + linux,code = 116; /* KEY_POWER */ + gpio-key,wakeup; + }; + + volume-up { + label = Volume Up; + gpios = gpio2 14 0; + linux,code = 115; /* KEY_VOLUMEUP */ + }; + + volume-down { + label = Volume Down; + gpios = gpio2 15 0; + linux,code = 114; /* KEY_VOLUMEDOWN */ + }; + }; + + leds { + compatible = gpio-leds; + pinctrl-names = default; + pinctrl-0 = led_pin_gpio7_7; + + user { + label = Heartbeat; + gpios = gpio7 7 0; + linux,default-trigger = heartbeat; + }; + }; + + regulators { + compatible = simple-bus; + + reg_3p2v: 3p2v { + compatible = regulator-fixed; + regulator-name = 3P2V; + regulator-min-microvolt = 320; + regulator-max-microvolt = 320; + regulator-always-on; + }; + }; + + sound { + compatible = fsl,imx53-qsb-sgtl5000, +fsl,imx-audio-sgtl5000; + model = imx53-qsb-sgtl5000; + ssi-controller = ssi2; + audio-codec = sgtl5000; + audio-routing = + MIC_IN, Mic Jack, + Mic Jack, Mic Bias, + Headphone Jack, HP_OUT; + mux-int-port = 2; + mux-ext-port = 5; + }; +}; + +esdhc1 { + pinctrl-names = default; + pinctrl-0 = pinctrl_esdhc1_1; + cd-gpios = gpio3 13 0; + status = okay; + #address-cells = 1; + #size-cells = 1; + + partition@0 { + label = barebox-environment; + reg = 0x8 0x2; + }; +}; + +ssi2 { + fsl,mode =
Re: [PATCH] Make number of GPT partitions a configurable option
* Santosh Sivaraj sant...@fossix.org wrote (on 2014-01-09 21:36:41 +0530): adding list, missed it. * Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com wrote (on 2014-01-09 08:29:14 +0100): On 15:07 Wed 08 Jan , Sascha Hauer wrote: Hi Santosh, On Wed, Jan 08, 2014 at 08:15:39AM +0530, Santosh Sivaraj wrote: Theoritically there is no limit for the partitions that can be created based on EFI/GPT, so make the number of partitions that can be visible in barebox a configurable option. Signed-off-by: Santosh Sivaraj sant...@fossix.org --- common/partitions/Kconfig | 5 + common/partitions/parser.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common/partitions/Kconfig b/common/partitions/Kconfig index 90238ad..f3353dd 100644 --- a/common/partitions/Kconfig +++ b/common/partitions/Kconfig @@ -31,3 +31,8 @@ config PARTITION_DISK_EFI_GPT_COMPARE depends on PARTITION_DISK_EFI default y bool EFI: GPT: compare primary and Alternate GPT header for validity + +config MAX_PARTITIONS + depends on PARTITION_DISK_EFI + int Maximum of partitions needed to be supported on a GPT + default 8 Can we instead allocate the partitions dynamically? This limitation to eight partitions we currently have is not nice, but making it configurable is not a proper fix. agreed but a limit will be good too Best Regards, J. Sascha We could keep a configurable maximum, with a high default, but do the allocation dynamically. I will try to send in a patch, we can discuss how it needs to be done over it. Thanks, Santosh -- ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 1/3] gpiolib: gpio_request(): print message on error
Just copy gpiod_request() function logic from linux-v3.13-rc7. Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- drivers/gpio/gpiolib.c | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index cafef90..b7430b0 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -50,22 +50,33 @@ int gpio_request(unsigned gpio, const char *label) struct gpio_info *gi = gpio_to_desc(gpio); int ret; - if (!gi) - return -ENODEV; + if (!gi) { + ret = -ENODEV; + goto done; + } - if (gi-requested) - return -EBUSY; + if (gi-requested) { + ret = -EBUSY; + goto done; + } + + ret = 0; if (gi-chip-ops-request) { ret = gi-chip-ops-request(gi-chip, gpio - gi-chip-base); if (ret) - return ret; + goto done; } gi-requested = true; gi-label = xstrdup(label); - return 0; +done: + if (ret) + pr_err(_gpio_request: gpio-%d (%s) status %d\n, +gpio, label ? : ?, ret); + + return ret; } void gpio_free(unsigned gpio) -- 1.8.5.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 3/3] gpiolib: gpiolib command: show label only for requested pins
Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5f13d5f..193c36c 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -334,7 +334,7 @@ static int do_gpiolib(int argc, char *argv[]) 3, (dir 0) ? unk : ((dir == GPIOF_DIR_IN) ? in : out), 3, (val 0) ? unk : ((val == 0) ? lo : hi), 9, gi-requested ? true : false, - gi-label ? gi-label : ); + (gi-requested gi-label) ? gi-label : ); } return 0; -- 1.8.5.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 0/3] gpiolib: add checks and error message
This patchseries adds additional trivial checks and error message. [PATCH 1/3] gpiolib: gpio_request(): print message on error [PATCH 2/3] gpiolib: gpio_free: clear gpio's label field too [PATCH 3/3] gpiolib: gpiolib command: show label only for requested ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
[PATCH 2/3] gpiolib: gpio_free: clear gpio's label field too
If an error occured during gpio_request_array() then we can get not requested gpio with nonempty garbage label field value. Afterward the gpiolib command can try to use this nonempty garbage value. This patch prevents this error situation. Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- drivers/gpio/gpiolib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index b7430b0..5f13d5f 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -94,6 +94,7 @@ void gpio_free(unsigned gpio) gi-requested = false; free(gi-label); + gi-label = NULL; } /** -- 1.8.5.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Porting barebox (devicetree) to Variscite iMX6 SOM
Sascha, Since I am still having issues with the kernel booting -- and needed a bit of a break to clear my mind -- I decided to delve into the initial barebox bootup from NAND a bit more. Correct me if I am wrong, but how I understand things right now... The iMX6 requires a BCB header prior to the actual barebox partition (e.g. nand0.bootstream). This bootstream partition would contain the BCB data specific to the iMX6 (i.e. an FCB and at least a partial DBBT). It also looks like this functionality is already present in barebox for the MX23/28 series of parts (i.e. the bcb command). I also have the source for kobs-ng v1.3, which does properly generate the BCB for the MX6 series (and is what I am currently using to flash barebox into NAND). So, basically, it sounds like what I need to do is migrate the bcb.c file from the arm/mach-mxs folder into the MX6 portion of the tree and then update it based on the datasheet and the known good parameters from kobs-ng v1.3 (which look fairly similar to the definitions you already have in place for the MX23/28 FCB). Does this sound like a reasonable plan of action? It really looks like life with the iMX6 would be much easier if I had a SPI-NOR on this SOM, instead of NAND only. Thanks, Michael Burkey ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH] of: platform: Fix possible crash
On Tue, Jan 07, 2014 at 10:48:17PM +0400, Alexander Shiyan wrote: dev may uninitialized or points to incorrect device. Nice catch. Applied and while at it made the message more informative: debug(%s: register device %s, io=0x%08x\n, __func__, dev_name(dev), (num_reg) ? dev-resource[0].start : (-1)); Sascha Signed-off-by: Alexander Shiyan shc_w...@mail.ru --- drivers/of/platform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index e75a69b..5cd32fc 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -174,9 +174,6 @@ static struct device_d *of_platform_device_create(struct device_node *np, } } - debug(register device 0x%08x\n, - (num_reg) ? dev-resource[0].start : (-1)); - /* setup generic device info */ dev = xzalloc(sizeof(*dev)); dev-id = DEVICE_ID_SINGLE; @@ -186,6 +183,9 @@ static struct device_d *of_platform_device_create(struct device_node *np, dev-num_resources = num_reg; of_device_make_bus_id(dev); + debug(register device 0x%08x\n, + (num_reg) ? dev-resource[0].start : (-1)); + ret = platform_device_register(dev); if (!ret) return dev; -- 1.8.3.2 ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox -- 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- | ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 1/2] ARM: i.MX51: Sync DT files with kernel
Hello. Пятница, 10 января 2014, 8:39 +01:00 от Sascha Hauer s.ha...@pengutronix.de: On Wed, Jan 08, 2014 at 09:44:15AM +0400, Alexander Shiyan wrote: This patch includes update i.MX51 template and porting some barebox DTS files to use new template. Signed-off-by: Alexander Shiyan shc_w...@mail.ru Applied, thanks Can you post imx51-genesi-efika-sb.dts into the kernel mainline to handle further possible updates by kernel community? Thanks. --- ___ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox