From patchwork Fri Sep 10 16:38:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Birsan X-Patchwork-Id: 12485601 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 8CDC9C433EF for ; Fri, 10 Sep 2021 16:41:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5C15660F24 for ; Fri, 10 Sep 2021 16:41:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5C15660F24 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=LUgKq550nGysWLuTGuNf580TUY9eC7Kqp1pEjYekLrI=; b=cKdzzboqKFh2KC TYf+RQg1ZB1E6GTDeuoaVdTKHGIFoE0cwLPP2GbCwR6kj4jy3MerNEjim0CSIqm1QaVvWaZfs7UV0 EFU0M116/hyYhSMHLwQKzZi2v+DhGwMpYKBktWz4uLt0rtk/6R4e4hc+PQYmGI9S280j0dKmGUSFr LJQLZEnviQpQFutcb36QlRkEGplXJOYJmQKNZdI9hRNczoIweKl3bshqyiokl38vI/MP21B1QtKCC QzXBZhp+h8tsUU4xrPCQM4o+5CtWGt5LYY6/tGpopAgKvKsP7AUrIPYOZm/9yK9vGSy2n3/7gSP2F M9QzRiY4E9700RgErGag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOjYT-00DAnm-R3; Fri, 10 Sep 2021 16:39:10 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOjYP-00DAmH-Ok for linux-arm-kernel@lists.infradead.org; Fri, 10 Sep 2021 16:39:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631291945; x=1662827945; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jbQHrCnbrHZDMHkoDO6acIBG7KqyxGyyCwJQT7ukBw8=; b=kGJYte4HTW4Zy6SuizkxTU5ry3DS5pnmXUBOc7BDr0FmpgR2Go5P5hXu O3b6G/pTzUkOI47oE5oQjT26zCpEYeSdcENgbhhQedT4fmiqtVIZK0yhZ 0ibIhfXuGxQn8DUkm3oER2QgO66ryEt42eCukh2aykv9Fv2wBjiaMn2xB HQwkFHSOzbSdNUtac/dHWn8ZHVh+0aCkrXwYxX+irGi7w0yHTvp8uj6m4 RMFBdJXsSFhgF2sIuyECVzQfx+oV/zbZC7feQjzKA3mEfnsk2bK0ZaL4Y RkNks0jIZ6p5RInXcYFuDTSXLNsTzFpVzM24/W9/BL0oVi2SX9s8DykXa g==; IronPort-SDR: KOOWm0v9t6LlQZWvkOeXO59HhJQ8h5wfsDpkATe8v30OJsq4WWq1yGXA0XFX3G3lPAqTfZ1ydV ro8mLli7e4sW4zjbVD8M3Ejg4C6I0UG+F9tMExjCDAyi5xq4FAh4Mvv5sVZpuyVJFzeV1xU/5u Ho2QJT8Z1IDd6ximzOaLkAc3ZgIxe2HM9dOIosSENePbsaERUcts9U4omTBvEdh25dmsWQrCgE ZtGiqE23epp5+y0Bgw4s+smDbbbgsfub+pG+Dhla1Kax1Bwflo7Y1Rv8DZ64vmlkeKClJIFizn 9E3r1Y0GmffSnRPo9E54DC7f X-IronPort-AV: E=Sophos;i="5.85,283,1624345200"; d="scan'208";a="128921683" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 10 Sep 2021 09:39:03 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 10 Sep 2021 09:39:03 -0700 Received: from plexus-g.actel.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 10 Sep 2021 09:39:00 -0700 From: To: , , , , , CC: , , , Cristian Birsan Subject: [PATCH 1/2] dt-bindings: usb: atmel: add USB PHY type property Date: Fri, 10 Sep 2021 19:38:41 +0300 Message-ID: <20210910163842.1596407-2-cristian.birsan@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210910163842.1596407-1-cristian.birsan@microchip.com> References: <20210910163842.1596407-1-cristian.birsan@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210910_093905_893761_D7A16F1E X-CRM114-Status: UNSURE ( 7.33 ) 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 From: Cristian Birsan Add USB PHY type property for controllers with HSIC support. Signed-off-by: Cristian Birsan --- Documentation/devicetree/bindings/usb/atmel-usb.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/usb/atmel-usb.txt b/Documentation/devicetree/bindings/usb/atmel-usb.txt index a4002624ba14..f512f0290728 100644 --- a/Documentation/devicetree/bindings/usb/atmel-usb.txt +++ b/Documentation/devicetree/bindings/usb/atmel-usb.txt @@ -39,6 +39,10 @@ Required properties: "ehci_clk" for the peripheral clock "usb_clk" for the UTMI clock +Optional properties: + - phy_type : For multi port host USB controllers, should be one of + "utmi", or "hsic". + usb1: ehci@800000 { compatible = "atmel,at91sam9g45-ehci", "usb-ehci"; reg = <0x00800000 0x100000>; From patchwork Fri Sep 10 16:38:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Birsan X-Patchwork-Id: 12485599 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 55B2DC433F5 for ; Fri, 10 Sep 2021 16:41:45 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 254A060F24 for ; Fri, 10 Sep 2021 16:41:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 254A060F24 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=cVU7Gfhlr+GVLlaedxMl6SdPnLn5fq6Rjgky70JOZak=; b=Yy38q4ZHx9CtHo MIp7K2b4CSM4UuPy+tV2b8rKDdHFEWKkKKK/u/r7dT11xwcpDpR+G/OPOg1sLqi8RbCzUlZvv2aVf TT0qGPqrVHjAAlhJmwtJC9MUmHEfRz8PbzQxYcoZaobasHYqYmU/LWxZ647U49dI2KEe+YUhCIfNE /vFmhKNycmVgweEW6JqR6Kt2dGhIDFpBUPxoVYUdOr2epYPvR/u6fH7ypfRMm0d2V/b8+gFkFz4sY z8t4y1VByLLlXoBgHVPJqsTmaCq1hanj5reqdrjhsLQ9HlHq5ZM8mogqzpkTFF9zy+gCDMPk32Eti 1Od6VX2+qr/QOiCGCZCQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOjYo-00DAqB-AY; Fri, 10 Sep 2021 16:39:30 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mOjYR-00DAmH-FQ for linux-arm-kernel@lists.infradead.org; Fri, 10 Sep 2021 16:39:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1631291947; x=1662827947; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=j3/W4EVBQOz9yH/HC2QsqbHvKVE/H182DHHZWWu1UyY=; b=jfzkFq0GNThvjZggI1uphjeOs+v1r7kJU5I8pUR7z2Lu6kYwFd2nW6nd 8im4xRjocBal/NWgH6J4U6xuH7GNQ9lsMtWB37Q8kcRoeo80b620yNgx8 TVrhk6YZWL+Swxhd4elEf7sKPnARyp0WAQxZlCuZyyL5i/KXex9ldAY5t fe3s+tJPoO8RMHalTY/gYsBUVoP4HhLwYTGrlaqLiuLjMYUrfQKtDlAgl G3GShlHDWSd47wkmGB8JUvpUuAPyBOLwk4Xg4NZQCTS3og5z+FvUlMInC LHJvwA+rB3Pk9IAP7d6EjnpkahRTTGAaqa4r+XXi8Uw3ELA97Vm/1Tr5t A==; IronPort-SDR: /Z6pG8TEJkhA6tlDKFyAAC8ZuEQdHh4tI8jwvWJiG2D8RLvZn5k6CAmRhQr3TXQnThyePZlAIR G3EhUndK5ivhI2UqqbjSkq7HcMFt5Oiy91F8nMHYyN+uglu1W98gMGxVy1fhH+2EyH+aIta8iK ATqopXeLcNNquXhcmiHFFE/zamMF7DmYypAHpsV4V36wQ+99/a6fJndH+B/VsyOhv7zAmH7648 3v5SGkc77lioTj6KBDq3isEJE/N39UDTrxP5EqhOZXqMmzCcpfvhPuzyaSFhGPGD7H7Sk9FA7+ obwAGh2txsTDsF8caim4IF7/ X-IronPort-AV: E=Sophos;i="5.85,283,1624345200"; d="scan'208";a="128921696" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 10 Sep 2021 09:39:06 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 10 Sep 2021 09:39:06 -0700 Received: from plexus-g.actel.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Fri, 10 Sep 2021 09:39:04 -0700 From: To: , , , , , CC: , , , Cristian Birsan Subject: [PATCH 2/2] USB: host: ehci-atmel: Add support for HSIC phy Date: Fri, 10 Sep 2021 19:38:42 +0300 Message-ID: <20210910163842.1596407-3-cristian.birsan@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210910163842.1596407-1-cristian.birsan@microchip.com> References: <20210910163842.1596407-1-cristian.birsan@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210910_093907_620248_4C91D633 X-CRM114-Status: UNSURE ( 9.74 ) 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 From: Cristian Birsan Add support for USB Host High Speed Port HSIC phy. Signed-off-by: Cristian Birsan Acked-by: Alan Stern Tested-by: Alexander Dahl --- drivers/usb/host/ehci-atmel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c index e893467d659c..05d41fd65f25 100644 --- a/drivers/usb/host/ehci-atmel.c +++ b/drivers/usb/host/ehci-atmel.c @@ -18,6 +18,8 @@ #include #include #include +#include +#include #include "ehci.h" @@ -25,6 +27,9 @@ static const char hcd_name[] = "ehci-atmel"; +#define EHCI_INSNREG(index) ((index) * 4 + 0x90) +#define EHCI_INSNREG08_HSIC_EN BIT(2) + /* interface and function clocks */ #define hcd_to_atmel_ehci_priv(h) \ ((struct atmel_ehci_priv *)hcd_to_ehci(h)->priv) @@ -154,6 +159,9 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev) goto fail_add_hcd; device_wakeup_enable(hcd->self.controller); + if (of_usb_get_phy_mode(pdev->dev.of_node) == USBPHY_INTERFACE_MODE_HSIC) + writel(EHCI_INSNREG08_HSIC_EN, hcd->regs + EHCI_INSNREG(8)); + return retval; fail_add_hcd: