From patchwork Mon Sep 10 16:10:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vicente Bergas X-Patchwork-Id: 10594507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0860D921 for ; Mon, 10 Sep 2018 16:11:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB936292DC for ; Mon, 10 Sep 2018 16:11:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E98C629382; Mon, 10 Sep 2018 16:11:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 752DF292DC for ; Mon, 10 Sep 2018 16:11:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4e7mQ291im1KQuccLxBg7BpbzXLEWAd9P2ft5w4wAGs=; b=EaeyzWg/6MVHJk j/XfXPl611CTi61vVCE45/f6WRIDSOVtS5GysNTortPZ2xdzsz8JcuWctnxL0LwVEpf2jwHvYBEz3 yW687BmGfm+qLWiAPPhGYN9zcjXlZ2Hh1jIaHzorMjW2VLD9FCW4PS5ft2fhJJbJsPedk3Qx95VYy x+zDTOT6O2dSLvohlzCJVIrgZWbHMYKAOhTfbVO/V92rprSxysBxHjBhEOnIzcAykDUJgbZOnvbqm v/08cOYD2rxiK72boq7kQjk85Epm8ot8zHX8JZO3ZHfkCcBH81ZGp0qHEj9ZMapak+B/qTlXcZqWB iYVvEYXXUdagWtBFaRiA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzOmm-0003Li-SO; Mon, 10 Sep 2018 16:11:36 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzOmB-00033P-W7 for linux-rockchip@lists.infradead.org; Mon, 10 Sep 2018 16:11:15 +0000 Received: by mail-wm0-x243.google.com with SMTP id s12-v6so22165118wmc.0 for ; Mon, 10 Sep 2018 09:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xt9qZPZ4Yl8bbzUuNkFQVyxaGfGlQIX+sZ6dVyggRl8=; b=uZeOLbIw6d9iql5H1u3ZEI4DRcflfq7saPGzVciQXiZIHnuzgF/mg3LZ9LXE3x7eFw +oSClurzoiudAZXCaszuMRFiIDtsxTK3xrFmpNWkWVnD6pG414RQ0bYrhtEILXwjuNSm P+Z2p8NdW4NlMOI2Uz9/+v94uAwQN9OuOaZJa8KXJUPpowDSJh1v2UeYFWQa9i/AnGx6 3GVTRwoUmaLACw38luwOMuBtfN4MlNkOvljyP0k1IA1SG+1Tz4mKrHx9Y1f77eVnCU86 +x1AT7kKuP7YhiwjLE6k0ypBuEL5QnNZ5d57VoLU7DYmrLZXW1eGPH3hReAuivWnw6ik 3ovA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xt9qZPZ4Yl8bbzUuNkFQVyxaGfGlQIX+sZ6dVyggRl8=; b=ECmf+gjaJy0KmeX8O1QzZUDQMlBCpbOjCpr0u8q7lbTkuBi0oi2S2qSljRhPeqCVBg KEwVOKV4jGLYoOHxF7Th8R86dVnh1ADrIWWUClqVtO+NMsulWcZPs6Kl+eso/KqSdkmO egvkgQ80IkECj484acWFnYpXWuiYkKJWiXUQMdCOVBieMbt6DtCtL7gZI4LOzJlF8xF6 n2Ku+hwK1zCYxZQZR1eVocNFKcNIcSDbovILx00J7itYDIYKz0Ouw+q/wAiGeT6d/tsn Ob/953Ww0+zzbyV/xYxMSTLPLOs8SwmFP5ZqBZGnAF2xPE13Xm4aVj5z2vIphpUzewhu QkqA== X-Gm-Message-State: APzg51CWTjlGvcentfhy1/AGJm32eDqxt7iDEj2zDOQ3NwRQFW3y6bTv H6/7nd6EVo4ypwv+Riw/Iv0= X-Google-Smtp-Source: ANB0VdYIIHKzdpb7mJs3ZkR/kGZPADnXWMrbFG+XPyXTbT/gbji55TywcS0zNZwWt9HiZmyi9FRbag== X-Received: by 2002:a1c:b9cf:: with SMTP id j198-v6mr1153435wmf.93.1536595848068; Mon, 10 Sep 2018 09:10:48 -0700 (PDT) Received: from localhost.localdomain ([90.175.16.221]) by smtp.gmail.com with ESMTPSA id p89-v6sm26765908wrc.97.2018.09.10.09.10.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 09:10:47 -0700 (PDT) From: Vicente Bergas To: Heiko Stuebner , Enric Balletbo i Serra , William wu , linux-rockchip@lists.infradead.org Subject: [PATCH v2] arm64: dts: rockchip: Fix Type-C port supply in Sapphire board Date: Mon, 10 Sep 2018 18:10:29 +0200 Message-Id: <20180910161029.1948-1-vicencb@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <3744467.8gaGBgj8zp@phil> References: <3744467.8gaGBgj8zp@phil> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180910_091100_102760_7B8C34D1 X-CRM114-Status: GOOD ( 14.83 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vicente Bergas Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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ç. 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"; };