diff options
Diffstat (limited to 'recipes/u-boot/u-boot-fslc/0001-Updated-kernel-arguments-for-sabre-sd.patch')
| -rw-r--r-- | recipes/u-boot/u-boot-fslc/0001-Updated-kernel-arguments-for-sabre-sd.patch | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/recipes/u-boot/u-boot-fslc/0001-Updated-kernel-arguments-for-sabre-sd.patch b/recipes/u-boot/u-boot-fslc/0001-Updated-kernel-arguments-for-sabre-sd.patch new file mode 100644 index 0000000..59a4505 --- /dev/null +++ b/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 | |||
