Go to advanced search

by PhilE
Tue Jan 14, 2020 9:52 am
Forum: Device Tree
Topic: Pi-4 Activating additional UART ports
Replies: 78
Views: 36003

Re: Pi-4 Activating additional UART ports

So we still have got an apparent contradiction between the Pi4 specs for UART2 with ALT4 and the statement on the schematic: There's no contradiction - the GPIO capabilities are a feature of the 2711 SoC, while the pin usage is a feature of the Pi 4 board. The 2711 has potentially wider application...
by PhilE
Tue Jan 14, 2020 8:49 am
Forum: Device Tree
Topic: Touch-triggered display dimming
Replies: 4
Views: 787

Re: Touch-triggered display dimming

I'm not aware of a kernel feature like that - it sounds more like a screen saver configuration option, i.e. up in userland at the desktop or application level.
by PhilE
Mon Jan 13, 2020 9:35 pm
Forum: Device Tree
Topic: Pi-4 Activating additional UART ports
Replies: 78
Views: 36003

Re: Pi-4 Activating additional UART ports

Yes, I believe that's all correct.
by PhilE
Mon Jan 13, 2020 1:03 pm
Forum: Compute Module
Topic: some questions about schematics for the Compute Module IO board (CMIO)
Replies: 5
Views: 765

Re: some questions about schematics for the Compute Module IO board (CMIO)

PP means Probe Point - it's a place to measure the signal with a scope or logic analyser.
NF means Not Fitted - there is no component fitted there.
by PhilE
Fri Jan 10, 2020 9:52 am
Forum: Device Tree
Topic: shutdown script will not change the status of the LED
Replies: 8
Views: 948

Re: shutdown script will not change the status of the LED

After reading around a bit, I think this might work (but I've not tried): [Unit] Description=This service sets the indicator LED into the heartbeat mode on shutdown. DefaultDependencies=no After=final.target [Service] Type=oneshot ExecStart=/webroot/gStation/sh/heartbeat_indicator.sh [Install] Wante...
by PhilE
Thu Jan 09, 2020 8:07 pm
Forum: Device Tree
Topic: shutdown script will not change the status of the LED
Replies: 8
Views: 948

Re: shutdown script will not change the status of the LED

My guess would be that because systemd knows the service has exited, it won't try to stop it.

It ought to be possible to get actions performed at shutdown in a more direct way, but right now I couldn't say what that way is.
by PhilE
Thu Jan 09, 2020 5:53 pm
Forum: Device Tree
Topic: [SOLVED] gpio-shutdown overlay not working
Replies: 19
Views: 1942

Re: gpio-shutdown overlay not working

Have a look in /etc/systemd/logind.conf for HandlePowerKey. The default value (if nothing is specified) is "poweroff", but it might have been changed by something. This page explains the options: https://www.freedesktop.org/software/sy ... .conf.html
by PhilE
Thu Jan 09, 2020 5:01 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

That worked for me on a Pi 4: pi@raspberrypi:~$ raspi-gpio get 0-27 GPIO 0: level=1 fsel=0 func=INPUT pull=UP GPIO 1: level=1 fsel=0 func=INPUT pull=UP GPIO 2: level=1 fsel=0 func=INPUT pull=UP GPIO 3: level=1 fsel=0 func=INPUT pull=UP GPIO 4: level=1 fsel=0 func=INPUT pull=UP GPIO 5: level=0 fsel=0...
by PhilE
Thu Jan 09, 2020 3:44 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

You almost got it. What you didn't figure out is that the "leds" node replaces your rp41_pins node, i.e.: // Overlay for rp41 gpio line names /dts-v1/; /plugin/; /{ compatible = "brcm,bcm2835"; fragment@0 { target = <&leds>; __overlay__ { pinctrl-names = "default"; pinctrl-0 = <&rp41_gpio>; }; }; fr...
by PhilE
Thu Jan 09, 2020 1:37 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

Things have certainly changed somewhat since I wrote my first Unix device driver way back in the 1970s.
Wow - you must be even older than I am. Or a very precocious young coder. ;)
by PhilE
Thu Jan 09, 2020 1:09 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

We need an active driver to hang pinctrl requests on, preferably one which doesn't already use pinctrl. In the absence of a driver specific to your application, the gpio-leds driver is a suitable candidate (but be aware that other overlays may try the same trick). The vga666 overlay is an example of...
by PhilE
Thu Jan 09, 2020 9:11 am
Forum: Device Tree
Topic: shutdown script will not change the status of the LED
Replies: 8
Views: 948

Re: shutdown script will not change the status of the LED

[ This isn't a Device Tree question, but it does at least refer to overlays so I'll allow it. ;) ]

What does "sudo systemctl status heartbeat_indicator" report before and after the service is stopped?
by PhilE
Wed Jan 08, 2020 9:58 pm
Forum: Device Tree
Topic: [SOLVED] gpio-shutdown overlay not working
Replies: 19
Views: 1942

