Port-arm archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PR 60404: Beaglebone Black: nonfunctional usb wifi
> >> Third, the device tree for the phy contains only the following:
> >>
> >> usb_ctrl_mod: control@620 {
> >> compatible = "ti,am335x-usb-ctrl-module";
> >> reg = <0x620 0x10>,
> >> <0x648 0x4>;
> >> reg-names = "phy_ctrl", "wakeup";
> >> };
> >
> > That isn't the PHY, it gets referenced by the PHY.
> >
> > An entry for one of the PHYs is this:
> >
> > usb0_phy: usb-phy@1300 {
> > compatible = "ti,am335x-usb-phy";
> > reg = <0x1300 0x100>;
> > reg-names = "phy";
> > ti,ctrl_mod = <&usb_ctrl_mod>;
> > #phy-cells = <0>;
> > };
>
> Yes, my mistake. Nevertheless, the PHY registers are at offset 0x1300, which agrees with the BBB TRM memory map ([1] page 178) corresponding to USB0_PHY; the full address of is 0x47401300, which is within a larger block for all of USB0 starting at 0x47400000. I believe that these blocks are defined hierarchically in the various driver parents and so they can be accessed, each within its parent’s block.
>
> In addition to these registers, however, the BBB has an entirely different set of control registers that start at address 0x44e10000. Among other things these control aspects of USB (that I’m trying to set here) and the configuration of GPIO pins. The 0x620 referred to in usb_ctrl_mod above is within this other block, not within the main USB0 registers. As a result, the 0x44e10000 base address for this is not in any of the USB PHY parent nodes.
The device tree is not strictly a tree, there can be cross-references. In this case, you can follow the ti,ctrl_mod = <&usb_ctrl_mod>; property on ti,am335x-usb-phy to get the phandle of the ti,am335x-usb-ctrl-module and then get the address+size using the new phandle.
If you don^t need to set any bits in the registers of ti,am335x-usb-phy, just ignore them.
>
> How should this split address map be handled in drivers that need to access registers from two different blocks?
>
> Cheers,
> Brook
>
> [1] https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf
Home |
Main Index |
Thread Index |
Old Index