From patchwork Tue May 23 12:33:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 97981 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2113249vqo; Tue, 23 May 2023 05:49:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wTp4lMYcu0eHMOyOG5NjACRZEyl4TtbUA36U2WCZxCZLeFzXTtGqJtqldrvLO5A7ph/CH X-Received: by 2002:a17:903:234a:b0:1ac:a88a:70b6 with SMTP id c10-20020a170903234a00b001aca88a70b6mr19078436plh.31.1684846177073; Tue, 23 May 2023 05:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684846177; cv=none; d=google.com; s=arc-20160816; b=h4hnOETQQy3IxZ7qGFhfiADAj+7HZB12OK+13MOD8rAZGYYB6KinhT+eAsT/Qh8XvW SruH6siei8bQwapXVWf7SphTC3XaoDWE91K1BxJmTRJD7YaECwNvPET4KfJaj8GTPX6k OEtH8+CX26d3jYeD4JEEhMX1hTjzw5KxvrhZu1J/q1plXwi5SFWxosYbqVZGQ5RxpRV8 AqicntzhgoMgwteG9hdcSxZDVYzqREnOL6L+33OLzCPTz0rblpCdant4AOCqWUZmTxT3 8r2vCEsCHmeN1wsTAfQH//v5l1UTsgUKHLczSPJU8hbYIGYMGzaMpCK76FDvNQpgxJuj +fhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Ph3gHe0uqwEtXUCDDr+9S0mKzzPwVhjRFqvXVL/4s0w=; b=ckTGayV5epiBRSK6RnqCpiXMLPntsIRdhmJx9PPBPhgyLjTTSKRfYGqtwcf8D6m9U+ 3AJ7YL0LVBrf6KI4PBtoo371u9987PX4Fvf87mvEiNhbRd1j/APR1SluaC//lMix4pZq HtZA8E1WHW3nuriti/DGvvAEynDkSqJBSVC0KMngY74d4rH0rXFERlhTqcZHuMowcB8t yhzO70TBQcPZNdB8yfuWbCJ2TGNxWJ5187yntBtu4GQuyWHkzL/Uh7gsvlevBYMxvzYD 0bsjB7Xk13n33j9U7tjsYqmmyMlauC61R65aOqkcOsDjvXTs8I4YDkWIz57xukUY5Wf9 s4NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PDiIIwgl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g23-20020a1709029f9700b001a97bf417cdsi6271209plq.571.2023.05.23.05.49.22; Tue, 23 May 2023 05:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PDiIIwgl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236887AbjEWMd7 (ORCPT + 99 others); Tue, 23 May 2023 08:33:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229525AbjEWMd6 (ORCPT ); Tue, 23 May 2023 08:33:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF18EC4; Tue, 23 May 2023 05:33:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 54BDF62877; Tue, 23 May 2023 12:33:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA986C433D2; Tue, 23 May 2023 12:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684845236; bh=WRj4PeCrYbzTNdM4RjmQBD++ByLrkDUJZxWRpjS/qaU=; h=From:To:Cc:Subject:Date:From; b=PDiIIwglFuz1jCbXPT1fjIZgWuuI17BF69AnME2jgM0uXebECRJOR/vfff2g3pNMY iFRmT8Z/1jxYkt906My8vYP5WZ8ohb8AdEnGgUGDj7LkaeINjst0gE1kY2r4a7Yte+ lroBmyVvSI3pciX3yk8b/W4RFiUnJpw6knvcWYU8tbnXjmojbXoIxGy1ygCDdByGl1 vwMSH7T74z+IwVW51zjLaQx2YeDMbu3wH3Np8C0oMPvKFC4jgnVd+/+WGtpBgWZcle tKBJr0WhTXm/k1LQivmxMqdqOmOVJV5eEv4aGPE9FDSnrJy6LzSSPTs4QawV2IU1nZ SSNKvvJP3cCJw== From: Roger Quadros To: nm@ti.com Cc: vigneshr@ti.com, r-gunasekaran@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH v4] arm64: dts: ti: k3-am625: Enable Type-C port for USB0 Date: Tue, 23 May 2023 15:33:48 +0300 Message-Id: <20230523123348.52850-1-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766689264866821775?= X-GMAIL-MSGID: =?utf-8?q?1766689264866821775?= USB0 is a Type-C port with dual data role and power sink. Signed-off-by: Roger Quadros --- Changelog: v4: - Rebase on v6.4-rc2 - Drop interrupt patch as it will break Type-C role switch on older boards. v3: - include Type-C support for am62-lp-sk - split interrupts properties for Type-C chip into am625-sk v2: - rebase off [1] - add fixes tag to patch 1 [1] - https://lore.kernel.org/all/20230321-am62-lp-sk-v2-0-0a56e1694804@ti.com/ arch/arm64/boot/dts/ti/k3-am625-sk.dts | 2 +- .../arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 35 ++++++++++++++++++- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 2a1adda9bff6..729f95e19042 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -161,7 +161,7 @@ exp1: gpio@22 { "UART1_FET_BUF_EN", "WL_LT_EN", "GPIO_HDMI_RSTn", "CSI_GPIO1", "CSI_GPIO2", "PRU_3V3_EN", - "HDMI_INTn", "TEST_GPIO2", + "HDMI_INTn", "PD_I2C_IRQ", "MCASP1_FET_EN", "MCASP1_BUF_BT_EN", "MCASP1_FET_SEL", "UART1_FET_SEL", "TSINT#", "IO_EXP_TEST_LED"; diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi index 976f8303c84f..b6667c0ff826 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -242,6 +242,30 @@ &main_i2c0 { pinctrl-names = "default"; pinctrl-0 = <&main_i2c0_pins_default>; clock-frequency = <400000>; + + typec_pd0: tps6598x@3f { + compatible = "ti,tps6598x"; + reg = <0x3f>; + + connector { + compatible = "usb-c-connector"; + label = "USB-C"; + self-powered; + data-role = "dual"; + power-role = "sink"; + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb_con_hs: endpoint { + remote-endpoint = <&usb0_hs_ep>; + }; + }; + }; + }; + }; }; &main_i2c1 { @@ -321,7 +345,16 @@ &usbss1 { }; &usb0 { - dr_mode = "peripheral"; + #address-cells = <1>; + #size-cells = <0>; + usb-role-switch; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; }; &usb1 {