I'm working on the device tree (SDK 7.0) and I have a questions about a naming inconsistency that I see between the Documentation/devicetree/bindings/omap-usb.txt file and the am335x-evm.dts/am33xx.dtsi files.
In the documentation it's stated that usb can be set to one of three modes (otg, host, or peripheral) based on a "mode" parameter. Then there is an example given:
&usb_otg_hs { interface-type = <1>; mode = <3>; power = <50>; };
So this is what I was expecting when I went to the device tree, however when I look in the .dtsi file at the USB section I see:
usb0: usb@47401000 { compatible = "ti,musb-am33xx"; status = "disabled"; reg = <0x47401400 0x400 0x47401000 0x200>; reg-names = "mc", "control"; interrupts = <18>; interrupt-names = "mc"; dr_mode = "otg";
Is "dr_mode" the same thing as mode? I notice that instead of using numeric tags: <1> <2> and <3> like the documentation, it uses named strings: "otg".
So question 1:
Are:
dr_mode="PERIPHERAL"
and
mode=<2>
synonymous?
Second question on the same topic:
I see in the current dtsi file USB1 is set to "otg" and in the dts file it's set to "host". Is it correct that the values in the dts file will overwrite those in the dtsi (just like it does for "status")?