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

Altera Arria10 hps #1

Open
x825 opened this issue May 16, 2022 · 3 comments
Open

Altera Arria10 hps #1

x825 opened this issue May 16, 2022 · 3 comments

Comments

@x825
Copy link

x825 commented May 16, 2022

I'm using Altera Arria10 hps, when I install the driver with debug mode define DEBUG, no massage showing or new device to i2c devices
/sys/bus/i2c/device/0-0020 not showing,

@lainwir3d requesting your kind support to addressing the issue and provide a solution.

@lainwir3d
Copy link
Owner

Hi x825,

There are no auto-detection, you have to provide a device-tree file containing the device description like this for example: https://github.com/lainwir3d/cy8c95xx/blob/master/cy8c95xx.dts

Another way is to manually register the device to the correct bus and correct device address (i2c-1 and 0x20 here for example):

echo gpio-cy8c95xx 0x20 > /sys/bus/i2c/devices/i2c-1/new_device

That's all I can say without more information.

Cheers

@x825
Copy link
Author

x825 commented May 31, 2022

I appreciate your kind support I added it manually
After that can't find the attribute in the path
-sh: can't open /sys/bus/i2c/devices/0-0020/ee_por_default: no such file
even after insmod the kernel module.

@lainwir3d
Copy link
Owner

It's weird. Are you sure 0x20 is the device address?

After you've inserted the module, when you do this: echo gpio-cy8c95xx 0x20 > /sys/bus/i2c/devices/i2c-1/new_device you need to replace 0x20 with your chip address on the i2c bus (0x20 is the default unless the PCB manufacturer has changed it), and you need to replace i2c-1 with the i2c bus the device in wired to on your pcb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants