Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp9437913rwl; Wed, 11 Jan 2023 05:50:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXslqc+qDYcT8rEOzJF0rEPX2WMe7cvSfJrPwosB4XYPimv2fEQVNobypMKIQoBQ+PY31yNF X-Received: by 2002:a17:90a:2e86:b0:226:de98:ee43 with SMTP id r6-20020a17090a2e8600b00226de98ee43mr19720081pjd.43.1673445010118; Wed, 11 Jan 2023 05:50:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673445010; cv=none; d=google.com; s=arc-20160816; b=tdqiVIhUD1xgHuPBVbcIg+OHAS0+w5+x9h9T44cWZqbM2J2bYKSEUjPTKpbVbfMN9k LD8k1tjmGj4OkjFlKT/Mo2CNNsZmWVtx340aUt0pvv3bU4WA8cpwbBYzfNl8HeiWatfh Dp/B3eCRKFl53DNA+wY/POhp+GKde+/iWTHGpWv/loX0Bh0uAYEjSBBQKcp42KiX9OHV Ap8JeyYQ9/hZD366qEz61jDurLal/mfMMxngoI+0BDKVdao8eMhKXlXmLsdnI5Oes8Kw 4FOpq75ZKsXuTIT+GI7nOMQCr/MHrzhgp+stpwBh3FaVNP+5yhwPW2WbV/EfoMe/0Sq0 V5iA== 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=oCTdrP5aVJsSeZonBi8vI1zMcyK8Dv3JlW5+/LrRNmM=; b=OCByOkE21mkeAuzQdW36yjhaCNItcRAASmxnXu6auiNClL0Dif+Q1P8aCpJOMdT3Or Dk/KhG+Hc5H1iiIKQnNPFXA1tIkyBxzmC0Yu1gSSZqaR93/81KhUoGRNJdNoGeirMFuR AOjdf6tW36WdGqtOOxHC4wjsUIVkF69OWC3eyBMYPK5dYLhh7562dCH2vYxA92f2mGcr h4I5T5v2sUTEWWrsGRBp+ez+bU9ElS+68A70eIFASaCbTF8zBaWqQc9UNpGoeebqY0Kd uK5hlOKCia4uxg5Hr6pehZSfAYG6jLVTqQV6d2VN76af712QBALkmFD2HHuIp88oxdut ypaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=MRQVLbOc; 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=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob16-20020a17090b391000b002191b3c187csi15692911pjb.165.2023.01.11.05.50.03; Wed, 11 Jan 2023 05:50:10 -0800 (PST) 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=@collabora.com header.s=mail header.b=MRQVLbOc; 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=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234942AbjAKNYa (ORCPT + 53 others); Wed, 11 Jan 2023 08:24:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233564AbjAKNXz (ORCPT ); Wed, 11 Jan 2023 08:23:55 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C71E725EF; Wed, 11 Jan 2023 05:23:54 -0800 (PST) Received: from beast.luon.net (simons.connected.by.freedominter.net [45.83.240.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by madras.collabora.co.uk (Postfix) with ESMTPSA id 7CB776602D9F; Wed, 11 Jan 2023 13:23:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1673443433; bh=DGP5YuVVDTyIVeZ0yDO/PVajPfpgEyPnpUshoX7OQnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MRQVLbOcltUepPFACmX/jGEKiXD2E1NRQePGat8BZalA1nMJcj6/vyrZCOJ5LD41C ePRCPtZe1Xr0fvkfIt+gKHLA2ghiTKxkvL4lAOXlAod5VcORcfWxpYYkCty2dmP0Py 610e7ehB4PqY/yYkiOQOzDdI1EEaKcN+W+RiVZbw1dsfIKLXXLK+B3BdDmuJ7C7Fjt U455v/vRLqgmtaV/LsO0sm8b8sy72wQ3mY2Ld0Daxz/h2IZ7osXLL6iB9Ms76t7DUJ TzIF5du52JimwgQS3bAxDZ2VlnBZ+hW37bVX7pi4sF81fhHiCNI3KcCBCLIRXtGTii wQNEFmnxz9Zog== Received: by beast.luon.net (Postfix, from userid 1000) id EB14660ABD69; Wed, 11 Jan 2023 14:23:50 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: kernel@collabora.com, Nitin Yadav , martyn.welch@collabora.com, Aswath Govindraju , Vignesh Raghavendra , Krzysztof Kozlowski , Rob Herring , Tero Kristo , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] arm64: dts: ti: k3-am625-sk: Add support for USB Date: Wed, 11 Jan 2023 14:23:47 +0100 Message-Id: <20230111132348.553061-4-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230111132348.553061-1-sjoerd@collabora.com> References: <20230111132348.553061-1-sjoerd@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 From: Aswath Govindraju AM62 SoC has two instances of USB and they are brought on to the board in the following way, -> USB0 instance - This is brought out to a USB TypeC connector on board through TPS6598 PD controller. The PD controller should decide the role based on CC pin in the connector. Unfortunately the irq line for the TPS isn't hooked up which is a mode not yet support by the driver (some patches were submitted earlier this year[0]). So for now the PD controller is left out and periphal mode chosen. -> USB1 instance - This is brought out to a USB TypeA connector on board. Therefore, add the required device tree support for the above in the board dts file. 0: https://lore.kernel.org/lkml/f714ee55-ef47-317d-81b9-57020dda064b@ti.com/T/ Signed-off-by: Aswath Govindraju Signed-off-by: Vignesh Raghavendra [merge from vendor bsp, drop TPS6598 support, reword commit message] Signed-off-by: Sjoerd Simons Tested-by: Martyn Welch --- Changes in v3: - Rebased against current ti-next aka 6.2-rc1 - Add Martyn's tested-by Changes in v2: - Rebase against linux-next 20221220 arch/arm64/boot/dts/ti/k3-am625-sk.dts | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 4f179b146cab..c82a0ebf6772 100644 --- a/arch/arm64/boot/dts/ti/k3-am625-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am625-sk.dts @@ -24,6 +24,8 @@ aliases { spi0 = &ospi0; ethernet0 = &cpsw_port1; ethernet1 = &cpsw_port2; + usb0 = &usb0; + usb1 = &usb1; }; chosen { @@ -284,6 +286,12 @@ main_gpio1_ioexp_intr_pins_default: main-gpio1-ioexp-intr-pins-default { AM62X_IOPAD(0x01d4, PIN_INPUT, 7) /* (B15) UART0_RTSn.GPIO1_23 */ >; }; + + main_usb1_pins_default: main-usb1-pins-default { + pinctrl-single,pins = < + AM62X_IOPAD(0x0258, PIN_OUTPUT, 0) /* (F18) USB1_DRVVBUS */ + >; + }; }; &wkup_uart0 { @@ -464,3 +472,45 @@ partition@3fc0000 { }; }; }; + +&ecap0 { + status = "disabled"; +}; + +&ecap1 { + status = "disabled"; +}; + +&ecap2 { + status = "disabled"; +}; + +&main_mcan0 { + status = "disabled"; +}; + +&epwm0 { + status = "disabled"; +}; + +&epwm1 { + status = "disabled"; +}; + +&epwm2 { + status = "disabled"; +}; + +&usbss0 { + ti,vbus-divider; +}; + +&usb0 { + dr_mode = "peripheral"; +}; + +&usb1 { + dr_mode = "host"; + pinctrl-names = "default"; + pinctrl-0 = <&main_usb1_pins_default>; +}; -- 2.39.0