All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] T210: Add support for T210-based P2571 board
Date: Mon, 15 Jun 2015 11:58:57 -0600	[thread overview]
Message-ID: <557F1261.8030306@wwwdotorg.org> (raw)
In-Reply-To: <1433363711-29554-5-git-send-email-twarren@nvidia.com>

On 06/03/2015 02:35 PM, Tom Warren wrote:
> Based on Venice2, may change as P2571 board is fully
> brought up. Incorporates Stephen Warren's P2571 pinmux table.

> diff --git a/board/nvidia/p2571/max77620_init.c b/board/nvidia/p2571/max77620_init.c

> +void tegra_i2c_ll_write_addr(uint addr, uint config)
> +{
> +	struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE;
> +
> +	writel(addr, &reg->cmd_addr0);
> +	writel(config, &reg->cnfg);
> +}
> +
> +void tegra_i2c_ll_write_data(uint data, uint config)
> +{
> +	struct i2c_ctlr *reg = (struct i2c_ctlr *)TEGRA_DVC_BASE;
> +
> +	writel(data, &reg->cmd_data1);
> +	writel(config, &reg->cnfg);
> +}
> +

We really should put that into a lilbrary function, probably along with 
the definition of things like I2C_SEND_2_BYTES (or make some more helper 
functions to hide that too).

> +void pmic_enable_cpu_vdd(void)
> +{
> +	debug("%s entry\n", __func__);
> +
> +        //from TegraShell init script: Set GPIO5 to drive CPU_REG_EN
> +        //                              then 1.0V on ???

I don't think we should mention internal tool names in upstream source.

> +        debug("%s: Setting GPIO5 to push-pull out, logic high to enable CPU regulator\n", __func__);
> +        tegra_i2c_ll_write_addr(MAX77620_I2C_ADDR, 2);
> +        tegra_i2c_ll_write_data(0x2040, I2C_SEND_2_BYTES);      //data/reg
> +        udelay(10*1000);

Need spaces around "*".

I'm not sure what "data/reg" means?

> +
> +        tegra_i2c_ll_write_addr(MAX77620_I2C_ADDR, 2);
> +        tegra_i2c_ll_write_data(0x093B, I2C_SEND_2_BYTES);      //B3=1=logic high,B2=dontcare,B1=0=output,B0=1=push-pull
> +        udelay(10 * 1000);

Can we wrap that put that comment on a separate line, since it's rather 
long. I don't think U-Boot likes // comments.

Does this patch pass checkpatch?

> diff --git a/board/nvidia/p2571/pinmux-config-p2571.h b/board/nvidia/p2571/pinmux-config-p2571.h

I think I generated this a long time ago. I'd like to get this into 
tegra-pinmux-scripts, and make sure we're pulling in data from the 
latest board spreadsheet, before we commit this. I'll look into that today.

  reply	other threads:[~2015-06-15 17:58 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 20:35 [U-Boot] [PATCH 0/4] Tegra210 support for P2571 Tom Warren
2015-06-03 20:35 ` [U-Boot] [PATCH 1/4] ARM: Tegra210: Add SoC code/include files for T210 Tom Warren
2015-06-15 17:11   ` Stephen Warren
2015-06-15 20:04     ` Tom Warren
2015-06-16 20:26       ` Stephen Warren
2015-06-15 22:18     ` Tom Warren
2015-06-16 20:29       ` Stephen Warren
2015-06-16 21:30         ` Tom Warren
2015-06-03 20:35 ` [U-Boot] [PATCH 2/4] ARM: Tegra210: Add support to common Tegra source/config files Tom Warren
2015-06-15 17:18   ` Stephen Warren
2015-06-03 20:35 ` [U-Boot] [PATCH 3/4] P2571: dts: Add DT files for Tegra210/P2571 board Tom Warren
2015-06-15 17:23   ` Stephen Warren
2015-06-15 17:57     ` Tom Warren
2015-06-03 20:35 ` [U-Boot] [PATCH 4/4] T210: Add support for T210-based P2571 board Tom Warren
2015-06-15 17:58   ` Stephen Warren [this message]
2015-06-15 18:08     ` Tom Warren
2015-06-15 18:22     ` Stephen Warren
2015-06-15 19:41       ` Tom Warren
2015-06-17 20:07 ` [U-Boot] [PATCH 0/4] Tegra210 support for P2571 Stephen Warren
2015-06-17 22:44   ` Tom Warren
2015-06-19 22:25     ` Simon Glass

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=557F1261.8030306@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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.