From patchwork Mon May 23 09:04:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunfeng Yun X-Patchwork-Id: 12858756 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 0580FC433FE for ; Mon, 23 May 2022 10:19:35 +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: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:In-Reply-To:References: List-Owner; bh=nI2Kvjt9hA5E6tlLlqnvHCxfv2cmMaWtoVNyO3esmy4=; b=Z8fxz30Wcv5dR3 cVELgM9b3NYZazoVuJP41IKPsIeJX6dFrgYzvnKoWBr+wwOwJA6AxV11AdZML/Xz0sJPVr+kSEz0h AgHIH2ZCTcyHWupT8li/HM8yJXIQ5GbW4IBDzaHS5kyFmE8Zi2/V7x+pmtHRHxPeTDKU89eLsjO9l 5hrj6ctyIlOMXg3ACKsH9EyxldgcMN+d6M5gKacxchdaGdqyqlhxEiRh5ypfPx82L8q5YuZCqvS2l ujZowLJdGlwVOtxEkcJ5PfvlVFb4EwLHV25kXFUIGMV1ZFLgpsRj9JqxgljngMDBChFpWtGB1IXME 5TeKMSxZ+B08h6tBwDUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt58Z-003Agz-0Q; Mon, 23 May 2022 10:18:08 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt3zs-002gWT-7t; Mon, 23 May 2022 09:05:05 +0000 X-UUID: 59a23aa5801e48b59059ac97090035b7-20220523 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5, REQID:27aa4c48-e573-424b-a993-de2a526646bb, OB:0, LO B:0,IP:0,URL:5,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:5 X-CID-META: VersionHash:2a19b09, CLOUDID:75a0467a-5ef6-470b-96c9-bdb8ced32786, C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:0,BEC:nil X-UUID: 59a23aa5801e48b59059ac97090035b7-20220523 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 940816199; Mon, 23 May 2022 02:04:55 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 May 2022 02:04:53 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Mon, 23 May 2022 17:04:52 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Mon, 23 May 2022 17:04:50 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Chunfeng Yun , Krzysztof Kozlowski , Matthias Brugger , "Mathias Nyman" , , , , , , Eddie Hung Subject: [PATCH 1/4] dt-bindings: usb: mtk-xhci: add support 'resets' property Date: Mon, 23 May 2022 17:04:46 +0800 Message-ID: <20220523090449.14430-1-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_020504_395074_6377CF08 X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add 'resets' property to support IP reset usually by top pericfg. Signed-off-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml index 084d7135b2d9..892718459d25 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml @@ -113,6 +113,9 @@ properties: vbus-supply: description: Regulator of USB VBUS5v + resets: + maxItems: 1 + usb3-lpm-capable: true usb2-lpm-disable: true From patchwork Mon May 23 09:04:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunfeng Yun X-Patchwork-Id: 12858772 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 1440FC433EF for ; Mon, 23 May 2022 10:27:34 +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=jyyanMKpvoMlPFE7alHVbaWYbE3+4AgZkj9a1DVfygU=; b=4ILBaqpfhI1MvQ D3pjJmFo/XJyJKEQDknoJmMkEa6dAIWzw5HOOehpZbR3M6dRNhDc3Kk3b6aeGZvutj7QnmltGbPis vLZjDwpAmZRAWq3oiI8FSbgPdOGwlztUJjng4eUhSRdpHYQmyaD/CfbuwLwwx7T/glzVAXu9g1Wvh /Ee7I3HRvGWb5ntDBV6sTK715B9uzdcHVkjTsuStvns82T8inz+WXIwVKOsu7A0V7TYQ3svyTJ9He +OKdjnfOftg4Zt+HOdvcu9I8s43UDxO0stJQAoivDeFyVZENraZzfZsZymxjyFUaaF0mgeCWewia3 RowE4ldXa/Ogkc1bTbqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt5GH-003E1d-QY; Mon, 23 May 2022 10:26:06 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt45d-002jUf-NA; Mon, 23 May 2022 09:11:03 +0000 X-UUID: adf5745bc457435b905f45ecd64e405f-20220523 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5, REQID:368cd996-a41d-4e6f-80b5-efa8c641a22c, OB:0, LO B:0,IP:0,URL:5,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:5 X-CID-META: VersionHash:2a19b09, CLOUDID:28f1467a-5ef6-470b-96c9-bdb8ced32786, C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:0,BEC:nil X-UUID: adf5745bc457435b905f45ecd64e405f-20220523 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 930434728; Mon, 23 May 2022 02:10:54 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 May 2022 02:04:54 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 May 2022 17:04:53 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Mon, 23 May 2022 17:04:52 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Chunfeng Yun , Krzysztof Kozlowski , Matthias Brugger , "Mathias Nyman" , , , , , , Eddie Hung Subject: [PATCH 2/4] dt-bindings: usb: mtu3: add support 'resets' property Date: Mon, 23 May 2022 17:04:47 +0800 Message-ID: <20220523090449.14430-2-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220523090449.14430-1-chunfeng.yun@mediatek.com> References: <20220523090449.14430-1-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_021101_834776_28C5E8E0 X-CRM114-Status: UNSURE ( 9.79 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add 'resets' property to support IP reset usually by top pericfg. Signed-off-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Acked-by: Rob Herring --- Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml index df766f8de872..208d3f780b2a 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtu3.yaml @@ -106,6 +106,9 @@ properties: maximum-speed: enum: [super-speed-plus, super-speed, high-speed, full-speed] + resets: + maxItems: 1 + "#address-cells": enum: [1, 2] From patchwork Mon May 23 09:04:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunfeng Yun X-Patchwork-Id: 12858773 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 D85ACC433EF for ; Mon, 23 May 2022 10:28: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: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=ujSHbL0if4EBnmBc7QK0RshPBywPxhSm713OMHOYwOY=; b=PLzg4hpvzHjZhO /1iI3r162whh/VhLIXoLRuMx2gtLSask5LtFF18AXOoynWD20HmVQvwfeDqQNgyW3T2UR+WgOhOcz QGshAQ8VPaTSnt4N4jKtrkof+5OmSsqbaOIxDcljgFw9Td9fCy1CjYeJe+4icsGhpqJCy1fRzINhs Pep+BMnmttvHJ/AjYp+9fm2ITmTIp720z/RBRG4uNDxTIVUP2pk4knD2bBbKsUQrFGxnjImRYGyvp +h4WpOVagoMHbCVfSPkiyWqGWWQJtavJ/Jp2OzzvtNWKWoqeFLmWwnvUn9QMLiTKzRzTo4eNxeOtt B+B9UVenue+1vL/VmbQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt5Gw-003ELV-Jo; Mon, 23 May 2022 10:26:47 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt45e-002jW5-EA; Mon, 23 May 2022 09:11:04 +0000 X-UUID: 8e67c32408df4d04affa4e78bae2b53e-20220523 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5, REQID:ae9b736d-ef93-42bb-8e44-a90b0b9a287c, OB:0, LO B:0,IP:0,URL:5,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:5 X-CID-META: VersionHash:2a19b09, CLOUDID:27f1467a-5ef6-470b-96c9-bdb8ced32786, C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:0,BEC:nil X-UUID: 8e67c32408df4d04affa4e78bae2b53e-20220523 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1168906604; Mon, 23 May 2022 02:10:54 -0700 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 May 2022 02:04:55 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 May 2022 17:04:54 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Mon, 23 May 2022 17:04:53 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Chunfeng Yun , Krzysztof Kozlowski , Matthias Brugger , "Mathias Nyman" , , , , , , Eddie Hung Subject: [PATCH 3/4] usb: xhci-mtk: add support optional controller reset Date: Mon, 23 May 2022 17:04:48 +0800 Message-ID: <20220523090449.14430-3-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220523090449.14430-1-chunfeng.yun@mediatek.com> References: <20220523090449.14430-1-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_021102_534106_0446ED61 X-CRM114-Status: GOOD ( 13.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support controller reset via a reset-controller usually in infracfg, it's different with the software reset by IPPC which only used to reset MAC, and it will also reset IPPC meanwhile. Signed-off-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno --- drivers/usb/host/xhci-mtk.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/host/xhci-mtk.c b/drivers/usb/host/xhci-mtk.c index b1045f534a4b..01705e559c42 100644 --- a/drivers/usb/host/xhci-mtk.c +++ b/drivers/usb/host/xhci-mtk.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "xhci.h" #include "xhci-mtk.h" @@ -550,6 +551,12 @@ static int xhci_mtk_probe(struct platform_device *pdev) if (ret) goto disable_ldos; + ret = device_reset_optional(dev); + if (ret) { + dev_err_probe(dev, ret, "failed to reset controller\n"); + goto disable_clk; + } + hcd = usb_create_hcd(driver, dev, dev_name(dev)); if (!hcd) { ret = -ENOMEM; From patchwork Mon May 23 09:04:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunfeng Yun X-Patchwork-Id: 12858762 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 1B98EC433EF for ; Mon, 23 May 2022 10:26:38 +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=wWv1Dc0JTzg5xJv0UVXNWjU5UNqQoV6nh3+TR1nwItM=; b=ZjNG9JVEs5hZvC vgGBn/kmkZst/SqZvrOMG18NNrajPvuQpxIxXMHhwWGJ9oBTTkkEDKHiPl/nl9ZyyQ8LirVYuhzPg 4GHJBVF4bOxGKTYTD1Yj0TNbZz+ncdzkrw+LoTMl94EArLBOuTfLg2uTmYqEcpt3xKu2SmefK6U6Z P/I6OkNuLlrzjT4K+sfX7nfZYG/96Reh0FsQIDDG8StE/QTnm6YxDOZAUPsT+G6x2pMtkzG1P2ewQ IZ3dBb1gKj+6dbxMNLKHowILafP0kNQ3g1OsLK7n8vHmdo9NrnlsNVAiqHxw1lp8TiU1jHHsIfFYJ xuLOgArg7SZFLC99Zb1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt5Fe-003Djr-28; Mon, 23 May 2022 10:25:26 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nt45d-002jVR-N9; Mon, 23 May 2022 09:11:03 +0000 X-UUID: 115a0d2fcf7845c7b092a92326ed623b-20220523 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5, REQID:5f60b574-2258-41cd-83ed-151d26031bc8, OB:0, LO B:0,IP:0,URL:5,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:5 X-CID-META: VersionHash:2a19b09, CLOUDID:74fb36e3-edbf-4bd4-8a34-dfc5f7bb086d, C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:0,BEC:nil X-UUID: 115a0d2fcf7845c7b092a92326ed623b-20220523 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1141963159; Mon, 23 May 2022 02:10:54 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 23 May 2022 02:04:56 -0700 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Mon, 23 May 2022 17:04:55 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.3 via Frontend Transport; Mon, 23 May 2022 17:04:54 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Rob Herring CC: Chunfeng Yun , Krzysztof Kozlowski , Matthias Brugger , "Mathias Nyman" , , , , , , Eddie Hung Subject: [PATCH 4/4] usb: mtu3: add support controller reset Date: Mon, 23 May 2022 17:04:49 +0800 Message-ID: <20220523090449.14430-4-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220523090449.14430-1-chunfeng.yun@mediatek.com> References: <20220523090449.14430-1-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_021101_829079_8C070088 X-CRM114-Status: GOOD ( 13.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add support controller reset via a reset-controller usually in infracfg, it's different with the software reset by IPPC which only used to reset MAC, and it will also reset IPPC meanwhile. Signed-off-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno --- drivers/usb/mtu3/mtu3_plat.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index 4309ed939178..d14494b30064 100644 --- a/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "mtu3.h" #include "mtu3_dr.h" @@ -345,6 +346,12 @@ static int mtu3_probe(struct platform_device *pdev) dev_info(dev, "wakeup irq %d\n", ssusb->wakeup_irq); } + ret = device_reset_optional(dev); + if (ret) { + dev_err_probe(dev, ret, "failed to reset controller\n"); + goto comm_exit; + } + ssusb_ip_sw_reset(ssusb); if (IS_ENABLED(CONFIG_USB_MTU3_HOST))