Skip to contentSkip to conversation

Question: DTS and redundant board IDs

DISCUSSION David Lanzendörfer 2 participants 3 messages May 3, 2012 – May 4, 2012 1 message not in the archive Tegra architecture support

lore
Share & tools
lore
#0 lore raw

Hello
As you certainly already have heard some manufacturers are using the same board ID for multiple devices.
For instance, the NotionInk Adam registers as harmony board, while it's pinmuxing differs in fact a lot.
My question:
How could this be handled by DTS?
ATM I'm compiling the kernel with only the adam board enabled, but I'd like to integrate the muxing information into DTS in order to get it running on top of upstream.

Any suggestions?

Thx a lot in advance

-lev

#1 lore raw
Quoted 7 lines · David Lanzendörfer

Hello
As you certainly already have heard some manufacturers are using the same board ID for multiple devices.
For instance, the NotionInk Adam registers as harmony board, while it's pinmuxing differs in fact a lot.
My question:
How could this be handled by DTS?

The machine ID isn't relevant with device tree; just supply the correct content in device tree and it'll work out fine.

A message that is not in the archive (sent off-list or not yet received): 5798689.HUgVBhM8Wg@kira

#3 lore raw
Quoted 7 lines · David Lanzendörfer

Hi
Thanks a lot for your answer!

Quoted 2 lines

The machine ID isn't relevant with device tree; just supply the correct content in device tree and it'll work out fine.

How do I tell the kernel on which device within the tree it's running on?

The kernel shouldn't really care; the DT support is designed to mostly only directly know about Tegra20 vs. Tegra30.

Quoted 1 line

Where can I get the correct string from for adding into pinmux_configs?

You'll have to create it yourself by translating the content of the board pinmux file in whatever kernel the board currently uses.

I do have a very rough Python script that mostly converts the format, but it's got a lot of warts. I can email that to you directly if you want. You will need to manually patch up some of the results though.

Quoted 2 lines

In upstream there are strings like "compulab,trimslice" or "nvidia,harmony". Where can I extract the correct string for adam?

You will have to create it yourself based on the vendor and board name. I think what you want is something like:

compatible = "notionink,adam", "nvidia,tegra20";

Quoted 3 lines

Sry, but until now, I've just used the hw id and it worked... :-/

Is there a documentation and I'm just unable to find it?

In the kernel source, Documentation/devicetree/bindings describes the format of all the device tree nodes. See e.g. pinctrl/nvidia,tegra20-pinmux.txt. Also, be sure to become familiar with how the other Tegra device trees are constructed; see arch/arm/board/dts/tegra*.