Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
SPI device connection woes
I have been trying to interface a BMP280 to various ARM SOC's
There is a device driver in NetBSD 10 which should drive the BMP280 and
the (more useful) BME280.
I have wired up a couple of BMP280's to a Banana pi M1 on both the I2C
and the SPI interface (using CS0 for the CSB).
I put the relevant lines in /etc/modules.conf:
/stand/evbarm/10.0/modules/bmx280thp/bmx280thp.kmod
/stand/evbarm/10.0/modules/bmx280thpi2c/bmx280thpi2c.kmod
and a reboot shows:
Loading modules.
[ 4.6613337] bmx280thp0 at iic1 addr 0x76
[ 4.7013430] bmx280thp0: Bosch Sensortec BMP280, Chip ID: 0x58
and envstat reports:
bmx280thp0]
temperature: 23.040 degC
pressure: 1011.010 hPa
So the I2C interface is working fine, but nothing from the SPI one, yet
the kernel seems to see it OK:
NetBSD 10.0_BETA (GENERIC) #0: Tue Mar 7 19:57:47 UTC 2023
[ 1.000000] mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/ev
barm/compile/GENERIC
[ 1.000004] sunxitwi0 at simplebus1: Marvell TWSI controller
[ 1.000004] sunxitwi0: interrupting on GIC irq 39
[ 1.000004] iic0 at sunxitwi0: I2C bus
[ 1.000004] sun4ispi0 at simplebus1: SPI
[ 1.000004] sun4ispi0: interrupting on GIC irq 42
[ 1.000004] spi0 at sun4ispi0: SPI bus
decompiling the dtb shows the correct status (OKAY) for SPI0 and the
pin maps look right for the default pinout on the BPI board.
Anyone got any ideas as so far I seem to have had zero success at
getting any SPI devices to work :-(
Cheers,
Dave
Home |
Main Index |
Thread Index |
Old Index