From patchwork Thu Jan 26 13:59:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13117163 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 2385AC05027 for ; Thu, 26 Jan 2023 13:59:24 +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=ICMkf/Ju+MZm1X +i2O49VYLOgyfPr7rY+IEbN7mdzYLeERyHMwiHl4RgHhoiSetWqUF9r47c6bCPdrkqwZE57Rj7Hmm SjI4e9WvlJRG4E1utN2n23qdJnVPv8S8ROciX76U8p3740bdGQyeuMLupJp5kVAnF8PMndf0X3gbI kl5swcSIiGSwbZdFOJmc//kjanXoi9c3eXOyz8adPt6qQhsIFzmSct0iCpJ/J75F0Xcwa2hoWBjLH P6euYgtR5kt9rQQjjInlIzLrEtdp9sZ0gmDF3wri8aG3l36WJAZuPU/1sgcExK17QWWJlLP6tscWk h5ddBakMJnLy5RP6DLjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mh-00B5Sk-C7; Thu, 26 Jan 2023 13:59:23 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mc-00B5Nx-Vq for linux-phy@lists.infradead.org; Thu, 26 Jan 2023 13:59:20 +0000 Received: by mail-wr1-x435.google.com with SMTP id d14so1847517wrr.9 for ; Thu, 26 Jan 2023 05:59:16 -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=tVjYD9WT4Va5NNtVX6RP6snlZAIg/T/dWyfEhIobdh59a76Za3x00mWJlt5izQ59aL 4Us4qHv+WQfqOA/hSrtIZOtea6eBCPM+qE1xSXjwGW0dJqNZcS85er8RKJ5o9GphJATE Az/dfucI8PmLzih7dG41iGvFwrDDVKg/O7RY7gyStHd0VmHmE0bn9hMdhTot4PpvFBP+ Bkb6Cq8jwadM1USTHeI5tC8XzaZWGM+4NTwR7pXXB3+MT6CwJNK4jbjgx6exnXG/q5hR L6UIcsz8kchWk0InEm94v72DzMuMwSoB3vxekx1FvB1aBnd4hLryUQ1B86SRGGwabKmW VP7w== 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=p7sd4sozv0R6Np0OOB0zsGFOGck6K08LNcD3oZoUjRpLt+Iprx3m930LSolhwY9cbD Ro/GKoBYvW9HpE4lSIYv54g2xjKjhw5axLbJ5ykOFHeIcVowusKEZEkos2R/Rtf0nYVJ cx/5Pqr/OHfsxSEBXzdATIRHJmEPBHCWVOoBe3mq4yxbFLus20KpFGN7og7NJchqK/hA dyiyrcpnnGSV5V+qcPI8HbdTQrm73bILAArDHS6s6gDQZnZHpY9Y8g7E7Y3z/MSQ1X6f gzBITprm6ezeBA2eL8hS29l4qSxEM0i07xfsfTZLoFDQFhaiiTCB22SgNOW/VrDlvQ55 ZskQ== X-Gm-Message-State: AFqh2kqeYjBsHI8c9TMKdQbYEs4QpN9T93wfY4nrwn5RmgWiPw2Lb/6H l20HngqWaNfi3ntkCvyucJm2hA== X-Google-Smtp-Source: AMrXdXsDK3DWCPIRP6iehIYsLBlDFOqDTH3kObw33/RQ4aaajCqfjj+naQDb3pmd097JUAdNv7HtJQ== X-Received: by 2002:a05:6000:3c9:b0:2bc:7f32:e6ae with SMTP id b9-20020a05600003c900b002bc7f32e6aemr30290460wrg.64.1674741555300; Thu, 26 Jan 2023 05:59:15 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id l15-20020a5d6d8f000000b002bfb37497a8sm1594067wrs.31.2023.01.26.05.59.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:59:14 -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 v2 1/7] dt-bindings: phy: Add qcom,snps-eusb2-repeater schema file Date: Thu, 26 Jan 2023 15:59:03 +0200 Message-Id: <20230126135909.1624890-2-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126135909.1624890-1-abel.vesa@linaro.org> References: <20230126135909.1624890-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-20230126_055919_065075_E5470F13 X-CRM114-Status: GOOD ( 12.44 ) 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 Jan 26 13:59:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13117164 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 8C8F9C54E94 for ; Thu, 26 Jan 2023 13:59:26 +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=m/G9i4yKYIIcA7MyAVVijZij5Tsj7XrMutCi4fH5bVQ=; b=kDzz1kGUbLMtxJ HlAjQB68Bn8AFjPIiurAzVrN60iLnfeNhyrvwTyjx0WlJ3lbb39FdO7LaBOofzo9t44KKoXg09rQe Ouy33cjMawZGabp4jpTFmDGAXG3v+PbzRig9E7vLtdRg27cWgaaFt1y74TgUkiYz9nONGvNOmg/EU XAPILl/UKfnSOSQP3Fp99TjHUoXrOolHdLpjc2btScTuTFgDaLV2IFIOD0qLDx091njwjFsZ62D30 emkDQalzCT4haooYgTYali119LvTEWRPHKTc84B6Jmrn+mnk3ibK37NUoEkCCto7W72KOKwTRtYWP 7avPSFd34fcCeWXW+8+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mj-00B5UV-LL; Thu, 26 Jan 2023 13:59:25 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2me-00B5OY-7F for linux-phy@lists.infradead.org; Thu, 26 Jan 2023 13:59:21 +0000 Received: by mail-wr1-x42b.google.com with SMTP id n7so1860179wrx.5 for ; Thu, 26 Jan 2023 05:59:17 -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=JwXf2047+hi/AeAqI5m/w1YUk4KylbD2BCgLR+1i3CE=; b=dSXKZWJcgPLKm97z6OFwwrz6aIf1Vx+18WpyiKVwo8JaUo0wJK8s1GqdhgWKhzJgBC Dd0PvI1W3PsQ5JVMvs7W+DpzAqeexYc6SGD5jGkqth4Ui7pQFH5smH+9fEy36obFB5/d l1dSrW4jT1WLZnPgX9orXg/0UZ6Sj6/ASatTi+MxOTeyonMosiNIAQIeyREsSzb7Ru61 22HSlRuwfrXWLO+QDnybLmmKaEvTfTxTt4FqhfqlyJryu0Z/Kna8RGreyZexKrfawqOb KHIEIVFj04Arc1CCos8KloHZ5/GSdVr3LnyXk+nNHjKruCDDj032COQjThxkbqXP34L2 9b2Q== 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=JwXf2047+hi/AeAqI5m/w1YUk4KylbD2BCgLR+1i3CE=; b=KE1Li7omzIDjDX5E+a0bF/KApcGBZF6HiZmK53/lrAdXRNrIeDGbcKftv6Wbi2LTgq Axnz+KyCWKA3hsRq0QbOdGntzh2MJv9KwWIDlipeeuArMjRjylMsPH4rnp/+40EZHyA+ gfha715159NFmRcxPY0BYGoW6esA0qo27B6HaMRlr6b8ZWydarYSm2j6mLpX25xPkWXS 7MUApZ8HtAH0Z65/9pGa3Ex/8IVSkzEw2IL+5d5yC18P5c3K4jUmDQ3qkdJSPJwdKphS zDdmrln9T1IIBILva9hOauNaEfT0jPBIgMP7gBXFcMCmf+qPevh7UbJvSMTciNVzjzjS Amuw== X-Gm-Message-State: AFqh2krD6BgYwW03ccQFzrByIyJNteqQ8BSvqzoe+R/fw+HFABVtFZHU 5REilWqU/GeDISUMagLJGCmWjoZO8AdmWiMt X-Google-Smtp-Source: AMrXdXv1sxQUxwm9hhjE+Mpz3hy15gKvu4QtgIEtWRnt22nyf7jTGEttFz2syjCVSyAg6tHiucbzDg== X-Received: by 2002:adf:e18c:0:b0:2be:493f:3b34 with SMTP id az12-20020adfe18c000000b002be493f3b34mr29630818wrb.26.1674741556524; Thu, 26 Jan 2023 05:59:16 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id l15-20020a5d6d8f000000b002bfb37497a8sm1594067wrs.31.2023.01.26.05.59.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:59:16 -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 v2 2/7] dt-bindings: phy: qcom,snps-eusb2-repeater: Add phy related properties Date: Thu, 26 Jan 2023 15:59:04 +0200 Message-Id: <20230126135909.1624890-3-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126135909.1624890-1-abel.vesa@linaro.org> References: <20230126135909.1624890-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-20230126_055920_293088_67F35440 X-CRM114-Status: UNSURE ( 8.67 ) 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 49a5dad486c2..3279ed0fd44f 100644 --- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml @@ -36,6 +36,15 @@ properties: description: Phandle to reset to phy block. + 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 Jan 26 13:59:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13117165 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 4A715C61D97 for ; Thu, 26 Jan 2023 13:59:27 +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=BZS4GGQTtR21r+ y5m+66+ldPdUSDLsBmqq5/4+5Tq2xdjW4gapO0kS0E8cuC9zy9HMjxuCmEIoh8s2hAvVpckiGWqmD 8lw9fidwIPf/q8aaU98OwhZHZ99agYXxLIw60vO0mwqwlkBVPuNxFY+S4HCo6xql6bf7MFJqpRvyi prl4v0Dj6+d10Qoad5HghuPb2/e7f7//Mf2gkrYTUWwksAyb1KgJMxG621+AKRjBZBDy1QZGS7Sge zURalTlotwoptTOF0JyEtASwJde/pInwV4xhPmT6CO6XCiDe6PW1IWOgzvrAfjQNWt1iQF6GzwQQw oGfZ6YV95VbThRupxpQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mk-00B5Uu-2a; Thu, 26 Jan 2023 13:59:26 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mf-00B5PL-Hx for linux-phy@lists.infradead.org; Thu, 26 Jan 2023 13:59:23 +0000 Received: by mail-wr1-x432.google.com with SMTP id h12so1840686wrv.10 for ; Thu, 26 Jan 2023 05:59:19 -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=IWzNaHz5W/tmUnW9Hf4TF4SeahLycM87b/32og4hoTlNnMxtsGbBvj2pgWe580pbA6 NG2hBXvHBVfg9bJVuuEg8VsTYaH+5K46vmwhs3m+RkcDZFiHQlN7h+k43BX9h3z/Qwlh 8E1mLcjHbb2kS1ybYdVPiPyQsKApiLocOC5pexqBIjbVE5Uvq9Btxw8GEoHGWruPVqFP d2Y/WAZ0LfCzHDoeelDlL6eT/otDwdsgQozsqO0eKJZ6T45BCK81yeHo0lY1kUk513B9 5yzzS64JfwUnaDsdFFMquQ4BHmQg4py42nB65Cy6VNg4nJUyZCpPghDGwwAeaX/dXAf7 frQQ== 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=7aCP/f9lwN5h3STvh3TFlftKv8IV3x/PhTpd8HxsO7s3lDRZFONuzMXBeUZ2ykeyYW 2Rr/me92K3tEDta1hInXjdI1MzhxdsVSvDaQrmAaFLTbvQP4v5B3tsDzi7AvEKkYBWtd HzYQ7tWck88SQt1eC7RLNEMY6VlvyJohODPWVtYo34oiyd9IcyOcBS19mFJb7S7yjAUk qDwk8axmRcsj7aVh6VJbf8t1IVM40sq397Mlh1arFYwtx1xyn4NVKPAuyc/vtfbxCLGS O2prxjzrJEIDYoPLby0Xz4dD770lKBw7q1CQtZYO5ZDxOgwi1c0NGK2a4L8mrlfMFW05 XMeA== X-Gm-Message-State: AO0yUKXbmRVQuz64WbrvWI06vcT4I/81ya3U2phkVN2OgVVtkJQbLeSe /U9vf10keG0jKVc3h7e0edoPTA== X-Google-Smtp-Source: AK7set8FggxXcVZ9bPoTKpa6BTjp5VcePXjKwDkgSRvp/bmVaGp9bs2/Grj6AF+6XjnS6/2VtV91Pg== X-Received: by 2002:a5d:6dd2:0:b0:2bf:b0e6:f463 with SMTP id d18-20020a5d6dd2000000b002bfb0e6f463mr8183168wrz.13.1674741557794; Thu, 26 Jan 2023 05:59:17 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id l15-20020a5d6d8f000000b002bfb37497a8sm1594067wrs.31.2023.01.26.05.59.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:59:17 -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 v2 3/7] dt-bindings: mfd: qcom,spmi-pmic: Add pattern property for phy Date: Thu, 26 Jan 2023 15:59:05 +0200 Message-Id: <20230126135909.1624890-4-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126135909.1624890-1-abel.vesa@linaro.org> References: <20230126135909.1624890-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-20230126_055921_665590_DA3C9787 X-CRM114-Status: UNSURE ( 8.92 ) 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 Jan 26 13:59:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13117166 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 C66EBC05027 for ; Thu, 26 Jan 2023 13:59:27 +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=22uPFFjSFVHEfS zR8yQWwHCc1sbsHSyzuxNwZkYTSdJEiqO6MJVgGLBnLAd+c5EhjBMVoKT1tQXf3wDo6MNIbVQVWaU Yzm0Al/hIXtdmPPsuso7iZtcRUQkeCC3t0KLTGp1VuzJzzrC5DTcJSAHy8zvhQUF//K3kfqUx+l+t 6dMVH4MXlHvwoXKKm8trfnOTBDExkbBRanJYxc3bFbtSIsLeuh30u1N3anFm5ekX9FekF3i/cXLe2 k56A/EpSupL5RLvC+6zSRzkq8IWsbNaRnA6uoV3z8eSLgntZHt45wDdwjh2pm6P7irokxJSZ5NzxV gDyp4UB2gw9ge1CCEllg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mk-00B5VN-Dh; Thu, 26 Jan 2023 13:59:26 +0000 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mf-00B5QH-J3 for linux-phy@lists.infradead.org; Thu, 26 Jan 2023 13:59:23 +0000 Received: by mail-wr1-x432.google.com with SMTP id n7so1860288wrx.5 for ; Thu, 26 Jan 2023 05:59:20 -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=Fxn+ccgQ4O9LfR2B3l48Nq/sIWemubk7E1MLijX2Jv/m6uN37ZpbI9pffojoaHL6q+ Zp/nbnKLr2dbATJSVWFs0BY4TWthCJxXNfrAxX5JyECES2L1XzT+RUHm+zVRh4iyMu4m xc2EY749vIisBfuUBti0To82HKc6Iod4dVE8WbSD1zpc2iVhpkRu66LJq6InboWzcsOs MEfm9xbsAsj9ZLxeG4eER2bS1YYWiNjMZtaRujmZIDU3F8tBrXbOWsgd1dKQBuYTbNaJ Ql17vUKOTIcvodfVijLDVKs1rylcSBcfG9xwSNyKS4N3lXyS25Ut18ixlZinDqnkIwRV 8flg== 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=YgI7/qYMlUHO3Y1uCg2RFFVZAJ/AVL2KXhCkfzDfKqQxWqgn8s8Pm9gzoPKMyKdIa6 uXZP3Rhf0brnIAzQt0H4FIVIma+AE9GWNP9ZJWOKxtOR0WNZ1VicsUtqZcYHj7uSPt5l mC4yYutZUqA7kapaekm8boZ8wVw/9q9SsnupRCOXdbb9ZnXq1eBpu/bq5UqTH2f8nOov PZwfCd22g8uNGSwm9xUyRnHDOlVh7BFW+//Uii25gPbEy+VRCxlAcczl2t2q+xbgAaT1 iad+Og7Q/zMZtUxwVjKf9tOSs9Rfrab5xXoXNupznIfQ07X77YQorJq05CI31ww8Sp5R zsGw== X-Gm-Message-State: AO0yUKXKwQggoqFQJFmyCb1ZVgW3raiiyn4O/8RvxIvs+e5JGKGqlAu6 HZTFcSCsxrzqv7XBiXTB5PMzrQ== X-Google-Smtp-Source: AK7set9Pbp/zd7tWIttgxqOkvLoWRCuDPnq+/GoHKJ8C8Dp54DxR334h8ujRR2ac0cK9nbtN0Gl0ew== X-Received: by 2002:a5d:4b8a:0:b0:2bf:af4a:281f with SMTP id b10-20020a5d4b8a000000b002bfaf4a281fmr8825214wrt.18.1674741559070; Thu, 26 Jan 2023 05:59:19 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id l15-20020a5d6d8f000000b002bfb37497a8sm1594067wrs.31.2023.01.26.05.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:59:18 -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 v2 4/7] phy: qcom: Add QCOM SNPS eUSB2 repeater driver Date: Thu, 26 Jan 2023 15:59:06 +0200 Message-Id: <20230126135909.1624890-5-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126135909.1624890-1-abel.vesa@linaro.org> References: <20230126135909.1624890-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-20230126_055921_691123_B6EB9856 X-CRM114-Status: GOOD ( 27.07 ) 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 Jan 26 13:59:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13117167 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 266F7C61DA2 for ; Thu, 26 Jan 2023 13:59:31 +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=4ybMbkQ4+51cD2HxAV/L0Z/nR5gKsZDp3rxNKWh0voc=; b=R7E5umMFKV6/Ni qDEkHCN7E9sa578xEenUfxHrUIAa0T0Pn5B4eCujTdHOfn3AFoyzp/msthztX5uaadFDR35Ci6fLA 3J9aTlGTFX0I3gwMnSDh2SYE8RnsrVEGkdaGSSxnDj9j7ZdpBd8Pe1mAS0ec+PZrnWmGLINCQCNx+ rlD9ULdLt0xmR8V2DtpHnUcIWSGYKD/45l6ZR5FWsfr/Uq3l52RV89RjY+q031S//97jp/nlnxjQq wBElKgPqZxHuWru1MdcBbWmTpBbsjQ/p/K3uQK2I+d2ZWKt52wxvDbSz0FJOkQrsylpxBmbwiiUs5 Xl+zqLt20om6rd641Qew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mo-00B5XD-9m; Thu, 26 Jan 2023 13:59:30 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mh-00B5R7-JY for linux-phy@lists.infradead.org; Thu, 26 Jan 2023 13:59:25 +0000 Received: by mail-wr1-x434.google.com with SMTP id t18so1882281wro.1 for ; Thu, 26 Jan 2023 05:59:21 -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=rTaA87QpYj0Hccvxw80KUesxovjmXPfEg7HwgSeaScQ=; b=URsaELjRqEhjOAT1FJa/ev1zxpWeAFF8XGv+QH2Omde1U5u3d4vXDMCQcOkl3afX1S +y838hu79IPBHSYzd8oYvhppnGfnE40U5d3ly7HE/ujSO5A+JTEzly80QOprh5mcODhx ms6IDzjP/bdYGZEycOQlgWBekeYLx967USblvU3nwWtpOLb6b6Yt+yeFKV5J12GQk2Gh BJjXL+nn9zeIyx1saHxgXAdhQdglTqx/AGsgj5KDa5I4lnpFqcjH7EOzJrfgO3fd1/01 5UlFEQgAQCKtib8VBFHmXoRSybzdA9TcMtzgbBq6qpuBysi8btKaV8eruVwAJroMzZWt FdzA== 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=rTaA87QpYj0Hccvxw80KUesxovjmXPfEg7HwgSeaScQ=; b=xUkMiaL4t7ItOgG4L6w/wAUVgSs7ndhhQ3pziTFFBiBszRtvWIZ0l50FnnRZFUOta+ WrAuopSI9zkEVDGqQ3nGzvtRk4FRecTy1Ptl4KAaOrzysgFC5wK3O/0g7QzDMSyspWl5 FUY7FuVx6sWpwz3syOyZOg4Iuny3i+53ZXXo53lMsGB+PQjLu0/6M2Dspu1noKe1y8uB ISfIYiNUzCJ4nvuQlCpNxGqfvKZrO2hQrmGy2miYmo39jROXVJ+OgADAB81/3jBMC3qv y8ReYb2U4wIoFOivNbfAMFVsg+Ku8gKuNE0RBOvOBno0TpMdLBsAdDO5tt3xOfCZfK81 +bHQ== X-Gm-Message-State: AO0yUKUV6IPxHa38/5iO9khG9z5b9nHLAnbn/CWzilHRt6chg/hGX8ee Uz8YIuWyoY+kpDNnsCrdGfL7+Q== X-Google-Smtp-Source: AK7set8Am1+9D/pcuex9EPBOMEbVgzlQMxAh1INAQnKRH5D6aDJJdlB99zj7mjez3xtFhiDUQIOVtQ== X-Received: by 2002:a05:6000:1b0a:b0:2bf:c968:d181 with SMTP id f10-20020a0560001b0a00b002bfc968d181mr1440833wrz.27.1674741560387; Thu, 26 Jan 2023 05:59:20 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id l15-20020a5d6d8f000000b002bfb37497a8sm1594067wrs.31.2023.01.26.05.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:59:19 -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 v2 5/7] phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater Date: Thu, 26 Jan 2023 15:59:07 +0200 Message-Id: <20230126135909.1624890-6-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126135909.1624890-1-abel.vesa@linaro.org> References: <20230126135909.1624890-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-20230126_055923_684274_083AB94C X-CRM114-Status: GOOD ( 14.49 ) 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 | 17 ++++++++++++++++- 1 file changed, 16 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..dd53880d5b0e 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,11 @@ 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 +349,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 +395,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 Jan 26 13:59:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13117168 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 A5D8FC54E94 for ; Thu, 26 Jan 2023 13:59: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=IeXkjcnZQL3/Js10JfUZwfJMj1DSI1qUeTL84Ntn9Lw=; b=ZZNERSkHH1Zya9 01ZRiJJ3PX0xw1CuvQZ9SOyO8RV0qClYqzGNFtBiPT7AhrB0LaIbySsBShYzmn72nV4Pq3vILO3uv qmoAVejfg83KLw9vkhZDFi6N3BWTOQ7oZ1kPj0su911s8WIu0tu4NNrO9492/hFrlhR8Oqh1MvzwY Cx5PfWVR0r4Co+0HETg/bdmOELodku/O8BY+t1Q8yokIUuHPj/WUJu5Cn9Wlz+7uw2qMmba8e8dBH E+LdOD8UOKUQJpeZL3P27kE0ZFM3ZXvmkxZLEWSH9o9KEvo4r/cOKfNdR1LZIsCqeb7QX5ZY+Mwlf /M04pOfQ4Cs7gMH2kYJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mp-00B5Y5-Rs; Thu, 26 Jan 2023 13:59:31 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mj-00B5SB-G4 for linux-phy@lists.infradead.org; Thu, 26 Jan 2023 13:59:27 +0000 Received: by mail-wr1-x42d.google.com with SMTP id bk16so1838385wrb.11 for ; Thu, 26 Jan 2023 05:59:22 -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=uiBLnAVwS2GyS1HRbMqSi5MUkD9pZgyuG5ld57sC3WW/mTf4dgApP6wJ2EFmq8pET/ SP9jA0BkIDIZLQXu4hpWFXvU0xHcf52eS8l9tfOB53FdpHg8i4OzcAujAS1dAcJmZhHg ncMf7V9MexDLVepUxHRFKUa2lbtIMwPgphkd22V9dI1SczoqsjVFBE4xz4cVqE2rLzqf a/mFTTdPlEQbH8vZieb+eFqLVvOhDN6cqsD13UDhI7kZgULVeeOr4vVpeuhhDwFs2APQ TpeIkDJ0/tYN2Y6Bfj0sznfA+z42vMfi74FpI88ieIQ1ZkO+kQ4dIVfSRFZ1Ku+8OdTm KowQ== 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=I9tQJeX0+JBLktsEbkv9arAJ4qwyoO9zLeanuzsJBUsobMx4zuEIYsPqxhYL552BbM 4RsMFAMAdt4NxD1x5YEWsj2KGGDaIUyzrpioFM3wLzb4cL7aXUNB+LjRDO/7Qg4OWSe4 Ybh+ljUaWlO0U37j8N2zOmvP41259YFhq7Lj6y2NZGO/cmDz5JxKQh0h02FztTfi4sjg Us07uoz7JS/s0UNBHHHVwI/TyjwbJ50ypBbSaOGS0S+AES0lvMbERH+GRqUN1O9C8FG8 5WXJjrxPDHztTjlsJQ54kwOUkUGPKoMbM7d1ctVoyRitkm+WqWR+z55i68Dx4y47bpP0 OcfA== X-Gm-Message-State: AFqh2kp3PjpSa9p4c0V0+Qv2MW3GFRUjmhxU33kpeIHrZsgdUvQXWAx0 3aUWaL+2x5oDVVY+SHDO/y/TYQ== X-Google-Smtp-Source: AMrXdXuCTjk6Okl662FT10hv63OmbQhiMMsNh+o2Utbekk3FmmpF/b+EF+eUGq1xlkBrh4Vkc6YuJg== X-Received: by 2002:adf:e3cf:0:b0:2bd:c7c6:d1aa with SMTP id k15-20020adfe3cf000000b002bdc7c6d1aamr30375067wrm.35.1674741561720; Thu, 26 Jan 2023 05:59:21 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id l15-20020a5d6d8f000000b002bfb37497a8sm1594067wrs.31.2023.01.26.05.59.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:59:21 -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 v2 6/7] arm64: dts: qcom: pm8550b: Add eUSB2 repeater node Date: Thu, 26 Jan 2023 15:59:08 +0200 Message-Id: <20230126135909.1624890-7-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126135909.1624890-1-abel.vesa@linaro.org> References: <20230126135909.1624890-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-20230126_055925_858019_76E96A0A 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 Jan 26 13:59:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13117169 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 623B3C05027 for ; Thu, 26 Jan 2023 13:59: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=JYbXK1U+qQuEcnWCl79Y9H4C1adHRSFl58xVytjPL9o=; b=TsNAYpmmZgmWe+ 2dss5O06bzyijnYNPJi0wsjU0hv71261b7IvASATVgA2lbkS6Oa8xUAra3OgojckyAVPNaNKboo7K Rlk5xq8l8Zb6MilLSpaTIgjtklee+gTiMUl2LaLVE/fJhNhDrb7XMIpZx3UKKHj6g/cYgPw1RVYyi N9iu0MNBtNIE3Sjuv3J5FNMAxpVgkaeGGW0BgHhJfQCSz/Md4rXnXz4t/PIBHVb+EiYXhG++hmqWe Yya54mhjwIrlIXVDQUDT8oKijbiZG5eXt+sAgNCAZb5oGGlSTsKWBHCPnb44GGgs3lVZF8DSFo3RP JPnf9eQFOuhjiaeGI+1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mp-00B5Xx-Lo; Thu, 26 Jan 2023 13:59:31 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL2mi-00B5Su-7U for linux-phy@lists.infradead.org; Thu, 26 Jan 2023 13:59:26 +0000 Received: by mail-wr1-x42b.google.com with SMTP id q5so1902061wrv.0 for ; Thu, 26 Jan 2023 05:59:24 -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=D8JLqJWePTj56J9GBoMOuJUgVePsSS0WQ6fKq9gZxJI=; b=lZ8+rnpTI72eKgw6zYPfDaSYABGPdLtaeuiACZJhEvkcXqEBw0RxPatS0qNecApU43 ErVhdHs9IeTzrSWCSeKzBDGfWORos/TfXeJMk9V1OWVz6wXuCIT8pAExtVxA1kVXzWuo cHt7Vnc6OnM/O5cZcHS2n39ZXskZt4ypVMeGG58cm5p+3B7ZV1SpgV/NS4PIw5AUO3Zq autFe1BmYGm7/QCJu0y2JxdwymmfxLiO7I9pH87S6V93ZboDVOhO6oSmzpzFXghBVIoF MG3w+AK6B3WrduZ5vWSDNAwzBhYw1QqurayDmcq9PqXp+Jp3RIXUOyJTU6pd2GUFUqCG FJKA== 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=D8JLqJWePTj56J9GBoMOuJUgVePsSS0WQ6fKq9gZxJI=; b=wjqSh8PnavkLC097U+MHT6b33eHxuvwgCUtfT/9OTOERjPdR61KWlD0V1hT2Xu6Es1 b/NQIKbd6dkjjvs6OGthERMchy6vUtTVDJEhrl4bDOMGTu2ZEZzv2oHqNoPe0Yu2KBoT Ytn3sT1O9QqV1XkGdqq0JnY9VC9pjMOV3wlS7XFSWSpVhkvXXb9ZNgrjHoX+NhdfNhtq KABNyYYeZ2kUpxWoxJEJZlI+uJXUtpvwbPXCIFrgsKAr4x/cR6Vp0rqHVOpql92KKwzG N6hQGDXqROMSGaxUVL+zaNQ/JgOElU59T4XMq8RQWFw9Qu/R3O2fwY2EHKbhNmkd9Gjo 2gEw== X-Gm-Message-State: AO0yUKUaB1okVl+8jXpfkwiMW6VLXSqWYX5RB+bssIsB6csIe+i33Wkq BEKz2jvnLf1akLS9s/YcReS8kw== X-Google-Smtp-Source: AK7set9/aHfckFT1Ne+Cj5GmP32NIq0qTwHLwG93Q/NV9Y8G5nr1Vnt5wc4s17z/va+hpQXg4voujA== X-Received: by 2002:adf:ee47:0:b0:2bf:bd69:234a with SMTP id w7-20020adfee47000000b002bfbd69234amr4896896wro.1.1674741562996; Thu, 26 Jan 2023 05:59:22 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id l15-20020a5d6d8f000000b002bfb37497a8sm1594067wrs.31.2023.01.26.05.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 05:59:22 -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 v2 7/7] arm64: dts: qcom: sm8550-mtp: Add eUSB2 repeater node Date: Thu, 26 Jan 2023 15:59:09 +0200 Message-Id: <20230126135909.1624890-8-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230126135909.1624890-1-abel.vesa@linaro.org> References: <20230126135909.1624890-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-20230126_055924_340415_D0D028FB X-CRM114-Status: UNSURE ( 9.60 ) 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 cea1f12ce294..bdfed6da1b00 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -407,6 +407,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"; }; @@ -467,6 +472,9 @@ &usb_1_hsphy { vdd-supply = <&vreg_l1e_0p88>; vdda12-supply = <&vreg_l3e_1p2>; + phys = <&pm8550b_eusb2_repeater>; + phy-names = "eusb2-repeater"; + status = "okay"; };