Go to advanced search

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: 236
Views: 208600

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

[email protected]:~ $ 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: 12
Views: 10023

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: 236
Views: 208600

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: 12
Views: 10023

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: 236
Views: 208600

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

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

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...
by notro
Thu Mar 23, 2017 8:39 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C not reliable on a Pi3
Replies: 12
Views: 10023

Re: I2C not reliable on a Pi3

Phil recently added a commit to fix the i2c bus clock on 4.9: clk-bcm2835: Read max core clock from firmware https://github.com/raspberrypi/linux/commit/b76c8d538204e7d932afa8707070936f53d697f6 The change was present in rpi-update three commits ago: https://github.com/raspberrypi/firmware/commit/509...
by notro
Thu Mar 23, 2017 6:52 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 236
Views: 208600

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

fbtft never was a good fit for these keidei displays, but it's successor tinydrm has a much better modularity. I don't have a keidei displays myself, and I certainly don't want one, but the hacker/maker spirit shown in this thread has spurred me to make it very easy to write a keidei driver that can...
by notro
Thu Feb 23, 2017 12:10 am
Forum: Advanced users
Topic: Moving Linux kernel to 4.9
Replies: 289
Views: 114324

Re: Moving Linux kernel to 4.9

Trace events/points can also be used to debug i2c. One benefit is that it displays the content of the buffer. I have nothing connected here, just showing what it looks like: $ echo 1 | sudo tee /sys/kernel/debug/tracing/events/i2c/enable $ i2cget -y 1 0x69 0x26 Error: Read failed $ sudo cat /sys/ker...
by notro
Tue Feb 21, 2017 10:01 pm
Forum: Advanced users
Topic: Moving Linux kernel to 4.9
Replies: 289
Views: 114324

Re: Moving Linux kernel to 4.9

There's a fallback option:
config.txt

Code: Select all

dtoverlay=i2c-bcm2708
The i2c-bcm2835 driver has some debugging support to aid in tracking down issues. See this commit: i2c: bcm2835: Add debug support
by notro
Fri Jan 27, 2017 5:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Display Command Set for RPI DSI display
Replies: 1
Views: 640

Re: Display Command Set for RPI DSI display

Maybe this can be of help:
drm/panel: Add support for the Raspberry Pi 7" Touchscreen.
https://github.com/raspberrypi/linux/pu ... add503f344
by notro
Mon Jan 16, 2017 7:14 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 1 and 4 Lane MIPI OLED Displays
Replies: 11
Views: 10413

Re: 1 and 4 Lane MIPI OLED Displays

dsi support in vc4 is around the corner according to this: http://anholt.livejournal.com/50478.html
I guess this is the dev branch: https://github.com/anholt/linux/tree/dr ... leanup-4.9
by notro
Tue Jan 10, 2017 11:59 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c repeated start transactions
Replies: 55
Views: 46199

Re: i2c repeated start transactions

rpi linux 4.9 uses i2c-bcm2835 with these patches.
Available here: viewtopic.php?f=29&t=167934
by notro
Fri Dec 16, 2016 7:33 pm
Forum: Device Tree
Topic: GPIO config via Device tree
Replies: 14
Views: 13740

Re: GPIO config via Device tree

This gives info about who did what with the pinmuxing and gpio claiming: sudo cat /sys/kernel/debug/pinctrl/20200000.gpio/{pinmux-pins,pins} To assign a value, it appears that a driver needs to claim the gpio, and I suspect that will prevent it being used elsewhere. That's correct. There are generic...
by notro
Fri Dec 16, 2016 6:33 pm
Forum: Device Tree
Topic: Pin Interrupt edge type.
Replies: 3
Views: 2405

Re: Pin Interrupt edge type.

You do that on the device node that uses the gpio, through the interrupt property.
Here's an example: https://github.com/raspberrypi/linux/bl ... ay.dts#L73

Or the driver sets it.
by notro
Fri Dec 16, 2016 6:22 pm
Forum: Advanced users
Topic: Moving Linux kernel to 4.9
Replies: 289
Views: 114324

