From patchwork Wed Dec 1 18:06:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 12650545 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2EB54C433FE for ; Wed, 1 Dec 2021 18:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S8A77zPaR8Lx6WTKkD6QJezRkR9NjpJtUuGrv7mrxSQ=; b=JpDXfWNYg3Fakh 8zI8SBafyt3I9dHeeTMxDFpkIkAGNr5TlI/ro8NqeaBmDpdyirXCd8Gfi/jsx4SsloT8eApwizpJU 4lyDJgYzKgSWxES2uKNDVnQkT0Qyv7U2JstGtxd9l7cNckjpdxpDJFXmJwlxHAt0Qf3Cd3pyZ6Gp3 UsTZkdEEyJGxkuKQMCB5Uathz/br66SITiQ6P0qnQ+dHd1dqmGhKOm2Cbw0IIen5olazTC5NQwKiY bLIxj7UqSWFq2DFhpFwxV7Pg29YvhTIxcxupLigsDHeW7yyoIXcyiV6UIes6lZ+JPebA/13LdpIdF llFtE5U7oSIm0zykDFdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msU0V-009hVT-HP; Wed, 01 Dec 2021 18:07:03 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msU0S-009hU0-RI for linux-phy@lists.infradead.org; Wed, 01 Dec 2021 18:07:02 +0000 Received: by mail-pj1-x102f.google.com with SMTP id y14-20020a17090a2b4e00b001a5824f4918so356641pjc.4 for ; Wed, 01 Dec 2021 10:07:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zWKI66hVWIsm1UjmNtmr6LT7Fi7B/zNN7cFHtvKJDKs=; b=QENXn3UhkrxYHTUnnU/Qqlf3ke8S1612FM0FGyrmbHzRXQQC4yBY5pRGoGXpvisB0r IyLRSpPBMkdL5uUIxdvfk2sZH5AH+WVnhMeYCZt1jF7qc5lWbRQXG8LW9yXfKm66WuV+ q4CQo6WRC2xMRyQuY0wh+6d+wxjwV+x+ffDXUhV87Fhng135sFSJnE7W63XZeMarMYOd 3g4hG/oA88/5pq0ABrsuQdb8GMLv6rBRSvXI+S/bWEkQh+E7BzFIHhOIpJRL0vfZEoA6 XulROLr2zFjxcdz/m112UiT3WMOSGghOG11hC/pNsHP92XpOjizXDyWy+u5JGT91gLjd 9Yew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zWKI66hVWIsm1UjmNtmr6LT7Fi7B/zNN7cFHtvKJDKs=; b=fNsGXV0oim9WblPhmQMnWfabwo+ZY7ixXLVbHDKLnfRkWe0NLdvM09fyBD4NRHlBF7 1K5U2BIOTaSGGvn84XJsuHRo6qK46bunEfsLXJsZ+1g23frEHd14VmqP0uejhJyMG15F 8GYIOcg72AuxWic64hL9uYO80QRXphHPanhZbReEbfnmS5uIvTq2ZgzoTajo1BQkY1CT GiD6zeWTGnHxiGJ7QqsBIY5iJoyASDj7p9uyfvAOln+8sMpd3Yab106TKE55lqAa9RZL MzTuaDUyhCxZuQ8RuoHZWMiLG9syA1d5CbVMrunRJ0n2fL3xSM6CjJD4PW/ODOIRTGDN hcPw== X-Gm-Message-State: AOAM533eZWUNOKH9VF5Q8iuNyiiuc53+q2Nf2u1pt6Rj2AbFnyBWVW/a aFBxBcAY6lIj3aVBT0GZDcI= X-Google-Smtp-Source: ABdhPJxO8QODxk+y6B10Qtq3Y+cGUdOf8qcl/BPukwUHTst/HAy6gFol6DNjPAOP2G6YgYyGaoTiuQ== X-Received: by 2002:a17:902:d2cf:b0:141:b347:df9d with SMTP id n15-20020a170902d2cf00b00141b347df9dmr9249283plc.37.1638382020132; Wed, 01 Dec 2021 10:07:00 -0800 (PST) Received: from stbsrv-and-01.and.broadcom.net ([192.19.11.250]) by smtp.gmail.com with ESMTPSA id w142sm462582pfc.115.2021.12.01.10.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 10:06:59 -0800 (PST) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , bcm-kernel-feedback-list@broadcom.com, Florian Fainelli , Kishon Vijay Abraham I , linux-phy@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Vinod Koul Subject: [PATCH 1/3] phy: usb: Leave some clocks running during suspend Date: Wed, 1 Dec 2021 13:06:51 -0500 Message-Id: <20211201180653.35097-2-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211201180653.35097-1-alcooperx@gmail.com> References: <20211201180653.35097-1-alcooperx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211201_100700_914597_E37E3AC2 X-CRM114-Status: GOOD ( 20.42 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The PHY client driver does a phy_exit() call on suspend or rmmod and the PHY driver needs to know the difference because some clocks need to be kept running for suspend but can be shutdown on unbind/rmmod (or if there are no PHY clients at all). The fix is to use a PM notifier so the driver can tell if a PHY client is calling exit() because of a system suspend or a driver unbind/rmmod. Signed-off-by: Al Cooper Acked-by: Florian Fainelli --- drivers/phy/broadcom/phy-brcm-usb.c | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c index 116fb23aebd9..0f1deb6e0eab 100644 --- a/drivers/phy/broadcom/phy-brcm-usb.c +++ b/drivers/phy/broadcom/phy-brcm-usb.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "phy-brcm-usb-init.h" @@ -70,12 +71,35 @@ struct brcm_usb_phy_data { int init_count; int wake_irq; struct brcm_usb_phy phys[BRCM_USB_PHY_ID_MAX]; + struct notifier_block pm_notifier; + bool pm_active; }; static s8 *node_reg_names[BRCM_REGS_MAX] = { "crtl", "xhci_ec", "xhci_gbl", "usb_phy", "usb_mdio", "bdc_ec" }; +static int brcm_pm_notifier(struct notifier_block *notifier, + unsigned long pm_event, + void *unused) +{ + struct brcm_usb_phy_data *priv = + container_of(notifier, struct brcm_usb_phy_data, pm_notifier); + + switch (pm_event) { + case PM_HIBERNATION_PREPARE: + case PM_SUSPEND_PREPARE: + priv->pm_active = true; + break; + case PM_POST_RESTORE: + case PM_POST_HIBERNATION: + case PM_POST_SUSPEND: + priv->pm_active = false; + break; + } + return NOTIFY_DONE; +} + static irqreturn_t brcm_usb_phy_wake_isr(int irq, void *dev_id) { struct phy *gphy = dev_id; @@ -91,6 +115,9 @@ static int brcm_usb_phy_init(struct phy *gphy) struct brcm_usb_phy_data *priv = container_of(phy, struct brcm_usb_phy_data, phys[phy->id]); + if (priv->pm_active) + return 0; + /* * Use a lock to make sure a second caller waits until * the base phy is inited before using it. @@ -120,6 +147,9 @@ static int brcm_usb_phy_exit(struct phy *gphy) struct brcm_usb_phy_data *priv = container_of(phy, struct brcm_usb_phy_data, phys[phy->id]); + if (priv->pm_active) + return 0; + dev_dbg(&gphy->dev, "EXIT\n"); if (phy->id == BRCM_USB_PHY_2_0) brcm_usb_uninit_eohci(&priv->ini); @@ -488,6 +518,9 @@ static int brcm_usb_phy_probe(struct platform_device *pdev) if (err) return err; + priv->pm_notifier.notifier_call = brcm_pm_notifier; + register_pm_notifier(&priv->pm_notifier); + mutex_init(&priv->mutex); /* make sure invert settings are correct */ @@ -528,7 +561,10 @@ static int brcm_usb_phy_probe(struct platform_device *pdev) static int brcm_usb_phy_remove(struct platform_device *pdev) { + struct brcm_usb_phy_data *priv = dev_get_drvdata(&pdev->dev); + sysfs_remove_group(&pdev->dev.kobj, &brcm_usb_phy_group); + unregister_pm_notifier(&priv->pm_notifier); return 0; } @@ -539,6 +575,7 @@ static int brcm_usb_phy_suspend(struct device *dev) struct brcm_usb_phy_data *priv = dev_get_drvdata(dev); if (priv->init_count) { + dev_dbg(dev, "SUSPEND\n"); priv->ini.wake_enabled = device_may_wakeup(dev); if (priv->phys[BRCM_USB_PHY_3_0].inited) brcm_usb_uninit_xhci(&priv->ini); @@ -578,6 +615,7 @@ static int brcm_usb_phy_resume(struct device *dev) * Uninitialize anything that wasn't previously initialized. */ if (priv->init_count) { + dev_dbg(dev, "RESUME\n"); if (priv->wake_irq >= 0) disable_irq_wake(priv->wake_irq); brcm_usb_init_common(&priv->ini); From patchwork Wed Dec 1 18:06:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 12650547 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 448BAC43217 for ; Wed, 1 Dec 2021 18:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xVOfNs/4jrD5NOp10qo/PYBVUViITOPcnEM7eX4hWvE=; b=EEGE1uUwnmhVAA QR2gEkC66GFx/bhaS4xMyPpRISOiugGjn2IIIODXy3VlBJXUykAl3TIEkkzSL3z1Qx9yTt2IXTQwF U6g1rfWWhhVEJAXcxhps8HGY0+GJemX+VBK4qMQHSz4OlAETnqVkubj/1PW0+1X/yOUd8bIGr+Q9u zLzWVhB0cVMy1PnHqLXTbjGAl4sU1IE2MC8R6GxN93MP6CdaImtZ2GLLljPrO+rbKUa+3Zox0eLbr JHzuhzr/ED8fnNGee+H8Uy7MSPoPPepx8d7zdcC6aMlk27Xy/0wPN/2TUZFLrOiNBZ31ZhNiR5z9Z Z90OsbdhleTexFLvo+fQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msU0X-009hWX-M9; Wed, 01 Dec 2021 18:07:05 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msU0U-009hUK-KT for linux-phy@lists.infradead.org; Wed, 01 Dec 2021 18:07:04 +0000 Received: by mail-pl1-x635.google.com with SMTP id y7so18364920plp.0 for ; Wed, 01 Dec 2021 10:07:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c+NX3gtEouviDYYWwLITzdsLQeio17BWeB+ByMH2wiw=; b=qJe9Y/WnG9v5EpWjsltHKjnV5SIP2/a3F5ANkxdXf1eIobVB18O7P9GWQKbQwMYKVH dNIpBezf57Qs2miROrqg0f4S/PCmsAeffZ4pYL680rLj4TTkNfDOuWphYoOugCbL4Zzu WvkNX7Y7tOCeGnkW2wSmoQl8LGsPUIT+aWaqCFRpUAEQ9s1dtyErWcl3wSzh0ecZIpbc SOK6O1ttXbY15+4rCQKmKha+rbZF3lD7NrX3gEVFTWHgm+6qPYyyASSD1Zp4P4+k+jd9 w3z3XfmY6Ctd5eq29rKnuRkwzLc07ABxhCcK/53RijWHh9eblFU2lasBN+2r/B3JyF6r iuVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c+NX3gtEouviDYYWwLITzdsLQeio17BWeB+ByMH2wiw=; b=VIyrgIvJnB3e49wya2Z2zrMWLRYtQsKJv9nofjnkHm44uhz7haiShJS+oUXxjhLehP vnIWQQrwOikdxBdmTXhpyrYYuKy6nDrKfhmwg5bIlRZlgbDsDMVxh/yx86QSA8qZpNV2 BomXBDdmTfOF9avMuT4qzLSMLZxvRJpViJrIWWNKXht/r0+wGGryKXjOiALKEAtDC+0n OroCmYUGYvx+qRoFusqD/Qs5j8gF71Ehn+y85coHVaDy5+8nanKWZA4TAiHuLG+ITGTw n+BIe2zY4SjotEK9UCr1Y0WqTW7gjHwn1vhgGuXsVMSXd/36MlTOaCQjNGwlYxT4LAJW wCrQ== X-Gm-Message-State: AOAM533DDu0raRZwpajmHan0toXSM4VRMquK1wnwQg2O8ApsHrrTOq1Z WKkU+NEjwj9bcVJvs6qn1geweqfQNpx74A== X-Google-Smtp-Source: ABdhPJwAyGKBpZQs/RfZUfOLIJT3k+ufQ/LA5o7NGwxT3nB+d62kJddvjVPtUrhbDB0EjKMmpEHmQw== X-Received: by 2002:a17:902:82c1:b0:141:e920:3b4c with SMTP id u1-20020a17090282c100b00141e9203b4cmr9361932plz.64.1638382021455; Wed, 01 Dec 2021 10:07:01 -0800 (PST) Received: from stbsrv-and-01.and.broadcom.net ([192.19.11.250]) by smtp.gmail.com with ESMTPSA id w142sm462582pfc.115.2021.12.01.10.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 10:07:01 -0800 (PST) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , bcm-kernel-feedback-list@broadcom.com, Florian Fainelli , Kishon Vijay Abraham I , linux-phy@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Vinod Koul Subject: [PATCH 2/3] usb: Add "wake on" functionality for newer Synopsis XHCI controllers Date: Wed, 1 Dec 2021 13:06:52 -0500 Message-Id: <20211201180653.35097-3-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211201180653.35097-1-alcooperx@gmail.com> References: <20211201180653.35097-1-alcooperx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211201_100702_706306_3B157B32 X-CRM114-Status: GOOD ( 15.63 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Add "wake on" support for the newer Synopsis based XHCI only controller. This works on the 72165 and 72164 and newer chips and does not work on 7216 based systems. Also switch the USB sysclk to a slower clock on suspend to save additional power in S2. The clock switch will only save power on the 72165b0 and newer chips and is a nop on older chips. Signed-off-by: Al Cooper Acked-by: Florian Fainelli --- .../phy/broadcom/phy-brcm-usb-init-synopsys.c | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c index e63457e145c7..d2524b70ea16 100644 --- a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c +++ b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c @@ -47,6 +47,8 @@ #define USB_CTRL_USB_PM_SOFT_RESET_MASK 0x40000000 #define USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK 0x00800000 #define USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK 0x00400000 +#define USB_CTRL_USB_PM_XHC_PME_EN_MASK 0x00000010 +#define USB_CTRL_USB_PM_XHC_S2_CLK_SWITCH_EN_MASK 0x00000008 #define USB_CTRL_USB_PM_STATUS 0x08 #define USB_CTRL_USB_DEVICE_CTL1 0x10 #define USB_CTRL_USB_DEVICE_CTL1_PORT_MODE_MASK 0x00000003 @@ -190,10 +192,6 @@ static void usb_init_common(struct brcm_usb_init_params *params) pr_debug("%s\n", __func__); - USB_CTRL_UNSET(ctrl, USB_PM, USB_PWRDN); - /* 1 millisecond - for USB clocks to settle down */ - usleep_range(1000, 2000); - if (USB_CTRL_MASK(USB_DEVICE_CTL1, PORT_MODE)) { reg = brcm_usb_readl(USB_CTRL_REG(ctrl, USB_DEVICE_CTL1)); reg &= ~USB_CTRL_MASK(USB_DEVICE_CTL1, PORT_MODE); @@ -222,6 +220,17 @@ static void usb_wake_enable_7211b0(struct brcm_usb_init_params *params, USB_CTRL_UNSET(ctrl, CTLR_CSHCR, ctl_pme_en); } +static void usb_wake_enable_7216(struct brcm_usb_init_params *params, + bool enable) +{ + void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; + + if (enable) + USB_CTRL_SET(ctrl, USB_PM, XHC_PME_EN); + else + USB_CTRL_UNSET(ctrl, USB_PM, XHC_PME_EN); +} + static void usb_init_common_7211b0(struct brcm_usb_init_params *params) { void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; @@ -295,6 +304,20 @@ static void usb_init_common_7211b0(struct brcm_usb_init_params *params) usb2_eye_fix_7211b0(params); } +static void usb_init_common_7216(struct brcm_usb_init_params *params) +{ + void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; + + USB_CTRL_UNSET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN); + USB_CTRL_UNSET(ctrl, USB_PM, USB_PWRDN); + + /* 1 millisecond - for USB clocks to settle down */ + usleep_range(1000, 2000); + + usb_wake_enable_7216(params, false); + usb_init_common(params); +} + static void usb_init_xhci(struct brcm_usb_init_params *params) { pr_debug("%s\n", __func__); @@ -302,14 +325,20 @@ static void usb_init_xhci(struct brcm_usb_init_params *params) xhci_soft_reset(params, 0); } -static void usb_uninit_common(struct brcm_usb_init_params *params) +static void usb_uninit_common_7216(struct brcm_usb_init_params *params) { void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; pr_debug("%s\n", __func__); - USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN); + if (!params->wake_enabled) { + USB_CTRL_SET(ctrl, USB_PM, USB_PWRDN); + /* Switch to using slower clock during suspend to save power */ + USB_CTRL_SET(ctrl, USB_PM, XHC_S2_CLK_SWITCH_EN); + } else { + usb_wake_enable_7216(params, true); + } } static void usb_uninit_common_7211b0(struct brcm_usb_init_params *params) @@ -371,9 +400,9 @@ static void usb_set_dual_select(struct brcm_usb_init_params *params, int mode) static const struct brcm_usb_init_ops bcm7216_ops = { .init_ipp = usb_init_ipp, - .init_common = usb_init_common, + .init_common = usb_init_common_7216, .init_xhci = usb_init_xhci, - .uninit_common = usb_uninit_common, + .uninit_common = usb_uninit_common_7216, .uninit_xhci = usb_uninit_xhci, .get_dual_select = usb_get_dual_select, .set_dual_select = usb_set_dual_select, @@ -396,6 +425,7 @@ void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params) params->family_name = "7216"; params->ops = &bcm7216_ops; + params->suspend_with_clocks = true; } void brcm_usb_dvr_init_7211b0(struct brcm_usb_init_params *params) From patchwork Wed Dec 1 18:06:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 12650549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5B0E5C433EF for ; Wed, 1 Dec 2021 18:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SqHJDz9Lssk8Fx3r/rirR9Xj5jHLLWxxMWijo/uA7bA=; b=FwmtcRDIxT/ucK D3/X/hKXyJndJ7YUv6x/Nw+1VTFcqKZss2dcKh50ZtXSR6bkXHDqRJy5dGzfTFclnKMieSPkCYF/z gBJaynOQWe+ZjdM53vPwbRdhl4Al6TXhBzj3h3GX46Yx4SVRtyVP4MytPcZY6SGaxdy1UNGnRAOQk aSUl6gsG/fJbvv3x4PVVImwHfVE31pmtj0e8KZAxaJ7InQG+cej8mffMKguhQUqyy579I2VNLQPEQ P8C2cg297ysPUh8l8KtNhqKXvekFo/ZgCtdwPtOsCPbBdR29CSr4WFk0Cc4SNU0Tomnd2D3ycSUTH F1HAhys7c4cC53ScaAHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1msU0Y-009hXC-Px; Wed, 01 Dec 2021 18:07:06 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1msU0V-009hVK-SO for linux-phy@lists.infradead.org; Wed, 01 Dec 2021 18:07:05 +0000 Received: by mail-pl1-x636.google.com with SMTP id p18so18310476plf.13 for ; Wed, 01 Dec 2021 10:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=4ecpP48RccuXNO4SgNuVitHpjcRwWPUYXr+xSlajqRg=; b=KU5yCnxiU1nWbi6+szU2izK7gPazQlzOTLJZfeRrUbLx/t6GdEM/p0cShqUstWoflE HubVD35uMRXAyWuEne6X8+1Qu71VGWiUNXz2KdEAFHk/lkXL5dayubqrtZh6pTsEiKNj 6Xsb/syAvakOfZi5BO9X6bAkxlkRQn2UJQg9m55nVmi0K0BZCChNVJfAhDF9biuXUWcr 24hMuKAcX3hE7x5w8h7NfCSub2olqEaXIz7ug3UrHKF+ljIxBzLlvhNadX+ehlScxZ1u yuz/3iqOgTIUjh6ZoNaWXDbuXhN4qubFw1bkPF13GEbK7e7gi6Bzbb/ozVNxh0Hw7eZs Blfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=4ecpP48RccuXNO4SgNuVitHpjcRwWPUYXr+xSlajqRg=; b=yxoEpL9uP7ZbDQ+N5qTAEAL5ova0ohBqAEP1ZwtHFJFDHVbZp+ZEzueMNQ6N09pZJo 2asaPHQ8kHDpBkxVS4jGi0+HJtco1BxL69Ef9jt08SrvjnuTX2Fbifk1TdIgAfu1xZ3w 6FwsKhhNyjoPdsR+hoMJeCwgeh2Zb3rXHia0gke5XHAoXX4gNYOcIPybio979jXR+LLF ZCPV1aJoQpsw+Hto1VTMTTcaN8r5qoYHfemWkAPvB67fexFadzeyfurNxMbtAiq+t58t FcchzmUWDkK5a+145OZLGIs/3oqQiRB7XCm9quukKy5D7EgHt017ioDZXUzkPbtpBuJW CJdQ== X-Gm-Message-State: AOAM5317fAMoZ7uaTGP30YekqGrEyGDThBZH3qJFmYWtYp57iq7Tok8A rM77XtLfjVpqUsV5PbtKukw= X-Google-Smtp-Source: ABdhPJwyDmOP1QSi3uTWWoqoJq/dBKqbQPrqJ/3IsE2TGb7ni/InMrGQk1dZe5M2qCWuklbL+I0ZiA== X-Received: by 2002:a17:90b:4c0d:: with SMTP id na13mr9608617pjb.177.1638382022739; Wed, 01 Dec 2021 10:07:02 -0800 (PST) Received: from stbsrv-and-01.and.broadcom.net ([192.19.11.250]) by smtp.gmail.com with ESMTPSA id w142sm462582pfc.115.2021.12.01.10.07.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 10:07:02 -0800 (PST) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , bcm-kernel-feedback-list@broadcom.com, Florian Fainelli , Kishon Vijay Abraham I , linux-phy@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Vinod Koul Subject: [PATCH 3/3] phy: broadcom: Kconfig: Fix PHY_BRCM_USB config option Date: Wed, 1 Dec 2021 13:06:53 -0500 Message-Id: <20211201180653.35097-4-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211201180653.35097-1-alcooperx@gmail.com> References: <20211201180653.35097-1-alcooperx@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211201_100703_966325_266C86A8 X-CRM114-Status: GOOD ( 11.48 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org The previous commit 4b402fa8e0b7 ("phy: phy-brcm-usb: support PHY on the BCM4908") added a second "default" line for ARCH_BCM_4908 above the original "default" line for ARCH_BRCMSTB. When two "default" lines are used, only the first is used and this change stopped the PHY_BRCM_USB option for being enabled for ARCH_BRCMSTB. The fix is to use one "default line with "||". Fixes: 4b402fa8e0b7 ("phy: phy-brcm-usb: support PHY on the BCM4908") Signed-off-by: Al Cooper Acked-by: Florian Fainelli Acked-by: Rafał Miłecki --- drivers/phy/broadcom/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/phy/broadcom/Kconfig b/drivers/phy/broadcom/Kconfig index f81e23742079..849c4204f550 100644 --- a/drivers/phy/broadcom/Kconfig +++ b/drivers/phy/broadcom/Kconfig @@ -97,8 +97,7 @@ config PHY_BRCM_USB depends on OF select GENERIC_PHY select SOC_BRCMSTB if ARCH_BRCMSTB - default ARCH_BCM4908 - default ARCH_BRCMSTB + default ARCH_BCM4908 || ARCH_BRCMSTB help Enable this to support the Broadcom STB USB PHY. This driver is required by the USB XHCI, EHCI and OHCI