From patchwork Wed Oct 3 18:27:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajay Gupta X-Patchwork-Id: 10625165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EAAA14BD for ; Wed, 3 Oct 2018 18:27:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FE8828F5F for ; Wed, 3 Oct 2018 18:27:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03D5A28F79; Wed, 3 Oct 2018 18:27:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CF6828F5F for ; Wed, 3 Oct 2018 18:27:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727092AbeJDBRR (ORCPT ); Wed, 3 Oct 2018 21:17:17 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:13216 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726941AbeJDBRR (ORCPT ); Wed, 3 Oct 2018 21:17:17 -0400 Received: from hqpgpgate102.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 03 Oct 2018 11:27:42 -0700 Received: from HQMAIL101.nvidia.com ([172.20.161.6]) by hqpgpgate102.nvidia.com (PGP Universal service); Wed, 03 Oct 2018 11:27:44 -0700 X-PGP-Universal: processed; by hqpgpgate102.nvidia.com on Wed, 03 Oct 2018 11:27:44 -0700 Received: from ajayg.nvidia.com (172.17.171.95) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 3 Oct 2018 18:27:41 +0000 From: Ajay Gupta To: , , CC: , , Ajay Gupta Subject: [PATCH v13 0/2] Add support for USB Type-C interface on latest NVIDIA GPU Date: Wed, 3 Oct 2018 11:27:26 -0700 Message-ID: <1538591248-15814-1-git-send-email-ajayg@nvidia.com> X-Mailer: git-send-email 2.7.4 X-NVConfidentiality: public MIME-Version: 1.0 X-Originating-IP: [172.17.171.95] X-ClientProxiedBy: DRBGMAIL102.nvidia.com (10.18.16.21) To HQMAIL101.nvidia.com (172.20.187.10) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1538591262; bh=Oa+41MK2MUuuZkMqehFRD3dVKOBhwA2ygROrcioeTwo=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: X-NVConfidentiality:MIME-Version:X-Originating-IP: X-ClientProxiedBy:Content-Type; b=Zqk/wLtpoAkvv5SRAfCdHC8JbfVddKj+oyP6ebiQhTrE3k2sElXicdnhvQztzZXn9 ReMJxlRZLWCrZddyNEoacVklu2QokdE9NvA6TDtimghhznDCqzgMceF2lPIpTjJdsO DIrsMQd0bzQ0pBqiVOPV+jeIlewc27i63bfF/0IvImJ8WRsDQahQQvZeE9D6yJx0w2 NjanO3bLda3cJep+jb8dFV3QQm6La1vVUvACBbQbKLLTuOoZNzzmS4j8MmAE13A1sC o0mBNW/0ggXlrg2WWuF8GtY9sOvL34XpaOE2SzPj5z/1C3gt9jrF6T7RIJqV5WEYl/ E1oJh1p3aXS0A== Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Heikki and Wolfram, These two changes add support for USB Type-C interface on latest NVIDIA GPU card. The Type-C controller used is Cypress CCGx and is over I2C interface. I2C host controller has known limitation of sending STOP after every read. Since each read can be of 4 byte maximum length so there is a limit of 4 byte read. This is mentioned in adapter quirks as "max_read_len = 4" I2C host controller is mainly used for "write-then-read" or "write" messages so added the flag I2C_AQ_COMB_WRITE_THEN_READ in adapter quirks. I think the patches should through usb tree because the main functionality is usb Type-C. The changes have been reviewed by Andy Shevchenko and Heikki Krogerus. Peter Rosin also helped review the patches and provided valuable comments. Thanks to all reviewers. Thanks Ajay Ajay Gupta (2): i2c: buses: add i2c bus driver for NVIDIA GPU usb: typec: ucsi: add support for Cypress CCGx Documentation/i2c/busses/i2c-nvidia-gpu | 18 ++ MAINTAINERS | 7 + drivers/i2c/busses/Kconfig | 9 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-nvidia-gpu.c | 369 ++++++++++++++++++++++++++++++++ drivers/usb/typec/ucsi/Kconfig | 10 + drivers/usb/typec/ucsi/Makefile | 2 + drivers/usb/typec/ucsi/ucsi_ccg.c | 305 ++++++++++++++++++++++++++ 8 files changed, 721 insertions(+) create mode 100644 Documentation/i2c/busses/i2c-nvidia-gpu create mode 100644 drivers/i2c/busses/i2c-nvidia-gpu.c create mode 100644 drivers/usb/typec/ucsi/ucsi_ccg.c