diff mbox

[U-Boot,2/2] ot1200: setup i2c bus 1 in setup_iomux_i2c()

Message ID 1433324003-6884-2-git-send-email-christian.gmeiner@gmail.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Christian Gmeiner June 3, 2015, 9:33 a.m. UTC
On this bus there is a EEPROM containing EDID and ddr3
calibration information.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
 board/bachmann/ot1200/ot1200.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

Stefano Babic June 8, 2015, 6:50 a.m. UTC | #1
On 03/06/2015 11:33, Christian Gmeiner wrote:
> On this bus there is a EEPROM containing EDID and ddr3
> calibration information.
> 
> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
> ---
>  board/bachmann/ot1200/ot1200.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
> index a33d496..2237b7a 100644
> --- a/board/bachmann/ot1200/ot1200.c
> +++ b/board/bachmann/ot1200/ot1200.c
> @@ -122,6 +122,20 @@ static void setup_iomux_features(void)
>  
>  #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
>  
> +/* I2C2 - EEPROM */
> +static struct i2c_pads_info i2c_pad_info1 = {
> +	.scl = {
> +		.i2c_mode = MX6_PAD_EIM_EB2__I2C2_SCL | PC,
> +		.gpio_mode = MX6_PAD_EIM_EB2__GPIO2_IO30 | PC,
> +		.gp = IMX_GPIO_NR(2, 30)
> +	},
> +	.sda = {
> +		.i2c_mode = MX6_PAD_EIM_D16__I2C2_SDA | PC,
> +		.gpio_mode = MX6_PAD_EIM_D16__GPIO3_IO16 | PC,
> +		.gp = IMX_GPIO_NR(3, 16)
> +	}
> +};
> +
>  /* I2C3 - IO expander  */
>  static struct i2c_pads_info i2c_pad_info2 = {
>  	.scl = {
> @@ -138,6 +152,7 @@ static struct i2c_pads_info i2c_pad_info2 = {
>  
>  static void setup_iomux_i2c(void)
>  {
> +	setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
>  	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
>  }
>  
> 
Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/bachmann/ot1200/ot1200.c b/board/bachmann/ot1200/ot1200.c
index a33d496..2237b7a 100644
--- a/board/bachmann/ot1200/ot1200.c
+++ b/board/bachmann/ot1200/ot1200.c
@@ -122,6 +122,20 @@  static void setup_iomux_features(void)
 
 #define PC MUX_PAD_CTRL(I2C_PAD_CTRL)
 
+/* I2C2 - EEPROM */
+static struct i2c_pads_info i2c_pad_info1 = {
+	.scl = {
+		.i2c_mode = MX6_PAD_EIM_EB2__I2C2_SCL | PC,
+		.gpio_mode = MX6_PAD_EIM_EB2__GPIO2_IO30 | PC,
+		.gp = IMX_GPIO_NR(2, 30)
+	},
+	.sda = {
+		.i2c_mode = MX6_PAD_EIM_D16__I2C2_SDA | PC,
+		.gpio_mode = MX6_PAD_EIM_D16__GPIO3_IO16 | PC,
+		.gp = IMX_GPIO_NR(3, 16)
+	}
+};
+
 /* I2C3 - IO expander  */
 static struct i2c_pads_info i2c_pad_info2 = {
 	.scl = {
@@ -138,6 +152,7 @@  static struct i2c_pads_info i2c_pad_info2 = {
 
 static void setup_iomux_i2c(void)
 {
+	setup_i2c(1, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info1);
 	setup_i2c(2, CONFIG_SYS_I2C_SPEED, 0x7f, &i2c_pad_info2);
 }