Re: Moving Linux kernel to 4.9

Can you give us a rough idea as to how many downstream patches need to be applied now as compared to the 4.4 series? http://elinux.org/RPi_Upstreaming seems to not have been updated in a while. 114 currently on 4.9. About 20 are support for I2S audio cards, and there are a number of pending upstrea...
by notro
Fri Nov 18, 2016 5:13 pm
Forum: Advanced users
Topic: Raspberry Pi 2 stops booting after message "Starting Kernel"
Replies: 5
Views: 1291

Re: Raspberry Pi 2 stops booting after message "Starting Ker

How do you configure the kernel? Do you use multi_v7_defconfig? You could try and load the kernel directly from the videocore booloader: <boot>/config.txt device_tree=bcm2836-rpi-2-b.dts kernel=zImage It is possible to boot mainline kernels that way, but usb won't work because the IP block is not po...
by notro
Thu Nov 17, 2016 3:44 pm
Forum: Advanced users
Topic: Raspberry Pi 2 stops booting after message "Starting Kernel"
Replies: 5
Views: 1291

Re: Raspberry Pi 2 stops booting after message "Starting Ker

It depends on whether you're building a kernel from mainline (kernel.org) or the Rapberry Pi repo. Mainline doesn't have all the drivers yet, and doesn't perform as good with regards to usb and sd card. This page lists some of the difference: https://github.com/raspberrypi/linux/wiki/Upstreaming I s...
by notro
Thu Nov 17, 2016 12:30 pm
Forum: Advanced users
Topic: Raspberry Pi 2 stops booting after message "Starting Kernel"
Replies: 5
Views: 1291

Re: Raspberry Pi 2 stops booting after message "Starting Ker

If you are connected with a serial console, you could enable early printk to see if you get some more messages: CONFIG_DEBUG_LL=y CONFIG_DEBUG_BCM2836=y CONFIG_EARLY_PRINTK=y Add to cmdline.txt: earlyprintk loglevel=8 The arch kernel is (most likely) built from the downstream repo: https://github.co...
by notro
Wed Nov 16, 2016 7:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c repeated start transactions
Replies: 55
Views: 46199

Re: i2c repeated start transactions

In arch/arm/boot/dts/bcm2708_common.dtsi change 3 occurences of:
compatible = "brcm,bcm2708-i2c"; -> compatible = "brcm,bcm2835-i2c";

Or make an overlay like this but change the compatible property: https://github.com/raspberrypi/linux/bl ... verlay.dts
by notro
Mon Nov 14, 2016 4:57 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2c repeated start transactions
Replies: 55
Views: 46199

Re: i2c repeated start transactions

The patchset has just been applied to rpi-4.8.y: https://github.com/raspberrypi/linux/pull/1716 Hopefully it will survive testing so we can use i2c-bcm2835 as default when we move to the next stable Linux version. I have only tested 3 devices, from commit message: I have run thousands of transfers t...
by notro
Sat Jun 25, 2016 5:35 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: i2S and tinylcd at the same time
Replies: 3
Views: 996

Re: i2S and tinylcd at the same time

If you are using: dtoverlay=tinylcd35, then you need to change the Device Tree overlay source and compile it: https://github.com/raspberrypi/linux/blob/rpi-4.4.y/arch/arm/boot/dts/overlays/tinylcd35-overlay.dts Change 18 to the one you have remapped it to: brcm,pins = <25 24 18>; led-gpios = <&gpio ...
by notro
Sun May 29, 2016 3:00 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: fbtft driver backlight question
Replies: 1
Views: 691

Re: fbtft driver backlight question

ra8875 doesn't have a gamma curve, so you can misuse it's mutex to protect the lcd register (if this is just your personal hack): static void ra8875_update_display(struct fbtft_par *par, unsigned start_line, unsigned end_line) { mutex_lock(&par->gamma.lock); fbtft_update_display(par, start_line, end...

Go to advanced search