Go to advanced search

by manonline
Thu Dec 12, 2019 7:01 pm
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 58
Views: 9432

Re: How to use 2 SC16IS752,I USE I2C

Linux is perfectly happy to share interrupts, but the driver has to request a shared interrupt otherwise it is assumed to be for its exclusive use. The sc16is7xx driver doesn't use the IRQF_SHARED flag, which may be as a result of it deferring all interrupt handling to a thread (because it can't us...
by manonline
Thu Dec 12, 2019 1:10 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 58
Views: 9432

Re: How to use 2 SC16IS752,I USE I2C

Can I keep the same interrupt int_pin=24 for the 2 modules or should the modules have different interrupt PIN ? No - the interrupt pins have to be unique, otherwise the debug module will log an error like this: [ 10.392344] sc16is7xx 1-0048: devm_request_irq -> -16 (Error 16 is EBUSY) I'll update t...
by manonline
Fri May 06, 2016 7:26 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

Well, I recompiled the kernel with the SC16IS7XX driver enabled with menuconfig prior to build (Device drivers -> Character devices -> Serial drivers -> <*> SC16IS7xx serial support -> [*] SC16IS7xx for spi interface). I can see the driver module is kind of compiled: [email protected]:~/dev/linux $ cat...
by manonline
Thu May 05, 2016 8:01 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

Figured out how to enable the SC16IS7XX driver with "make menuconfig". I started compiling locally but a quick search in the forum tells me it will take 5hs or more. I will set up a VM with Ubuntu tonight and cross-compile.
by manonline
Thu May 05, 2016 6:04 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

Well, that could be the issue. I'm using the default 4.4.y build, downloaded by rpi-update. I will try compiling the kernel using the kernel build tutorial in the documentation section of the site. Where should I set the SERIAL_SC16IS7XX_CORE? lsmod didn't return anything like SC16IS7XX, and the sco...
by manonline
Thu May 05, 2016 3:03 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

Ok, I just deleted the [email protected] and [email protected] since I added them to use them for the SC16IS752. I think I can redefine the SPI to replace the original CS pins: cs-gpios = <&gpio 23 1>, <&gpio 24 1>; Instead of cs-gpios = <0>, <0>, <&gpio 23 1>, <&gpio 24 1>; I'm trying to use those pins because the b...
by manonline
Wed May 04, 2016 9:11 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

Crystal clear.

I was able to load the DTO but the /dev/ttySCx ports are not appearing yet. I will play around with this and let you know the results.

Thanks for your assistance!
by manonline
Wed May 04, 2016 8:52 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

You got it right! Now I can see spidev0.2 and spidev0.3, thanks! So, it seems that the DTB file name matters. What should be the name for the following DTB? SC16IS752 Device Tree: /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709"; [email protected] { target...
by manonline
Wed May 04, 2016 8:36 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

-rwxr-xr-x 1 root root 1547 May 3 17:51 /boot/overlays/spi1-1cs.dtbo -rwxr-xr-x 1 root root 1920 May 3 17:51 /boot/overlays/spi1-2cs.dtbo -rwxr-xr-x 1 root root 2293 May 3 17:51 /boot/overlays/spi1-3cs.dtbo -rwxr-xr-x 1 root root 1547 May 3 17:51 /boot/overlays/spi2-1cs.dtbo -rwxr-xr-x 1 root root ...
by manonline
Wed May 04, 2016 8:28 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

Output: 001206.286: *** Restart logging 001207.442: Read command line from file 'cmdline.txt' dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait 001456.616: Loading 'kernel7.img' to 0x8000 size 0x406e00 001460.255: ...
by manonline
Wed May 04, 2016 8:03 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

The 4.4 kernel changes the internals of the compiled overlays slightly, and the names also change to avoid versioning problems. You should really use an updated dtc - there's one in the kernel tree, and the Raspbian package is about to be updated - but for now you could get away with just calling y...
by manonline
Wed May 04, 2016 6:32 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

Re: SC16IS752 (SC16IS7XX driver) Device Tree problem

Well, I tried the DTS to add "spidev0.2" and "spidev0.3" and it failed to load: 001710.416: Failed to load overlay 'spi-gpio-cs' This is the DTS: /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709"; [email protected] { target = <&spi0>; frag0: __overlay__ { #...
by manonline
Tue May 03, 2016 9:50 pm
Forum: Device Tree
Topic: SC16IS752 (SC16IS7XX driver) Device Tree problem
Replies: 46
Views: 25291

SC16IS752 (SC16IS7XX driver) Device Tree problem

Hi all, I'm new to Raspberry Pi and I'm already dealing with the Device Tree monster. I'm trying to port an old project in which, over the years, I ran out of RAM. I want to re-use almost all the old hardware, which means I need to get multiple SC16IS752 chips running over SPI. After hours of resear...

Go to advanced search