linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Robert Hancock <hancock@sedsystems.ca>
Cc: Michal Simek <michal.simek@xilinx.com>, linux-hwmon@vger.kernel.org
Subject: Re: Linux driver for IRPS5401 - status reg not found
Date: Tue, 31 Mar 2020 14:38:50 +0200	[thread overview]
Message-ID: <b4322641-5918-40c4-a887-dcfa20db1733@xilinx.com> (raw)
In-Reply-To: <20200330194859.GA12459@roeck-us.net>

On 30. 03. 20 21:48, Guenter Roeck wrote:
> On Mon, Mar 30, 2020 at 01:09:56PM -0600, Robert Hancock wrote:
>> On 2020-03-30 12:48 p.m., Guenter Roeck wrote:
>>> On 3/30/20 8:42 AM, Robert Hancock wrote:
>>>> On 2020-03-30 9:24 a.m., Guenter Roeck wrote:
>>>>> On 3/30/20 4:33 AM, Michal Simek wrote:
>>>>>> Hi Robert and Guenter,
>>>>>>
>>>>>> Xilinx boards are using IRPS5401 chips and I have tried to use your driver.
>>>>>> I have checked that u-boot can detect that devices and read it.
>>>>>>
>>>>>> ZynqMP> i2c probe
>>>>>> Valid chip addresses: 0C 13 14 20 43 44 74
>>>>>> ZynqMP> i2c md 13 0 10
>>>>>> 0000: 00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08    ................
>>>>>> ZynqMP> i2c md 14 0 10
>>>>>> 0000: 00 08 00 08 00 08 00 08 00 08 00 08 00 08 00 08    ................
>>>>>> ZynqMP> i2c md 43 0 10
>>>>>> 0000: 00 98 ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
>>>>>> ZynqMP> i2c md 44 0 10
>>>>>> 0000: 00 8a ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................
>>>>>> ZynqMP>
>>>>>>
>>>>>> Here is DT fragment which I use (it is under i2c mux)
>>>>>>
>>>>>> 185                         irps5401_43: irps5401@43 {
>>>>>> 186                                 compatible = "infineon,irps5401";
>>>>>> 187                                 reg = <0x43>; /* pmbus / i2c 0x13 */
>>>>>
>>>>> Does that mean the mux is at 0x13 ?
>>>>
>>>> These chips have two I2C addresses with two separate interfaces: the standard PMBus-compatible interface at an address between 0x40-0x4f, which the irps5401 driver supports, and another proprietary interface at an address between 0x10-0x1f. The specific addresses in those ranges is configured by the value of a resistor on one of the pins.
>>>>
>>>
>>> Ah, sorry, I didn't get that part earlier. Unfortunately, the datasheet
>>> doesn't seem to include a description of the proprietary interface
>>> registers/commands, or maybe I am missing it.
>>>
>>> The chip datasheet does talk a lot about various MTP registers.
>>> Part of that register set is Write_protect_section and
>>> Read_protect_section. Maybe the PMBus registers are all read
>>> protected ?
>>
>> There is a programming guide and register map on the Infineon site under
>> "Additional Technical Information" here:
>>
>> https://www.infineon.com/cms/en/product/power/dc-dc-converters/integrated-pol-voltage-regulators/irps5401m/
>>
> Based on that my best guess would be that either the chips are not at the
> expected addresses, or that the registers are indeed read protected.

I am able to detect that devices.

root@zcu104-debian:/etc/apt# i2cdetect -y -r 3
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- 13 14 -- -- -- -- -- -- -- -- -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- 43 44 -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- UU -- -- --

Also disable/enable rail on 0x44 and see power good led on/off

root@zcu104-debian:~# i2cset -y 3 0x44 0 3
root@zcu104-debian:~# i2cset -y 3 0x44 1 0x80 b
root@zcu104-debian:~# i2cget -y 3 0x44 0x78 b

I can't read the rest of regs but checking with hw guys what they have
done with these devices.

Anyway thanks for your help and advices.

Thanks,
Michal



  reply	other threads:[~2020-03-31 12:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 11:33 Linux driver for IRPS5401 - status reg not found Michal Simek
2020-03-30 15:24 ` Guenter Roeck
2020-03-30 15:42   ` Robert Hancock
2020-03-30 18:48     ` Guenter Roeck
2020-03-30 19:09       ` Robert Hancock
2020-03-30 19:48         ` Guenter Roeck
2020-03-31 12:38           ` Michal Simek [this message]
2020-04-09 14:29             ` Michal Simek
2020-04-09 15:16               ` Guenter Roeck
2020-04-09 15:30                 ` Robert Hancock
2020-04-09 21:23                   ` Guenter Roeck
2020-04-10  7:19                     ` Michal Simek
2020-03-30 15:46   ` Michal Simek
2020-03-30 16:52     ` Guenter Roeck

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=b4322641-5918-40c4-a887-dcfa20db1733@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=hancock@sedsystems.ca \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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).