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
94 views

Why is my measured I2C clock frequency significantly slower than its setting?

I am setting the I2C frequency on the Compute Module 4 (running Ubuntu 22.04.2 LTS) with dtparam=i2c_arm=on,i2c_arm_baudrate=400000. The I2C bus has two parallel 10kOhm pullup (to 3.3V) resistors per ...
Eric's user avatar
  • 21
0 votes
1 answer
731 views

can't mount usb drive to Zero W: "can't open blockdev" and "special device /dev/sda does not exist" errors

I have a Pi Zero W, and I want to plug in a USB drive and use it as a tiny little backup server. I have a USB OTG cable, and when I plug in a flash drive (later I hope to use a much larger external ...
Dan Drake's user avatar
  • 101
0 votes
2 answers
80 views

gpio-poweroff configured as input: how can I read the input pin?

I am developing a power supply with a supercapacitor to give around 30 seconds of reserve power so the pi can safely shut itself down on power loss. I have a working gpio-poweroff definition in /boot/...
Marc's user avatar
  • 101
3 votes
2 answers
208 views

i2c Real Time Clock IC on Raspberry

I am using an industrial device based on a Compute Module Raspberry Pi 3 called Kunbus RevPi Core 3+. The device is shipped with Raspbian and a pre compiled Image but I would like to install an ...
Stefano Bossi's user avatar
2 votes
1 answer
157 views

2-ch-can-hat (mcp2515) on SPI1 rpi 3 b+

On a Raspberry Pi 1 Mod. B+ Raspberry Pi reference 2021-01-11 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21090519d85bdaa1615d5d5057d37b09368ea5d2, stage2 Oct 29 2021 10:49:08 ...
martburg's user avatar
  • 121
0 votes
2 answers
172 views

Adding a `cec-gpio` dtoverlay for CEC debugging

I want to build a CEC Debugger as described in the Kernel.org documentation with my Pi Zero 2 W, I plan on using something like this: I am having trouble with the final instructions listed to enable ...
Meberem's user avatar
  • 129
3 votes
2 answers
301 views

i2c_arm bus initialization and device-tree overlay

I've built a Pi1541 HAT, just for fun, and am now playing with the device-tree autoconfiguration in Raspbian. I've made an overlay that autoloads during boot, based on the EEPROM contents, and that ...
Hans Liss's user avatar
0 votes
0 answers
93 views

Rename gpio-keys input device with label attribute

I have added the following line to my boot.txt to attach a push button input device to my system: dtoverlay=gpio-key,gpio=26,active_low=0,keycode=256,label="myButton" Once the OS is booted, ...
Jacob's user avatar
  • 133
1 vote
1 answer
462 views

1-Wire internal pullup isn't enabled on boot, but can be enabled after boot

On a Pi 4 I have the following lines in /boot/config.txt: dtoverlay=w1-gpio gpio=4=op,pu This should enable 1-wire on the default GPIO pin, which is 4, and then enable the internal pullup resistor. ...
okw's user avatar
  • 131
3 votes
0 answers
121 views

Enabling SPI card reader in device tree on Raspberry Pi

Good evening, I have MFRC522 card reader. It works well with generic spidev kernel-level driver and high-level python driver. However, as I wanted to learn device trees in linux, I tried to bind ...
yomol777's user avatar
1 vote
1 answer
409 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 ...
Jefferson Alexis's user avatar
3 votes
1 answer
1k 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 ...
Seamus's user avatar
  • 20.6k
0 votes
1 answer
651 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 ...
Mats de Waard's user avatar
5 votes
2 answers
13k 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 ...
Sittin Hawk's user avatar
2 votes
1 answer
164 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 ...
neolith's user avatar
  • 147
2 votes
0 answers
59 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 ...
Seamus's user avatar
  • 20.6k
-1 votes
1 answer
276 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 ...
Rasmus_SB's user avatar
3 votes
2 answers
3k 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 ...
chrismec's user avatar
1 vote
0 answers
95 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 ...
phil-lavin's user avatar
0 votes
2 answers
343 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?
Ben Bird's user avatar
  • 101
1 vote
2 answers
225 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 ...
TheFaustie's user avatar
0 votes
0 answers
338 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 ...
Anton van der Wel's user avatar
0 votes
1 answer
3k 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? ...
handle's user avatar
  • 153
2 votes
0 answers
91 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....
Prateek Singh's user avatar
1 vote
1 answer
2k 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. ...
Dmitry's user avatar
  • 21
0 votes
1 answer
1k 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?
tan45's user avatar
  • 11
2 votes
0 answers
642 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 ...
Charles Duffy's user avatar
1 vote
1 answer
370 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 ...
gabson's user avatar
  • 69
2 votes
1 answer
71 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 ...
kurramkurram D's user avatar
1 vote
0 answers
1k 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 ...
hardillb's user avatar
  • 196
0 votes
0 answers
60 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 ...
user11875340's user avatar
0 votes
0 answers
295 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 ...
Erik's user avatar
  • 1
0 votes
0 answers
144 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 ...
Sven K's user avatar
  • 1
1 vote
1 answer
436 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-...
Marc Aurèle's user avatar
2 votes
1 answer
252 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 ...
David's user avatar
  • 683
1 vote
1 answer
2k 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 ...
Sebastian Stigler's user avatar
5 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 ...
gabson's user avatar
  • 69
0 votes
0 answers
57 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 ...
WoJ's user avatar
  • 535
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 ...
SSteve's user avatar
  • 125
8 votes
4 answers
10k 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 \ ...
GuillaumeB's user avatar
0 votes
0 answers
887 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 ...
Lioryb's user avatar
  • 1
1 vote
1 answer
678 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 ...
Steven's 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=...
akarapatis's user avatar
2 votes
1 answer
728 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 ...
arget888's user avatar
0 votes
0 answers
196 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 { ...
sdaau's user avatar
  • 201
2 votes
0 answers
264 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 ...
Raul Grigorașcu's user avatar
1 vote
0 answers
210 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 ...
Adam Tegen's user avatar
2 votes
0 answers
528 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 ...
Adam Tegen's user avatar
1 vote
0 answers
187 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 ...
DodoDude700's user avatar
3 votes
2 answers
3k 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 ...
saraf's user avatar
  • 561