From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: linux-tegra@vger.kernel.org, Tom Warren <twarren@nvidia.com>
Subject: [PATCH v3 0/9] tegra: Add I2C driver and associated parts
Date: Fri, 3 Feb 2012 17:13:51 -0800 [thread overview]
Message-ID: <1328318041-10943-1-git-send-email-sjg@chromium.org> (raw)
This series brings in an I2C driver for Tegra which can be
configured by a flat device tree.
It supports 8- and 16-bit addresses and both the normal I2C ports and
the DVC port (for controlling the power management unit (PMU)).
Recent Linux bindings are used, based on example .dts files found in
branch for-3.3/dt at:
git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra.git
(I could not find the actual binding documentation to include here)
Note: There is still an open question on I2C2 pinmux. The idea of an
'nvidia,pinmux-config' settings did not find favour, so we have no way
of passing the correct config to funcmux for this port. Therefore we have
disabled it for now. The impact on Seaboard is that the TPM and battery
charger cannot be accessed.
I am sending this series to the linux-tegra list also, and will do so for
future series also. This is because anything to do with fdt also affects
the kernel bindings. Please advise if this is not useful.
Changes in v2:
- Add build warning if CONFIG_SYS_I2C_INIT_BOARD is not defined
- Adjust definitions to fit new peripheral clock bindings
- Change 'speed' to 'clock-frequency'
- Change i2c array to static
- Disable port 2 as it is not used
- Make i2c/dvc decision come from fdt
- Remove i2c configuring using CONFIG (use fdt instead)
- Remove u-boot,pinmux binding (sadly)
- Return an error if an unavailable i2c bus is selected
- Simplify code in i2c_addr_ok()
- Tidy comment style
- Use DIV_ROUND_UP() instead of a home-grown macro
- Use new fdtdec alias decode function
Changes in v3:
- Add TEGRA_I2C_NUM_CONTROLLERS to select number of I2C ports
- Add comment on how to select pinmux for I2C2
- Add comments and warning for mixed alias use in fdtdec
- Add new patch to support 16-bit clock divisors required by I2C
- Change i2c_init() to reset speed and override the fdt setting
- Fix i2c_addr_ok() function to check addresses correctly
- Move speed setting from tegra20.dtsi to board .dts file
- Rename driver to tegra_i2c since it will later be shared with Tegra3
- Tidy up I2C speed selection to use the peripheral clock
- Use CONFIG_TEGRA_I2C instead of CONFIG_TEGRA2_I2C
Simon Glass (8):
tegra: Rename NV_PA_PMC_BASE to TEGRA2_PMC_BASE
fdt: Add function to allow aliases to refer to multiple nodes
tegra: Enhance clock support to handle 16-bit clock divisors
tegra: fdt: i2c: Add extra I2C bindings for U-Boot
tegra: i2c: Initialise I2C on Nvidia boards
tegra: i2c: Select I2C ordering for Seaboard
tegra: i2c: Select number of controllers for Tegra2 boards
tegra: i2c: Enable I2C on Seaboard
Yen Lin (1):
tegra: i2c: Add I2C driver
arch/arm/cpu/armv7/tegra2/ap20.c | 10 +-
arch/arm/cpu/armv7/tegra2/board.c | 2 +-
arch/arm/cpu/armv7/tegra2/clock.c | 63 ++-
arch/arm/dts/tegra20.dtsi | 6 +-
arch/arm/include/asm/arch-tegra2/clk_rst.h | 10 +-
arch/arm/include/asm/arch-tegra2/tegra2.h | 4 +-
arch/arm/include/asm/arch-tegra2/tegra_i2c.h | 160 ++++++++
board/nvidia/common/board.c | 7 +
board/nvidia/dts/tegra2-seaboard.dts | 21 +
drivers/i2c/Makefile | 1 +
drivers/i2c/tegra_i2c.c | 566 ++++++++++++++++++++++++++
include/configs/seaboard.h | 8 +
include/configs/tegra2-common.h | 3 +
include/fdtdec.h | 25 ++
lib/fdtdec.c | 24 +-
15 files changed, 873 insertions(+), 37 deletions(-)
create mode 100644 arch/arm/include/asm/arch-tegra2/tegra_i2c.h
create mode 100644 drivers/i2c/tegra_i2c.c
--
1.7.7.3
next reply other threads:[~2012-02-04 1:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-04 1:13 Simon Glass [this message]
[not found] ` <1328318041-10943-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-04 1:13 ` [PATCH v3 1/9] tegra: Rename NV_PA_PMC_BASE to TEGRA2_PMC_BASE Simon Glass
2012-02-04 1:13 ` [PATCH v3 2/9] fdt: Add function to allow aliases to refer to multiple nodes Simon Glass
2012-02-04 1:13 ` [PATCH v3 3/9] tegra: Enhance clock support to handle 16-bit clock divisors Simon Glass
[not found] ` <1328318041-10943-4-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-10 17:52 ` Tom Warren
2012-02-04 1:13 ` [PATCH v3 4/9] tegra: fdt: i2c: Add extra I2C bindings for U-Boot Simon Glass
[not found] ` <1328318041-10943-5-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-10 6:29 ` [U-Boot] " Heiko Schocher
2012-02-04 1:13 ` [PATCH v3 5/9] tegra: i2c: Add I2C driver Simon Glass
[not found] ` <1328318041-10943-6-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-09 23:17 ` Yen Lin
2012-02-10 6:29 ` Heiko Schocher
2012-02-04 1:13 ` [PATCH v3 6/9] tegra: i2c: Initialise I2C on Nvidia boards Simon Glass
[not found] ` <1328318041-10943-7-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-10 6:30 ` Heiko Schocher
2012-02-04 1:13 ` [PATCH v3 7/9] tegra: i2c: Select I2C ordering for Seaboard Simon Glass
[not found] ` <1328318041-10943-8-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-10 6:30 ` Heiko Schocher
2012-02-04 1:13 ` [PATCH v3 8/9] tegra: i2c: Select number of controllers for Tegra2 boards Simon Glass
[not found] ` <1328318041-10943-9-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-02-10 6:30 ` Heiko Schocher
2012-02-04 1:14 ` [PATCH v3 9/9] tegra: i2c: Enable I2C on Seaboard Simon Glass
2012-02-10 6:30 ` Heiko Schocher
2012-02-09 7:02 ` [PATCH v3 0/9] tegra: Add I2C driver and associated parts Heiko Schocher
[not found] ` <4F336F75.3010202-ynQEQJNshbs@public.gmane.org>
2012-02-09 17:35 ` [U-Boot] " Tom Warren
[not found] ` <5FBF8E85CA34454794F0F7ECBA79798F3792269860-wAPRp6hVlRhDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-02-10 6:22 ` Heiko Schocher
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=1328318041-10943-1-git-send-email-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=linux-tegra@vger.kernel.org \
--cc=twarren@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).