Questions tagged [device-tree]

a Device Tree (DT) is a description of the hardware in a system

Filter by
Sorted by
Tagged with
1 vote
1 answer
32 views

Raspberry pi 4, UART4 and SPI0

Raspberry pi 4 has 4 usable uart ports, uart 4 with rx in gpio 9 and tx in gpio 8, share rx pin with SPI0 miso0 pin. I would like to use both peripherals no ate the same time, but in different moment ...
user avatar
0 votes
0 answers
71 views

Using the Dynamic Device Tree to add Overlays at Run Time

I am working on a couple of ideas for device tree overlays for the RPi 3B+ & 4B. It will be useful in my testing to be able to load and unload overlays without having to reboot each time. As ...
user avatar
  • 17.8k
0 votes
1 answer
99 views

Raspberry Pi Compute Module 4 SPI bus not registering on custom Poky OS [Yocto]

I am trying to get a MCP2515 (CAN-bus IC that works on SPI) to work on a Raspberry Pi Compute Module 4 (8GB eMMC, No Wifi, 4GB RAM). I have been able to get the module working on a regular Raspberry ...
user avatar
2 votes
2 answers
4k views

is dtoverlay a general linux concept or RPi specific?

With all the raspberry pi hats popping on and off, dtoverlay and /boot/config.txt is a very nice method to quickly tell the kernel that you've got new device tree information. But I've never seen this ...
user avatar
0 votes
0 answers
61 views

Why does dt-blob-dualcam.dts set both cameras as connected to i2c0 in Compute Module 4?

In dt-blob-dualcam.dts both CAMERA_0_I2C_PORT and CAMERA_1_I2C_PORT are assigned number = <0>;, despite being connected to different pins. Why is that? Relevant devicetree section:...
user avatar
2 votes
1 answer
109 views

How to configure the device tree for the MAX30102?

I am trying to get the MAX30102 heart sensor to run and have recompiled the kernel with the necessary module. I have loaded the follwing modules to be sure i2c_dev i2c-bmc2708 i2c-bmc2835 industrialio ...
user avatar
  • 147
2 votes
0 answers
55 views

The RPi 4 does not support Power Management - is it due to lack of capability, or lack of will?

It's clear enough from this Q&A and the null output from cat /sys/power/state that the Raspberry Pi does not currently support the Linux kernel's Power Management features. This explains why there ...
user avatar
  • 17.8k
-1 votes
1 answer
178 views

Pi zero doesn't fully shut down after adding a gpio-poweroff dtoverlay to /boot/config.txt

Disclaimer I'm still learning about the device tree in general and am definitely fumbling about a bit. The problem Pi Zero W draws basically zero current when shutdown with sudo shutdown now. After ...
user avatar
3 votes
2 answers
1k views

Re-configure SPI-CS as gpio while using SPI

I am on a raspberry pi 4. Using both SPI's with no need for either chip select. I'm running out of I/O and could really use those. Does anyone know if there is a way to repurpose the SPI chip selects ...
user avatar
1 vote
0 answers
55 views

Device Tree for Generic Output

I'm currently developing my first Pi Hat for a personal project. I've been exploring Device Trees and I'm quite liking the concept from the perspective that the userland code can address specific ...
user avatar
0 votes
2 answers
118 views

Location of .dtbs files - specifically uart0.dts and minimart-bt.dts

Does anyone know where I can find the precompiled .dtbs files - specifically uart0.dts and minimart-bt.dts?
user avatar
  • 101
1 vote
2 answers
157 views

How can RpiZW interface three SPI ADS1248 ADC, one microSD adapter, and one Ethernet Adapter?

I'd like to connect multiple different SPI devices to a Raspberry Pi Zero W (at least 5), with a few specific requirements. The devices would be, if possible: 1x ENC28J60 Ethernet SPI adapter - this ...
user avatar
0 votes
0 answers
206 views

DS18B20 does not have a unique adress in /sys/bus/w1/devices

The problem: I am trying to use a RW1820 (DS18B20), to display the temperature. yet it does not show up in devices. Only w1_bus_master 1 appears. Setup: Raspberry Pi 4 1-Wire Temperature Sensor ...
user avatar
0 votes
1 answer
2k views

Device Tree configuration for I2S sound (MAX98357A)?

What needs to be done to run an I2S DAC/Amplifier board based on MAX98357A (datasheet) that appears to be a clone of this well-documented Adafruit product with the corresponding Device Tree overlay? ...
user avatar
  • 123
1 vote
0 answers
53 views

Problem in initiating i2c driver module for bmp180 i2c based sensor at kernel level

For leaning purpose i am writing a i2c client kernel module for bmp180 pressure sensor. My kernel code is -> #include <linux/version.h> #include <linux/module.h> #include <linux/init....
user avatar
1 vote
1 answer
1k views

Error when connecting more than ten USB devices on Raspberry Pi 4 [duplicate]

What is the limit of USB devices in raspberry pi4? We have an external USB hub with its power supply and 10 devices fall off with errors. [Wed Mar 11 09:04:43 2020] usb 1-1.3.4-port1: Cannot enable. ...
user avatar
  • 21
