Go to advanced search

by notro
Sat Dec 02, 2017 6:07 pm
Forum: Device Tree
Topic: Using ramoops/pstore to capture kernel panics
Replies: 0
Views: 122

Using ramoops/pstore to capture kernel panics

I'm doing gadget kernel development on a Zero where I use the uart for network. This means I can't see the NULL pointer deref that I inevitably will trigger. It will just die without telling me why. Yes I know, the stores have a Zero Wireless now, so I could get that console :-) Luckily for me the k...
by notro
Fri Nov 17, 2017 9:43 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Does DSI have better support
Replies: 10
Views: 493

Re: Does DSI have better support

DSI is supported by the vc4 driver and Eric is still backporting patches to rpi-4.9 even though it gets increasingly difficult, but we're heading for 4.14 now so that will better the vc4 backport situation. I did a quick check to see if there are Linux supported DSI panels that we could try. I found...
by notro
Wed Nov 15, 2017 9:48 pm
Forum: Advanced users
Topic: Moving Linux kernel to 4.14
Replies: 22
Views: 2360

Re: Moving Linux kernel to 4.14

It seems that the papirus overlay and tinydrm defconfig from PR 2119 didn't make it over to rpi-4.14.y (the drivers are present). https://github.com/raspberrypi/linux/pull/2119/commits/3a72b82f9fbfc593c7ba899317b081271466d7bd https://github.com/raspberrypi/linux/pull/2119/commits/adb9a231d31ba123eb8...
by notro
Mon Oct 30, 2017 4:40 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Is Pi Zero SPI0 faster than SPI1?
Replies: 1
Views: 260

Re: Is Pi Zero SPI0 faster than SPI1?

SPI0 hardware can do DMA transfers whereas SPI1 and SPI2 doesn't have that capability.
It doesn't matter whether you use overlays or fbtft_device. Both just adds a spi device.
by notro
Sat Sep 02, 2017 12:37 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c repeated start transactions
Replies: 55
Views: 32295

Re: i2c repeated start transactions

I found this in the datasheet: Depending on the conversion command, the Si7021 may hold the master during the conversion (clock stretch). It doesn't have to be your problem, but clock stretching is broken on the i2c controller. You can try the i2c gpio bit banging driver, there's a DT overlay and a ...
by notro
Tue Jul 25, 2017 5:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI errors using spidev
Replies: 10
Views: 1080

Re: SPI errors using spidev

You have to look at errno to know the real error code: https://linux.die.net/man/3/errno
by notro
Mon Jul 24, 2017 2:27 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI errors using spidev
Replies: 10
Views: 1080

Re: SPI errors using spidev

Is errno -1 or does ioctl() return -1?
by notro
Wed Jul 19, 2017 2:18 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI errors using spidev
Replies: 10
Views: 1080

Re: SPI errors using spidev

If you print errno, you'll see the actuall error returned from spidev.
Armed with that you can look at the spidev code to see if you can find out why: http://elixir.free-electrons.com/linux/ ... dev.c#L356 (spidev_ioctl())
by notro
Tue Jul 18, 2017 9:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI errors using spidev
Replies: 10
Views: 1080

Re: SPI errors using spidev

The spi controller driver spi_bcm2835 doesn't support SPI_LOOP, so if you look in the kernel log (dmesg), you will probably see: setup: unsupported mode bits

SPI_LOOP is for controllers that can do internal loopback.
by notro
Thu Jun 08, 2017 10:40 pm
Forum: Device Tree
Topic: how to trigger an action when input signal is detected
Replies: 7
Views: 1443

Re: how to trigger an action when input signal is detected

As a customer I would want the Device Tree overlay preinstalled on the eeprom and download and run a script for the rest.
If I remove the HAT, the Pi should continue to work without error messages if possible.
by notro
Thu Jun 08, 2017 4:09 pm
Forum: Device Tree
Topic: how to trigger an action when input signal is detected
Replies: 7
Views: 1443

Re: how to trigger an action when input signal is detected

A common pattern is to create a gpio keyboard with a power key. This overlay creates a power button on GPIO26, which is active when pushed to gnd: /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835"; fragment@0 { target = <&gpio>; __overlay__ { powerbtn_pin: powerbtn_pin { brcm,pins = <26>; brcm,fun...
by notro
Sat May 13, 2017 8:03 pm
Forum: Advanced users
Topic: Why does /proc/cpuinfo always show the same serial number?
Replies: 8
Views: 1126

Re: Why does /proc/cpuinfo always show the same serial numbe

The serial number is present in 2 places in the device tree handed over by the videocore bootloader. First we had /system/linux,serial, which the downstream kernel still uses. See bcm2835_init() https://github.com/raspberrypi/linux/blob/rpi-4.9.y/arch/arm/mach-bcm/board_bcm2835.c#L27 Later mainline ...
by notro
Tue May 09, 2017 3:03 pm
Forum: Device Tree
Topic: How to use DT overlays in mainline?
Replies: 2
Views: 410

