From patchwork Tue Apr 23 20:52:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13640722 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 C91FAC4345F for ; Tue, 23 Apr 2024 20:53:40 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EUl2PoNyYZRUky5g9DB77fIQ8gIZEvYjCLZuGpvfzFI=; b=I8XcnpjmEuwb3Y 6SWhq8SBV7KBDC5o9NNMSIk7k1h/NjU+7IOnuY52fVzBOGbkpibwM7f5Jb+CwFE3KZx2IPxQcsWV2 Jg5NzALNoA6zrzBbsibj7ScZZy5kRfuAjhcBKZk6QJbzpuX/q6hR8lmphSM2Nx3swLCVf7UvohCuc EzRRaFhh2c/cyrJwPNfUlcTLaa34pqZZfZVaYzB6zFrxvczdHgcJqpO3s/uopXPe0pfubGwnfBkiS nfMhKSOen8E5dnKPVJ+nZVNOShtu6rn+78kIyBrnuXCJN+DbnNS7GLCVAs7X2WgTGrI/KB3kadeFr o+KRhUPDh+Cu9V8lJ8ng==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzN8p-00000001Uc8-2Jq0; Tue, 23 Apr 2024 20:53:27 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzN8K-00000001UJr-2NAM for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 20:52:58 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-34665dd7610so3054852f8f.3 for ; Tue, 23 Apr 2024 13:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713905571; x=1714510371; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=+1GZJJLKOpK1Q+g+fKW1mL5kKY9CXXEvR0RLPI154Do=; b=Psmk3hkLRd0TtoGsOWySSXFWx4vvuv0sNMbN2Mv+0SQeftoyhw3OUf55kn38whGHlh LcHfV4DC//Pclh2jvGph6ZTh7Uoo8lJW2WEqqP6Csf5rH3A4/do0+slIzw+sq8UUnAEP GUBmtlzWk+BwqAQthz9U5z7isko2HfRE5qDiNbPoXmE8cPDwz7iZc9aYVfRdVg/Dyges UJmK2TpqUOMo7A34iyj3aMSwv7e7FBctPBjAE0kWocMzEanN0Oo2j4uyyTKrv6V+9SZm Cu3iYSPwb2p9JI4TFVN6kBanumt5338sSI3QFnCGndA3hk3J3vmgjl8diLOicTQgnJ9i edLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713905571; x=1714510371; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+1GZJJLKOpK1Q+g+fKW1mL5kKY9CXXEvR0RLPI154Do=; b=oaEVOhzELptLp5MCP6laK7sHOhn+Hqh3R/VUE9Z+VN98CXR8PfWpuUuGkHQWf9audZ MdBEORUxhrFWaY49/w517VPpsUrGQmfi9TBGlBm7e8TGzgznFLUzttQeRBYrOmBWmBkx 9QdGU5GQmT8yticexhp6bM/CDsyfC20RHVt23/8k0UcAz5zXc3nV24MHkOi8tDFSXcbt TcEExu39Xz3ftPjze0JW9E3Q2Y2J5Ay+0Cneslbjs6kZKFW08B/pFn5BP0Wd+pIo+nsA OOZbVUyn5LJIhSMCXX+PBIXCGG4VEu6UQRMYApuvgvJWiIABn1gZecjL0epM3fvTryM4 lV9w== X-Forwarded-Encrypted: i=1; AJvYcCUWSKZ9CwVGLFXA3a2wXmy7R9gVidd0GY2timHNQSXd2sIzJzQ8YCdG/udRFfARovNFUoWwXGr8xIdH0Uw+pJnHaxz8oS0Z2MhEv4VrBR/SwK6KRRM= X-Gm-Message-State: AOJu0YylSF7yyB2GC0FmpPsXF7HMP+O4iiICYV9CtdL0ZZirTx3Z+O0/ tm3qYvz9x0bsUuomrlk1C1eM9DiWTKS8T4tvqyJLwyU5MJNAcpCo6Aa9/dlrk18= X-Google-Smtp-Source: AGHT+IGPqJXCIDxoj6NAZw3IbNqMNkT4Uv70uq1zZQXA3Olp0L8WIOCIUWsqcEistgn+Tb18fIngGA== X-Received: by 2002:adf:e603:0:b0:33e:c03e:62 with SMTP id p3-20020adfe603000000b0033ec03e0062mr236757wrm.40.1713905571224; Tue, 23 Apr 2024 13:52:51 -0700 (PDT) Received: from puffmais.c.googlers.com (8.239.204.35.bc.googleusercontent.com. [35.204.239.8]) by smtp.gmail.com with ESMTPSA id ww4-20020a170907084400b00a51d88e6164sm7443632ejb.203.2024.04.23.13.52.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:52:50 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 23 Apr 2024 21:52:48 +0100 Subject: [PATCH 1/2] arm64: dts: exynos: gs101: add USB & USB-phy nodes MIME-Version: 1.0 Message-Id: <20240423-usb-dts-gs101-v1-1-3421b0371298@linaro.org> References: <20240423-usb-dts-gs101-v1-0-3421b0371298@linaro.org> In-Reply-To: <20240423-usb-dts-gs101-v1-0-3421b0371298@linaro.org> To: Peter Griffin , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar Cc: Tudor Ambarus , Will McVicker , Roy Luo , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_135256_667908_D0C1B5D6 X-CRM114-Status: GOOD ( 10.30 ) 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 Add the USB 3.1 Dual Role Device (DRD) controller and USB-PHY nodes for Google Tensor GS101. The USB 3.1 DRD controller has the following features: * compliant with both USB device 3.1 and USB device 2.0 standards * compliant with USB host 3.1 and USB host 2.0 standards * supports USB device 3.1 and USB device 2.0 interfaces * supports USB host 3.1 and USB host 2.0 interfaces * full-speed (12 Mbps) and high-speed (480 Mbps) modes with USB device 2.0 interface * super-speed (5 Gbps) mode with USB device 3.1 Gen1 interface * super-speed plus (10 Gbps) mode with USB device 3.1 Gen2 interface * single USB port which can be be used for USB 3.1 or USB 2.0 * on-chip USB PHY transceiver * DWC3 compatible * supports up to 16 bi-directional endpoints * compliant with xHCI 1.1 specification Signed-off-by: AndrĂ© Draszik --- arch/arm64/boot/dts/exynos/google/gs101.dtsi | 41 ++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101.dtsi b/arch/arm64/boot/dts/exynos/google/gs101.dtsi index eddb6b326fde..b4e48ab890a6 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -1247,6 +1247,47 @@ spi_13: spi@10d60000 { }; }; + usbdrd31_phy: phy@11100000 { + compatible = "google,gs101-usb31drd-phy"; + reg = <0x11100000 0x0100>, + <0x110f0000 0x0800>, + <0x110e0000 0x2800>; + reg-names = "phy", "pcs", "pma"; + clocks = <&cmu_hsi0 CLK_GOUT_HSI0_USB31DRD_ACLK_PHYCTRL>, + <&cmu_hsi0 CLK_GOUT_HSI0_USB31DRD_I_USB20_PHY_REFCLK_26>, + <&cmu_hsi0 CLK_GOUT_HSI0_UASC_HSI0_CTRL_ACLK>, + <&cmu_hsi0 CLK_GOUT_HSI0_UASC_HSI0_CTRL_PCLK>, + <&cmu_hsi0 CLK_GOUT_HSI0_USB31DRD_I_USBDPPHY_SCL_APB_PCLK>; + clock-names = "phy", "ref", "ctrl_aclk", "ctrl_pclk", "scl_pclk"; + samsung,pmu-syscon = <&pmu_system_controller>; + #phy-cells = <1>; + status = "disabled"; + }; + + usbdrd31: usb@11110000 { + compatible = "google,gs101-dwusb3"; + clocks = <&cmu_hsi0 CLK_GOUT_HSI0_USB31DRD_BUS_CLK_EARLY>, + <&cmu_hsi0 CLK_GOUT_HSI0_USB31DRD_I_USB31DRD_SUSPEND_CLK_26>, + <&cmu_hsi0 CLK_GOUT_HSI0_UASC_HSI0_LINK_ACLK>, + <&cmu_hsi0 CLK_GOUT_HSI0_UASC_HSI0_LINK_PCLK>; + clock-names = "bus_early", "susp_clk", "link_aclk", "link_pclk"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x11110000 0x10000>; + status = "disabled"; + + usbdrd31_dwc3: usb@0 { + compatible = "snps,dwc3"; + clocks = <&cmu_hsi0 CLK_GOUT_HSI0_USB31DRD_I_USB31DRD_REF_CLK_40>; + clock-names = "ref"; + reg = <0x0 0x10000>; + interrupts = ; + phys = <&usbdrd31_phy 0>, <&usbdrd31_phy 1>; + phy-names = "usb2-phy", "usb3-phy"; + status = "disabled"; + }; + }; + pinctrl_hsi1: pinctrl@11840000 { compatible = "google,gs101-pinctrl"; reg = <0x11840000 0x00001000>; From patchwork Tue Apr 23 20:52:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Draszik?= X-Patchwork-Id: 13640720 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 6BE48C4345F for ; Tue, 23 Apr 2024 20:53:36 +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:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=b+xYLnUYwDBVvBYGrcEZi85iU3M+2UhkaaRS9m8ccOs=; b=LnMHmO6Wj6Us3Q bAnoCBTjd/4nr+SckS8CzcyKpQ0gqFi+CZHWYJyliRDCXHS6y7fwzuYLaqCXMYvqPMwquv735DYO4 ZyhzbOd8XV1/Cacd/ErqynCXjvcUq5+glCtaaG0e6TxzxN1mTFE/n2g5AO54IJU8incMZGcgqmAD4 kM9KSLQBZGNNN7VwItwqivC/nH5S1lRPCmG5rNqxhS4LsOIwONLddCO+C5N58RiMi6mxrI9/q+I/d 3i5eYKNUGB5f8Nu8xWy/ZceLNcmXJ7pGpxyL83S+871V1B4SAXqK3Ib17JTkcyZScg/vUA2HKgLM1 ySmLk+PMVe4K1jlwq8/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzN8n-00000001Ual-1iyJ; Tue, 23 Apr 2024 20:53:26 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzN8H-00000001UKB-0cEQ for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 20:52:54 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41ac4cd7a1cso7795845e9.1 for ; Tue, 23 Apr 2024 13:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713905572; x=1714510372; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=qBOMQvlwyQAQ+Abc2xhhW1DcJnrKUYVw/PPBC3M05Co=; b=JVfU8uWbDR52mhP4cUKSnVHivfKm+6T4ouLx9qb9dJrC+SeOKKJIf+PJbCsOZT2CP0 2QmdcGR62Wv1LmHtmOgVG0ZwLOa7/iDecCLZRbmQsXxxtMVwkVWam/SN+AHLxzql5iC8 ohrTLGp1C2af/ushDvo4ObGcPkUurXOf1wyxNUlfBk7hdMCz+FaZOnP8+Xm5S8M12Pxi +p3sS7VbwofxkwEp8KFKgwU8Yf62bAq7vExvsLNFMPeghNl6UFEWAINip5tgSiKfOAmE hmxS43br9p+lorFtxI0ed2GcpF5Wr5EbwTBbn9cdqFxZcePlT4DAFOd4AfIjiqnQjpYW Pe/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713905572; x=1714510372; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qBOMQvlwyQAQ+Abc2xhhW1DcJnrKUYVw/PPBC3M05Co=; b=GdK6Lt/fza4y7H1kL9jwLYQ8D4oBbNyqQ3YzvT7UjFasogAGuaxucUvXULyvtut/3S wHMLcx6Fn200J4+qJGxZeI0uSD+R/DYf7AGbNXPxBM8sjGmhpUWEtEkJXbxn+nXMyNuX LOsc6J7+oFX449qUuC2kemtTOcRGSl58IPEQTlj/GXMDeqt7M+qoVxz0LBsgiW7bhnbn gwn2SHd2NESJEKqG13ZXPlullMSjq68j0dX20kYCQ1WhBN144a8mfeYoVlDKZ3x50Tkk J9XDGNW96sSrG+zj3pCYABJnrEWE4NuPk0/bR5orvFSIQhBajQ4kXZ6IgRrpSmblEV7U 8fDQ== X-Forwarded-Encrypted: i=1; AJvYcCWkRcBD3Mq5fc7GU2iO60ffxyclf6ryDbGroySnedjPZpmD2jjnWbLmoICMp7V9bqZlmxKzFJMPg1rr44uIV8yLaErLQMuzkYHN+Fp23gVVOcP8Q0w= X-Gm-Message-State: AOJu0YwkUf6mtzeZYeO/wGGZoosFL7AQe9HRA0WBqJOuYnJq9Ah/+OuD fECHSAzZJQVVG6cE9cmC6yQHqvl2lLHkNZjJ1CsGVpRNrdzpuM66BV68b0+K8gI= X-Google-Smtp-Source: AGHT+IG9DgCjmKcQA9J2q7MrzxwwWtFfg6SaXIWhfP3iX6GYqmoGdroKdUSDaXrKbhvSY/tA+wyliw== X-Received: by 2002:a5d:5610:0:b0:343:b252:2222 with SMTP id l16-20020a5d5610000000b00343b2522222mr272098wrv.6.1713905571616; Tue, 23 Apr 2024 13:52:51 -0700 (PDT) Received: from puffmais.c.googlers.com (8.239.204.35.bc.googleusercontent.com. [35.204.239.8]) by smtp.gmail.com with ESMTPSA id ww4-20020a170907084400b00a51d88e6164sm7443632ejb.203.2024.04.23.13.52.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 13:52:51 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Tue, 23 Apr 2024 21:52:49 +0100 Subject: [PATCH 2/2] arm64: dts: exynos: gs101-oriole: enable USB on this board MIME-Version: 1.0 Message-Id: <20240423-usb-dts-gs101-v1-2-3421b0371298@linaro.org> References: <20240423-usb-dts-gs101-v1-0-3421b0371298@linaro.org> In-Reply-To: <20240423-usb-dts-gs101-v1-0-3421b0371298@linaro.org> To: Peter Griffin , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alim Akhtar Cc: Tudor Ambarus , Will McVicker , Roy Luo , kernel-team@android.com, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Draszik?= X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_135253_244643_704E8F7D X-CRM114-Status: GOOD ( 12.84 ) 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 Pixel 6 (Oriole) has a USB-C connector that can act as host or device. The USB role is detected dynamically using a MAX77759 TCPCI controller, but since there is no driver for the MAX77759, the role is defaulted to peripheral, without any endpoints / ports. This allows Oriole to be configured as a gadget, e.g. using configfs. As PMIC regulators are not implemented yet, we rely on USB LDOs being enabled enabled by the bootloader. A placeholder regulator is used for now. Signed-off-by: AndrĂ© Draszik --- arch/arm64/boot/dts/exynos/google/gs101-oriole.dts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts index 6be15e990b65..03b2a6fdfdc4 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts +++ b/arch/arm64/boot/dts/exynos/google/gs101-oriole.dts @@ -53,6 +53,12 @@ button-power { wakeup-source; }; }; + + /* TODO: Remove this once PMIC is implemented */ + reg_placeholder: regulator-0 { + compatible = "regulator-fixed"; + regulator-name = "placeholder_reg"; + }; }; &ext_24_5m { @@ -106,6 +112,24 @@ &serial_0 { status = "okay"; }; +&usbdrd31 { + status = "okay"; + vdd10-supply = <®_placeholder>; + vdd33-supply = <®_placeholder>; +}; + +&usbdrd31_dwc3 { + dr_mode = "otg"; + usb-role-switch; + role-switch-default-mode = "peripheral"; + maximum-speed = "super-speed-plus"; + status = "okay"; +}; + +&usbdrd31_phy { + status = "okay"; +}; + &usi_uart { samsung,clkreq-on; /* needed for UART mode */ status = "okay";