From patchwork Sat Mar 28 13:53:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 11463557 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 87965159A for ; Sat, 28 Mar 2020 13:56:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4E9BE20723 for ; Sat, 28 Mar 2020 13:56:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.b="Zj9977bH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbgC1N4o (ORCPT ); Sat, 28 Mar 2020 09:56:44 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:36669 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbgC1N4o (ORCPT ); Sat, 28 Mar 2020 09:56:44 -0400 Received: by mail-wm1-f67.google.com with SMTP id g62so15833730wme.1 for ; Sat, 28 Mar 2020 06:56:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NMjjibIIWKkjS3mT8K/LaAOt0umug6ECpFrUMrbf80Q=; b=Zj9977bHjaB09yAPwDZyZzHGCvoSs+HuKu40DVFrBL6m5HHOFap7vzBixOfnMnvwij dfHrqHrvmsvbPpci7d62jcfiL70Daz+0xw4quqpeO7lTqEu/9bMoHgSXpNvUuXuHMbI7 A15BLvvngWVwADRaarQJIckd8YldLeV49pllURCFP6ozg588tcIRtSwLf6CpBEC79kPc UshHAAiGC4kVXvuqZO3GSW2HCXkYBDwZ2091G5eotPZ4e2KqLadqLA0wv27G5sFTMahP /DRK/1R+X+jiUjHJv3vrlRvknlXjSrBV+ynPLd1GuCHBGkes9QPTR4iyKGf4WMvNNw+r uz5Q== 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:mime-version :content-transfer-encoding; bh=NMjjibIIWKkjS3mT8K/LaAOt0umug6ECpFrUMrbf80Q=; b=V3IOD0Iuc5pW1qP2NnSj5gdRJq6IA3wMC9lioaorED1MXydxJHuxZ0L9Nw3J5fOF9Q Z531UygCSBJXY7XcqBnpx4GLccGBBfbEfAK5mcdrSbdNFzI1NfEPl1U/CFXWrwZPQfTG bLM3pvil/3pmkoZcAulQNtxcUyb06ilmwutyJmKWa5/MoBp+N+E8+OIvSn2dEXWV2qTG NknqSBChZ37CPFKyTGpN23s9O+Or58L+F92zaPZXQ3i7ruDW3yiUgkYXpp8bhqbSRarW H0Yh2AJW58rvS4DSThLBZoqSe7LFPkH2Br2d2UXNo+qFZtqIKlcUq49hHfKQLd3mG5pg QiiQ== X-Gm-Message-State: ANhLgQ02FjDVknOYPXqHbqMnbobrTzevdjGVXErjboUxaWwfVBx+/Q+R 7me3cGlIxKc1AFMXbt4Ucd6aIw== X-Google-Smtp-Source: ADFU+vucBnK4QBDQ0SlXaKME/T+OFBV0XfuTMEMJbY9YzNL1c1gitEsNS70qbDqQJ69i2Q64Mg41Jg== X-Received: by 2002:a05:600c:257:: with SMTP id 23mr4104677wmj.155.1585403802961; Sat, 28 Mar 2020 06:56:42 -0700 (PDT) Received: from localhost.localdomain (dh207-96-177.xnet.hr. [88.207.96.177]) by smtp.googlemail.com with ESMTPSA id f12sm8461975wrm.94.2020.03.28.06.56.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Mar 2020 06:56:42 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, kishon@ti.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: John Crispin , Robert Marko , Luka Perkov Subject: [PATCH v4 1/3] phy: add driver for Qualcomm IPQ40xx USB PHY Date: Sat, 28 Mar 2020 14:53:47 +0100 Message-Id: <20200328135345.695622-1-robert.marko@sartura.hr> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: John Crispin Add a driver to setup the USB phy on Qualcom Dakota SoCs. The driver sets up HS and SS phys. Signed-off-by: John Crispin Signed-off-by: Robert Marko Cc: Luka Perkov --- Changes from v2 to v3: * Remove magic writes as they are not needed * Correct commit message drivers/phy/qualcomm/Kconfig | 7 + drivers/phy/qualcomm/Makefile | 1 + drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c | 152 ++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c diff --git a/drivers/phy/qualcomm/Kconfig b/drivers/phy/qualcomm/Kconfig index e46824da29f6..964bd5d784d2 100644 --- a/drivers/phy/qualcomm/Kconfig +++ b/drivers/phy/qualcomm/Kconfig @@ -18,6 +18,13 @@ config PHY_QCOM_APQ8064_SATA depends on OF select GENERIC_PHY +config PHY_QCOM_IPQ4019_USB + tristate "Qualcomm IPQ4019 USB PHY module" + depends on OF && ARCH_QCOM + select GENERIC_PHY + help + Support for the USB PHY on QCOM IPQ4019/Dakota chipsets. + config PHY_QCOM_IPQ806X_SATA tristate "Qualcomm IPQ806x SATA SerDes/PHY driver" depends on ARCH_QCOM diff --git a/drivers/phy/qualcomm/Makefile b/drivers/phy/qualcomm/Makefile index 283251d6a5d9..8afe6c4f5178 100644 --- a/drivers/phy/qualcomm/Makefile +++ b/drivers/phy/qualcomm/Makefile @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_PHY_ATH79_USB) += phy-ath79-usb.o obj-$(CONFIG_PHY_QCOM_APQ8064_SATA) += phy-qcom-apq8064-sata.o +obj-$(CONFIG_PHY_QCOM_IPQ4019_USB) += phy-qcom-ipq4019-usb.o obj-$(CONFIG_PHY_QCOM_IPQ806X_SATA) += phy-qcom-ipq806x-sata.o obj-$(CONFIG_PHY_QCOM_PCIE2) += phy-qcom-pcie2.o obj-$(CONFIG_PHY_QCOM_QMP) += phy-qcom-qmp.o diff --git a/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c new file mode 100644 index 000000000000..7efebae6b6fd --- /dev/null +++ b/drivers/phy/qualcomm/phy-qcom-ipq4019-usb.c @@ -0,0 +1,152 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (C) 2018 John Crispin + * + * Based on code from + * Allwinner Technology Co., Ltd. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct ipq4019_usb_phy { + struct device *dev; + struct phy *phy; + void __iomem *base; + struct reset_control *por_rst; + struct reset_control *srif_rst; +}; + +static int ipq4019_ss_phy_power_off(struct phy *_phy) +{ + struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy); + + reset_control_assert(phy->por_rst); + msleep(10); + + return 0; +} + +static int ipq4019_ss_phy_power_on(struct phy *_phy) +{ + struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy); + + ipq4019_ss_phy_power_off(_phy); + + reset_control_deassert(phy->por_rst); + + return 0; +} + +static struct phy_ops ipq4019_usb_ss_phy_ops = { + .power_on = ipq4019_ss_phy_power_on, + .power_off = ipq4019_ss_phy_power_off, +}; + +static int ipq4019_hs_phy_power_off(struct phy *_phy) +{ + struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy); + + reset_control_assert(phy->por_rst); + msleep(10); + + reset_control_assert(phy->srif_rst); + msleep(10); + + return 0; +} + +static int ipq4019_hs_phy_power_on(struct phy *_phy) +{ + struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy); + + ipq4019_hs_phy_power_off(_phy); + + reset_control_deassert(phy->srif_rst); + msleep(10); + + reset_control_deassert(phy->por_rst); + + return 0; +} + +static struct phy_ops ipq4019_usb_hs_phy_ops = { + .power_on = ipq4019_hs_phy_power_on, + .power_off = ipq4019_hs_phy_power_off, +}; + +static const struct of_device_id ipq4019_usb_phy_of_match[] = { + { .compatible = "qcom,usb-hs-ipq4019-phy", .data = &ipq4019_usb_hs_phy_ops}, + { .compatible = "qcom,usb-ss-ipq4019-phy", .data = &ipq4019_usb_ss_phy_ops}, + { }, +}; +MODULE_DEVICE_TABLE(of, ipq4019_usb_phy_of_match); + +static int ipq4019_usb_phy_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct resource *res; + struct phy_provider *phy_provider; + struct ipq4019_usb_phy *phy; + const struct of_device_id *match; + + match = of_match_device(ipq4019_usb_phy_of_match, &pdev->dev); + if (!match) + return -ENODEV; + + phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); + if (!phy) + return -ENOMEM; + + phy->dev = &pdev->dev; + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + phy->base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(phy->base)) { + dev_err(dev, "failed to remap register memory\n"); + return PTR_ERR(phy->base); + } + + phy->por_rst = devm_reset_control_get(phy->dev, "por_rst"); + if (IS_ERR(phy->por_rst)) { + if (PTR_ERR(phy->por_rst) != -EPROBE_DEFER) + dev_err(dev, "POR reset is missing\n"); + return PTR_ERR(phy->por_rst); + } + + phy->srif_rst = devm_reset_control_get_optional(phy->dev, "srif_rst"); + if (IS_ERR(phy->srif_rst)) + return PTR_ERR(phy->srif_rst); + + phy->phy = devm_phy_create(dev, NULL, match->data); + if (IS_ERR(phy->phy)) { + dev_err(dev, "failed to create PHY\n"); + return PTR_ERR(phy->phy); + } + phy_set_drvdata(phy->phy, phy); + + phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate); + + return PTR_ERR_OR_ZERO(phy_provider); +} + +static struct platform_driver ipq4019_usb_phy_driver = { + .probe = ipq4019_usb_phy_probe, + .driver = { + .of_match_table = ipq4019_usb_phy_of_match, + .name = "ipq4019-usb-phy", + } +}; +module_platform_driver(ipq4019_usb_phy_driver); + +MODULE_DESCRIPTION("QCOM/IPQ4019 USB phy driver"); +MODULE_AUTHOR("John Crispin "); +MODULE_LICENSE("GPL v2"); From patchwork Sat Mar 28 13:53:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 11463559 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 C9C09159A for ; Sat, 28 Mar 2020 13:57:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A760220716 for ; Sat, 28 Mar 2020 13:57:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.b="0BsbxrJ+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726225AbgC1N5I (ORCPT ); Sat, 28 Mar 2020 09:57:08 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:43598 "EHLO mail-wr1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726382AbgC1N5I (ORCPT ); Sat, 28 Mar 2020 09:57:08 -0400 Received: by mail-wr1-f52.google.com with SMTP id m11so9287367wrx.10 for ; Sat, 28 Mar 2020 06:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4xIqHE13U/i0v3PqXW0HmQsSKVk6SvsqXk09Jrzg6L0=; b=0BsbxrJ+iM9J49VyyuaHhYXq7/hF14OBAD3duC00VAV1CIIYLQGd9AGObfmdQijemc X1I2dPUorSAOvW+A66rorHMZS9bknQAsEsMX6CF9uSvX6TftZNC2Fhg0z4npUgsqD3e+ WbYyrQrFhDDMctyY5X/L4mCe7K5lCwmfii0Q66HXm9h6VuQhtTYeYbtkNCr7A+/RZ3Fw /F/5oY/WXc/KIaoLulEAu6sEBz6ixoUybFPJvofj7Nx7NgJLIUT53RAOcZ9a75Xbh6/H 7R8cmtFK59gECqWViOn+qIq5kcutBpakSrRZ2zj0Gtm9PWWQ0x7Ibqs3Ttn18Egr2fxo nVkw== 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=4xIqHE13U/i0v3PqXW0HmQsSKVk6SvsqXk09Jrzg6L0=; b=hpiktV7hvcxWeOBNbLRtENrM6wfzrXFMLyDs4vikTu/rH5XChIRhriSqiht31Z/jeu nmD/4hHSJ3NQA/pJx0HTs1+9PL/73Bj7ytgCVlp5pKGjuKXGdvZF7LeCcijbOL1uj4Nd 4CE1jJP0trcqmDt5ZQWFGhmGuko5rTVol+3EXLetZWR8S6chN24dQAZ/q0MNUkZAFMT9 qDNqI0ot50mnA6B5Zo9HoS7LsEKzeNGk4WyB936rs9IKNxgKlyrA/DRZP4NK+5FS44Cv BIhYKmq+JAxS+odYSCuUt6FekoJEfzRdatKcSGL3cqq9jaa40BXzZGNNwAUeiJjiJeke I44w== X-Gm-Message-State: ANhLgQ0CKIJEcU07SQw1IfVhjXzYwQJW6uoXd+BQG8CYviRj4taTZ+oJ MaFluLLEeGViU6HmRLUTXWYtfA== X-Google-Smtp-Source: ADFU+vuQg0QSZwrB3cqzvruejikf5pzIwdAEuCgJfOCdbhAHtF7zjb0P3ymSOuXcBoEW7bF6hKhOUw== X-Received: by 2002:adf:f88b:: with SMTP id u11mr4911276wrp.84.1585403825769; Sat, 28 Mar 2020 06:57:05 -0700 (PDT) Received: from localhost.localdomain (dh207-96-177.xnet.hr. [88.207.96.177]) by smtp.googlemail.com with ESMTPSA id f12sm8461975wrm.94.2020.03.28.06.57.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Mar 2020 06:57:05 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, kishon@ti.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: Robert Marko , John Crispin , Luka Perkov Subject: [PATCH v4 2/3] dt-bindings: phy-qcom-ipq4019-usb: add binding document Date: Sat, 28 Mar 2020 14:53:49 +0100 Message-Id: <20200328135345.695622-2-robert.marko@sartura.hr> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200328135345.695622-1-robert.marko@sartura.hr> References: <20200328135345.695622-1-robert.marko@sartura.hr> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This patch adds the binding documentation for the HS/SS USB PHY found inside Qualcom Dakota SoCs. Signed-off-by: John Crispin Signed-off-by: Robert Marko Cc: Luka Perkov --- .../bindings/phy/qcom-usb-ipq4019-phy.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/phy/qcom-usb-ipq4019-phy.yaml diff --git a/Documentation/devicetree/bindings/phy/qcom-usb-ipq4019-phy.yaml b/Documentation/devicetree/bindings/phy/qcom-usb-ipq4019-phy.yaml new file mode 100644 index 000000000000..6473731b07a1 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/qcom-usb-ipq4019-phy.yaml @@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/phy/qcom-usb-ipq4019-phy.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcom IPQ40xx Dakota HS/SS USB PHY + +properties: + compatible: + enum: + - qcom,usb-ss-ipq4019-phy + - qcom,usb-hs-ipq4019-phy + + reg: + maxItems: 1 + + resets: + maxItems: 2 + + reset-names: + items: + - const: por_rst + - const: srif_rst + + "#phy-cells": + const: 0 + +required: + - compatible + - reg + - resets + - reset-names + - "#phy-cells" + +examples: + - | + hsphy@a8000 { + compatible = "qcom,usb-hs-ipq4019-phy"; + phy-cells = <0>; + reg = <0xa8000 0x40>; + resets = <&gcc USB2_HSPHY_POR_ARES>, + <&gcc USB2_HSPHY_S_ARES>; + reset-names = "por_rst", "srif_rst"; + }; From patchwork Sat Mar 28 13:53:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 11463561 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 7C1E514B4 for ; Sat, 28 Mar 2020 13:57:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5119420716 for ; Sat, 28 Mar 2020 13:57:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.b="I4suWukH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727125AbgC1N5W (ORCPT ); Sat, 28 Mar 2020 09:57:22 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37563 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727118AbgC1N5W (ORCPT ); Sat, 28 Mar 2020 09:57:22 -0400 Received: by mail-wr1-f68.google.com with SMTP id w10so15228185wrm.4 for ; Sat, 28 Mar 2020 06:57:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=u01MPjpNUTMHsez0F0H9AHhzrsoSor9pky3lmIVAZDI=; b=I4suWukHvtx+mVpGBWJDlemcH/hqwneXAGDtLIidkdZRXxZiiRq+Imrc4xHYFs2eVh lSHTEav7JTfNsI3LvYX4HC5MQ/JpCYlcH8iCN/7T6UJG58xqbhOSidpKPSA80NCsvLp5 G/WsrhB/Q/OCYZyh/iDZncwb4CSsaK2NF1wL04WPKvvQzw6uc0+2SB7cqMGyg1JPsuHy O+HjpTKyWVQQm1JFyJyTAe7UyXZOU54yamMczcJWexrnXD4BLJFfhCVDc2b4lVRzFTgv gKgj7wqIOP54Ox2Ll2jzaClzPnGvMdYZkeBW2EBvUOEGzEtzHoloRWA5ECjieAkWALoz gosQ== 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=u01MPjpNUTMHsez0F0H9AHhzrsoSor9pky3lmIVAZDI=; b=YT01Kqbwl39l5w7LRODsw1koxDlBOAkRpqqo6uymVn8bozPzC2lT1dhfX3k4nYS4M6 Jg03x8j1pHbHXaBLEqiZ/Uv4yYAakrg2x1ywyErT70GO1YRKUM1knlq0FiEH9SExQw3i 8LJ6OY14oqHkWvIzyPrVQSlSemYGE6qngzWTqsY+GOAjAluaHlxFUNTovsHlxJR0RoWv zlRn3B/6rdcxOqmeILDbVAR2O0lyI5/tqKjwwa2ZiM6mAJ6IbtiDND5oS789QMXPfWAU 2F5+146IGTHI9BGUCmPR0wZonMzB4rjoWFwGXJz0HkyDOuarHI2qv70qK6+98wrV8KXg 3yUA== X-Gm-Message-State: ANhLgQ1iFJa8v58jpauSkdz8mbJyr5fitk5e3b6b9nNOKb14vy28jjFH oidXi4/zYMqqMc6GjuhNENy8nA== X-Google-Smtp-Source: ADFU+vtK8IUxh2wABITvQSDoOJ2+b/BFsIg2K1xRso0MozjvSAaLQs5MiI0XjXlnsC1NAdw32WJzrw== X-Received: by 2002:a5d:468c:: with SMTP id u12mr5334125wrq.394.1585403840015; Sat, 28 Mar 2020 06:57:20 -0700 (PDT) Received: from localhost.localdomain (dh207-96-177.xnet.hr. [88.207.96.177]) by smtp.googlemail.com with ESMTPSA id f12sm8461975wrm.94.2020.03.28.06.57.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Mar 2020 06:57:19 -0700 (PDT) From: Robert Marko To: agross@kernel.org, bjorn.andersson@linaro.org, kishon@ti.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org Cc: John Crispin , Robert Marko , Luka Perkov Subject: [PATCH v4 3/3] ARM: dts: qcom: ipq4019: add USB devicetree nodes Date: Sat, 28 Mar 2020 14:53:51 +0100 Message-Id: <20200328135345.695622-3-robert.marko@sartura.hr> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200328135345.695622-1-robert.marko@sartura.hr> References: <20200328135345.695622-1-robert.marko@sartura.hr> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: John Crispin Since we now have driver for the USB PHY, lets add the necessary nodes to DTSI. Signed-off-by: John Crispin Signed-off-by: Robert Marko Cc: Luka Perkov --- arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi | 20 +++++ arch/arm/boot/dts/qcom-ipq4019.dtsi | 74 +++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi index 418f9a022336..2ee5f05d5a43 100644 --- a/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi +++ b/arch/arm/boot/dts/qcom-ipq4019-ap.dk01.1.dtsi @@ -109,5 +109,25 @@ wifi@a000000 { wifi@a800000 { status = "ok"; }; + + usb3_ss_phy: ssphy@9a000 { + status = "ok"; + }; + + usb3_hs_phy: hsphy@a6000 { + status = "ok"; + }; + + usb3: usb3@8af8800 { + status = "ok"; + }; + + usb2_hs_phy: hsphy@a8000 { + status = "ok"; + }; + + usb2: usb2@60f8800 { + status = "ok"; + }; }; }; diff --git a/arch/arm/boot/dts/qcom-ipq4019.dtsi b/arch/arm/boot/dts/qcom-ipq4019.dtsi index bfa9ce4c6e69..ee45253361cb 100644 --- a/arch/arm/boot/dts/qcom-ipq4019.dtsi +++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi @@ -576,5 +576,79 @@ wifi1: wifi@a800000 { "legacy"; status = "disabled"; }; + + usb3_ss_phy: ssphy@9a000 { + compatible = "qcom,usb-ss-ipq4019-phy"; + #phy-cells = <0>; + reg = <0x9a000 0x800>; + reg-names = "phy_base"; + resets = <&gcc USB3_UNIPHY_PHY_ARES>; + reset-names = "por_rst"; + status = "disabled"; + }; + + usb3_hs_phy: hsphy@a6000 { + compatible = "qcom,usb-hs-ipq4019-phy"; + #phy-cells = <0>; + reg = <0xa6000 0x40>; + reg-names = "phy_base"; + resets = <&gcc USB3_HSPHY_POR_ARES>, <&gcc USB3_HSPHY_S_ARES>; + reset-names = "por_rst", "srif_rst"; + status = "disabled"; + }; + + usb3@8af8800 { + compatible = "qcom,dwc3"; + reg = <0x8af8800 0x100>; + #address-cells = <1>; + #size-cells = <1>; + clocks = <&gcc GCC_USB3_MASTER_CLK>, + <&gcc GCC_USB3_SLEEP_CLK>, + <&gcc GCC_USB3_MOCK_UTMI_CLK>; + clock-names = "master", "sleep", "mock_utmi"; + ranges; + status = "disabled"; + + dwc3@8a00000 { + compatible = "snps,dwc3"; + reg = <0x8a00000 0xf8000>; + interrupts = ; + phys = <&usb3_hs_phy>, <&usb3_ss_phy>; + phy-names = "usb2-phy", "usb3-phy"; + dr_mode = "host"; + }; + }; + + usb2_hs_phy: hsphy@a8000 { + compatible = "qcom,usb-hs-ipq4019-phy"; + #phy-cells = <0>; + reg = <0xa8000 0x40>; + reg-names = "phy_base"; + resets = <&gcc USB2_HSPHY_POR_ARES>, <&gcc USB2_HSPHY_S_ARES>; + reset-names = "por_rst", "srif_rst"; + status = "disabled"; + }; + + usb2@60f8800 { + compatible = "qcom,dwc3"; + reg = <0x60f8800 0x100>; + #address-cells = <1>; + #size-cells = <1>; + clocks = <&gcc GCC_USB2_MASTER_CLK>, + <&gcc GCC_USB2_SLEEP_CLK>, + <&gcc GCC_USB2_MOCK_UTMI_CLK>; + clock-names = "master", "sleep", "mock_utmi"; + ranges; + status = "disabled"; + + dwc3@6000000 { + compatible = "snps,dwc3"; + reg = <0x6000000 0xf8000>; + interrupts = ; + phys = <&usb2_hs_phy>; + phy-names = "usb2-phy"; + dr_mode = "host"; + }; + }; }; };