From patchwork Wed Apr 2 18:51:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 14036395 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 A93E0C28B20 for ; Wed, 2 Apr 2025 18:54:00 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=fT9s92IDTldaQYyStL/Mnnq5dfNe0b5QX3KcHxry+m0=; b=gBqFj6+W3dXvEX Furig5zeMV/pu1vyt/jSheDLVwiwy/cgQxedRCPtr6VoGn0btHdZ3ykCuhSp/V/WTBS3fABYE/WCD ocX2ltAeHuIiRwSsKh6FGzIqvAhMRoNbhDcb1WrZpVhemg0xfig3GYSxXOdavxBK4HpQlK6ChLDF4 sCSsH/J7zquToE4nvoYRqcS/pAnkgen2V2G11X0aTpv5/eEVcp95iL2FKqbHZPo0aCbKCw4H0DUzs 9JFf1CVLqQb5PiYX5dKXI0MpkFF5GkyogYSvO3mHjxstTXI2rD8+Go7r3ixuJecKmca/JWpLM+wGC x0mAOQ94DXTlbhqgGCng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u03Ds-00000006ygi-1sWv; Wed, 02 Apr 2025 18:54:00 +0000 Received: from mail-oo1-xc34.google.com ([2607:f8b0:4864:20::c34]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u03C7-00000006yWa-1hCT for linux-phy@lists.infradead.org; Wed, 02 Apr 2025 18:52:13 +0000 Received: by mail-oo1-xc34.google.com with SMTP id 006d021491bc7-5fc6cd89f85so61392eaf.1 for ; Wed, 02 Apr 2025 11:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1743619930; x=1744224730; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=GqDKtnr5GaD9ToBXpFolLKV1wlSZYYAQ0+Ag5ew6NeI=; b=h+7oaD9RBartBG1FSlvcqqSsPHKTQME4LgEGCG7ac0ao41mUFNZ+yf/fVmwOcf3g+O FWYsvyhJX7s3H5jo8n2GHr3tAmVckP45jvslfbGndFhchBf8gj08dyllD9cnGzVib0Uv 0HI1sphIXjMT6DW2GYuWOzn5XJbDBCjWPuTpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743619930; x=1744224730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GqDKtnr5GaD9ToBXpFolLKV1wlSZYYAQ0+Ag5ew6NeI=; b=quSi+bWuCxwgL+w6cIL8kTQpR4J0ExqWniEm3vyCpZXT7tfWvWNhdSgWgpBa9/p5ru xFec5FXj8112oPAXpi97t8pcIHguNNXtqihkHAnYV5B4/sqJ+pELk9ca7D2kFmNArdAz kdTpgjiIEw63TDAIv2v9zyFpL5IrOai0xgXOQ1fyeD1M/K/a5bHiOUlliggB2QCwqdSR x5TLMb7kEVHLAuEAuzaVwgNHs4MzBQ/ZfWCxNmgW80RCmQFHsPxfs2x09kjEAaYEW6lm neM6oE/tD42Q8ZS/CNkebpwuPd6oq1fgmk1eJZkWJeqJh5m5YwOUlkS+eVtZ9+3ajTlv 2zwA== X-Forwarded-Encrypted: i=1; AJvYcCXntlOyxwd9ldND6lCECShyne5uLo0lSqQ7thq7YuuacsCtHCnU40FBDQ1SrzxupH72BmUIugVStVg=@lists.infradead.org X-Gm-Message-State: AOJu0YwVzJpcxmAvl4vgn+QsdFOkMIywBNP1roSl8zMWzJaH0zXlmSMc zUlplkrhY4WNJ1WsyT8y2UWLv87BN9malMJJOzx3nF8Bs0q45s09WVYHb1aLBg== X-Gm-Gg: ASbGncvVa0/bkqkEPUTyqKVpdk4hB+nwbIMNWbK4wc83CWBEpU99yC+E11FTOPib7GW YqgiPHv2z+YVuqLY1RWU6cH6BTRK7sIB7Ow2BBjzS9/MhBYDQUGBTCt+kcmCbpRgXn7ZtyMWn9p I+b3AfUXxkZ239goF0JWGB6c7Su7MH5Pmp+oU5T/48hZHSdvsGMyaTQCe88d/H9AD/CdSqGZ5Y3 8QXxCOf+Jh7jeSu0D6ku4L6RpOhe9WH3mIArmSDz26p6QBquWBWHeBOUTKrS82/MXZk3uuVhGRi vM8v+1Cp8YRDxXpJLan1YEW4bRtU+sR50VpWtMh3UFvKxS0PSiPMd4VKXVga6/OGHXkO3cpbSGc WayCjxKxMV/C5HkwFT+3iTg== X-Google-Smtp-Source: AGHT+IEbIiVI9NkR/CoWxd2DaTFQafqUnLyrs7RI+ylIFJC0k46MclFsgarT1oYobJHD6u84PnaCPQ== X-Received: by 2002:a05:6808:218d:b0:3f9:3de3:c8de with SMTP id 5614622812f47-3ff0f523e06mr10176623b6e.12.1743619930225; Wed, 02 Apr 2025 11:52:10 -0700 (PDT) Received: from stbirv-lnx-1.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3ff051aaf60sm2470462b6e.28.2025.04.02.11.52.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 11:52:09 -0700 (PDT) From: justin.chen@broadcom.com To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org Cc: rafal@milecki.pl, alcooperx@gmail.com, bcm-kernel-feedback-list@broadcom.com, florian.fainelli@broadcom.com, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, kishon@kernel.org, vkoul@kernel.org, Justin Chen Subject: [PATCH v3 1/2] dt-bindings: phy: brcmstb-usb-phy: Add support for bcm74110 Date: Wed, 2 Apr 2025 11:51:58 -0700 Message-Id: <20250402185159.2976920-2-justin.chen@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250402185159.2976920-1-justin.chen@broadcom.com> References: <20250402185159.2976920-1-justin.chen@broadcom.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250402_115211_440779_16DDACF9 X-CRM114-Status: GOOD ( 10.36 ) 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: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Justin Chen bcm74110 brcmstb usb phy adds further power savings during suspend states. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli Acked-by: Krzysztof Kozlowski --- v2: Sorted compat string ordering Add new compat string to constraints v3: Sorting try 2 .../devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml index 580fbe37b37f..843d04027c30 100644 --- a/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml +++ b/Documentation/devicetree/bindings/phy/brcm,brcmstb-usb-phy.yaml @@ -18,6 +18,7 @@ properties: - brcm,bcm4908-usb-phy - brcm,bcm7211-usb-phy - brcm,bcm7216-usb-phy + - brcm,bcm74110-usb-phy - brcm,brcmstb-usb-phy reg: @@ -139,7 +140,9 @@ allOf: properties: compatible: contains: - const: brcm,bcm7216-usb-phy + enum: + - brcm,bcm7216-usb-phy + - brcm,bcm74110-usb-phy then: properties: reg: From patchwork Wed Apr 2 18:51:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 14036396 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 B3F2EC28B20 for ; Wed, 2 Apr 2025 18:55:47 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=faKuVWeCBaM+u7u5gMgqRGQWcYzWKe0HNJAlBFCJh5w=; b=wWbTBRz1rNZCRR vGZkcTJb4CpBRdi4AmnXUMaMV/lQjtplGdLExdXGM6McGVaEYAF+CANIzLXSe1eRAwCyynVWhQNpP qdm0WnYuuh97gT/bJ5S+KWz8viy5i3ZhP+E48Qd8YPrrgDUGsNTBK/Nr55/DnPt+kUy9zrBgkG3Xb lOJMTMGdedBgwZHOR0f2qouXU8iqxUG1wtoAhTnY2XMs7e/nwL1bYbIh0ulRtaKePMV3m9UpkiL5u 6CTDc179C/sHVqUFF7UF3m84tibWdNUu85JdMHVhM9CwBcY/1oUe7UxLIcaNjihw+Amol8O6v9j28 /GeFrkBD0+ps1UBt7iRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.1 #2 (Red Hat Linux)) id 1u03Fb-00000006ytx-21eL; Wed, 02 Apr 2025 18:55:47 +0000 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by bombadil.infradead.org with esmtps (Exim 4.98.1 #2 (Red Hat Linux)) id 1u03C9-00000006yXG-0mNo for linux-phy@lists.infradead.org; Wed, 02 Apr 2025 18:52:14 +0000 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-601b6146b9cso60021eaf.0 for ; Wed, 02 Apr 2025 11:52:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1743619932; x=1744224732; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pC89xsTA3P9IUFJRwEIvyPFg1dVGPyboyapluIQiVZ8=; b=g2N9vS/uTpTGQWzaexw0Zypl9r0Lbsm/t2aIUpPApuNlvaneZGO0EY5GYm5OFh/Dib CMov2JS7w8hNQ3qBfhG9ToSR75wWnAIBuCDCg/9Bs+iOxxMEV9yHDlIxYWSVSAUwGkx7 e0GOpvBoETmcAChlBKcGhvHuL78JP7Pd9A9Sw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743619932; x=1744224732; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pC89xsTA3P9IUFJRwEIvyPFg1dVGPyboyapluIQiVZ8=; b=Cpk9oLXGTrcLhSi6+qWw3Fj7Eaa9rvHIMVD2QnMdPaBjCTUkArCQdRYJKYO8DOZSMZ IKSUCzSQkUR+kBG4mdCuDklCfRhlobWCqk4wF9jtQ5axjAqKUiZCo4K/wP/Uo4DObFt+ mHJFkpFOGGLTGekZAUkya3Nbv97cTnVCeYTnyXeV2NouKdyfkDKHL7YZIByr5qmmjZqj RIqLeqUbFyBO6y9ahTPlz8llLHNq7mIdyx9NuGKpXATFkqHxtIBIwnlMILCRwSa7KUXP HNl8on9SOeTen/N+hYjRjdYROwi/mKTGqpocaq36X6z0OW6U/421MxlNAVFU0TkxPl9+ 8Rxw== X-Forwarded-Encrypted: i=1; AJvYcCVe/D3HTCFe5EyEU76yaMXXddHAyrPQQODZYaa8EGP6iiUZD0rivStyjLz2TFzszjPF3actly5k27I=@lists.infradead.org X-Gm-Message-State: AOJu0YwzkQpWzslcg4Ya88rq4CxE6xqU2UMEJvwXnTxUWihUJEpwcMZv 4c+kXyaHUZUXU1H3SLPpq4YXsDvjw1EAgfq5aCBa4a14tOqQXs5GpdlIYc55aQ== X-Gm-Gg: ASbGnctpjKRfK8+39WtcRO4HoMiMO0LEgIqlph9nwv2oKTmw1DIb+vvbgfS6Q6Me7MP xw/NDi6HgGsm9IebpRuVARCZTONCb+vAwIWvCT+Q4cc2io90amdg7+uO+nK54siR+egfJsN3rU6 BG7hzg2Dx5OBd7xur8RqvpYEzZHTqxtnO1y8K+R5J4ody5OInXrUG/2UFK3WyZONsOyANIA8i8F 7TKEf3AHy0arMYMur5wBf+aOUclf/eqZcMtP5hsQUw13S4sdLtWomVaC/tNTQxnZJTJ3b/Z6+lb ttf5gjGjCh2ZBCavsH8Gfiavw6mv9VaOK7o05OccnRQlkvt4lybCFcCIdhG+pFZ7vFcw12tFqK1 asHIbCN/8FI3C1Y8knK3epg== X-Google-Smtp-Source: AGHT+IEsmqOHB5gS1eO00vX+adpCsduyiPqTQoQz9A0b9vatapqVYnqJpz+KZ7UBWUUYEebCPIuu+A== X-Received: by 2002:a05:6808:2e45:b0:3f6:a400:8216 with SMTP id 5614622812f47-3ff0f500249mr11232579b6e.13.1743619932128; Wed, 02 Apr 2025 11:52:12 -0700 (PDT) Received: from stbirv-lnx-1.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3ff051aaf60sm2470462b6e.28.2025.04.02.11.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Apr 2025 11:52:11 -0700 (PDT) From: justin.chen@broadcom.com To: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-phy@lists.infradead.org Cc: rafal@milecki.pl, alcooperx@gmail.com, bcm-kernel-feedback-list@broadcom.com, florian.fainelli@broadcom.com, conor+dt@kernel.org, krzk+dt@kernel.org, robh@kernel.org, kishon@kernel.org, vkoul@kernel.org, Justin Chen Subject: [PATCH v3 2/2] phy: usb: add support for bcm74110 Date: Wed, 2 Apr 2025 11:51:59 -0700 Message-Id: <20250402185159.2976920-3-justin.chen@broadcom.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250402185159.2976920-1-justin.chen@broadcom.com> References: <20250402185159.2976920-1-justin.chen@broadcom.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250402_115213_240014_78D09315 X-CRM114-Status: GOOD ( 13.80 ) 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: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org From: Justin Chen bcm74110 adds a freerun utmi/ref clock that saves further power during suspend states. A tune is also necessary to pass USB compliance test. Signed-off-by: Justin Chen Reviewed-by: Florian Fainelli --- .../phy/broadcom/phy-brcm-usb-init-synopsys.c | 61 +++++++++++++++++++ drivers/phy/broadcom/phy-brcm-usb-init.h | 1 + drivers/phy/broadcom/phy-brcm-usb.c | 14 +++++ 3 files changed, 76 insertions(+) diff --git a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c index dc452610934a..8a5ed50f2da0 100644 --- a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c +++ b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c @@ -43,6 +43,8 @@ #define USB_CTRL_SETUP_tca_drv_sel_MASK BIT(24) #define USB_CTRL_SETUP_STRAP_IPP_SEL_MASK BIT(25) #define USB_CTRL_USB_PM 0x04 +#define USB_CTRL_USB_PM_REF_S2_CLK_SWITCH_EN_MASK BIT(1) +#define USB_CTRL_USB_PM_UTMI_S2_CLK_SWITCH_EN_MASK BIT(2) #define USB_CTRL_USB_PM_XHC_S2_CLK_SWITCH_EN_MASK BIT(3) #define USB_CTRL_USB_PM_XHC_PME_EN_MASK BIT(4) #define USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK BIT(22) @@ -61,6 +63,13 @@ #define USB_CTRL_CTLR_CSHCR_ctl_pme_en_MASK BIT(18) #define USB_CTRL_P0_U2PHY_CFG1 0x68 #define USB_CTRL_P0_U2PHY_CFG1_COMMONONN_MASK BIT(10) +#define USB_CTRL_P0_U2PHY_CFG2 0x6c +#define USB_CTRL_P0_U2PHY_CFG2_TXVREFTUNE0_MASK GENMASK(20, 17) +#define USB_CTRL_P0_U2PHY_CFG2_TXVREFTUNE0_SHIFT 17 +#define USB_CTRL_P0_U2PHY_CFG2_TXRESTUNE0_MASK GENMASK(24, 23) +#define USB_CTRL_P0_U2PHY_CFG2_TXRESTUNE0_SHIFT 23 +#define USB_CTRL_P0_U2PHY_CFG2_TXPREEMPAMPTUNE0_MASK GENMASK(26, 25) +#define USB_CTRL_P0_U2PHY_CFG2_TXPREEMPAMPTUNE0_SHIFT 25 /* Register definitions for the USB_PHY block in 7211b0 */ #define USB_PHY_PLL_CTL 0x00 @@ -369,6 +378,42 @@ static void usb_uninit_common_7216(struct brcm_usb_init_params *params) } } +static void usb_init_common_74110(struct brcm_usb_init_params *params) +{ + void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; + u32 reg; + + reg = brcm_usb_readl(USB_CTRL_REG(ctrl, USB_PM)); + reg &= ~(USB_CTRL_MASK(USB_PM, REF_S2_CLK_SWITCH_EN) | + USB_CTRL_MASK(USB_PM, UTMI_S2_CLK_SWITCH_EN)); + brcm_usb_writel(reg, USB_CTRL_REG(ctrl, USB_PM)); + + usb_init_common_7216(params); + + reg = brcm_usb_readl(USB_CTRL_REG(ctrl, P0_U2PHY_CFG2)); + reg &= ~(USB_CTRL_P0_U2PHY_CFG2_TXVREFTUNE0_MASK | + USB_CTRL_P0_U2PHY_CFG2_TXRESTUNE0_MASK | + USB_CTRL_P0_U2PHY_CFG2_TXPREEMPAMPTUNE0_MASK); + reg |= (0x6 << USB_CTRL_P0_U2PHY_CFG2_TXVREFTUNE0_SHIFT) | + (0x3 << USB_CTRL_P0_U2PHY_CFG2_TXRESTUNE0_SHIFT) | + (0x2 << USB_CTRL_P0_U2PHY_CFG2_TXPREEMPAMPTUNE0_SHIFT); + brcm_usb_writel(reg, USB_CTRL_REG(ctrl, P0_U2PHY_CFG2)); +} + +static void usb_uninit_common_74110(struct brcm_usb_init_params *params) +{ + void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; + u32 reg; + + if (params->wake_enabled) { + reg = brcm_usb_readl(USB_CTRL_REG(ctrl, USB_PM)); + reg |= (USB_CTRL_MASK(USB_PM, REF_S2_CLK_SWITCH_EN) | + USB_CTRL_MASK(USB_PM, UTMI_S2_CLK_SWITCH_EN)); + brcm_usb_writel(reg, USB_CTRL_REG(ctrl, USB_PM)); + } + usb_uninit_common_7216(params); +} + static void usb_uninit_common_7211b0(struct brcm_usb_init_params *params) { void __iomem *ctrl = params->regs[BRCM_REGS_CTRL]; @@ -426,6 +471,16 @@ static void usb_set_dual_select(struct brcm_usb_init_params *params) brcm_usb_writel(reg, USB_CTRL_REG(ctrl, USB_DEVICE_CTL1)); } +static const struct brcm_usb_init_ops bcm74110_ops = { + .init_ipp = usb_init_ipp, + .init_common = usb_init_common_74110, + .init_xhci = usb_init_xhci, + .uninit_common = usb_uninit_common_74110, + .uninit_xhci = usb_uninit_xhci, + .get_dual_select = usb_get_dual_select, + .set_dual_select = usb_set_dual_select, +}; + static const struct brcm_usb_init_ops bcm7216_ops = { .init_ipp = usb_init_ipp, .init_common = usb_init_common_7216, @@ -446,6 +501,12 @@ static const struct brcm_usb_init_ops bcm7211b0_ops = { .set_dual_select = usb_set_dual_select, }; +void brcm_usb_dvr_init_74110(struct brcm_usb_init_params *params) +{ + params->family_name = "74110"; + params->ops = &bcm74110_ops; +} + void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params) { diff --git a/drivers/phy/broadcom/phy-brcm-usb-init.h b/drivers/phy/broadcom/phy-brcm-usb-init.h index c1a88f5cd4cd..4c7be78d0b14 100644 --- a/drivers/phy/broadcom/phy-brcm-usb-init.h +++ b/drivers/phy/broadcom/phy-brcm-usb-init.h @@ -72,6 +72,7 @@ struct brcm_usb_init_params { bool wake_enabled; }; +void brcm_usb_dvr_init_74110(struct brcm_usb_init_params *params); void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params); void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params); void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params); diff --git a/drivers/phy/broadcom/phy-brcm-usb.c b/drivers/phy/broadcom/phy-brcm-usb.c index 6362ca5b7fb6..0666864c2f77 100644 --- a/drivers/phy/broadcom/phy-brcm-usb.c +++ b/drivers/phy/broadcom/phy-brcm-usb.c @@ -283,6 +283,16 @@ static const struct attribute_group brcm_usb_phy_group = { .attrs = brcm_usb_phy_attrs, }; +static const struct match_chip_info chip_info_74110 = { + .init_func = &brcm_usb_dvr_init_74110, + .required_regs = { + BRCM_REGS_CTRL, + BRCM_REGS_XHCI_EC, + BRCM_REGS_XHCI_GBL, + -1, + }, +}; + static const struct match_chip_info chip_info_4908 = { .init_func = &brcm_usb_dvr_init_4908, .required_regs = { @@ -325,6 +335,10 @@ static const struct match_chip_info chip_info_7445 = { }; static const struct of_device_id brcm_usb_dt_ids[] = { + { + .compatible = "brcm,bcm74110-usb-phy", + .data = &chip_info_74110, + }, { .compatible = "brcm,bcm4908-usb-phy", .data = &chip_info_4908,