Re: How to use DT overlays in mainline?

Thanks Phil, that worked. diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 0118084..fbf9cc0 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1017,3 +1017,5 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts always...
by notro
Tue May 09, 2017 10:47 am
Forum: Device Tree
Topic: How to use DT overlays in mainline?
Replies: 2
Views: 410

How to use DT overlays in mainline?

I need to test drivers in mainline and would like to have overlays working there.
What bits are necessary to make that work?
I don't need dynamic loading, only the bootloader magic.
by notro
Fri Apr 28, 2017 9:35 pm
Forum: Other projects
Topic: Would this screen work with Raspberry Pi Zero W
Replies: 15
Views: 1174

Re: Would this screen work with Raspberry Pi Zero W

I don't know the spi userspace libraries, but afaik only the spi-bcm2835 kernel driver uses dma. If the bulk of your transfers are 512 bytes, I'm not sure if there will be much/any gain in using DMA. The best way to know for sure is to look at the MOSI signal and see if there are gaps that you don't...
by notro
Fri Apr 28, 2017 12:48 pm
Forum: Other projects
Topic: Would this screen work with Raspberry Pi Zero W
Replies: 15
Views: 1174

Re: Would this screen work with Raspberry Pi Zero W

> I still can't get fast data throughput to the ili9341 Do you use DMA? I can do 30fps with a 320x240 RGB565 display: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=178291&p=1136425#p1136425 Non DMA transfers get a gap byte that can be removed: https://www.raspberrypi.org/forums/viewtopic.p...
by notro
Sun Apr 02, 2017 11:01 am
Forum: Other projects
Topic: 3 touch screens with Rasberry Pi Zero
Replies: 7
Views: 618

Re: 3 touch screens with Rasberry Pi Zero

I guess you're going to use fbtft.

This post talks about adding more chip selects: viewtopic.php?t=157994&p=1028222
Here's a DT overlay with 2 fbtft devices: https://github.com/notro/fbtft/issues/2 ... -290314992
by notro
Sat Apr 01, 2017 8:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 219
Views: 127202

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

pi@RpiTeleCine:~ $ sudo vcdbg log msg 2>&1 | grep keidei Have you added this to /boot/config.txt: dtoverlay=keidei50 This tells the bootloader to load the Device Tree overlay which will add the device. Some background: * 'keidei' is a loadable kernel module. * The 'keidei' module registers a SPI dr...
by notro
Sun Mar 26, 2017 1:14 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C not reliable on a Pi3
Replies: 10
Views: 1656

Re: I2C not reliable on a Pi3

Looking at i2c-bcm2708, it returns EIO=5 on both the clock stretch error and the ACK error.
So errno 121 and 5 is probaly the same ACK error.
by notro
Sat Mar 25, 2017 2:09 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 219
Views: 127202

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

That was indeed very slow. The only way to speed this up is to send multiple pixels in one spi_write(), but looking at your code, each value is sent with 2 spi_write's, not one as I had suggested. So if you have to do that to make it work, then we're stuck. You could try to lower the speed and see i...
by notro
Fri Mar 24, 2017 9:15 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C not reliable on a Pi3
Replies: 10
Views: 1656

Re: I2C not reliable on a Pi3

EREMOTEIO=121 is returned by the i2c-bcm2835 driver when the ERR bit is set. The bit is described like this in the datasheet: ERR ACK Error 0 = No errors detected. 1 = Slave has not acknowledged its address. Cleared by writing 1 to the field. The driver has a debug option that might aid in debugging...
by notro
Fri Mar 24, 2017 5:48 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 219
Views: 127202

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

That's cool FREE WING, it didn't take you long to make it work!

It would have been interesting to know the speed of these displays, how many frames per second they can do: https://github.com/notro/tinydrm/wiki/D ... t#modetest
by notro
Thu Mar 23, 2017 11:10 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Disable DMA for SPI?
Replies: 9
Views: 948

Re: Disable DMA for SPI?

Yes, this is strange. Looking at the code, it seems that the polling transfer can override the 96 byte dma limit depending on transfer speed: #define BCM2835_SPI_POLLING_LIMIT_US 30 bcm2835_spi_transfer_one_poll() /* calculate the estimated time in us the transfer runs */ xfer_time_us = (unsigned lo...
by notro
Thu Mar 23, 2017 9:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Disable DMA for SPI?
Replies: 9
Views: 948

Re: Disable DMA for SPI?

@joan: I use SPI to drive displays and here's an extract from a discussion where I looked at performance. It's a 320x240 RGB565 (16-bits) pixel display with a kernel driver driven from a testing tool in userspace. The numbers show how many times per second the display can be updated: Theoretical max...

Go to advanced search