RE: [PATCH 2/3] phy: renesas: rcar-gen3-usb2: Add support for R7S9210

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris-san,

> From: Chris Brandt, Sent: Wednesday, November 14, 2018 8:18 PM
> 
> Hi Shimoda-san,
> 
> > From: Yoshihiro Shimoda
> > Sent: Wednesday, November 14, 2018 5:50 AM
> > >  config PHY_RCAR_GEN3_USB2
> > >  	tristate "Renesas R-Car generation 3 USB 2.0 PHY driver"
> > >  	depends on ARCH_RENESAS
> > > -	depends on EXTCON
> > > +	depends on EXTCON || ARCH_R7S9210
> >
> > Does this mean that you don't want to use EXTCON if ARCH_R7S9210=y?
> 
> EXTCON is not required for RZ/A2. So, I want to be able to leave EXTCON
> un-selected (save flash space).

I got it.
I added the depend on EXTCON, but R-Car Gen3 environment can build EXTCON=n.
However, I realized that build error happens if EXTCON=m.
So, I think we have to revise this line as following at first:

 "depends on EXTCON || !EXTCON # if EXTCON=m, this cannot be built-in"
like drivers/phy/qualcomm/Kconfig.

> > >  	/* Initialize otg part */
> > >  	if (channel->is_otg_channel)
> > >  		rcar_gen3_init_otg(channel);
> > > +	else
> > > +		/* No otg, so default to host mode */
> > > +		writel(0x00000000, usb2_base + USB2_COMMCTRL);
> >
> > This "else" code will run on R-Car H3 USB port1(host only) for instance.
> > I think adding this code is possible, but I'd like to separate patch from
> > this adding R7S9210 support. What do you think?
> 
> This code is required for RZ/A2.
> The reason is the reset value for COMMCTRL in RZ/A2 is 0x80000000 (Peripheral mode).

This value is the same as all R-Car Gen3 hardware.
However, host only ports don't seem to use this value...

> The reset value in R-Car H3 is 0x00000000 (Host mode).

No. R-Car H3's reset value is also 0x80000000 (Peripheral mode).
# Note that R-Car H3 can select the mode by HS-USB / UGCTRL2 register though...

> Without this code, RZ/A2 will not work.

I'd like to clarify this. Does this mean RZ/A2 will not work as host mode?
(In other words, if we use the port as peripheral with the reset value 0x80000000, does it work?)

Best regards,
Yoshihiro Shimoda

> 
> Chris





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux