From patchwork Tue Sep 28 15:54:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Peter X-Patchwork-Id: 12523163 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C020C433EF for ; Tue, 28 Sep 2021 15:55:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 027B960F0F for ; Tue, 28 Sep 2021 15:55:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241696AbhI1P47 (ORCPT ); Tue, 28 Sep 2021 11:56:59 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:40811 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241514AbhI1P46 (ORCPT ); Tue, 28 Sep 2021 11:56:58 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id EE551580C23; Tue, 28 Sep 2021 11:55:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 28 Sep 2021 11:55:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svenpeter.dev; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=Y1NfofkeQMpms15HG9J/5g3fXC eHBXSK7jIqptB1puk=; b=LdxjyLA5MaFR81GrboLqtJEg2m/YdTRRtZEQQlgyGO 8qm6HQTRhH1w9egzWPPLPCHczeyO0Pbof7fjAeUM55+kh8ji/d37qCcpD2LLFKte pLRP7OrP6POJTH72DpXt7cdw4NqbHFfXINRFRoFQA21HJU+PRwo8qUVTd3C5481h PhfI5zlhZSIM9cghiDIQ1hGic4gJ3RTHrv2MF30MV4IyN2Hz6M5/Vipmgd8HXDso tw7ywYhryv5d5OiYJSifqZATHqa8SohOIVXoK/iRmtIEqhPakUSOcv9Gdc2+ZQcB 2v/GGMcneHzGf9dUcWYbUms2ouroJngZqIenRv/IaguA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Y1NfofkeQMpms15HG 9J/5g3fXCeHBXSK7jIqptB1puk=; b=sqjwF3v4I+i4Uv9lr76WJz0jwetf+WEQv +mLGp3KEgNfDKy0PAIJdt7rf/uJDH9t5pIcitodH6jTxbpweHuhtEpuAL75dd8OI bgaaNe1/o2uNd2qtWcTbJ4r1Bu6IIIkh3dc8LnBBAmAOKIXqhX55P7nbbps2yTlI B+FNaAhhqnX6LBwVjQAAx3/rurGZ6Zl96okgTHVImGAAUPfyH4ztJfwPrnK7P0y3 +8TKPs0d/TudWavX9inz1SGN6IhuZvI8p166bHJ6HMuo6vPjCCPEdr7vTLCvJDBD KGcDGkLvPa/Jkx5acrTcse+1BcdP9olWjeJtyrTxttz4hmSSHgpFg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudektddgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuvhgvnhcurfgv thgvrhcuoehsvhgvnhesshhvvghnphgvthgvrhdruggvvheqnecuggftrfgrthhtvghrnh epfeehudeftddvhfehvdduhedtjeejheeuudfftdfgvdekvdelleeuveelgfeflefgnecu ffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehsvhgvnhesshhvvghnphgvthgvrhdruggvvh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 28 Sep 2021 11:55:16 -0400 (EDT) From: Sven Peter To: Heikki Krogerus Cc: Sven Peter , Greg Kroah-Hartman , =?utf-8?q?Guido_G=C3=BCnth?= =?utf-8?q?er?= , "Bryan O'Donoghue" , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Hector Martin , Mohamed Mediouni , Stan Skowronek , Mark Kettenis , Alexander Graf , Alyssa Rosenzweig Subject: [PATCH v3 0/6] usb: typec: tipd: Add Apple M1 support Date: Tue, 28 Sep 2021 17:54:56 +0200 Message-Id: <20210928155502.71372-1-sven@svenpeter.dev> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, v1: https://lore.kernel.org/linux-usb/20210918120934.28252-1-sven@svenpeter.dev/ v2: https://lore.kernel.org/linux-usb/20210923181321.3044-1-sven@svenpeter.dev/ Thanks again to Heikki for your review of v2! This series adds initial support for the Apple CD3217/3218 chip which is also known as Apple ACE1/2. These chips are used on Apple M1 machines. They are based on the TI TPS6598x chips with a few differences: - The interrupt numbers have been changed - The secondary i2c bus and its interrupt controller are connected to the system management controller and must not be disturbed - The chip comes up in a low power state and must be booted using the "SPSS" (System Power State Switch maybe) command which is not documented in the TI manual - The interrupt mask must be set up explicitly The only difference to v2 is that now of_device_is_compatible instead of of_device_get_match_data is used to switch to the CD321x logic as suggested by Heikki. Best, Sven Sven Peter (6): dt-bindings: usb: tps6598x: Add Apple CD321x compatible usb: typec: tipd: Split interrupt handler usb: typec: tipd: Add short-circuit for no irqs usb: typec: tipd: Add support for Apple CD321X usb: typec: tipd: Switch CD321X power state to S0 usb: typec: tipd: Remove FIXME about testing with I2C_FUNC_I2C .../devicetree/bindings/usb/ti,tps6598x.yaml | 4 + drivers/usb/typec/tipd/core.c | 206 +++++++++++++++--- drivers/usb/typec/tipd/tps6598x.h | 12 + drivers/usb/typec/tipd/trace.h | 23 ++ 4 files changed, 209 insertions(+), 36 deletions(-)