Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1191629

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode

From Wolfram Sang <wsa@the-dreams.de>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/4] i2c: tegra: implement slave mode
Date 2015-07-24 11:30 +0200
Message-ID <pPHsK-1CX-13@gated-at.bofh.it> (permalink)
References <pOqki-43z-13@gated-at.bofh.it> <pOqNk-4U6-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Andrey,

On Mon, Jul 20, 2015 at 11:35:43PM +0300, Andrey Danin wrote:
> Initialization code is based on NVEC driver.
> 
> There is a HW bug in AP20 that was also mentioned in kernel sources
> for Toshiba AC100.
> 
> Signed-off-by: Andrey Danin <danindrey@mail.ru>

Still doesn't work for me and I think I understand why. Do you run your
I2C controller in slave mode only? That might work, but using it in
master/slave mode simultanously won't work yet as I see it:

* After every transfer (as master), clocks get disabled. I assume the IP
  core won't be able to detect its own address then.

* There is this code in tegra_i2c_init():

	if (!i2c_dev->is_dvc) {
		u32 sl_cfg = i2c_readl(i2c_dev, I2C_SL_CNFG);
		sl_cfg |= I2C_SL_CNFG_NACK | I2C_SL_CNFG_NEWSL;
		i2c_writel(i2c_dev, sl_cfg, I2C_SL_CNFG);
		i2c_writel(i2c_dev, 0xfc, I2C_SL_ADDR1);
		i2c_writel(i2c_dev, 0x00, I2C_SL_ADDR2);

	}

  It probably messes up the slave initialization in tegra_reg_slave().
  At least I see that the slave address gets overwritten when I peek
  the register after boot.

Does that make sense to you?

Thanks,

   Wolfram

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 1/4] i2c: tegra: implement slave mode Wolfram Sang <wsa@the-dreams.de> - 2015-07-24 11:30 +0200
  Re: [PATCH v3 1/4] i2c: tegra: implement slave mode Andrey Danin <danindrey@mail.ru> - 2015-07-24 12:20 +0200
    Re: [PATCH v3 1/4] i2c: tegra: implement slave mode Wolfram Sang <wsa@the-dreams.de> - 2015-07-24 13:00 +0200

csiph-web