From patchwork Tue May 7 09:55:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Gunasekaran X-Patchwork-Id: 13656566 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 45536C10F1A for ; Tue, 7 May 2024 09:56:13 +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=FaR+8kO2Word+Tne8Pa/iVJILD7zONg4o15XBxGUfPA=; b=RnfXcw+vat5jOk BYO4+d8DNmurSLydFrPMTXgm9VeKWQzsMqc/RTTrZ3+gRrAOmhMqPzx+JcgAcEqYB7nvbdeGZEs9l I4E/tfz3wzlrukdJpaFzKhXeJ/HVCUzAMqh71+5b8zgVzFHWkXIfl4WeDS3M25x6EQtBQhHVpidCQ MD6ZqScG1ygTJh1/Gvtkx3/klOzve3ZzJvxg1eB4JbIEUEQXW+bXBsTnNDl8fNjKxWh++BRsBLty/ 2Y+P5bFWqmPDZoWHcU+i2f68MhThNoVZu6ufjkEimvgplKrMqNvIv+PIKsYnlJwffUH++k552oRAm 9n9k9jLiGm/UD3BidByg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4HYG-0000000AQEH-2YpS; Tue, 07 May 2024 09:56:00 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4HYD-0000000AQD9-1REp for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 09:55:59 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4479trRi057015; Tue, 7 May 2024 04:55:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715075753; bh=3guGtqT06dY4965aloh0sOEeWGeoW6RJqpn/W1YsL8g=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=lxrlZp/PgqWenlL6F8QWFcqXh7ivg1FHCuoL2ECZl0QskKg4ok+0wDtRyKskWxNTI buDrXmfAXxaJS9rWfgFdFsG1I+diViLAqMuyM95sHzANWgU6k14uo/nzgxjTgpp6tl xe9NsXa78vjM+tHQpBGR40prWVEDZcfM0CmKqvTA= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4479tr9B067849 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 May 2024 04:55:53 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 7 May 2024 04:55:53 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 7 May 2024 04:55:53 -0500 Received: from uda0500640.dal.design.ti.com (uda0500640.dhcp.ti.com [172.24.227.88]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4479tjn8007273; Tue, 7 May 2024 04:55:49 -0500 From: Ravi Gunasekaran To: , CC: , , , , , , , , , Subject: [PATCH v3 1/2] arm64: dts: ti: k3-j784s4-main: Add support for USB Date: Tue, 7 May 2024 15:25:44 +0530 Message-ID: <20240507095545.8210-2-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240507095545.8210-1-r-gunasekaran@ti.com> References: <20240507095545.8210-1-r-gunasekaran@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_025557_672796_46B788F4 X-CRM114-Status: GOOD ( 10.76 ) 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 From: Matt Ranostay Add support for the USB 3.0 controller Signed-off-by: Matt Ranostay Signed-off-by: Ravi Gunasekaran Reviewed-by: Roger Quadros --- Changes since v1: ---------------- * Node name 'cdns-usb' renamed to 'usb' Changes since v1: ---------------- * No change v2: https://lore.kernel.org/all/20240506052044.8228-2-r-gunasekaran@ti.com/ v1: https://lore.kernel.org/all/20240502053615.29514-2-r-gunasekaran@ti.com/ arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi index 6a4554c6c9c1..0401043791f8 100644 --- a/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi @@ -75,6 +75,13 @@ , ; }; + + usb_serdes_mux: mux-controller@4000 { + compatible = "reg-mux"; + reg = <0x4000 0x4>; + #mux-control-cells = <1>; + mux-reg-masks = <0x0 0x8000000>; /* USB0 to SERDES0 lane 3 mux */ + }; }; gic500: interrupt-controller@1800000 { @@ -568,6 +575,38 @@ status = "disabled"; }; + usbss0: usb@4104000 { + bootph-all; + compatible = "ti,j721e-usb"; + reg = <0x00 0x4104000 0x00 0x100>; + dma-coherent; + power-domains = <&k3_pds 398 TI_SCI_PD_EXCLUSIVE>; + clocks = <&k3_clks 398 21>, <&k3_clks 398 2>; + clock-names = "ref", "lpm"; + assigned-clocks = <&k3_clks 398 21>; /* USB2_REFCLK */ + assigned-clock-parents = <&k3_clks 398 22>; /* HFOSC0 */ + #address-cells = <2>; + #size-cells = <2>; + ranges; + + status = "disabled"; /* Needs lane config */ + + usb0: usb@6000000 { + bootph-all; + compatible = "cdns,usb3"; + reg = <0x00 0x6000000 0x00 0x10000>, + <0x00 0x6010000 0x00 0x10000>, + <0x00 0x6020000 0x00 0x10000>; + reg-names = "otg", "xhci", "dev"; + interrupts = , /* irq.0 */ + , /* irq.6 */ + ; /* otgirq.0 */ + interrupt-names = "host", + "peripheral", + "otg"; + }; + }; + main_i2c0: i2c@2000000 { compatible = "ti,j721e-i2c", "ti,omap4-i2c"; reg = <0x00 0x02000000 0x00 0x100>; From patchwork Tue May 7 09:55:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ravi Gunasekaran X-Patchwork-Id: 13656567 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 54D73C10F1A for ; Tue, 7 May 2024 09:56:15 +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=PLOpEKcDKSfzUcNQfuBx/xfF84r3zZeoYAcwei8e788=; b=pRwL7VmAkpgcCX 5Fe5Hem+DToPqhhqEWkGGLl69ZgOg04GAUR9S1VRkA6d4hd73sIhLwQhocMSFdYCjh27dDJe+ndTX qNZ1k87M2PcghkxLTDmoqMg7oeM7sD88kEBllxFR1jtYpC/T2G74OX8Vz8cIoJvVBFuIFSjuu5wNM USHLOl+KPC3ld5EnCqDm3IT9kpsoQ+83KksDi8JHEpIrx4c1TEbNBepe1PsNHgf6WXsOVRhwlE7dS Xt1jnlVzO4QVc6D/Fjx4MdrqgEqiRZCtNH+F2cSDtxvAvkhmd8d7iNVypTQI0+TVK4VNvCOqntYsQ 7Td12nFhkE/bRXGAjrFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4HYK-0000000AQF7-2ndH; Tue, 07 May 2024 09:56:05 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s4HYG-0000000AQDw-10WO for linux-arm-kernel@lists.infradead.org; Tue, 07 May 2024 09:56:01 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4479tvtT107422; Tue, 7 May 2024 04:55:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715075757; bh=N17m9LzgCTati8EKmN4u+FCakx9xKHwIfJ2kC2zewIU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=t0R82+7fN0mf2mPZwWJWs/+OYC3s2mPXtf6ieThhSqhOimMVbw7/cmodUxjqqMeR2 qZXcKoUg44l73LfnLP4qhrrUhDiC0dvPgPOVcr2hXiqdiSeU0z6Q9/Z9hRAkKeC+lX A9oIYJsGMf9Cr+f/1BPdKy6F7WEK9U9u0pRu3Egk= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4479tvcX034259 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 7 May 2024 04:55:57 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 7 May 2024 04:55:56 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 7 May 2024 04:55:57 -0500 Received: from uda0500640.dal.design.ti.com (uda0500640.dhcp.ti.com [172.24.227.88]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4479tjn9007273; Tue, 7 May 2024 04:55:53 -0500 From: Ravi Gunasekaran To: , CC: , , , , , , , , , Subject: [PATCH v3 2/2] arm64: dts: ti: k3-j784s4-evm: Enable USB3 support Date: Tue, 7 May 2024 15:25:45 +0530 Message-ID: <20240507095545.8210-3-r-gunasekaran@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240507095545.8210-1-r-gunasekaran@ti.com> References: <20240507095545.8210-1-r-gunasekaran@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240507_025600_407378_716B1575 X-CRM114-Status: GOOD ( 10.62 ) 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 From: Matt Ranostay The board uses SERDES0 Lane 3 for USB3 IP. So update the SerDes lane info for USB. Add the pin mux data and enable USB3 support. Signed-off-by: Matt Ranostay Signed-off-by: Ravi Gunasekaran --- Changes since v2: ----------------- * No change Changes since v1: ---------------- * Fixed dtbs_check warning by renaming 'main-usbss0-pins-default' to 'main-usbss0-default-pins' v2: https://lore.kernel.org/all/20240506052044.8228-3-r-gunasekaran@ti.com/ v1: https://lore.kernel.org/all/20240502053615.29514-3-r-gunasekaran@ti.com/ arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts index d511b25d62e3..a2d3cba0423e 100644 --- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts @@ -336,6 +336,13 @@ J784S4_IOPAD(0x010, PIN_INPUT_PULLUP, 8) /* (AH33) MCAN13_RX.I2C4_SDA */ >; }; + + main_usbss0_pins_default: main-usbss0-default-pins { + bootph-all; + pinctrl-single,pins = < + J784S4_IOPAD(0x0ec, PIN_OUTPUT, 6) /* (AN37) TIMER_IO1.USB0_DRVVBUS */ + >; + }; }; &wkup_pmx2 { @@ -1041,6 +1048,40 @@ <&k3_clks 218 22>; }; +&serdes0 { + status = "okay"; + + serdes0_usb_link: phy@3 { + reg = <3>; + cdns,num-lanes = <1>; + #phy-cells = <0>; + cdns,phy-type = ; + resets = <&serdes_wiz0 4>; + }; +}; + +&serdes_wiz0 { + status = "okay"; +}; + +&usb_serdes_mux { + idle-states = <0>; /* USB0 to SERDES lane 3 */ +}; + +&usbss0 { + status = "okay"; + pinctrl-0 = <&main_usbss0_pins_default>; + pinctrl-names = "default"; + ti,vbus-divider; +}; + +&usb0 { + dr_mode = "otg"; + maximum-speed = "super-speed"; + phys = <&serdes0_usb_link>; + phy-names = "cdns3,usb3-phy"; +}; + &serdes_wiz4 { status = "okay"; };