Go to advanced search

by PhilE
Thu Dec 12, 2019 11:29 am
Forum: Device Tree
Topic: How to use 2 SC16IS752,I USE I2C
Replies: 58
Views: 6864

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 use...
by PhilE
Mon Dec 09, 2019 9:52 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 6732

Re: ads7846 on spi1

Fair enough. So although you are getting interrupts and the driver has probed, no events are getting though. I don't know what else to suggest.
by PhilE
Mon Dec 09, 2019 9:39 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 6732

Re: ads7846 on spi1

It was event1 for the touchscreen.
by PhilE
Mon Dec 09, 2019 2:52 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 6732

Re: ads7846 on spi1

pi@raspberrypi:~ $ ls -l /dev/input/by-path insgesamt 0 lrwxrwxrwx 1 root root 9 Dez 8 22:44 platform-3f215080.spi-event -> ../event1 lrwxrwxrwx 1 root root 9 Dez 8 22:44 platform-3f980000.usb-usb-0:1.3:1.2-event-mouse -> ../event0 lrwxrwxrwx 1 root root 9 Dez 8 22:44 platform-3f980000.usb-usb-0:1....
by PhilE
Mon Dec 09, 2019 11:52 am
Forum: Device Tree
Topic: Can't apply overlay mcp342x.dtbo
Replies: 7
Views: 242

Re: Can't apply overlay mcp342x.dtbo

That's great. I'll get the updates merged.
by PhilE
Mon Dec 09, 2019 10:54 am
Forum: Device Tree
Topic: Can't apply overlay mcp342x.dtbo
Replies: 7
Views: 242

Re: Can't apply overlay mcp342x.dtbo

The modified i2cprobe was in the September images, so you should have it by now. Sadly it doesn't solve the problem - it results in the following modprobe command being issued: modprobe of:NmcpT<NULL>Cmicrochip,mcp3421 but the aliases registered by the module are: i2c:mcp3428 i2c:mcp3427 i2c:mcp3426...
by PhilE
Sun Dec 08, 2019 9:41 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 6732

Re: ads7846 on spi1

Yes - I didn't know what it might end up being called, hence the vagueness. I was going to say that those entries look like those corresponding to the Logitech device, but that by-path symbolic link implies it is something to do with the touchscreen. Do you get anything from "od -Ax -tx1 /dev/input/...
by PhilE
Sun Dec 08, 2019 9:09 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 6732

Re: ads7846 on spi1

Is there an entry for the touchscreen under /dev/input? Can you ever read any data from it?
by PhilE
Sun Dec 08, 2019 9:09 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 6732

Re: ads7846 on spi1

Is there an entry for the touchscreen under /dev/input? Can you ever read any data from it?
by PhilE
Sun Dec 08, 2019 8:37 pm
Forum: Device Tree
Topic: ads7846 on spi1
Replies: 58
Views: 6732

Re: ads7846 on spi1

I can't see anything wrong - there must be a lot right for the driver to load. It's more likely that there's a fault in the wiring. Are any interrupts getting through? $ cat /proc/interrupts | grep 167 ought to show a number that increments with every touch. If it doesn't, try artificially grounding...
by PhilE
Fri Dec 06, 2019 7:29 am
Forum: Compute Module
Topic: CM3 Plus and WiFi/BT CYW43455
Replies: 58
Views: 9153

Re: CM3 Plus and WiFi/BT CYW43455

Have a go with:

Code: Select all

dtoverlay=uart1,txd1_pin=40,rxd1_pin=41
by PhilE
Mon Dec 02, 2019 5:12 pm
Forum: Device Tree
Topic: Can't apply overlay mcp342x.dtbo
Replies: 7
Views: 242

Re: Can't apply overlay mcp342x.dtbo

I think you're also seeing the effect of a change in 4.19 that suppresses "i2c:" aliases for I2C devices registered using Device Tree. Most drivers weren't affected by this, but some (including mcp342x) don't declare proper Device Tree compatible strings, causing the module not to be loaded. The exi...
by PhilE
Mon Dec 02, 2019 3:46 pm
Forum: Device Tree
Topic: Can't apply overlay mcp342x.dtbo
Replies: 7
Views: 242

Re: Can't apply overlay mcp342x.dtbo

I can't create a new device using "sudo echo mcp3421 0x68 > /sys/class/i2c-adapter/i2c-1/new_device" (permission denied). Are these permissions correct? "--w------- 1 root root 4096 Dec 2 15:01 /sys/class/i2c-adapter/i2c-1/new_device" Shell redirection can be confusing - even though the echo comman...
by PhilE
Thu Nov 28, 2019 12:43 pm
Forum: Device Tree
Topic: Separating a Device tree
Replies: 16
Views: 514

Re: Separating a Device tree

You're at the limits of my knowledge (and time) now. To answer the easy question ("If so, would the method used change if the LCD init driver was built-in or modular?") first, modularity should make no difference provided the filesystem is available. The standard (though ugly, IMHO) way to manage dr...
by PhilE
Thu Nov 28, 2019 11:03 am
Forum: Device Tree
Topic: Separating a Device tree
Replies: 16
Views: 514

Re: Separating a Device tree

It assumes one will be using Device Tree compatible strings to locate the driver. The macro parameter determines the type of udev alias which is generated - have a play with modinfo and different configurations to see the effect.
by PhilE
Thu Nov 28, 2019 10:28 am
Forum: Device Tree
Topic: Separating a Device tree
Replies: 16
Views: 514

Re: Separating a Device tree

If you ignore the I2C half (although the comparison might be helpful), drivers/rtc/rtc-ds3232.c is fairly simple. Also look at drivers/gpio/gpio-max7301.c, although it isn't a complete driver.
by PhilE
Thu Nov 28, 2019 10:08 am
Forum: Device Tree
Topic: Separating a Device tree
Replies: 16
Views: 514

Re: Separating a Device tree

I think video/fbdev sounds closest.

Are you rolling your own bitbanged SPI? Why not use the standard one (drivers/spi/spi-bitbang.c), in which case this would be a regular SPI device driver?
by PhilE
Thu Nov 28, 2019 9:19 am
Forum: Device Tree
Topic: DPI displays - dpi24 overlay fails on RPi4 (SOLVED)
Replies: 38
Views: 6983

Re: DPI displays - dpi24 overlay fails on RPi4 (SOLVED)

This is now the standard version shipping in all firmwares and Raspbian images. The original looked like this: /plugin/; /{ compatible = "brcm,bcm2835"; // There is no DPI driver module, but we need a platform device // node (that doesn't already use pinctrl) to hang the pinctrl // reference on - le...
by PhilE
Thu Nov 28, 2019 8:49 am
Forum: Device Tree
Topic: Separating a Device tree
Replies: 16
Views: 514

Re: Separating a Device tree

Yes - that's what I would have said if you hadn't already reached the same conclusion. Without the usual platform driver hooks your driver won't be probed.
by PhilE
Wed Nov 27, 2019 10:32 pm
Forum: Device Tree
Topic: Separating a Device tree
Replies: 16
Views: 514

Re: Separating a Device tree

Why not put the hyperpixel node in the root, just like fragments 2 and 4?

Please use "brcm,bcm2835" as a compatible string for the overlay - although nothing is checking (except a validation script), I'm trying to standardise on that and "brcm,bcm2711" for Pi4.
by PhilE
Wed Nov 27, 2019 12:45 pm
Forum: Device Tree
Topic: using mcp23s17 device tree with gpio-leds
Replies: 9
Views: 2488

Re: using mcp23s17 device tree with gpio-leds

Can you post your complete overlay? Linus would like an example, and none of the dts files in the kernel make use of the feature.
by PhilE
Wed Nov 27, 2019 12:42 pm
Forum: Device Tree
Topic: using mcp23s17 device tree with gpio-leds
Replies: 9
Views: 2488

Re: using mcp23s17 device tree with gpio-leds

Bad news (or good, if you're me) - Linus Walleij, who is responsible for GPIO and pinctrl in the kernel, also thinks this feature is broken:

https://marc.info/?l=linux-gpio&m=157485820503213&w=2
by PhilE
Wed Nov 27, 2019 11:02 am
Forum: Device Tree
Topic: using mcp23s17 device tree with gpio-leds
Replies: 9
Views: 2488

Re: using mcp23s17 device tree with gpio-leds

I've spent an hour or so looking at the driver code and crawling through the kernel GPIO infrastructure, and I don't think it's possible. Here's my logic: 1. Although all devices that are found are presented as a single SPI device, they are each registered as independent "gpio_chip"s. 2. A gpio_chip...
by PhilE
Tue Nov 26, 2019 4:55 pm
Forum: Device Tree
Topic: SC16IS752 overlay question
Replies: 3
Views: 263

Re: SC16IS752 overlay question

As far as I know the Pi Zero W has a fixed DC->DC converter for 3V3 and 1V8, and the only way to toggle them is to remove 5V.
by PhilE
Tue Nov 26, 2019 2:57 pm
Forum: Device Tree
Topic: Dynamic Device Tree
Replies: 1
Views: 123

Re: Dynamic Device Tree

That is a warning I've seen, but it's not something I've had time to dive into. Dynamic Device Tree is barely used in the kernel, even in 5.4 - a few drivers apply small DT patches at run time, but the dynamic overlay application support is only used by a downstream patch and some upstream test code...

Go to advanced search