From patchwork Thu Feb 2 13:38:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13126075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75A8FC636D7 for ; Thu, 2 Feb 2023 13:38:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R4t6PsgHnlG8o/81KQoPeVPCToMLYu0gTvjegRA+ask=; b=dqXk6lFCEnpLDn xAqCZSQKtZSh2rBOapHC437CGo8YnPj97k4MUz6NH5majdJ/cQQGNqmBAGvMnz9rm7mgDAwABx9c2 HfgpDssvBUYCUsiiptTovBl6svZnXmXvpeLe82647R8bmicANLguTJQ/Kf/qwtZCu/h8aHxyRabql EOEcKWx0kXZWWlZ2Un/0/uHhcqKTBocwCl9vuKDawKcATZzBFjJYFGLLH96pYZkb6rdWNbepi0xkO d2u9acl+lqWJpUF9z3gEET6suh8QDxfm6KluTlL94RHnT1Zo4DLlUbGVTTUEt0Kuf4cQiA8zsUKkq nCw0nmzD8IZGchniH3Iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnL-00G2VO-QC; Thu, 02 Feb 2023 13:38:31 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnJ-00G2UI-Bp for linux-phy@lists.infradead.org; Thu, 02 Feb 2023 13:38:30 +0000 Received: by mail-wm1-x32a.google.com with SMTP id d4-20020a05600c3ac400b003db1de2aef0so1423716wms.2 for ; Thu, 02 Feb 2023 05:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KlnEmmK+mxpU2hlLI+Gvfd0nScZypGzNM1BgswRGTnA=; b=D/nQ4GR3dSQbLqg6I6//g3oBsSG/b41aAlnM5Yufajj05bmK/+DsKRO+n9oumxgDRI G2RhKUVYG8EWkwk6AquEpFY7mo7ENGkqqn9/58rzLIrcphE9KFK8LotJnFGF98o5eG/j BBta75jGyHpzijTzIe80l9wsn1ehQxvKs3ekgQPdjzOv9zk7Amqm1mrZX6G4RnG7IA+1 mYyLuKLlxJ0VYsKRZtajgxpjwnm1tu/6nrev06GFZlHlRiA1Ae6MCpgK3AlpewhOHCJx mGgvHPsLmEUYGm5niLk2stCIBSRLnZAuKNPmbCSLOAbis4w56YgkUD/GSiZJWEyr9rOo 8vmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KlnEmmK+mxpU2hlLI+Gvfd0nScZypGzNM1BgswRGTnA=; b=1OYF1evirYC+/e0X6pDhjP6M2jFKcOjGX2TTBq6rjA9qP51XEBa1pn1tLpE5DWp4WZ N8YB1bfGvXmD33LiKuB3chld8T/DOBtBkcp8Uj1zgVhhPhpnMYsbr96uLMB4ka2iZzFJ DSNxMsicIC6F78J3UZK4e78fEbFz3ebBHo2NHOyAxLYrlgwOAwnCU9+c/Hi0J5LioMYO 6D2B+FqGfgFmFsBZ5qJh0zF6QDTV3OTikZRVOkJwKxP9U/kle3tq6yaqr1wfVdsRtc1F 1SIrLp4Bx+LjQ831Js9QFX46piN/62T5DTvODr0sbgZqq12/4VrovG6l7lbRIIZ+TC4S HKLA== X-Gm-Message-State: AO0yUKWsW4ColTwmMuzk5DAddx2bNEGutifOaRAIqLuzbWKFXL+rSINI u4Kjs+D2p9FnwISZ+NtWk7/VxQ== X-Google-Smtp-Source: AK7set/HruKLuPPKZqpPir9fHCiHYxHpi8qYjeVph/FYB2s7tGyUsL58Of7GtXwbLYNB13s2fnE7gg== X-Received: by 2002:a7b:cc83:0:b0:3de:25f2:3aee with SMTP id p3-20020a7bcc83000000b003de25f23aeemr5981561wma.31.1675345107899; Thu, 02 Feb 2023 05:38:27 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c364a00b003daf7721bb3sm4672657wmq.12.2023.02.02.05.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:38:27 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org Subject: [RFC v3 1/7] dt-bindings: mfd: qcom,spmi-pmic: Add pattern property for phy Date: Thu, 2 Feb 2023 15:38:10 +0200 Message-Id: <20230202133816.4026990-2-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202133816.4026990-1-abel.vesa@linaro.org> References: <20230202133816.4026990-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_053829_417270_A7EDCA95 X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The phy pattern property will be used for providing eUSB2 repeater functionality. This will be modelled as a Qualcomm PHY driver. Signed-off-by: Abel Vesa --- Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml index adf88245c409..1e6fadec1301 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml +++ b/Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml @@ -135,6 +135,10 @@ patternProperties: type: object $ref: /schemas/pinctrl/qcom,pmic-gpio.yaml# + "phy@[0-9a-f]+$": + type: object + $ref: /schemas/phy/qcom,snps-eusb2-repeater.yaml# + "pon@[0-9a-f]+$": type: object $ref: /schemas/power/reset/qcom,pon.yaml# From patchwork Thu Feb 2 13:38:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13126076 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9206BC636D6 for ; Thu, 2 Feb 2023 13:38:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZRQkWwoCAScXlIfMOF8L9htnqcf9wImx3pY48oJrTD0=; b=S9w5ihB3j5nb88 Kak2H67M5z7r6B9PImGYS8r3fvSs8+3+QABYo6zaFKKdEI3OJ9Q8te8a+wGECd2azIuQLCryT8HzE IMyCJGDnDmkYqb+3nzgdP1ImB9AtefXS3QP42D95bCtIwmdJhy4df3VM1HaDXR9zCplpnkTXaaJsT fAKnAH4FE228DWxi6/BXPvnwu1embUKRxAMURrkeXzIqUgSCMs9K8UzDH5LZXzyUi82BgxqccQ7li qQyDem25ExiRMskHpA5St4Rw/AkzwgYQjDHyppRo9h+sx6yWWkr2e0Ihw5LKZWEicR2ItuP4B8WiX 05PPmDZJYA287IX2sU0A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnO-00G2Wo-05; Thu, 02 Feb 2023 13:38:34 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnL-00G2Ul-D5 for linux-phy@lists.infradead.org; Thu, 02 Feb 2023 13:38:32 +0000 Received: by mail-wm1-x329.google.com with SMTP id l8so1409119wms.3 for ; Thu, 02 Feb 2023 05:38:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9yxu9ED25jI4YsnaXumV3Ax7b6QC/J0yJHopprA5xIo=; b=w2eUQMvLTM92x0vwuuRT1Wgf7qa6j7dzWEgymh3T0i7zYyTFaakJFn5WBeHy1M+XWB vYyYQh8guPId2wvoTL3lCCSgryIPjT4pqUhys/eTmXUPuOUUY+Yoz8mwDa4QuzuC+ohR rKIrT2hTqTubouUxdjA32JFmvFtuha5ts64evAHyS18cKRTlHiPqMMw3uFPpkXznKKjh j3HufhGJdiG97qbygLNWB5eX6SoGbQIZK6ZZoreu4aPDbnUrFebLvs7Cdmmb/h0PK8st /7qXYiYgZbc+FYw4EXAxCVsmx4iD0B6SAlRcQT1UPvM5o1MhOA4ztvoWOQoPjkxuBdhC SJkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9yxu9ED25jI4YsnaXumV3Ax7b6QC/J0yJHopprA5xIo=; b=J2+RbxFUZVM/ck215/KQfayKmHSCqb9zW+O7j3duiigx9rqkWbI5tbbRJCK1sBzi3O k+qZnl/b8+QkO1Z7NC6AQhaL/4rUbfhXdxA1RADZKLQDatIyFi7gdWQ6VGSt3oAbsotw ONrZKtcz+uSyURQv2Tc/5ULKyNcPMIIkdwS5uvP8pNTlvVgiXRDfeeJ3F2G60FZ8pEYb M+bMs5XJ7CpHeAqy4TEwLJxGlHM4R99MY9ySGfpL3No0TYm4TEDtF/x778KsjyqlRj2k wKDex/uQ09IpezS/ldFZnXk2Hc/aSGLi0Z7B5hgQX0jEm2XUFFtihQUex+GebYprp1q2 e8Og== X-Gm-Message-State: AO0yUKUiA5xqsYvmCY/VcgsbJivAmNTHuJiUF4G73kFuS4ZMqEVCbYn9 UNbNOU/B/pUFXpp1qx7S/oDUQw== X-Google-Smtp-Source: AK7set/XlhVcSy1s2ql7DbgL+4Fy4kL5rb4EcdZ+qg7OpWHsPtWFgTOEgZ6BWYFLqh+UdqMYaFQsOA== X-Received: by 2002:a05:600c:3151:b0:3dc:5342:9f53 with SMTP id h17-20020a05600c315100b003dc53429f53mr6422602wmo.38.1675345109275; Thu, 02 Feb 2023 05:38:29 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c364a00b003daf7721bb3sm4672657wmq.12.2023.02.02.05.38.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:38:28 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org Subject: [RFC v3 2/7] dt-bindings: phy: Add qcom,snps-eusb2-repeater schema file Date: Thu, 2 Feb 2023 15:38:11 +0200 Message-Id: <20230202133816.4026990-3-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202133816.4026990-1-abel.vesa@linaro.org> References: <20230202133816.4026990-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_053831_458996_AE2D4F7D X-CRM114-Status: GOOD ( 12.31 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The SM8550 SoC uses Synopsis eUSB2 repeater found in PM8550b. Add a dt-binding schema for the new driver. Signed-off-by: Abel Vesa --- .../phy/qcom,snps-eusb2-repeater.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml new file mode 100644 index 000000000000..3b99038be74e --- /dev/null +++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-repeater.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/phy/qcom,snps-eusb2-repeater.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Synopsis eUSB2 to USB 2.0 repeater + +maintainers: + - Abel Vesa + +properties: + compatible: + const: qcom,pm8550b-eusb2-repeater + + reg: + maxItems: 1 + + "#phy-cells": + const: 0 + + vdd18-supply: true + + vdd3-supply: true + +required: + - compatible + - reg + - "#phy-cells" + +additionalProperties: false + +examples: + - | + #include + pm8550b: pmic@7 { + compatible = "qcom,pm8550", "qcom,spmi-pmic"; + reg = <0x7 SPMI_USID>; + #address-cells = <1>; + #size-cells = <0>; + + pm8550b_eusb2_repeater: phy@fd00 { + compatible = "qcom,pm8550b-eusb2-repeater"; + reg = <0xfd00>; + #phy-cells = <0>; + }; + }; +... From patchwork Thu Feb 2 13:38:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13126077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8148C05027 for ; Thu, 2 Feb 2023 13:38:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iJbJUZGDdvdWPeyT852oY6hKFZ3HU9BWirr+/jQegew=; b=IAhlZxQldvX4O5 K1bdqKDbBoo07qf6UIkTmCUwMTuiFN1LdMoaH/9UVu0Gzi4kRU6HOgAxRWUqTxCtfTotgRMyizMKm +Ej7QfD9Hpaj2+T7m5GiV9ySrksXVC+YbW3g8A/7OCIMqN5PUnnM7Lx6t/PlHImUvYhJChh/FPaq1 85pQ+c2iCgPQJR+kgoiWzIpgN2vXsuCler0kCvbnPJ0l1rDqd0lUuz0b8YvFUTAy0GrG4cMLuggb6 6izB7sZCQ07HYpuiO2mq2o6mqytlZyxzFdahwcTWit/fH8jQfZUf0kMuGyctyfw1QXwLDtMnvumlN P14KsECzdotHHon2yBcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnP-00G2XQ-49; Thu, 02 Feb 2023 13:38:35 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnM-00G2V2-KW for linux-phy@lists.infradead.org; Thu, 02 Feb 2023 13:38:33 +0000 Received: by mail-wm1-x333.google.com with SMTP id hn2-20020a05600ca38200b003dc5cb96d46so3735707wmb.4 for ; Thu, 02 Feb 2023 05:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=up0Y4t69U4vgRLlW0caJKF4/hXf0ON3DpzJiFVXhbIE=; b=nnEiHkSNiJ+p+F1/8ICk557Vb00bABie3SDKnfY+mmrX3lm/+LyMp9jQXFWCThUy4A emLcjBvidZffjZ06y5B9IzUK0z5itkYRXK9c/LgP8PEQvIIYwMvXAzTejMcg/YDmbNnJ 0BP2trd1wjf+nIl1PsZo/AgAVA9mvSDKozL4HPhrlyt11j/dI8L9ksUeaONgI0saLEi6 Y64Gou09MZB8ytU04DFcvZMsZojtLuXL34sM159o+G4i3brHpbOtfO1n5ubVYjN2aK7V kQJpxR+3rRVU8wuRutPXZ+MqhjPaBtxgHyEJNbTHZ1IrLxzGlwpiNas0LBDCNQKSX+R1 Ctpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=up0Y4t69U4vgRLlW0caJKF4/hXf0ON3DpzJiFVXhbIE=; b=daDlxVj8aGR+uPgf2kqDWTKyJXX0pUB4Lg1JyVNn/Hc+Od9ZJpftf5QVUEF5jU6/Oj thzxuZaJ6IhrIMWu7oAvogRBxCWKUFX/qxMZRiOMqaxVdwmKJnMXnH8QOJSWz5LjvDSA kvykpzjv+05eBfEf8CbWTkLa5En/Xm/ZyWwXCkW8aCqkkf88kLKFUTyIw3DyJWjqw11d NNaXKz40CYPos5nE0aAN98LVC5zTx8pCQFMDOrtzBKXNuXFiAXYp/Rf4saZBFVFM4bXZ 2LNHJCmgDkOEy9pp70IkgpkQjOsXy+z7FMxgxB+zUlfKD7Ahmnl5gTkd9JPJFrs9So0d 48nA== X-Gm-Message-State: AO0yUKWwjbl5ez9A3TWnsy4OQtFJkU2rN1rW6bxx1tKkFisvbkMXWQoZ zL+exOEknGj9fWYW6+SL23hbeA== X-Google-Smtp-Source: AK7set8e5D8nC7f9RQsyPu1b1/cHMG4COHxQnQLPr1DmsNkygYoQ85g2yKYhJrfhTRfiZJH/F/Lvrw== X-Received: by 2002:a05:600c:4f95:b0:3dc:47f4:a022 with SMTP id n21-20020a05600c4f9500b003dc47f4a022mr1898542wmq.25.1675345110439; Thu, 02 Feb 2023 05:38:30 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c364a00b003daf7721bb3sm4672657wmq.12.2023.02.02.05.38.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:38:30 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org Subject: [RFC v3 3/7] dt-bindings: phy: qcom,snps-eusb2-repeater: Add phy related properties Date: Thu, 2 Feb 2023 15:38:12 +0200 Message-Id: <20230202133816.4026990-4-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202133816.4026990-1-abel.vesa@linaro.org> References: <20230202133816.4026990-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_053832_688164_3E2872A1 X-CRM114-Status: UNSURE ( 8.53 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The phy properties are used for allowing the eusb2 to interface with the repeater, which is modelled as a phy driver. Add the phys and phy-names properties. Signed-off-by: Abel Vesa --- .../devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml index de72577e34a4..8efb09b2dc5c 100644 --- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml @@ -33,6 +33,15 @@ properties: resets: maxItems: 1 + phys: + maxItems: 1 + description: + Phandle to eUSB2 to USB 2.0 repeater + + phy-names: + items: + - const: eusb2-repeater + vdd-supply: description: Phandle to 0.88V regulator supply to PHY digital circuit. From patchwork Thu Feb 2 13:38:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13126078 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA0AAC64EC3 for ; Thu, 2 Feb 2023 13:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5T69Xjr6KsN9DJ4zY7yxV51hoWFo4TcZVhbTtCGoml0=; b=BPKotJchW+ImTn wuR9OMyuuBIBNufX3KqblQF5xnvDhm75oMAbcgM6d1ZmILf4pfJFmGBEk3T2iuSIYl8ucsFPLgxCM btkEmTGpNM4mLgnWBsfs+jd4XZsw2YzxzcLzRPp3U4OF0WficSPEf/m8PUF5LEvcx3aNIe6SRD8Qa vhxlrfJXqexrCo46nzObZEGv9U0NhBgjM/Q/LEhiO5/yoEcAk994Rpn9YTW0yjnH9zIDnDjdQOIF0 MdG+iwLvRKGoffaegbKWYD36Vdr89eJMNbYZOhin6l9wIebNDareIf6dGgp/+EONYsuHzWx++o/e8 7bpEbLYICfS8PT0XBOHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnQ-00G2YW-7r; Thu, 02 Feb 2023 13:38:36 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnM-00G2Vg-Uw for linux-phy@lists.infradead.org; Thu, 02 Feb 2023 13:38:34 +0000 Received: by mail-wm1-x329.google.com with SMTP id c10-20020a05600c0a4a00b003db0636ff84so1441928wmq.0 for ; Thu, 02 Feb 2023 05:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dYq4wMK5S1ToRqdSUp6ntH/ifz+iAM/Bt7zCv5RvtcM=; b=eHYTVMwewQIgJLDgdmmQ39EuRBV6oOFmNs9rKUC8Hj0ekzPBkGdNoQYn6tkS5FUWYE 32HawtIWDWayxQLK+QEw71fuuBpRE9oQRsOlv5DAP/zG3kW+WHcplS+X+kgORX2TjXUe VW/kOFXz65Ht37GBsQ34x/kstCKFiQGy7RMNiRS/xuSWHmZhKwZl1L3D63kyqHp2VGXs NLTiQTWrl/kJtjWoMtWEeY7t2E1TTou2AuuKv0xAuzU1WTluUCo0SvrAjybei4Xgk+wl MHVNoBWfBwawvRqAU7he5E9pT0wwoRuKQ2gJr8x2O18WR4Cgv473HWOtCSZN7HsLoEzJ SynA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dYq4wMK5S1ToRqdSUp6ntH/ifz+iAM/Bt7zCv5RvtcM=; b=7iYrpXXSgJe0PiKw6dfVDflUhhgGPBeGBZHXG+6XbG4EnlWW7cUnKW24HAOvu1joba 2b6F0e6LWEKdmRzlWhOXuDJNpd5elwgFqpwlf/cCYrt7KM0NSzcYHCw1IaViUpeqSzfc 8J9z9E7uaySqqGimFWmbU9zzWStK1xOpI+tImU9PU8G32GscnM9q7f/OcdPHlIXels+r PUkJyVrNb0fEwgGX32slCuOp0ih578QN1nL8Vjq+MUhEuH57eOhKXj4AGCE6J0JumRIR vRK3mtGqJN1thqMz/2SZFknMjvZqssL+F1TXlp/GsRcqMkGDJzXg9WvsP/nhFLzb+ktc Y/6w== X-Gm-Message-State: AO0yUKUwM3A+BspeZTo2A2hxcfMO1NGOmJbvhWL/9T7U7d0Wa6CIUvN4 3KaDdJT44k3DphT3rp97/wOIEQ== X-Google-Smtp-Source: AK7set8KLjWbFuqx8VUDsCZQ29h3vaNWmOft7ynsWBxGW0E92Sj2X5vagOQKxHFeaa63il6TWvZfHQ== X-Received: by 2002:a05:600c:b86:b0:3db:2dbb:d70e with SMTP id fl6-20020a05600c0b8600b003db2dbbd70emr6013790wmb.6.1675345111680; Thu, 02 Feb 2023 05:38:31 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c364a00b003daf7721bb3sm4672657wmq.12.2023.02.02.05.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:38:31 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org Subject: [RFC v3 4/7] phy: qcom: Add QCOM SNPS eUSB2 repeater driver Date: Thu, 2 Feb 2023 15:38:13 +0200 Message-Id: <20230202133816.4026990-5-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202133816.4026990-1-abel.vesa@linaro.org> References: <20230202133816.4026990-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_053833_040201_935E7780 X-CRM114-Status: GOOD ( 27.10 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org PM8550B contains a eUSB2 repeater used for making the eUSB2 from SM8550 USB 2.0 compliant. This can be modelled SW-wise as a Phy. So add a new phy driver for it. Signed-off-by: Abel Vesa --- drivers/phy/qualcomm/Kconfig | 9 + drivers/phy/qualcomm/Makefile | 1 + .../phy/qualcomm/phy-qcom-eusb2-repeater.c | 278 ++++++++++++++++++ 3 files changed, 288 insertions(+) create mode 100644 drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c diff --git a/drivers/phy/qualcomm/Kconfig b/drivers/phy/qualcomm/Kconfig index 27b5a2a3637d..a70631b04522 100644 --- a/drivers/phy/qualcomm/Kconfig +++ b/drivers/phy/qualcomm/Kconfig @@ -79,6 +79,15 @@ config PHY_QCOM_SNPS_EUSB2 chipsets. The PHY is paired with a Synopsys DWC3 USB controller on Qualcomm SOCs. +config PHY_QCOM_EUSB2_REPEATER + tristate "Qualcomm SNPS eUSB2 Repeater Driver" + depends on OF && (ARCH_QCOM || COMPILE_TEST) + select GENERIC_PHY + help + Enable support for the USB high-speed SNPS eUSB2 repeater on Qualcomm + PMICs. The repeater is paired with a Synopsys eUSB2 Phy + on Qualcomm SOCs. + config PHY_QCOM_USB_HS tristate "Qualcomm USB HS PHY module" depends on USB_ULPI_BUS diff --git a/drivers/phy/qualcomm/Makefile b/drivers/phy/qualcomm/Makefile index 3ee118f4dfc7..7dcba9537b69 100644 --- a/drivers/phy/qualcomm/Makefile +++ b/drivers/phy/qualcomm/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_PHY_QCOM_QMP) += \ obj-$(CONFIG_PHY_QCOM_QUSB2) += phy-qcom-qusb2.o obj-$(CONFIG_PHY_QCOM_SNPS_EUSB2) += phy-qcom-snps-eusb2.o +obj-$(CONFIG_PHY_QCOM_EUSB2_REPEATER) += phy-qcom-eusb2-repeater.o obj-$(CONFIG_PHY_QCOM_USB_HS) += phy-qcom-usb-hs.o obj-$(CONFIG_PHY_QCOM_USB_HSIC) += phy-qcom-usb-hsic.o obj-$(CONFIG_PHY_QCOM_USB_HS_28NM) += phy-qcom-usb-hs-28nm.o diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c new file mode 100644 index 000000000000..f7f822f2973f --- /dev/null +++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c @@ -0,0 +1,278 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2023, Linaro Limited + */ + +#include +#include +#include +#include +#include +#include +#include + +/* eUSB2 status registers */ +#define EUSB2_RPTR_STATUS 0x08 +#define RPTR_OK BIT(7) + +/* eUSB2 control registers */ +#define EUSB2_EN_CTL1 0x46 +#define EUSB2_RPTR_EN BIT(7) + +#define PHY_HOST_MODE BIT(0) +#define EUSB2_FORCE_EN_5 0xE8 +#define F_CLK_19P2M_EN BIT(6) +#define F_CLK_19P2M_EN_SHIFT 6 + +#define EUSB2_FORCE_VAL_5 0xED +#define V_CLK_19P2M_EN BIT(6) +#define V_CLK_19P2M_EN_SHIFT 6 + +#define EUSB2_TUNE_IUSB2 0x51 +#define EUSB2_TUNE_SQUELCH_U 0x54 +#define EUSB2_TUNE_USB2_PREEM 0x57 + +#define QCOM_EUSB2_REPEATER_INIT_CFG(o, v) \ + { \ + .offset = o, \ + .val = v, \ + } + +enum repeater_mode { + REPEATER_HOST_MODE, + REPEATER_PERIPH_MODE, +}; + +struct eusb2_repeater_init_tbl { + unsigned int offset; + unsigned int val; +}; + +struct eusb2_repeater_cfg { + const struct eusb2_repeater_init_tbl *init_tbl; + int init_tbl_num; + /* regulators to be requested */ + const char * const *vreg_list; + int num_vregs; +}; + +struct eusb2_repeater { + struct device *dev; + struct regmap *regmap; + struct phy *phy; + struct regulator_bulk_data *vregs; + const struct eusb2_repeater_cfg *cfg; + u16 base; + enum phy_mode mode; +}; + +static const char * const pm8550b_vreg_l[] = { + "vdd18", "vdd3", +}; + +static const struct eusb2_repeater_init_tbl pm8550b_init_tbl[] = { + QCOM_EUSB2_REPEATER_INIT_CFG(EUSB2_TUNE_IUSB2, 0x8), + QCOM_EUSB2_REPEATER_INIT_CFG(EUSB2_TUNE_SQUELCH_U, 0x3), + QCOM_EUSB2_REPEATER_INIT_CFG(EUSB2_TUNE_USB2_PREEM, 0x5), +}; + +static const struct eusb2_repeater_cfg pm8550b_eusb2_cfg = { + .init_tbl = pm8550b_init_tbl, + .init_tbl_num = ARRAY_SIZE(pm8550b_init_tbl), + .vreg_list = pm8550b_vreg_l, + .num_vregs = ARRAY_SIZE(pm8550b_vreg_l), +}; + +static int eusb2_repeater_init_vregs(struct eusb2_repeater *rptr) +{ + int num = rptr->cfg->num_vregs; + struct device *dev = rptr->dev; + int i; + + rptr->vregs = devm_kcalloc(dev, num, sizeof(*rptr->vregs), GFP_KERNEL); + if (!rptr->vregs) + return -ENOMEM; + + for (i = 0; i < num; i++) + rptr->vregs[i].supply = rptr->cfg->vreg_list[i]; + + return devm_regulator_bulk_get(dev, num, rptr->vregs); +} + +static int eusb2_repeater_init(struct phy *phy) +{ + struct eusb2_repeater *rptr = phy_get_drvdata(phy); + const struct eusb2_repeater_init_tbl *init_tbl = rptr->cfg->init_tbl; + int num = rptr->cfg->init_tbl_num; + int ret = 0; + u32 val; + int i; + + ret = regulator_bulk_enable(rptr->cfg->num_vregs, rptr->vregs); + if (ret) + return ret; + + regmap_update_bits(rptr->regmap, rptr->base + EUSB2_EN_CTL1, + EUSB2_RPTR_EN, EUSB2_RPTR_EN); + + for (i = 0; i < num; i++) + regmap_update_bits(rptr->regmap, + rptr->base + init_tbl[i].offset, + init_tbl[i].val, init_tbl[i].val); + + ret = regmap_read_poll_timeout(rptr->regmap, + rptr->base + EUSB2_RPTR_STATUS, val, + val & RPTR_OK, 10, 5); + if (ret) + dev_err(rptr->dev, "initialization timed-out\n"); + + return ret; +} + +static int eusb2_repeater_set_mode(struct phy *phy, + enum phy_mode mode, int submode) +{ + struct eusb2_repeater *rptr = phy_get_drvdata(phy); + + switch (mode) { + case PHY_MODE_USB_HOST: + /* + * CM.Lx is prohibited when repeater is already into Lx state as + * per eUSB 1.2 Spec. Below implement software workaround until + * PHY and controller is fixing seen observation. + */ + regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_EN_5, + F_CLK_19P2M_EN, F_CLK_19P2M_EN); + regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_VAL_5, + V_CLK_19P2M_EN, V_CLK_19P2M_EN); + break; + case PHY_MODE_USB_DEVICE: + /* + * In device mode clear host mode related workaround as there + * is no repeater reset available, and enable/disable of + * repeater doesn't clear previous value due to shared + * regulators (say host <-> device mode switch). + */ + regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_EN_5, + F_CLK_19P2M_EN, 0); + regmap_update_bits(rptr->regmap, rptr->base + EUSB2_FORCE_VAL_5, + V_CLK_19P2M_EN, 0); + break; + default: + return -EINVAL; + } + + return 0; +} + +static int eusb2_repeater_exit(struct phy *phy) +{ + struct eusb2_repeater *rptr = phy_get_drvdata(phy); + + return regulator_bulk_disable(rptr->cfg->num_vregs, rptr->vregs); +} + + +static const struct phy_ops eusb2_repeater_ops = { + .init = eusb2_repeater_init, + .exit = eusb2_repeater_exit, + .set_mode = eusb2_repeater_set_mode, + .owner = THIS_MODULE, +}; + +static int eusb2_repeater_probe(struct platform_device *pdev) +{ + struct eusb2_repeater *rptr; + struct device *dev = &pdev->dev; + struct phy_provider *phy_provider; + struct device_node *np; + u32 res; + int ret; + + np = of_node_get(dev->of_node); + + rptr = devm_kzalloc(dev, sizeof(*rptr), GFP_KERNEL); + if (!rptr) + goto err_node_put; + + rptr->dev = dev; + dev_set_drvdata(dev, rptr); + + rptr->cfg = of_device_get_match_data(dev); + if (!rptr->cfg) + goto err_node_put; + + rptr->regmap = dev_get_regmap(dev->parent, NULL); + if (!rptr->regmap) + goto err_node_put; + + ret = of_property_read_u32(np, "reg", &res); + if (ret < 0) + goto err_node_put; + + rptr->base = res; + + ret = eusb2_repeater_init_vregs(rptr); + if (ret < 0) { + dev_err(dev, "unable to get supplies\n"); + goto err_node_put; + } + + rptr->phy = devm_phy_create(dev, np, &eusb2_repeater_ops); + if (IS_ERR(rptr->phy)) { + ret = PTR_ERR(rptr->phy); + dev_err(dev, "failed to create PHY: %d\n", ret); + goto err_node_put; + } + + phy_set_drvdata(rptr->phy, rptr); + + of_node_put(np); + + phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); + if (IS_ERR(phy_provider)) + return PTR_ERR(phy_provider); + + dev_info(dev, "Registered Qcom-eUSB2 repeater\n"); + + return 0; + +err_node_put: + of_node_put(np); + return ret; +} + +static int eusb2_repeater_remove(struct platform_device *pdev) +{ + struct eusb2_repeater *rptr = platform_get_drvdata(pdev); + + if (!rptr) + return 0; + + eusb2_repeater_exit(rptr->phy); + return 0; +} + + +static const struct of_device_id eusb2_repeater_of_match_table[] = { + { + .compatible = "qcom,pm8550b-eusb2-repeater", + .data = &pm8550b_eusb2_cfg, + }, + { }, +}; +MODULE_DEVICE_TABLE(of, eusb2_repeater_of_match_table); + +static struct platform_driver eusb2_repeater_driver = { + .probe = eusb2_repeater_probe, + .remove = eusb2_repeater_remove, + .driver = { + .name = "qcom-eusb2-repeater", + .of_match_table = eusb2_repeater_of_match_table, + }, +}; + +module_platform_driver(eusb2_repeater_driver); + +MODULE_DESCRIPTION("Qualcomm PMIC eUSB2 Repeater driver"); +MODULE_LICENSE("GPL v2"); From patchwork Thu Feb 2 13:38:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13126079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5DD8C05027 for ; Thu, 2 Feb 2023 13:38:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=D3mqeiamwLXow8A4c+o4XZUAyexuLQ+oTXMC4B3I8xQ=; b=W+b6qfaj9RRMd6 d373mN07XmSpnNIRBOoTSzkEElOzSwYT+pArRCqpFfh0k9ZPwdqQ3tmfUr1spl+P6V1XHnhPPVTdX 2C/QY5PBGYfyu/ANFZWn4VONVxLIiXN71mCabAF+K6PfWB/PBm+6+5cR3dnm/8YfWCR6rfLhhxRIe aTONtcbm0voTXrxnuIyKdC1SJz8jbw81E8bXGOBGeytWyRzJllYnBismG5WLj7E4QzQMluEjkyMAt 64B1UdtnaTXyi8Ftt/0gpmUJDVtbsmt52ohHc83XY36MWrG27tDwpo168MsaWnoDbZyVjNou+AmXp YiRTU31cGpEQxtr39N1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnR-00G2ZG-C0; Thu, 02 Feb 2023 13:38:37 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnP-00G2Wj-6C for linux-phy@lists.infradead.org; Thu, 02 Feb 2023 13:38:36 +0000 Received: by mail-wm1-x32c.google.com with SMTP id c10-20020a05600c0a4a00b003db0636ff84so1442008wmq.0 for ; Thu, 02 Feb 2023 05:38:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Muj0r5cS4dp6xC+TSUuMKKW1WBd70kMvR15aSo0LNU=; b=GuFGabF19GTVDUCzru/UnbKSvOS9B/ICt6k9ACww5VSGO3p0hFqaTrHma6/TGzYSoN NYiaq9tSFPdR9ThkGaW4oVbEVxekMtXvSDApd4/FFjMJh2b+FhR+M1BINi/SkWKb6rTb GmDUxS9r7WTuunBrDRWhQ2bzAsaznuZO36UZahYbZpexZyfWnasIOdmx6YaG6a5qFb+r xREZc3YRSB1vhAz2fyZpLG6yMgBnxgEUUlvEkG/xguXU2a1LCffINx5jEbRYWHl7mvsF YhpcSYiKOsBKpDNubjWgVPgGlLczGa9iDzFVTNWgdHjNUFKdP5QLAkUz5QMk61ApNb1T SWvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Muj0r5cS4dp6xC+TSUuMKKW1WBd70kMvR15aSo0LNU=; b=fUNxquFCUhb1GhpsF0ibJFyKyS3ejm+jjT4u1dj6VQszK0y6b0vs2f0fgnHMpJI9gT 2QVmeGKV8rc9us964FqLi1mtw99arLZDQLw05yZRm3BPbTo63eQYCRntqjOktjTUkkHC 6DGulQH/sgdVgTEgOd8ArYqCLs7Llb7I09vHc3nSypi0Fs+Yy/7cf228Mt1UmTALpD8V HmTHgveebTEM+g34Q0Ke+AcOF0/QuXX0NdX/cUeVC5jhTRKWB536Xgd5oqaz0CnzhAL9 Pwmj3D4EQwAye2U8uy/xPxaLBV/fzd/UkiXAhn0E/QclVCiAAT66A6Mz5jA/gG3BIAR7 7I0Q== X-Gm-Message-State: AO0yUKUwBKa9Mcpzr7wGdQPS6yswLatEQlnXE/QqAeB/48I/zXv2Xsj/ rz9BQ5Mp1vjepGPD5RZ38BALog== X-Google-Smtp-Source: AK7set8R4MkWRBydiDyX6RpsFozs0TBOeL0BRfzRO4g6tMz1cuywexaGfc1xJsDWiBomfrRoXqdnBA== X-Received: by 2002:a05:600c:6018:b0:3dc:1ad6:55fd with SMTP id az24-20020a05600c601800b003dc1ad655fdmr5936251wmb.32.1675345112971; Thu, 02 Feb 2023 05:38:32 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c364a00b003daf7721bb3sm4672657wmq.12.2023.02.02.05.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:38:32 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org, Neil Armstrong Subject: [RFC v3 5/7] phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater Date: Thu, 2 Feb 2023 15:38:14 +0200 Message-Id: <20230202133816.4026990-6-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202133816.4026990-1-abel.vesa@linaro.org> References: <20230202133816.4026990-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_053835_252089_3313A510 X-CRM114-Status: GOOD ( 14.68 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Neil Armstrong For USB 2.0 compliance, eUSB2 needs a repeater. The PHY needs to initialize and reset it. So add repeater support Co-developed-by: Abel Vesa Signed-off-by: Abel Vesa Signed-off-by: Neil Armstrong --- drivers/phy/qualcomm/phy-qcom-snps-eusb2.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c b/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c index 23ec162cc3bd..8d972d49732b 100644 --- a/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c +++ b/drivers/phy/qualcomm/phy-qcom-snps-eusb2.c @@ -128,6 +128,8 @@ struct qcom_snps_eusb2_hsphy { struct regulator_bulk_data vregs[EUSB2_NUM_VREGS]; enum phy_mode mode; + + struct phy *repeater; }; static int qcom_snps_eusb2_hsphy_set_mode(struct phy *p, enum phy_mode mode, int submode) @@ -136,7 +138,7 @@ static int qcom_snps_eusb2_hsphy_set_mode(struct phy *p, enum phy_mode mode, int phy->mode = mode; - return 0; + return phy_set_mode_ext(phy->repeater, mode, submode); } static void qcom_snps_eusb2_hsphy_write_mask(void __iomem *base, u32 offset, @@ -235,6 +237,12 @@ static int qcom_snps_eusb2_hsphy_init(struct phy *p) if (ret) return ret; + ret = phy_init(phy->repeater); + if (ret) { + dev_err(&p->dev, "repeater init failed. %d\n", ret); + goto disable_vreg; + } + ret = clk_prepare_enable(phy->ref_clk); if (ret) { dev_err(&p->dev, "failed to enable ref clock, %d\n", ret); @@ -342,6 +350,8 @@ static int qcom_snps_eusb2_hsphy_exit(struct phy *p) regulator_bulk_disable(ARRAY_SIZE(phy->vregs), phy->vregs); + phy_exit(phy->repeater); + return 0; } @@ -386,6 +396,12 @@ static int qcom_snps_eusb2_hsphy_probe(struct platform_device *pdev) if (ret) return dev_err_probe(dev, ret, "failed to get regulator supplies\n"); + + phy->repeater = devm_phy_get(dev, "eusb2-repeater"); + if (IS_ERR(phy->repeater)) + return dev_err_probe(dev, PTR_ERR(phy->repeater), + "failed to get repeater\n"); + generic_phy = devm_phy_create(dev, NULL, &qcom_snps_eusb2_hsphy_ops); if (IS_ERR(generic_phy)) { dev_err(dev, "failed to create phy %d\n", ret); From patchwork Thu Feb 2 13:38:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13126080 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0BA5CC636D6 for ; Thu, 2 Feb 2023 13:38:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IeXkjcnZQL3/Js10JfUZwfJMj1DSI1qUeTL84Ntn9Lw=; b=GNvoiHy+Czoo1i zZ0VfPBTyJWNf9D2527EJwbTtlnUPOHvKQeSEAJcWD+/KZJLl9K4thQOo8U5NIFV8etjF4dlphqT5 KY1O31xfpIShrXMrlMRC0q1DXzdHj77me2dat2HYH4jI0w5pt/jBjQafoWiV2ibYn4Aryp2LcFDhl 6IeysvPPXtxmrXiULnANvq4LoRfFU456Cxduj9CDKIXI10IrDusd+qSR9MmRs41kn2UDzNqLWBy5P saEgPlpe3LVGgAhlp/KXNtu+Z+tE1HZDBQi7kseEE73/FzmqJSeOLMPWbaFwNqaMW4Gb2urkw65FM k+MyBnbvwRKgJgOR0U1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnS-00G2Zl-Fo; Thu, 02 Feb 2023 13:38:38 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnP-00G2XB-Ns for linux-phy@lists.infradead.org; Thu, 02 Feb 2023 13:38:36 +0000 Received: by mail-wm1-x32f.google.com with SMTP id bg13-20020a05600c3c8d00b003d9712b29d2so3751094wmb.2 for ; Thu, 02 Feb 2023 05:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RF2YyGY2PogpnFtO0lOlawE2OSglZRNn+XgKRaj3V+o=; b=B493GU/HRGCE8RL1MHvOnSUSqvtSnxbtJL9m8fVcRc/vQZCUyKjIfw+gg1ks9KsInD FSkPV/E/cm+OMAHpgokPniOm0vKmEr7gcFwMbqnMaZ4U3Cl9TZaffN1SY7Eh3m8EVXRF I/l5W8hHGTnyn9rRUeWeIN+LzEECgQOoAFiQ4jWfJVfYCBjgW+8NerlXiAXVdIGGqEEe tAm/XmQAveY/FQLanOeVnQCL3bTMcTcbfKDx44oU0hJJ+fkUIgIpvS3gX18p7yyEEd1S CXDBd3yQVL16zyLhWLvoySJcm9qgKERq6GmOZ4RFtAvwvhSbrK2Z8B5IB2Vn7PFXWY75 XMZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RF2YyGY2PogpnFtO0lOlawE2OSglZRNn+XgKRaj3V+o=; b=ZF77j8+KiAY5AHuOFRI82N3mYMJmkffYtSXwgpqktGau6DISO5BkrTYuERsF1eCJ/r 7rPk//yq9OiBY0RhcYKH0O3NXOY/5LtFYQ1OhJJcxd19snraakMmrmCmw/WbF5LTfZYq /ZgsSxEdtINkET0q3jhQPD0bx1gCsw3i8ikkDrTeNcEGfBgULls2jBNRIz9uoZJtzL6u Evgs7mQymnPUWrHYAKhPg+pe9klPjnQKqtWiewzFFUbyBQQldqaBPCIT17FpnOq0OiR/ b4LnTf8oY796rurBbYEtcAhnKZnVWLPDGBdFSGZ/amcTK2Qo2XV6WEQcDEer3VJ8h/4K RsFg== X-Gm-Message-State: AO0yUKU/sdvemWqWuNNRG2MNVX+eXq0WU74wdedmUhs4d2kEYF72xwIQ qA8a7x0TGXPsy3sHssXrowhsOg== X-Google-Smtp-Source: AK7set/3dxyCvIKg/OxhNHZc2h8pfCZ3eo/m5fmRMmCuySaaZQRcSkDBXrbDfs60V1JHNXj6RsCgfA== X-Received: by 2002:a7b:c38f:0:b0:3dc:d5b:5f6a with SMTP id s15-20020a7bc38f000000b003dc0d5b5f6amr6074422wmj.30.1675345114293; Thu, 02 Feb 2023 05:38:34 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c364a00b003daf7721bb3sm4672657wmq.12.2023.02.02.05.38.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:38:33 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org, Neil Armstrong Subject: [RFC v3 6/7] arm64: dts: qcom: pm8550b: Add eUSB2 repeater node Date: Thu, 2 Feb 2023 15:38:15 +0200 Message-Id: <20230202133816.4026990-7-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202133816.4026990-1-abel.vesa@linaro.org> References: <20230202133816.4026990-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_053835_793705_3A9FDA93 X-CRM114-Status: UNSURE ( 9.32 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Neil Armstrong Add nodes for the eUSB2 repeater found on the pm8550b SPMI PMIC. Signed-off-by: Neil Armstrong Signed-off-by: Abel Vesa --- arch/arm64/boot/dts/qcom/pm8550b.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/pm8550b.dtsi b/arch/arm64/boot/dts/qcom/pm8550b.dtsi index 16bcfb64d735..72609f31c890 100644 --- a/arch/arm64/boot/dts/qcom/pm8550b.dtsi +++ b/arch/arm64/boot/dts/qcom/pm8550b.dtsi @@ -55,5 +55,11 @@ pm8550b_gpios: gpio@8800 { interrupt-controller; #interrupt-cells = <2>; }; + + pm8550b_eusb2_repeater: phy@fd00 { + compatible = "qcom,pm8550b-eusb2-repeater"; + reg = <0xfd00>; + #phy-cells = <0>; + }; }; }; From patchwork Thu Feb 2 13:38:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13126081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BB87C636D4 for ; Thu, 2 Feb 2023 13:38:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IYuli1htlE2ACq/v0/N2AnZo4C30DikjrSXg0KHEQns=; b=LCv65vCaY/86Pn R+Pxo2dCptfjfcsj+6tPCsqIYDZOlv77d/hUgF0f3ASWhfcGMyPaG5Gpxjbu08XfCJ5LxQ3Ef6V4J i1vKQAPjMu+pd8eRRoXFaDtCyYLUuYVqJdyR1CkFE/C0mwzjCZbRlqPeuL0jUYQv0dH/1WGnkLO9T zkeNERVe7R6a7ZNi808/GB8pZNx651+NVXkbKhLo95+O6gN7ACtEiRpwVLn1HQlnk1Maw3At0q3qJ WmbhMDc5uzFJ+a7EW8CcHEbq07aHIZs3tp5bs/CXwfIW0dGEpMIwbPW3UsL1CHMWXTsKzaLnOM9FI ZN+RIq1MEwOcD0PPuGAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnT-00G2aU-Jq; Thu, 02 Feb 2023 13:38:39 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNZnQ-00G2YB-TX for linux-phy@lists.infradead.org; Thu, 02 Feb 2023 13:38:38 +0000 Received: by mail-wm1-x32e.google.com with SMTP id q8so1403431wmo.5 for ; Thu, 02 Feb 2023 05:38:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=7KwClGhcR7TdVaebtx7GjNjFtUcNjguDWac1KgeKIdY=; b=sirCRHdUNdmk19NjuwIv+KzZf/T/MflaVX5bG7x8jouHLbSLJM/uG+QxsjCo4xZ3hY 1mC/m9W5hCJDtPt2LxHwuuRe4YF2GY/af9llJZU8/EbD60AXQChgZKZ+6eVQIp5Qi2lt iZmmIQmiA3/EDKFUZjMOBtnHzs4LfJnj5EoFQBgYD7Y9GZU7CPQfPPgvvD0PCrvqZICN Y8fQ0nWn8ZdU9HPlheAEQYvNetcKY5YssqYayjS2VTsm3fP1ADHNDYF8BL2orq7hLym1 6ddVOX5BIrKwaw9No1kxBC50VOl9YG5HivL/LsIeOuJ/BfEtxGO/pYyff+c0ctfJOuuw 34qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7KwClGhcR7TdVaebtx7GjNjFtUcNjguDWac1KgeKIdY=; b=5WckYkowjZyUMuws6oY4WZPGXVY4J5j9fEmICqeqlNRhW1HJGSgAe9y3tyrwG4zlRT q2l+JcOHCF76sZPuIhM+9OWF6hWxvOO4pw0LP2qenDPnofJdhC+jGlUSMzkM1oMvmYsL HltTqo+SbZo7SpCpki5ddnpMPPe71D/VqRb6Rd3WwdljnyWuIsqxr8Bp/WYnQWrXq0B3 2scjdxKaCmEbYzhnpzVhoHrV7BNJYBWfAVZkzvUC6e1NdvdXhhUgSDOD8gd7kop2l3AJ qHiE9jYSaUy2h1/azTJIATjQP5DyusY82ztrJpeyx6xAhd3igRR32aDxv7i3zANs96I+ 9lfA== X-Gm-Message-State: AO0yUKWzexRJ7+k0l6UFqJKwWboEFMvr020jbQ/LD38U8wH9H90MFQFp PuMvF/LEjxsMf/2VJX93xPY74w== X-Google-Smtp-Source: AK7set+PfKRoh/N122x8wKuwZjQQWzOVhywZf4QE6geVIDyMtQDdYSvmqsewNAcIn2OovgUXp9arlA== X-Received: by 2002:a05:600c:3b26:b0:3de:3ee3:4f6f with SMTP id m38-20020a05600c3b2600b003de3ee34f6fmr6056336wms.8.1675345115442; Thu, 02 Feb 2023 05:38:35 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id y10-20020a05600c364a00b003daf7721bb3sm4672657wmq.12.2023.02.02.05.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 05:38:35 -0800 (PST) From: Abel Vesa To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Lee Jones , Rob Herring , Krzysztof Kozlowski , "vkoul@kernel.org" , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , linux-phy@lists.infradead.org Subject: [RFC v3 7/7] arm64: dts: qcom: sm8550-mtp: Add eUSB2 repeater node Date: Thu, 2 Feb 2023 15:38:16 +0200 Message-Id: <20230202133816.4026990-8-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230202133816.4026990-1-abel.vesa@linaro.org> References: <20230202133816.4026990-1-abel.vesa@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_053836_967253_90F39EC6 X-CRM114-Status: UNSURE ( 9.51 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Add the PMIC eUSB2 repeater node and add the usb-repeater property to the eUSB2 PHY to allow it to be controlled by the PHY driver. Signed-off-by: Abel Vesa --- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts index 03862132fe41..9aaddafa0088 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -456,6 +456,11 @@ sdc2_card_det_n: sdc2-card-det-state { }; }; +&pm8550b_eusb2_repeater { + vdd18-supply = <&vreg_l15b_1p8>; + vdd3-supply = <&vreg_l5b_3p1>; +}; + &qupv3_id_0 { status = "okay"; }; @@ -562,6 +567,9 @@ &usb_1_hsphy { vdd-supply = <&vreg_l1e_0p88>; vdda12-supply = <&vreg_l3e_1p2>; + phys = <&pm8550b_eusb2_repeater>; + phy-names = "eusb2-repeater"; + status = "okay"; };