PC Engines APU1C4 : no I2C visible

Questions & Discussion about the right Hardware to run IPFire on
Post Reply
democles
Posts: 21
Joined: June 4th, 2015, 5:01 pm
Location: Belgium

PC Engines APU1C4 : no I2C visible

Post by democles » March 9th, 2018, 5:55 pm

Hi,

Having an APU1 ( bios 9/8/14) board (which has an I2C-header), I want to use the LCDproc addon to display some info on a 16x2 display. To drive the display ( the popular HD44780 driver) I want to use an I2C 'backpack'based on the PCF8574AT.
To use the I2C you need the i2c-piix4 kernel module and the i2c-dev module.The first is loaded automaticly, the latter I inserted. No /dev/i2c-0/ entries.... i2cdetect -l gives no output
sensors-detect gives some:

Code: Select all

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): y
Using driver `i2c-piix4' for device 0000:00:14.0: ATI Technologies Inc SB600/SB700/SB800 SMBus
I unloaded both modules and modprobed them, first the i2c-dev (first entry hereunder), followed by the i2c-piix4 resulting in the error.

Code: Select all

18:07:09	kernel:	i2c /dev entries driver
18:07:29	kernel:	piix4_smbus 0000:00:14.0: SMBus base address index region 0xcd6 already in use!
18:07:29	kernel:	piix4_smbus: probe of 0000:00:14.0 failed with error -16
Googling this error I found this stating this should be related to acpi. :-\
Did some of you has a working i2C on an APU ? If so, on which bios, which kernel ? (I build the 3.4.79-ipfire x86-64, to be sure 2IC core was build in)

Many thanks !
D
democles, never to old to learn 8)

democles
Posts: 21
Joined: June 4th, 2015, 5:01 pm
Location: Belgium

Re: PC Engines APU1C4 : no I2C visible

Post by democles » March 10th, 2018, 9:47 pm

Update : I've got the /dev/i2c-0 and /dev/i2c-1 by building my own coreboot rom for the apu1 board based on the current (git) code and the howto on the wiki to build it!
My rom boots but I do not have the Intro/F10 key to chose my medium to boot from..... have to figure this out. My temporary fix is to reflash with a Tinycore usbstick the stock rom 090814 an program the boot order ( USB1>USB2>SATA2). Install ipfire with the stock rom and then flash the new one.... Not ideal but it works!

I'v forced ipfire to core 119 to have the i2cdetect tool and this tool sees the PCF8574AT chip on address 0x3F !

Still have troubles to get some output of lcdproc onto my 16x2 LCD....using the HD44780 and the I2C backpack....
When launching the lcdproc via /etc/init.d/lcdproc start I've got green OK on the console but nothing on the screen... probably related to pinning of PCF8574AT and the LCD....
Keep on searching....
democles, never to old to learn 8)

User avatar
Arne.F
Core Developer
Core Developer
Posts: 7976
Joined: May 7th, 2006, 8:57 am
Location: BS <-> NDH
Contact:

Re: PC Engines APU1C4 : no I2C visible

Post by Arne.F » March 13th, 2018, 8:44 am

There is something wrong. The Address of a PCF8574xT is not configurable to 0x3F.
PCF8574T: 0x4?
PCF8574AT: 0x7?

http://cdn-reichelt.de/documents/datenb ... %23PHI.pdf
Arne

Support the project on the IPFire whishlist!

Image

Image

Image
PS: I will not answer support questions via email and ignore IPFire related messages on my non IPFire.org mail addresses.

User avatar
Arne.F
Core Developer
Core Developer
Posts: 7976
Joined: May 7th, 2006, 8:57 am
Location: BS <-> NDH
Contact:

Re: PC Engines APU1C4 : no I2C visible

Post by Arne.F » March 13th, 2018, 9:31 am

Correction!
0x3F is ok. In i2c dectect is the Address shifted right for one bit.
So 0x7E in notation with RW bit is turned to 0x3F...
Arne

Support the project on the IPFire whishlist!

Image

Image

Image
PS: I will not answer support questions via email and ignore IPFire related messages on my non IPFire.org mail addresses.

democles
Posts: 21
Joined: June 4th, 2015, 5:01 pm
Location: Belgium

Re: PC Engines APU1C4 : no I2C visible

Post by democles » March 13th, 2018, 6:39 pm

Hi Arne,
Thanks for posting ... my I2C/Serial backpack is like this and detected on 0x3f. The reason why the display does not work yet is because the used pinorder for the PCF (see on I2Cexpanders for th eHD44780) LCDproc programmed is different from the board I have. On the SFpage of LCDproc others modified the code to get it wright. I'll recompile the lcdproc (X86_64) and do the test. I'll provide some feedback later ;-)

D
democles, never to old to learn 8)

democles
Posts: 21
Joined: June 4th, 2015, 5:01 pm
Location: Belgium

Re: PC Engines APU1C4 : no I2C visible

Post by democles » March 17th, 2018, 12:53 pm

Some updates.
Build new corebootrom for APU1 board from PCengines.

Installed IPFIRE 119 (X86-64) and added i2c-dev to /etc/sysconfig/modules to load this module from start. Did some basic tests :

Code: Select all

[root@ipfire ~]# i2cdetect -l 1
i2c-0	smbus     	SMBus PIIX4 adapter at 0b00     	SMBus adapter
i2c-1	smbus     	SMBus PIIX4 adapter at 0b20     	SMBus adapter

[root@ipfire ~]# i2cdetect -F 1 
Functionalities implemented by /dev/i2c-1:
I2C                              no
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               no
SMBus Block Write                yes
SMBus Block Read                 yes
SMBus Block Process Call         no
SMBus PEC                        no
I2C Block Write                  no
I2C Block Read                   no

[root@ipfire ~]# i2cdetect -a 1
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-1.
I will probe address range 0x00-0x7f.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 3f 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
I included a modified lcdproc ( modified with code from here) in my own build of ipfire ( installed it and then added lcdproc via pakfire install lcdproc ( i hope this installs the version on my install usb) :-\ and adapted LCDd.conf as per instructions provided in the link. Starting LCDPROC via /etc/init.d/lcdproc start gives:

Code: Select all

[root@ipfire ~]# /etc/init.d/lcdproc start
Starting LCDd...                                                       [  OK  ]
Starting lcdproc...                                                    [  OK  ]
but no out on the LCD and this in /var/log/messages :

Code: Select all

1362.073205] i2c-dev: i2c-1 writing 1 bytes.
[ 1362.073210] i2c i2c-1: I2C level transfers not supported
[ 1362.073231] i2c-dev: i2c-1 writing 1 bytes.
[ 1362.073235] i2c i2c-1: I2C level transfers not supported
[ 1362.073255] i2c-dev: i2c-1 writing 1 bytes.
[ 1362.073260] i2c i2c-1: I2C level transfers not supported
who can help me further ? Thx
democles, never to old to learn 8)

democles
Posts: 21
Joined: June 4th, 2015, 5:01 pm
Location: Belgium

Re: PC Engines APU1C4 : no I2C visible

Post by democles » April 2nd, 2018, 11:32 am

Hi, nobody did some testing with I2C ?

The fact that i2c detect gives no for I2C functionalities ( whereas SMB is mostly yes) is this hardware of software related? On my Pi I get yes for I2C functions and the LCDproc works....

Code: Select all

[root@ipfire ~]# i2cdetect -F 1 
Functionalities implemented by /dev/i2c-1:
I2C                              no
SMBus Quick Command              yes
SMBus Send Byte                  yes
SMBus Receive Byte               yes
SMBus Write Byte                 yes
SMBus Read Byte                  yes
SMBus Write Word                 yes
SMBus Read Word                  yes
SMBus Process Call               no
SMBus Block Write                yes
SMBus Block Read                 yes
SMBus Block Process Call         no
SMBus PEC                        no
I2C Block Write                  no
I2C Block Read                   no
Any help appreciated.
D
democles, never to old to learn 8)

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests