Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp37585lqb; Tue, 28 May 2024 08:14:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUPOumJowtxtj0Wj4t6mwCHgT27YD0fh7P9ib5zJ1AdBKuHR6+PonDpmzDnBQAGvlTwvlczq8BOSFnnxSQHMbie7JUiW0As3JSpXsF7DA== X-Google-Smtp-Source: AGHT+IGL58uAfbAX6Br42YGAdwZMetZeEsdGCyBSw56jBpEDksSkODH4EzmxSv0B5wqRGIKt2A8A X-Received: by 2002:a50:9e67:0:b0:578:5f58:80a2 with SMTP id 4fb4d7f45d1cf-5785f588378mr7314247a12.7.1716909268074; Tue, 28 May 2024 08:14:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716909268; cv=pass; d=google.com; s=arc-20160816; b=kW7nsDC/49TPMFo0cVndDEno4IZHlffcfNurnR5cXnuvsT+b+0Vp+frJNM+lt3ALO4 mB1eFHi8Q5KEu1DCkyF3z+4waRyq+gIWJT3QIi0uvodFT0F83fTTJrFbmGAyeJ8x4Mrx qJSo3JUIadpXFYXw06mpwrRH6LLQHsUwG2tVuFUmR3MnO24ym9pe4dWBK7cotcvWIsmu JVvOxj+Xpfb/bKXT4AY6w9YtM2ybAiOFz7G3tN1f3LKFLaBxqsrUOAQUpcywow75Lv2a INhtFeOrk3BAQBk74o2wcmkZ1Ri8BycLxWzOS3BxwZMjh14ZBqJG5Rb855i2zk+tCgES PnvQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=wEXZwKJdgLQqBqHcP2FuvqESxVIGZJvO/O2KfZWi54M=; fh=TeiKvfVOGq8q2txazPIlJDE1nvsA9sL0ny7nBDLUqmc=; b=nPFsiB/qh9Ih57p79CbwWmIHVD1MqWPWm3jdxE0QLi9IzHMkicAxSSNP2kXvoer38y KjTrkDnNWokoZ9aljPUZv2yTZeXOHdpyr9AYmKeg9rWn6z6PaUzwQzwAUE8kN4gveKFJ QeaJSdHWZ8DkzxFX0AVB8rnJR+OFPIejApkzS0HOdX3J6mB5oJ+Lp5mSdNRyh2y0aVXD oIjBT+pL4URJLFh5JlQiwiN0qcWZ3Rdqec/VGtQJMJfiWWMsg93w/1ovMm1D53EwQ3w6 vWCQtj8uO/biGu0APyRaHGH/fzQDf9vXcd2ucaXMulwWRXXTAUTtYq8aKSDZgK1We6T2 hOfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=guyhY8ja; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-192634-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192634-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-579d0b025e7si2653892a12.200.2024.05.28.08.14.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 08:14:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192634-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=guyhY8ja; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-192634-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192634-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 797BA1F240B0 for ; Tue, 28 May 2024 15:14:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DE2817279E; Tue, 28 May 2024 15:13:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="guyhY8ja" Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE4C5171082 for ; Tue, 28 May 2024 15:13:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716909192; cv=none; b=l1ZEUhgNpN2JJs6OPkql3BoLGLfieUBjJZ2xSOD/hX0Few3YAAaqBdbE4c5/LUE4uOlbTsrx4ZA4Sq6KqkpI3JrNL+IC5YY84jvRUE8TuvzK2IAAwqQiDLJF9BgbdYTxrPhadJNmTKfHjHkO3oAETONvO5kYe3VRv3jfD8ZmEA0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716909192; c=relaxed/simple; bh=bc1gaU0jimcHP4nmj8y1nOebfgtpG/F80UBv3S6uv88=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=VUMfkAgtAyb335b8iPZI9F7u5brYK9yhUMByWQYV+DeFSwx8Qq9AxBV8q4XxVrBQVjJAEvxvZ/8OpzIfFu4j39uxfgFaLPsRxp6IwP1kPd9NHJ+AlsN38AW6OSHlVZrjCvuvF5TVdCYkb9mcglAKvnFkuhOiagRPJu16Khtxc3k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=guyhY8ja; arc=none smtp.client-ip=209.85.219.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f170.google.com with SMTP id 3f1490d57ef6-df4f05f4cc8so989953276.0 for ; Tue, 28 May 2024 08:13:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716909190; x=1717513990; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=wEXZwKJdgLQqBqHcP2FuvqESxVIGZJvO/O2KfZWi54M=; b=guyhY8jaDbhwKdFQWHj2SQ6J6OO1fdzKdJ8RwyFisqHbbSxAkSxxAqyeJQumLy9rVv PKop0kO+XfU0l6ZHxeSBBBQKaBwzZwFJDJWMyucb/7aPWJYrhA54f6WxMBiJLjAgY0W8 7/kAyXLYBZgIsm47KELOW3HWHaRBUwWnM77sHZx9FmLArqeqWwMlrf39Wn3kRR6ys7/R UWzvyV46nD78wqregA2qdAu3WNKODYeBtL9KiS+51DRWU9X2HHrIsUlXDfvUwRMRsMQF iOZVyYshBAuD+EuxlDdBOkdGz5KcVfVA4WtzuaQ9XdeciYiGADoOtUNb9ZDrCy18hjZC yFvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716909190; x=1717513990; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wEXZwKJdgLQqBqHcP2FuvqESxVIGZJvO/O2KfZWi54M=; b=Q/ek5ouiBa1Q0esZrERWEnUumdkPNXWihWQ85ss5m0nVyvHsnfUj7LgWcVh4bb4NRL k8grL0wrKXE66Zd+RaTTSQK0bcN/TnKcKTQfC3XCVsac7jMBKhBhXmuEiiCp8M4r2bhr tkNOOOuXERbGyNZNiRlxupa1yJOd0/2uuWMIkFGCvZmjKvXEttZJA7zwNN2OQaDEBKJ0 ZPkT/J8OQdHFt2x1G9+Z5RanxJ+0h9Ad/TaLZ3crQsKQxGkD9eUHaWZgwODvwZPndAK2 SBzfVJG/h1bbGa/7ZhLyiyd2XK/AdKJoH990Jm2YvkXWuZPbUGIIEMThTUkoWGe+F4H4 bzbw== X-Forwarded-Encrypted: i=1; AJvYcCX/C3S3S+sigZm//Jnilnqc18NIc0l7yNoyLz89CsfXo6vf/JnCJ28d6HXGmjszKUwi5XDKlYvLla7mS2qafbauKrLjdQCIBDhGRR0P X-Gm-Message-State: AOJu0YyNkUM1JyMu6GUNBIqJmjo7biM3rPSLahwCCcRl1WkvLfpUpHGx d+2OSXm6w8CTtTk/TB88g6/xTR53KNfolYPQ9JUotCu1HMSga4z9BjLTBK1fctkp8dfWVSU5rao QbWbP9BV84AIs1kdwdxsgmHyTU1p9ZXsnP2SZKA== X-Received: by 2002:a25:800e:0:b0:df7:9242:281f with SMTP id 3f1490d57ef6-df79242931emr8456060276.49.1716909189568; Tue, 28 May 2024 08:13:09 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240527-yoga-ec-driver-v3-0-327a9851dad5@linaro.org> <20240527-yoga-ec-driver-v3-6-327a9851dad5@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Tue, 28 May 2024 18:12:58 +0300 Message-ID: Subject: Re: [PATCH v3 6/6] arm64: dts: qcom: c630: Add Embedded Controller node To: Bjorn Andersson Cc: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Hans de Goede , =?UTF-8?Q?Ilpo_J=C3=A4rvinen?= , "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 Content-Type: text/plain; charset="UTF-8" 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. I must admit, I also hoped to be able to use this port in gadget mode, but it seems to be nearly impossible. -- With best wishes Dmitry