Hey, 2 years later...

Have you managed to solve your problem? I'm facing similar problem with my 
NanoPi Neo Air. I cannot seem to change the way OTG is handled - there is 
no dr_mode any more.

Em quinta-feira, 5 de novembro de 2015 05:35:05 UTC-3, Ison Thomas escreveu:
>
> Hi
>
> I am using a custom hardware which is based on Beaglebone black. The 
> hardware difference between BBB and our board is that USB0 is changed to 
> work in host mode and USB1 in peripheral mode. I need to make the necessary 
> changes in kernel as well to make this work. I have built the kernel and 
> uboot based on the instructions given in 
> http://elinux.org/Building_BBB_Kernel. 
>
> As far as I understand, to change the behaviour of USB port, we need to 
> change the corresponding dts file. So I tried to edit the 'am33xx.dtsi' and 
> 'am335x-bone-common.dtsi' files and change the 'dr_mode' value of the USBs. 
> I have seen the 'dr_mde" in the previous versions of these files but in the 
> latest ones this is missing and I assume the USB ports are configured for 
> OTG mode.
>
> am33xx.dtsi (latest) :
>
>          " usb_otg_hs: usb@47400000 {
>                         compatible = "ti,musb-am33xx";
>                         reg = <0x47400000 0x1000        /* usbss */
>                                0x47401000 0x800         /* musb instance 0 
> */
>                                0x47401800 0x800>;       /* musb instance 1 
> */
>                         interrupts = <17                /* usbss */
>                                       18                /* musb instance 0 
> */
>                                       19>;              /* musb instance 1 
> */
>                         multipoint = <1>;
>                         num-eps = <16>;
>                         ram-bits = <12>;
>                         port0-mode = <3>;
>                         port1-mode = <1>;
>                         power = <250>;
>                         ti,hwmods = "usb_otg_hs";
>                         status = "disabled";
>                 }; "
>
> am33x.dtsi (old) :
>
>         "usb: usb@47400000 {
>             compatible = "ti,am33xx-usb";
>             reg = <0x47400000 0x1000>;
>             ranges;
>             #address-cells = <1>;
>             #size-cells = <1>;
>             ti,hwmods = "usb_otg_hs";
>             status = "disabled";
>
>             usb_ctrl_mod: control@44e10620 {
>                 compatible = "ti,am335x-usb-ctrl-module";
>                 reg = <0x44e10620 0x10
>                     0x44e10648 0x4>;
>                 reg-names = "phy_ctrl", "wakeup";
>                 status = "disabled";
>             };
>
>             usb0_phy: usb-phy@47401300 {
>                 compatible = "ti,am335x-usb-phy";
>                 reg = <0x47401300 0x100>;
>                 reg-names = "phy";
>                 status = "disabled";
>                 ti,ctrl_mod = <&usb_ctrl_mod>;
>             };
>
>             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 = "host";
>                 mentor,multipoint = <1>;
>                 mentor,num-eps = <16>;
>                 mentor,ram-bits = <12>;
>                 mentor,power = <500>;
>                 phys = <&usb0_phy>;
>
>                 dmas = <&cppi41dma  0 0 &cppi41dma  1 0
>                     &cppi41dma  2 0 &cppi41dma  3 0
>                     &cppi41dma  4 0 &cppi41dma  5 0
>                     &cppi41dma  6 0 &cppi41dma  7 0
>                     &cppi41dma  8 0 &cppi41dma  9 0
>                     &cppi41dma 10 0 &cppi41dma 11 0
>                     &cppi41dma 12 0 &cppi41dma 13 0
>                     &cppi41dma 14 0 &cppi41dma  0 1
>                     &cppi41dma  1 1 &cppi41dma  2 1
>                     &cppi41dma  3 1 &cppi41dma  4 1
>                     &cppi41dma  5 1 &cppi41dma  6 1
>                     &cppi41dma  7 1 &cppi41dma  8 1
>                     &cppi41dma  9 1 &cppi41dma 10 1
>                     &cppi41dma 11 1 &cppi41dma 12 1
>                     &cppi41dma 13 1 &cppi41dma 14 1>;
>                 dma-names =
>                     "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
>                     "rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
>                     "rx14", "rx15",
>                     "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
>                     "tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
>                     "tx14", "tx15";
>             };
>
>             usb1_phy: usb-phy@47401b00 {
>                 compatible = "ti,am335x-usb-phy";
>                 reg = <0x47401b00 0x100>;
>                 reg-names = "phy";
>                 status = "disabled";
>                 ti,ctrl_mod = <&usb_ctrl_mod>;
>             };
>
>             usb1: usb@47401800 {
>                 compatible = "ti,musb-am33xx";
>                 status = "disabled";
>                 reg = <0x47401c00 0x400
>                     0x47401800 0x200>;
>                 reg-names = "mc", "control";
>                 interrupts = <19>;
>                 interrupt-names = "mc";
>                 dr_mode = "peripheral";
>                 mentor,multipoint = <1>;
>                 mentor,num-eps = <16>;
>                 mentor,ram-bits = <12>;
>                 mentor,power = <500>;
>                 phys = <&usb1_phy>;
>
>                 dmas = <&cppi41dma 15 0 &cppi41dma 16 0
>                     &cppi41dma 17 0 &cppi41dma 18 0
>                     &cppi41dma 19 0 &cppi41dma 20 0
>                     &cppi41dma 21 0 &cppi41dma 22 0
>                     &cppi41dma 23 0 &cppi41dma 24 0
>                     &cppi41dma 25 0 &cppi41dma 26 0
>                     &cppi41dma 27 0 &cppi41dma 28 0
>                     &cppi41dma 29 0 &cppi41dma 15 1
>                     &cppi41dma 16 1 &cppi41dma 17 1
>                     &cppi41dma 18 1 &cppi41dma 19 1
>                     &cppi41dma 20 1 &cppi41dma 21 1
>                     &cppi41dma 22 1 &cppi41dma 23 1
>                     &cppi41dma 24 1 &cppi41dma 25 1
>                     &cppi41dma 26 1 &cppi41dma 27 1
>                     &cppi41dma 28 1 &cppi41dma 29 1>;
>                 dma-names =
>                     "rx1", "rx2", "rx3", "rx4", "rx5", "rx6", "rx7",
>                     "rx8", "rx9", "rx10", "rx11", "rx12", "rx13",
>                     "rx14", "rx15",
>                     "tx1", "tx2", "tx3", "tx4", "tx5", "tx6", "tx7",
>                     "tx8", "tx9", "tx10", "tx11", "tx12", "tx13",
>                     "tx14", "tx15";
>             };
>
>             cppi41dma: dma-controller@47402000 {
>                 compatible = "ti,am3359-cppi41";
>                 reg =  <0x47400000 0x1000
>                     0x47402000 0x1000
>                     0x47403000 0x1000
>                     0x47404000 0x4000>;
>                 reg-names = "glue", "controller", "scheduler", "queuemgr";
>                 interrupts = <17>;
>                 interrupt-names = "glue";
>                 #dma-cells = <2>;
>                 #dma-channels = <30>;
>                 #dma-requests = <256>;
>                 status = "disabled";
>             };
>         }; "
>
> As we can see, in the old one, there is 'dr_mode' option for usb0 and usb1 
> to change the operation mode but it is not present in latest one.
>
> Also in am335x-bone-common.dtsi,
>
> latest:
>
>     " &usb_otg_hs {
>         interface_type = <1>;
>         power = <250>;
>         status = "okay";
>     }; "
>
> is provided but in the old one it was
>
>     " &usb {
>         status = "okay";
>     };
>
>     &usb_ctrl_mod {
>         status = "okay";
>     };
>
>     &usb0_phy {
>         status = "okay";
>     };
>
>     &usb1_phy {
>         status = "okay";
>     };
>
>     &usb0 {
>         status = "okay";
>         dr_mode = "host";
>     };
>
>     &usb1 {
>         status = "okay";
>         dr_mode = "peripheral";
>     };
>
>     &cppi41dma  {
>         status = "okay";
>     }; "
>
> Kindly request assistance to change the USB from OTG to HOST and 
> PERIPHERAL seperately
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/358f7ff9-fddb-44ee-ba85-af2566357bd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to