0 votes
1 answer
969 views

Re configuring GPIO pins for SPI protocol

GPIO pins 19,21,23,24,26,35,38,40 are dedicated for SPI protocol. Is it possible to use other GPIO pins for SPI? If yes, how do we do it?
user avatar
  • 11
2 votes
0 answers
483 views

Applying dwc2.dtbo to bcm2711-rpi-4-b.dtb at build time triggering FDT_ERR_NOTFOUND

I'm trying to build a NixOS image for my Raspberry Pi 4b with the dwc2 device tree overlay applied. Per advice from the #nixos-aarch64 IRC channel, doing this the Nix Way calls for configuring ...
user avatar
1 vote
1 answer
270 views

Trouble adding a gpio device to the device tree

I'm trying to connect an hx711 to GPIO23 and GPIO24 pins on an RPI3 A+, and I need to specify this in the device tree to have the hx711.ko driver be probed. I've been stuck on this problem for some ...
user avatar
  • 39
2 votes
1 answer
60 views

Why DMA uses bus address rather than physical address?

Why DMA uses bus address rather than physical address? And do we provide bus address or physical address in the device tree? Where do we get to know these addresses that needs to be provided to the ...
user avatar
1 vote
0 answers
948 views

Creating a Device Tree Overlay for i2c device

I'm trying to create a Device Tree overlay for a i2c touch screen. Things are a bit strange as the screen is a 16bit DPI so all usual i2c pins are consumed. I'm using a i2c-tiny-usb adapter to get an ...
user avatar
  • 196
0 votes
0 answers
49 views

I2C client driver instantiation using Device Tree - probe did not get called

I am writing a sample and simple i2c driver in which I am trying to instantiate the i2c client device using device tree overlay. I have got some DTE overlay sample which i have complied to .dtbo and ...
user avatar
0 votes
0 answers
273 views

Simple Sound Card with I2S - how do I switch frequencies?

I asked this a month ago, but didn't get an answer and so the thread was auto-deleted. It is becoming critical that this be solved, so I am reposting. I have the simple sound card working with a ...
user avatar
  • 1
0 votes
0 answers
116 views

Using waveshare LCD and SPI1 for LEDs

My problem is that I cant get SPI1 and the LCD screen to work at the same time. Only SPI1 with the spi1-1cs overlay worked and only the waveshare35a overlay working, I tried to make my own overlay ...
user avatar
  • 1
1 vote
1 answer
345 views

Can I run 2 device tree overlay at the same time?

I'm trying to monitor some 4-20mA current loops and 0-10V generators with a RPi 3. I found these modules which would do the job: https://widgetlords.com/products/pi-spi-2a0-raspberry-pi-analog-output-...
user avatar
2 votes
1 answer
221 views

Building an old kernel is not possible because the arch/arm/boot/dts/overlays/ directory does not exist

I've been trying to build a kernel from the 4.14.85 version. I followed the instructions from the official documentation but instead of using the latest version you can find in the repository I ...
user avatar
  • 673
1 vote
1 answer
1k views

Use internal pull up resistors with the gpio-keys module in the device-tree

I have an external board with some buttons that are attached to gpio 20 and 21 which connects these pins to ground when pressed: simulate this circuit – Schematic created using CircuitLab I'd ...
user avatar
2 votes
1 answer
2k views

How do I add an i2c device to the device tree?

I am trying to add an mpu 9250 to the device tree of my RPi 3 A+ so that my custom driver's probe function will be called. I have followed this documentation about the Raspberry Pi device tree and ...
user avatar
  • 39
0 votes
0 answers
55 views

What could trigger the removal of the WiFi device?

I discovered this morning that wlan0 on my RPi vanished during the night (at 04:14:13 in the unaltered log below): Dec 18 03:38:46 rpi1 wpa_supplicant[407]: wlan0: WPA: Group rekeying completed with ...
user avatar
  • 477
0 votes
2 answers
2k views

gpio-shutdown doesn't seem to have an effect

We are trying to have the Pi shut down gracefully when power is removed. We have a battery connected so that it will have time to shut down. So far, our attempts to use gpio-shutdown have been ...
user avatar
  • 115
8 votes
4 answers
9k views

Emulate Raspberry Pi zero W with Qemu failed due to missing dtb

I am trying to emulate a Raspberry Pi zero W with Qemu based on an image I used on a real Raspberry Pi zero W. The command I am using is: sudo qemu-system-arm \ ...
user avatar
  • 81
0 votes
0 answers
512 views

Connecting RAW NAND through GPIO

I'm trying to define a device tree for connecting an external raw NAND using GPIO on RPI3. I found that there are available drivers, and I found an example in the sources' "Documentation" directory ...
user avatar
  • 1
1 vote
1 answer
609 views

How and from where is the ENC28J60 driver loaded?

I have a raspberry CM3 setup where I added an external eNet port so that I have internet connectivity. It is very similar to the break-out board setup such as this one which is also based on the ...
user avatar
  • 55
