Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp114864lqb; Tue, 28 May 2024 10:14:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUXKScLKCSger0WxKWhZrkd+OT5jBYe1VcnK0nZtahJTm3b/BimXH2wW93XgSp8WljdNvWYxtwgz9W7S909ykWAsgPlyTBsu6OvgLj+g== X-Google-Smtp-Source: AGHT+IGdZ1rROK0ebj5HkSBfeGL/1QLUd0E8AVl3SY4ELXxMEi3RdS/ppyX/lSmZuIMvCGPosgvl X-Received: by 2002:a17:90b:4d8e:b0:2bf:c489:47d7 with SMTP id 98e67ed59e1d1-2bfc4894870mr5863351a91.20.1716916455922; Tue, 28 May 2024 10:14:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716916455; cv=pass; d=google.com; s=arc-20160816; b=nsuL27+f/4QQ5Fhw2JUOmMKFeAzeL1Kbwmhmgf+OpIfC+zR2oIEkyq357wXShixyS+ KtDkN+idUpAWo32DVGauu+7UI6PmPqcZ4v7+OhnBtY9QxzBwVpTtnzOqppD7vWdxLlbP fK+0J36QAtK/xf0umQmI97qoH7TtGU+b0UEXGLV8YMIhnVK4AIz4z4klyD2fsAZ6cyZk qvTIfM1mFUdJPnswc1F2OPh5t4Yl05fK+5tGV966vEnWBh9uDehNGM691SyfAD3ElqKO r+o6v6wejfMnffi5FoLNmKlAA8OrEcOoC5YbEcArA1iauYuEQffW9IfzuFIWN2YrFKCa fS2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=P9IuCcXqCFr6NpcXNWvgRtMwjKizKX6H7E0j+im7qpU=; fh=KbH7erZcGXouY6SjenZDYKsjv/d9DiNUTeXvZ0adZvk=; b=DfsEb6lB3lE3HboX9HGbCwEKP74j1C+X0MCddD3gCGQWbvoKZsehC0zKzURe8aCCMY 0aMSWu/W4IRVTnbsDv83iBKOiirK4Xhko2F13Nk5fKM/mC/YwX0tURSNnRpJngaLBjHd PxwGKOtOW+ZU3FuMkbpAmYcjNmcvCvWM5vl/cWvQP/zre+h0HfqD7PKNN6rkLJIYhgrr hfeZUtDfXMM/nbYYEv0DE744ff+G7Dp4UyjnXXOhLBQr8DOZo0ZL1tBBAkutTRgYE+8T t1YJjx2Bt3BOV/lHBgGMKvAS52FqrO/Y0XhNZyp9Stgvyde7gnpj8BJVlMyHr3m45Usn 8+1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bMFZs+x7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-192796-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192796-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2bf5fe605b8si8157718a91.154.2024.05.28.10.14.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 10:14:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192796-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bMFZs+x7; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-192796-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192796-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 59B702865F8 for ; Tue, 28 May 2024 17:14:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2CC2174EF7; Tue, 28 May 2024 17:14:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bMFZs+x7" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5BC817333F; Tue, 28 May 2024 17:13:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716916439; cv=none; b=LSBWWlYEVK6pIpvh7M/Vr7rci9b7yCBHIZGV2fjE4pWULQ/W4awiyljjBxKrRkls8LNYSHrLozbJNHHTBsofqQlYbzihPVWqLzEDPbaA9e78R5MZg78a8Y3EsJqgUUwp6ucVB3f6iTFniSbyYzZiESFKzZqtve82KJv4uM3u6j0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716916439; c=relaxed/simple; bh=BF+bAtAxxwKCW4DJkeefBZDu0K+wuFNxBHFCPnA8enU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rtXAs8aDfiVjAwkGMxjkvt/L1fnsFpPTjH3QEWc1zqp/q47QQzelGEUHXOT9R2vLBEBAucDmpd4ff+pqNdjKDgRSfet4rzle9ZejgDOOtkRZjvH4lQc1f2NftksbOreyjlJPuT7xBcdL42ElgKSDfgVlDtuhJA0wYOMFI23IlTQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bMFZs+x7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1717C3277B; Tue, 28 May 2024 17:13:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716916439; bh=BF+bAtAxxwKCW4DJkeefBZDu0K+wuFNxBHFCPnA8enU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bMFZs+x7bluwgOhDpFWlsScecIjnUIpA8wwy44nKxYfhDp21ArJ9EGTXYy1VxEqF1 x9TXpM9QxBZGm4o1v1LqS9mcped9va6UK0lmdFFjkVQ9ubrudgoiehZ3Lz7aYPrcDS CZcV2KWPGVRc9MF9lJzhe3nDHeJLsvlpYexFNRC/2rCxoOXnChmiFs16/e7IXF/nqt F+AaJqFSCY3pOPE41ePOAPSLd5WO3qXFyNJl/Bc8i7b3U3AI+tfMNrgblQ08Yw03i1 ZEfdCsCbwqcPqzrlId7esYThtQvQQznFeYTPpondJK/woStogcP0VwGFHXeCNnFk87 kQ0K44ux1N8jg== Date: Tue, 28 May 2024 12:13:56 -0500 From: Bjorn Andersson To: Dmitry Baryshkov Cc: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hans de Goede , Ilpo =?utf-8?B?SsOkcnZpbmVu?= , Bryan O'Donoghue , Heikki Krogerus , Greg Kroah-Hartman , Konrad Dybcio , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, Nikita Travkin Subject: Re: [PATCH v3 6/6] arm64: dts: qcom: c630: Add Embedded Controller node Message-ID: References: <20240527-yoga-ec-driver-v3-0-327a9851dad5@linaro.org> <20240527-yoga-ec-driver-v3-6-327a9851dad5@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, May 28, 2024 at 06:12:58PM GMT, Dmitry Baryshkov wrote: > On Tue, 28 May 2024 at 18:06, Bjorn Andersson wrote: > > > > On Mon, May 27, 2024 at 01:03:51PM GMT, Dmitry Baryshkov wrote: > > > From: Bjorn Andersson > > > > Please align this with the S-o-b - feel free to use either form. > > Ack. I'll check what went wrong. > > > > > > > > > The Embedded Controller in the Lenovo Yoga C630 is accessible on &i2c1 > > > and provides battery and adapter status, as well as altmode > > > notifications for the second USB Type-C port. > > > > > > Add a definition for the EC. > > > > > > Signed-off-by: Bjorn Andersson > > > Signed-off-by: Dmitry Baryshkov > > > --- > > > .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 76 ++++++++++++++++++++++ > > > 1 file changed, 76 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts > > > index 47dc42f6e936..d975f78eb3ab 100644 > > > --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts > > > +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts > > > @@ -370,6 +370,66 @@ zap-shader { > > > &i2c1 { > > > status = "okay"; > > > clock-frequency = <400000>; > > > + > > > + embedded-controller@70 { > > > + compatible = "lenovo,yoga-c630-ec"; > > > + reg = <0x70>; > > > + > > > + interrupts-extended = <&tlmm 20 IRQ_TYPE_LEVEL_HIGH>; > > > + > > > + pinctrl-names = "default"; > > > + pinctrl-0 = <&ec_int_state>; > > > + > > > + #address-cells = <1>; > > > + #size-cells = <0>; > > > + > > > + connector@0 { > > > + compatible = "usb-c-connector"; > > > + reg = <0>; > > > + power-role = "dual"; > > > + data-role = "host"; > > > > I was under the impression that this port is wired directly to the SoC > > and as such this would support data role switching as well. > > > > No concern with that, but just out of curiosity, is this not the case? > > It is wired through the external Type-C port controller RTS5437, which > also controls the vbus pins, etc. The UCSI firmware reports both ports > as host-only and doesn't implement data role switching. So, having it > as "host" is a safe bet. > Thanks for the explanation, that makes sense. > I must admit, I also hoped to be able to use this port in gadget mode, > but it seems to be nearly impossible. > Someone must have managed to use the device in peripheral mode to get the firmware on there originally...just saying... ;) Regards, Bjorn