diff options
author | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-23 13:04:47 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@digia.com> | 2014-09-25 15:22:26 +0300 |
commit | 01603689e8dd2d3c5be0f41d41b3543452903f03 (patch) | |
tree | 47c0d3b74c92d5891da42c48e799317a8672d253 /meta-fsl-extras/recipes/u-boot | |
parent | 0dded51636b689237af7fdcda1719790c7fb3aa7 (diff) | |
download | meta-boot2qt-01603689e8dd2d3c5be0f41d41b3543452903f03.tar.gz |
Move meta-fsl-arm specific files to separate layer
Create new layer for recipes and files that required only when
meta-fsl-arm and meta-fsl-arm-extra layers are used. For now,
the bblayers.conf template still includes the new layer as well.
Change-Id: I01a0019ebaea3e1532f106e076f7608fb7aa86c6
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
Diffstat (limited to 'meta-fsl-extras/recipes/u-boot')
5 files changed, 292 insertions, 0 deletions
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-fslc/0001-Updated-kernel-arguments-for-sabre-sd.patch b/meta-fsl-extras/recipes/u-boot/u-boot-fslc/0001-Updated-kernel-arguments-for-sabre-sd.patch new file mode 100644 index 0000000..59a4505 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-fslc/0001-Updated-kernel-arguments-for-sabre-sd.patch | |||
@@ -0,0 +1,133 @@ | |||
1 | From 2288d6475ba3ab9a7fb3cd4aa0aa3a7c60dbfac6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Samuli Piippo <samuli.piippo@digia.com> | ||
3 | Date: Fri, 9 May 2014 10:23:50 +0300 | ||
4 | Subject: [PATCH] Updated kernel arguments for sabre sd | ||
5 | |||
6 | - Enable I2C | ||
7 | - detect if hdmi is used and change video arguments accordingly | ||
8 | - disable blanking and cursor blinking | ||
9 | |||
10 | --- | ||
11 | board/freescale/mx6sabresd/mx6sabresd.c | 23 +++++++++++++++++++++++ | ||
12 | include/configs/mx6sabre_common.h | 21 +++++++++++++++++++++ | ||
13 | 2 files changed, 44 insertions(+) | ||
14 | |||
15 | diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c | ||
16 | index 12d8c56..303b774 100644 | ||
17 | --- a/board/freescale/mx6sabresd/mx6sabresd.c | ||
18 | +++ b/board/freescale/mx6sabresd/mx6sabresd.c | ||
19 | @@ -12,6 +12,7 @@ | ||
20 | #include <asm/arch/mx6-pins.h> | ||
21 | #include <asm/errno.h> | ||
22 | #include <asm/gpio.h> | ||
23 | +#include <asm/imx-common/mxc_i2c.h> | ||
24 | #include <asm/imx-common/iomux-v3.h> | ||
25 | #include <asm/imx-common/boot_mode.h> | ||
26 | #include <mmc.h> | ||
27 | @@ -24,6 +25,7 @@ | ||
28 | #include <ipu_pixfmt.h> | ||
29 | #include <asm/io.h> | ||
30 | #include <asm/arch/sys_proto.h> | ||
31 | +#include <i2c.h> | ||
32 | DECLARE_GLOBAL_DATA_PTR; | ||
33 | |||
34 | #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ | ||
35 | @@ -40,6 +42,12 @@ DECLARE_GLOBAL_DATA_PTR; | ||
36 | #define SPI_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_SPEED_MED | \ | ||
37 | PAD_CTL_DSE_40ohm | PAD_CTL_SRE_FAST) | ||
38 | |||
39 | +#define I2C_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ | ||
40 | + PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | PAD_CTL_HYS | \ | ||
41 | + PAD_CTL_ODE | PAD_CTL_SRE_FAST) | ||
42 | + | ||
43 | +#define I2C_PAD MUX_PAD_CTRL(I2C_PAD_CTRL) | ||
44 | + | ||
45 | int dram_init(void) | ||
46 | { | ||
47 | gd->ram_size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); | ||
48 | @@ -130,6 +138,19 @@ iomux_v3_cfg_t const ecspi1_pads[] = { | ||
49 | MX6_PAD_KEY_ROW1__GPIO4_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL), | ||
50 | }; | ||
51 | |||
52 | +static struct i2c_pads_info i2c_pad_info1 = { | ||
53 | + .scl = { | ||
54 | + .i2c_mode = MX6_PAD_KEY_COL3__I2C2_SCL | I2C_PAD, | ||
55 | + .gpio_mode = MX6_PAD_KEY_COL3__GPIO4_IO12 | I2C_PAD, | ||
56 | + .gp = IMX_GPIO_NR(4, 12) | ||
57 | + }, | ||
58 | + .sda = { | ||
59 | + .i2c_mode = MX6_PAD_KEY_ROW3__I2C2_SDA | I2C_PAD, | ||
60 | + .gpio_mode = MX6_PAD_KEY_ROW3__GPIO4_IO13 | I2C_PAD, | ||
61 | + .gp = IMX_GPIO_NR(4, 13) | ||
62 | + } | ||
63 | +}; | ||
64 | + | ||
65 | static void setup_spi(void) | ||
66 | { | ||
67 | imx_iomux_v3_setup_multiple_pads(ecspi1_pads, ARRAY_SIZE(ecspi1_pads)); | ||
68 | @@ -477,6 +498,8 @@ int board_init(void) | ||
69 | setup_spi(); | ||
70 | #endif | ||
71 | |||
72 | + setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1); | ||
73 | + | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | diff --git a/include/configs/mx6sabre_common.h b/include/configs/mx6sabre_common.h | ||
78 | index 5ee7fa5..b83bf74 100644 | ||
79 | --- a/include/configs/mx6sabre_common.h | ||
80 | +++ b/include/configs/mx6sabre_common.h | ||
81 | @@ -85,6 +85,13 @@ | ||
82 | /* Command definition */ | ||
83 | #include <config_cmd_default.h> | ||
84 | |||
85 | +/* I2C Configs */ | ||
86 | +#define CONFIG_CMD_I2C | ||
87 | +#define CONFIG_SYS_I2C | ||
88 | +#define CONFIG_SYS_I2C_MXC | ||
89 | +#define CONFIG_SYS_I2C_SPEED 100000 | ||
90 | +#define CONFIG_I2C_EDID | ||
91 | + | ||
92 | #define CONFIG_CMD_BMODE | ||
93 | #define CONFIG_CMD_BOOTZ | ||
94 | #define CONFIG_CMD_SETEXPR | ||
95 | @@ -117,6 +124,15 @@ | ||
96 | #define EMMC_ENV "" | ||
97 | #endif | ||
98 | |||
99 | +#define VIDEOARGS \ | ||
100 | + "videoargs=" \ | ||
101 | + "i2c dev 1 ; " \ | ||
102 | + "if i2c probe 0x50 ; then " \ | ||
103 | + "setenv video mxcfb0:dev=hdmi,1280x720M@60,if=RGB24 ; " \ | ||
104 | + "else " \ | ||
105 | + "setenv video mxcfb0:dev=ldb,LDB-XGA,if=RGB666 ldb=sin1 ; " \ | ||
106 | + "fi\0" | ||
107 | + | ||
108 | #define CONFIG_EXTRA_ENV_SETTINGS \ | ||
109 | "script=boot.scr\0" \ | ||
110 | "uimage=uImage\0" \ | ||
111 | @@ -144,7 +160,11 @@ | ||
112 | "fi; " \ | ||
113 | "fi\0" \ | ||
114 | EMMC_ENV \ | ||
115 | + VIDEOARGS \ | ||
116 | "mmcargs=setenv bootargs console=${console},${baudrate} " \ | ||
117 | + "video=${video} "\ | ||
118 | + "consoleblank=0 " \ | ||
119 | + "vt.global_cursor_default=0 " \ | ||
120 | "root=${mmcroot}\0" \ | ||
121 | "loadbootscript=" \ | ||
122 | "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ | ||
123 | @@ -153,6 +173,7 @@ | ||
124 | "loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}\0" \ | ||
125 | "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ | ||
126 | "mmcboot=echo Booting from mmc ...; " \ | ||
127 | + "run videoargs; " \ | ||
128 | "run mmcargs; " \ | ||
129 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ | ||
130 | "if run loadfdt; then " \ | ||
131 | -- | ||
132 | 1.8.3.2 | ||
133 | |||
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-fslc_2014.01.bbappend b/meta-fsl-extras/recipes/u-boot/u-boot-fslc_2014.01.bbappend new file mode 100644 index 0000000..b4ff56f --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-fslc_2014.01.bbappend | |||
@@ -0,0 +1,26 @@ | |||
1 | ############################################################################# | ||
2 | ## | ||
3 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
4 | ## | ||
5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
6 | ## framework. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE$ | ||
9 | ## Commercial License Usage Only | ||
10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
12 | ## may use this file in accordance with the terms contained in said license | ||
13 | ## agreement. | ||
14 | ## | ||
15 | ## For further information use the contact form at | ||
16 | ## http://qt.digia.com/contact-us. | ||
17 | ## | ||
18 | ## | ||
19 | ## $QT_END_LICENSE$ | ||
20 | ## | ||
21 | ############################################################################# | ||
22 | |||
23 | FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" | ||
24 | SRC_URI += " \ | ||
25 | file://0001-Updated-kernel-arguments-for-sabre-sd.patch \ | ||
26 | " | ||
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0001-nitrogen6x-disable-console-cursor-blinking.patch b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0001-nitrogen6x-disable-console-cursor-blinking.patch new file mode 100644 index 0000000..d97921c --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0001-nitrogen6x-disable-console-cursor-blinking.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From b21614109fb3cca15c4b0d296b3ab6cc1b778e3a Mon Sep 17 00:00:00 2001 | ||
2 | From: Samuli Piippo <samuli.piippo@digia.com> | ||
3 | Date: Fri, 10 Jan 2014 12:37:20 +0200 | ||
4 | Subject: [PATCH] nitrogen6x: disable console cursor blinking | ||
5 | |||
6 | --- | ||
7 | board/boundary/nitrogen6x/6x_bootscript-yocto.txt | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
11 | index d933fa0..2d7c575 100644 | ||
12 | --- a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
13 | +++ b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
14 | @@ -56,7 +56,7 @@ while test "4" -ne $nextcon ; do | ||
15 | done | ||
16 | |||
17 | setenv bootargs $bootargs $fbmem | ||
18 | -setenv bootargs "$bootargs console=ttymxc1,115200 vmalloc=400M consoleblank=0 rootwait" | ||
19 | +setenv bootargs "$bootargs console=ttymxc1,115200 vmalloc=400M consoleblank=0 vt.global_cursor_default=0 rootwait" | ||
20 | |||
21 | if itest.s x$bootpart == x ; then | ||
22 | bootpart=1 | ||
23 | -- | ||
24 | 1.7.10.4 | ||
25 | |||
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch new file mode 100644 index 0000000..995e418 --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary/0002-nitrogen6x-update.patch | |||
@@ -0,0 +1,81 @@ | |||
1 | From 3d7276b2b27317c5067d2095ea5c3952d11f4390 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rainer Keller <rainer.keller@digia.com> | ||
3 | Date: Fri, 5 Sep 2014 14:39:50 +0200 | ||
4 | Subject: [PATCH] Add support for update recovery linux | ||
5 | |||
6 | --- | ||
7 | board/boundary/nitrogen6x/6x_bootscript-yocto.txt | 61 +++++++++++++++++++++++ | ||
8 | 1 file changed, 61 insertions(+) | ||
9 | |||
10 | diff --git a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
11 | index 5bc6170..4116ed4 100644 | ||
12 | --- a/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
13 | +++ b/board/boundary/nitrogen6x/6x_bootscript-yocto.txt | ||
14 | @@ -1,3 +1,64 @@ | ||
15 | +# Boot2Qt update part begin | ||
16 | +echo "Boot to Qt" | ||
17 | +if test "x$boot2qt_update_state" = "x" ; then | ||
18 | + setenv boot2qt_update_state valid | ||
19 | + saveenv | ||
20 | +fi | ||
21 | + | ||
22 | +# This is a workaround because environment partition is read-only. | ||
23 | +if fatload mmc 1:1 0x12000000 update/state ; then | ||
24 | + mw.b 0x13000000 0x76 1 # v | ||
25 | + mw.b 0x13000001 0x75 1 # u | ||
26 | + mw.b 0x13000002 0x74 1 # t | ||
27 | + | ||
28 | + if cmp.b 0x12000000 0x13000000 1 ; then | ||
29 | + echo "State: Valid" | ||
30 | + setenv boot2qt_fat_state valid | ||
31 | + setenv boot2qt_update_state valid | ||
32 | + saveenv | ||
33 | + fi | ||
34 | + if cmp.b 0x12000000 0x13000001 1 ; then | ||
35 | + echo "State: Update" | ||
36 | + setenv boot2qt_fat_state update | ||
37 | + fi | ||
38 | + if cmp.b 0x12000000 0x13000002 1 ; then | ||
39 | + echo "State: Testing" | ||
40 | + setenv boot2qt_fat_state testing | ||
41 | + fi | ||
42 | +fi | ||
43 | + | ||
44 | +if test "x$boot2qt_fat_state" = "xupdate" || test "x$boot2qt_update_state" = "xinvalid" ; then | ||
45 | + setenv boot2qt_update_state testing | ||
46 | + saveenv | ||
47 | + echo "Recovery linux starting..." | ||
48 | + setenv bootargs "console=ttymxc1,115200 vmalloc=400M consoleblank=0 vt.global_cursor_default=0 root=/dev/ram0" | ||
49 | + | ||
50 | + # Guess dtb name | ||
51 | + dtbname="imx6"; | ||
52 | + if itest.s x6S != "x\$cpu" ; then | ||
53 | + dtbname=\${dtbname}q-; | ||
54 | + else | ||
55 | + dtbname=\${dtbname}s-; | ||
56 | + fi | ||
57 | + | ||
58 | + if itest.s x == "x\$board" ; then | ||
59 | + board=sabrelite | ||
60 | + fi | ||
61 | + dtbname=\${dtbname}\${board}.dtb; | ||
62 | + | ||
63 | + fatload mmc 1:1 0x10800000 update/uImage | ||
64 | + fatload mmc 1:1 0x12000000 update/${dtbname} | ||
65 | + fatload mmc 1:1 0x13000000 update/uRamdisk | ||
66 | + bootm 0x10800000 0x13000000 0x12000000 | ||
67 | +fi | ||
68 | + | ||
69 | +if test "x$boot2qt_fat_state" = "xtesting" || test "x$boot2qt_update_state" = "xtesting"; then | ||
70 | + setenv boot2qt_update_state invalid | ||
71 | + saveenv | ||
72 | +fi | ||
73 | + | ||
74 | +# Boot2Qt update part end | ||
75 | + | ||
76 | # Yocto-specifics | ||
77 | setenv bootpart 2 | ||
78 | setenv bootdir / | ||
79 | -- | ||
80 | 1.8.5.5 | ||
81 | |||
diff --git a/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary_git.bbappend b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary_git.bbappend new file mode 100644 index 0000000..a479c2b --- /dev/null +++ b/meta-fsl-extras/recipes/u-boot/u-boot-script-boundary_git.bbappend | |||
@@ -0,0 +1,27 @@ | |||
1 | ############################################################################# | ||
2 | ## | ||
3 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
4 | ## | ||
5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
6 | ## framework. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE$ | ||
9 | ## Commercial License Usage Only | ||
10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
12 | ## may use this file in accordance with the terms contained in said license | ||
13 | ## agreement. | ||
14 | ## | ||
15 | ## For further information use the contact form at | ||
16 | ## http://qt.digia.com/contact-us. | ||
17 | ## | ||
18 | ## | ||
19 | ## $QT_END_LICENSE$ | ||
20 | ## | ||
21 | ############################################################################# | ||
22 | |||
23 | FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" | ||
24 | SRC_URI += " \ | ||
25 | file://0001-nitrogen6x-disable-console-cursor-blinking.patch \ | ||
26 | file://0002-nitrogen6x-update.patch \ | ||
27 | " | ||