Re: PCF8574 I2C configuration for 14.0-CURRENT on a RPi2B

Don Kuenz <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
Brian Scott wrote:
>
> I think I'm like most people here, trying to guess what you are wanting
> to achieve. Pins 2 and 3 are already avalable as iic1 provided you include:
>
> dtparam=i2c_arm
>
> in your config.txt file. There's a little more magic needed on the rpi4
> but that doesn't effect you.
>
> Pin 3 (GPIO 2) is SDA and Pin 5 (GPIO 3) is SCL. This 'seems' to be the
> opposite of what you are doing in your dts snippet so I could be wrong,
> but I would have thought these functions would be hardwired in the SOC.
>
> As for your specific device, PCF8574; I don't have any direct experience
> but it looks like a standard IIC device that should work OK. I see there
> is a FreeBSD kernel module to support it but it is quite recent so
> probably only in CURRENT. As I said, I don't have experience with that
> particular device.
>
> Hope this helps,

It did indeed. Problem solved. Mucho gracias!

------------------------------------------------------------------------
root@generic:~ # cat /boot/msdos/config.txt
init_uart_clock=3000000
enable_uart=1
kernel=u-boot.bin
kernel7=u-boot.bin
dtoverlay=mmc
dtparam=i2c_arm

root@generic:~ # ls /dev | grep iic
iic0

root@generic:~ # i2c -sv
dev: /dev/iic0, addr: 0x0, r/w: r, offset: 0x00, width: 8, count: 1
Hardware may not support START/STOP scanning; trying less-reliable read method.
Scanning I2C devices on /dev/iic0:
27
------------------------------------------------------------------------

Danke,

-- 
Don, KB7RPU, https://www.qsl.net/kb7rpu
There was a young lady named Bright Whose speed was far faster than light;
She set out one day In a relative way And returned on the previous night.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.