Go to advanced search

by notro
Sun Apr 05, 2015 5:31 pm
Forum: Advanced users
Topic: Help writing an overlay (dts / device tree) for an ssd1307
Replies: 14
Views: 4748

Re: Help writing an overlay (dts / device tree) for an ssd13

The device must show up in /sys/bus/i2c/devices This is an i2c driver I'm currently working on: Device Tree $ ls -l /proc/device-tree/soc/[email protected]/ total 0 -r--r--r-- 1 root root 4 Apr 5 17:04 #address-cells -r--r--r-- 1 root root 4 Apr 5 17:04 clock-frequency -r--r--r-- 1 root root 4 Apr 5 17:0...
by notro
Sat Apr 04, 2015 8:18 pm
Forum: Advanced users
Topic: Help writing an overlay (dts / device tree) for an ssd1307
Replies: 14
Views: 4748

Re: Help writing an overlay (dts / device tree) for an ssd13

Does your device show up in /sys/bus/i2c/devices/ ? Have you built your own kernel? Because the module is not enabled in the official one: $ zgrep SSD1307 /proc/config.gz # CONFIG_FB_SSD1307 is not set You can enable the i2c bus in the oled overlay as well: target = <&i2c1>; __overlay__ { status = "...
by notro
Wed Apr 01, 2015 3:19 pm
Forum: Advanced users
Topic: /boot/.firmware_revision
Replies: 20
Views: 3002

Re: /boot/.firmware_revision

If the kernel/firmware didn't change in the raspberrypi-bootloader package, what did?
by notro
Wed Apr 01, 2015 2:39 pm
Forum: Advanced users
Topic: /boot/.firmware_revision
Replies: 20
Views: 3002

Re: /boot/.firmware_revision

Thanks ShiftPlusOne, the script can't handle that. It only considers the first entry in the changelog. Peter, I see two solutions: 1. Remove support for the debian package kernel support and make it a pure rpi-update companion. 2. Fix this. This hack works: - curr_entry = '\n'.join(debian_changelog....
by notro
Wed Apr 01, 2015 1:37 pm
Forum: Advanced users
Topic: /boot/.firmware_revision
Replies: 20
Views: 3002

Re: /boot/.firmware_revision

I use this image: 2015-02-16-raspbian-wheezy
Which image are you using?
by notro
Wed Apr 01, 2015 1:28 pm
Forum: Advanced users
Topic: /boot/.firmware_revision
Replies: 20
Views: 3002

Re: /boot/.firmware_revision

Which changelog entry are you referring to? This is what I've got: $ zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | head raspberrypi-firmware (1.20150214-1) unstable; urgency=low * firmware as of 8aca5762 -- <[email protected].org> Sun, 15 Feb 2015 11:19:20 +0000 raspberrypi-firmware ...
by notro
Wed Apr 01, 2015 1:19 pm
Forum: Advanced users
Topic: /boot/.firmware_revision
Replies: 20
Views: 3002

Re: /boot/.firmware_revision

How does it fail? It works for me at least: $ sudo rm /boot/.firmware_revision $ rpi-source --verbose --nomake --skip-gcc Check for update to rpi-source download: https://api.github.com/repos/notro/rpi-source/git/refs/heads/master *** Using: /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz ...
by notro
Fri Mar 20, 2015 6:21 pm
Forum: Advanced users
Topic: devicetree overlay for MCP23017 GPIO expander
Replies: 66
Views: 19729

Re: devicetree overlay for MCP23017 GPIO expander

