Hello,
I am porting a Raspberry PI driver to Red Pitaya. However I do not know how to modify the Device Tree on the Red Pitaya. Any pointers would help.
Regards!
How do you configure the Device Tree on Red Pitaya
-
- Posts: 54
- Joined: Tue Feb 02, 2016 8:42 pm
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: How do you configure the Device Tree on Red Pitaya
Hi,
in the course of the build process, the devicetree source is first generated from the ZYNQ configuration data and then patched to account for Red Pitaya specifics. If you want to insert your own nodes, you would do that by adding them to this patch.
in the course of the build process, the devicetree source is first generated from the ZYNQ configuration data and then patched to account for Red Pitaya specifics. If you want to insert your own nodes, you would do that by adding them to this patch.
-
- Posts: 54
- Joined: Tue Feb 02, 2016 8:42 pm
Re: How do you configure the Device Tree on Red Pitaya
I am trying to add a RaspberryPi FBTFT (LCD Display) driver to the RedPitaya - https://github.com/notro/fbtft.git
My understanding is that I add the FBTFT Device Tree to the Red Pitaya Device Tree and then I add the code for the driver in the relevant driver directory. Is this correct?
The FBTFT Readme says the following:
Development is done on a Raspberry Pi running the Raspbian "wheezy" distribution.
INSTALLATION
Download kernel sources
From Linux 3.15
cd drivers/video/fbdev
git clone https://github.com/notro/fbtft.git
Add to drivers/video/fbdev/Kconfig: source "drivers/video/fbdev/fbtft/Kconfig"
Add to drivers/video/fbdev/Makefile: obj-y += fbtft/
Before Linux 3.15
cd drivers/video
git clone https://github.com/notro/fbtft.git
Add to drivers/video/Kconfig: source "drivers/video/fbtft/Kconfig"
Add to drivers/video/Makefile: obj-y += fbtft/
Enable driver(s) in menuconfig and build the kernel
See wiki for more information: https://github.com/notro/fbtft/wiki
Source: https://github.com/notro/fbtft/
My understanding is that I add the FBTFT Device Tree to the Red Pitaya Device Tree and then I add the code for the driver in the relevant driver directory. Is this correct?
The FBTFT Readme says the following:
Development is done on a Raspberry Pi running the Raspbian "wheezy" distribution.
INSTALLATION
Download kernel sources
From Linux 3.15
cd drivers/video/fbdev
git clone https://github.com/notro/fbtft.git
Add to drivers/video/fbdev/Kconfig: source "drivers/video/fbdev/fbtft/Kconfig"
Add to drivers/video/fbdev/Makefile: obj-y += fbtft/
Before Linux 3.15
cd drivers/video
git clone https://github.com/notro/fbtft.git
Add to drivers/video/Kconfig: source "drivers/video/fbtft/Kconfig"
Add to drivers/video/Makefile: obj-y += fbtft/
Enable driver(s) in menuconfig and build the kernel
See wiki for more information: https://github.com/notro/fbtft/wiki
Source: https://github.com/notro/fbtft/
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: How do you configure the Device Tree on Red Pitaya
Basically it's correct, with some additional things to mention.
- the linux source is extracted from a downloaded archive, so it's not totally straight forward to add the driver code for a fresh checkout - you could mimic the method the "rtl8192cu" and "lantiq" drivers are added to the kernel source in the Red Pitaya build
- for the same reason, adding the changes in Kconfig and Makefile (according to 3.15+ directions) are best done by patching
- because the devicetree is generated during build, the dts parts have to be added to the patch mentioned in a previous post
- you also have to add the config settings for the new driver to the linux...config.patch in order for them to be included in the kernel build
-
- Posts: 54
- Joined: Tue Feb 02, 2016 8:42 pm
Re: How do you configure the Device Tree on Red Pitaya
Okay this is helpful information.
I assume that I also need to edit the RaspberryPi Device Tree file for this particular driver, because the bindings would be different.
Regards!
I assume that I also need to edit the RaspberryPi Device Tree file for this particular driver, because the bindings would be different.
Regards!
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: How do you configure the Device Tree on Red Pitaya
As far as I can determine with only basic knowledge about devicetrees, you should retarget the spi components of the RPi dts from spi0 to spi1, because spi1 is the bus that's available on extension connector E2.
I am uncertain about what to do with the gpio assignments, though.
I am uncertain about what to do with the gpio assignments, though.
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 104 guests