All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/7] i.MX6DL: mamoj: Add I2C support
Date: Thu, 26 Apr 2018 09:18:28 +0200	[thread overview]
Message-ID: <ebab373e-2e49-3f93-9ca4-4893404ab57d@denx.de> (raw)
In-Reply-To: <20180411123615.15130-3-jagan@amarulasolutions.com>

On 11/04/2018 14:36, Jagan Teki wrote:
> i.MX6DL Mamoj has i2c3 and i2c4 buses, add support
> through DM_I2C with dt definition.
> 
> i2c log:
> =======
> => i2c bus
> Bus 2:  i2c at 021a8000
> Bus 3:  i2c at 021f8000
> => i2c dev 2
> Setting bus to 2
> => i2c speed 400000
> Setting bus speed to 400000 Hz
> => i2c probe
> Valid chip addresses: 20 51 53
> => i2c md 53 0xff
> 00ff: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
> => i2c md 51 0xff
> 00ff: a8 08 40 50 09 43 46 52 42 18 80 8e ae a9 d0 53    .. at P.CFRB......S
> => i2c dev 3
> Setting bus to 3
> => i2c speed 100000
> Setting bus speed to 100000 Hz
> => i2c probe
> Valid chip addresses: 08 40 48 4B
> => i2c md 08 0xff
> 00ff: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
> 
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> Signed-off-by: Simone CIANNI <simone.cianni@bticino.it>
> Signed-off-by: Raffaele RECALCATI <raffaele.recalcati@bticino.it>
> ---
>  arch/arm/dts/imx6dl-mamoj.dts  | 28 ++++++++++++++++++++++++++++
>  arch/arm/mach-imx/mx6/Kconfig  |  1 +
>  configs/imx6dl_mamoj_defconfig |  2 ++
>  3 files changed, 31 insertions(+)
> 
> diff --git a/arch/arm/dts/imx6dl-mamoj.dts b/arch/arm/dts/imx6dl-mamoj.dts
> index 068d518de3..558043445b 100644
> --- a/arch/arm/dts/imx6dl-mamoj.dts
> +++ b/arch/arm/dts/imx6dl-mamoj.dts
> @@ -21,6 +21,20 @@
>  	status = "okay";
>  };
>  
> +&i2c3 {
> +	clock-frequency = <400000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c3>;
> +	status = "okay";
> +};
> +
> +&i2c4 {
> +	clock-frequency = <100000>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_i2c4>;
> +	status = "okay";
> +};
> +
>  &uart3 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&pinctrl_uart3>;
> @@ -60,6 +74,20 @@
>  		>;
>  	};
>  
> +	pinctrl_i2c3: i2c3grp {
> +		fsl,pins = <
> +			MX6QDL_PAD_GPIO_3__I2C3_SCL     0x4001b8b1
> +			MX6QDL_PAD_GPIO_6__I2C3_SDA     0x4001b8b1
> +		>;
> +	};
> +
> +	pinctrl_i2c4: i2c4grp {
> +		fsl,pins = <
> +			MX6QDL_PAD_GPIO_7__I2C4_SCL	0x4001b8b1
> +			MX6QDL_PAD_GPIO_8__I2C4_SDA	0x4001b8b1
> +		>;
> +	};
> +
>  	pinctrl_uart3: uart3grp {
>  		fsl,pins = <
>  			MX6QDL_PAD_EIM_D24__UART3_TX_DATA	0x1b0b1
> diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
> index c6acba7f85..5007fe3941 100644
> --- a/arch/arm/mach-imx/mx6/Kconfig
> +++ b/arch/arm/mach-imx/mx6/Kconfig
> @@ -233,6 +233,7 @@ config TARGET_MX6DL_MAMOJ
>  	select DM
>  	select DM_ETH
>  	select DM_GPIO
> +	select DM_I2C
>  	select DM_MMC
>  	select DM_THERMAL
>  	select SPL
> diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig
> index e45ca9a05a..e2a18d2c30 100644
> --- a/configs/imx6dl_mamoj_defconfig
> +++ b/configs/imx6dl_mamoj_defconfig
> @@ -12,6 +12,7 @@ CONFIG_SYS_PROMPT="=> "
>  CONFIG_CRC32_VERIFY=y
>  CONFIG_CMD_MEMTEST=y
>  CONFIG_CMD_GPIO=y
> +CONFIG_CMD_I2C=y
>  CONFIG_CMD_MMC=y
>  CONFIG_CMD_MII=y
>  CONFIG_CMD_PING=y
> @@ -37,3 +38,4 @@ CONFIG_USB_GADGET_VENDOR_NUM=0x0525
>  CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
>  CONFIG_CI_UDC=y
>  CONFIG_IMX_THERMAL=y
> +CONFIG_SYS_I2C_MXC=y
> 

Reviewed-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

  reply	other threads:[~2018-04-26  7:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-11 12:36 [U-Boot] [PATCH v2 0/7] i.MX6DL: Add BTicino Mamoj board support Jagan Teki
2018-04-11 12:36 ` [U-Boot] [PATCH v2 1/7] i.MX6: board: Add BTicino i.MX6DL Mamoj initial support Jagan Teki
2018-04-26  7:17   ` Stefano Babic
2018-04-26  7:33     ` Jagan Teki
2018-04-26  7:46       ` Stefano Babic
2018-04-26 10:43         ` Jagan Teki
2018-05-02 12:41         ` Jagan Teki
2018-05-03  8:38           ` Stefano Babic
2018-04-11 12:36 ` [U-Boot] [PATCH v2 2/7] i.MX6DL: mamoj: Add I2C support Jagan Teki
2018-04-26  7:18   ` Stefano Babic [this message]
2018-04-11 12:36 ` [U-Boot] [PATCH v2 3/7] i.MX6DL: mamoj: Add PFUZE100 support Jagan Teki
2018-04-26  7:18   ` Stefano Babic
2018-04-11 12:36 ` [U-Boot] [PATCH v2 4/7] configs: imx6dl_mamoj: Enable fastboot and ums Jagan Teki
2018-04-11 12:36 ` [U-Boot] [PATCH v2 5/7] configs: imx6dl-mamoj: Add DFU support Jagan Teki
2018-04-11 12:36 ` [U-Boot] [PATCH v2 6/7] configs: imx6dl-mamoj: Add Falcon mode support Jagan Teki
2018-04-11 12:36 ` [U-Boot] [PATCH v2 7/7] configs: imx6dl-mamoj: Enable HAB Jagan Teki
2018-04-19 11:34 ` [U-Boot] [PATCH v2 0/7] i.MX6DL: Add BTicino Mamoj board support Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ebab373e-2e49-3f93-9ca4-4893404ab57d@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.