Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1951391lqb; Mon, 27 May 2024 03:05:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWSSn1uxC4qRGwTkFPAv2ObK+HEgeGYEAqrsb8JfRgU/4Kp+HTOlgLQwSqfeY5eEzMVEwaSe9LdQAqopmcH8CO3JugNxcVg88Re2/6F7Q== X-Google-Smtp-Source: AGHT+IEi3uz2JlutxMR+BMNbD4A8FIrBkfxiRQkzyuWok5FFBvS7dMxyXuDWBF8VoxRqs5mxhGYI X-Received: by 2002:a50:c350:0:b0:578:34a4:ea26 with SMTP id 4fb4d7f45d1cf-57851a3e382mr5465648a12.36.1716804351809; Mon, 27 May 2024 03:05:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716804351; cv=pass; d=google.com; s=arc-20160816; b=yIlaL87nVqOmL7axCbpclXH9J5fNBrdOddaiVSgyugwqM4T/znRJhqj4fZu4vCGAeN kDoRp4zyYM8AdZoJsSmnzLp0W9TRw5EY5ih3xKoekPbiONIzRfXrT1m+1QiFvn9uZ1JW TPeEL1ay8Zzga/qW4cWcq7v5FUwBtC7S3h2X4wcGfiJucfosADd7lvB0It4A3NVJd5vw 4KaqpyJA25wog52zOn4d+u0YcXtzvSAoPyrqypbqhqfhBa53gVXnnwPrJDG2dU9AOGkN /fTL7HMID9LI6Vp1m9FAUyel9dDvDzrSyEeAbtIZSv/auvGVsc2p5tf2eEk9ByGGPfwo kY8A== 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=IhsQ0AxYI/taNxhIBwrt/kibagKuJoiy3QOR9Xxw7P8=; fh=K068XRo0pgU84U0/OAqFAfzDRuLpcjav8Hr9t+itOwg=; b=wKTAuAlreWg/olnIhC4FzriFEYMIEAaSg6tnk1Z31By6sqK6bSk6M+JzO1LzsK3M0q Ann5xhnlIXijqKCYSkcPGhf+WR23APJNfdhkt3RhMpJL70sn7s4Td+rIkvmorXWdU6SN m/zZpOdpoLJrBsYGhGN9bU821A4bUqsx37b/st/8vKxNjkoivjXGMmR/DRcyvjugYRA+ ZIC7rDbeMxswVTgIjL/MQipYDfWw/GPj389QUxZSb7aG0f2Qrz+JPs6p3bw3o4CWBR7o PSGNdk6N6+C3fQFVZ1XZzlgiHveUHawBz6b/w6DAz5rx+PIBv0Ggiyol4iaF2Vl3Xfp5 uifA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lYP8TUHT; 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-190398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190398-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-5785238677esi2537385a12.174.2024.05.27.03.05.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 03:05:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190398-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=lYP8TUHT; 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-190398-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190398-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 5B6F61F23125 for ; Mon, 27 May 2024 10:05:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CD0C13D8A2; Mon, 27 May 2024 10:04:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lYP8TUHT" Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (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 1F5B813BC2B for ; Mon, 27 May 2024 10:03:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716804241; cv=none; b=sokQ5oKJ+NMy9gxHer+1r1AfLH4Q9u0RAtuzoaNIJPx3kz0zRHeBmWILEcxho+wp/XjWAC8/zIortkkE2OfzONjgnCxWdcUiGzqlAHyiAwtG6oeF2oDtWN+AgpM8JiE1hxdmoAB0sQBNvYm/dNo8q04zHOf/XQiMzqISb+rj5Zs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716804241; c=relaxed/simple; bh=1f4iet1HTBS4Mmb9vrYq33EtT3IRuk2VufwStag23ec=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QLlSOhdPM3QLHkb/F/g+dzGCPiIU0igesG1eH742l7CJlmFODN05EVWDTMSa2E0sxmuaHE8lsiRiBv7vCN1jYF1owmMZ0KF17chwt0jEcjByWX8My3r94YyGQCeYoYXTE3CPp2uedYv1HrJXBMLO5bN5EmFruHBqfwQD9A5LI1s= 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=lYP8TUHT; arc=none smtp.client-ip=209.85.208.178 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-lj1-f178.google.com with SMTP id 38308e7fff4ca-2e95a1f9c53so37700601fa.0 for ; Mon, 27 May 2024 03:03:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716804236; x=1717409036; 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=IhsQ0AxYI/taNxhIBwrt/kibagKuJoiy3QOR9Xxw7P8=; b=lYP8TUHTIJePAfWJdEPzAnEt8Kh7WBp/xPLomukaY+kqYLesQ5HpCgh4GnhSqNr9ta iAPj51nuBc4TwPAPuzI02JLxDscZJC0l8knqxQ26SCx+akIjP0+FNB6XMwge644kG+S7 67BKApyWakR6WTfSLCbOCAeWi2BnEXQZ5i86tI+BP0QjZBXmGm2WOZPg7raz0Q4IkVXG PLBZwrSfk7tIwLl0zfidTmyolmzh/ccN+YzeTXZ+a3qy/jPfiV+etSyMtIYzRIHfTE8w unz8F+h8MEVBsGi33ISJSyUMGgZb9FlOLaLqCcPqPvmIqN7SFOWxTeA8+3vq4kbhBxgG nbTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716804236; x=1717409036; 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=IhsQ0AxYI/taNxhIBwrt/kibagKuJoiy3QOR9Xxw7P8=; b=J7sCVnwGLQe/Hz3qmNH5z/dGD+7WClZXiJItBN20R+ICZwrnkfrHb8Mge+pGRcDTiV 10qtvfvaYTJiwX/j0C7F2sb/fMAPmIEZKMlETEX/9CAjQm/4CDUNAcrtJMJvilziSJPD OCETk7icfDNg85+M2kJXjivl4JmYbHSBRtKPsXmQ1ygwOBDgQlBw/JA2i8hZTKckRRUB h3JT6OKM/O6CJIqU1t28w+QNPQFKy2CBP1t5KTT43nGJBViOg6NKznR4M4kBG/8KPEKy Uv/b+PIbbDych9eCGn2xXyWMGdNG8USmcyHAXde49DBQPcIPk4C29upPh0ni52JXAoi/ a0zw== X-Forwarded-Encrypted: i=1; AJvYcCVDtoswvmtvhm7LO+syKavanOMajz6hCbJlPt1NhTYe1P4nM3cP4FCl2oFVQwu1k8Dp61KO1b70oVeulwISqvAIZc7GnOvuYrudZrYr X-Gm-Message-State: AOJu0YyRck3eqEAGdfFFzoLpP7g42eS5ZoYsH3AqnO8eOGjNPMJSv52w xpvLXaerTPt0g4QqCNswTV0BGXbFF0zrCOrXr+AG3KhvypUTg4lQTideNC5KZNo= X-Received: by 2002:a2e:87c7:0:b0:2e9:794c:19ae with SMTP id 38308e7fff4ca-2e9794c1b09mr11532141fa.23.1716804236189; Mon, 27 May 2024 03:03:56 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2e95bcf4bdfsm18616651fa.63.2024.05.27.03.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 03:03:55 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 27 May 2024 13:03:51 +0300 Subject: [PATCH v3 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: <20240527-yoga-ec-driver-v3-6-327a9851dad5@linaro.org> References: <20240527-yoga-ec-driver-v3-0-327a9851dad5@linaro.org> In-Reply-To: <20240527-yoga-ec-driver-v3-0-327a9851dad5@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 , Bjorn Andersson X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2543; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=YLVMl0P34IY99ph1CvUkOzuJ/s5orG53vowWD8rL0Ds=; b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ1pIVNvKRwkBM9WvbTntr8P4TFebN+nsx/mOewXZtpSsE dh+XW9DJ6MxCwMjF4OsmCKLT0HL1JhNyWEfdkythxnEygQyhYGLUwAmsk+L/b934JLwV5p9IeUO V0Ped3HMC9vCpuwmFOr2sufbLemZj36bW+q2hXp/fVupcLPNXeKeY+C6xj0c+tllYrFXOe3z/Jj LGadysFSqT/0Sk5SQL3dJ9V/ZotBDW4x8r5nYb0+ZX+PRteNmf2BrXGOjjbR1uKZBeUXN7ve/r1 4S9IjdIuXhKOqck/Hg4dSeirwZDzdd9sz7IP9D3WRv3f+Gi88F/76K1hKqK486acVWqbT5QFFd0 pSV7HIrxX/dKos/sscmpFrh+6EzJY6FLq/EtXja2OZJyr5af/WhXKp37X71K+8qVN2ME57t+R8/ 0SmLme/Jer44r3orgzNT698lz25bnjFhZUfj2rsyFzcBAA== 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 | 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"; + + 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 { @@ -694,6 +754,14 @@ mode_pin_active: mode-pin-state { bias-disable; }; + + ec_int_state: ec-int-state { + pins = "gpio20"; + function = "gpio"; + + input-enable; + bias-disable; + }; }; &uart6 { @@ -741,6 +809,10 @@ &usb_1_dwc3 { dr_mode = "host"; }; +&usb_1_dwc3_hs { + remote-endpoint = <&ucsi0_hs_in>; +}; + &usb_1_hsphy { status = "okay"; @@ -761,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