Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2818800rwb; Fri, 16 Dec 2022 06:57:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf4qiBnqIoQd2DAI1zJHPMwXQiPCBSkFz/IBf4QAeds0Fuyu7zhj1Tphhd3P/hjQILWu98BQ X-Received: by 2002:a17:907:397:b0:7c1:58cb:86b9 with SMTP id ss23-20020a170907039700b007c158cb86b9mr21201851ejb.28.1671202667667; Fri, 16 Dec 2022 06:57:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671202667; cv=none; d=google.com; s=arc-20160816; b=fmdKszoe39PUvC4hu+FB1s0nHHOHSvccgkLfKEvPNhBmChqZ1xLwmYnWCqivdIKULj Y0c4iGSuV4xRJkoZK3uA/T0UcGgcUoLUcrIWndG1+glG5q6uU70V4fdT0t9iPnuvFsCu OknCBeKg5/FVbBDMdqHcblQa72/apc5iB54s6EwUWUOZtGZylIjCLDA0Qtp1nPE+S1Wj HZ0XrTz9F0y62CHrKmhcZuYpWq2sHWZcXwIAItjDIP3uFB1oBOLd9kcrTwXwEVPxwQUq 0QYgR3wnrbMj5Ktbaezlpu6cLLuxFSzWb0VzTcIl9K5AB0k4jOhSqWTVYywOccZu2w2C nWBw== 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=lvbRH6E3MMZkAVfPWmbrsB5wWRb07F7KkfvBR0qHeOk=; b=On4XBEOsngM7wUzlgRVv5hVjmxNDfTI/6TRBS/3b38TdKPVfUP0iRAOmyvIS+Lywkg U36C5TqdLJGx74pH2BOCFDRvorKnShIxS4pNA0+pWRvGePoCYLOEDKwAByB0q2Iy6BMg BLl9bjkmvTYF00oprbogFPhRmrgrc1k9sZ4ckfOGfQlLhz0DRQ4kiSpqzgXZKLSoFUv0 ri3Ke2Ph74SR2sjWHwBCKxp+XJppD2CmhfR40re8vmckhqV72AmWiMpgkZyFxxj0LOf7 VBk1EdfQpoKLic0o3lNMKgdzf6NETANY+N3lfEvpgS9pWOUmorY2sExjX0VQlyj5sUtz rB0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=N32LXhPL; 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 dp18-20020a170906c15200b007c093acadb0si2978770ejc.508.2022.12.16.06.57.31; Fri, 16 Dec 2022 06:57:47 -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=N32LXhPL; 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 S231213AbiLPOgn (ORCPT + 69 others); Fri, 16 Dec 2022 09:36:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230339AbiLPOga (ORCPT ); Fri, 16 Dec 2022 09:36:30 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 265AD5C774; Fri, 16 Dec 2022 06:36:30 -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 D7C956602C97; Fri, 16 Dec 2022 14:36:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1671201389; bh=gwg+FXKZU5KF0sKSHfukB4xVb0UPjDiYXwiEsS4bEsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N32LXhPL5oNa5NdOonz6odUH/VoH3wd3dBTp39dg1ipLkBsCjHCy1BbzIImlPt5lK 2dIOj1RlpbCjnMoMU/gTrkuCbJpdk+PXJSVN15i/ZZ5zrMY5+YjrnvMNqdu9fXRZLK LFJzXP+qGvAslsAnWsM/L/P/QhViC8vbCV6L0bTX2e42mgCAFdkuJloNThtaEAhArN Vap6tKGIPLytrLAizqL0Ep3TK2AOx5w8eDQkM2DOTE6ajlNLd8HU0rWKZJ6YEDEPib cz8KJbDwM76QoD9wg4908499gxBkUX67C8I9U4rXQGxK+4rn3vrTJINR1vzjntJIgc bh1kn7mjFoLIA== Received: by beast.luon.net (Postfix, from userid 1000) id B31B75E3315A; Fri, 16 Dec 2022 15:36:26 +0100 (CET) From: Sjoerd Simons To: Nishanth Menon Cc: martyn.welch@collabora.com, Nitin Yadav , 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 3/3] arm64: dts: ti: k3-am625-sk: Add support for USB Date: Fri, 16 Dec 2022 15:36:23 +0100 Message-Id: <20221216143624.23708-4-sjoerd@collabora.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221216143624.23708-1-sjoerd@collabora.com> References: <20221216143624.23708-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 --- arch/arm64/boot/dts/ti/k3-am625-sk.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am625-sk.dts b/arch/arm64/boot/dts/ti/k3-am625-sk.dts index 93a5f0817efc..c165fa0a4109 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 { @@ -275,6 +277,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 { @@ -514,3 +522,17 @@ &epwm1 { &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