From patchwork Tue May 12 22:24:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11544237 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 57E9414C0 for ; Tue, 12 May 2020 22:24:53 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0BBD923126 for ; Tue, 12 May 2020 22:24:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="p2U2CzNw"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="DmFTUbcv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BBD923126 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vsLBuVF43vXu1zLAg1vgYQbvYkw1QxUp6acYHy+IXZU=; b=p2U2CzNwpYIkmL 4HINmEyYT65a266bTfgJruNqYjlFyKnjfosmAuX4lkEj95VmearCNm01G0j1vLeNilhafx38J4Y1O PWH06xBWuIpkFNno/16SW0BkWxCquSOPT92I4F8OgH6VPzUM6zckuFeN52R+VbV9n0i0e3U/e7ClB S5MJQwC7OTplOO7Bgab5dBHwTllSMdXcGzVoRDVrs33SuqVqbD44hlDsRvDVktKgsTR3K7LAsJCI5 MkMd191yjc9Z038vfd2wcN8Xp0i8d+qiKPcIgBFYMcKrpRNf8lY21Suw7yYJzb20Ilmbs8KNXLukI xCPGiF195lZ57KHBbPsg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdKW-0003ph-GH; Tue, 12 May 2020 22:24:52 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdKG-0003aI-4k; Tue, 12 May 2020 22:24:37 +0000 Received: by mail-wm1-x344.google.com with SMTP id e26so24131919wmk.5; Tue, 12 May 2020 15:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=82waVPteXNHi6dIMJjBHDsDaBtBSu7S6EIvE49VbcSw=; b=DmFTUbcvToPTVYCRVDW43Z7IyVVLKKuT1TGww9/gk5Wh5IroV3203wAuadVGzJaPr7 JCtrqtORsykQi4ipexGAEWp6cNhLT8vVWOxuYDBec2u6ArFBZkl+QHR5CZPYtXffwjwt 300YUx7oOEG/xNLsqihJxLtlu/IybZhOZ+oWGhN28/+Adj0D2sAHPzwmWW7jZ0YJ74bD n55xLzUU0xqvNj+0+JlQPJ96nKYRytPFCYxKP/AEOqgnav3R7n4MoCJd4WdJu6rwBv77 ffQdUzMu41HGnMtNsaVvdll/6AcmdaY5AyEGEA63mZL5q7N/ScaGAedzRhK0TqDPTrrx 7t0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=82waVPteXNHi6dIMJjBHDsDaBtBSu7S6EIvE49VbcSw=; b=f6NwR37obyYtm4yx5xz9LRIMBK7jT9Ew0UJPPzOIWzjLIUvUI0RtcDMnnz3PQJ9lA4 dK8wyO+DxSuYV535FSPbm5Z/zP8SZeo5lko2XJEUo1pS0OxN8WhD+gYn90RYZemFu2up FZMhPno7U3ykqmAZeD3v8p4oiMJLe9xKtGq90dSt+uLUcE8JjEHZ6yVTrgO/kus5shv7 8AaSqQ+jVcz4RN9cxTIqpPzy1VHXUday6TLucuLugmJHotAkNqY3B9ay6idob+xGVcta nCTkRrTJQS+9+oKF5q01FESYCwXNqxk2h2OzQqeslHShHVYGk+vSbGHrLnmM1b1l6a7C LPQQ== X-Gm-Message-State: AGi0PuZYcRgMuf9j23T4R+OtVdEQpvEcNaXCQnNyNEkiwa6fOEgMmFdP nkWJYkost0yY1iamVb6xKtg= X-Google-Smtp-Source: APiQypKIkp1CdypfQ0uEU9JOwaNCNbhKwWqoio9mMWBOIpnVePAlV/V6DFbSxBPtHQyPfeOIwuVXdg== X-Received: by 2002:a7b:cd04:: with SMTP id f4mr37887601wmj.3.1589322274910; Tue, 12 May 2020 15:24:34 -0700 (PDT) Received: from localhost.localdomain (p200300F137132E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3713:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b2sm21758758wrm.30.2020.05.12.15.24.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 15:24:34 -0700 (PDT) From: Martin Blumenstingl To: kishon@ti.com, robh+dt@kernel.org, vkoul@kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 1/6] dt-bindings: phy: meson8b-usb2: Convert to json-schema Date: Wed, 13 May 2020 00:24:19 +0200 Message-Id: <20200512222424.549351-2-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> References: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_152436_184804_8A985046 X-CRM114-Status: GOOD ( 14.96 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [martin.blumenstingl[at]googlemail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: narmstrong@baylibre.com, Martin Blumenstingl , Thomas Graichen , hexdump0815@googlemail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org Now that we have the DT validation in place, let's convert the device tree bindings for the Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY over to a YAML schema. While here, also add the fallback compatible string "amlogic,meson-gxbb-usb2-phy" which is already used in arch/arm/boot/dts/meson{,8,8b}.dtsi. Tested-by: Thomas Graichen Signed-off-by: Martin Blumenstingl --- .../phy/amlogic,meson8b-usb2-phy.yaml | 63 +++++++++++++++++++ .../bindings/phy/meson8b-usb2-phy.txt | 28 --------- 2 files changed, 63 insertions(+), 28 deletions(-) create mode 100644 Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml delete mode 100644 Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt diff --git a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml new file mode 100644 index 000000000000..0bd4ce39525a --- /dev/null +++ b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/phy/amlogic,meson8b-usb2-phy.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Amlogic Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY + +maintainers: + - Martin Blumenstingl + +properties: + compatible: + oneOf: + - items: + - enum: + - amlogic,meson8-usb2-phy + - amlogic,meson8b-usb2-phy + - const: amlogic,meson-mx-usb2-phy + - const: amlogic,meson-gxbb-usb2-phy + + reg: + maxItems: 1 + + clocks: + minItems: 2 + + clock-names: + items: + - const: usb_general + - const: usb + + resets: + minItems: 1 + + "#phy-cells": + const: 0 + + phy-supply: + description: + Phandle to a regulator that provides power to the PHY. This + regulator will be managed during the PHY power on/off sequence. + +required: + - compatible + - reg + - clocks + - clock-names + - "#phy-cells" + +additionalProperties: false + +examples: + - | + usb-phy@c0000000 { + compatible = "amlogic,meson-gxbb-usb2-phy"; + reg = <0xc0000000 0x20>; + resets = <&reset_usb_phy>; + clocks = <&clk_usb_general>, <&reset_usb>; + clock-names = "usb_general", "usb"; + phy-supply = <&usb_vbus>; + #phy-cells = <0>; + }; diff --git a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt b/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt deleted file mode 100644 index d81d73aea608..000000000000 --- a/Documentation/devicetree/bindings/phy/meson8b-usb2-phy.txt +++ /dev/null @@ -1,28 +0,0 @@ -* Amlogic Meson8, Meson8b and GXBB USB2 PHY - -Required properties: -- compatible: Depending on the platform this should be one of: - "amlogic,meson8-usb2-phy" - "amlogic,meson8b-usb2-phy" - "amlogic,meson-gxbb-usb2-phy" -- reg: The base address and length of the registers -- #phys-cells: should be 0 (see phy-bindings.txt in this directory) -- clocks: phandle and clock identifier for the phy clocks -- clock-names: "usb_general" and "usb" - -Optional properties: -- resets: reference to the reset controller -- phy-supply: see phy-bindings.txt in this directory - - -Example: - -usb0_phy: usb-phy@c0000000 { - compatible = "amlogic,meson-gxbb-usb2-phy"; - #phy-cells = <0>; - reg = <0x0 0xc0000000 0x0 0x20>; - resets = <&reset RESET_USB_OTG>; - clocks = <&clkc CLKID_USB>, <&clkc CLKID_USB0>; - clock-names = "usb_general", "usb"; - phy-supply = <&usb_vbus>; -}; From patchwork Tue May 12 22:24:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11544241 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8106614C0 for ; Tue, 12 May 2020 22:25:24 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 46EAF23126 for ; Tue, 12 May 2020 22:25:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SrsjEhqj"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="HIKlwMtA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46EAF23126 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JRAXBxv2fY/9rLcKWrkrQG2VdAdCyJkEw2Pwq8CJUyY=; b=SrsjEhqjJZwEGd /5c1I2n7IDL8V7FIiZ1hmgdiouazzm4QuaM/oOMkjhr7fgZsatuFT2qe21zYqDMI4LttJEcSnNihF p76H/RfrHIdPjcmStjqm1KGB6gTjy/QuKVwRztLIMmFq4tAzRFfjLwZtt2b281l6yjeqRr+trCnBZ u6xkIkEkIs8mbvr68IaADV97lu6mBO9OSStLQlxYiqaRcorZNaINer2Em+ETUeK7xGHxRMWpFXzXa YLlxiYbmXuoeP/cfNHnXG1pTZxxGO/uNKcrp/Yq8B1QY3ICcPRqiOW+n6LmgqMfhvvpBxDqvJrTMb COrPaLuA2uDr94lzL9xA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdL1-0006YY-R3; Tue, 12 May 2020 22:25:23 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdKH-0003aw-RT; Tue, 12 May 2020 22:24:39 +0000 Received: by mail-wr1-x441.google.com with SMTP id l17so4480149wrr.4; Tue, 12 May 2020 15:24:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ufv+Yo50eSZKu4boEwkvocCNnIFHsje2YroMYtajJH0=; b=HIKlwMtA2ZXj4Bw/fXw9cmHIq35HG2LYf36aRSckF4AFVu6yuExCsx1HyPmjWzlmYh YZP6N58n5xqlC/lbm3HfW9ppFcfqKSGxMc3dysjaNocvfjotgyki4hWmXbmpGi+p+r82 E3KQ+sj/Z1XWglnoZBYiSPgPixcQpS8aKMFGaSfc/eiUX0Ys/+3EjuZULd5uL0SOuW5R o1ecJM+RzdcmJ3no+r36gn5sbDBl0cTiBNiRgyh/7Th/4utgC06Fg+JCQi624PzLUlYP w7bV6xdFqf4Zu0NSuSG7cmHoZthK4bfmx0/jClZTjtmC3lvQRJ9ycs0df1pSk+chTrfM WZ9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ufv+Yo50eSZKu4boEwkvocCNnIFHsje2YroMYtajJH0=; b=HST1vb9ZpUMEDG7a2ffcpqpCrJpgYMB00Q+iI5F6g64g2b07AvLgCapc/nQ4GHQfsB q3nFY1CWNA3Wt5DIiHH4jv/Xu8aN6nkvIE+3Y5+RgDEL9rLGrw5uRNNx4cFpBgK5uMlS jwKs3ya3zyt/0yXx3Q+RJhR1nsrPqJnIOl+3lysektX6XxOkcD8foWc5qIvIx1qbuqkF lw7FB9cUPvIvcWNdcteqQea6CvSjja8MleOuVJvDLanVY2Q0i9A/TSma27hBnUjFMGQC HM1+eJv4rD3E/lFFzxxsr1VafKOI5oVUDpVF5TkVkyL4s45se7a3aBRcAIEdJlRTjZnP BTvw== X-Gm-Message-State: AGi0Pub2545qAvAzJ4C6jWpPQtQh0yLAHXXQqSsjX1WmoF7cfaaA31JX 80MjW66oeUj8gKhWTrV0d24= X-Google-Smtp-Source: APiQypI/WPHQ9nOXga6YuAxFxLZkPX/a2ZTfXeF7vKrdEToeLtObnlL2uIU+z/eGV+rnN652uHm2Kg== X-Received: by 2002:adf:9447:: with SMTP id 65mr27471285wrq.331.1589322275978; Tue, 12 May 2020 15:24:35 -0700 (PDT) Received: from localhost.localdomain (p200300F137132E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3713:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b2sm21758758wrm.30.2020.05.12.15.24.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 15:24:35 -0700 (PDT) From: Martin Blumenstingl To: kishon@ti.com, robh+dt@kernel.org, vkoul@kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 2/6] dt-bindings: phy: meson8b-usb2: Add compatible string for Meson8m2 Date: Wed, 13 May 2020 00:24:20 +0200 Message-Id: <20200512222424.549351-3-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> References: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_152437_904470_C2A7E245 X-CRM114-Status: GOOD ( 11.47 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:441 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [martin.blumenstingl[at]googlemail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , narmstrong@baylibre.com, Martin Blumenstingl , Thomas Graichen , hexdump0815@googlemail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The USB2 PHY on Meson8m2 is identical to the one on Meson8b but different to the one on Meson8. The only known difference is that Meson8 does not set the ACA_ENABLE bit while Meson8b and Meson8m2 do. Add an explicit compatible string for Meson8m2 so those differences can be taken care of. Tested-by: Thomas Graichen Acked-by: Rob Herring Signed-off-by: Martin Blumenstingl --- .../devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml index 0bd4ce39525a..03c4809dbe8d 100644 --- a/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml +++ b/Documentation/devicetree/bindings/phy/amlogic,meson8b-usb2-phy.yaml @@ -16,6 +16,7 @@ properties: - enum: - amlogic,meson8-usb2-phy - amlogic,meson8b-usb2-phy + - amlogic,meson8m2-usb2-phy - const: amlogic,meson-mx-usb2-phy - const: amlogic,meson-gxbb-usb2-phy From patchwork Tue May 12 22:24:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11544243 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2602A14C0 for ; Tue, 12 May 2020 22:25:28 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0398623126 for ; Tue, 12 May 2020 22:25:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="azNPojIv"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="sXzujmne" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0398623126 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=28NUBq5gVcUD9pvXZSjfOvOXUAcF8YY5eT5rexAL6T0=; b=azNPojIvi2iM0a u69EBL3oKdRGPrvjMUH+0rF4io9DwNZgAbMz+qYXAi38Ew/LiaUoeGIoFAGjVywL9Ls4Yh07YusRo +wj3DPhTMb00Vu8gsej7Fs+DH4lFuK8MfiQeohZwzrlxwIRKZOKqNbA+LzmE5E8hp1mCq1UG86GPO qmxdVZk86dbav1V2Kk61vUz0pA4jjNZZA2he0qrjkZJrD+2OCwgOh0Ce6uk1N8RdK/vDzsrIIl4zg DSsOS3KswJZufZ7UfuAlquNIMB2DAGuiJ0xhlGCVngqQ/+2tjxYnK5wHfedwQ/h0eWiwTS0cQq8w3 CCpTa5+uN8tiQI4ThbXQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdL4-0006bA-St; Tue, 12 May 2020 22:25:26 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdKI-0003bI-NW; Tue, 12 May 2020 22:24:40 +0000 Received: by mail-wm1-x341.google.com with SMTP id w19so11095184wmc.1; Tue, 12 May 2020 15:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PjJLkn9PoPDXRl4+jY4u2mwSqR91lgzHQdcLZQFcvtw=; b=sXzujmneDvKtWimMIKGU6JMKfbjB6Ol4KRmuhfTQBHl1w+F4CnrMRDOwjoG47CskiG d7gnwknBYen2iiPHjHFJBtk4N4QfiNjwg+3f1RuhEUCDEiJmm1pMssgzTsHRUHZNujIU +/2N8a4FeAJzcjvxw9cEtxUusZnr/4HgLjAlXwipu/gDNoPuWAYVmg1PAe3OfPtb3far g/Fb3qg2CuzCF/vmvAEM59Xc/A2X6gm6p21MZJAVDCcxpF6/AGj9VSVof+gBjVeaokjf 7Nqj8uLBqRdzconWE2YTdQpE5erNsBy80ZTGBCZAP4KBIFhhilgUwYKS0XMUmFMkVf9p YUhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PjJLkn9PoPDXRl4+jY4u2mwSqR91lgzHQdcLZQFcvtw=; b=f8LBj3COF4lnDOX7mfWbJ/BWVeydk8KtvgWp1dQ4tv5rc0WfVHKvjH0TFfGk6VlgMC Y/OX44s2HhOaoFz/ump+u0sCKhEtSspEB0Qhhbqa0GvXqWF26DcV4WkDqj7RmrX0pOsz v4chgpfSsaOKSiQ0CkxwGrrK5g0sBgwkn7RciIawRc7xeR3KMiHA1HTSpYdmKLg5N5Mz pBR/fBuzyRPMCJHJyQarCUYfkFacLabvGZWBZxOq8+yByHPtdefJ7JT0IizM2kfLqIO4 52iiUg9B7vNMJQyglSfAmdIVJldAX4qdxhFqyjr3ig+I0q2iUW7SvOi23rUNLpr5BV0J ko2A== X-Gm-Message-State: AGi0PubPj/SSMJNGmzuCWchA8Tw3VuRU4wyUekL+vxclFqh+ywhqcWEY r8M7qn1vy7PQNCCCQmXpPSM= X-Google-Smtp-Source: APiQypK5Co/sSecmnb8Pg+BTKxMJYZynYQrKN0eBRku8rZYr9eaJGjy5BjtcYQplq4sjlCVvi1mXEQ== X-Received: by 2002:a1c:e305:: with SMTP id a5mr22450878wmh.1.1589322276996; Tue, 12 May 2020 15:24:36 -0700 (PDT) Received: from localhost.localdomain (p200300F137132E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3713:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b2sm21758758wrm.30.2020.05.12.15.24.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 15:24:36 -0700 (PDT) From: Martin Blumenstingl To: kishon@ti.com, robh+dt@kernel.org, vkoul@kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 3/6] phy: amlogic: meson8b-usb2: Use a MMIO regmap Date: Wed, 13 May 2020 00:24:21 +0200 Message-Id: <20200512222424.549351-4-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> References: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_152438_789217_FF6391A0 X-CRM114-Status: GOOD ( 16.80 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [martin.blumenstingl[at]googlemail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: narmstrong@baylibre.com, Martin Blumenstingl , Thomas Graichen , hexdump0815@googlemail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org Using a MMIO regmap and switch to regmap_update_bits() to simplify the code in the driver. Also switch to devm_platform_ioremap_resource() instead of open-coding it. No functional changes intended. Tested-by: Thomas Graichen Signed-off-by: Martin Blumenstingl --- drivers/phy/amlogic/Kconfig | 1 + drivers/phy/amlogic/phy-meson8b-usb2.c | 73 ++++++++++++-------------- 2 files changed, 35 insertions(+), 39 deletions(-) diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig index 71801e30d601..3495b23af797 100644 --- a/drivers/phy/amlogic/Kconfig +++ b/drivers/phy/amlogic/Kconfig @@ -9,6 +9,7 @@ config PHY_MESON8B_USB2 depends on USB_SUPPORT select USB_COMMON select GENERIC_PHY + select REGMAP_MMIO help Enable this to support the Meson USB2 PHYs found in Meson8, Meson8b and GXBB SoCs. diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c index bd66bd723e4a..86824cc21f11 100644 --- a/drivers/phy/amlogic/phy-meson8b-usb2.c +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -105,34 +106,24 @@ #define ACA_ENABLE_COMPLETE_TIME 50 struct phy_meson8b_usb2_priv { - void __iomem *regs; + struct regmap *regmap; enum usb_dr_mode dr_mode; struct clk *clk_usb_general; struct clk *clk_usb; struct reset_control *reset; }; -static u32 phy_meson8b_usb2_read(struct phy_meson8b_usb2_priv *phy_priv, - u32 reg) -{ - return readl(phy_priv->regs + reg); -} - -static void phy_meson8b_usb2_mask_bits(struct phy_meson8b_usb2_priv *phy_priv, - u32 reg, u32 mask, u32 value) -{ - u32 data; - - data = phy_meson8b_usb2_read(phy_priv, reg); - data &= ~mask; - data |= (value & mask); - - writel(data, phy_priv->regs + reg); -} +static const struct regmap_config phy_meson8b_usb2_regmap_conf = { + .reg_bits = 8, + .val_bits = 32, + .reg_stride = 4, + .max_register = REG_TUNE, +}; static int phy_meson8b_usb2_power_on(struct phy *phy) { struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); + u32 reg; int ret; if (!IS_ERR_OR_NULL(priv->reset)) { @@ -156,34 +147,34 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) return ret; } - phy_meson8b_usb2_mask_bits(priv, REG_CONFIG, REG_CONFIG_CLK_32k_ALTSEL, - REG_CONFIG_CLK_32k_ALTSEL); + regmap_update_bits(priv->regmap, REG_CONFIG, REG_CONFIG_CLK_32k_ALTSEL, + REG_CONFIG_CLK_32k_ALTSEL); - phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_REF_CLK_SEL_MASK, - 0x2 << REG_CTRL_REF_CLK_SEL_SHIFT); + regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_REF_CLK_SEL_MASK, + 0x2 << REG_CTRL_REF_CLK_SEL_SHIFT); - phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_FSEL_MASK, - 0x5 << REG_CTRL_FSEL_SHIFT); + regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_FSEL_MASK, + 0x5 << REG_CTRL_FSEL_SHIFT); /* reset the PHY */ - phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_POWER_ON_RESET, - REG_CTRL_POWER_ON_RESET); + regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET, + REG_CTRL_POWER_ON_RESET); udelay(RESET_COMPLETE_TIME); - phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_POWER_ON_RESET, 0); + regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_POWER_ON_RESET, 0); udelay(RESET_COMPLETE_TIME); - phy_meson8b_usb2_mask_bits(priv, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, - REG_CTRL_SOF_TOGGLE_OUT); + regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, + REG_CTRL_SOF_TOGGLE_OUT); if (priv->dr_mode == USB_DR_MODE_HOST) { - phy_meson8b_usb2_mask_bits(priv, REG_ADP_BC, - REG_ADP_BC_ACA_ENABLE, - REG_ADP_BC_ACA_ENABLE); + regmap_update_bits(priv->regmap, REG_ADP_BC, + REG_ADP_BC_ACA_ENABLE, + REG_ADP_BC_ACA_ENABLE); udelay(ACA_ENABLE_COMPLETE_TIME); - if (phy_meson8b_usb2_read(priv, REG_ADP_BC) & - REG_ADP_BC_ACA_PIN_FLOAT) { + regmap_read(priv->regmap, REG_ADP_BC, ®); + if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { dev_warn(&phy->dev, "USB ID detect failed!\n"); clk_disable_unprepare(priv->clk_usb); clk_disable_unprepare(priv->clk_usb_general); @@ -213,18 +204,22 @@ static const struct phy_ops phy_meson8b_usb2_ops = { static int phy_meson8b_usb2_probe(struct platform_device *pdev) { struct phy_meson8b_usb2_priv *priv; - struct resource *res; struct phy *phy; struct phy_provider *phy_provider; + void __iomem *base; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->regs = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(priv->regs)) - return PTR_ERR(priv->regs); + base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(base)) + return PTR_ERR(base); + + priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, + &phy_meson8b_usb2_regmap_conf); + if (IS_ERR(priv->regmap)) + return PTR_ERR(priv->regmap); priv->clk_usb_general = devm_clk_get(&pdev->dev, "usb_general"); if (IS_ERR(priv->clk_usb_general)) From patchwork Tue May 12 22:24:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11544247 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ECB5714C0 for ; Tue, 12 May 2020 22:25:41 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id B24E523126 for ; Tue, 12 May 2020 22:25:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gMkahBdW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="l0Q6aaZM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B24E523126 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iqH8IMN9O0FaQ0gywKebdddwUkiDRaDCTN48prANc4k=; b=gMkahBdWDv7/pU PMme0sBfnl77LL8Oi4htDeOlhvJaIkZbIf982TI7EPAQx8XIBys8X6iydr2Js/pubWpWgCnI+6hRZ Qkj4Kw4lej2MbWLbhBG/9T3qasTjAByQi+57IWoFSNHDQBTBALwaMMsbW529VgryIiNyt9xshM5Zf RZGAfDOPpO1EJUAnFcVkono4/NY8Wbsj6mYcOAoeM7TZW4FFBbU0hXpQMxDNVm7SJzIDv14n9WmDl DGpt3nYdbFvAqX/IDyDlYV8NR+ZGI5O+xtD9BFQxs2N0un7K8uLs2nx6PKY2QfrjI3wJhUAd1Jjht 1iFpmBG4u2KzvlNbWXkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdLI-0006q4-TS; Tue, 12 May 2020 22:25:40 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdKK-0003d8-Ai; Tue, 12 May 2020 22:24:41 +0000 Received: by mail-wr1-x442.google.com with SMTP id v12so17998052wrp.12; Tue, 12 May 2020 15:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uHVRsCOT9MyMisZFgSTwlSLvLYQeGqXXf2R8XWiMUgQ=; b=l0Q6aaZMyvU10IB4ybnWRKE3f63txu5zwml68AOPUfCKi3ap27AmbKA2je7xoYYPYX HXgjZdpYg+hbCSgdJKfruqF6k5Lm1VCHZIgR5EJ3KIXSCpY/8ioJwWuAb3OTli6eXFac Y8Aw79TNWRjuNNhDbhMjA7Qmuo3f4RHVaiwY777BVjJfetkNXmOKjCXrBKpaWdaIHYvH l4JyKVPQ9E1veTLB9ocMA30dlNfmUCk2JxRPs6L5E+e7vU6S09OoSz4SN/1133K+exaO 2x3KAiOPgffuEmcEo9Q1yrFlXM+YdaDIc5E1qZQqL65z5oE8Dtmc9sZKCiHpkdi89AZe Y9nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uHVRsCOT9MyMisZFgSTwlSLvLYQeGqXXf2R8XWiMUgQ=; b=T78EATDfMZYLMGHkEXiKAGDCwHNijFD3R3PfXKDwnJ5cepclyrH4R3j5M9bK3U9qKV 7u9U+6RaJbsiKmdWJbmF4izExNqi0QdxWuD/wAF1F/7mZa/CbBt22iXoYs6Sa8ZxnQ3Q cWoNAYRaNayl4K5dDbo/vURlSU6OcFXml5CyjnsWILFtSU1TQOIO9c0d4WIScUkzCLR7 6wBNtT4RSLz2ICXlBKmmlnev0qhhSqY7eSrA00W0PuFTWFPC2fP0MI2Inm/EmYiZFeI3 wN9x3pWGR+NSjNplDvj3ISmN6/BqViTkZKvWIm24pvujIQBLcU5IpjxFrKWsOWKIZUc/ Wxpw== X-Gm-Message-State: AGi0PuZACbMcB94KomSiuSmluxLXMZ8cca5+m0ZmICMZZT92rHGbwb3D PZy8VkRVX/Es2x0mhpj1hF4= X-Google-Smtp-Source: APiQypLlX7OBgWwJ5Mrl6AtPKJWwIkazZXuqTvjrOxW56YG+AWsf3arrFPANxHmM2ma91CACjvd0yA== X-Received: by 2002:adf:c38c:: with SMTP id p12mr28947458wrf.357.1589322278537; Tue, 12 May 2020 15:24:38 -0700 (PDT) Received: from localhost.localdomain (p200300F137132E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3713:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b2sm21758758wrm.30.2020.05.12.15.24.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 15:24:37 -0700 (PDT) From: Martin Blumenstingl To: kishon@ti.com, robh+dt@kernel.org, vkoul@kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 4/6] phy: amlogic: meson8b-usb2: Don't set REG_ADP_BC_ACA_ENABLE on Meson8 Date: Wed, 13 May 2020 00:24:22 +0200 Message-Id: <20200512222424.549351-5-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> References: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_152440_380172_3BEFB8AE X-CRM114-Status: GOOD ( 15.37 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [martin.blumenstingl[at]googlemail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: narmstrong@baylibre.com, Martin Blumenstingl , Thomas Graichen , hexdump0815@googlemail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org Skip setting REG_ADP_BC_ACA_ENABLE on Meson8 SoCs and polling for the REG_ADP_BC_ACA_PIN_FLOAT bit. The vendor also skips this part on Meson8 SoCs. This fixes initialization of the host-only USB PHY on Meson8 which would otherwise fail with "USB ID detect failed!". Fixes: 4a3449d1a0a10c ("phy: meson8b-usb2: add support for the USB PHY on Meson8 SoCs") Reported-by: Thomas Graichen Tested-by: Thomas Graichen Signed-off-by: Martin Blumenstingl --- drivers/phy/amlogic/phy-meson8b-usb2.c | 48 ++++++++++++++++++++------ 1 file changed, 38 insertions(+), 10 deletions(-) diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c index 86824cc21f11..7236b8885f07 100644 --- a/drivers/phy/amlogic/phy-meson8b-usb2.c +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -105,12 +106,17 @@ #define RESET_COMPLETE_TIME 500 #define ACA_ENABLE_COMPLETE_TIME 50 +struct phy_meson8b_usb2_match_data { + bool host_enable_aca; +}; + struct phy_meson8b_usb2_priv { - struct regmap *regmap; - enum usb_dr_mode dr_mode; - struct clk *clk_usb_general; - struct clk *clk_usb; - struct reset_control *reset; + struct regmap *regmap; + enum usb_dr_mode dr_mode; + struct clk *clk_usb_general; + struct clk *clk_usb; + struct reset_control *reset; + const struct phy_meson8b_usb2_match_data *match; }; static const struct regmap_config phy_meson8b_usb2_regmap_conf = { @@ -166,7 +172,8 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, REG_CTRL_SOF_TOGGLE_OUT); - if (priv->dr_mode == USB_DR_MODE_HOST) { + if (priv->dr_mode == USB_DR_MODE_HOST && + priv->match->host_enable_aca) { regmap_update_bits(priv->regmap, REG_ADP_BC, REG_ADP_BC_ACA_ENABLE, REG_ADP_BC_ACA_ENABLE); @@ -216,6 +223,10 @@ static int phy_meson8b_usb2_probe(struct platform_device *pdev) if (IS_ERR(base)) return PTR_ERR(base); + priv->match = device_get_match_data(&pdev->dev); + if (!priv->match) + return -ENODEV; + priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, &phy_meson8b_usb2_regmap_conf); if (IS_ERR(priv->regmap)) @@ -254,11 +265,28 @@ static int phy_meson8b_usb2_probe(struct platform_device *pdev) return PTR_ERR_OR_ZERO(phy_provider); } +static const struct phy_meson8b_usb2_match_data phy_meson8_usb2_match_data = { + .host_enable_aca = false, +}; + +static const struct phy_meson8b_usb2_match_data phy_meson8b_usb2_match_data = { + .host_enable_aca = true, +}; + static const struct of_device_id phy_meson8b_usb2_of_match[] = { - { .compatible = "amlogic,meson8-usb2-phy", }, - { .compatible = "amlogic,meson8b-usb2-phy", }, - { .compatible = "amlogic,meson-gxbb-usb2-phy", }, - { }, + { + .compatible = "amlogic,meson8-usb2-phy", + .data = &phy_meson8_usb2_match_data + }, + { + .compatible = "amlogic,meson8b-usb2-phy", + .data = &phy_meson8b_usb2_match_data + }, + { + .compatible = "amlogic,meson-gxbb-usb2-phy", + .data = &phy_meson8b_usb2_match_data + }, + { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, phy_meson8b_usb2_of_match); From patchwork Tue May 12 22:24:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11544249 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C36314C0 for ; Tue, 12 May 2020 22:25:44 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 7A2D023126 for ; Tue, 12 May 2020 22:25:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ipv5kHtf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="tC62i/6x" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A2D023126 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mnsq6J0uteeT/Ybqq3TFgfA9odZQ+tyzecMn/XJWxOA=; b=Ipv5kHtfmxB1IT qZGWbz84rpzU/yuVbdK5zK+/kidodkDSFnqRI+NIVEH6v01MdtNAzDzhv297TFHdTMOYbZX7w4LK7 sXdEMvH9sXmxkgnQiJgJOIMWOeklZjnNW/yDe82zQ03YR/jK+W63nPPhWNDA4644J1SaPej/emvAG 7/Q7TKRjuqPDAS0bNI8871dYy3BVo4KdBoBOi3LVWXmZaCSY3F7MGt0A9DJGiuUBDeiiAP6fr3mQ0 i0b6xdR6a7reauFHmZCebDNPfJIMA+TnKKHom2Kv65zcV+clCFaT3HP1b4g20fHT7W2xa/MnDYh2G nAtC2vttbuIHIPewE2yQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdLL-0006tU-KH; Tue, 12 May 2020 22:25:43 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdKL-0003eL-IH; Tue, 12 May 2020 22:24:43 +0000 Received: by mail-wm1-x342.google.com with SMTP id e26so24132055wmk.5; Tue, 12 May 2020 15:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fWp37uKUDpwomXWa/aIQXLmU2FLlzJyWeA81xl/sOwk=; b=tC62i/6xkzIkxqgPl9BJqQyxGIvTg5pd3zHGsIWyYc1BB2pk+poW0X33w5qgL8af3U MoQ2pX+pua0szFl29Qhlmsea5fayxALBOtqBV7+8GGbNLq6qKJzGOVtYKLk0LHzt8J1o svg9uEpuoNrqkCK0e7sH2caNhMztgiWR9sFgPXSPuVZY1LFm+hLsYzRRjnw1SBolXJ+W l9VuNS+WuUvSFJTBFFl6F65Z++OVIyl0EPTvNXmDLYeEMhJePd4JBBPThfQ8VRak/Ef9 ytG6OOgWMbshtPdYywM1cc8tiH4sjPqCN0oLBzBID9TOqM1i2O1a45bV2YkXsHaCkB6P s0tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fWp37uKUDpwomXWa/aIQXLmU2FLlzJyWeA81xl/sOwk=; b=D/A3DbGBskysqVtyvMbZZGGUJiEWtNtb7B1F4Y+QNiSOuxMiVPw0Kul5Lg5fwTz6Ty 8RAtmDRCaSTG0aTXoK/5NHFYcrldBXN+EGR73H51NVQdo8THYE4KnjizwqYPD3C2Gys9 YUg9YRX8lo9eJaHEDWxwiubbkn0dJUkriX+fPSe8jPCK02IfcRcK3nwxPUtyXB9Odf97 2tJXiyrl6tgDzQL3bTUEggzxtg0Cwihh1PsMZQ79VEVC6CMVB4a8FCyf4Wr/Vf1fFo8h 5hGF2mJMtAWzgTeeJXlE1aOC+RBFX6inx6dGVrNt5RrybrFjGOAaSyVD9ZdZoA6VAWvV ISxA== X-Gm-Message-State: AGi0PubHB0S4fV8B2BOerU5BrAmlPyj8ZXYAmtpilQCH8EfxrTW4VzQW rIBVwryRIPlBkm/+rcmWF9o= X-Google-Smtp-Source: APiQypI8HaPJS6tn/3p1+VJ3j0duckvAyujR9VAElNDzCa/9oefAMAjeT0RqFgb8MsChyKF/SDPM9g== X-Received: by 2002:a1c:f416:: with SMTP id z22mr39644193wma.32.1589322279649; Tue, 12 May 2020 15:24:39 -0700 (PDT) Received: from localhost.localdomain (p200300F137132E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3713:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b2sm21758758wrm.30.2020.05.12.15.24.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 15:24:39 -0700 (PDT) From: Martin Blumenstingl To: kishon@ti.com, robh+dt@kernel.org, vkoul@kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 5/6] phy: amlogic: meson8b-usb2: unset the IDDQ bit during PHY power-on Date: Wed, 13 May 2020 00:24:23 +0200 Message-Id: <20200512222424.549351-6-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> References: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_152441_644079_0467A841 X-CRM114-Status: GOOD ( 13.12 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:342 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [martin.blumenstingl[at]googlemail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: narmstrong@baylibre.com, Martin Blumenstingl , Thomas Graichen , hexdump0815@googlemail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The vendor driver unsets the set_iddig bit during power-on as well and sets it when suspending the PHY. I did not notice this in the vendor driver first, because it's part of the dwc_otg driver there (instead of their PHY code). While here, also add all other REG_DBG_UART register bit definitions. Tested-by: Thomas Graichen Signed-off-by: Martin Blumenstingl --- drivers/phy/amlogic/phy-meson8b-usb2.c | 44 +++++++++++++++++++------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c index 7236b8885f07..436dfa1a8a04 100644 --- a/drivers/phy/amlogic/phy-meson8b-usb2.c +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c @@ -78,6 +78,17 @@ #define REG_ADP_BC_ACA_PIN_FLOAT BIT(26) #define REG_DBG_UART 0x10 + #define REG_DBG_UART_BYPASS_SEL BIT(0) + #define REG_DBG_UART_BYPASS_DM_EN BIT(1) + #define REG_DBG_UART_BYPASS_DP_EN BIT(2) + #define REG_DBG_UART_BYPASS_DM_DATA BIT(3) + #define REG_DBG_UART_BYPASS_DP_DATA BIT(4) + #define REG_DBG_UART_FSV_MINUS BIT(5) + #define REG_DBG_UART_FSV_PLUS BIT(6) + #define REG_DBG_UART_FSV_BURN_IN_TEST BIT(7) + #define REG_DBG_UART_LOOPBACK_EN_B BIT(8) + #define REG_DBG_UART_SET_IDDQ BIT(9) + #define REG_DBG_UART_ATE_RESET BIT(10) #define REG_TEST 0x14 #define REG_TEST_DATA_IN_MASK GENMASK(3, 0) @@ -172,20 +183,24 @@ static int phy_meson8b_usb2_power_on(struct phy *phy) regmap_update_bits(priv->regmap, REG_CTRL, REG_CTRL_SOF_TOGGLE_OUT, REG_CTRL_SOF_TOGGLE_OUT); - if (priv->dr_mode == USB_DR_MODE_HOST && - priv->match->host_enable_aca) { - regmap_update_bits(priv->regmap, REG_ADP_BC, - REG_ADP_BC_ACA_ENABLE, - REG_ADP_BC_ACA_ENABLE); + if (priv->dr_mode == USB_DR_MODE_HOST) { + regmap_update_bits(priv->regmap, REG_DBG_UART, + REG_DBG_UART_SET_IDDQ, 0); - udelay(ACA_ENABLE_COMPLETE_TIME); + if (priv->match->host_enable_aca) { + regmap_update_bits(priv->regmap, REG_ADP_BC, + REG_ADP_BC_ACA_ENABLE, + REG_ADP_BC_ACA_ENABLE); - regmap_read(priv->regmap, REG_ADP_BC, ®); - if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { - dev_warn(&phy->dev, "USB ID detect failed!\n"); - clk_disable_unprepare(priv->clk_usb); - clk_disable_unprepare(priv->clk_usb_general); - return -EINVAL; + udelay(ACA_ENABLE_COMPLETE_TIME); + + regmap_read(priv->regmap, REG_ADP_BC, ®); + if (reg & REG_ADP_BC_ACA_PIN_FLOAT) { + dev_warn(&phy->dev, "USB ID detect failed!\n"); + clk_disable_unprepare(priv->clk_usb); + clk_disable_unprepare(priv->clk_usb_general); + return -EINVAL; + } } } @@ -196,6 +211,11 @@ static int phy_meson8b_usb2_power_off(struct phy *phy) { struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy); + if (priv->dr_mode == USB_DR_MODE_HOST) + regmap_update_bits(priv->regmap, REG_DBG_UART, + REG_DBG_UART_SET_IDDQ, + REG_DBG_UART_SET_IDDQ); + clk_disable_unprepare(priv->clk_usb); clk_disable_unprepare(priv->clk_usb_general); From patchwork Tue May 12 22:24:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 11544257 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AB44514C0 for ; Tue, 12 May 2020 22:26:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 890B723126 for ; Tue, 12 May 2020 22:26:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="C0sDdL+X"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=googlemail.com header.i=@googlemail.com header.b="SrTd/ro7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 890B723126 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3JJJQ8yGOgiywMgmEKUtkpQQtGRZqvgkuQS4jGlrx8Y=; b=C0sDdL+X2kByQg N/ylT7DZsWGC/1UwGbf3rOKO89bzwDo48xjyx55M4nEdLiwwj+EvMmY+RKf8xdUV/ksi/FusZMgRq tjHP56uNzHpzw9KtoTDSiGKkzelIYk2hvxFtoIi/77BQ/uPxSG74BsWb84H5k2V4/9yx4UQxxcK4a p52JOr+kdieG62xidKQv8VzONhoeVzEcYiuaicu8TWJQqheOjxDMcAfy3APoRz7JfA2arRGjhVFAx 5i/5C9taJqfVrw1OnTgjDprIRKghCWU69wURza77AR7y0C2jK0UW+TFED0WRUBlcgtUAuGhxdcxBF uJpaSIpeP2ifrwc4ChOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdMC-0007o4-09; Tue, 12 May 2020 22:26:36 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jYdKM-0003fQ-Jm; Tue, 12 May 2020 22:24:44 +0000 Received: by mail-wm1-x343.google.com with SMTP id g14so10386855wme.1; Tue, 12 May 2020 15:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=T6/lnxUNaPxPPXlTLJRj6AhR7vTkkb3EZ8aqBlM0OWk=; b=SrTd/ro7AvaEauxrrPTxDh3wvmrjWHigYFTwI6OCAchA0LTOoEpBuyhjdECOi3W5JP nloq0YQb4LVaFJ6VN6jMc4vp45mu2GK2NfcpiPSB7PZcjFY/G4TJ/29TgVI+riddVEoL zUHupnteXosHUlb6g5tBM3MRUBRaAsYsPgJw5YGIK6TJcOeGeHWH2noAhwAjEgJ7xuNp NNWp6qZDm9EDrFYn8eWry4sxi1E95y7tlM33Mvgvv9fYzK+5509XDCTKjRnTh53apiu2 Uz9wc7CXgR42yew0ceWmexHuk4qJEcsX4qtzfW0GyiDsj0ePezsQiGlpEqBQz3rQxeQC ZpSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=T6/lnxUNaPxPPXlTLJRj6AhR7vTkkb3EZ8aqBlM0OWk=; b=eErfbnQ+0QxJmAserSkAvDjD2wtWmjANQloBMDXYxc6cFfMgJFbxT3ScL7aLacWdFq YNeyTpuw2zUrxxOFLMMH8jo20mTCTgm8hXGe7TUA5Oeuje190P2sIgusSARDy0VC7LvP 6+b7a4I3Mk09ETNTE2Zo8jtMl/q0n/AVsetU4FkZWlxnZwHFjVSILc4B0gsuFnAnGh7o I/NJ+F77Q9ozMVYDPXs0bDdKe55E/KMoM67VKyH7hds34khFy0uzqHAOSQp6AUxk4/4Y I2souB7myZ1Qeb4Adcv0lpvcLUG4yBEfLEwzLL9s3iL3IS7Kfpw5EJ6YJrXJIDZ5y909 Y08g== X-Gm-Message-State: AGi0Pua+nxCYhIuWZ11/3LwFqljiRJzFyhcutDdE5eljMBJoikpNxkyn G70Ej7vmN9IyXiEl3fkQ520= X-Google-Smtp-Source: APiQypIFFG9NZZdOzQj9vGlbbtC4ygVpYGhkLOO2LmO2sp/3GaDT2eT9UR+jUxCZfNfk8KIGsqyO7A== X-Received: by 2002:a1c:f211:: with SMTP id s17mr43022273wmc.168.1589322280765; Tue, 12 May 2020 15:24:40 -0700 (PDT) Received: from localhost.localdomain (p200300F137132E00428D5CFFFEB99DB8.dip0.t-ipconnect.de. [2003:f1:3713:2e00:428d:5cff:feb9:9db8]) by smtp.googlemail.com with ESMTPSA id b2sm21758758wrm.30.2020.05.12.15.24.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 15:24:40 -0700 (PDT) From: Martin Blumenstingl To: kishon@ti.com, robh+dt@kernel.org, vkoul@kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 6/6] phy: amlogic: meson8b-usb2: Add a compatible string for Meson8m2 Date: Wed, 13 May 2020 00:24:24 +0200 Message-Id: <20200512222424.549351-7-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> References: <20200512222424.549351-1-martin.blumenstingl@googlemail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200512_152442_666052_18A466F9 X-CRM114-Status: GOOD ( 12.96 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [martin.blumenstingl[at]googlemail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: narmstrong@baylibre.com, Martin Blumenstingl , Thomas Graichen , hexdump0815@googlemail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org The 3.10 vendor kernel sets the ACA_ENABLE bit on Meson8b, Meson8m2 and GXBB, but not on Meson8. Add a compatible string for Meson8m2 which also sets that bit. While here, also update the Kconfig text and MODULE_DESCRIPTION. Tested-by: Thomas Graichen Signed-off-by: Martin Blumenstingl --- drivers/phy/amlogic/Kconfig | 2 +- drivers/phy/amlogic/phy-meson8b-usb2.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/phy/amlogic/Kconfig b/drivers/phy/amlogic/Kconfig index 3495b23af797..5ec53874d1ea 100644 --- a/drivers/phy/amlogic/Kconfig +++ b/drivers/phy/amlogic/Kconfig @@ -3,7 +3,7 @@ # Phy drivers for Amlogic platforms # config PHY_MESON8B_USB2 - tristate "Meson8, Meson8b and GXBB USB2 PHY driver" + tristate "Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY driver" default ARCH_MESON depends on OF && (ARCH_MESON || COMPILE_TEST) depends on USB_SUPPORT diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c index 436dfa1a8a04..03c061dd5f0d 100644 --- a/drivers/phy/amlogic/phy-meson8b-usb2.c +++ b/drivers/phy/amlogic/phy-meson8b-usb2.c @@ -302,6 +302,10 @@ static const struct of_device_id phy_meson8b_usb2_of_match[] = { .compatible = "amlogic,meson8b-usb2-phy", .data = &phy_meson8b_usb2_match_data }, + { + .compatible = "amlogic,meson8m2-usb2-phy", + .data = &phy_meson8b_usb2_match_data + }, { .compatible = "amlogic,meson-gxbb-usb2-phy", .data = &phy_meson8b_usb2_match_data @@ -320,5 +324,5 @@ static struct platform_driver phy_meson8b_usb2_driver = { module_platform_driver(phy_meson8b_usb2_driver); MODULE_AUTHOR("Martin Blumenstingl "); -MODULE_DESCRIPTION("Meson8, Meson8b and GXBB USB2 PHY driver"); +MODULE_DESCRIPTION("Meson8, Meson8b, Meson8m2 and GXBB USB2 PHY driver"); MODULE_LICENSE("GPL");