From patchwork Tue Feb 7 13:55:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13131565 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 86864C636CD for ; Tue, 7 Feb 2023 13:56:03 +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=JlUkx4nqz+islQpN4nOBcZZatJExwN3j9rpz91eHEqY=; b=w5rtj0lqKOVWIH aU/0Y9IfPHNJzXOuC/UFFAyX3w5bLS5Pgq1yeAOnvQfufZJZ+UtdhytDIV8N6Ky2DkcmrE7nA0RZO X7E8ikeGlp/6Z0XJ+oBloeWiIN1J5kY/BfjE3xNuhuqv9dm9HBKd3mImQz/OMB7nROCMJ/FFb1fbd sIng3TtouDgBecgf7IMBymkV10uA1aBfChHgY0NL7HKcYwo7C+vDoDzZdUaFJUGRH6mMkFIj9ERhb FDC3dqmasB7ac3LQVV1gaElfv1t5TWu3AomBF6VeM1rpEDrjPYkeRbwFmGcSRsu+FUJPY4idoSaPO neFvF/0B+8OOKfa5rlPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS2-00CMpL-Vf; Tue, 07 Feb 2023 13:56:02 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS0-00CMmw-8H for linux-phy@lists.infradead.org; Tue, 07 Feb 2023 13:56:01 +0000 Received: by mail-wr1-x431.google.com with SMTP id bk16so13613885wrb.11 for ; Tue, 07 Feb 2023 05:55:57 -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=QX4rZ/apusxA+kOocMUgPZzFJ0GB7RlYqxdsd8KGKjw=; b=ZePF7sbU5Y7OjGS2yW0g9dLDgyFY7/XNsDvb4KSI8zVo4duMujEAIRIDEAYzgW/aJA FXn4Dgir0houDF4USc1XH2s73/6rqJurfSkOeT1oH1oxUfxBf6PCNk3HVe/YGNwhKxjZ qPZVgPpkhtfd0Ru0984YUutdfo1dTodUWIjs4lNTELSKRLfCXPDs0+9zz1wsd8bIIZFl iyjbxsWzCmYzqO7DjEQkem0WgEleR8XNZPpIIvOCgElV+Tx2q5aeKr9ebSPBCsaKUIbz Z1pxs8ovrpq5wYQf/FbdwaBu0nh/mBbWqiGn3+0OHZ52xsseHlNpqcNp+POJSV7GzykX 629A== 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=QX4rZ/apusxA+kOocMUgPZzFJ0GB7RlYqxdsd8KGKjw=; b=C+VuJ9MJG/mq77oPsX7epFVEn5GVanUViucZAN13i3dzvq8G79mp3wKllJB77fyjrQ i+p/p8e89Nanj9DeYwwxJZTucEUVa3Zjqf4sopTjfTlDJuXcuQ/RQkP8IOgzfax7O8ym GolP9x0VJTovyCfaJVbWqgTk2gXOr0SOJV7+uxi76njQfkjnHBra1Vy1+mOZbeEzgR5c ABV09LLxV5vKVCymgTCOHvVVKnYQgjfYB63m1O8STHTChcTujcxHWc2F3UTEbwQ+G+tB qT2OGp2en3+hIjjWuwTS9iAjFqg0UEICHMxzbMqrW1RSRPusWYD9zfgoNKHECWmnom9a Xr5A== X-Gm-Message-State: AO0yUKVgjCLr0ngnG8HI60WpJPvaCYsZNdjpdCnClbywZKRiR/Fg+RTW a6yboYkxd/jm+4IWS2Y6jrP9xw== X-Google-Smtp-Source: AK7set/3HsxRPjRdhDnMoTIKD5/HI3EB5DMI/wZsOGOaUNEUdIzsU4vzJeppub9ye2E67JzGIA9cbA== X-Received: by 2002:adf:dc04:0:b0:2c3:ea92:3494 with SMTP id t4-20020adfdc04000000b002c3ea923494mr2499644wri.55.1675778156573; Tue, 07 Feb 2023 05:55:56 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id p10-20020a5d59aa000000b002be5401ef5fsm11611312wrr.39.2023.02.07.05.55.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:55:56 -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 , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List Subject: [PATCH v4 1/7] dt-bindings: phy: Add qcom,snps-eusb2-repeater schema file Date: Tue, 7 Feb 2023 15:55:45 +0200 Message-Id: <20230207135551.1418637-2-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135551.1418637-1-abel.vesa@linaro.org> References: <20230207135551.1418637-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-20230207_055600_312416_33BB87AE X-CRM114-Status: GOOD ( 15.14 ) 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 Reviewed-by: Krzysztof Kozlowski --- The v3 (rfc) is here: https://lore.kernel.org/all/20230202133816.4026990-3-abel.vesa@linaro.org/ Changes since v3: * made this patch the first one in the series to fix the binding check for the 2nd patch. * dropped the compatible for pmic in the example. This is due to the dependency between this patch and the next one. .../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..54afab7e21fb --- /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 + + pmic@7 { + 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 Tue Feb 7 13:55:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13131564 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 5F1EEC636D6 for ; Tue, 7 Feb 2023 13:56:02 +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=rOtQAPpq0Tn/syhz05bT8pxfdLQ2tM42mKu4gklUbIY=; b=mrpOVvx9tVRnYS jRFeGzfLpSzbpHieVfKWHhm2Ta1SV4MwWCHRP+6Na+vyI+3o8OKu8F1XhOyoLWzwykDeJJP4zi6pw yuiAt1e4uuBOkC2hAWodJo8Lwesn30nuaywgkMUWiPgZZX+HSa0aUgxpog+X1vNMCrnmNWqz8+3dg 7yweNNWvBreujnZT3UxbAi57evoKe+fHNf0iJudt4k68pJifes8MBrZthhqbSsnpWnM+dgi+Q8i/d ndEsohxv2fYDPip/mMRVBM8m0AVYYQNCT9En/UXBe7eTu+nRJ3A+dER0VGMKPK1RhoTxNnauj/saY Wokep+HWGPbKDEFqVUYw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS1-00CMoZ-Qe; Tue, 07 Feb 2023 13:56:01 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPORz-00CMnJ-A1 for linux-phy@lists.infradead.org; Tue, 07 Feb 2023 13:56:00 +0000 Received: by mail-wr1-x42f.google.com with SMTP id h3so5791988wrp.10 for ; Tue, 07 Feb 2023 05:55:58 -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=woyCLhhr9GNDZ+ZK9imdrAaOvVCw51EmSZRJm9R7J5w=; b=NtU54NwNW0ruK/8LURJT6C7S7FeX/i5HcbZpzVPSd8N4FDeryJMrp6kX0Ad05ncNEc g9vDeJ1/IVQLVx3XzIc+t86oT6mr60a2tMn0UqqxrOC8LSTRd3ycdIRBs7chpFuPc0X+ qNqC4otwYGd4bjSgMGjhAh9e1OMmbbFXvFVFQk2fS0fSVcPbp2uq0k6KMaYkKSDnhysS 88iL/fSSSKruvvOoLlrRofeuXgpaYWHUsuRSg+VS1V/wvSI6x2njwiqw/sSFXA8M80/r x/pD2M37xtEOV4yy03FSeC9nDx60cjzg8MdiBWM/e85wWIfOP82P5LNmh1KzLIACptYD Fomw== 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=woyCLhhr9GNDZ+ZK9imdrAaOvVCw51EmSZRJm9R7J5w=; b=txnH9QQzQq9HrjxcAMN1F/3Z/Vx/m5W2YW/KL8KkOInprNnhZda4Pz/k9dTTo0fKXO pWskQ+M6tvC8VIZWFee6/5FPJ/IwWNdDT7X0fF+tPASRnla0yABAixe5Sayk5I7QJ1X7 HCWixtiHPMf/BJkqzuHc6BBDHoEOkzxjhRpWm5NR45YfPhrDARKkaiimZkG9k0lRkwGr iUP/MsmSPakSPFSspG9a8mTVDiKfuvhXg/4+9oYXFk+6oL4xsVkpIBo09Ngaoc+Rd4ST cTmb/ldyzecWqJDEsfpURS2kPsaRmT6/7IjEX8d9wrcQvUzM0mYBE/BzuhM8l6Ajk9Ql E1Lw== X-Gm-Message-State: AO0yUKUXT9RCWScS8ABsIN2Gi/PdiI54SHPvzCcRmg4XUZy/rtvQBw/q Pu15Mla1TGsm/q+3E2Bg3SsO5g== X-Google-Smtp-Source: AK7set+310+2rkvwM3A7GBlhW9EtKuxs3n1k3TNZRXyXkrqITOpLCmAe3j3hq/Bam4I+ObeiHtxrgQ== X-Received: by 2002:a05:6000:188d:b0:2c3:be89:7c36 with SMTP id a13-20020a056000188d00b002c3be897c36mr15394572wri.25.1675778157897; Tue, 07 Feb 2023 05:55:57 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id p10-20020a5d59aa000000b002be5401ef5fsm11611312wrr.39.2023.02.07.05.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:55:57 -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 , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List Subject: [PATCH v4 2/7] dt-bindings: mfd: qcom,spmi-pmic: Add pattern property for phy Date: Tue, 7 Feb 2023 15:55:46 +0200 Message-Id: <20230207135551.1418637-3-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135551.1418637-1-abel.vesa@linaro.org> References: <20230207135551.1418637-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-20230207_055559_367296_A506D546 X-CRM114-Status: UNSURE ( 9.48 ) 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 --- The v3 (rfc) is here: https://lore.kernel.org/all/20230202133816.4026990-2-abel.vesa@linaro.org/ Changes since v3: * made this the second patch rather than the first in the series 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 Tue Feb 7 13:55:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13131566 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 9E25DC636CC for ; Tue, 7 Feb 2023 13:56:03 +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=FtT3R7MqdNbzinJKC3qiNhphRygCtnAgMjffP/ailFU=; b=jJlwm5oG2Dp6pN OW1a5DW9EMZVS08uZyJ3CDRetjoFDpRf13sPYfpZvWY9GDgMDq8Ke5/Km/68YOBuYEoxKIZln3ZnD CuxzIxSRwA/M2kaRics68gzxZb3Ydi6qZNCsmdkn4MXeRoWTOBqf7hs305JJBqhE6UvxdyRRqMBqb CFfrQhRwH77jjsWMaE25RRCJBXCoEaONVX7ZVHSY60DnwIPjg488a8y6aVa9qCgaFo89yVuoi3Khi jO2X7xC3EoYBaoa1EZBqwxTr7ST+yb5Eb1unX9ThIzyLjiXWNesswuN4+e8363j3jLE6lGW4+GEq9 JgNaFMlJ4Vu8Kkm1wIyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS3-00CMpU-1l; Tue, 07 Feb 2023 13:56:03 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS0-00CMnk-AO for linux-phy@lists.infradead.org; Tue, 07 Feb 2023 13:56:02 +0000 Received: by mail-wr1-x42f.google.com with SMTP id bk16so13614020wrb.11 for ; Tue, 07 Feb 2023 05:56:00 -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=AtkmhwFT5j7wowMrMh6FyT6x9TPEWHJ6LPVu2crAaaY=; b=yeueLFHd13NZAGnJvHZuHiRYVpoEhoTeSIVMwEFaDaXr5X0uS8p6ut2gDavnB5/VgO ufg7Wc06MA0b55lSEfpMo6PFPe22YZHwbfC+LPFuRehpLt4mL/7ka4vKc+wUAqcXsExZ 3rD5ih/CiTv+4pHMalF8CDQmrrx/ptBvrb/sXDseu+uTw6/uIUtwSYRKlzKlbpxmO3zf qUgFykksZcGNShdv57SOn3leRwxKfRKZS1Q9tviP5zlMXE6vCgu+ZEVhel9qvsIXP4pJ d+Y8YODSm/EZ8foMFeFgaPwklYAoaCl1MqU8XD8bXpouzbOjMBs1T+2k7T2r4UzyJY2E e6sQ== 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=AtkmhwFT5j7wowMrMh6FyT6x9TPEWHJ6LPVu2crAaaY=; b=egvhubA60fbzZe6F1c1K+MxKfE7ZD05jWvShgiz1+GzIgXrdhyUkisNpNmAXFT8ugE QaoNjhys7jEkXe4YY92Qt1FpzvnZPokqcz+pj/JPYF+m0Ys9tX43qIPMxMTBaiJ/pUIy tYyV8L64Chk9+8RcA6kRd52rCZVo/v46iWZqQOb5DkfBO0L4MB2kjj+6WevquQ/VGhXw jhLiulmAwstAVNSuOfkOHgc83hp/cxkkfwqxijfuv9/clDxURtrD12o1VnKSc0+2RN/J PtNQ/jjaH8ZP7CToBE8TEA9XoPOVUbIXQctJNbEqjf/F5rxppG9mjVt5w8nht4gOydQU 9qIw== X-Gm-Message-State: AO0yUKV97KQUC6/kIsM+4Al/fnXdgRGMKXEB4JRGetSiAlw9UDNCTd/C WKtUTRkF2/XyoVdEXeSSSSI4Dw== X-Google-Smtp-Source: AK7set8sX8qVfXWnL7rMwHmKqSHv+hoK0KTIKBOfrnCPm2yh0mFF/nczg+iG/jdmQKu8ghiXhTpjCQ== X-Received: by 2002:a5d:49c9:0:b0:2bf:9656:d1a8 with SMTP id t9-20020a5d49c9000000b002bf9656d1a8mr2270813wrs.32.1675778159182; Tue, 07 Feb 2023 05:55:59 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id p10-20020a5d59aa000000b002be5401ef5fsm11611312wrr.39.2023.02.07.05.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:55:58 -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 , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List Subject: [PATCH v4 3/7] dt-bindings: phy: qcom,snps-eusb2-phy: Add phys property for the repeater Date: Tue, 7 Feb 2023 15:55:47 +0200 Message-Id: <20230207135551.1418637-4-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135551.1418637-1-abel.vesa@linaro.org> References: <20230207135551.1418637-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-20230207_055600_379743_53A55C2E X-CRM114-Status: UNSURE ( 9.12 ) 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 phys property is used for allowing the eusb2 to interface with the repeater, which is modelled as a phy driver. Signed-off-by: Abel Vesa Acked-by: Krzysztof Kozlowski --- The v3 (rfc) is here: https://lore.kernel.org/all/20230202133816.4026990-4-abel.vesa@linaro.org/ Changes since v3: * dropped the phy-names property and changed the commit message accordingly .../devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml | 5 +++++ 1 file changed, 5 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..c53bab107b6d 100644 --- a/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,snps-eusb2-phy.yaml @@ -33,6 +33,11 @@ properties: resets: maxItems: 1 + phys: + maxItems: 1 + description: + Phandle to eUSB2 to USB 2.0 repeater + vdd-supply: description: Phandle to 0.88V regulator supply to PHY digital circuit. From patchwork Tue Feb 7 13:55:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13131567 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 BA045C6379F for ; Tue, 7 Feb 2023 13:56:05 +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=U4ZjkGf6inTtqcCtNjAebNLeXUIaCV1rsyIdPIS141g=; b=FwRZE85E2SuYPB gBLIFuZpkr4vr8Rw0HwEOhmfLiOE2dnop0k0OiWx+iYcMUuAdTjnpZVwzQ4cqtn2H4LkjErFVGO1f fCm3DnlO5HG93x3+3Cy0aFZ3fHYrusjMT4JX+IJ4/7YY7aFMerYrugmz4TUwfbcRav+VBBufl3Vkt 0Ww+7OgStJR/7Q/EuxhHoatmUzEqMoyzV/0Mg1wtXjpix5XMF9rQASjo+bj4C9UgnbAaOxCOh42hn l58FAiuFTOekY9l82P80m10l5ITUeAeC+RJizFz2xEzDeMaIZQMIzl+SgDoqW2HTqS9VISRxc9kFX ZY3hr7chX3Jnc9YIMIXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS5-00CMqU-6W; Tue, 07 Feb 2023 13:56:05 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS1-00CMoU-UM for linux-phy@lists.infradead.org; Tue, 07 Feb 2023 13:56:04 +0000 Received: by mail-wr1-x436.google.com with SMTP id j25so10096676wrc.4 for ; Tue, 07 Feb 2023 05:56:01 -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=wknXjDaGXH+LX2K/TaaG7FdKylzkWnpWRhGp8pLhtGE=; b=CpsnTxFsn5qi50XjG1iAOSliAdXfjTiEkhuSOfCEbyx7GMkKl8B/UZ1xReJQgiESTn csRYg0SnxBQvUSDQHU2Pgt+yY2n96NOzDe7KoDCItV72Uc8gx2yL5ZOnqbIFMSP0vzv1 BFIuSY/02m/CzNIw7NwI5Y7yczO4eOR1PC0rk74e8RVSTy4HjprioE4lPZC4JZtE5nU3 Wy23uiE68t6fMEcTbbyHFTs0LP6ZqJp+bwtC0og02noA80LOEXZttPWR+nG7hiUe0UfY 7oDacN0uqd2NfdXexDl2gGA4v1NSPzU/3Vqx8PcPd4cPJKNXQiGywwKisBHrUlrZkZRO iXpQ== 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=wknXjDaGXH+LX2K/TaaG7FdKylzkWnpWRhGp8pLhtGE=; b=I09tGCvuVeQ4q3lgQZNMalVj5UN5NfDzzFyeXsk0pU0eJkdbRM1W3d7vabRmfVEo1z lWhdI9hNOaFn5xioaIOsKkJMpF1CyQgK7+2342YaXXNAL/qpzB4D0d8XMSQfPkrM7MnF 9IAkFNj1jb1iZ1fStYJvwOaR449rLvYN/oa+j9Cr8lWDWk8szpuSnjgJaXpe9Yj7/1ES NVKsu18v5N4KUS6iH1TgzW/A//NsflmTWTDMaSEG+1tcDRgQpnlHWdxi+j1dAyxxXHDc m83UgbxzNdqIcsY9WsfpC9GSs87BWFwhuAn72KcjKOIuiOAj0VnlDyXS904LngQ9rkLP qUlQ== X-Gm-Message-State: AO0yUKXLtfzFIAM0RpiAAjRtROGku3ypc8uTVxRY/hNIBEv92oeaprSq LmK1Vs6vgs6amlCjY4SyXJPEZmBwcPJjjwcj X-Google-Smtp-Source: AK7set+oRWPLZzVSZcYAw1/0txRXToUbZSBz46U8JnoNq2rVlETdGipEGRtWjRCQT7H1y/bd8csvWg== X-Received: by 2002:adf:f749:0:b0:2bd:f71a:5b32 with SMTP id z9-20020adff749000000b002bdf71a5b32mr2772989wrp.58.1675778160430; Tue, 07 Feb 2023 05:56:00 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id p10-20020a5d59aa000000b002be5401ef5fsm11611312wrr.39.2023.02.07.05.55.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:56:00 -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 , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List Subject: [PATCH v4 4/7] phy: qcom: Add QCOM SNPS eUSB2 repeater driver Date: Tue, 7 Feb 2023 15:55:48 +0200 Message-Id: <20230207135551.1418637-5-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135551.1418637-1-abel.vesa@linaro.org> References: <20230207135551.1418637-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-20230207_055602_008747_D73F75A6 X-CRM114-Status: GOOD ( 27.90 ) 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 --- The v3 (rfc) is here: https://lore.kernel.org/all/20230202133816.4026990-5-abel.vesa@linaro.org/ Changes since v3: * fixed all indentation issues and dropped a few blank lines to pass checkpatch * dropped shift defines as they were not used * dropped the repeater_mode as it was not used * dropped the of_node_get and of_node_put for of_node * dropped the comment related to regulators in eusb2_repeater_cfg, like Vinod suggested * dropped the initialization of ret in eusb2_repeater_init drivers/phy/qualcomm/Kconfig | 9 + drivers/phy/qualcomm/Makefile | 1 + .../phy/qualcomm/phy-qcom-eusb2-repeater.c | 259 ++++++++++++++++++ 3 files changed, 269 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 513322cdf83c..4850d48f31fa 100644 --- a/drivers/phy/qualcomm/Kconfig +++ b/drivers/phy/qualcomm/Kconfig @@ -121,6 +121,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 b2c01665622b..de3dc9ccf067 100644 --- a/drivers/phy/qualcomm/Makefile +++ b/drivers/phy/qualcomm/Makefile @@ -14,6 +14,7 @@ obj-$(CONFIG_PHY_QCOM_QMP_USB) += phy-qcom-qmp-usb.o 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..3f265ac2df20 --- /dev/null +++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c @@ -0,0 +1,259 @@ +// 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 EUSB2_FORCE_EN_5 0xe8 +#define F_CLK_19P2M_EN BIT(6) + +#define EUSB2_FORCE_VAL_5 0xeD +#define V_CLK_19P2M_EN BIT(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, \ + } + +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; + 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; + u32 val; + int ret; + 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 = dev->of_node; + u32 res; + int ret; + + rptr = devm_kzalloc(dev, sizeof(*rptr), GFP_KERNEL); + if (!rptr) + return -ENOMEM; + + rptr->dev = dev; + dev_set_drvdata(dev, rptr); + + rptr->cfg = of_device_get_match_data(dev); + if (!rptr->cfg) + return -EINVAL; + + rptr->regmap = dev_get_regmap(dev->parent, NULL); + if (!rptr->regmap) + return -ENODEV; + + ret = of_property_read_u32(np, "reg", &res); + if (ret < 0) + return ret; + + rptr->base = res; + + ret = eusb2_repeater_init_vregs(rptr); + if (ret < 0) { + dev_err(dev, "unable to get supplies\n"); + return ret; + } + + rptr->phy = devm_phy_create(dev, np, &eusb2_repeater_ops); + if (IS_ERR(rptr->phy)) { + dev_err(dev, "failed to create PHY: %d\n", ret); + return PTR_ERR(rptr->phy); + } + + phy_set_drvdata(rptr->phy, rptr); + + 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; +} + +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"); From patchwork Tue Feb 7 13:55:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13131569 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 09B5AC6379F for ; Tue, 7 Feb 2023 13:56:09 +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=qcquYlzTVs1ogrd492Xy4FmJY7a0MSdR/YHmNoSGo6A=; b=LbaH91PooDxUqP aUVEQQwP6sxyJW3cqGp21/vbkr6skki6rP+WGeM/ArpF0jl90288FSYdqxKr4LXWob+GqG9oZKL6w zqg0J7GxOHoT/UwXvn+3xj1O7w+03mfKZG/o0kXbIhibxc6jR8kaKeEV355ON2RtCEeddhX3ZwQKx NT/zUThuuNAp3HYizSvvgVsKp3MljvkooND3Q/uioPjwqIiqC9IT5H+09orUlsf3cUVaQao8q8Ehd 97nvrXK+fGHOJCpJJxQtRZJY+2PckQwLexCv47vjxWluFy5RcAPoLzVq/wW1x9J4MtWnHRvFaoXD5 Oth/6tvanCc2w5Vs6Yag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS8-00CMrl-Fs; Tue, 07 Feb 2023 13:56:08 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS4-00CMp7-Rp for linux-phy@lists.infradead.org; Tue, 07 Feb 2023 13:56:06 +0000 Received: by mail-wr1-x42a.google.com with SMTP id r2so13628126wrv.7 for ; Tue, 07 Feb 2023 05:56:02 -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=5nP2A5i34h6FhI1PmIGZwHqThelkL340fyNZ8uWjSxo=; b=VdzEKUA+I7BR/04OKzVJQzQLbpCpYeLoYwT+7MbmJwBzCXC8/Wz9dBXpicw1nu5t7K wPcXLo7jpe4VQnBgW6nM+ByBemVBAgt747KHH8XpV1yCtZedPB9s2ntVMAlVkvVOzGWJ bVhhWQkLCxPhB3zAJgXi57guzJWqe/gdNWLZsd5Ar9hLs6L+4zD4vJZmPsiJL4YvGWNq UgeGd21VezuELwjDjCuqUxM+GVIdrj1AOeIq5D98I4RmPqJ50zwKPFC9dqlitzTy/ZlT QHieExN+/CjvvdfwBMdpxpLH12Cu9I8mf7kbPFi47Px4LXJSY89ahz2E/hl6kkUiGyUl JyVw== 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=5nP2A5i34h6FhI1PmIGZwHqThelkL340fyNZ8uWjSxo=; b=761daWqttw8KYuf/3WduET4peCzegNdPfEe3Yrv1H2ofQjQihwFgcUjD+oiha6PGjm CoWvQ6qqJd9E2UkQNh3wK0GP5cRITG2cVLSOBAqnjaSpfDgeQ5oFtE09j5FxLtHT0bzl VOkkE/SQlsGw5v//bR43LV+bKhIs+fOB6xIkLnZWhMKXbrAd6dwsBwkgea4m+Ivg/cbN LCM/AbkejIsH71MnSEwryFNroXflDmnLZ4jbw6Gx/y4C/Dvr3dkYVw/JHcrjqXPXupkS 5pMPV5BY5N/Sks0ChOBDcS5y3+MAWlzjRK0fr73uG/Z2krJs0xoB1tXBLhMk7YuEfNmI zN5g== X-Gm-Message-State: AO0yUKUJpi2xPivrpCiS+irOraYPw1EwHbs+JnL+2g3Jba2B8zXJq02g txSIWIvaWW7RNY3vsb15FaXPxA== X-Google-Smtp-Source: AK7set+L3zQVDlpG8ELGNddTYFVEar45muQRLY/0lkqS/38deLKHfGuV5eXNxsjES2KHz4jIs6x/Zg== X-Received: by 2002:adf:f3cc:0:b0:2c3:ea59:a8b with SMTP id g12-20020adff3cc000000b002c3ea590a8bmr2878259wrp.24.1675778161731; Tue, 07 Feb 2023 05:56:01 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id p10-20020a5d59aa000000b002be5401ef5fsm11611312wrr.39.2023.02.07.05.56.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:56:01 -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 , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , Neil Armstrong Subject: [PATCH v4 5/7] phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater Date: Tue, 7 Feb 2023 15:55:49 +0200 Message-Id: <20230207135551.1418637-6-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135551.1418637-1-abel.vesa@linaro.org> References: <20230207135551.1418637-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-20230207_055604_926740_8685B84A X-CRM114-Status: GOOD ( 16.06 ) 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 --- The v3 (rfc) is here: https://lore.kernel.org/all/20230202133816.4026990-6-abel.vesa@linaro.org/ Changes since v3: * none drivers/phy/qualcomm/phy-qcom-snps-eusb2.c | 19 ++++++++++++++++++- 1 file changed, 18 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..703e2f23ea00 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; } @@ -355,6 +365,7 @@ static const struct phy_ops qcom_snps_eusb2_hsphy_ops = { static int qcom_snps_eusb2_hsphy_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; + struct device_node *np = dev->of_node; struct qcom_snps_eusb2_hsphy *phy; struct phy_provider *phy_provider; struct phy *generic_phy; @@ -386,6 +397,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_of_phy_get_by_index(dev, np, 0); + 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 Tue Feb 7 13:55:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13131568 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 E8D6EC636CC for ; Tue, 7 Feb 2023 13:56:07 +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=RZS92pNrqm8wgoAfwv/6twval9AJ42tD+MbE9TzeNsg=; b=zxxMccYrHnspWa ZMqfK+Xit1XhzOrCGovzRyF2rdQuwJo//dGGWyCrfA7rcy8uRTPEhoEm1ufwMP4gNCVRyfaR16DQl 82g9d/LQ78nlfmsho3xZETtu67ijq1jisqeToaKMi8VlaBAwwK55xkvMUSPJSrVj2KOExYH7KwT24 FwFgJYnskjGbxhjNMnRbCYkr3GPP5pWfuNAC9A/kmJXPkQYMNaE9YPZfhEc4MBI3h8mu8xTFQtRv7 Iy5Mq7gZA5pMlD+gsXODSYR+zY8OdbyjloFY0HQJ9o6dJ9L5wEaYtpsm7KOn3vUvzpryQv1eArsqJ VX5R7HPvsevyr61Z0OXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS7-00CMrD-C9; Tue, 07 Feb 2023 13:56:07 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOS4-00CMpk-ET for linux-phy@lists.infradead.org; Tue, 07 Feb 2023 13:56:05 +0000 Received: by mail-wm1-x332.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so13246492wma.1 for ; Tue, 07 Feb 2023 05:56:04 -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=kE+AxQUwOxA1DoNBo9L3Bq1W/VtJeoaV/fW1FjliOjc=; b=AXNPNIpXWGRFXmVvnNyBaX3EUaHtz5imfr2Kc2AD4XzXrTayE70iIYQFWo7gi7/vaB ZuplajGB2GW4JSSMA8hYQJbJBf7pUSzb5+ilXMwY1WYl+jqm4LFvl6CZiiAdFXVnXXZ2 A+GCL3cp9W2GviQruhIqWMioQ2m1ATFWr3lVbhHBxoFDY4FJyAcmiDapk/5xyzOGsvOK xIX16EfERwN9r/GBHDjTum7EHzk5vbYPi/SaOPlTRSFlxmHkLhYU6dJMYN2z9UTicq30 Vr1zsArjd0KRjatg1r9i9WKhNoAYpPlnmLoMOHr4wZT+UfigRJsrDGC6II8wGPWDIAHf QihA== 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=kE+AxQUwOxA1DoNBo9L3Bq1W/VtJeoaV/fW1FjliOjc=; b=ZghCYR9KmgQBpM2Os0H94TH+15tPH6Q1tj2KIwTZQlJHzs3qo87mwPzPZ/MEEAlflO juC5bWz1OsY59tqhIpuFVHFM3dscDj0B4CiYdiNm/VwK4ordfSnHxUlHriSoHqA/KKJ3 spyFFmdQEy6/FULS59ZR4ImVOS/lQAFTDBG5rmzsmaHtjS2QUxull6SJ3bUG9boeyA0+ nh52y2RlcUpXdeHcuM0OqBzphgJJTRkl2CvlPCcQZVWbL7UsRvYcTRq49Ii2gbuM+3pS 7X4aqbWyV2nl+YxgmyDX3ruOA6K/+VmAlvIODI+4acxuKVTLppEJMYZFZ2Js0lg6l72a NTkg== X-Gm-Message-State: AO0yUKWnloJZqqVqAmDF6dmmkZUFuH8mjSv1lNmgoe5vZWXkb+pX+286 xQbTiMte3mQ8IF6c5t2D9Y88Iw== X-Google-Smtp-Source: AK7set/0VFvjfWv6VFXsQD+RR8iooJZ7MrlzClaN0ljfreU4ICsHnB9bcDH781X3XLtXeWSkncAZnA== X-Received: by 2002:a05:600c:4b1b:b0:3d9:f836:3728 with SMTP id i27-20020a05600c4b1b00b003d9f8363728mr3209658wmp.11.1675778163004; Tue, 07 Feb 2023 05:56:03 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id p10-20020a5d59aa000000b002be5401ef5fsm11611312wrr.39.2023.02.07.05.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:56:02 -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 , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , Neil Armstrong Subject: [PATCH v4 6/7] arm64: dts: qcom: pm8550b: Add eUSB2 repeater node Date: Tue, 7 Feb 2023 15:55:50 +0200 Message-Id: <20230207135551.1418637-7-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135551.1418637-1-abel.vesa@linaro.org> References: <20230207135551.1418637-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-20230207_055604_504172_794945A4 X-CRM114-Status: UNSURE ( 9.07 ) 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 --- The v3 (rfc) is here: https://lore.kernel.org/all/20230202133816.4026990-7-abel.vesa@linaro.org/ Changes since v3: * none 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 Tue Feb 7 13:55:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 13131570 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 300F5C636CC for ; Tue, 7 Feb 2023 13:56:11 +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=NWOeKzowPPbyV1Ym6Jjxae3SEByGtodl3ioqUJcp6fQ=; b=AkWgx8krZ3JSlD QvC/c7Lxl2jQhmLl/b5YeowMlwGiOhx87ULkicblz3R+PkqKStmMFG5hUfw2IePXy1VaHKWoklHnH ULk0bgf0M04h0vJZ2F2qYIcLH3/3qZhfi66jLARcsrtvGiVldlosFBZiBz1xDasEgxT2oI+jlk8bw TlT1cGVKGQmjkDEuMTLaacvTb5+d3IfJbcVyN/oIM1iohU+Q+2LVVHuAx//S6g6R4eUSgNbkht2Xg K0wj0/xgkJShQz9KRtPQS1/vwpq8vP5rHJ5q2LMlbJc+ZuR4iY2dcGF4JDimq1dkd9Muqku2O6daZ Yn6FnMetwSodwMLRJt0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPOSA-00CMsV-KU; Tue, 07 Feb 2023 13:56:10 +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 1pPOS8-00CMqE-3S for linux-phy@lists.infradead.org; Tue, 07 Feb 2023 13:56:09 +0000 Received: by mail-wr1-x435.google.com with SMTP id g6so5648299wrv.1 for ; Tue, 07 Feb 2023 05:56:05 -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=V1aUOJzlnvog/gfPWV5JW0Qf9tdncCWCmWydTboOvKw=; b=bO5sg5C5vYk9TdSOnLjR4vlhtn9sPiCyuwTtqnTTgWRlpu6ZIHi2AuSfyxwDUhH1E3 7iIfij9Fjz7f1MYJpQy2hjG1h8vjsYElgJEhcWCYbarfC1ZcxdyLCyd/IPGwYUz+3Mde oqQp5TY/prn2vOHVAiD4YbRNxJmoIEX9aMEGWawsmNYceIIZqF3dZuYM8TqTJFLpiItC gUZj8ZewAg+J/0uxy84V7Sd9T7B9STa6We5Gn5QUkuDdBa0eSe6ZESufOyJ8RqKi93Fd zZeqp4/kmqKAY2c8yu6aJKqcT81K8WZv25+Y4RCXZ0TR+A81ExbJ+Ite5QCLES6P4aWw A8eA== 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=V1aUOJzlnvog/gfPWV5JW0Qf9tdncCWCmWydTboOvKw=; b=U2m9AyI5JxMdSiIPF4eqydkwBxBjDVmsvbUlgRNjFyqoJkyqLqW89T79pOjBwRyE0l KY8hh0ooeFHv5WpKKISVqqvnoHIpIAeIZG5R9H45Wxp4ukJQqLwwaBKDlzM73UtboBmy olTCd9mNr/PXgDNM1WOjtH1VzrTnR+3766thW/2OczYePjikIXdcd7+hTzyZKxg45NHn bWWGbncVrhqwWQCHMmmh4md4nHsv2VnfuA8vXmGrQ/pMHd201Ls4AW6aGm7YYnLJK262 rUxfE+KdThuM1oUaOZcz0LTOENf5qvtKkeLghCwK2i4nFb+NsQYL3woaIk2h0Dx81xat IyIw== X-Gm-Message-State: AO0yUKVImOuLo7Fu/CaajvRe2mkeHU/JI0EuNAeLWWhZJVjZIoz72VNn tO7O6dGQ7YoskQbboU4q03Y4XQ== X-Google-Smtp-Source: AK7set8/7pguR2nkrh5sfxWhRMJoc0cANOCX7qiQNTzv4aIYl17VUb020gXBfptdCuTi7LOG4aoGAA== X-Received: by 2002:a5d:6d82:0:b0:2c3:c138:e52d with SMTP id l2-20020a5d6d82000000b002c3c138e52dmr14202450wrs.4.1675778164473; Tue, 07 Feb 2023 05:56:04 -0800 (PST) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id p10-20020a5d59aa000000b002be5401ef5fsm11611312wrr.39.2023.02.07.05.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 05:56:03 -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 , Johan Hovold Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org, Linux Kernel Mailing List Subject: [PATCH v4 7/7] arm64: dts: qcom: sm8550-mtp: Add eUSB2 repeater node Date: Tue, 7 Feb 2023 15:55:51 +0200 Message-Id: <20230207135551.1418637-8-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230207135551.1418637-1-abel.vesa@linaro.org> References: <20230207135551.1418637-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-20230207_055608_158519_BE12CAF1 X-CRM114-Status: UNSURE ( 8.95 ) 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 --- The v3 (rfc) is here: https://lore.kernel.org/all/20230202133816.4026990-8-abel.vesa@linaro.org/ Changes since v3: * Dropped the phy-names property from usb_1_hsphy, like Dmitry suggested arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts index 56aab7cafcbc..6b6ec0fe5e5e 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -457,6 +457,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"; }; @@ -563,6 +568,8 @@ &usb_1_hsphy { vdd-supply = <&vreg_l1e_0p88>; vdda12-supply = <&vreg_l3e_1p2>; + phys = <&pm8550b_eusb2_repeater>; + status = "okay"; };