Hello,
I am trying to get a SPI/I2C device working with the reTerminal Display, but I’m not able to read/communicate with it. I’m able to read the device fine with a standard RPI4, but once I try it on a reTerminal Display it doesn’t work. I have run the ‘spidev_test’ program from the FAQ and confirmed that I can read/write through the SPI (shorting MOSI and MISO pins).
I’m not sure what else to check/test at this point, as I don’t have much experience debugging serial/SPI devices.
Here is the SPI device I’m testing:
According to the GPIO mapping, I’m using CE_1 which corresponds to GPIO7 aka pin 26.
This is the device tree/overlay for the device:
System Info:
root@raspberrypi:/home/pi# cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux
The overlay appears to be loaded:
$ vcdbg log msg
...
005380.380: brfs: File read: 801 bytes
005392.795: brfs: File read: /mfs/sd/overlays/pi-spi.dtbo
005402.765: Loaded overlay 'pi-spi'
lsmod:
root@raspberrypi:/home/pi# lsmod
Module Size Used by
cmac 16384 1
rfcomm 49152 4
bnep 20480 2
hci_uart 40960 1
btbcm 16384 1 hci_uart
bluetooth 393216 29 hci_uart,bnep,btbcm,rfcomm
ecdh_generic 16384 2 bluetooth
ecc 40960 1 ecdh_generic
fuse 126976 3
8021q 32768 0
garp 16384 1 8021q
stp 16384 1 garp
llc 16384 2 garp,stp
snd_soc_hdmi_codec 20480 2
spidev 20480 2
brcmfmac 327680 0
brcmutil 20480 1 brcmfmac
raspberrypi_hwmon 16384 0
cfg80211 761856 1 brcmfmac
v3d 73728 4
gpu_sched 45056 1 v3d
i2c_brcmstb 16384 0
rfkill 32768 6 bluetooth,cfg80211
dwc2 167936 0
bcm2835_codec 40960 0
roles 16384 1 dwc2
vc4 270336 13
cec 49152 1 vc4
drm_kms_helper 241664 2 vc4
v4l2_mem2mem 36864 1 bcm2835_codec
drm 528384 12 v3d,vc4,gpu_sched,drm_kms_helper
drm_panel_orientation_quirks 16384 1 drm
snd_soc_core 225280 2 vc4,snd_soc_hdmi_codec
snd_compress 20480 1 snd_soc_core
i2c_bcm2835 16384 0
snd_pcm_dmaengine 16384 1 snd_soc_core
bcm2835_isp 32768 0
videobuf2_dma_contig 20480 2 bcm2835_isp,bcm2835_codec
bcm2835_v4l2 40960 0
bcm2835_mmal_vchiq 32768 3 bcm2835_isp,bcm2835_codec,bcm2835_v4l2
vc_sm_cma 32768 2 bcm2835_isp,bcm2835_mmal_vchiq
videobuf2_vmalloc 16384 1 bcm2835_v4l2
videobuf2_memops 16384 2 videobuf2_dma_contig,videobuf2_vmalloc
videobuf2_v4l2 32768 4 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem
videobuf2_common 61440 5 bcm2835_isp,bcm2835_codec,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
spi_bcm2835 24576 0
videodev 249856 6 bcm2835_isp,bcm2835_codec,videobuf2_common,bcm2835_v4l2,v4l2_mem2mem,videobuf2_v4l2
snd_bcm2835 24576 0
mc 45056 6 bcm2835_isp,bcm2835_codec,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
snd_pcm 110592 5 snd_compress,snd_pcm_dmaengine,snd_soc_hdmi_codec,snd_bcm2835,snd_soc_core
snd_timer 32768 1 snd_pcm
rpivid_mem 16384 0
snd 77824 10 snd_compress,snd_soc_hdmi_codec,snd_timer,snd_bcm2835,snd_soc_core,snd_pcm
syscopyarea 16384 1 drm_kms_helper
sysfillrect 16384 1 drm_kms_helper
sysimgblt 16384 1 drm_kms_helper
fb_sys_fops 16384 1 drm_kms_helper
backlight 20480 1 drm
nvmem_rmem 16384 0
uio_pdrv_genirq 16384 0
uio 20480 1 uio_pdrv_genirq
i2c_dev 20480 0
ip_tables 28672 0
x_tables 32768 1 ip_tables
ipv6 495616 44
/boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1
# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16
# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720
# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2
# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4
# uncomment for composite PAL
#sdtv_mode=2
#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
#dtoverlay=vc4-fkms-v3d
enable_uart=1
dtoverlay=dwc2,dr_mode=host
dtparam=ant2
dtoverlay=pi-spi
arm_64bit=0
disable_splash=1
ignore_lcd=1
dtoverlay=vc4-kms-v3d-pi4
dtoverlay=i2c3,pins_4_5
gpio=13=pu
dtoverlay=reTerminal,tp_rotate=1