From patchwork Tue Feb 20 23:58:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 774817 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) (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 4C3AF154C1E for ; Tue, 20 Feb 2024 23:58:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708473538; cv=none; b=u5GMce/GYnq/zrVSdE8YnhXYpsHMtIIWmzsYzkgLR0epUC2t+kKLGhXQIvadkMePyhORFXrIh8dwrGLqvRo+AGu/ecO79Gl9KGf3NAa5zZv7NM5ZgMe2dJPdEnR6T0pJGMfj6cGrOQX0oAFc8/1DxEi3iiPDnW43JSiFz2azT/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708473538; c=relaxed/simple; bh=I72GnJCLd9/WSa0N+ty2v+dNI2zZTTJ7yTodRVOBsLU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=m7Po2x2HNmxOqkRyfrGte+jrY70zqJQbKHgyFQ3zEtjIFet7ADXdYk9g54xvVb8dYl0XcwKGfZvQtkTexbvFJhx4qLyK5f4vgTUZtIHzdgfUVAdjSzRmsMXjp7kXBH34OLsDSz7qQgAzOqA956XsmKK1zQxul87brhoF7iWJeNo= 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=sVhGVHk8; arc=none smtp.client-ip=209.85.167.54 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="sVhGVHk8" Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-512bce554a5so2969879e87.3 for ; Tue, 20 Feb 2024 15:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708473534; x=1709078334; 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=o4dH1ivAwHXEfRcTfOF8u7VTWdZsEwOMNlr3FVqkNPU=; b=sVhGVHk8+qu5zMFpDYMIPwZRNQUp8dTSGoC8Lyv+FDHDH67lCraZ/SNGxtNWDSEeno /PEh79gtDYRMeBD4mMjem5wSVg8HVNkM9w7mQ/TG1RON7D84YC61xfbsrCJXvq/s2OY9 HROT1ouoH2IfPz965cVifP0/eEN+jcA9HKYHgBnqF1LQkWoW8yb4BFQYjJy0V815zBty br6auFElcBvMvpkEkhOI0Bnlvy0FJDvQn2KfI1kFesvfq0ZmKmrB+14JDdjniEY/d0XR hFxZggi8dItnihaIEeV+CyZUSNsIEA5naOd62Z6c0Wz4L51fyVoo6TWbY1lPCI9YH6DX U37Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708473534; x=1709078334; 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=o4dH1ivAwHXEfRcTfOF8u7VTWdZsEwOMNlr3FVqkNPU=; b=IW3Yw/gi0GSFc7jKKuc+2pNZPF7LYuGiF1auzvWqF5Smr5JfYFMsD2ZfAhWtQ0GzhW FIbagEBD7urmV09cOvvE+mGxU3EWY0RNrtvsot++7bkWr6fippFANiAB6CMwcfE/amVX qQjFT4ENzW0cVFyEaxNXJlw3ZVtcFl6fFlCK5K8VMM0R6ATdI6uoJuk7c4iPFG5vPSYK Gw75MdKr//as6aROiTUNejWieAtQoOudlbnufbHfN1jAuLpzgh+A0z7SKq6fd30km0DE k8kVkdswt0kvjaGBWSAVKjrOl4Cp2qHHpFNoyR4/3N8h3OqbYkw4Jx9cDyQSS4a442/n GQGw== X-Forwarded-Encrypted: i=1; AJvYcCU/0rpygimxWPyObhKFp0vYzWmggrdbTtri9XIwBvhvML6FS3bC8cUGfa6MINboYrINVCR2gUefvrYDYvNuep7OUQEgaEAOiVea X-Gm-Message-State: AOJu0YxbeOxrL1rAt50FWfPBAVPgpzprVr+NjDzr/A1wcLRJFrrDvS7x iU+EwIbFbmKCZq0a3hM18Nv8sVDD86aiyZ0HDdkqO1ihJ7gmd9x7F/ksNe4ekAA= X-Google-Smtp-Source: AGHT+IEOWHRu0nBY2wHAv0SKzD6r95/9wH2ZYJzxXoOE2qLCzqw3mSA1gzeFO97Ol7nFNqgpQ5fBag== X-Received: by 2002:a05:6512:3f06:b0:512:8d30:6dce with SMTP id y6-20020a0565123f0600b005128d306dcemr11672739lfa.52.1708473533791; Tue, 20 Feb 2024 15:58:53 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id h27-20020a056512055b00b0051167de8560sm1438831lfl.38.2024.02.20.15.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 15:58:53 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 21 Feb 2024 01:58:50 +0200 Subject: [PATCH v3 1/3] regulator: dt-bindings: qcom,usb-vbus-regulator: add support for PM4125 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240221-pm4125-typec-v3-1-fdd0ee0465b8@linaro.org> References: <20240221-pm4125-typec-v3-0-fdd0ee0465b8@linaro.org> In-Reply-To: <20240221-pm4125-typec-v3-0-fdd0ee0465b8@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1066; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=I72GnJCLd9/WSa0N+ty2v+dNI2zZTTJ7yTodRVOBsLU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl1Ty7+EA1phDtHjGy+z/YkjXb+FB1VvZvKJ3Tz kq2i4NHmg2JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdU8uwAKCRCLPIo+Aiko 1YUKCACNKbnhPO+7xDqVxHPQnHkNVFl5x3SNvshghflafN/vNrZ8ObGn/Ip0zE2ql1T04xserQM JAyqmTjPU50+c2PVmJRv/jCZs/4l+mkT2McD40NujQxRH+h1fgjJunD6hzX9YwM1F27JXGNjspu x07YaP51xAtmDKrZd8OnEGxZjx9NTOWAFQnNrlExaVQCVED/+Dgn/ibz7mGkAcpC5EM71Dd1IPi w/gUJu3cCVu2yHWNl4pFDNxlyzb98LaDrf6XqLCHdNyVMB6cvwB+dBkTD5YIjjn6Lgqm9SRIirI aU7Oy+I90nlGzyx/rV3ySgSNVg0LVKC7ENY81VP27ZYcAXfA X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The VBUS register block on the PM4125 PMIC shares the design with the PM8150B one. Define corresponding compatible string, having the qcom,pm8150b-vbus-reg as a fallback. Acked-by: Krzysztof Kozlowski Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml index b828a69ccb84..33ae1f786802 100644 --- a/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml +++ b/Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml @@ -24,6 +24,7 @@ properties: - qcom,pm8150b-vbus-reg - items: - enum: + - qcom,pm4125-vbus-reg - qcom,pm6150-vbus-reg - qcom,pmi632-vbus-reg - const: qcom,pm8150b-vbus-reg From patchwork Tue Feb 20 23:58:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 774480 Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 22B3015530F for ; Tue, 20 Feb 2024 23:58:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708473539; cv=none; b=sczpsBQMhUKdQQ2TRlUlQVELBvPVvswRV5L3YG+6W83oUp3sby5EKdaVbrXfrrZW0a+TqW9p/9CATuXUgWf085ev7JrYCIgOOB0SiG1ZZIgRkRqdHMzENdmLpNPhl9KFdP4RwaXQKbNgA3UPAMZA0bUW4pqvkwgbTU39mPlMyoA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708473539; c=relaxed/simple; bh=TSZ6sVvVq/7rSkCh4KijYcLg5W1SfP4Ts0Hhg6UuxlA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bYHVgSZNA/km9LVb0XXFgd5ZdpUzXPm02GxZohrJnmxwVDYaOdcKZdXWiSO26hqUPCscumv/Kj+ZUf+q66kltE91i+BUc/nm81fVu+0KDplhlgf0I5jmdK4t//pJkpYINE9/McKpOOM5HPXYRQGFWPakMrxJsQCkqISljmOLKvA= 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=b6s4GN6+; arc=none smtp.client-ip=209.85.208.172 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="b6s4GN6+" Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2d23fab7708so20113671fa.0 for ; Tue, 20 Feb 2024 15:58:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708473535; x=1709078335; 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=89GyQnZOmqXGQ7q+2rssbbMFi5MST3tXfHQsqlea/s4=; b=b6s4GN6+CP//zrSoMV8IL3VfxOkhaw7Y6cTs1n0wB5Jwn0h488XEmcO2U9/BP/DaZq ezLtmbEhW2TpiZzKVMxf7LB+R8HmpUx3Khz8RGzxXbI0/X4SfU8D7RjDRCCk7xVKRrW2 L55dbwpDDJ1wQFJqAJfWJH/GVKvENF+sPE3OC+zv9vC7ZOae/kkqShzlCz2Ywqn+ncSO FEFPLYWZ75iFZc0udj5NbVAjEMVGlpEWWh9MMf1tz45r8/4aXPRysFZAACHKQbX8SLWq 22PD+3lnNf6FrdaAHGkVGIeqHuitUcgL45wuCcT+65e3qSLx6lkAZjBbhmGfKq2PRbun DwYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708473535; x=1709078335; 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=89GyQnZOmqXGQ7q+2rssbbMFi5MST3tXfHQsqlea/s4=; b=tDbGL+uM9POsRb5lTU4VrMThCFvVc+37CZ9uy4ER3GypSB8eevPNsqTHQ0naNTMjvg T9FdACSG3vdVr8DO32UJmvNCu59WKInFx84vB6lhKdx7tIoBFmYE2IMoS8he85JKsaA5 bMpIh054XtqGXMErQfZ7/Du2beZjMVbFICXoUUjQbI/RTX5/q7wZpJ6YiNtzxmK6BUkL 2HZzQwWX4no2xWka1zlJ23ZdGZeRKRbPrUGcpnzCYo2XehHd40rFhxnnyz0ob0EbvkDa lfWlH+e1Vv0fwD+Bea0N67UxELOPLeYD6M5wYptX103BdOlXwwnhWsFbMt9NE+Ly0z9c Ccfw== X-Forwarded-Encrypted: i=1; AJvYcCUJxuEKlrCKK2Qhlz2lY+MnC/qeaFk4/rzIftQdE4Nr7o1ZrKeAmaN8lz0GBK7eJB8d0BdFV+8YOZqAXhTlM+HKNlHyLCamHtKq X-Gm-Message-State: AOJu0YzAiGjhc3Qgg6uA4Ruead40ptt6YzfwWxbZ2LjyhiobYvsNLhwE ckL/f4uLhFAYVD9qSixhPzNtpJlOAlh1BmmiZlTt90I9C49KxIRBEEEFe7IS7IE= X-Google-Smtp-Source: AGHT+IELatx7FjfQzfXxto8uavnci3ayAEeVSTf/dI7EZr1sRX2a+xCNSn8wWyriHejnz8vq7FssdQ== X-Received: by 2002:a05:6512:230f:b0:512:a5d4:4663 with SMTP id o15-20020a056512230f00b00512a5d44663mr3992903lfu.9.1708473534550; Tue, 20 Feb 2024 15:58:54 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id h27-20020a056512055b00b0051167de8560sm1438831lfl.38.2024.02.20.15.58.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 15:58:54 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 21 Feb 2024 01:58:51 +0200 Subject: [PATCH v3 2/3] dt-bindings: usb: qcom,pmic-typec: add support for the PM4125 block Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240221-pm4125-typec-v3-2-fdd0ee0465b8@linaro.org> References: <20240221-pm4125-typec-v3-0-fdd0ee0465b8@linaro.org> In-Reply-To: <20240221-pm4125-typec-v3-0-fdd0ee0465b8@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1110; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=TSZ6sVvVq/7rSkCh4KijYcLg5W1SfP4Ts0Hhg6UuxlA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl1Ty7KwSCNCP7OoWvrtBbI1IkqiI6E/0QalPq6 KWRAPGWXyCJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdU8uwAKCRCLPIo+Aiko 1SDyB/9ISKU+JUcEtLncKVXhx7Aq5w3BtAWUnHi5r+0RL6u6twdwNyUS4lumtbq+p/Qjx3tHxLZ EvLXCG5dMFUxchPxMRnP+bEEx/4/+CKeyjByj58KaRMiKQi9AhgTZYL8b6oDz+ngE3cfHe8SQhP 28MSw++Pe7GvNx+hB5QfuvFFeUmvQTNOamP0+6TPCforY302SkBXL1+QnN5FQ72hh8JpVgAXujk Kt4I9/BId2pD7uFZfuwoVSsOAVzAcMwKQhDzBK9o9s0JQsqxOxRZG40FTV5z8lHgPDR8LtWydep BZ1AVuiPRwppAg3KRTNHmWFmFqnBxo4hH/K1OaLlarMpHp7F X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The PM4125 PMIC has the same Type-C register block as the PMI632. Likewise it doesn't support USB Power Delivery. Define the compatible for the TypeC block found on PM4125, using PMI632 as a compatible. Signed-off-by: Dmitry Baryshkov --- Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml index 6c0c6b337693..5527a4bc9388 100644 --- a/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml +++ b/Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml @@ -14,9 +14,15 @@ description: properties: compatible: - enum: - - qcom,pmi632-typec - - qcom,pm8150b-typec + oneOf: + - enum: + - qcom,pmi632-typec + - qcom,pm8150b-typec + - items: + - enum: + - qcom,pm4125-typec + - const: qcom,pmi632-typec + connector: type: object From patchwork Tue Feb 20 23:58:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 774816 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 91DF615531B for ; Tue, 20 Feb 2024 23:58:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708473539; cv=none; b=rhn0pzuKGMrmISygUnNnoORE/143PVQMhDkJzLI+R9wopMiHzVEd+h9ENwC9UMoi/yKLDVeixttzoIrDoR4kw2gxR1ydPL9P4ZXwXp8j7lTEz4RVJ9DFJhNdDmxMLLo6mtd33sOyAHaXi/jaKWVVUln/RtcwiSWCN7yK4NrA8+A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708473539; c=relaxed/simple; bh=xsb+gMgRC4mTpUU9Yd8ZeeQIHCjK1OYSoeQFs1OriYs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZmVcvnuTUwgsgnMBC1Gc+RMjkMhsrbimKLu2pi18Ikt/lFC9UB0wTRxOrXXGAbK7tSsSYy7zMQmLNYgrg3we8OFioqkzuvoBx1d8dTaesJCMe5gJQ+dKumwN/CEzdqj4tlZX5rf6wnpKp2U/wSLHSbrWdxpHuV5K+RexXFnU0XI= 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=agXLHifd; arc=none smtp.client-ip=209.85.167.42 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="agXLHifd" Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-512a9ae6c02so29398e87.2 for ; Tue, 20 Feb 2024 15:58:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708473536; x=1709078336; 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=dA3MUcPJas/uxeLjRMByLl/kgbZsDs9gZgJLp+b4wrs=; b=agXLHifdGYWzDBUftXYLhxjc+B84ZdK6ytaqkdPPhVk6Jzq88rZGI43dXBc3Kr+gpb i3NqZBpgCignzhGXYgEqUChvd6aOFcNJnR58mUDsY4R95AilpBvbZYrRlP/QozlLCYi0 /wbGJ8d7IHR/gKSJabFKvNApIJ7t1Rr6dBL4pGrVJvNzeMkxw5C13DdrksQE6mTHSzBJ H61lsGHtuBDmScU9aCapV7Nxpk8YWZp1cI7qT3AY8pS8jPLHq4kTjKVbtvzcr9jNTOqU hqjVZTtJrCs59yareDuO1sptKRqh9rA3TqcSeZHQaAj7fzMsjsvAnOAwsNl/AaxFW2CE ygkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708473536; x=1709078336; 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=dA3MUcPJas/uxeLjRMByLl/kgbZsDs9gZgJLp+b4wrs=; b=lCk4obnLxGThArtgaTau3iQHalw3tG97hM0LLEdqlLe4q5VD/9/8/XNY8Gdfzl+g8D Sf5BmNX+MguP2uxEeEXVU2Y0o/+/Nj764yEuk0jkQVcVx58BhQqDNt9m1jjTrSaHG1Ec HD2K81Ut3+WZ34OpYIlz1ataZDRKOaRu2w3JS4fZZA9iELlumqtddZQ7L+y3U3/jyBR6 ZWHE1CIFghXo6TUUVZoGijehY3uIc10L0owR96Dnrugt4o9Wj3y/HoB4bbUQFSTseRc2 KK0I40Lka45kl55Ls16Jb7fG26Pijq5k4f2MUvQjjAs5dcz6Hx8+fhBo0sVuzCXfvCPp /2Kg== X-Forwarded-Encrypted: i=1; AJvYcCVIP7NRA1NK/hLBa36scNX+L8vuE3EQYrrUEkLf2A8UHA0ZXGOrtz+SkCq1g5xUOfem7DDodFMRmc5Xpg+y2yS+4IxONBVCP14I X-Gm-Message-State: AOJu0YzDYzfwAOrKLazVy7rL+c0ppD6ncw/eJwiplsOfR5q4FGdaTR8g CQ0ZvAhW9Ja5G44KLhS5fDzWKrHhrF0Ki4S6tU54+OvUI8AjHAvbrOyJ0284MyA= X-Google-Smtp-Source: AGHT+IFzN/727bZfmIqxsB/3FdEc9lH6KIjR+lJYEL36aByz+IVlqWlJVUgs+pdB+gtWK5btx2W27g== X-Received: by 2002:ac2:4311:0:b0:511:ac6c:2b28 with SMTP id l17-20020ac24311000000b00511ac6c2b28mr10179345lfh.56.1708473535709; Tue, 20 Feb 2024 15:58:55 -0800 (PST) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id h27-20020a056512055b00b0051167de8560sm1438831lfl.38.2024.02.20.15.58.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 15:58:54 -0800 (PST) From: Dmitry Baryshkov Date: Wed, 21 Feb 2024 01:58:52 +0200 Subject: [PATCH v3 3/3] arm64: dts: qcom: qrb2210-rb1: enable USB-C port handling Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240221-pm4125-typec-v3-3-fdd0ee0465b8@linaro.org> References: <20240221-pm4125-typec-v3-0-fdd0ee0465b8@linaro.org> In-Reply-To: <20240221-pm4125-typec-v3-0-fdd0ee0465b8@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Wesley Cheng , Bryan O'Donoghue , Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3414; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=xsb+gMgRC4mTpUU9Yd8ZeeQIHCjK1OYSoeQFs1OriYs=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBl1Ty8RroEUlU/+6HSZ6nK0sj6/jYQHz42WF19D MEDLFeAOD6JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZdU8vAAKCRCLPIo+Aiko 1cnyB/sH0vdN6/4xtG4Kn4D3/kw4xXcH/bOexIniKW78xq8vdOzS2MVI+NxUF4fPS6JxYEQGFqq 34XK2zaF/IvIrwJJZ1QODAr0ssZsm7gWX7UKCa5K2MHOJraZ+JET42xb7ZwBm8ItFg7k2pqKbFf O+6CyQQkH1choBBS+VmPpYeeWmAwpMLGq7MG2vHiSpvBfd933ifo7pPruq4qlGohBtT+aw07Yft vFlfNSfjM4K9+1efl5HLLNgmg6/6wLTsIOJWm2tlM6rcz8ZBpCP1si5lOklzVORuj5FuhLK1oca c3My7ejS8cpqEGvUs+GikTCQ1XmtnQnUXM5u/iJwD6NCt1l9 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Plug in USB-C related bits and pieces to enable USB role switching and USB-C orientation handling for the Qualcomm RB1 board. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 42 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/qrb2210-rb1.dts | 60 +++++++++++++++++++++++++++----- 2 files changed, 94 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qcm2290.dtsi b/arch/arm64/boot/dts/qcom/qcm2290.dtsi index 89beac833d43..967bc98d02dd 100644 --- a/arch/arm64/boot/dts/qcom/qcm2290.dtsi +++ b/arch/arm64/boot/dts/qcom/qcm2290.dtsi @@ -694,10 +694,31 @@ usb_qmpphy: phy@1615000 { clock-output-names = "usb3_phy_pipe_clk_src"; #phy-cells = <0>; + orientation-switch; qcom,tcsr-reg = <&tcsr_regs 0xb244>; status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_qmpphy_out: endpoint { + }; + }; + + port@1 { + reg = <1>; + + usb_qmpphy_usb_ss_in: endpoint { + remote-endpoint = <&usb_dwc3_ss>; + }; + }; + }; }; system_noc: interconnect@1880000 { @@ -1380,6 +1401,27 @@ usb_dwc3: usb@4e00000 { snps,usb3_lpm_capable; maximum-speed = "super-speed"; dr_mode = "otg"; + usb-role-switch; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + usb_dwc3_hs: endpoint { + }; + }; + + port@1 { + reg = <1>; + + usb_dwc3_ss: endpoint { + remote-endpoint = <&usb_qmpphy_usb_ss_in>; + }; + }; + }; }; }; diff --git a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts index 6e9dd0312adc..fca341300521 100644 --- a/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts +++ b/arch/arm64/boot/dts/qcom/qrb2210-rb1.dts @@ -262,6 +262,46 @@ &pm4125_resin { status = "okay"; }; +&pm4125_typec { + status = "okay"; + + connector { + compatible = "usb-c-connector"; + + power-role = "dual"; + data-role = "dual"; + self-powered; + + typec-power-opmode = "default"; + pd-disable; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + pm4125_hs_in: endpoint { + remote-endpoint = <&usb_dwc3_hs>; + }; + }; + + port@1 { + reg = <1>; + pm4125_ss_in: endpoint { + remote-endpoint = <&usb_qmpphy_out>; + }; + }; + }; + }; +}; + +&pm4125_vbus { + regulator-min-microamp = <500000>; + regulator-max-microamp = <500000>; + status = "okay"; +}; + &qupv3_id_0 { status = "okay"; }; @@ -535,14 +575,8 @@ &usb { status = "okay"; }; -&usb_qmpphy { - vdda-phy-supply = <&pm4125_l12>; - vdda-pll-supply = <&pm4125_l13>; - status = "okay"; -}; - -&usb_dwc3 { - dr_mode = "host"; +&usb_dwc3_hs { + remote-endpoint = <&pm4125_hs_in>; }; &usb_hsphy { @@ -552,6 +586,16 @@ &usb_hsphy { status = "okay"; }; +&usb_qmpphy { + vdda-phy-supply = <&pm4125_l12>; + vdda-pll-supply = <&pm4125_l13>; + status = "okay"; +}; + +&usb_qmpphy_out { + remote-endpoint = <&pm4125_ss_in>; +}; + &wifi { vdd-0.8-cx-mx-supply = <&pm4125_l7>; vdd-1.8-xo-supply = <&pm4125_l13>;