From patchwork Tue Jan 30 15:40:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 194215 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1308925dyb; Tue, 30 Jan 2024 07:42:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGicDgM5xAukZTcCRyD2byconhTaFsnFJdIHdeSotsgA6NT+wu7CrasZ5Tq7EvLxRqL3T6 X-Received: by 2002:a17:906:5585:b0:a35:f0fd:99e6 with SMTP id y5-20020a170906558500b00a35f0fd99e6mr2733414ejp.32.1706629361271; Tue, 30 Jan 2024 07:42:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706629361; cv=pass; d=google.com; s=arc-20160816; b=A0zxEze0RP9fjfuUVwgCm1E9f+GIk4Cz3IIzyokp7iP3z1s7z9P38Dsqka0gG2j4c9 y6omzmfwFoEz5HHCF+/EjZjHirju3V4+po1vedo6aNOMXuDXuTGDTeLKG51AolDplvKT LWEEWzb+nSBIa+/5/Spzit3QBYLsWwMhzbp8+KMJtF6WdsZWzWOL+jQhmi5r9gQHtRKu aEaqOrZ//PUS2Kwlol6GAmBZ3fVmcKnVYigz0xV5hq+gB4qqmwkVwASFUSHwHXfbvaFb KZcmDohX92j1HrcYbVWKJrGqRQfe9hYFUnk4ezISMcu0rctqeGuGdk98exotMzf0bm5j C0mA== 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=JgDXGVE5sEE2JecKSqk8UtZpnzKOLtIrc++DIcaU5eg=; fh=3OZytcp2m5bhK+tFGUFh4HgGjKZREO5RCNhnBB1Pkxc=; b=JZ6OO6qe0VeMffULJpkh1JmrX+wGgMstWGYnQko+GmPMtW6aoMYh3JGmMD7IeeXX3M IRSkMzE2hyPwFJSMXqMB+sb5MwN74Y5RiEwKGzGlpH6ynniYPMEOhOjJUF3IILp5+tIm egRWdngm/8uouSVOxqxEWYSGmsZOyfeK9vL0DRUL8BJpI+Bl78EkxPL+C5eAlT9Lf8LK xHc0S6vGaT1VlNRytjG/HjIj0O4iyt32Cy7ZPWuF7u9ejZPjCW2nrEYtMCP9oIsC9scA QH15WqAi3dz0uxCYYPMwafS9k2ln8za1CNhI1qUBFa9Z5rZotwh3309SGAFoUy51r+6Q pKPA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sg+UwOth; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44858-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44858-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fy19-20020a170906b7d300b00a35ba88a82bsi2099614ejb.258.2024.01.30.07.42.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 07:42:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44858-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sg+UwOth; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44858-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44858-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id E0D3C1F21715 for ; Tue, 30 Jan 2024 15:41:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AACEB86AC5; Tue, 30 Jan 2024 15:40:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sg+UwOth" 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 109CF5C8B; Tue, 30 Jan 2024 15:40:55 +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=1706629256; cv=none; b=SELoKtUxDAj9ae+yziKY34KUBx5gfynH28iWUdjBEUkfkWU+QNZ2mWIdDaKAqRvAoC8ICOaF/yBo+s5U36krz82PHjewiw3UW3vjSyb9FYdd/24PAmWfNhrerx7kSHaE462UqYFfeyQiMpvnqm0KSD8h7/rzFvgrc/zw3bwZVFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706629256; c=relaxed/simple; bh=PvogyaMhQ35TmqTU2MVaW0rUBplyqT/XFNewRYyTLVA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=amprFNjSkC6Zphu8kEIGGx32QQLydI5RagmIFITnfIHTcgZRFMJ2YA3UnxM6NbmyFLyKkazO1vXt50dN0eyrrhp/wgeNsqG+NaUphXuGawpaHaqe1pV9cBLlQG7PY1IGRqxfFH1x0ZvivHSV0hIzuenj198MkYcfiSG2WruMfyg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sg+UwOth; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87528C433A6; Tue, 30 Jan 2024 15:40:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706629255; bh=PvogyaMhQ35TmqTU2MVaW0rUBplyqT/XFNewRYyTLVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sg+UwOthfJOfI++Q7e9R3YnXsy38890oOI2b3WIEFWS1rzxE4Acd7HIwxv34m/l3K konIO3DcRzVvzr9gTh9eiG9a7NKHl7a6AOivHA0JD6EP+F1N/1bms2g7db/edvNijW zJLdPTvTPexZ4CKqkycNy3Vx/T2lxIE6Z9rpaIoiaYuHOr/4k+p8Xb7MSxKSs+G+tz wuHcAUZXvC2V9PRQYY1GQ0bK90btftl/+O6Y5yAIbk9pa7Ma1jh73bfZmp979AmJH3 0U8TkEcLGfOp9XFe9Io0Sh59VRwwgjiD5SSV+rVMwHIcc0IuWdrEX5QrlbSzwP+6eF MyrmpzLPipOKQ== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com, lee@kernel.org 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 v2 1/3] dt-bindings: mfd: syscon: Add ti,am62-usb-phy-ctrl compatible Date: Tue, 30 Jan 2024 17:40:33 +0200 Message-Id: <20240130154035.6901-2-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240130154035.6901-1-rogerq@kernel.org> References: <20240130154035.6901-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789530589511714155 X-GMAIL-MSGID: 1789530589511714155 Add the compatible for TI AM62 USB PHY Control register. This register is found in the TI AM62 WKUP_CTRL_MMR0 space [1]. It is used to indicate the USB PHY PLL reference clock rate and core voltage level to the USB controller. [1] - https://www.ti.com/lit/pdf/spruiv7 Signed-off-by: Roger Quadros --- Notes: Changelog: v2 - New patch Documentation/devicetree/bindings/mfd/syscon.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mfd/syscon.yaml b/Documentation/devicetree/bindings/mfd/syscon.yaml index 084b5c2a2a3c..b5f27cc2917c 100644 --- a/Documentation/devicetree/bindings/mfd/syscon.yaml +++ b/Documentation/devicetree/bindings/mfd/syscon.yaml @@ -73,6 +73,7 @@ properties: - rockchip,rv1126-qos - starfive,jh7100-sysmain - ti,am654-dss-oldi-io-ctrl + - ti,am62-usb-phy-ctrl - const: syscon From patchwork Tue Jan 30 15:40:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 194219 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1319373dyb; Tue, 30 Jan 2024 08:00:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0C1xmu64zclxRWE47Sx3RM+3WXpXd4yuhS2npgXqWf0fErhuLPJZX3AOjJwZ+cpsArxDQ X-Received: by 2002:a17:90a:800b:b0:295:ad9b:5dc2 with SMTP id b11-20020a17090a800b00b00295ad9b5dc2mr1515150pjn.48.1706630448550; Tue, 30 Jan 2024 08:00:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706630448; cv=pass; d=google.com; s=arc-20160816; b=EssCAjQk2LVbAErmyyboALz346hmn0hYNw1pR+Dwz0raGEIg/0+kX0AZWFLL6H9HIa 5d2J4BR/0A+zQxPQPk/lmDooCMu1q/a2947AfhFpoG5IBl9p42sXumzxTowJSJePtiG0 l23vdDbRalKURdS9kn/bLE3FZujoK9Ly+xBZ/njjPgRQ6iRUid9LxsLXh6u5YudNmsYR GKea5ZnMAP77Ds5wH9mp8mmRBVrtZ3ObfaBSolhjjYFR6X1p9aNdOFZHrIOU4Gw3Id4j xTvyYyMoudRTHQtBu/72Zu61RvrpAmzeXih/bkdPHAVb1pZRJYNKVobSqpMNHYfNoFXL gzSw== 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=yqZ1BWDHskHuyP9guZ4pqHbCBjs7ao55J0y1uea+VOM=; fh=3OZytcp2m5bhK+tFGUFh4HgGjKZREO5RCNhnBB1Pkxc=; b=SF4KbHnw4fFMQ1/HjPfS+2KNDbg5edScW5zmv1zXyVBJ5GMra1ZOqD0YamxWY1LgGE wpX7+ts2lUD8t7F/PXjWA41rRtHbL04zFOz1eJn0yqhRVwbrEIP5oK8YPsMkiNFxATip JxvtsgyuGHxGQfvSdYbXV1uaUAePSpzwHgxWdI754NQuByxfA8w3r6ZP9ksAEbTG44JB /6ShOp4m7KBQWtY8iDRJsgRpD5CwHYYKUqz+YehJRUUAu0G5/DxS/o3GGR2nfkRiiBR1 NOuF1GjXqKqaXSESzQIYCnJjTGA/nc3FVD9NnbK8VCWZFd0/VH5FHXL9lYb5kHLlhrY+ CxWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PoCg2+3g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44859-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44859-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t3-20020a17090a024300b002955ebd5941si4115888pje.9.2024.01.30.08.00.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 08:00:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44859-ouuuleilei=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=PoCg2+3g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44859-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44859-ouuuleilei=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 E51E8B2700E for ; Tue, 30 Jan 2024 15:41:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0945586AE9; Tue, 30 Jan 2024 15:41:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PoCg2+3g" 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 595BC5C8B; Tue, 30 Jan 2024 15:40:59 +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=1706629259; cv=none; b=VyOq3tbDJ7/lAox0ulm73NcMKGUpXwKA0uN0jRoT2RSXySxBn0Y1ydFwFo6QGP8ZnRWvZdHHV9nec1mYZW89/pa0kFZxQit9OMqqdrsxgkdqBBbBzu5L4mxENufIqtKBpUzOy4xRpWLymqRTIsGhTEAXdNwTUsUEwto3Zwy3ybU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706629259; c=relaxed/simple; bh=jJoErVTod0oDPtMH97i6PpdukCzZcgldhkvPcTE3rBk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=T+qsONwgll9ck/Kvfq2HMjUYxX3Msbrlxt7TxaTr7A0wNDJhu7zvYA260jE1xrndlyHq2dqAMmxYM/NbXGdYWxcR7B3zeKaOX38e/htvloATi1yfVUWy7UBcXwDfOfHw/1JPg+XQLLxG2uv7T/qR9FwzWFGtKKu12el3+eKJ7Xs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PoCg2+3g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2CABC433B1; Tue, 30 Jan 2024 15:40:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706629258; bh=jJoErVTod0oDPtMH97i6PpdukCzZcgldhkvPcTE3rBk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PoCg2+3gYUlABMbdNb6WvzHB7R2YHI0ZIUigshxO/SU8PB3/JRL/+Ud+wN8R5oIiN eocLML5HZKCaKQ9nqNKQe7NL0HS6d4Jw5btkxnTapVFpxR4FIp7rmvnmfKYuGrhiKs dU1+uZ1lSI52Ak49AJjfgZLayEZaXUuJS6WWlyUbKzPeKyeoMvZXX1aPSfwfpmxGab mMGobeauvCmiu+DXhlei0FaTvVFu4JfF38s8YKsn3UUdEdCeAQ3dn2e8uAv2l0/m/F +tqyw0LLiwGILSHOIpAdvZ2ZWIJUbDYVRCh6KyxegGdrpa+5FXDcjYvi6P+YCB9tb0 BzIyCTkr2AHug== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com, lee@kernel.org 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 v2 2/3] arm64: dts: ti: k3-am62/a: use sub-node for USB_PHY_CTRL registers Date: Tue, 30 Jan 2024 17:40:34 +0200 Message-Id: <20240130154035.6901-3-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240130154035.6901-1-rogerq@kernel.org> References: <20240130154035.6901-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789531729191826793 X-GMAIL-MSGID: 1789531729191826793 Exposing the entire CTRL_MMR space to syscon is not a good idea. Add sub-nodes for USB0_PHY_CTRL and USB1_PHY_CTRL and use them in the USB0/USB1 nodes. Signed-off-by: Roger Quadros --- Notes: Changelog: v2: - moved am62p changes to next patch - use new compatible for USB PHY CTRL node arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi | 10 ++++++++++ arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 4 ++-- arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi | 10 ++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index 464b7565d085..9432ed344d52 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -625,7 +625,7 @@ usbss0: dwc3-usb@f900000 { reg = <0x00 0x0f900000 0x00 0x800>; clocks = <&k3_clks 161 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>; + ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>; @@ -648,7 +648,7 @@ usbss1: dwc3-usb@f910000 { reg = <0x00 0x0f910000 0x00 0x800>; clocks = <&k3_clks 162 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>; + ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>; diff --git a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi index fef76f52a52e..817700b2eacf 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-wakeup.dtsi @@ -19,6 +19,16 @@ chipid: chipid@14 { compatible = "ti,am654-chipid"; reg = <0x14 0x4>; }; + + usb0_phy_ctrl: syscon@4008 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4008 0x4>; + }; + + usb1_phy_ctrl: syscon@4018 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4018 0x4>; + }; }; wkup_uart0: serial@2b300000 { diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi index f0b8c9ab1459..8311c7c44cd3 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi @@ -566,7 +566,7 @@ usbss0: dwc3-usb@f900000 { reg = <0x00 0x0f900000 0x00 0x800>; clocks = <&k3_clks 161 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4008>; + ti,syscon-phy-pll-refclk = <&usb0_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 178 TI_SCI_PD_EXCLUSIVE>; @@ -589,7 +589,7 @@ usbss1: dwc3-usb@f910000 { reg = <0x00 0x0f910000 0x00 0x800>; clocks = <&k3_clks 162 3>; clock-names = "ref"; - ti,syscon-phy-pll-refclk = <&wkup_conf 0x4018>; + ti,syscon-phy-pll-refclk = <&usb1_phy_ctrl 0x0>; #address-cells = <2>; #size-cells = <2>; power-domains = <&k3_pds 179 TI_SCI_PD_EXCLUSIVE>; diff --git a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi index 4e8279fa01e1..4a375f5e0c19 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-wakeup.dtsi @@ -17,6 +17,16 @@ chipid: chipid@14 { compatible = "ti,am654-chipid"; reg = <0x14 0x4>; }; + + usb0_phy_ctrl: syscon@4008 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4008 0x4>; + }; + + usb1_phy_ctrl: syscon@4018 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4018 0x4>; + }; }; wkup_uart0: serial@2b300000 { From patchwork Tue Jan 30 15:40:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 194214 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1308400dyb; Tue, 30 Jan 2024 07:41:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IEe9M5NX2GbUeM/eW/adCgK17f4Ss+RdbHesQtCjT1ap4wl9Mz083R2Etu94DCnsczGgQEQ X-Received: by 2002:a05:6358:5913:b0:178:77cc:a0f1 with SMTP id g19-20020a056358591300b0017877cca0f1mr3949697rwf.48.1706629313761; Tue, 30 Jan 2024 07:41:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706629313; cv=pass; d=google.com; s=arc-20160816; b=TAogVA/5lzSVM0v1nA0eletNdrXihjX7RMq5TP0CWap1FzWiFRD0Z9vciV2AM5X6NM dJaNmtLvdPmSb/C4OAOEIwDHXqrjZefuaHQ1nnrM8UVF3U0woRafa+xjAxVeonC4kzGw KLZhyjUc7M4iEEnId2lhms8aDW+8Dt0CmcaRLbK2HSEOTRjdk2nhJuWFhJEvVlvCVtD7 TzGaLDMtTMfYj0spt13CZJfNYU+Lh1KR/nqxgtlmdxONhJ/treKVRera1TgDw4Nno07v vDT5P7Xt44AXcdIN/wY3dENZFuBtKusM4dZZsT1WqohBLtKyY/bu9f23j7OxoA/IuZDl aMIw== 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=KT864Fe7k+EVMd6gWjj86rMFU2YcIRaR5rQAVkrSCZQ=; fh=3OZytcp2m5bhK+tFGUFh4HgGjKZREO5RCNhnBB1Pkxc=; b=hQrH4caOR7P/+wHGT4WoOHn8fznzr/4XYyk3Yu70zqRhA7tXFWmxoPodfs172rKbDj hah7AZcg9/pa50PsBPcFAYV2IlFIHCS3Sv97BOjlM0tFBsp/VDx62HcB8YVWLpV9PIO+ wMoUxNbIGetXm2s4LxJxv1SsT45EbYRDL3WD3qROZM7X/sSGkEUTfXEt5s3kC8sNUrKC CZvlxrHRrTyF30QRBAo9hmgbD4O3IbB2PMWcFAG8P7M6xqBhnKtoJVENtjWgxCd7IFHL a/EdhK0bG4mXNAphPA2X1rzyCnsfM3tdPlstOOFttXAz/C/21stEC0wQMlEwa+AFJZ6E mqFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jNjLsm/s"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44860-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44860-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l12-20020a65680c000000b005d8e0d44d86si1543426pgt.553.2024.01.30.07.41.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 07:41:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44860-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jNjLsm/s"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-44860-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44860-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6F3E928507D for ; Tue, 30 Jan 2024 15:41:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6E5186AEF; Tue, 30 Jan 2024 15:41:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jNjLsm/s" 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 CCA7C82D99; Tue, 30 Jan 2024 15:41:02 +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=1706629262; cv=none; b=bk2H48IvrvJor5m3Qs4SLtKcpZ/nIMJleOcqAMwMnAMw94kPFlSvEn1U/92wLO31TGz4akvqvRA2cGd7K5Sa27+33xJ5xWx0hlwEus6wF877UbIP6IhjNKwBlYWieK3uYdfJQxtjKAvlP2yBmQ54paAmta6YHlpHjfxcQv4lyfI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706629262; c=relaxed/simple; bh=ECHEowaol8e/oEy89OA54f0TFxnBzEohQY0MKdVwJU4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lJQV7NS8SarZtwZSxHUFHowNXuzqxHeKKLpHAv1Ctgc7+ykq1JaueAkUqSEdGvQ5UITvJIncXgV3bGVR7Pl7ssUKpc+hkmNjcakd8dHXHnUOXgmMN+szUWWQpBoLfnwgQG1U8RtmrPh/DoJxEOBaMznqd6tBdN0hsSRyxcZ+sGM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jNjLsm/s; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6B229C433A6; Tue, 30 Jan 2024 15:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706629262; bh=ECHEowaol8e/oEy89OA54f0TFxnBzEohQY0MKdVwJU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jNjLsm/s1DL6uEw0f+crauj4nscywOYpXaoQDmOXEoDlBef/agEVFUdWVyUq6clvD /dfJZIUf0gznuZd7uUwTWSan8wiSbwlAfZ2guMH6P0AsI7kWhGQOo+cDoZWlsaM5bm Brvxmg5lzurGjw2oVQPIHLnvsZCeFzPm9qdsuTPP49iRR7pez55BAg61GoTAg/QzDr OsgBxtmH1/pP/aplJYrZIJF7kNqFeJ9O0QMuNMIEeeYLETtSEKMJoYoGQi4nKbnOey w7TZTodSZk0xYCyDgzOTfkogJjg7dHdNOZ1LI2VWqI8p5VwZjSiOMGDg0qQyWiwA16 4CZufpHcefpag== From: Roger Quadros To: nm@ti.com, vigneshr@ti.com, lee@kernel.org 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 v2 3/3] arm64: dts: ti: k3-am62p: add the USB sub-system Date: Tue, 30 Jan 2024 17:40:35 +0200 Message-Id: <20240130154035.6901-4-rogerq@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240130154035.6901-1-rogerq@kernel.org> References: <20240130154035.6901-1-rogerq@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789530539112838024 X-GMAIL-MSGID: 1789530539112838024 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 --- Notes: Changelog: v2: - added USB PHY CTRL node changes here - changed USB wrapper node names to usb@ - changed Type-C chip node name to usb-power-control@ arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 46 ++++++++++++++ arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi | 10 +++ arch/arm64/boot/dts/ti/k3-am62p5-sk.dts | 67 +++++++++++++++++++++ 3 files changed, 123 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..17d28390d587 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: 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: 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-am62p-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi index 19f42b39394e..00dd38b02a52 100644 --- a/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62p-wakeup.dtsi @@ -18,6 +18,16 @@ chipid: chipid@14 { reg = <0x14 0x4>; bootph-all; }; + + usb0_phy_ctrl: syscon@4008 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4008 0x4>; + }; + + usb1_phy_ctrl: syscon@4018 { + compatible = "ti,am62-usb-phy-ctrl", "syscon"; + reg = <0x4018 0x4>; + }; }; wkup_uart0: serial@2b300000 { diff --git a/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts b/arch/arm64/boot/dts/ti/k3-am62p5-sk.dts index 1773c05f752c..80be56c0a4e0 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: usb-power-controller@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>;