From patchwork Tue Jul 27 00:41:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 487232 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.5 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 3B7B3C4320A for ; Tue, 27 Jul 2021 00:41:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2595360E78 for ; Tue, 27 Jul 2021 00:41:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234536AbhG0ABJ (ORCPT ); Mon, 26 Jul 2021 20:01:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234528AbhG0ABA (ORCPT ); Mon, 26 Jul 2021 20:01:00 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97D34C061764 for ; Mon, 26 Jul 2021 17:41:27 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id t21so13630057plr.13 for ; Mon, 26 Jul 2021 17:41:27 -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=NNVYuLLan0DbWKz2ujfAadJo7MF6NbWDZ6vQQn1FVnQ=; b=hFZXRcvm6o1J85FJHveCFIdnAk3b2RIiMKV2HjJwXO/DrxU7MzkvC7sI451v2Lv8kf rDno1AGGeN+6y4K7Kw1zdmjHAnyCvWukMgI5b8qSnGVLRqjlfbr6GGj3Wynqr/uQcvU7 Iq4JN/PrTbQ05lb43LHOsMHT8fFp4XUS9l5xA= 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=NNVYuLLan0DbWKz2ujfAadJo7MF6NbWDZ6vQQn1FVnQ=; b=TkjM3Z80vbWkEdBnpsBQibjR5whBWKSrQUoj3XT776naDwYHRQh1V2HLVdEq93zw35 XY5PnGG1Sl2TMLyOndhSovYkPY65NVBddzoJj6zEDQ7fZ08m74K/zLoV+dtlpVKBt7xb afA0zevzpLYcaLw2eU65YouUi4eZeci6c5hMp/btC68mwfuZ9J7wIK0DXYQ/2gFJH77z ut7F6iCTJIAOCUnbn1YBB2u7CC0oOC/pYP7+l0/deRp1STXKpqyRG0KV30h0KbpcgSZ4 kpKEp5PCKKpY9RMifGgFYOtqNj9BdHd/4c+Baxru0fovw73Xnjxc3U+1SmcsdbFMpKbg Ny7Q== X-Gm-Message-State: AOAM532AkPBMufUGz7DO4NanTpGvK8O6useMQ2ixs16GBjdN8rQX5tMt dxE+8OAvmD3ZFZzB4aVNaE8Upg== X-Google-Smtp-Source: ABdhPJxutSwl+RD+8PC6SoWHzxCN84aCgaJ9K1NMr2MPxgJnx4/GFQQ4lr7E4AuBHxrcwJI6c3A6ag== X-Received: by 2002:a17:90a:ce03:: with SMTP id f3mr8599750pju.30.1627346487176; Mon, 26 Jul 2021 17:41:27 -0700 (PDT) Received: from localhost ([2620:15c:202:201:9c3d:270c:6be9:9c33]) by smtp.gmail.com with UTF8SMTPSA id x14sm1283854pfq.143.2021.07.26.17.41.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jul 2021 17:41:26 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: Bastien Nocera , Peter Chen , devicetree@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , linux-usb@vger.kernel.org, Ravi Chandra Sadineni , Stephen Boyd , Matthias Kaehlcke , Rob Herring Subject: [PATCH v15 2/6] of/platform: Add stubs for of_platform_device_create/destroy() Date: Mon, 26 Jul 2021 17:41:14 -0700 Message-Id: <20210726174048.v15.2.I08fd2e1c775af04f663730e9fb4d00e6bbb38541@changeid> X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog In-Reply-To: <20210727004118.2583774-1-mka@chromium.org> References: <20210727004118.2583774-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Code for platform_device_create() and of_platform_device_destroy() is only generated if CONFIG_OF_ADDRESS=y. Add stubs to avoid unresolved symbols when CONFIG_OF_ADDRESS is not set. Signed-off-by: Matthias Kaehlcke Acked-by: Rob Herring --- Changes in v15: - none Changes in v14: - none Changes in v13: - none Changes in v12: - none Changes in v11: - none Changes in v10: - none Changes in v9: - added Rob's 'Acked-by' tag Changes in v8: - fixed C&P error in commit message Changes in v7: - none Changes in v6: - patch added to the series include/linux/of_platform.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h index 84a966623e78..d15b6cd5e1c3 100644 --- a/include/linux/of_platform.h +++ b/include/linux/of_platform.h @@ -61,16 +61,18 @@ static inline struct platform_device *of_find_device_by_node(struct device_node } #endif +extern int of_platform_bus_probe(struct device_node *root, + const struct of_device_id *matches, + struct device *parent); + +#ifdef CONFIG_OF_ADDRESS /* Platform devices and busses creation */ extern struct platform_device *of_platform_device_create(struct device_node *np, const char *bus_id, struct device *parent); extern int of_platform_device_destroy(struct device *dev, void *data); -extern int of_platform_bus_probe(struct device_node *root, - const struct of_device_id *matches, - struct device *parent); -#ifdef CONFIG_OF_ADDRESS + extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, @@ -84,6 +86,18 @@ extern int devm_of_platform_populate(struct device *dev); extern void devm_of_platform_depopulate(struct device *dev); #else +/* Platform devices and busses creation */ +static inline struct platform_device *of_platform_device_create(struct device_node *np, + const char *bus_id, + struct device *parent) +{ + return NULL; +} +static inline int of_platform_device_destroy(struct device *dev, void *data) +{ + return -ENODEV; +} + static inline int of_platform_populate(struct device_node *root, const struct of_device_id *matches, const struct of_dev_auxdata *lookup, From patchwork Tue Jul 27 00:41:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 487231 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.5 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, URIBL_BLOCKED, 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 B8375C4338F for ; Tue, 27 Jul 2021 00:41:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9A0DE60F02 for ; Tue, 27 Jul 2021 00:41:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234743AbhG0ABQ (ORCPT ); Mon, 26 Jul 2021 20:01:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234623AbhG0ABH (ORCPT ); Mon, 26 Jul 2021 20:01:07 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85AB9C0617A0 for ; Mon, 26 Jul 2021 17:41:34 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d17so13720774plh.10 for ; Mon, 26 Jul 2021 17:41:34 -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=l1TdIia5oT/voXXUM8yfgtY/ld2vpGF8mnnowb7I2uA=; b=hfSix+mnUbMCu8A40vm+XLqCtZK4K9Jk/VjM6gz8k5i/rH2AI8ho6UTmEHdm6F204n mtfA1ywu5eSd4cdJlEWC/51Cja6fJJkepSUOCfvPN2gwKV09Jus+N+Jb1RAsoRbNzkIU wOs/PChCn705N3dK+IkUdEXPo6m7PB0UgqMNY= 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=l1TdIia5oT/voXXUM8yfgtY/ld2vpGF8mnnowb7I2uA=; b=UVkExBp5AkbdqUcJF7C2FjBwLlhfTv2Ny+jLKgGmMtshvCAh/D7dn6JBaLcyfEvgRA B719TH9iwox68ub0qHDr3fymJSvxZsp6bmUVVW3TcnzyQRJb7zZdX4ZtcgT6LT7Ba+T8 Y20jt2+NO1zrdGZqBQnavf94AdvvRSt/y+CRwE+FMi3Tua+ry0Ed46Z9kso6o7NcT2kc E2zUfTGzti7ZvN3+8qNkor+25+OcdbtIDSqvvSHAxcYuPAAYLLzecgHjgT1QFeXqO1H9 iRUfDH6Id9c3odzgVCG4YOhDcHFPVP6YYFYIdGZAeT1D+NM7kpBTE//iUMcQRB7sZpoQ lGMA== X-Gm-Message-State: AOAM532XWPonUSjsISiIEdjgY7eSkk0cRRP2Rn1Xj6d0LlUERXwEGiLE ciWaOHzXgIkn5OCiBUC/9HfdHg== X-Google-Smtp-Source: ABdhPJwrUmIYjcLSmqI7Zx8l8YF+URlYNPNpbbDnrWfUmW7G4MGkqUfOQusH4JSWBeevvQjKfXUKHg== X-Received: by 2002:a17:90b:212:: with SMTP id fy18mr8675133pjb.52.1627346494140; Mon, 26 Jul 2021 17:41:34 -0700 (PDT) Received: from localhost ([2620:15c:202:201:9c3d:270c:6be9:9c33]) by smtp.gmail.com with UTF8SMTPSA id x18sm1241519pfh.48.2021.07.26.17.41.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jul 2021 17:41:33 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: Bastien Nocera , Peter Chen , devicetree@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , linux-usb@vger.kernel.org, Ravi Chandra Sadineni , Stephen Boyd , Matthias Kaehlcke , Dmitry Osipenko , Fabio Estevam Subject: [PATCH v15 5/6] usb: host: xhci-plat: Create platform device for onboard hubs in probe() Date: Mon, 26 Jul 2021 17:41:17 -0700 Message-Id: <20210726174048.v15.5.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid> X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog In-Reply-To: <20210727004118.2583774-1-mka@chromium.org> References: <20210727004118.2583774-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Call onboard_hub_create/destroy_pdevs() from _probe()/_remove() to create/destroy platform devices for onboard USB hubs that may be connected to the root hub of the controller. These functions are a NOP unless CONFIG_USB_ONBOARD_HUB=y/m. Also add a field to struct xhci_hcd to keep track of the onboard hub platform devices that are owned by the xHCI. Signed-off-by: Matthias Kaehlcke --- Changes in v15: - none Changes in v14: - none Changes in v13: - added comment for 'depends on USB_ONBOARD_HUB || !USB_ONBOARD_HUB' construct Changes in v12: - none Changes in v11: - use onboard_hub_create/destroy_pdevs() to support multiple onboard hubs that are connected to the same root hub - moved field/list to keep track of platform devices from struct usb_hcd to struct xhci_hcd - updated commit message Changes in v10: - none Changes in v9: - added dependency on USB_ONBOARD_HUB (or !!USB_ONBOARD_HUB) to USB_XHCI_PLATFORM Changes in v8: - none Changes in v7: - none Changes in v6: - none Changes in v5: - patch added to the series drivers/usb/host/Kconfig | 1 + drivers/usb/host/xhci-plat.c | 6 ++++++ drivers/usb/host/xhci.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 518c2312ef0c..099e9615919c 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -54,6 +54,7 @@ config USB_XHCI_PCI_RENESAS config USB_XHCI_PLATFORM tristate "Generic xHCI driver for a platform device" select USB_XHCI_RCAR if ARCH_RENESAS + depends on USB_ONBOARD_HUB || !USB_ONBOARD_HUB # if USB_ONBOARD_HUB=m, this can't be 'y' help Adds an xHCI host driver for a generic platform device, which provides a memory space and an irq. diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index c1edcc9b13ce..ee98a3671619 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 @@ -374,6 +375,9 @@ static int xhci_plat_probe(struct platform_device *pdev) */ pm_runtime_forbid(&pdev->dev); + INIT_LIST_HEAD(&xhci->onboard_hub_devs); + onboard_hub_create_pdevs(hcd->self.root_hub, &xhci->onboard_hub_devs); + return 0; @@ -420,6 +424,8 @@ static int xhci_plat_remove(struct platform_device *dev) usb_remove_hcd(hcd); usb_put_hcd(shared_hcd); + onboard_hub_destroy_pdevs(&xhci->onboard_hub_devs); + clk_disable_unprepare(clk); clk_disable_unprepare(reg_clk); usb_put_hcd(hcd); diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 3c7d281672ae..5ba01d5ccab8 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1923,6 +1923,8 @@ struct xhci_hcd { struct dentry *debugfs_slots; struct list_head regset_list; + struct list_head onboard_hub_devs; + void *dbc; /* platform-specific data -- must come last */ unsigned long priv[] __aligned(sizeof(s64)); From patchwork Tue Jul 27 00:41:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 487230 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.5 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, URIBL_BLOCKED, 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 51C3FC4320A for ; Tue, 27 Jul 2021 00:41:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3310C60F02 for ; Tue, 27 Jul 2021 00:41:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234479AbhG0ABU (ORCPT ); Mon, 26 Jul 2021 20:01:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234708AbhG0ABO (ORCPT ); Mon, 26 Jul 2021 20:01:14 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC3CCC0617A3 for ; Mon, 26 Jul 2021 17:41:36 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id a20so13997211plm.0 for ; Mon, 26 Jul 2021 17:41:36 -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=9Al1ux7YuqXRPafsBFOWjLmHby1bBOemA8+XtBPAfVc=; b=hNKvrYYDXbs0bQ/S4N2V7WxsT8DFKL/XiPBXvURIvYuprNCF+bpk+zVLQUlaTLLHz2 xGpOtbJJpuXeh7Y6nLpslcr3tUYnb8Q7L2+JHjhXHf8eSzXuGJp5o/T+sCSsD3JWsCsd XJ1CPuvNBBhmg9B2GbMP5baI42bjxOQNGOHw8= 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=9Al1ux7YuqXRPafsBFOWjLmHby1bBOemA8+XtBPAfVc=; b=IjJsTGAqNv9ry7DFbcmkn01OB2lo6hAaxZnNartYQsx/jo7kR0IvxANwxYyeVKAepC FNhRndo4lmrwIU4KwmCoVDqMZ4WRs5yHtpKxAdaWefA2ptvIiDZnnPnE2HQaFBF47c9v MggfMrsHz2d4ZyP3+poBY4qw5P5WTF5rkbZAyj0Dg20gq2ojHE18V0hyH0pQOK9XX6Xj mj2Vg45sUymdWTiN1Z1E/rPITb5+RpuSfS3dsVOUZJUZTvnqy2fdl4YwrmjjbbC34N6Y 2Wb+xWFNPsG8R5V3ad4Kpa0jXMF2XwyBbLYE/VK7GnxjJjJTegRe3TPBruK1SGIPECB5 A8Ng== X-Gm-Message-State: AOAM530/3g6vmMDlICbM4fyAS/CxuvP8Feu+P6Fef8zEM17FOOEI6ffr NXs4DGN+bVJpNE6GU+7Ib1zVwA== X-Google-Smtp-Source: ABdhPJyGONapH77bjs5SRQ7UbOsyRnk4wBaK0crK59wBBjvjQUWzlKsewl5Cjn4Tc6RFXeDw3BtDcQ== X-Received: by 2002:a17:90a:3d0d:: with SMTP id h13mr20116865pjc.20.1627346496428; Mon, 26 Jul 2021 17:41:36 -0700 (PDT) Received: from localhost ([2620:15c:202:201:9c3d:270c:6be9:9c33]) by smtp.gmail.com with UTF8SMTPSA id q21sm1040348pgk.71.2021.07.26.17.41.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Jul 2021 17:41:36 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: Bastien Nocera , Peter Chen , devicetree@vger.kernel.org, Michal Simek , linux-kernel@vger.kernel.org, Douglas Anderson , Krzysztof Kozlowski , linux-usb@vger.kernel.org, Ravi Chandra Sadineni , Stephen Boyd , Matthias Kaehlcke , Andy Gross , Bjorn Andersson , linux-arm-msm@vger.kernel.org Subject: [PATCH v15 6/6] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Date: Mon, 26 Jul 2021 17:41:18 -0700 Message-Id: <20210726174048.v15.6.Ie0d2c1214b767bb5551dd4cad38398bd40e4466f@changeid> X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog In-Reply-To: <20210727004118.2583774-1-mka@chromium.org> References: <20210727004118.2583774-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add nodes for the onboard USB hub on trogdor devices. Remove the 'always-on' property from the hub regulator, since the regulator is now managed by the onboard_usb_hub driver. Signed-off-by: Matthias Kaehlcke --- Changes in v15: - none Changes in v14: - none Changes in v13: - none Changes in v12: - none Changes in v11: - rebased on qcom/arm64-for-5.14 (with the rest of the series) Changes in v10: - keep 'regulator-boot-on' property - updated commit message Changes in v9: - none 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 | 12 +++++------- .../arm64/boot/dts/qcom/sc7180-trogdor-r1.dts | 19 ++++++++----------- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 19 ++++++++++++++++++- 4 files changed, 39 insertions(+), 30 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 30e3e769d2b4..5fb8e12af1a0 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts @@ -14,17 +14,6 @@ / { compatible = "google,lazor-rev0", "qcom,sc7180"; }; -&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 @@ -33,3 +22,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 c2ef06367baf..1dae714250f5 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts @@ -14,13 +14,11 @@ / { compatible = "google,lazor-rev1", "google,lazor-rev2", "qcom,sc7180"; }; -&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 77ae7561d436..f89c6a7045e5 100644 --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi @@ -202,7 +202,6 @@ pp3300_hub: pp3300-hub { pinctrl-names = "default"; pinctrl-0 = <&en_pp3300_hub>; - regulator-always-on; regulator-boot-on; vin-supply = <&pp3300_a>; @@ -898,6 +897,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 {