All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Menon <nm@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [[PATCH v3 2/2] gpio: omap5-uevm: Configure the tca6424 gpio expander
Date: Wed, 10 Jul 2013 18:56:15 -0500	[thread overview]
Message-ID: <51DDF49F.2050805@ti.com> (raw)
In-Reply-To: <1373486763-13091-2-git-send-email-dmurphy@ti.com>

On 07/10/2013 03:06 PM, Dan Murphy wrote:
> Configure the tca6424 gpio expander
> This allows use of the debug and tri color LEDs.
>
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---
>   board/ti/omap5_uevm/evm.c      |   21 +++++++++++++++++++++
>   board/ti/omap5_uevm/mux_data.h |    2 ++
>   include/configs/omap5_uevm.h   |    5 +++++
>   3 files changed, 28 insertions(+)
>
> diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c
> index 90046e8..0e9a559 100644
> --- a/board/ti/omap5_uevm/evm.c
> +++ b/board/ti/omap5_uevm/evm.c
> @@ -26,6 +26,7 @@
>   #include <palmas.h>
>   #include <asm/arch/sys_proto.h>
>   #include <asm/arch/mmc_host_def.h>
> +#include <tca642x.h>
>
>   #include "mux_data.h"
>
> @@ -35,6 +36,24 @@ const struct omap_sysinfo sysinfo = {
>   	"Board: OMAP5430 EVM\n"
>   };
>
> +/* @brief tca642x_init - Initial states for the GPIO expander
documentation style?
/*
  * @brief
?
> + * input reg, output reg, polarity reg, configuration reg
> + */
> +struct tca642x_bank_info tca642x_init[] = {
> +	{ .input_reg = 0x00,
> +	  .output_reg = 0x04,
> +	  .polarity_reg = 0x00,
> +	  .configuration_reg = 0x80 },
> +	{ .input_reg = 0x00,
> +	  .output_reg = 0x00,
> +	  .polarity_reg = 0x00,
> +	  .configuration_reg = 0xff },
> +	{ .input_reg = 0x00,
> +	  .output_reg = 0x00,
> +	  .polarity_reg = 0x00,
> +	  .configuration_reg = 0x40 },
> +};
> +
>   /**
>    * @brief board_init
>    *
> @@ -46,6 +65,8 @@ int board_init(void)
>   	gd->bd->bi_arch_number = MACH_TYPE_OMAP5_SEVM;
>   	gd->bd->bi_boot_params = (0x80000000 + 0x100); /* boot param addr */
>
> +	tca642x_set_inital_state(CONFIG_SYS_I2C_TCA642X_ADDR, tca642x_init);
> +
>   	return 0;
>   }
>
> diff --git a/board/ti/omap5_uevm/mux_data.h b/board/ti/omap5_uevm/mux_data.h
> index a82795d..7e6415e 100644
> --- a/board/ti/omap5_uevm/mux_data.h
> +++ b/board/ti/omap5_uevm/mux_data.h
> @@ -56,6 +56,8 @@ const struct pad_conf_entry core_padconf_array_essential[] = {
>   	{USBD0_HS_DP, (IEN | M0)},	/*  USBD0_HS_DP */
>   	{USBD0_HS_DM, (IEN | M0)},	/*  USBD0_HS_DM */
>   	{USBD0_SS_RX, (IEN | M0)},	/*  USBD0_SS_RX */
> +	{I2C5_SCL, (IEN | M0)}, /* I2C5_SCL */
nit pick -> SCL (or i2c clk) is out put from master - always. IEN 
enables full duplex, but anyways.. just a nitpick :)

> +	{I2C5_SDA, (IEN | M0)}, /* I2C5_SDA */
>
>   };
>
> diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
> index 46dacc2..bee1278 100644
> --- a/include/configs/omap5_uevm.h
> +++ b/include/configs/omap5_uevm.h
> @@ -53,6 +53,11 @@
>   #define CONFIG_PARTITION_UUIDS
>   #define CONFIG_CMD_PART
>
> +#define CONFIG_TCA642X
> +#define CONFIG_CMD_TCA642X
> +#define CONFIG_SYS_I2C_TCA642X_BUS_NUM 4
> +#define CONFIG_SYS_I2C_TCA642X_ADDR 0x22
> +
>   #define CONFIG_SYS_PROMPT		"OMAP5432 uEVM # "
>
>   #define CONSOLEDEV		"ttyO2"
>

Else,
no further comments from me.
--
Regards,
Nishanth Menon

  reply	other threads:[~2013-07-10 23:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 20:06 [U-Boot] [[PATCH v3 1/2] gpio: tca642x: Add the tca642x gpio expander driver Dan Murphy
2013-07-10 20:06 ` [U-Boot] [[PATCH v3 2/2] gpio: omap5-uevm: Configure the tca6424 gpio expander Dan Murphy
2013-07-10 23:56   ` Nishanth Menon [this message]
2013-07-11 14:30     ` Tom Rini
2013-07-11 15:10       ` Dan Murphy
2013-07-11 15:55     ` Dan Murphy
2013-07-11 18:02       ` Nishanth Menon
2013-07-12 17:30         ` Dan Murphy
2013-07-12 21:55           ` Nishanth Menon
2013-07-11 14:31 ` [U-Boot] [[PATCH v3 1/2] gpio: tca642x: Add the tca642x gpio expander driver Tom Rini
2013-07-11 15:11   ` Dan Murphy
  -- strict thread matches above, loose matches on Subject: below --
2013-07-11 18:10 [U-Boot] [PATCH " Dan Murphy
2013-07-11 18:10 ` [U-Boot] [PATCH v3 2/2] gpio: omap5-uevm: Configure the tca6424 gpio expander Dan Murphy

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=51DDF49F.2050805@ti.com \
    --to=nm@ti.com \
    --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.