From patchwork Tue Feb 27 12:45:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianhua Lu X-Patchwork-Id: 207208 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2668926dyb; Tue, 27 Feb 2024 04:45:49 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX+hbkWav60PgU4+f37ejg0Hw/Dzk7vsUnplbswnuRE1RXxcCRoRCZPnMQwpf8IdIZmvcPR1VdgvptUcH4fgpgJvl0cYQ== X-Google-Smtp-Source: AGHT+IG0IFjZANwia4VCq1l80VogjJ/N5s7EUeyCLasdiwoztQlAIVwehEaCQxJNaOFXNvKJfck4 X-Received: by 2002:a05:6402:1845:b0:564:ab98:35ea with SMTP id v5-20020a056402184500b00564ab9835eamr7297985edy.12.1709037949210; Tue, 27 Feb 2024 04:45:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709037949; cv=pass; d=google.com; s=arc-20160816; b=w7Zau3+RgAqoWyQwrzNL/3ZMEzw7NE/25qh9FePKFndYCCapn1QHP1OrSZWZeWSHVq xwErKy25Mkiap/vGb/p7hPqgXIJ5f9QoiRkgWiQAvp4/LLojo+ag7Nn+nyR2IjaDLspV /RwsVKehck/tio7xYl9V/DH24ddjiftK2ZDCYJFBHOsP1C9BQ0sPcctUo7QEBnU8o1ng VFtGSl/UYa74d9CwVacCbdZ7dq6gBmwT6ND8obxRrAsNhbBq8rx12m8JPqvXUhoPBPxm 7maUBc4NaWqQKprd2SCvQVfqGl8HYhZTTxd3nQ4QpB4WBZzLRqeWC2FkT0OyC8rvgYWB mMIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=eeb1RFSrcrszyxWv7zLI8PbVAOHNlKGOhvyvkPGpY8E=; fh=f56XwpxS3kcjws73X8Xuay7a07y8Ass5G8DlR/Dad7M=; b=kGTYS7y7wKrcjYXAbORjzN10CH5mrRBRp2XufFclGKdJpPyvMVVfu3oZts8JMQ0FmX 31QazI5bVds9zQP5XhTrZSVYU1y7l3OsqxRy9LRbEtObtjrlv94FZ1zdxTQZfZfuzjNz lOERrAeKbnEdpN2YG/XDKFZXFLt+9snIU2R88XVK1n25b+TSfJOXHD4Cvb9tVhc3jQhC SuNjY8O3JEpgREMwHXw1nFYNsukbNDWtO/qlqXlYGFq28NBlVjKWmzvxyiy+VVC4RALp 5J0c/7tIU9wAHvCnb6oSl0kMfnLSlwDeWXZFnubOTBEwxKuxh4VOW9aSVoS8z7wCtCbY TkLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gFTA2AQb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83252-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83252-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y21-20020a50e615000000b005664874c894si236747edm.632.2024.02.27.04.45.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 04:45:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-83252-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gFTA2AQb; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-83252-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-83252-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 D069F1F27A83 for ; Tue, 27 Feb 2024 12:45:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24D1E13AA28; Tue, 27 Feb 2024 12:45:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gFTA2AQb" Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (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 1CD3A1386CF; Tue, 27 Feb 2024 12:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709037929; cv=none; b=awDRM3B+NIK0cMNqzt5Z0t6zM3M5FzsMfZQeourrTwOOFC5n/hkIvmYfvHUDnYJgk75T8FGN3ZjCRCrAbvYjLpVshbaCkAqgby6pXf/vHmmals4QzuZNsvN7eC2TkqYqiwuYQ3UIWLkrDT7pP7Unbnh4zGgVO8pB/3vPd/Nj/Vw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709037929; c=relaxed/simple; bh=UhhVT5HMBqTp4XDQsF3OYV8ifqz8EU4ufs6XGJuvv/k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mogTKZ51sZq8v4e8vXmYeBo/zi0CN6kMQ8X4PwTHn9ypRWauU/IR/HpAfKFJxkkUvRRlIckNtMXfygV8FZR7DNMVh7gvXieaLdCuh3V6UQExay3J/SREd+sHlpJCWBo4RRHIwZlbBR6qr5ai5YKzTGKYIpVCQ83ZXRm6ej9aHB8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gFTA2AQb; arc=none smtp.client-ip=209.85.167.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-3c1a2f7e302so864223b6e.0; Tue, 27 Feb 2024 04:45:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709037927; x=1709642727; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eeb1RFSrcrszyxWv7zLI8PbVAOHNlKGOhvyvkPGpY8E=; b=gFTA2AQbXhZTnBHIJqzSBuy6TKtG/rgP0YHxA7p+qo8ArjFitM/bb5bhLYOSQ/XnAI Rw+D3TPsgmGooMYvIFK8KKVG0JALI6M5rdxTTMbAp5sTCIdQCv6Oy4sgPnV+hoeTNv2t fAYNhju5vBZnZ8llC2E14DrHhiLWUqhJzeVbuO3yONMun5VFSapUL2eVdVOAAYeZAg/T Bd/BKpbuVH6JE6F8NngwvG/nj0HbhLq7AIqVXu755yQ5Kc9DgcPWABnb0P891/LJlc0r PyGZWJqXQ03IJXYgm9XCukcj8VeVFsxT7kLnqJCsnlPTJb/e8rCRxTIxqy0KrIO4f0/k uZdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709037927; x=1709642727; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eeb1RFSrcrszyxWv7zLI8PbVAOHNlKGOhvyvkPGpY8E=; b=EqCgIH8eABnpBgUskSTVBuE/0JGk+JGI3E/tgqO9rjQ1cIkhJGGPN4jZr7MiTOg9zV DU619vvexi8T96z01ar6DxM0YjZc4iO8tXuTYUlQ/ee7zcafzKRQCNuC5/TZNBI/p9pz 0HEtORsaSCDHxalrYm69/S9wGWN7f9p2l+mV2/gcbJSuEn7hZud5lTLQAQNaF7ZvONOf iD8oj6+2BVULV+j2VLe1LVQJqMUc3Xxdo4zWUIrilKDkAqBecgfFtMPA0Ufb76judMLv kRy/oIKo25tBycofJ4U9fdm/Aj/3e7FZ2ZFiacflAwBk5wLMZgmZIJnMYUmpB9k9cZ03 VbzA== X-Forwarded-Encrypted: i=1; AJvYcCX7anUCpHaPj5Br3/KtWtSgtCyzVg1oqiDY+7l8vXeAbEfOFHFX+von+LnDTvp0X0fCdIAopiEabo5dRqsFjNpdJXa3WcEWvF/HP7xdlZwQ5+uZnP7HaiR/i7CFO3ngiVSwgVMMkyACTQ== X-Gm-Message-State: AOJu0Yyfs6x1aNcevNrbHP4Mv4I9h46zw6tiNcS7ruydPJmjk024XtLY gFYWxcVs0erSccDKj2fNvMV3yJo7Jwjfc8wzIWcWTnunuhZ8S0W0 X-Received: by 2002:a05:6808:1387:b0:3c1:add9:5a3a with SMTP id c7-20020a056808138700b003c1add95a3amr1856384oiw.32.1709037927119; Tue, 27 Feb 2024 04:45:27 -0800 (PST) Received: from localhost.localdomain ([103.149.249.227]) by smtp.gmail.com with ESMTPSA id y17-20020aa79e11000000b006e0fc1ed2b7sm5827842pfq.134.2024.02.27.04.45.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 04:45:26 -0800 (PST) From: Jianhua Lu To: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Jianhua Lu Subject: [PATCH] arm64: dts: qcom: sm8250-xiaomi-elish: add usb pd negotiation support Date: Tue, 27 Feb 2024 20:45:29 +0800 Message-ID: <20240227124529.12926-1-lujianhua000@gmail.com> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792056176539146132 X-GMAIL-MSGID: 1792056176539146132 Add usb pd negotiation, but charging is controlled by pm8150b pmic, so it can only charge battery with 5W, Signed-off-by: Jianhua Lu --- arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi index 6f54f50a70b0..ed103b90f4e6 100644 --- a/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8250-xiaomi-elish-common.dtsi @@ -636,7 +636,8 @@ &pm8150b_typec { connector { compatible = "usb-c-connector"; - power-role = "source"; + op-sink-microwatt = <10000000>; + power-role = "dual"; data-role = "dual"; self-powered; @@ -645,6 +646,12 @@ PDO_FIXED_DUAL_ROLE | PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>; + sink-pdos = ; + ports { #address-cells = <1>; #size-cells = <0>;