Hi,
I recently started taking the udemy course “Linux Device Driver Programming Using Beaglebone Black” and while comparing the device tree shown in the lectures with the ones I have, I found some differences which I don’t understand.
1.) The am335x-bonegreen-wireless.dts I’m looking at starts out like this:
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/
*/
/dts-v1/;
#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-bonegreen-common.dtsi"
#include <dt-bindings/interrupt-controller/irq.h>
So I opened all the .dtsi files mentioned here side by side and in am335x-bone-common.dtsi I find this snippet:
&i2c0 {
pinctrl-names = "default";
pinctrl-0 = <&i2c0_pins>;
status = "okay";
clock-frequency = <400000>;
symlink = "bone/i2c/0";
tps: tps@24 {
reg = <0x24>;
};
baseboard_eeprom: baseboard_eeprom@50 {
compatible = "atmel,24c256";
reg = <0x50>;
#address-cells = <1>;
#size-cells = <1>;
baseboard_data: baseboard_data@0 {
reg = <0 0x100>;
};
};
};
So, as mentioned in the lecture I assumed I would find a node called i2c0, in the more general am33xx.dtsi file. However, i2c0 is only mentioned once in the aliases node:
/ {
compatible = "ti,am33xx";
interrupt-parent = <&intc>;
#address-cells = <1>;
#size-cells = <1>;
chosen { };
aliases {
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
serial0 = &uart0;
...
Also, when looking up the aliases node in the device tree specification I found that “the property value [here &i2c0] specifies the full path to a node in the devicetree.” How can I find this node? I also tried looking for a node with compatible = ti,omap4-i2c but couldn’t fin any…
Regards