Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System: UCD driver is claiming device but raw access required for workarounds #751

Closed
yadlapati opened this issue Nov 7, 2016 · 11 comments
Assignees
Labels

Comments

@yadlapati
Copy link

yadlapati commented Nov 7, 2016

Paul Robertson is seeing this issue:

Having problems with some devices on I2C12 after loading latest BMC image. Being unable to talk to UCD chip, dev 0x64, causing problems with power on script.

root@witherspoon:~# i2cdetect -y 11
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- 0c -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- UU -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
root@witherspoon:~# uname -r
4.7.10-c5682cbc3542add705e35152329436067bb1f94a

root@witherspoon:~# cat /etc/os-release
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="v1.99.0-216"
VERSION_ID="v1.99.0-216-gcecba5f-dirty"
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) v1.99.0-216"
BUILD_ID="v1.99.0"

Following is the output (correct one) with older driver:

root@w3:~# i2cdetect -y 11
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- 0c -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- 32 -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: 60 -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
root@w3:~# cat /etc/os-release 
ID="openbmc-phosphor"
NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro)"
VERSION="0.1.0 (krogoth)"
VERSION_ID="v0.6-188-g2ad67f6-dirty"
PRETTY_NAME="Phosphor OpenBMC (Phosphor OpenBMC Project Reference Distro) 0.1.0 (krogoth)"
BUILD_ID="v0.6"
@adamliyi
Copy link
Member

adamliyi commented Nov 7, 2016

This may not be an bug. May be related with #653
@mine260309 , what do you think?

@shenki
Copy link
Member

shenki commented Nov 7, 2016

This is normal system behaviour when a driver is loaded and bound to the address on the bus. As the kernel driver is in control of the device, you see UU at the address when using i2cdetect.

We need to provide Paul with documentation on how to use the pmbus sysfs files to perform the tests that he is doing. What are these tests? Which bits of information is he looking for?

@paulgrobertson
Copy link

paulgrobertson commented Nov 7, 2016

Here are the UCD i2c commands that are failing. How do we do this with UCD driver installed?

i2cset -y 11 0x64 0xF7 0x00 i
i2cset -y 11 0x64 0xF8 0x15 0x6E 0x80 0x0A 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 i
i2cset -y 11 0x64 0xF7 0x01 i
i2cset -y 11 0x64 0xF8 0x15 0x16 0x80 0x14 0x00 0x00 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 i
i2cset -y 11 0x64 0xD2 0x09 0x3F 0xFF 0x2F 0x0A 0x00 0x06 0x00 0x00 0x02 i
i2cset -y 11 0x64 0x00 0x0E i
i2cset -y 11 0x64 0x02 0x1A i
i2cset -y 11 0x64 0x00 0x0F i
i2cset -y 11 0x64 0x02 0x1A i

@mine260309
Copy link
Contributor

@paulgrobertson I know a way to do the test, but it could be a bit complicated: remove ucd90160@64 part from arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts, rebuild the kernel, and then do the above test.
Maybe @shenki have better ways.

@paulgrobertson
Copy link

The purpose of the above sequence of i2c command is to reconfigure the UCD to delete the VCSA and VCSB voltage rails from sequencer, reducing total rails from 16 to 14. Does the ucd9xxx driver even have the functional capability to do this type of reconfiguration? How?

@shenki shenki changed the title Witherspoon: some I2C12 devices not working with new code Witherspoon: UCD driver is claiming device but raw access required for workarounds Nov 9, 2016
@shenki shenki self-assigned this Nov 9, 2016
@shenki
Copy link
Member

shenki commented Nov 10, 2016

I think you're correct that the driver does not provide the functionality we need.

While I work through the issue, you can unbind the driver from the device. This allows you to use your i2cset command again. I assume once the host has been brought up you could re-bind the driver.

To unbind:

cd /sys/bus/i2c/drivers/ucd9000/
echo 0-0064 > unbind

To re-bind once you're finished with the sequence:

cd /sys/bus/i2c/drivers/ucd9000/
echo 0-0064 > bind

I could not test this, so I am guessing at the 0-0064 name. You should see a directory inside /sys/bus/i2c/drivers/ucd9000/ with the correct name; use that if it's not 0-0064.

@shenki
Copy link
Member

shenki commented Nov 10, 2016

I emailed @paulgrobertson with these details

@paulgrobertson
Copy link

unbind/bind work around verified successfully.

@geissonator
Copy link
Contributor

Once we provide official power on support in the code, will this i2c command be required anymore (i.e. is there anything to do with this bug or do we just need to get official power on support in)?

@paulgrobertson
Copy link

Yes. VCS problem not fixed until dd2.0

@rfrandse rfrandse added the bug label Feb 9, 2017
@shenki
Copy link
Member

shenki commented Sep 25, 2017

A solution has been in place for the past several months

@shenki shenki closed this as completed Sep 25, 2017
@rfrandse rfrandse changed the title Witherspoon: UCD driver is claiming device but raw access required for workarounds System: UCD driver is claiming device but raw access required for workarounds Nov 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants