More RK817 questions
Peter Geis
pgwipeout at gmail.com
Wed Oct 12 06:52:36 PDT 2022
On Tue, Oct 11, 2022 at 5:49 PM Philip C <subs at pscan.uk> wrote:
>
> Hello Peter.
Good Morning,
>
> My device, from the perspective of usb phy, OTG and regulators appears
> to be identical to this one:-
>
> https://github.com/rockchip-linux/kernel/blob/develop-4.19/arch/arm64/boot/dts/rockchip/rk3566-rk817-tablet-k108.dts
So do you have a schematic for this? If not this is gonna require a
bit of reverse engineering on your part.
>
> I already have a debug console and mainline booting on it. The single
> USB type-C port looks like it might work except that when an OTG adapter
> is plugged in the device doesn't supply 5.0V from boost as I want it to.
>
> Looking at the mainline pinenote dts it looks different enough that it
> doesn't help me (with the knowledge that I have). The pinenote has a
> wllsemi,wusb3801 connected to i2c3, but my device has no USB port chip
> on any i2c bus that I can see. Instead it has a vcc5v0_host_en pin on
> GPIO3 RK_PA3 which I somewhat suspect is how the rk817 driver is
> bringing up the power rail for the OTG adapter.
Hopefully it has a USB Type-C chip on there to handle compliance stuff
and pass along the filtered id signal to the phy even if it isn't tied
to an i2c bus. Do you see the role switch occur when you plug and
unplug the requisite cables? If role switch doesn't occur, you need to
figure out why before moving on to voltage regulator control.
>
> The line "extcon = <&usb2phy0>;" is at line 838 in the dts that I linked
> above. This is the line in BSP that registers the rk817 driver for
> notifications from the usb phy driver, and which seems to cause
> regulator "vcc5v0_host" to start feeding power to the USB port when an
> OTG cable is detected.
>
> I am completely stuck. If you can have a look and tell me what to try
> then I would be very greatful.
The way Mainline handles this is you tie the port power regulator to
the phy. When the phy enters a mode that requires the port to be
powered, it calls the regulator subsystem to enable that regulator.
I've seen boards where the boost power is fed to a gpio regulator.
That regulator is tied directly to any non-otg port and to the
otg-switch. You then use the otg switch to control the otg port power,
but if the gpio line isn't *also* powered you get nothing. I see that
tablet dts has a host regulator, so you might have this situation. You
can always set the boost, otg-switch, and host regulators to always-on
to see if you get power at the port for testing purposes only.
You really need a schematic.
Very Respectfully,
Peter
>
> thanks, Philip
>
>
>
>
> On 11/10/2022 09:21, Philip C wrote:
> > well if you really think that so many people will be interested in my
> > incompetent ramblings ;-)
> >
> > I just noticed that there are a set of pinenote dts files in mainline.
> > My bad for not noticing that. I will have a look and see what I can
> > figure out.
> >
> > thanks, PHilip
More information about the Linux-rockchip
mailing list