device-tree

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

不想你离开。 提交于 2019-12-02 23:06:06
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. TheCodeArtist 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 folding capabilities are somewhat sufficient as long as the dts is properly indented. Setup hot

Does a memory address point to a byte of information?

走远了吗. 提交于 2019-12-02 21:15:23
问题 The following is an excerpt from DTS file. linux/arch/powerpc/boot/dts/[board_name].dts memory { device_type = "memory"; reg = <0x00000000 0x40000000>; // 1GB at 0 }; The embedded device has 1 GB of memory. 0x40000000=1073741824 in decimal. The only way i get 1 GB is when i calculate 1073741824 as bytes. Which means 1073741824 bytes = 1GB. So does this mean 0x00000000 points to a byte of data in RAM? In other words, every byte in RAM has an address. Why is that so? What do we read a block of

The order in which the device-tree text file is written, does it matter?

偶尔善良 提交于 2019-12-02 20:38:29
问题 Does the order in which a device-tree text file (.dts) is written matter at all ? For example, if you take a node from the top of the file and move it to the bottom, will it change the order of hardware detection, IRQ configuration, or whatever ? 回答1: Does the order in which the device-tree text file (.dtx) is written matter at all ? The answer for .dts and .dtsi source files is "depends". The Device Tree has a structure, so rearrangement of nodes may, or may not, change the system hardware

Does a memory address point to a byte of information?

无人久伴 提交于 2019-12-02 12:36:44
The following is an excerpt from DTS file. linux/arch/powerpc/boot/dts/[board_name].dts memory { device_type = "memory"; reg = <0x00000000 0x40000000>; // 1GB at 0 }; The embedded device has 1 GB of memory. 0x40000000=1073741824 in decimal. The only way i get 1 GB is when i calculate 1073741824 as bytes. Which means 1073741824 bytes = 1GB. So does this mean 0x00000000 points to a byte of data in RAM? In other words, every byte in RAM has an address. Why is that so? What do we read a block of 8 bits? Why not a word? TL;DR : RAM accesses are NOT in byte sized chunks even though each byte is

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

五迷三道 提交于 2019-12-01 23:14:30
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: spidev listed directly in DT So how else the spidev should be described? What is the right syntax?

max732x.c I2C IO Expander + GPIO Keys w/ Linux Device Tree not working

删除回忆录丶 提交于 2019-11-30 09:36:12
问题 I'm working with a Freescale MX6 and a 3.10.31 Freescale modified kernel. I have a Maxim MAX7325 used as an IO expander, which has pushbuttons attached to P0-P2. The interrupt line from the 7325 is attached to the GPIO_3 pad (which I believe is GPIO1_3...) I set up the 7325 and gpio-keys in the device tree like this: max7325_reset: max7325-reset { compatible = "gpio-reset"; reset-gpios = <&gpio5 16 GPIO_ACTIVE_LOW>; reset-delay-us = <1>; #reset-cells = <0>; }; gpio-keys { compatible = "gpio

ARM Linux Atags vs Device Tree

筅森魡賤 提交于 2019-11-30 06:56:33
What is the difference between device tree and ATAGs? Also, are ATAGs a must and does the kernel expect them at a fixed address, or does it expect them in r0-r3? A device tree describes everything about the hardware which the kernel uses to select which drivers to load, where all the MMIO interfaces are, etc... at runtime. ATAGs just describes stuff like where to find an initrd and kernel parameters, memory, etc... - everything else about the machine is hard coded into the kernel. The preferred method now is to use device trees instead of ATAGs. One of the advantages include the fact that

Device tree compiler not recognizes C syntax for include files

流过昼夜 提交于 2019-11-29 15:50:57
问题 I want to compile my board device tree manually. I has downloaded the latest version of dtc from its official source, but when I try to run the following command, I get an error advising me to change all #include directives to /include/ and so on for #define , etc. dtc -I dts -O dtb -p 0x1000 meson-gxl-s905x-khadas-vim.dts -o kvim1.dtb My board is Khadas Vim with an amlogic S905x SoC in its heart. All include files are present and the error is: Error: meson-gxl-s905x-khadas-vim.dts:8.1-9

ARM Linux Atags vs Device Tree

五迷三道 提交于 2019-11-29 07:51:54
问题 What is the difference between device tree and ATAGs? Also, are ATAGs a must and does the kernel expect them at a fixed address, or does it expect them in r0-r3? 回答1: A device tree describes everything about the hardware which the kernel uses to select which drivers to load, where all the MMIO interfaces are, etc... at runtime. ATAGs just describes stuff like where to find an initrd and kernel parameters, memory, etc... - everything else about the machine is hard coded into the kernel. The

How to compile dts Linux device tree source files to dtb?

自闭症网瘾萝莉.ら 提交于 2019-11-28 18:35:31
问题 I have a device tree file (.dts) and I want to compile the file for my powerpc based board. How can I do it on my machine, which is not powerpc based?? Can I do it with the DTC installed on my Ubuntu system? Or will it be more like using a separate compiler and passing ARCH information (like using a toolchain)? 回答1: Device trees do not need to be compiled with "architecture-aware" tools. The dtc compiler on your ubuntu machine is probably current enough to compile your device tree. Or you can