Go to advanced search

by notro
Mon Nov 09, 2015 4:41 pm
Forum: Advanced users
Topic: Change GPIO on poweroff
Replies: 9
Views: 2218

Re: Change GPIO on poweroff

Maybe you can use gpio-poweroff which was made available with this commit: https://github.com/raspberrypi/linux/co ... 839afbba71
by notro
Sun Nov 08, 2015 2:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 236
Views: 209000

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Do you have any idea if we could get FB_ILI9341 to work in this LCD? You would have to make a new driver and override .write_vmem and .write_register to match the display. But it will be slower than ili9341.c because that one writes directly to the hw registers. It is faster to do that for less tha...
by notro
Sat Nov 07, 2015 8:58 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 236
Views: 209000

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

At first, I thought I could just control 3.5" lcd from software but redrawing whole screen is so f**** slow, so the slower lcd got repaint, the quicker I dropped this idea... Looks like you're sending one byte per spidev transfer (4 transfers in one message), at least you can send all 4 bytes in on...
by notro
Fri Nov 06, 2015 3:39 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 236
Views: 209000

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

Looking at ILI9341.c it's clear that it writes 8 bytes per 16-bit word, even worse than I thought. 1 dummy byte + 16-bit word + control byte, which is done twice to toggle WR I guess: static void spi_transform(unsigned char *spi_buff) { writel(0x00,lcd_spi_base+SPI_FIFO); writel((unsigned char)*(spi...
by notro
Thu Nov 05, 2015 6:13 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: KeDei 3.5 inch 480x320 TFT lcd from ali
Replies: 236
Views: 209000

Re: KeDei 3.5 inch 480x320 TFT lcd from ali

It will be very difficult to make this display work with fbtft. This display has in effect a combined 16-bit databus and an 8-bit control bus rolled into one 24-bit serial bus. It is most likely based on the SpriteMods circuit: http://spritesmods.com/?art=spitft&page=2 fbtft isn't very modular so it...
by notro
Sat Oct 31, 2015 8:07 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PI 2 spidev SPI buffer size
Replies: 17
Views: 10847

Re: PI 2 spidev SPI buffer size

The spidev module is built into the kernel proper (kernel7.img), so you have to set the module parameter on the kernel command line.
Add to /boot/cmdline.txt:

Code: Select all

spidev.bufsiz=32768
by notro
Wed Oct 14, 2015 11:02 am
Forum: Advanced users
Topic: Making displaylink udlfb.ko an installable module
Replies: 2
Views: 1068

Re: Making displaylink udlfb.ko an installable module

You can't build udlfb as a loadable module for that kernel because the module needs FB_MODE_HELPERS which is not enabled: $ sudo modprobe configs $ zgrep CONFIG_FB_ /proc/config.gz CONFIG_FB_SYS_FILLRECT=m CONFIG_FB_SYS_COPYAREA=m CONFIG_FB_SYS_IMAGEBLIT=m CONFIG_FB_SYS_FOPS=m CONFIG_FB_DEFERRED_IO=...
by notro
Tue Sep 15, 2015 5:55 pm
Forum: Device Tree
Topic: device-tree model info
Replies: 9
Views: 4386

Re: device-tree model info

by notro
Tue Sep 15, 2015 9:28 am
Forum: Device Tree
Topic: Device Tree Overlay to adjust GPIO Outputs
Replies: 7
Views: 4939

Re: Device Tree Overlay to adjust GPIO Outputs

Maybe GPIO hogging can help you: https://www.kernel.org/doc/Documentatio ... o/gpio.txt
I haven't tried it myself.
by notro
Sun Sep 06, 2015 3:05 pm
Forum: Advanced users
Topic: Where are the linux-headers for 4.1.6+
Replies: 4
Views: 1165

Re: Where are the linux-headers for 4.1.6+

That's not the "official" source, it's a back-level version of Noralf's code for TFT screens. rpi-source always pulls from raspberrypi/linux and will work with official rpi-update kernels (it is also possible to use it with custom kernels that is installed with rpi-update, like my fbtft kernel). It...
by notro
Sat Aug 22, 2015 10:15 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [SOLVED] not working Tontec 3.5" touch white screen
Replies: 8
Views: 4279

Re: not working Tontec 3.5" touch white screen

And you have this in /boot/config.txt?

Code: Select all

dtoverlay=mz61581
This will show that the driver is loaded:

Code: Select all

dmesg | grep graphics
by notro
Fri Aug 21, 2015 2:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI has more speeds
Replies: 15
Views: 50884

Re: SPI has more speeds

This fix is in the official kernel now. A plain 'sudo rpi-update' is enough.
by notro
Fri Aug 21, 2015 2:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: [SOLVED] not working Tontec 3.5" touch white screen
Replies: 8
Views: 4279

Re: not working Tontec 3.5" touch white screen

This should give you a kernel that works with this display: sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update Apparently this gave an error earlier, but it's working now. The regular 'rpi-update' kernel was not working, but will be fixed in the next release: https://github.com/raspberry...
by notro
Wed Aug 19, 2015 11:38 pm
Forum: Advanced users
Topic: [Help needed] creating blinking lead on boot up
Replies: 4
Views: 1466

Re: [Help needed] creating blinking lead on boot up

