Message ID | 20180910161029.1948-1-vicencb@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v2] arm64: dts: rockchip: Fix Type-C port supply in Sapphire board | expand |
Am Montag, 10. September 2018, 18:10:29 CEST schrieb Vicente Bergas: > The reference is the schematic, page 11: > https://dl.vamrs.com/products/sapphire_excavator/RK_SAPPHIRE_SOCBOARD_RK3399_LPDDR3D178P232SD8_V12_20161109HXS.pdf > (alternate link) > http://opensource.rock-chips.com/images/f/f0/RK_Sapphire_RK3399.rar > > Changes in v2: > The power supply is applied to the OTG port. > > Signed-off-by: Vicente Bergas <vicencb@gmail.com> applied for 4.20 > Hi Heiko, > your approach makes sense, i just tried it and the Type-C port is > still powered-on, like with the previous patch. > But sadly still no data flow. > > I have got a gru/kevin and also bought a USB-C to SATA bridge > for it. The bridge works fine on kevin with kernel 4.4, still not > tested with mainline. > > But when plugged into the Sapphire there is an LED that shows it > is powered-on and nothing else. On the linux side, dmesg shows no > messages. > > Comparing the USB portion of the DTS wrt Firefly i see no > significant differences. > > Are there other Sapphire board users that can confirm if the > Type-C port works or not? That would help to discard a HW issue. Enric was working on a similar board, maybe he remember some peculiarities.
On Monday, September 10, 2018 7:19:20 PM CEST, Heiko Stuebner wrote: > Am Montag, 10. September 2018, 18:10:29 CEST schrieb Vicente Bergas: >> The reference is the schematic, page 11: >> https://dl.vamrs.com/products/sapphire_excavator/RK_SAPPHIRE_SOCBOARD_RK3399_LPDDR3D178P232SD8_V12_20161109HXS.pdf >> (alternate link) >> http://opensource.rock-chips.com/images/f/f0/RK_Sapphire_RK3399.rar >> >> Changes in v2: >> The power supply is applied to the OTG port. >> >> Signed-off-by: Vicente Bergas <vicencb@gmail.com> > > applied for 4.20 > > >> Hi Heiko, >> your approach makes sense, i just tried it and the Type-C port is >> still powered-on, like with the previous patch. >> But sadly still no data flow. >> >> I have got a gru/kevin and also bought a USB-C to SATA bridge >> for it. The bridge works fine on kevin with kernel 4.4, still not >> tested with mainline. >> >> But when plugged into the Sapphire there is an LED that shows it >> is powered-on and nothing else. On the linux side, dmesg shows no >> messages. >> >> Comparing the USB portion of the DTS wrt Firefly i see no >> significant differences. >> >> Are there other Sapphire board users that can confirm if the >> Type-C port works or not? That would help to discard a HW issue. > > Enric was working on a similar board, maybe he remember some > peculiarities. Hi, i have taken another look at the USB3 Type-C port of the Sapphire board and made a little bit of progress. Now there is some data transfer, but still not working. Applying this patch: --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi @@ -112,6 +111,7 @@ pinctrl-names = "default"; pinctrl-0 = <&vcc5v0_typec0_en>; regulator-name = "vcc5v0_typec0"; + regulator-always-on; vin-supply = <&vcc_sys>; }; and having a memory stick plugged into the port from power-up, the following happens: 1.- The memory stick LED lights on and kernel reports: [ 4.782999] scsi 0:0:0:0: Direct-Access USB DISK PMAP PQ: 0 ANSI: 4 [ 5.904580] sd 0:0:0:0: [sdb] 3913344 512-byte logical blocks: (2.00 GB/1.87 GiB) [ 5.906860] sd 0:0:0:0: [sdb] Write Protect is off [ 5.908973] sd 0:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 5.909122] sd 0:0:0:0: [sdb] No Caching mode page found [ 5.911214] sd 0:0:0:0: [sdb] Assuming drive cache: write through [ 5.951585] sdb: sdb1 [ 5.954816] sd 0:0:0:0: [sdb] Attached SCSI removable disk 2.- 4 seconds later the memory stick LED lights off and kernel reports: [ 9.082822] phy phy-ff770000.syscon:usb2-phy@e450.2: charger = USB_DCP_CHARGER 3.- After a minute the kernel reports: [ 71.666761] usb 5-1: USB disconnect, device number 2 The usb vbus is present all the time, so, it does not look like an issue of the vcc5v0_typec0 regulator. Please, can you help me debugging this issue? Regards, Vicenç.
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi index 941b62709..e1b590ca2 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi @@ -140,6 +140,16 @@ vin-supply = <&vcc_sys>; }; + vcc5v0_typec0: vcc5v0-typec0-regulator { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio2 RK_PA0 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&vcc5v0_typec0_en>; + regulator-name = "vcc5v0_typec0"; + vin-supply = <&vcc_sys>; + }; + vcc_sys: vcc-sys { compatible = "regulator-fixed"; regulator-name = "vcc_sys"; @@ -508,6 +518,10 @@ rockchip,pins = <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; }; + vcc5v0_typec0_en: vcc5v0-typec0-en { + rockchip,pins = + <2 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; + }; }; }; @@ -565,6 +579,7 @@ status = "okay"; u2phy0_otg: otg-port { + phy-supply = <&vcc5v0_typec0>; status = "okay"; };
The reference is the schematic, page 11: https://dl.vamrs.com/products/sapphire_excavator/RK_SAPPHIRE_SOCBOARD_RK3399_LPDDR3D178P232SD8_V12_20161109HXS.pdf (alternate link) http://opensource.rock-chips.com/images/f/f0/RK_Sapphire_RK3399.rar Changes in v2: The power supply is applied to the OTG port. Signed-off-by: Vicente Bergas <vicencb@gmail.com> --- arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) Hi Heiko, your approach makes sense, i just tried it and the Type-C port is still powered-on, like with the previous patch. But sadly still no data flow. I have got a gru/kevin and also bought a USB-C to SATA bridge for it. The bridge works fine on kevin with kernel 4.4, still not tested with mainline. But when plugged into the Sapphire there is an LED that shows it is powered-on and nothing else. On the linux side, dmesg shows no messages. Comparing the USB portion of the DTS wrt Firefly i see no significant differences. Are there other Sapphire board users that can confirm if the Type-C port works or not? That would help to discard a HW issue. Regards, Vicenç.