From patchwork Wed Jun 23 18: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: 466201 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.1 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 9821FC4743C for ; Wed, 23 Jun 2021 18:41:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7FB52611CB for ; Wed, 23 Jun 2021 18:41:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229890AbhFWSnv (ORCPT ); Wed, 23 Jun 2021 14:43:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbhFWSnu (ORCPT ); Wed, 23 Jun 2021 14:43:50 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 262D3C061756 for ; Wed, 23 Jun 2021 11:41:32 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id c7-20020a17090ad907b029016faeeab0ccso4357880pjv.4 for ; Wed, 23 Jun 2021 11:41:32 -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=VGosW2rs/EYJqX206hFqsFUIaq3gYBNN1MYzGGDuweM=; b=cZZzfHZ1xLi6jZvJq3l3fBargO4auHk9zd4F5k+s2G0TWZ7tG3q3KKotis2D+9uwW4 5bAowKW0LUigr5fGIsS4uFAA0TP02rlErDFMYGcwuyMlEvI8COwOHiRcxbV6tdmU74M6 pQQYH0asKuXP1DNB5ky3Na8AJHxygFp5Uotpo= 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=VGosW2rs/EYJqX206hFqsFUIaq3gYBNN1MYzGGDuweM=; b=L4VJqtyBvno+BqnAvaAMjaIhkSLzdZqu9RgE8iAkvL/2zhVaDNEGoWtqlb7flO8T51 e3obonYJLb7kITPMBduImNUq3qGgzM2mY+smm6+XJhyL0dCpZtYdRJjHTgkPR7OMh7gv gmQxvLaTKEASsoynZvWr3vEl1YckpjmoC7t75P3UOnAEWUNaCxumoFt9r+yWAvPfUOe7 jbddiSKmiMK686RuH/axDt+6Q+zg7Mx5NH8rkDXBWXZ65FVexw/wpvqDIGlCmnLUh87B 70Qdwu5ZVwEVNklnIVc9AOWHRC864PWBxlB88qtcFH7SWpDhuzHDFAC0mV5fFtRtQAhX CRgg== X-Gm-Message-State: AOAM531Ee8RSpLXSoq1BTlepo/9Tzki4Fu87lsE+AIlPichxVSxKvova 75jXdGZgAGJimt56pVTRmyuQmg== X-Google-Smtp-Source: ABdhPJzI1Dv+BsMm+DAAlHpJN160SV9S+rOgzZripmsdD+vEnHbxJgnuqlht17w0Mh64R19/AsCtHA== X-Received: by 2002:a17:902:c412:b029:127:958e:79c3 with SMTP id k18-20020a170902c412b0290127958e79c3mr735086plk.27.1624473691648; Wed, 23 Jun 2021 11:41:31 -0700 (PDT) Received: from localhost ([2620:15c:202:201:d440:232:5e25:41f4]) by smtp.gmail.com with UTF8SMTPSA id h11sm512363pgq.68.2021.06.23.11.41.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 11:41:31 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , Krzysztof Kozlowski , Peter Chen , Bastien Nocera , Stephen Boyd , Douglas Anderson , Ravi Chandra Sadineni , Matthias Kaehlcke , Rob Herring Subject: [PATCH v13 1/7] dt-bindings: usb: Add binding for Realtek RTS5411 hub controller Date: Wed, 23 Jun 2021 11:41:17 -0700 Message-Id: <20210623114025.v13.1.I248292623d3d0f6a4f0c5bc58478ca3c0062b49a@changeid> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog In-Reply-To: <20210623184124.3504047-1-mka@chromium.org> References: <20210623184124.3504047-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@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 v13: - none Changes in v12: - none Changes in v11: - none Changes in v10: - none Changes in v9: - added Rob's 'Reviewed-by' tag 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 Jun 23 18:41:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 466200 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.1 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 C1D7EC49EA4 for ; Wed, 23 Jun 2021 18:41:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA6E561185 for ; Wed, 23 Jun 2021 18:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230010AbhFWSn6 (ORCPT ); Wed, 23 Jun 2021 14:43:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbhFWSnz (ORCPT ); Wed, 23 Jun 2021 14:43:55 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6116C06175F for ; Wed, 23 Jun 2021 11:41:36 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id a2so2513500pgi.6 for ; Wed, 23 Jun 2021 11: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=rn+jkfBaHm09mGok+nONlCf30mFoynV+UZRNUFIhdDU=; b=EWbeAUecEk+oAWVdmnDXSx6cxVTC7chbrqCDPHXIqIhqFaWpmeNgdS2LWt+EowzFgU Cd9HLSv0TK9hCOEt6vc8cqr02Ae5off+o+jwUt2Q+4J2Sf7nkXiOlWuyhLJHw+Ne2W9J 3sPjZjZxrYjC+SB2wUIVG1hUKRtWr/iG74jzo= 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=rn+jkfBaHm09mGok+nONlCf30mFoynV+UZRNUFIhdDU=; b=LXLx1eoTTpQH+nZZwfL8bd11w8hp3tdya9AdUD40sreR/ewv4OVuBfQ0QKs/xzw2Lc NFIjqF20RGr31dWIxrbqCRIBztFaDxuVZb7H581KMRiASCsF9huOhxQaqjw0ic7asiJ+ DJAPGgKBkfEFyvbqNOwrncQ7PGD8gFrsYx6CYaBJm6CfPZ8GuQhANrZc9JOQroUIzy4q UTL7+dVB53SqGAkmcQAQ1dKqBNShs4fDULk2j2fbG2ZrcNmUgxPmCGsusVkp3FINbKyD 8MaYccNxYwU901CapickkRyQP0ITgfhEaRmmxjhSgnS6A62+/TO1YbC0DkbZMCHwjGoY KT3A== X-Gm-Message-State: AOAM533QoLfBzKeTmzc70gzR8muDfIXDut1D2N9IZTSxVv78zu4rad++ QVijy692dWNe+vFHcq66/nwcIQ== X-Google-Smtp-Source: ABdhPJxluqoKhGoaQ5Nzb/twHA1HowJf4YE6OPec4fU9XXSsaEQSW23fWGK3GkBG7MCd/T6c5phf8Q== X-Received: by 2002:a63:e343:: with SMTP id o3mr798626pgj.416.1624473696437; Wed, 23 Jun 2021 11:41:36 -0700 (PDT) Received: from localhost ([2620:15c:202:201:d440:232:5e25:41f4]) by smtp.gmail.com with UTF8SMTPSA id m2sm528262pgv.40.2021.06.23.11.41.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 11:41:36 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , Krzysztof Kozlowski , Peter Chen , Bastien Nocera , Stephen Boyd , Douglas Anderson , Ravi Chandra Sadineni , Matthias Kaehlcke , Rob Herring Subject: [PATCH v13 3/7] of/platform: Add stubs for of_platform_device_create/destroy() Date: Wed, 23 Jun 2021 11:41:19 -0700 Message-Id: <20210623114025.v13.3.I08fd2e1c775af04f663730e9fb4d00e6bbb38541@changeid> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog In-Reply-To: <20210623184124.3504047-1-mka@chromium.org> References: <20210623184124.3504047-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 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 Wed Jun 23 18:41:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 466199 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.1 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 C187FC49EB7 for ; Wed, 23 Jun 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 A7D09611CB for ; Wed, 23 Jun 2021 18:41:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230062AbhFWSoB (ORCPT ); Wed, 23 Jun 2021 14:44:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbhFWSn5 (ORCPT ); Wed, 23 Jun 2021 14:43:57 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F98C061756 for ; Wed, 23 Jun 2021 11:41:39 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id v13so1627962ple.9 for ; Wed, 23 Jun 2021 11:41:39 -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=6I46EDeVvue/JEcRkc+UqOHLZNFVFF0xm4B6v9zE/2M=; b=Akrau+NHCquNoq1Vp2lXasY9+NQSczk0x8X/rw5MYm2rt5jOCCj5P88AnCuM+jVld/ zGmlL+SnO4cLkP/M4lM/0zAHOQIZ9+ug1X8PDIfL1j8GFOhREfV5tJ2nT3qpcfOmza80 zQWV9eEEmO8aQGy8WpOfsJDrWoj/mvk8Fa9SY= 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=6I46EDeVvue/JEcRkc+UqOHLZNFVFF0xm4B6v9zE/2M=; b=Vd1vhiFUvzXvLxsRbbzGyAifOLqqNAPBNUIvhGxhZG4mJbABcNw7k54XKo1T90jMUJ frx1tOOmcCwNZM9tj9IJcq/HemdbOrw6VtFxL9ZY6ENumGo8gkUkM7Nolu9bRQ1R+Q7B zBbtUkU0xB+DsBAlA2VtLJZ060KHutuFsJOKWm5gvm3AHcYmAvCTNdScQc+SEtwV2gbB MIoTM+Qu1XtWODNvaKTTtQDC7a7Ts68rHLb6YWJeWuU8a3rCBXfxjGrGG+ZrWFALvrZH WR28HfN/ljcdv6swtJPDwk6s/1PZYe7iiL5+Vilkymlx1/quAsEXZztgkYU8Di/6Wdym OGTw== X-Gm-Message-State: AOAM5301pUVFFGeBmgLxGON0m21KeAEWJJVRz0Kgqk9KJIED7W+My5JO Q0zZH+2RI/bVo6isevGXWR1yq9vLQj/t1Q== X-Google-Smtp-Source: ABdhPJyqb+UXhYwjp56/GfRbVv/GGu7TeKF0/RSUSFPyiyQZFi19dmK+OYEMksymMens0VE/+BnJ8w== X-Received: by 2002:a17:90a:ba91:: with SMTP id t17mr11340609pjr.89.1624473699308; Wed, 23 Jun 2021 11:41:39 -0700 (PDT) Received: from localhost ([2620:15c:202:201:d440:232:5e25:41f4]) by smtp.gmail.com with UTF8SMTPSA id p4sm552290pff.148.2021.06.23.11.41.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 11:41:39 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , Krzysztof Kozlowski , Peter Chen , Bastien Nocera , Stephen Boyd , Douglas Anderson , Ravi Chandra Sadineni , Matthias Kaehlcke , Anson Huang , Bjorn Andersson , Catalin Marinas , Dmitry Baryshkov , Enric Balletbo i Serra , =?utf-8?q?Guido_G=C3=BCnther?= , Lad Prabhakar , Michael Walle , Nishanth Menon , Shawn Guo , Vinod Koul , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH v13 4/7] arm64: defconfig: Explicitly enable USB_XHCI_PLATFORM Date: Wed, 23 Jun 2021 11:41:20 -0700 Message-Id: <20210623114025.v13.4.Id45138610b749ff775186ac10b3d01c504ddf4f3@changeid> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog In-Reply-To: <20210623184124.3504047-1-mka@chromium.org> References: <20210623184124.3504047-1-mka@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The dependency of USB_DWC3 on USB_XHCI_PLATFORM is being changed from 'select' to 'depends on' by another patch. The defconfig selects USB_DWC3 and implicitly USB_DWC3_DUAL_ROLE, to keep this unchanged USB_XHCI_PLATFORM now needs to be selected explicitly. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- Changes in v13: - patch added to the series arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 08c6f769df9a..d7f22b18e37a 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -795,6 +795,7 @@ CONFIG_USB_CONN_GPIO=m CONFIG_USB=y CONFIG_USB_OTG=y CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y CONFIG_USB_XHCI_TEGRA=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_EXYNOS=y From patchwork Wed Jun 23 18:41:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 466198 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.1 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 38581C48BE5 for ; Wed, 23 Jun 2021 18:41:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 222F561185 for ; Wed, 23 Jun 2021 18:41:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230205AbhFWSoK (ORCPT ); Wed, 23 Jun 2021 14:44:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbhFWSoD (ORCPT ); Wed, 23 Jun 2021 14:44:03 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D08F1C0617AF for ; Wed, 23 Jun 2021 11:41:44 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id z3-20020a17090a3983b029016bc232e40bso1917996pjb.4 for ; Wed, 23 Jun 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=skdjr/Y3oOtV+mfGs2QcPE1+zMQ2thCe6DzcXWbPwjA=; b=bYMCfogVS4hZnmP5fmYtdXMh1VT8VtHwn5rnQ1PoQK6jovQ2xCwPs8iNdtEA7KVyRS T4SKDkN+a6PDRMBIqSCKqN6tJ8Pon1PmTNGRVibGGQDSGrRbWeB+IDXvDJMbiij2mPjN O22LE8tOGoRTFbfEEyvG6n8XS7Z3w/dBq03kI= 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=skdjr/Y3oOtV+mfGs2QcPE1+zMQ2thCe6DzcXWbPwjA=; b=X+B7ZtCCdgMpgL8PoDTlvBKysbvLR1o9RLT8fL+iPJ6JlQfKh8+6ZK9M1Y6EjduRWz +4R50Lm4k6m3mNqrXdLJzUEf4vZ7AFJg2kRg6NHsALmyI0vHPoneZLleVyOXpPeRQANu rlLHnR2AIcRr+c3xRM/GKq8OO9xqoKOHEcR0Zr6BNnLvn65mZPc9ly2P4VH7Qc/a/9B0 TXBeInZ2FY8FtaxaKvMZzKvZ3/AHyNH8mel4yuyNOJG3dUtexk/iSrfud3T8ZrgyQVkO Xaxz0385FxyjDzwuDaQTgVLBGn9u9+QK+6vk5ZEQUNd3brhBZFC4+gJJnmc1mX7lJ2fL ASyw== X-Gm-Message-State: AOAM533hYbqNTdFlPTgluuJzkkV7QCKOhMngtPKl4x1PkkNTJ8eoVdwT QQvpZCVLcBNRMdHo9FIDcGP3Mw== X-Google-Smtp-Source: ABdhPJyV42jtwCEYcg/pFiqWWiJD6XZVKgJtjuy04xTFMxZsA3/24Fxkd4V0x2AqcyoQfeWfeHxoZQ== X-Received: by 2002:a17:902:6b04:b029:10b:cf5c:3739 with SMTP id o4-20020a1709026b04b029010bcf5c3739mr826800plk.76.1624473704420; Wed, 23 Jun 2021 11:41:44 -0700 (PDT) Received: from localhost ([2620:15c:202:201:d440:232:5e25:41f4]) by smtp.gmail.com with UTF8SMTPSA id v6sm548541pfi.46.2021.06.23.11.41.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Jun 2021 11:41:43 -0700 (PDT) From: Matthias Kaehlcke To: Greg Kroah-Hartman , Alan Stern , Rob Herring , Frank Rowand , Mathias Nyman , Felipe Balbi Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , Krzysztof Kozlowski , Peter Chen , Bastien Nocera , Stephen Boyd , Douglas Anderson , Ravi Chandra Sadineni , Matthias Kaehlcke , Dmitry Osipenko , Fabio Estevam Subject: [PATCH v13 6/7] usb: host: xhci-plat: Create platform device for onboard hubs in probe() Date: Wed, 23 Jun 2021 11:41:22 -0700 Message-Id: <20210623114025.v13.6.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeid> X-Mailer: git-send-email 2.32.0.288.g62a8d224e6-goog In-Reply-To: <20210623184124.3504047-1-mka@chromium.org> References: <20210623184124.3504047-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 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 2595a8f057c4..52d9b28745de 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1919,6 +1919,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));