From patchwork Fri Mar 24 13:31:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 74541 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp629860vqo; Fri, 24 Mar 2023 06:35:07 -0700 (PDT) X-Google-Smtp-Source: AKy350bG0cTHVDnDq26py3VqCmbIKVNtW5F7xCn3fUhUmo/Y7MMhAt7Sb7ZOKEdqW4ag5H3yfDnh X-Received: by 2002:a05:6402:1058:b0:4fb:1fa8:da25 with SMTP id e24-20020a056402105800b004fb1fa8da25mr2744142edu.36.1679664907118; Fri, 24 Mar 2023 06:35:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679664907; cv=none; d=google.com; s=arc-20160816; b=UJ0Il5Y6Q2zcyPGvoiX5iVtZUd3wErGHjTqBP3O1pAKTdBGdGT8R+pB6GwVohFb9h1 qpI80XftKwk6/90IXi9S1iSUnJGBadpjZR9CqJO+s1i7t8S+Kh+61Dtt4WzO483lpOog 7Iy5Zzrk2aUdtV/leC+zuIBx8A8mUNLZUXFxwww0OTpdFls1ls/bvrzlDQ9pvswHvNdL jDVd5e5tpYU74Boon2cknMulZJ3Rp/XrNwSE+kQjAR1G4THlQYamGX1d8tOZj1JeOGj4 1Eh7yBHxNFpeSk1kzR5MbPr/nP3yiqdPllKAJjf6uZ0oJYjAJtEBkLDDvdoh4gHcQk4O p6LA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DAwfw+rJkHcW59DV1o2K6c9MYMgkszmdlpPYVnwYwPg=; b=b1e8fP4zQ0MZB0m2dTuW37Qvk2pyCQFY59bMDzRqoa8gbA4SxggzQ/JzCC6pqKGqHF FU6xWkOQ/BCO3gx0h4ZF0LuykApd0AYkuHDv9NY5PEVf5yd+xtLSW0tgpThdEmKUYSGz irKO22mnWCU3WvD+zRZLIgabT3uwYSpsvR8iahanPC+4fsdKLGeWR6fUpKMKgM421dE3 qayfjIAZ9MbUg6mupqm7qPphVlcjzmTHE9A/SkTy7fCpututoadpif6uVVxxNUGOGjms CND0Ox4iLwat4Hyf2Mfc237t61+6ZJJiy0CwGRHkfB8CQUjXlaXA5nr5M6esDTZKE/Y0 AniA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CnPSgVnL; 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 g10-20020aa7c84a000000b005021d17243csi1971164edt.259.2023.03.24.06.34.43; Fri, 24 Mar 2023 06:35:07 -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=CnPSgVnL; 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 S231797AbjCXNcU (ORCPT + 99 others); Fri, 24 Mar 2023 09:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231241AbjCXNcM (ORCPT ); Fri, 24 Mar 2023 09:32:12 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B67117144; Fri, 24 Mar 2023 06:32:02 -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 sin.source.kernel.org (Postfix) with ESMTPS id BBA48CE25AB; Fri, 24 Mar 2023 13:32:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B417C4339B; Fri, 24 Mar 2023 13:31:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679664718; bh=62XefeNgbUzKOt6Wsxi7gqaceV0qRla+72DwVepokhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CnPSgVnLdEPDupUqjAckGNdfAXc0muBXiHFxbhnqMNokawz5TPonnPCV7VAL3G6r1 3oMkj9fJ1rlUGxtkKrqYs5aLTfZ4/UoVqtbBlFFa26+3VLvyGFpNwNlgSw4iRi74cN rh+/dIB3uS8nt9Tt4B8aMZpe8d2cKnMovJyP1Pmlrkfef98ITlpQ2u+3hOXNQJ9vU9 plIw1C06dkKmeVBXdB4V+Qb4uKVwz3kjKdRCAnjaDj3+VDY5OWEIgxY/Kg/JV9AnfS hHxyiO28IaaWa02OC7n8Bopo28fGcyEwe1vCQGBfvJ4Y23QXaQsxiwUQHHUJvgZovS aIKweCK1YB9ww== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com Cc: kristo@kernel.org, srk@ti.com, r-gunasekaran@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Dhruva Gole , Roger Quadros Subject: [PATCH 1/2] arm64: dts: ti: k3-am625-sk: Add ti,vbus-divider property to usbss1 Date: Fri, 24 Mar 2023 15:31:49 +0200 Message-Id: <20230324133150.43224-2-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230324133150.43224-1-rogerq@kernel.org> References: <20230324133150.43224-1-rogerq@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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?1761256309575958922?= X-GMAIL-MSGID: =?utf-8?q?1761256309575958922?= From: Dhruva Gole The property "ti,vbus-divider" is needed for both usbss0 and usbss1 as both USB0 and USB1 have the same external voltage divider circuit. Signed-off-by: Dhruva Gole Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 67dc26fc23e4..be027fad5f61 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -482,6 +482,7 @@ &usbss0 { &usbss1 { status = "okay"; + ti,vbus-divider; }; &usb0 { From patchwork Fri Mar 24 13:31:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 74542 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp630109vqo; Fri, 24 Mar 2023 06:35:34 -0700 (PDT) X-Google-Smtp-Source: AK7set/C8d31qdbWuc1I8ppZacdvr/IXSEtwghSopbycg8Ck63bLKPJQa9LNTMRyRNYw9zim0OtA X-Received: by 2002:a05:6a20:84a2:b0:cc:5f27:d003 with SMTP id u34-20020a056a2084a200b000cc5f27d003mr2594525pzd.56.1679664933819; Fri, 24 Mar 2023 06:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679664933; cv=none; d=google.com; s=arc-20160816; b=tMvlPIhyTbqSffexappFMEVV3x/wv3XEzWdqJ8Nkp/vGe1Bx5bkAE3iPyuyoTJkIQK dqrBKr+El1/YINFPuQpY6OIWR0Wl3ILsQjjk0djjTu9Vtr0Fjwgg7wSgKR2Lggdaq6bh fo2DqorrOoLSm+ZRm4h9kHmCl+LYVR4MY5RiMhJnSLf2oyDsaTxucIwR156XBpYQzPKE 8BlPXngbaB8dQ6jdqQseriIq6SuTHORA8gV30lyPgRQTms04w5/DKRS3uZcSNdVNz4+7 KCFqMNmg3J/8KNL4M5WiX63Sur9KC/rJXA/aGWkkZbaq2QHg7Z+CNyFVZdolcwT0d2pr vwPQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=COtnAW3lFSu5zZScIxoVcx3gx8C6YTy3vTkkI8z+3T0=; b=LXBADyidFwRGED6QIJnTGYrqPbTL+pnNdjIh/N0CAlbq34lBVK758+fHCsjGzBquWW GwM6Kl+fKWjqT/qF1plvnvqnHaMAolkSmVRcUacNt4Ex5DewtGM3HktiY92zVBfh3xeF WMCsgEk1X3/kqLHSGszFPYB7trEaMCgblh+1uqMY4vZC0+S1mJKqbrpI9H5q/kAFfnBW ze/1TX6ohCD7olG5Tqo/9pTY4HxhPi1mRZmCBYJQcUowaNYSwNeno4J4j04eFB2+JFX5 Jjn9v3DWbIi+t109Hz4N+0wQg8mlBUM83ygJa8LpSkq/Nu7R7oxPZSGI03Tjw18vquID SHoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dI5wOby7; 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 d13-20020a63ed0d000000b00502ec718ab8si20420746pgi.284.2023.03.24.06.35.21; Fri, 24 Mar 2023 06:35:33 -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=dI5wOby7; 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 S231442AbjCXNcN (ORCPT + 99 others); Fri, 24 Mar 2023 09:32:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbjCXNcM (ORCPT ); Fri, 24 Mar 2023 09:32:12 -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 718AD13DD1; Fri, 24 Mar 2023 06:32:02 -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 1520962AE2; Fri, 24 Mar 2023 13:32:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C5B4C4339E; Fri, 24 Mar 2023 13:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679664721; bh=wvdaxhVUZXP2ZRN5FN1jyjGJf66FlAp1dzMNx8omUgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dI5wOby7+SLCBQjHxGxWg4aUAsvlsWT8pOoMXnzthg6BtBwZoWO4X3NLxeLY4JdQ1 uxePXcPWZ/z26RYfVx1AjYG8RWoNTRNgcvwCYtWVBPtcK1McxI8POEMESl3NOjUUah B+UXnuXmaFLcIKePhb75spPKpF/dXLXh218kr0mD1PKRVnLl6IcNH0bvo0rFFoqmKQ asF3klXHFQ/0vq5m/iYVTcPaDvkhYAWxPzQdqCO7xSjVvgg7haPEUEkckH9K3Qh+98 l4AH+xbtJt1i/rkUVvDM8+KJJEqeJM5z6Ne0sdKWhEuSeRrvGHw+p4CNw2Qz9rhJ4t xcNPQK6dxk5EQ== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com Cc: kristo@kernel.org, srk@ti.com, r-gunasekaran@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Roger Quadros Subject: [PATCH 2/2] arm64: dts: ti: k3-am625-sk: Enable Type-C port for USB0 Date: Fri, 24 Mar 2023 15:31:50 +0200 Message-Id: <20230324133150.43224-3-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230324133150.43224-1-rogerq@kernel.org> References: <20230324133150.43224-1-rogerq@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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?1761256337344502017?= X-GMAIL-MSGID: =?utf-8?q?1761256337344502017?= USB0 is a Type-C port with dual data role and power sink. Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 40 ++++++++++++++++++++++++-- 1 file changed, 38 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 be027fad5f61..c80b12943881 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -315,6 +315,33 @@ &main_i2c0 { pinctrl-names = "default"; pinctrl-0 = <&main_i2c0_pins_default>; clock-frequency = <400000>; + + tps6598x@3f { + compatible = "ti,tps6598x"; + reg = <0x3f>; + interrupt-parent = <&exp1>; + interrupts = <17 IRQ_TYPE_EDGE_FALLING>; + interrupt-names = "irq"; + + 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 { @@ -336,7 +363,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"; @@ -486,7 +513,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 {