Tool/software: Linux
I am working on Beagle Black bone (AM335X) .I have some doubts.
Can you please clarify above doubts
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Linux
I am working on Beagle Black bone (AM335X) .I have some doubts.
Can you please clarify above doubts
Srinivas,
Thanks for your post. Let me see if I can help address your concerns.
First off, to become familiar with Device Tree, I highly recommend this presentation "Device Tree for Dummies".
srinivas kakarla said:Q1: How device tree files will communicate with driver ? and relation between these two.
This is a pretty broad question. I'd summarize it as the device driver is written to query the Device Tree (DT) to get information it needs about the SoC or board that it can't discover on it's own. This used to be provided as "Platform Data" in structures throughout the code. Most of this is usually done in the device driver's probe() function and OF (open firmware) calls to interrogate the DT.
srinivas kakarla said:Q2: I Device Driver will work without without dtb ?
That depends on the driver and how it was written. TI SoC drivers for recent architectures us DT.
srinivas kakarla said:Q3 : How to write dts from beginning or from scratch ?.Do you have any documents ?
You don't have to. The TI SDK provides several working examples of our DTs for our EVMs. You can find these in the kernel sources/arch/arm/boot/dts. These provide a great starting point. Most designs can start from one of these and make delta changes due to hardware differences. We provide several example DTs, and there are even more in the Linux kernel, that can all serve as excellent reference points.
Since the kernel source is provided, you can also review the code to see exactly how the DT information is used, but that is usually not necessary. However, when you get stuck, a few printk()s in the right places can help you get moving again quickly.
There are also "bindings" documents that help explain DT/driver interaction in the kernel sources/Documentation/devicetree/bindings.
I hope this is helpful for you.
srinivas kakarla said:1. Where can i find the Unit Address and reg address of Interface ?,For example UARTo.
I want to know uart0 ,I2C0 ,etc Unit address and Register address .
In the corresponding am33xx.dtsi file you should find entries for all of the SoC peripherals with their associated entries. These should correspond to what is found in the device's data manual.
srinivas kakarla said:2. If we want to add new external interface to the device LCD or HDMI .Is s pin-mux is enough ?
No, you typically need Pinmux, and a node to provide other information and apply that pin mux. You also have to make sure to set that particular interface to OK. Please see the am335x-evm.dts for an example of an LCD entry. In this case, it is called panel:
panel { compatible = "ti,tilcdc,panel"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&lcd_pins_s0>; backlight = <&lcd_bl>; panel-info { ac-bias = <255>; ac-bias-intrpt = <0>; dma-burst-sz = <16>; bpp = <32>; fdd = <0x80>; sync-edge = <0>; sync-ctrl = <1>; raster-order = <0>; fifo-th = <0>; }; display-timings { 800x480p62 { clock-frequency = <30000000>; hactive = <800>; vactive = <480>; hfront-porch = <39>; hback-porch = <39>; hsync-len = <47>; vback-porch = <29>; vfront-porch = <13>; vsync-len = <2>; hsync-active = <1>; vsync-active = <1>; }; }; };
As you can see, it has much more than pin mux.
You could also reference am335x-evmsk.dts as another data point.
I hope this is helpful to you.