398: 100001 pinctrl-bcm2835 4 1-0020 456: 1 gpio-mcp23xxx 8 gpiolib I assume this means: pinctrl-bcm2835 pin 4 is used by device 1-0020 gpio-mcp23xxx pin 8 is used by gpiolib (http://lxr.free-electrons.com/ident?i=gpio_sysfs_irq) There is one interrupt registered. Have you added printk to mcp23s08_...
by notro
Thu Mar 19, 2015 9:32 pm
Forum: Advanced users
Topic: devicetree overlay for MCP23017 GPIO expander
Replies: 66
Views: 19729

Re: devicetree overlay for MCP23017 GPIO expander

It doesn't let you set the value of a pin before making it an output Actually you can. It was previously broken in the new gpio driver, but is fixed in the latest rpi-update kernels. From https://www.kernel.org/doc/Documentation/gpio/sysfs.txt /sys/class/gpio/gpioN/ "direction" ... reads as either ...
by notro
Tue Mar 17, 2015 9:20 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 242
Views: 144297

Re: SPI driver latency and a possible solution

I failed to mention one crucial bit of information, you can (currently) only do SPI DMA from kernel space. So you need to write a kernel module to get that speed, together with the out-of-tree spi-bcm2708 driver. When/if the spi-bcm2835 SPI driver gets can_dma support, then it will be possible to do...
by notro
Tue Mar 17, 2015 7:17 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI driver latency and a possible solution
Replies: 242
Views: 144297

Re: SPI driver latency and a possible solution

10 MB/s should be possible at 128MHz, in bursts at least: https://github.com/notro/fbtft/wiki/Performance#mz61581-pi-ext (using https://github.com/notro/spi-bcm2708) As long as you don't do other DMA stuff like heavy USB. This prebuilt kernel has that SPI DMA driver if you want to test: https://gith...
by notro
Mon Mar 16, 2015 7:33 pm
Forum: Advanced users
Topic: New device tree kernel is in testing
Replies: 356
Views: 79535

Re: New device tree kernel is in testing

Boolean argument working fine, thanks Phil. HAT eeprom values as well [email protected]:~$ ls -l /proc/device-tree/hat/ total 0 -r--r--r-- 1 root root 4 Mar 16 17:03 name -r--r--r-- 1 root root 14 Mar 16 17:03 product -r--r--r-- 1 root root 6 Mar 16 17:03 product_id -r--r--r-- 1 root root 6 Mar 16 17:0...
by notro
Fri Mar 13, 2015 10:26 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO value resets to 0 in 5us
Replies: 9
Views: 1313

Re: GPIO value resets to 0 in 5us

I suggest using the gpio utility that comes with wiringpi.
It is perfect tool for diagnosing problems like this. 'gpio readall' will give you a nice overview.
by notro
Wed Mar 11, 2015 5:35 pm
Forum: Advanced users
Topic: New device tree kernel is in testing
Replies: 356
Views: 79535

Re: New device tree kernel is in testing

I see that property names can contain all your special markers except colon. But since we are already violating this, I can't see questionmark being very likely to hit in a prop name. And ? is descriptive. Table 2-2 Characters for property names Character Description 0-9 digit a-z lowercase letter ,...
by notro
Wed Mar 11, 2015 4:59 pm
Forum: Advanced users
Topic: New device tree kernel is in testing
Replies: 356
Views: 79535

Re: New device tree kernel is in testing

Is it possible to enable a boolean DT property with an overlay argument (ie. insert property)?
of_property_read_bool() returns true if the property is present in the tree, so I can't set the value to zero.
by notro
Fri Feb 27, 2015 7:36 pm
Forum: Troubleshooting
Topic: STICKY:I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.
Replies: 335
Views: 550805

Re: I2C, SPI, I2S, LIRC, PPS, stopped working? Read this.

I also want to join in Dougie's praise of Phil. He has done an outstanding job in smoothing out the introduction of Device Tree. It's a rare thing to see an engineer write so much documentation without being wipped. But it can also be because he's smart, who's going to answer all those DT questions ...
by notro
Wed Feb 25, 2015 11:17 am
Forum: Advanced users
Topic: GPIO pullup with bcm2708_gpio_setpull
Replies: 3
Views: 852

Re: GPIO pullup with bcm2708_gpio_setpull

But I think DT only works at boot time, doesn't it? I want to change the function at runtime within the module. Yes, currently it does. The documentation states that the pinctrl subsystem supports runtime pinmuxing. Set the heading: Runtime pinmuxing, in https://www.kernel.org/doc/Documentation/pin...
by notro
Tue Feb 24, 2015 1:27 pm
Forum: Advanced users
Topic: GPIO pullup with bcm2708_gpio_setpull
Replies: 3
Views: 852

Re: GPIO pullup with bcm2708_gpio_setpull

The recommended way of doing that now is with Device Tree.
See here for DT overlay example: https://github.com/notro/fbtft/blob/mas ... ay.dts#L33
by notro
Wed Feb 18, 2015 10:29 pm
Forum: Other projects
Topic: Keyboard input through GPIO's
Replies: 3
Views: 1013

Re: Keyboard input through GPIO's

You could also make a request to get the config option KEYBOARD_GPIO enabled in the kernel. With Device Tree it's now easy to make a gpio keyboard. Make request: https://github.com/raspberrypi/linux/issues Doc: https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt Values f...
by notro
Wed Feb 18, 2015 10:04 pm
Forum: Advanced users
Topic: New device tree kernel is in testing
Replies: 356
Views: 79535

Re: New device tree kernel is in testing

PhilE wrote:I've added support for 8-, 16- and 64-bit parameters to the loader.
16-bit worked fine, thanks Phil.
by notro
Tue Feb 17, 2015 12:20 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PI 2 GPIO problem
Replies: 7
Views: 2961

Re: PI 2 GPIO problem

Maybe this is a more universal approach: http://www.raspberrypi.org/forums/viewt ... 75#p687175
by notro
Sun Feb 15, 2015 7:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to connect a Arduino Touchscreen to the Raspberry PI
Replies: 12
Views: 4740

Re: How to connect a Arduino Touchscreen to the Raspberry PI

You use rpi-update. If it isn't installed on Arch, see readme: https://github.com/Hexxeh/rpi-update
by notro
Sun Feb 15, 2015 7:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to connect a Arduino Touchscreen to the Raspberry PI
Replies: 12
Views: 4740

Re: How to connect a Arduino Touchscreen to the Raspberry PI

Install: https://github.com/notro/fbtft/wiki#install

Example (you can pick your own gpios):
sudo modprobe fbtft_device custom name=fb_ili9325 gpios=reset:17,dc:1,wr:0,cs:21,db00:9,db01:11,db02:18,db03:23,db04:24,db05:25,db06:8,db07:7

https://github.com/notro/fbtft/wiki/fbtft_device
by notro
Sun Feb 15, 2015 6:58 pm
Forum: Advanced users
Topic: New device tree kernel is in testing
Replies: 356
Views: 79535

Re: New device tree kernel is in testing

Why should I put "i2c" in the alias when the device doesn't have an i2c interface ? Sorry, I misread you're earlier post, thought you had a i2c device and that the driver didn't autoload. Phil gave the answer for platform devices (devices not connected to any other of the busses). Edit: Use: target...

Go to advanced search