Re: gpio-shutdown overlay not working

Indeed - it seems that the KEY_POWER is being generated but that nothing is responding to it. Strange.
by PhilE
Wed Jan 08, 2020 9:52 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

Your new DT node (rp41_pins) has no compatible string - without one it will be ignored. pinctrl claims and configures pins on behalf of a driver, but releases them if the driver doesn't initialise (probe) correctly.
by PhilE
Wed Jan 08, 2020 9:24 pm
Forum: Device Tree
Topic: [SOLVED] gpio-shutdown overlay not working
Replies: 19
Views: 1942

Re: gpio-shutdown overlay not working

One other thing I just noticed: something does happen when I assert GPIO17 - the red LED goes off. But that's it. That could be an indication that the voltage is dropping too low, briefly. Do you have a too-small resistor in there somewhere? I don't have a Pi to hand, so this is a bit vague, but th...
by PhilE
Wed Jan 08, 2020 9:06 pm
Forum: Device Tree
Topic: [SOLVED] gpio-shutdown overlay not working
Replies: 19
Views: 1942

Re: gpio-shutdown overlay not working

Yes, that all looks as expected.
by PhilE
Wed Jan 08, 2020 8:31 pm
Forum: Device Tree
Topic: [SOLVED] gpio-shutdown overlay not working
Replies: 19
Views: 1942

Re: gpio-shutdown overlay not working

Re: the default pull, the overlay overrides the default behaviour so it pulls up (which wouldn't work well if active_low=0, but it isn't so you are ok). Does xev show any activity when you ground the pin? Is the gpio-key module loaded? Does gpioinfo show the GPIO as being claimed? (You may need to "...
by PhilE
Wed Jan 08, 2020 8:18 pm
Forum: Device Tree
Topic: [SOLVED] gpio-shutdown overlay not working
Replies: 19
Views: 1942

Re: gpio-shutdown overlay not working

Another factor to consider is that gpio 17 pulls low by default. Run "raspi-gpio get 17" to confirm that the input is low all the time, which will cause the gpio-key driver to ignore that input as a stuck key.
by PhilE
Wed Jan 08, 2020 5:32 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

raspi-gpio gives a more accurate picture of the current GPIO state. gpioinfo shows what Linux thinks it is set to, but since it doesn't read back the start-of-day state anything changed via dt-blob or config.txt won't show up.
by PhilE
Tue Jan 07, 2020 9:15 am
Forum: Device Tree
Topic: Using DSI or CSI for another purpose?
Replies: 18
Views: 1488

Re: Using DSI or CSI for another purpose?

I was about to write that nomdediot is probably a new user, but I see he's been around longer than you, Dougie, albeit with slightly fewer posts, so who knows. Although not an employee of Raspberry Pi themself ("they" as a singular pronoun was the Merriam Webster word of 2019), aBUGSworstnightmare (...
by PhilE
Tue Jan 07, 2020 9:01 am
Forum: Device Tree
Topic: Using DSI or CSI for another purpose?
Replies: 18
Views: 1488

Re: Using DSI or CSI for another purpose?

Have you read the CM schematics? They're as official as they come, and they show that both CSI and DSI have dedicated pins on the SoC, hence no chance to reuse them for something else.
by PhilE
Mon Jan 06, 2020 8:21 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

Have you tried the config.txt gpio setting?
by PhilE
Mon Jan 06, 2020 2:48 pm
Forum: Device Tree
Topic: Problem with gpio-hog
Replies: 19
Views: 1805

Re: Problem with gpio-hog

Apart from a missing semicolon after the "line-name" property, your overlay looks good. The problem is caused by the sequence of operations in the BCM2835's combined pinctrl and gpio driver. Currently the driver creates and registers the GPIO half of the driver before the pinctrl side, but this fail...
by PhilE
Mon Jan 06, 2020 10:36 am
Forum: Device Tree
Topic: Pi-4 Activating additional UART ports
Replies: 78
Views: 36003

Re: Pi-4 Activating additional UART ports

On all Pis, UART0 is a PL011 that appear to Linux as ttyAMA<n>, and UART1 is an 8250 clone that appears as ttyS0. On a Pi4, UART2-5 are additional PL011s that also appear as ttyAMA<n>. The number starts at 0 for the first enabled PL011 and counts up through all the enabled interfaces. The numbering ...
by PhilE
Mon Dec 23, 2019 9:42 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: STICKY: Optional interfaces (I2C, I2S, SPI) and Device Tree
Replies: 132
Views: 179550

Re: STICKY: Optional interfaces (I2C, I2S, SPI) and Device Tree

Using the overlays spi3-1cs, spi3-2cs, spi4-1cs, etc. Run "dtoverlay -h spi3-1cs" for usage information.

Go to advanced search