[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-port-arm
Subject:    Re: Help with device tree overlays on RPI
From:       Jason Thorpe <thorpej () me ! com>
Date:       2018-12-13 2:24:03
Message-ID: BA3CEBFA-7AFE-4FA9-AB26-37BD23669E0A () me ! com
[Download RAW message or body]



> On Dec 12, 2018, at 12:52 PM, Jason Thorpe <thorpej@me.com> wrote:
> 
> 
> 
> > On Dec 11, 2018, at 8:32 AM, Jason Thorpe <thorpej@me.com> wrote:
> > 
> > I'm not seeing "nixie-clock-control-pins" or "nixie-clock-controls" inserted into \
> > the tree at all.
> 
> Ok, I've got it all working.  I was a little confused about how to insert new nodes \
> at / in the tree from the overlay file, but I have it working now: 
> 00000180:   /nixie-clock-controls
> 000001d8:     /setup-mode-switch
> 00000234:     /alarm-enable-switch
> 00000294:     /awake-button
> 000002e8:     /alarm-set-button
> 00000344:     /snooze-button
> 00000398:     /enter-button
> 000003ec:     /down-button
> 0000043c:     /up-button
> 0000048c:   /nixie-clock-control-pins
> 
> nixie-dev:thorpej 2$ ofctl -p /nixie-clock-control-pins
> [Caching 124 nodes and 815 properties]
> brcm,function           00000000 ........ ........ ........   ....
> brcm,pins               00000000 00000002 00000003 00000004   ................
> 0010:       00000005 00000006 00000019 0000001b   ................
> brcm,pull               00000002 ........ ........ ........   ....
> linux,phandle           00000054 ........ ........ ........   ...T
> name                    6e697869 652d636c 6f636b2d 636f6e74   "nixie-clock-cont
> 0010:       726f6c2d 70696e73 00...... ........   rol-pins"
> phandle                 00000054 ........ ........ ........   ...T
> nixie-dev:thorpej 3$ ofctl -p /nixie-clock-controls     
> [Caching 124 nodes and 815 properties]
> compatible              6770696f 2d6b6579 7300.... ........   "gpio-keys"
> name                    6e697869 652d636c 6f636b2d 636f6e74   "nixie-clock-cont
> 0010:       726f6c73 00...... ........ ........   rols"
> pinctrl-0               00000054 ........ ........ ........   ...T
> pinctrl-names           64656661 756c7400 ........ ........   default.
> nixie-dev:thorpej 4$
> 
> 
> I need to figure out what's wrong with my pinctrl statement for the controls, \
> though: 
> [     1.000000] pinctrl: failed to set config pinctrl-0 for /nixie-clock-controls: \
> 6

....and that worked once I __overlay__'d it onto the &gpio target.

[     1.000000] bcmgpio0: pins 0..31 interrupting on icu irq 49
[     1.000000] bcmgpio0: pins 32..54 interrupting on icu irq 50
[     1.000000] pinctrl: set config pinctrl-0 for /nixie-clock-controls
[     1.000000] pinctrl: set config pinctrl-0 for /soc/gpio@7e200000
[     1.000000] pinctrl: set config pinctrl-0 for /soc/serial@7e201000
[     1.000000] pinctrl: set config pinctrl-0 for /soc/i2c@7e205000
[     1.000000] pinctrl: set config pinctrl-0 for /soc/pwm@7e20c000
[     1.000000] pinctrl: set config pinctrl-0 for /soc/sdhci@7e300000
[     1.000000] pinctrl: set config pinctrl-0 for /soc/i2c@7e804000
[     1.000000] gpio0 at bcmgpio0: 54 pins

...

[     1.000000] gpiokeys0 at simplebus0 (/nixie-clock-controls): setup-mode, \
alarm-on-off, awake, alarm-set, snooze, enter, down, up

w00t!

...although I'm re-evaluating whether I want some of those to be "keys" or "switches" \
(setup-mode and alarm-on-off, specifically).

Also, I think I want to get a piezo-electric buzzer so the alarm can be even more \
annoying... Being able to play the 4th Doctor theme at wake-up time is appealing, but \
so is using an ARM to drive a simple dumb buzzer.

Now to investigate if there are interrupt binding for gpis-keys.


> 
> Anyway, here's the dts file with the winning overlay recipe:
> 
> 	https://www.dropbox.com/s/x7ka8xvc4i6alxw/thorpej-RPI-NixieClock.dts
> 
> -- thorpej
> 

-- thorpej


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic