From patchwork Wed Oct 19 08:34:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5177 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp263342wrs; Wed, 19 Oct 2022 04:17:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5msYFTfqYwHf4fZn+H1h2Vp7QyRdNl7zmNCHGemiT27++wj7NienqObIBs5xLnrS+mN6uc X-Received: by 2002:a05:6a00:2350:b0:541:b5bf:2774 with SMTP id j16-20020a056a00235000b00541b5bf2774mr7737838pfj.28.1666178272023; Wed, 19 Oct 2022 04:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666178272; cv=none; d=google.com; s=arc-20160816; b=DJj+HtgqupBdJ2Xq38hGdBy8q6jShuP2EN0iv45FNtq0LeCQSPeyLDOwqeDfnrPpx7 r6xWGl9cpmOey/AHl/NmeQr80T0jBtcPLNGSRgcQ83Tr1wbxupATE7iCD+kjrmXWM3b0 jFhSXJwQ2Qujx2TTJMOHE5ZAnvLE3FcHnmLZetTSdmWEyyyj8iRE3fv/LboSq/xcOmvP npKWyTfKb5xoaa7SoC/1S85BoBOc2doqAbWML0uZyF90hjvPM0mYeCGmtOg5KCUhC4O9 apSPrwhrEFkdZk/prclwugWtP7JT4liCytWeXY6nwUaBcQg++gjelv9MVAnkByk05gd6 ujDw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+q4zsi7UhlUH70cMFAo7Ees77SBcnF5f15TVZiqaPDk=; b=xVnurbNL8zmWReRukH3a5mmh5pULpu9Qh0uy+iZDyGI5Uh4ZwgNsFCaiuVJ8Nhmcah T/SVpLnw1euNAlcteef3gwPH1u8tCgXq0ouRmjUyiYf198FbRI4KFN5sYJ6zaOU3Yz+m EdL7edk88Ta4gmi3tPQ4gXyGETi04HLXQ9ZyoLqL2j3n4ZoTI2qVxsHI7aR49T8UY26M MMIcIkRdRyWvwSOQmqshswSxYxseksEHW2v+uCGmcSs+wUUovXDYTwxLDilJ3uB2//Dh ariNdcw8a+BNcvXmaBV/6+QC327PgGMsJiFhvFVGN+CmTCXjCJHiRDWN1mu6/6/450F2 IHuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pAto0vey; 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=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z21-20020aa78895000000b0056353f0bd40si18527613pfe.29.2022.10.19.04.17.35; Wed, 19 Oct 2022 04:17:52 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=pAto0vey; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233517AbiJSLGW (ORCPT + 99 others); Wed, 19 Oct 2022 07:06:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233526AbiJSLFY (ORCPT ); Wed, 19 Oct 2022 07:05:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AEF21DF0B; Wed, 19 Oct 2022 03:34:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C3105617EA; Wed, 19 Oct 2022 09:14:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BEA1FC433C1; Wed, 19 Oct 2022 09:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170877; bh=DyF7cFPBhyiKKwMWomnIA0DO1L1nyUDi+UAHcYqsMI0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pAto0vey2tthbgMIVtbLsXgSb8FOLO7y+Tb0LEAbijJAP5wSRv+oTaxuRlubqpQQ4 G2s8rOTRDXeDaijFfYn04O9cJYia8Tk9Cet5hXGo8m2WUCR4NKDRSKujaZAva46NTV qgzsUzO52IzFCs9d8N6YBbbP8qvjBGICtvGolk8c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kunihiko Hayashi , Arnd Bergmann , Sasha Levin Subject: [PATCH 6.0 788/862] arm64: dts: uniphier: Add USB-device support for PXs3 reference board Date: Wed, 19 Oct 2022 10:34:35 +0200 Message-Id: <20221019083324.721603131@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747114547833870568?= X-GMAIL-MSGID: =?utf-8?q?1747114547833870568?= From: Kunihiko Hayashi [ Upstream commit 19fee1a1096d21ab1f1e712148b5417bda2939a2 ] PXs3 reference board can change each USB port 0 and 1 to device mode with jumpers. Prepare devicetree sources for USB port 0 and 1. This specifies dr_mode, pinctrl, and some quirks and removes nodes for unused phys and vbus-supply properties. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/20220913042321.4817-8-hayashi.kunihiko@socionext.com' Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin --- arch/arm/boot/dts/uniphier-pinctrl.dtsi | 10 +++++ arch/arm64/boot/dts/socionext/Makefile | 4 +- .../socionext/uniphier-pxs3-ref-gadget0.dts | 41 +++++++++++++++++++ .../socionext/uniphier-pxs3-ref-gadget1.dts | 40 ++++++++++++++++++ 4 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts create mode 100644 arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts diff --git a/arch/arm/boot/dts/uniphier-pinctrl.dtsi b/arch/arm/boot/dts/uniphier-pinctrl.dtsi index c0fd029b37e5..f909ec2e5333 100644 --- a/arch/arm/boot/dts/uniphier-pinctrl.dtsi +++ b/arch/arm/boot/dts/uniphier-pinctrl.dtsi @@ -196,11 +196,21 @@ function = "usb0"; }; + pinctrl_usb0_device: usb0-device { + groups = "usb0_device"; + function = "usb0"; + }; + pinctrl_usb1: usb1 { groups = "usb1"; function = "usb1"; }; + pinctrl_usb1_device: usb1-device { + groups = "usb1_device"; + function = "usb1"; + }; + pinctrl_usb2: usb2 { groups = "usb2"; function = "usb2"; diff --git a/arch/arm64/boot/dts/socionext/Makefile b/arch/arm64/boot/dts/socionext/Makefile index dda3da33614b..33989a9643ac 100644 --- a/arch/arm64/boot/dts/socionext/Makefile +++ b/arch/arm64/boot/dts/socionext/Makefile @@ -5,4 +5,6 @@ dtb-$(CONFIG_ARCH_UNIPHIER) += \ uniphier-ld20-akebi96.dtb \ uniphier-ld20-global.dtb \ uniphier-ld20-ref.dtb \ - uniphier-pxs3-ref.dtb + uniphier-pxs3-ref.dtb \ + uniphier-pxs3-ref-gadget0.dtb \ + uniphier-pxs3-ref-gadget1.dtb diff --git a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts new file mode 100644 index 000000000000..7069f51bc120 --- /dev/null +++ b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget0.dts @@ -0,0 +1,41 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// +// Device Tree Source for UniPhier PXs3 Reference Board (for USB-Device #0) +// +// Copyright (C) 2021 Socionext Inc. +// Author: Kunihiko Hayashi + +/dts-v1/; +#include "uniphier-pxs3-ref.dts" + +/ { + model = "UniPhier PXs3 Reference Board (USB-Device #0)"; +}; + +/* I2C3 pinctrl is shared with USB*VBUSIN */ +&i2c3 { + status = "disabled"; +}; + +&usb0 { + status = "okay"; + dr_mode = "peripheral"; + pinctrl-0 = <&pinctrl_usb0_device>; + snps,dis_enblslpm_quirk; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,usb2_gadget_lpm_disable; + phy-names = "usb2-phy", "usb3-phy"; + phys = <&usb0_hsphy0>, <&usb0_ssphy0>; +}; + +&usb0_hsphy0 { + /delete-property/ vbus-supply; +}; + +&usb0_ssphy0 { + /delete-property/ vbus-supply; +}; + +/delete-node/ &usb0_hsphy1; +/delete-node/ &usb0_ssphy1; diff --git a/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts new file mode 100644 index 000000000000..a3cfa8113ffb --- /dev/null +++ b/arch/arm64/boot/dts/socionext/uniphier-pxs3-ref-gadget1.dts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// +// Device Tree Source for UniPhier PXs3 Reference Board (for USB-Device #1) +// +// Copyright (C) 2021 Socionext Inc. +// Author: Kunihiko Hayashi + +/dts-v1/; +#include "uniphier-pxs3-ref.dts" + +/ { + model = "UniPhier PXs3 Reference Board (USB-Device #1)"; +}; + +/* I2C3 pinctrl is shared with USB*VBUSIN */ +&i2c3 { + status = "disabled"; +}; + +&usb1 { + status = "okay"; + dr_mode = "peripheral"; + pinctrl-0 = <&pinctrl_usb1_device>; + snps,dis_enblslpm_quirk; + snps,dis_u2_susphy_quirk; + snps,dis_u3_susphy_quirk; + snps,usb2_gadget_lpm_disable; + phy-names = "usb2-phy", "usb3-phy"; + phys = <&usb1_hsphy0>, <&usb1_ssphy0>; +}; + +&usb1_hsphy0 { + /delete-property/ vbus-supply; +}; + +&usb1_ssphy0 { + /delete-property/ vbus-supply; +}; + +/delete-node/ &usb1_hsphy1;