device-tree

device-tree mismatch: .probe never called

試著忘記壹切 提交于 2019-12-05 19:00:53
问题 I'm having trouble understanding how device-tree works, or specifically why this driver won't init. This is in the rockchip vendor kernel for android, version 3.10 drivers/watchdog/rk29_wdt.c (reduced for readability) static const struct of_device_id of_rk29_wdt_match[] = { { .compatible = "rockchip,watch dog" } }; static struct platform_driver rk29_wdt_driver = { .probe = rk29_wdt_probe, [..] .of_match_table = of_rk29_wdt_match, .name = "rk29-wdt", }, }; static int __init watchdog_init(void)

Overview/reference manual for Open Firmware Device Trees

匆匆过客 提交于 2019-12-05 06:56:10
I am trying to setup a driver for an embedded PowerPC board, and the correct way to do this today is to use the OpenFirmware Device Tree datastructure (the .dtb file, compiled from a .dts file). Creating a tree is pretty easy, but how do I get my device driver to find its node and the data in it? I have not managed to find any good reference on this, and books like "Linux Device Drivers" are too much into x86 land to be of much help for device trees that mostly pertain to Power Architecture-based machines (arch powerpc in the Linux kernel terminology). There seems to be very little

Device Tree and code size

限于喜欢 提交于 2019-12-04 16:01:32
问题 As per my understanding of device trees , one of main uses is to remove platform specific code from drivers to support multiple platforms. How does device tree handle multiple configuration for a single peripheral? For example if I want to use LCD Panel A in Platform A and LCD Panel B in Platform B, do I need to keep both LCD Panel A and Panel B related code in the final binary? If that is the case and there are multiple peripherals with more than one option, it seems there will be huge

I've added a MAX7320 i2c output chip. How can I get the kernel to load the driver for it?

半世苍凉 提交于 2019-12-04 15:14:02
I've added a MAX7320 i2c expander chip to i2c bus 0 on my ARM Linux board. The chip works correctly from userspace with commands such as /usr/sbin/i2cset -y 0 0x5d 0x02 and /usr/sbin/i2cget -y 0 0x5d . There is a drivers/gpio/gpio-max732x.c file in the kernel source, which is compiled into the kernel that I'm running. (I've built it from source.) How do I tell the kernel that it should instantiate the gpio-max732x driver on "i2c bus 0, chip id 0x5d"? Do I need to modify the device tree .dts file and put a new .dtb file in /boot/dtbs/ ? What would the clause for instantiating a gpio-max732x

Passing Bootargs via Chosen node in Device Tree not working for Beaglebone Black

♀尐吖头ヾ 提交于 2019-12-04 07:30:24
As per my understanding chosen node is used to send boot arguments to the kernel. The following is the chosen node of the existing device code (am335x-bone-common.dtsi). chosen { stdout-path = &uart0; }; So, I have modified chosen node to pass kernel arguments. chosen { bootargs = "console=ttyO0,115200 root=/dev/mmcblk0p2 rootfstype=ext3 rw rootwait"; stdout-path = &uart0; }; While bringing up the board I encountered KERNEL PANIC, Here is the log { https://pastebin.com/XHyrsmfG } FYI: These are the u-boot commands issued on serial console(minicom) inorder to port kernel and devicetree using

device-tree mismatch: .probe never called

我的梦境 提交于 2019-12-04 04:52:28
I'm having trouble understanding how device-tree works, or specifically why this driver won't init. This is in the rockchip vendor kernel for android, version 3.10 drivers/watchdog/rk29_wdt.c (reduced for readability) static const struct of_device_id of_rk29_wdt_match[] = { { .compatible = "rockchip,watch dog" } }; static struct platform_driver rk29_wdt_driver = { .probe = rk29_wdt_probe, [..] .of_match_table = of_rk29_wdt_match, .name = "rk29-wdt", }, }; static int __init watchdog_init(void) { printk("watchdog_init\n"); return platform_driver_register(&rk29_wdt_driver); } and this is the soc

Linux, spidev: why it shouldn't be directly in devicetree?

五迷三道 提交于 2019-12-04 04:11:44
问题 I want to define a SPI device with usermode access, as explained for example in http://linux-sunxi.org/SPIdev Following these examples, I added in the devicetree this : &ecspi1 { .... other stuff ... mydev@0 { compatible = "spidev"; spi-max-frequency = <5000000>; reg = <2>; /*chipselect*/ }; }; The platform is i.MX6. ecspi1 seems to be their SPI controller. Then I indeed get /dev/spi0.2 and /sys/class/spidev/spidev0.2 But in kernel trace there's a WARNING saying this: spidev spi0.2: buggy DT:

Device tree driven kernel for raspberry pi

ぃ、小莉子 提交于 2019-12-04 02:51:43
I'd like to boot the raspberry pi with a device-tree-driven linux kernel, is there anything special to do to do that? Can anyone point what are required to set up a device-tree-based kernel boot up for the raspberry pi. I may need to have raspberry pi kernel source where drivers for devices should be compatible with device tree. If so, where can I find such kernel sources for Raspberry Pi? m-ric Device-Tree support on Raspberry Pi Raspberry Pi embeds an ARM11 SoC: Broadcom BCM2835 . Device Tree (DT) support for ARM is fairly new, but it seems that it has made its way to the Raspberry Pi CPU.

Device Tree and code size

穿精又带淫゛_ 提交于 2019-12-03 09:10:21
As per my understanding of device trees , one of main uses is to remove platform specific code from drivers to support multiple platforms. How does device tree handle multiple configuration for a single peripheral? For example if I want to use LCD Panel A in Platform A and LCD Panel B in Platform B, do I need to keep both LCD Panel A and Panel B related code in the final binary? If that is the case and there are multiple peripherals with more than one option, it seems there will be huge additional code in the binary. kzs Suppose consider if you have 5 LCD panels and 5 platform(machines), keep

Tool to visualize the device tree file (dtb) used by the Linux kernel?

孤者浪人 提交于 2019-12-03 08:58:36
问题 I am looking for a tool which can graphically represent the hardware device tree used in linux kernel. I am trying to understand linux kernel for particular arm chipset. It would be a really useful tool to have. 回答1: You can try the Component inspector tool. It is part of QorIQ Configuration Suite which is a plugin for Eclipse. Download here . (Requires registration. Free to download.) Personally as i am on the cmd-line most of the time, and quite addicted to vi , i find its built-in code