1 vote
2 answers
5k views

Rpi3 is the hardware watchdog enabled by default

I have RaspberryPI's 3 (running both Jessie and Stretch) and tested on both In order to enable the watchdog timer, In many posts I saw that add in the /boot/config.txt a line with: dtparam=watchdog=...
user avatar
2 votes
1 answer
569 views

Change Device Tree to pullup pin at boot

I trie to add a LTC2954 to the raspberry pi zero w. I designed and produced a prototype pcb with an lipo management system for load and loadsharing. My problem is, that the KILL Pin of the LTC2954 has ...
user avatar
0 votes
0 answers
192 views

Difference between sound and audio nodes in RPi 3 device tree?

I looked a bit into the device tree of Raspbian 9 on Raspberry Pi 3, using: dtc -I fs /proc/device-tree > myrpi-dev-tree.txt 2>&1 I've noticed there is a node called audio: audio { ...
user avatar
  • 201
2 votes
0 answers
250 views

Raspberry Pi remap DPI pins [closed]

I'm trying to hook up my Raspberry Pi a to custom display hat via the parallel display interface (GPIO Pins, not ribbon cable). The problem I'm facing is that the DPI pins are rather awkwardly placed ...
user avatar
1 vote
0 answers
190 views

Access more than two (2) slaves on spi0

Supposedly, there is a new driver that supports arbitrary GPIOs for SPI0 channel select, that is configurable via the device tree. Everything I try only half works. The hard works. If I toggle the ...
user avatar
2 votes
0 answers
472 views

Accessing 3+ SD/MMC /dev/mmcblk devices

I've successfully followed some instructions for access 2 SD cards via SPI on a Raspberry Pi 3: https://ralimtek.com/Raspberry_Pi_Secondary_SD_Card/ How do I configure it to access more than 2 SD ...
user avatar
1 vote
0 answers
152 views

In simultaneous use of SPI0 and DPI Mode 3 interfaces, can SPI0 CS0 be moved to a pin other than 8?

I am attempting to design a device using a Pi Zero which needs to connect to both an ENC18J60 SPI ethernet controller, and a VGA monitor via Mode 3 DPI and the Mincepi Pi Zero pi2vga schematic. While ...
user avatar
3 votes
2 answers
2k views

dtoverlay=gpio-poweroff not working on raspberry pi 3 B

Problem: I have a Raspi 3B rev: a02082 (Q1 2016 3 Model B 1.2 1 GB (Mfg by Sony)) running raspbian jessie kernel 4.9.35-v7 I want to signal to a power management circuit that filesystems ...
user avatar
  • 501
0 votes
0 answers
682 views

SPI doesn't work because of device tree

I have the same problem as this person: SPI enabled in device tree, but I can't use it I tried commenting in the original thread but the community rules don't allow me to comment because I don't ...
user avatar
  • 109
1 vote
1 answer
4k views

How do i use DeviceTree to init GPIO to a set value?

Hello i've got a board connected to my raspberry pi 3 and according to the pin set on boot of the raspberry this shield reboot which is problematic. I need to be able to reset the board and control ...
user avatar
3 votes
1 answer
66 views

DeviceTree magic strings

I recently stumbled over the MagPi Essentials Camera. In chapter 7 "Flash photography using an LED" (p.41+), they show how to configure pin BCM17 to act as a flash for the official Raspberry Pi Camera....
user avatar
  • 2,622
2 votes
0 answers
602 views

device tree and led blink

I am trying to create one led driver via device tree in Rpi 3 I had created the dtsi file /dts-v1/; /plugin/; / { compatible = "brcm,bcm2837"; fragment@0 { target = <&...
user avatar
4 votes
1 answer
6k views

SPI enabled in device tree, but I can't use it

I am trying to use SPI interface on Raspberry Pi 1 B (OS: Raspbian July 2017, kerenl 4.9.5). To do this, I am using wiringPi. I confirmed that wiringPi works via gpio readall To load SPI: gpio load ...
user avatar
  • 279
0 votes
2 answers
1k views

How to use advanced GPIO functions via sysfs?

The GPIO ports can be accessed using sysfs interface located in /sys/class/gpio. However, I failed to found more detailed documentation, most of which only describes plain read/write operation. What ...
user avatar
3 votes
2 answers
4k views

How to build my very own device tree (and if I need to)

Let me preface this by saying I don't know much about device trees. I do know a bit about ATAGs, since I'm working with this operating system that currently only uses ATAGs. I'm modifying the ...
user avatar
1 vote
1 answer
632 views

apds 9960 on raspberry pi zero

I would like to use the apds9960 (light/gesture sensor) on rp0 - utilizing the kernel iio driver, which is already available, but there is no dt overlay yet. I guess I need to: write the dts file ...
user avatar
  • 309
2 votes
1 answer
4k views

How to use BMP280 SPI Kernel Module

I got a adafruit BME280 sensor board and I wired it to the raspberry pi zero via spi. According to the datasheet I can read sensor data from the device via the userspace spi interface. Everything ...
user avatar