Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp601686rdb; Fri, 26 Jan 2024 05:28:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IH34rWkT3tpIS7Yb8obPjyQGhoZq70vmDZJlfmNtYdNfdcpd+FYZbdoTC1VWP8s0YyE6cC0 X-Received: by 2002:a17:902:ea8a:b0:1d3:b83c:9c35 with SMTP id x10-20020a170902ea8a00b001d3b83c9c35mr1129527plb.123.1706275689114; Fri, 26 Jan 2024 05:28:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706275689; cv=pass; d=google.com; s=arc-20160816; b=fAOOcbdPuJToGAaXxpGTJkZUgCuRM1i1ndw1VvoQk0cfucq8o+V3XLUeP+g+eiBTab mNfaQjRMKNLiYo2/AQPpxhSfYsB4HVlBJgF2spZQ92G9iya4qsQLZxQYP9oSexHL1HV0 ER/0iGVZrRr6FMP0g93UHI2U/aOiPkwGfiT+Wxe8la3NXXSblRIrjLj0TyPlGzHR9dLY IGoSZe6tBJe1hKc9X3BJ77x9dVXXxvgVta9CXmejiICqSaqv+do+JZR2sWMiwlFY7pwX bCn3uvsM0T9/3Exe4eSz03R4XMVeNOjG+PxJZQCsKziOfZXdmYZGBc4qhHRE2bW0aaXw 94Jg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7SoBDw6IpfMRBgfMMi4x/ir9yY4DA7ChqhvCsbX6L9U=; fh=ev8h275NnP7LtYlfY71coRReOZrj/IQy9oqM1mhCCW8=; b=EeW0equDD/5Bge1OgQ/BJ/4DS7NxN3DJIkdGADRzjx8ZDa6jNQKUb6k8H8FDSNncbs L/mSyDT6G6FXir9CvDZQHBpUMJw/FWrzBeSk8NwGe2whuB0L4moUMwvSwazGcHU/8b9+ M4Zb7Cf2h5NYBSKJj2gyqttuJK4hmGjLZhBnOSb6wdhqd+4sEDb1Uc9QsYIzGVnNOUpl C6FqXndG/ykUEy7CbICj3/Y56ymq0bj4ercjQp2Y+kPG0MFcTgY0etAnFtsr+EIP5ATq CqKXAzdLv2dNjH4h8Hc30FA0fooSpbWwnomB/S+GLwyXl9cii4z4Nc8mPBpR6L7Gppmu 1k8A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ewhQ0rYF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40113-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40113-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id jf10-20020a170903268a00b001d6ee54af4esi1142845plb.53.2024.01.26.05.28.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 05:28:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40113-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ewhQ0rYF; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-40113-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40113-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7C26AB2A8B3 for ; Fri, 26 Jan 2024 13:00:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4B0661B97A; Fri, 26 Jan 2024 13:00:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ewhQ0rYF" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6D52B1B970; Fri, 26 Jan 2024 13:00:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706274008; cv=none; b=Y6yjed8J9nNeu3/QUu84DAuTvL6BcEaqcEwrS71L5c8ABc1JOqq9mSSGdnTdZwKPPVcvxPfDBuSgr7byAcWkkBy/ZqkjxYQYGGdCRIiBRNGMf81uSeTEb10hbZInvAyxzSs8PXqR9tYDIvvuvanRXSentqwMP86KISoG5rjWr78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706274008; c=relaxed/simple; bh=t099ezjmjh/lYTFcfGOaq9yZzqalRNDkyyW2vApJTDc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ffu1Dx/Qv6sbG4HZW1lDi6kHAwnYyaL1tMInf9Tk+ecqDDYftHvdzpSODCD7j5L0o6HjSdH2+p5eDoDWJnbpjeWTs/l7iJRInR3j47o0aDRPfXIEI7dsxIZ0LAOpWCZMWqR+RHB2bxS5Mv3NN3wXRZlKiSOUnF6kjSVTOD9zS08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ewhQ0rYF; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06276C433C7; Fri, 26 Jan 2024 13:00:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706274007; bh=t099ezjmjh/lYTFcfGOaq9yZzqalRNDkyyW2vApJTDc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ewhQ0rYFoTi4uqoKq8wOL9WRw0xILa0LlJnAjbEG0gKYSoYFQE7txooQhidaA8QvT eu7ssO03V25iiCEBUbmC67EUVoVdIV97iuX1vtVLdsfpyYM97Px5tYt1mZdNRM7vBx kH0FboKBvYQYGQgiSN2+YTr8qhE8Tu2TgFyuvi86ztu3MWxzq4kpwIpfPxhdYeylAZ YRz0LFidIMn3Z5xtkmHIxUhUivarAIDsZ0y25Vgc8P3lLWeQiddXnmxq8SQs0JVcx+ 5fyjzBBIY/y+HmN0a3kEhQ+rYtGV6lUMDTRMyHd6HSNPQNEws/0fIw5GPE1iy/M/Z3 TSddWVpZtRsBg== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com Cc: afd@ti.com, kristo@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, srk@ti.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Roger Quadros Subject: [PATCH 2/2] arm64: dts: ti: k3-am62p: add the USB sub-system Date: Fri, 26 Jan 2024 14:59:51 +0200 Message-Id: <20240126125951.18585-3-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240126125951.18585-1-rogerq@kernel.org> References: <20240126125951.18585-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Vignesh Raghavendra There are two USB instances available on the am62p5 starter kit. Include and enable them for use on the board. Signed-off-by: Vignesh Raghavendra Signed-off-by: Roger Quadros --- arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 46 ++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 67 +++++++++++++++++++++++ 2 files changed, 113 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi index 4c51bae06b57..7e7cd749d9a5 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi @@ -560,6 +560,52 @@ sdhci2: mmc@fa20000 { status = "disabled"; }; + usbss0: dwc3-usb@f900000 { + compatible = "ti,am62-usb"; + reg = <0x00 0x0f900000 0x00 0x800>; + clocks = <&k3_clks 161 3>; + clock-names = "ref"; + ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>; + #address-cells = <2>; + #size-cells = <2>; + power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>; + ranges; + status = "disabled"; + + usb0: usb@31000000 { + compatible = "snps,dwc3"; + reg = <0x00 0x31000000 0x00 0x50000>; + interrupts = , /* irq.0 */ + ; /* irq.0 */ + interrupt-names = "host", "peripheral"; + maximum-speed = "high-speed"; + dr_mode = "otg"; + }; + }; + + usbss1: dwc3-usb@f910000 { + compatible = "ti,am62-usb"; + reg = <0x00 0x0f910000 0x00 0x800>; + clocks = <&k3_clks 162 3>; + clock-names = "ref"; + ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>; + #address-cells = <2>; + #size-cells = <2>; + power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>; + ranges; + status = "disabled"; + + usb1: usb@31100000 { + compatible = "snps,dwc3"; + reg = <0x00 0x31100000 0x00 0x50000>; + interrupts = , /* irq.0 */ + ; /* irq.0 */ + interrupt-names = "host", "peripheral"; + maximum-speed = "high-speed"; + dr_mode = "otg"; + }; + }; + fss: bus@fc00000 { compatible = "simple-bus"; reg = <0x00 0x0fc00000 0x00 0x70000>; diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts index 1773c05f752c..7a16e7a8ac66 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts @@ -27,6 +27,8 @@ aliases { spi0 = &ospi0; ethernet0 = &cpsw_port1; ethernet1 = &cpsw_port2; + usb0 = &usb0; + usb1 = &usb1; }; chosen { @@ -297,6 +299,12 @@ AM62PX_IOPAD(0x01b0, PIN_OUTPUT, 2) /* (G20) MCASP0_ACLKR.UART1_TXD */ bootph-all; }; + main_usb1_pins_default: main-usb1-default-pins { + pinctrl-single,pins = < + AM62PX_IOPAD(0x0258, PIN_INPUT, 0) /* (G21) USB1_DRVVBUS */ + >; + }; + main_wlirq_pins_default: main-wlirq-default-pins { pinctrl-single,pins = < AM62PX_IOPAD(0x0128, PIN_INPUT, 7) /* (K25) MMC2_SDWP.GPIO0_72 */ @@ -340,6 +348,36 @@ AM62PX_IOPAD(0x0124, PIN_INPUT, 7) /* (J25) MMC2_SDCD.GPIO0_71 */ }; }; +&main_i2c0 { + status = "okay"; + 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 { status = "okay"; pinctrl-names = "default"; @@ -460,6 +498,35 @@ cpsw3g_phy1: ethernet-phy@1 { }; }; +&usbss0 { + status = "okay"; + ti,vbus-divider; +}; + +&usbss1 { + status = "okay"; + ti,vbus-divider; +}; + +&usb0 { + usb-role-switch; + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + usb0_hs_ep: endpoint { + remote-endpoint = <&usb_con_hs>; + }; + }; +}; + +&usb1 { + dr_mode = "host"; + pinctrl-names = "default"; + pinctrl-0 = <&main_usb1_pins_default>; +}; + &mcasp1 { status = "okay"; #sound-dai-cells = <0>; -- 2.34.1