From patchwork Mon Mar 29 21:33:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: cristian.birsan@microchip.com X-Patchwork-Id: 412214 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, 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 9DE1AC433E0 for ; Mon, 29 Mar 2021 21:35:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64F0061989 for ; Mon, 29 Mar 2021 21:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231485AbhC2Vek (ORCPT ); Mon, 29 Mar 2021 17:34:40 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:59118 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231574AbhC2VeS (ORCPT ); Mon, 29 Mar 2021 17:34:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1617053658; x=1648589658; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=2kTOQKtN0t9m6S1C1pzGz3PzM5EesinMEa6hjWzfgDY=; b=kxaO3nsASkgb20dQ9qR8HFy6g6oJj+C4559h7sjvBOo1a9S+kuhREMHM QseiTMFEfvgWPOP1iY6NfqcBS/ITU0jrvvkCkHmtni3+Lwk7bu+Lqss13 LeO1FJ0KO7l+P4UmLuRxP++1Xx/1ZNpCxcNfPnf0GmFXERwavmIWg3XJm 0iUlvUDu/07VTUk7iLFibFJ4Q0C5+1Fyqt2p2U8knGljExiPO0of84Cbs XE3OHNPWy5h0X1FDIU/1Zs9pAomN4eYHbLMscuiTQSgcqGoU56ZCo+XGX Dsvdd4OzS0tXqZpbEr4JfU/bmedbeMoIDRBpK2PW+u3BNe849RJ9sJAdX g==; IronPort-SDR: UCF/K/3Bzx1tQnCR0a0OpheQyJ5HyNk4EBJkUnwMqtphT9lMSwdNvYB8BjLv1ZWU1tTjM+jcif SkwiJiMWowts4FeIxJV/J+32skB0dbG4tDkHAT6lg68sZp/8jjly8OMry3/G6RAFJ4k9CbIr5i ynPvtFSKl3g7fvf+Reu0OEeK4q/XaFRGmlOWMTA0k1nm24J6aN7Xrqy0Kq/jAxBdf4+lx5dlsC bchp3ssUON9u+wcM4hq+IXMJOmtgwppbyEbI7UZ6OKvvWfQGaaWMI/ktCjY3S5eSUVQHeSF5BC VcQ= X-IronPort-AV: E=Sophos;i="5.81,288,1610434800"; d="scan'208";a="115079626" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 29 Mar 2021 14:34:18 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 29 Mar 2021 14:34:17 -0700 Received: from cristi-P53.amer.actel.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Mon, 29 Mar 2021 14:34:15 -0700 From: To: , , , CC: , , , , Cristian Birsan Subject: [RFC PATCH 0/2] usb: typec: Add driver for Microchip sama7g5 tcpc Date: Tue, 30 Mar 2021 00:33:55 +0300 Message-ID: <20210329213357.431083-1-cristian.birsan@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Cristian Birsan This patch set adds initial driver support for Microchip USB Type-C Port Controller (TCPC) embedded in sama7g5 SoC. The controller does not implement power delivery and the driver uses dummy functions to register the port with TCPM. The current silicon version is not able to trigger interrupts so the driver will poll for changes on CC1/CC2 lines. Support for sink is implemented and tested with an USB device. The plan is to extend the driver and add source support. Cristian Birsan (2): dt-bindings: usb: Add DT bindings for Microchip sama7g5 tcpc usb: typec: sama7g5_tcpc: add driver for Microchip sama7g5 tcpc .../bindings/usb/microchip,sama7g5-tcpc.yaml | 80 +++ drivers/usb/typec/tcpm/Kconfig | 8 + drivers/usb/typec/tcpm/Makefile | 1 + drivers/usb/typec/tcpm/sama7g5_tcpc.c | 602 ++++++++++++++++++ 4 files changed, 691 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/microchip,sama7g5-tcpc.yaml create mode 100644 drivers/usb/typec/tcpm/sama7g5_tcpc.c