Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5353726ybl; Tue, 10 Dec 2019 04:45:55 -0800 (PST) X-Google-Smtp-Source: APXvYqzQL0LaE9ObwIv9p5iSD9indxoDsubn/LIh60i+Pge1r98kU59xqGoX8ZpBMT94vfB84txk X-Received: by 2002:aca:5fc6:: with SMTP id t189mr3802951oib.166.1575981955085; Tue, 10 Dec 2019 04:45:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575981955; cv=none; d=google.com; s=arc-20160816; b=QNLlef5SYgshmnufnvwcV9k5HYG9z/4mjSPu61UEFW0MA3vBLW4CsUWYKatAo+G2vS hq6YxfKeYa5a5sD7g96kdhYJJPPRYFBARMQS6ArE1mOl/l3FvHBxMSOmcWq+Io6aBDg6 125vAzBEwIsyufT9lq0I6cWHLZECTyVazdpqA6PQQekuJo6GxAKHhThTr/aT9XooctHg Anw+CLwCt+7UrhjkStlqAt1VNBznFFJIjl403iTk/UkTK87ORton1bziIMvUPSO8GTHP cGRLHkcjWTieB7TkldSn4SQ6eB4tCJWkPqAd2TRebcIPFWNPmB+zWUcFiG7b0D6ESwFK pVeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id :organization:to:subject:from; bh=DU66lkSo/4QoET4FP58iUgtRMQrhFiZ53hyWgI9VWxk=; b=cgXJkuLphkZc4Hr5qTzRJLQZUqC9XLjHTuy2j8lxU93NKQx/pccz30EG09JiSj7Qdz yiULGWuu3IHoRLyaTm0wcjMPNUeYDx3PvF0r92mB8BXDIDGxeCyrey1OtN0loV5XD0gN 1r3oLcB7DiBYzfMdRV7BFYlBLRrY+lDZ6UUZKQ68Y+lPpkYRMQoGpKG7jZ+91tISH++I bWlTDCbBQmfoxkgyDp+Mt5SbodKgryypIeSs8pEqgwgqAlYNQ2zXvJr+YKa28V5LHQQT cDusm2xs/PFs99dQH27UwnPhcozjHP8TC07FcxL8Bti2f54z/YhCYO5rRCGFmMRaQvUi JH7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v26si1815762otj.0.2019.12.10.04.45.42; Tue, 10 Dec 2019 04:45:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727351AbfLJMpH (ORCPT + 99 others); Tue, 10 Dec 2019 07:45:07 -0500 Received: from wp126.webpack.hosteurope.de ([80.237.132.133]:33208 "EHLO wp126.webpack.hosteurope.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727211AbfLJMpG (ORCPT ); Tue, 10 Dec 2019 07:45:06 -0500 Received: from [2003:a:659:3f00:1e6f:65ff:fe31:d1d5] (helo=hermes.fivetechno.de); authenticated by wp126.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1ieesx-00054G-9u; Tue, 10 Dec 2019 13:45:03 +0100 X-Virus-Scanned: by amavisd-new 2.11.1 using newest ClamAV at linuxbbg.five-lan.de Received: from [192.168.34.101] (p5098d998.dip0.t-ipconnect.de [80.152.217.152]) (authenticated bits=0) by hermes.fivetechno.de (8.15.2/8.14.5/SuSE Linux 0.8) with ESMTPSA id xBACj2Fp005769 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 10 Dec 2019 13:45:02 +0100 From: Markus Reichl Subject: [PATCH 2/3] arm64: dts: rockchip: Enable PD for USB-C-Port on rk3399-roc-pc. To: Rob Herring , Mark Rutland , Heiko Stuebner , Jagan Teki , Markus Reichl , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Organization: five technologies GmbH Message-ID: <678df227-38be-47af-7ee3-741a391a196c@fivetechno.de> Date: Tue, 10 Dec 2019 13:45:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;m.reichl@fivetechno.de;1575981906;7d90b998; X-HE-SMSGID: 1ieesx-00054G-9u Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org USB-C-Port 0 on rk3399-roc-pc is designed to supply the board. To meet the power requirements of up to 45W a power delivery (PD) compatible supply is needed. To configure the PD the node of the fusb302 needs a connector property with desired PD description. Signed-off-by: Markus Reichl --- Presently the board in mainline has to be powered from a 12V supply, connected to two pins on the expansion header as the standard 5V delivered by the unconfigured USB-C plug is not enough for higher loads or peripherals on USB or M.2. With this patch the board requests 15V from the PD and runs fine on high loads with NVME SSD, Ethernet, SDIO WLAN and USB peripherals. During boot the 12V supply is still needed for some seconds, as the fusb302 shuts down or resets the PD shortly when initializing (BUG?). The board's 12V line is running presently on 5V, the default output voltage of the MP8859 on I2C-7, for wich no mainline kernel driver exists yet. --- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi index 8e01b04144b7..90783b2b1d1f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi @@ -6,6 +6,7 @@ /dts-v1/; #include #include +#include #include "rk3399.dtsi" #include "rk3399-opp.dtsi" @@ -540,11 +541,22 @@ fusb0: usb-typec@22 { compatible = "fcs,fusb302"; reg = <0x22>; interrupt-parent = <&gpio1>; - interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + interrupts = ; pinctrl-names = "default"; pinctrl-0 = <&fusb0_int>; vbus-supply = <&vcc_vbus_typec0>; - status = "okay"; + + usb_con: connector { + compatible = "usb-c-connector"; + label = "USB-C-0"; + power-role = "dual"; + try-power-role = "sink"; + source-pdos = ; + sink-pdos = ; + op-sink-microwatt = <45000000>; + }; }; }; -- 2.24.0