Interfacing NXP SC16IS750 over SPI

Hi All,

I am trying to interface NXP SPI to UART chip with Beaglebone black. At the moment I amusing SPI 1 and breakout board from Sparkfun (https://www.sparkfun.com/products/retired/9981) .

I have enabled the driver for SC16IS7xx in the kerne

CONFIG_SERIAL_SCCNXP is not set

CONFIG_SERIAL_SC16IS7XX_CORE=y
CONFIG_SERIAL_SC16IS7XX=y

CONFIG_SERIAL_SC16IS7XX_I2C is not set

CONFIG_SERIAL_SC16IS7XX_SPI=y

CONFIG_SERIAL_BCM63XX is not set

I don’t see any message related to SPI or above driver when kernel boot-up.

Kernel Version = Linux beaglebone 4.14.71-ti-r80 #1 SMP PREEMPT Tue Jun 16 22:25:59 AEST 2020 armv7l GNU/Linux

Current Device Tree for this particular chip is:

/*

Please run this script and paste the output so we know exactly what is
installed and configured:
/opt/scripts/tools/version.sh

I believe the driver should already be in the kernel that Robert builds:

pdp7@x1:~/dev/beaglebone/ti-linux-kernel-dev$ git status
On branch ti-linux-4.14.y
Your branch is up to date with 'origin/ti-linux-4.14.y'.

nothing to commit, working tree clean
pdp7@x1:~/dev/beaglebone/ti-linux-kernel-dev$ git grep SC16IS7XX
patches/defconfig
patches/defconfig:CONFIG_SERIAL_SC16IS7XX_CORE=m
patches/defconfig:CONFIG_SERIAL_SC16IS7XX=m
patches/defconfig:CONFIG_SERIAL_SC16IS7XX_I2C=y
patches/defconfig:CONFIG_SERIAL_SC16IS7XX_SPI=y

-drew

You also need to disable CONFIG_SERIAL_DEV_CTRL_TTYPORT, as it breaks
CONFIG_SERIAL_SC16IS7XX

https://github.com/RobertCNelson/ti-linux-kernel-dev/commit/c8bf98fd9324e3973d5021eefcfa7a549869a578

Regards,

Here is output of the command ‘/opt/scripts/tools/version.sh’:

git:/opt/scripts/:[1aa73453b2c980b75e31e83dab7dd8b6696f10c7]
eeprom:[A335BNLT00C04815BBBK1FC3]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-10-07]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.09-00002-g0b54a51eee]:[location: dd MBR]
kernel:[4.14.71-ti-r80]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-PWM1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BB-PWM2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr2=/lib/firmware/BB-SPI1-SC16IS750-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr3=/lib/firmware/BB-UART1-COM1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-UART2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=/lib/firmware/BB-UART4-COM0-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr6=/lib/firmware/BB-UART5-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[disable_uboot_overlay_adc=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20180928.0-0rcnee0~stretch+20180928]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.3-git20181005.0-0rcnee0~stretch+20181005]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.024898] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 1.026126] gpio-of-helper ocp:cape-universal: ready
END

Hi Robert,

Disabling the config CONFIG_SERIAL_SC16IS7XX worked for me.
Thanks for you help.

Regards,
Atique

Hi Robert,

Is my device dts configuration correct? As Now I can see ttySC0 and when I try to communicate with SC16IS750, I don’t see any activity on interrupt line. Is this the correct way to configure interrupt line?

Regards,
Atique

This device for SC16IS750 is working for me.

/*