Go to advanced search

by notro
Tue May 22, 2018 12:02 pm
Forum: Advanced users
Topic: Disabling repeated start in the i2c-bcm2835 driver
Replies: 3
Views: 242

Re: Disabling repeated start in the i2c-bcm2835 driver

As far as I understand it's a problem with the Lidar firmware: Lidar-Lite v3 return always zero with raspberry pi 3
I did the repeated start fix and here's the rationale: i2c: bcm2835: Add support for Repeated Start Condition
Docs: Documentation/i2c/i2c-protocol
by notro
Sun Mar 18, 2018 7:41 pm
Forum: Device Tree
Topic: .dtb file for ili9325 supporting 8-bit parallel bus?
Replies: 2
Views: 477

Re: .dtb file for ili9325 supporting 8-bit parallel bus?

I couldn't find a known working example, but a Device Tree overlay would look something like this: /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835"; fragment@0 { target-path = "/soc"; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; display@0{ compatible = ...
by notro
Wed Mar 07, 2018 10:40 am
Forum: Advanced users
Topic: Under-voltage event logging?
Replies: 4
Views: 928

Re: Under-voltage event logging?

There is now under-voltage logging in the latest rpi-update:
https://github.com/raspberrypi/linux/pull/2397
by notro
Sat Feb 17, 2018 4:31 pm
Forum: Advanced users
Topic: Under-voltage event logging?
Replies: 4
Views: 928

Re: Under-voltage event logging?

I tried a userspace implementation, but ran into problems: https://github.com/raspberrypi/linux/issues/2367#issuecomment-365605244 Code: https://gist.github.com/notro/33a6b8b9a10665dc09a9224f917bc10b So now I have tried a kernel approach: https://github.com/raspberrypi/linux/issues/2367#issuecomment...
by notro
Tue Feb 06, 2018 9:34 pm
Forum: Advanced users
Topic: Under-voltage event logging?
Replies: 4
Views: 928

Under-voltage event logging?

Inadequate power supplies seem to be a prevailing challenge for both new (and old) Raspberry Pi users. As the Pi's become more powerful they also require more power, so the power supply that worked with the Pi2, could result in under-voltage warnings on the Pi3. Those with a display connected get an...
by notro
Mon Jan 08, 2018 8:54 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Howto Backlight with GPIO?
Replies: 3
Views: 300

Re: Howto Backlight with GPIO?

The backlight subsystem is tricky and outdated. Userspace does all kinds of thing to make it work in a modern world. First some comments about the post you linked to: - The gpio_backlight fix mentioned is about module autoloading and is available in Linux 4.9. - There is no fb property that can link...
by notro
Sun Jan 07, 2018 11:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Howto Backlight with GPIO?
Replies: 3
Views: 300

Re: Howto Backlight with GPIO?

You need to use Device Tree to add the device. backlight-overlay.dts (XX=gpio) /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835"; fragment@0 { target-path = "/soc"; __overlay__ { backlight: backlight { compatible = "gpio-backlight"; gpios = <&gpio XX 0>; /* GPIO_ACTIVE_HIGH */ default-on; }; }; };...
by notro
Sat Dec 02, 2017 6:07 pm
Forum: Device Tree
Topic: Using ramoops/pstore to capture kernel panics
Replies: 0
Views: 1199

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: 806

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: 106
Views: 34505

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: 407

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: 35735

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: 1659

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: 1659

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: 1659

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: 1659

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: 2564

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: 2564

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: 1739

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: 605

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: 605

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: 1489

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: 1489

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: 813

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

Go to advanced search