If you don't need blinking directly from poweron, you can use the leds driver. It is built into the kernel image so it loads early. This driver is controlling the ACT led. The timer trigger gives steady blinking: $ cat /sys/class/leds/led0/trigger none mmc0 [timer] oneshot heartbeat backlight gpio c...
by notro
Wed Jul 29, 2015 1:26 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Serial garbage at boot
Replies: 6
Views: 1639

Re: Serial garbage at boot

The Pi kernel emits an Uncompressing message on the serial port when Linux boots.
There is a way to avoid that without building a custom kernel: https://github.com/raspberrypi/linux/pu ... -109020624
by notro
Sun Jul 26, 2015 11:39 am
Forum: Advanced users
Topic: Please explain the ARCH_BCM2708 to ARCH_BCM2835 change
Replies: 2
Views: 937

Re: Please explain the ARCH_BCM2708 to ARCH_BCM2835 change

First: BCM2708 is the SoC family and BCM2835 is the individual. Up until Pi2, it was the only one in the family, but now we have BCM2836 as well. When building the Linux kernel, 2 main choices have to be made: cpu architecture (ARCH=arm) and board/platform (ARCH_BCM2835). ARCH_BCM2708 is the kernel ...
by notro
Wed Jun 17, 2015 5:09 pm
Forum: Advanced users
Topic: Specify interrupt in devicetree overlay
Replies: 1
Views: 2671

Re: Specify interrupt in devicetree overlay

Example: https://github.com/raspberrypi/linux/blob/rpi-4.0.y/arch/arm/boot/dts/overlays/enc28j60-overlay.dts Explanation: - #interrupt-cells : Should be 2. The first cell is the GPIO number. The second cell is used to specify flags: bits[3:0] trigger type and level flags: 1 = low-to-high edge trigge...
by notro
Mon Jun 08, 2015 1:11 pm
Forum: Device Tree
Topic: Interesting GPIO pad changes with device tree
Replies: 2
Views: 3535

Re: Interesting GPIO pad changes with device tree

I don't know anything about the initial poweron state, but the firmware sets the gpios. It uses a builtin gpio setup unless /boot/dt-blob.dts exists. The default is shown in the file linked to at the bottom of this page: https://www.raspberrypi.org/documentation/configuration/pin-configuration.md Wh...
by notro
Sun May 31, 2015 9:03 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3.5 Inch SSD2119 TFT Display and Notro's FBTFT
Replies: 11
Views: 5042

Re: 3.5 Inch SSD2119 TFT Display and Notro's FBTFT

It could be that the default init sequence in fb_ssd1289 does not match your display. An uninitialized display is white, so when the driver is loaded you should get a backlit black display. You will always get /dev/fb1 even if there is no display connected, the driver doesn't check. See if you can g...
by notro
Sun May 31, 2015 8:29 pm
Forum: Other projects
Topic: Issue trying to use push button to launch program.
Replies: 4
Views: 1162

Re: Issue trying to use push button to launch program.

> Is there any other way to have a gpio (button) to launch a program in Debian? You can use a gpio keyboard combined with the triggerhappy daemon (thd). It requires the creation of a Device Tree overlay: https://www.raspberrypi.org/documentation/configuration/device-tree.md The gpio-keys driver will...
by notro
Sun May 17, 2015 8:02 pm
Forum: Other projects
Topic: A big problem with Adafruit touchscreen
Replies: 27
Views: 13679

Re: A big problem with Adafruit touchscreen

I use con2fbmap when I test fbtft: $ con2fbmap 1 console 1 is mapped to framebuffer 0 $ con2fbmap 1 1 $ con2fbmap 1 console 1 is mapped to framebuffer 1 $ con2fbmap 1 0 $ con2fbmap 1 console 1 is mapped to framebuffer 0 This will put the console on the tft display (/dev/fb1), and it always works out...
by notro
Sat May 02, 2015 6:13 pm
Forum: General discussion
Topic: 3.5 Zoll Display not showing on RetroPie
Replies: 3
Views: 18857

Re: 3.5 Zoll Display not showing on RetroPie

If you increase the speed and get glitches, wrong colors, white display (config trashed) you're running it too fast. There are many factors that determine how fast you can go. Many of these controllers are listed in their datsheet with a max speed of 10MHz, so we run them out of spec. If you want re...
by notro
Fri May 01, 2015 9:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI has more speeds
Replies: 15
Views: 50884

Re: SPI has more speeds

This will give you a kernel that has this change:

Code: Select all

sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
https://github.com/notro/fbtft/wiki#install

This is the driver used in that kernel: https://github.com/notro/spi-bcm2708
by notro
Fri May 01, 2015 7:51 pm
Forum: Advanced users
Topic: Two SPI attached ST7735R displays
Replies: 7
Views: 2863

Re: Two SPI attached ST7735R displays

It can be done. Reset and D/C can't be shared, but the reset gpio is optional. The displays need to be reset though, so in that case some circuitry is needed to do the reset. fbtft_device can only add device for one display. But you can use a DT overlay instead, maybe something like this (not tested...
by notro
Wed Apr 08, 2015 3:11 pm
Forum: Advanced users
Topic: devicetree overlay for MCP23017 GPIO expander
Replies: 66
Views: 19857

Re: devicetree overlay for MCP23017 GPIO expander

This might be the source of your problem:
[PATCH] pinctrl: bcm2835: Fix support for threaded level triggered IRQs
https://lkml.org/lkml/2015/4/7/194

Go to advanced search