Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp333885lqp; Wed, 12 Jun 2024 03:01:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUREhshB0jvs4c2cehkrsS3iNbKmrqAGncnkIwRCOz3e/RJy4JFKi+9w8PEE9NloxepiEUgoJL9X2XAN1qJ7CeG5Pufv9+t/iE25a7yYw== X-Google-Smtp-Source: AGHT+IHaSI4tP+8VLB/lXm9L8gs10vpvjx5L/NCATqRIY3dxAYZzWN9ft5r0yJYkBNLgvMWQRaVj X-Received: by 2002:a17:906:7c06:b0:a6f:1c0d:b0f7 with SMTP id a640c23a62f3a-a6f47d3adebmr75067166b.61.1718186504990; Wed, 12 Jun 2024 03:01:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718186504; cv=pass; d=google.com; s=arc-20160816; b=AeqIR3FLeshrY/YNn84FSkDso3f1mgidfPVo0t10nXVMZDqQ3uGvfh9KawOC1NNv9T mtufO77XVMzHEWfrTuT50gOJk4yruMgk6COoBd5w4pbCy+uj+HTneP6kyYvZYtK/BFji 58aiCwRstvtbyb4kL6fS30t5o+rSneRNydB1WXkrkDEeAly5r+hC/ulARohhpiBraZ7J RaghUprNR7SNOiHxM15PkXmXklglZDce89TwcPMWSPIrLBB2G0jXzgE62W2fP+PzIGMj uoa3VTE/3NaClmLgeA7VL67uxvQNwIMwKMvwN0SdK50RwWw5dagelBNZECDkgmXZDGv8 70cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=o+nA/cIlT4hl2if/i6DmrZViDpHELl0xAbf5HX+dSsg=; fh=1vEHUnLF9ysAdxFZYeqwo35kcH0tEeQnaLjtMbeKXzU=; b=xrO9QFGhBFAoMrZwi9E7IcbKTLnSuSwxNA27OGliqzoo/UnfLMzYWl5TqBdpDacsVv 5emrQhD38zCI9IA5pICFqAYcykD8ozUMuv/jHXItvAz+ak7DWXndjfqEbN+YXRiPnpkC NTHXG2T+hCrNu1RPBI0NqfBRNqqd4txslNoXU0/iq0DwbYhndnsH0qLw1mRinvj0tTiJ oXWmbw3EqoGHca+IlkVDGQpOcFYHPVYooOJRqm7cbYcglQHZzEPJ2tCNpnIFRugvIQRG aiwTZrieo7KMcAQnFY+qF81Ja6wVn2ZokQcob4RtCc3UeDtCBeiTjIzVHMPkA0GLvUen CivQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WLn6Pj7P; 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-211317-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211317-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 a640c23a62f3a-a6e54d98d8fsi529127466b.552.2024.06.12.03.01.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 03:01:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211317-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=WLn6Pj7P; 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-211317-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211317-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 81D451F257F0 for ; Wed, 12 Jun 2024 10:01:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7703616F29B; Wed, 12 Jun 2024 09:59:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WLn6Pj7P" Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 95DFA16EC12 for ; Wed, 12 Jun 2024 09:59:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186384; cv=none; b=HHEd2QSmRKmoiCjUp4CAva1scolvvyQx2y+qq+OkzEBAmZyWUsvvoki7x1PC672tk9GBiRyuLPU2jAH9wHOaCOvFpYf2ybylmtIZdiey7U1LYlHuynd/qVrxnXU439S12evUetl/hafK19Pe7BTTaZ1u2OvlRBKwWLSWllPiyM8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718186384; c=relaxed/simple; bh=ohK2sslGjClxr9kCmY/gW62DMEkgvC5Tz6xsCMKB8Kw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=C6IYWUOgEB89spHWNXzkxxqDmeNG5WwPYukxuNu6wReDdwJDPf7bI0QVahG6mRFbDRo+SFOQtIJf1sYZYAY+EfX0MpWevEhRyQk3D8Sj/46qpHbmFuU8h6dks9T+Rs0hvCijudD3Gw0IL8NTxClVChCsi9UYlJ/YmAkvmz+oXbM= 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=WLn6Pj7P; arc=none smtp.client-ip=209.85.167.47 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-lf1-f47.google.com with SMTP id 2adb3069b0e04-52bc035a7ccso2339769e87.2 for ; Wed, 12 Jun 2024 02:59:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718186379; x=1718791179; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=o+nA/cIlT4hl2if/i6DmrZViDpHELl0xAbf5HX+dSsg=; b=WLn6Pj7Piq+4cztdivf0ukLwjmPqMkfsDfsto44sg8iXKOzIu5SiqrhpCeaYXPRo/R uNA5r7LY3E5d7nXUvBXkcF0YRpgMRxiW6iGhg1jwrf6akDCBJoG4XtILeyd91ce3ies2 mkFqcWjtZSAsNj5xB5zobPbcgyKaCjRj6BcoJV9nPfAxa4SzZLlHNCl/hETbesD0rMIa GlEyKOJB/bsQESlQU8kTXJnkEW6qbI5U8UfPwUUBTEJnNJWZ8s4aDCkPxwm6b9lXJDds hkN+q5gAXOkS7/IUjvtu7+67EKtnPAcZiN0FeAp6RgKLoWVexYzPkxouHJN7hHktxC6z 2IsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718186379; x=1718791179; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o+nA/cIlT4hl2if/i6DmrZViDpHELl0xAbf5HX+dSsg=; b=xHWNVc4uJRsxAccE8MUF0CkAJvRVqNUtnqtbPvMg2fOnmPAWDOZWpXm3TmnBr4WMkH b1W3mgc3NSyJXDFP71NFzovnZTOu8tV291VyCsfYN1+qOnrt/BztMifckzT8BeGW+IUl hGFyvWGua8j/8SjB0MVwesMgYisP3/5qV9HpNO3lr2iEmJ7Ek8Dkq/ijN3DOFX2nH48Z CYXIW24BxwsO9dfgspi+tOpQkv1Nz1FokxUEbMaCGPZ0flMZpj4d5W+W03xx6WkKqj+z Q5FbsWTebOP7Y0oPDkkDn8J37z1uC+JyXI64g1Wznhd0gxMcWJ5qsOuIk+sCW9kocjjy s/Bw== X-Forwarded-Encrypted: i=1; AJvYcCVUJFyylJcD9qSAyS0uwki4PY9FZtrPPZofZS6Qa0AzB4yfo8IcqV45vCQpB5UCo7YbmAGDXF62AAF9ndrqIOYvQx6+erRFtAnntxo6 X-Gm-Message-State: AOJu0Yzh74Z3J6423JlcbVcugiTlNrhvXr16E3HeKO/wIrQF/GlPlrx+ 6LiKhCGBRoxAziPubPz6dRvftlFg5chjaIBoQUH0FrsvLjwNasOyK8AEj5tPCco= X-Received: by 2002:ac2:5304:0:b0:52c:5925:fc9e with SMTP id 2adb3069b0e04-52c9a3c90a9mr711130e87.25.1718186379504; Wed, 12 Jun 2024 02:59:39 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52c8907dae9sm1408095e87.129.2024.06.12.02.59.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 02:59:39 -0700 (PDT) From: Dmitry Baryshkov Date: Wed, 12 Jun 2024 12:59:37 +0300 Subject: [PATCH v6 6/6] arm64: dts: qcom: c630: Add Embedded Controller node 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240612-yoga-ec-driver-v6-6-8e76ba060439@linaro.org> References: <20240612-yoga-ec-driver-v6-0-8e76ba060439@linaro.org> In-Reply-To: <20240612-yoga-ec-driver-v6-0-8e76ba060439@linaro.org> To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Bryan O'Donoghue , Heikki Krogerus , Greg Kroah-Hartman , Konrad Dybcio Cc: 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 X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2519; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ve9c78TTAFS5VXzgVyLUhE7e1KCToRb1yljm5NLcL8s=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmaXGGOk/65ERYG8sCrkBZ6uTW6sRyP3LfmRj1l 6y9bUFbLayJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZmlxhgAKCRCLPIo+Aiko 1dCvB/9LQGrfkJ/u4aLp75/Zx6a+cXAeCvOCANx8w5dfCHL5TokODXa5I6kDdMLBOR37znLJgqr aT9z6ceGWbOk93tw7e1g59lHc+8Mw5QRkxl4NUPCFd3n+sx7Xs7YqyL9RhMY7zld2zsnh75EzmR u9yd9Mopfkxb56v33Dy6yLVZZjs3nFyV0m6AZW+wJ1wAwsJG/YQlFiPa1O01ZGrlQ1nRFDfQPnr 2/PsADEFy5fmazZTtIVvKRMqdNoyn2DktsqfcSi0/xPI50LXPPLrveZFjnTdXDtyHC4TWvSgb5C /Ww4kB3AeLhoN1yGDBXzkwLqYmzOFKhZgCq7ppu4YnZvwmNt X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A From: Bjorn Andersson 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 | 75 ++++++++++++++++++++++ 1 file changed, 75 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 8402ea2d93a7..f18050848cd8 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"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + ucsi0_hs_in: endpoint { + remote-endpoint = <&usb_1_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + + ucsi0_ss_in: endpoint { + remote-endpoint = <&usb_1_qmpphy_out>; + }; + }; + + port@2 { + reg = <2>; + + ucsi0_sbu: endpoint { + }; + }; + }; + }; + + connector@1 { + compatible = "usb-c-connector"; + reg = <1>; + power-role = "dual"; + data-role = "host"; + + /* + * connected to the onboard USB hub, orientation is + * handled by the controller + */ + }; + }; }; &i2c3 { @@ -695,6 +755,13 @@ mode_pin_active: mode-pin-state { bias-disable; }; + + ec_int_state: ec-int-state { + pins = "gpio20"; + function = "gpio"; + + bias-disable; + }; }; &uart6 { @@ -742,6 +809,10 @@ &usb_1_dwc3 { dr_mode = "host"; }; +&usb_1_dwc3_hs { + remote-endpoint = <&ucsi0_hs_in>; +}; + &usb_1_hsphy { status = "okay"; @@ -762,6 +833,10 @@ &usb_1_qmpphy { vdda-pll-supply = <&vdda_usb1_ss_core>; }; +&usb_1_qmpphy_out { + remote-endpoint = <&ucsi0_ss_in>; +}; + &usb_2 { status = "okay"; }; -- 2.39.2