From patchwork Wed Apr 28 18:41:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 428683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A44FCC433ED for ; Wed, 28 Apr 2021 18:41:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 662D06142A for ; Wed, 28 Apr 2021 18:41:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243690AbhD1Sm1 (ORCPT ); Wed, 28 Apr 2021 14:42:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243654AbhD1Sm0 (ORCPT ); Wed, 28 Apr 2021 14:42:26 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19F0CC0613ED for ; Wed, 28 Apr 2021 11:41:40 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id y22-20020a17090a8b16b0290150ae1a6d2bso9629027pjn.0 for ; Wed, 28 Apr 2021 11:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tergllBpkqhZfPmFOTzr6qseTCwQjcNYwRpQDtmWEqo=; b=YGMEWFrqJZEbxGyUSDZk+OtuxIdzROuXND3g3zyqrhuuJerRoAwY9HsyzKICcB+TCA A+MJTHz7oucXXD++aAz5YB8Ib1NI729xqlWKsujtCgKA1xOEAo4GK3+rcbwrJoy4CURr wAeQazKbbiVdtnfc7RycuC2z5LnuI6VmYy5oU= 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=tergllBpkqhZfPmFOTzr6qseTCwQjcNYwRpQDtmWEqo=; b=B5r3P8i311qJD0hxSTYMw7xXN2PnuQUEXZ58IyAgZLw1uQyW/0XrcbVBJ1EWEL/tkG D/doopl/0vGiyzwdN/CvPtfAH/bF+ssUJdCpTsKJbrAZ5uYUPz4fbaBoJFCCDmzSxqSG raocjSeLNWta/OWqQw+FYFDDZeIYRxV5bbHa05kQ3U8077hySvexVJsd4fyjtXuA06xw 0bm9BdOWEPUdtl9pOo0FNZ83LsNU8uK7x8n8Vo8Jd23OJgBUq/4VlPCIVuiX4LJVZBJ5 MlbskutNt3e/A32++AKKridfecxvKw4cCrJZZXD3KvolEb9H2TyK4TevSQhSlj70CvWl onPA== X-Gm-Message-State: AOAM530q5APno9Eg6hwNRWLcOis0VGoTXvkPUlQQoiCCIbYXpAiokv02 77uOUyukqp2FjSvWgyH0VIxBog== X-Google-Smtp-Source: ABdhPJzx1MsTS6W620JKrozI3DWA4jyZquNbYMexmJjdhivFMLI3RWM/FEVpoZmns7l0hSna+dNXvg== X-Received: by 2002:a17:90a:6583:: with SMTP id k3mr35435254pjj.227.1619635299691; Wed, 28 Apr 2021 11:41:39 -0700 (PDT) Received: from localhost ([2620:15c:202:201:4c1a:a0a7:2b43:81b0]) by smtp.gmail.com with UTF8SMTPSA id n203sm391079pfd.31.2021.04.28.11.41.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Apr 2021 11:41:39 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand Cc: linux-kernel@vger.kernel.org, Ravi Chandra Sadineni , Michal Simek , Bastien Nocera , linux-usb@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , Stephen Boyd , devicetree@vger.kernel.org, Peter Chen , Matthias Kaehlcke Subject: [PATCH v8 1/5] dt-bindings: usb: Add binding for Realtek RTS5411 hub controller Date: Wed, 28 Apr 2021 11:41:28 -0700 Message-Id: <20210428114109.v8.1.I248292623d3d0f6a4f0c5bc58478ca3c0062b49a@changeid> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog In-Reply-To: <20210428184132.2184997-1-mka@chromium.org> References: <20210428184132.2184997-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Realtek RTS5411 is a USB 3.0 hub controller with 4 ports. This initial version of the binding only describes USB related aspects of the RTS5411, it does not cover the option of connecting the controller as an i2c slave. Signed-off-by: Matthias Kaehlcke Reviewed-by: Rob Herring --- Changes in v8: - added entry for 'reg' - marked 'companion-hub' as required - changed node name of USB controller to 'usb' Changes in v7: - added type ref for 'companion-hub' property Changes in v6: - Realtek binding instead of generic onboard_usb_hub - added 'companion-hub' property - added reference to 'usb-device.yaml' - 'fixed' indentation of compatible entries to keep yamllint happy - added 'additionalProperties' entry - updated commit message Changes in v5: - updated 'title' - only use standard USB compatible strings - deleted 'usb_hub' node - renamed 'usb_controller' node to 'usb-controller' - removed labels from USB nodes - added 'vdd-supply' to USB nodes Changes in v4: - none Changes in v3: - updated commit message - removed recursive reference to $self - adjusted 'compatible' definition to support multiple entries - changed USB controller phandle to be a node Changes in v2: - removed 'wakeup-source' and 'power-off-in-suspend' properties - consistently use spaces for indentation in example .../bindings/usb/realtek,rts5411.yaml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/realtek,rts5411.yaml diff --git a/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml new file mode 100644 index 000000000000..04ee255eb4f0 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/realtek,rts5411.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/realtek,rts5411.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Binding for the Realtek RTS5411 USB 3.0 hub controller + +maintainers: + - Matthias Kaehlcke + +allOf: + - $ref: usb-device.yaml# + +properties: + compatible: + items: + - enum: + - usbbda,5411 + - usbbda,411 + + reg: true + + vdd-supply: + description: + phandle to the regulator that provides power to the hub. + + companion-hub: + $ref: '/schemas/types.yaml#/definitions/phandle' + description: + phandle to the companion hub on the controller. + +required: + - companion-hub + - compatible + - reg + +additionalProperties: false + +examples: + - | + usb { + dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + hub_2_0: hub@1 { + compatible = "usbbda,5411"; + reg = <1>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&hub_3_0>; + }; + + /* 3.0 hub on port 2 */ + hub_3_0: hub@2 { + compatible = "usbbda,411"; + reg = <2>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&hub_2_0>; + }; + }; From patchwork Wed Apr 28 18:41:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 428682 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9914C43603 for ; Wed, 28 Apr 2021 18:41:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A3AFC6142A for ; Wed, 28 Apr 2021 18:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243745AbhD1Sma (ORCPT ); Wed, 28 Apr 2021 14:42:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243731AbhD1Sm3 (ORCPT ); Wed, 28 Apr 2021 14:42:29 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29606C0613ED for ; Wed, 28 Apr 2021 11:41:44 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so9610431pjv.1 for ; Wed, 28 Apr 2021 11:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JewEs2tV5gzRVg7T4CN2dfrhNEHaBUNm6fh+qnkrak4=; b=XCl0s7Eqigekg60CNXBBoKtGPRYwWSy6HJzODNJee1xEPVC1XnIBB5ARNdvOdYoYqn NJgMLh/5XESFikD7bEqRSvvWAdJRmG+Py8yqRlx0wgBDOtQfMDKaoZJswD8OHVkARuSF nTgUriQ4A223f9Dh8YwCzC+Ccxbd4ItQJx784= 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=JewEs2tV5gzRVg7T4CN2dfrhNEHaBUNm6fh+qnkrak4=; b=fy6DZ4nSk2//EdkanCTmWm/6Y4cQlaIZwXueYXiCPZVpFJQRuVLNLSubJMqOYNuJaX YaEIkzXJMpmbGuZMphZg9lHz9uZJbZggk7/HsNVDNK+vItv+q+XQvKQuqNob0Yo4dMUP VyGHjLozIeTSJR1qTVCzPgcfLBaeMgcp1sMovY1DyIQdX8yiWDVNpEQV8cYni69+4qLI zqpuWqyg1gfngWawHSfbNmd76ZTO8I6282wVSKGQBxjZxUMOHngL0iBMdTztTz4uu2T/ STrXFXHxpMvZGADATH1gb0RzGIq97eZY4frNcxTjeDDGPbLSrSpd22NHcTZFRNWDqkdM iu/A== X-Gm-Message-State: AOAM530jWXPGoCQefSeUTZurkFOPD4Za3NhhLvAMp22L2Y/iODOyd9iX GRZ/CUlH+B4aePo4W/tCUheesA== X-Google-Smtp-Source: ABdhPJydlOsUm7kXCtjtYtMsTQl/HsmsVUkJwNAiD+AwTudy4abTOY5bUFX9DV/aZJWWWN43v42OPg== X-Received: by 2002:a17:90a:e649:: with SMTP id ep9mr3605487pjb.8.1619635303695; Wed, 28 Apr 2021 11:41:43 -0700 (PDT) Received: from localhost ([2620:15c:202:201:4c1a:a0a7:2b43:81b0]) by smtp.gmail.com with UTF8SMTPSA id c13sm374859pgw.42.2021.04.28.11.41.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Apr 2021 11:41:43 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand Cc: linux-kernel@vger.kernel.org, Ravi Chandra Sadineni , Michal Simek , Bastien Nocera , linux-usb@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , Stephen Boyd , devicetree@vger.kernel.org, Peter Chen , Matthias Kaehlcke , Mathias Nyman Subject: [PATCH v8 4/5] usb: host: xhci-plat: Create platform device for onboard hubs in probe() Date: Wed, 28 Apr 2021 11:41:31 -0700 Message-Id: <20210428114109.v8.4.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog In-Reply-To: <20210428184132.2184997-1-mka@chromium.org> References: <20210428184132.2184997-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Check during probe() if a hub supported by the onboard_usb_hub driver is connected to the controller. If such a hub is found create the corresponding platform device. This requires the device tree to have a node for the hub with its vendor and product id (which is not common for USB devices). Further the platform device is only created when CONFIG_USB_ONBOARD_HUB=y/m. Signed-off-by: Matthias Kaehlcke --- Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - patch added to the series drivers/usb/host/xhci-plat.c | 16 ++++++++++++++++ include/linux/usb/hcd.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index c1edcc9b13ce..9c0fb7e8df1f 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -195,6 +196,7 @@ static int xhci_plat_probe(struct platform_device *pdev) int ret; int irq; struct xhci_plat_priv *priv = NULL; + struct device_node *np; if (usb_disabled()) @@ -374,6 +376,17 @@ static int xhci_plat_probe(struct platform_device *pdev) */ pm_runtime_forbid(&pdev->dev); + np = usb_of_get_device_node(hcd->self.root_hub, hcd->self.busnum); + if (np && of_is_onboard_usb_hub(np)) { + struct platform_device *pdev; + + pdev = of_platform_device_create(np, NULL, NULL); + if (pdev) + hcd->onboard_hub_dev = &pdev->dev; + else + xhci_warn(xhci, "failed to create onboard hub platform device\n"); + } + return 0; @@ -420,6 +433,9 @@ static int xhci_plat_remove(struct platform_device *dev) usb_remove_hcd(hcd); usb_put_hcd(shared_hcd); + if (hcd->onboard_hub_dev) + of_platform_device_destroy(hcd->onboard_hub_dev, NULL); + clk_disable_unprepare(clk); clk_disable_unprepare(reg_clk); usb_put_hcd(hcd); diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 96281cd50ff6..d02a508e19b0 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -225,6 +225,8 @@ struct usb_hcd { * (ohci 32, uhci 1024, ehci 256/512/1024). */ + struct device *onboard_hub_dev; + /* The HC driver's private data is stored at the end of * this structure. */ From patchwork Wed Apr 28 18:41:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 428681 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47B53C43616 for ; Wed, 28 Apr 2021 18:41:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 145A261420 for ; Wed, 28 Apr 2021 18:41:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243755AbhD1Smb (ORCPT ); Wed, 28 Apr 2021 14:42:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243731AbhD1Sma (ORCPT ); Wed, 28 Apr 2021 14:42:30 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B55AC061574 for ; Wed, 28 Apr 2021 11:41:45 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id b15so91833pfl.4 for ; Wed, 28 Apr 2021 11:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E3bpmI3ij+s4Bn917zTcmrlUif0swDwuIuphF3U3VDI=; b=mJltSIgnOlY8jLNsmR3q0qoNz5zbGh2PeZiJJflAqGaYQkmIg7eyIm8uHAkTHiYII2 cG5sOc/yl8pAStdkUTqBP85TcrWInHkCbr3TMf3IJ57MILFa3noyDD3DNPWO/+1oIM8X Yc914H56Hd8eDJyHtklkPVyKFG3FECjx/DaX4= 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=E3bpmI3ij+s4Bn917zTcmrlUif0swDwuIuphF3U3VDI=; b=KIaT1Al4tkViRnQzkfO4JBaw3epbaarO55WzE7EIYQeVDZE/hQepOZfuaSKfG1auI7 cVyVuT2VgzSdnCGGmglqsZSJvH/shTN/bzueliVwc4Jz4w3Y8naGaouKS7MrKuBcIC2S McWDNDDL1hZwZqKV6wXXzQCYOvC4fTHLeMXg7Fa1Eb4WuEszHfpkZ08RJiG8xAHo61eG ixdclOoFKzeUT+rCnULVG1wJ1Bwb9AzpPgm55M/ZV1HgqFWvUzPHEP4o8Sh61re6SMSB 56546JushSISYB3x2nHa8nOijvuq7ISnoQUcGylLQ7F7EIpyTsWl8/js5ELfDbltGdGG jX/Q== X-Gm-Message-State: AOAM531GkqA29ggS0GjVcxfT0szHdTd8xRNjxEQJ0j4xK8AM2vwI3IwA 9D/KLQT+a+KVs1CRuycwfr3YdQ== X-Google-Smtp-Source: ABdhPJzO/ZL8GUEuiu6USQy5QNLHChSc/k+S58EwJyltGsWyN+qBWrDGtCfP3AbEt2xtO1CbY8WfBA== X-Received: by 2002:a63:4550:: with SMTP id u16mr28341245pgk.440.1619635305127; Wed, 28 Apr 2021 11:41:45 -0700 (PDT) Received: from localhost ([2620:15c:202:201:4c1a:a0a7:2b43:81b0]) by smtp.gmail.com with UTF8SMTPSA id t9sm373402pgg.6.2021.04.28.11.41.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Apr 2021 11:41:44 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand Cc: linux-kernel@vger.kernel.org, Ravi Chandra Sadineni , Michal Simek , Bastien Nocera , linux-usb@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , Stephen Boyd , devicetree@vger.kernel.org, Peter Chen , Matthias Kaehlcke , Andy Gross , Bjorn Andersson , linux-arm-msm@vger.kernel.org Subject: [PATCH v8 5/5] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Date: Wed, 28 Apr 2021 11:41:32 -0700 Message-Id: <20210428114109.v8.5.Ie0d2c1214b767bb5551dd4cad38398bd40e4466f@changeid> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog In-Reply-To: <20210428184132.2184997-1-mka@chromium.org> References: <20210428184132.2184997-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add nodes for the onboard USB hub on trogdor devices. Remove the 'always-on' and 'boot-on' properties from the hub regulator, since the regulator is now managed by the onboard_usb_hub driver. Signed-off-by: Matthias Kaehlcke --- Changes in v8: - none Changes in v7: - rebased on qcom/arm64-for-5.13 (with the rest of the series) Changes in v6: - added 'companion-hub' entry to both USB devices - added 'vdd-supply' also to hub@2 Changes in v5: - patch added to the series .../boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 19 +++++++---------- .../boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 11 ++++------ .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 19 +++++++---------- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 21 ++++++++++++++++--- 4 files changed, 38 insertions(+), 32 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts index 5c997cd90069..bae85f6b2bfa 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts @@ -23,17 +23,6 @@ &charger_thermal { status = "disabled"; }; -&pp3300_hub { - /* pp3300_l7c is used to power the USB hub */ - /delete-property/regulator-always-on; - /delete-property/regulator-boot-on; -}; - -&pp3300_l7c { - regulator-always-on; - regulator-boot-on; -}; - &sn65dsi86_out { /* * Lane 0 was incorrectly mapped on the cable, but we've now decided @@ -42,3 +31,11 @@ &sn65dsi86_out { */ lane-polarities = <1 0>; }; + +&usb_hub_2_0 { + vdd-supply = <&pp3300_l7c>; +}; + +&usb_hub_3_0 { + vdd-supply = <&pp3300_l7c>; +}; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts index d9fbcc7bc5bd..45f014c3539d 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts @@ -23,13 +23,10 @@ &charger_thermal { status = "disabled"; }; -&pp3300_hub { - /* pp3300_l7c is used to power the USB hub */ - /delete-property/regulator-always-on; - /delete-property/regulator-boot-on; +&usb_hub_2_0 { + vdd-supply = <&pp3300_l7c>; }; -&pp3300_l7c { - regulator-always-on; - regulator-boot-on; +&usb_hub_3_0 { + vdd-supply = <&pp3300_l7c>; }; diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts index 2b522f9e0d8f..2f5263e3d1b9 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts @@ -42,17 +42,6 @@ &panel { compatible = "auo,b116xa01"; }; -&pp3300_hub { - /* pp3300_l7c is used to power the USB hub */ - /delete-property/regulator-always-on; - /delete-property/regulator-boot-on; -}; - -&pp3300_l7c { - regulator-always-on; - regulator-boot-on; -}; - &sdhc_2 { status = "okay"; }; @@ -61,6 +50,14 @@ &trackpad { interrupts = <58 IRQ_TYPE_EDGE_FALLING>; }; +&usb_hub_2_0 { + vdd-supply = <&pp3300_l7c>; +}; + +&usb_hub_3_0 { + vdd-supply = <&pp3300_l7c>; +}; + /* PINCTRL - modifications to sc7180-trogdor.dtsi */ &trackpad_int_1v8_odl { diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi index 192e2e424fde..54f9da9af376 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -206,9 +206,6 @@ pp3300_hub: pp3300-hub { pinctrl-names = "default"; pinctrl-0 = <&en_pp3300_hub>; - regulator-always-on; - regulator-boot-on; - vin-supply = <&pp3300_a>; }; @@ -848,6 +845,24 @@ &usb_1 { &usb_1_dwc3 { dr_mode = "host"; + #address-cells = <1>; + #size-cells = <0>; + + /* 2.0 hub on port 1 */ + usb_hub_2_0: hub@1 { + compatible = "usbbda,5411"; + reg = <1>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&usb_hub_3_0>; + }; + + /* 3.0 hub on port 2 */ + usb_hub_3_0: hub@2 { + compatible = "usbbda,411"; + reg = <2>; + vdd-supply = <&pp3300_hub>; + companion-hub = <&usb_hub_2_0>; + }; }; &usb_1_hsphy {