From patchwork Mon Nov 22 22:58:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janne Grunau X-Patchwork-Id: 12693384 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 6B990C433F5 for ; Mon, 22 Nov 2021 23:09:41 +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=fZDvdTHTYYWUCe1hZcv8zuqVqHTuJFjxnoUOUNhWb7Q=; b=mwc8coo6jrzEsz CCFNC4tn4gtenoWmkZfEC9w3mMHjMzLjDeYMMehxrqnngtIQkkBkckctOFmb23jH8HxPnqtwO4+MS kvqsrTwxxH4jIWjx4s1x7T3K2vcs3vOvHDmFfyi+nJSJOcS5/Z5MB++k5qVMO4DvxPmeN3qeQVWGT 7OeLaxZostNh5ztNGOcHTB7Y5iV8dpbtwHF9kTQUjI0k4BtyvtkyYMnGyTv5cRgrsxUG44Yf84jjH GUDNnTkm8v2ygU67J+2LHUMcuSCjPJtCgQpXAIUbUHwTdEFQUkZYicOlMwiUpdjv0PXLoq6fb7WgY WKTKKaBEABqiDbIZObWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpIPh-000Jp3-RG; Mon, 22 Nov 2021 23:07:53 +0000 Received: from soltyk.jannau.net ([144.76.91.90]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpIGL-000Gnm-HO for linux-arm-kernel@lists.infradead.org; Mon, 22 Nov 2021 22:58:15 +0000 Received: from coburn.home.jannau.net (p579ad520.dip0.t-ipconnect.de [87.154.213.32]) by soltyk.jannau.net (Postfix) with ESMTPSA id 26FEB261B41; Mon, 22 Nov 2021 23:58:12 +0100 (CET) From: Janne Grunau To: Hector Martin , Sven Peter , Alyssa Rosenzweig , Rob Herring Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 4/4] arm64: dts: apple: t8103: Add cd321x nodes Date: Mon, 22 Nov 2021 23:58:07 +0100 Message-Id: <20211122225807.8105-5-j@jannau.net> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211122225807.8105-1-j@jannau.net> References: <20211122225807.8105-1-j@jannau.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211122_145813_774195_26A631A3 X-CRM114-Status: UNSURE ( 9.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 All M1 Mac devices have 2 SoC connected USB-C ports and use cd321x USB type C port switch and power deliver controllers. I2c bus and adresses configuration are for all devices equal. The iMac (24-inch, 2021) has a configuration with 2 additional USB-C ports (j456) using two addiotional cd321x controllers. Signed-off-by: Janne Grunau Reviewed-by: Sven Peter Acked-by: Hector Martin --- arch/arm64/boot/dts/apple/t8103-j456.dts | 18 ++++++++++++++++++ arch/arm64/boot/dts/apple/t8103-jxxx.dtsi | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts index 7267e069355b..c6b8c28455f5 100644 --- a/arch/arm64/boot/dts/apple/t8103-j456.dts +++ b/arch/arm64/boot/dts/apple/t8103-j456.dts @@ -21,6 +21,24 @@ aliases { }; }; +&i2c0 { + hpm2: tps6598x@3b { + compatible = "apple,cd321x"; + reg = <0x3b>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; + + hpm3: tps6598x@3c { + compatible = "apple,cd321x"; + reg = <0x3c>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; +}; + /* * Force the bus number assignments so that we can declare some of the * on-board devices and properties that are populated by the bootloader diff --git a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi index 53d22b434d76..5f748f3f60d2 100644 --- a/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi +++ b/arch/arm64/boot/dts/apple/t8103-jxxx.dtsi @@ -39,6 +39,24 @@ &serial0 { status = "okay"; }; +&i2c0 { + hpm0: tps6598x@38 { + compatible = "apple,cd321x"; + reg = <0x38>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; + + hpm1: tps6598x@3f { + compatible = "apple,cd321x"; + reg = <0x3f>; + interrupt-parent = <&pinctrl_ap>; + interrupts = <106 IRQ_TYPE_LEVEL_LOW>; + interrupt-names = "irq"; + }; +}; + /* * Force the bus number assignments so that we can declare some of the * on-board devices and properties that are populated by the bootloader