From patchwork Mon Apr 29 10:35: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: 13646593 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 164A7C25B10 for ; Mon, 29 Apr 2024 10:36:21 +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=qU2HxUDY250PzaRginh13akI1pziySkOTDcStMeiXmA=; b=0tnJPp4o7xk/le 1r95nXjizr2TkVcDiAXyT5uB5Wm3WHb1pML1YbznmQTch34Yas9G1WRtZPFsS7b1OtFHCTsZUJplg wPcIjZmWuAGW+gW21OwZWMAYf83empQTwBbf8+2G9e3mram1CLFwQhMmOXyoQVOAHYx9M+rqfFnES ++vw/fJZ9S6WcoOs7MD1dhWGIIvfD2fPUeFF3BbdHeKr/h8R1rfLyjmiMLaE0IrhHgqf4B7BGFooC EUyQxEpSK0DijD0MYhYl1XsYnbaEDZ1G6j8NBxLG1YQ+bPcOTf7sWI9Lx+GYtJ37k9JfOyB5miRLk YfeiRPked2pt5H0Jz2NQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1OMg-00000002IP2-1ZE2; Mon, 29 Apr 2024 10:36:06 +0000 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1OMY-00000002IKo-34l4 for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 10:36:02 +0000 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a58e7628aeaso213078966b.2 for ; Mon, 29 Apr 2024 03:35:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714386951; x=1714991751; 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=1P++aQSPc6pWnY3non1DpBZNviMvxG8QQjODyNDwQzI=; b=oDlrZEXFD1sqyjBb61a+cs9eYyWfuJ6vJB6OM+5NWtpCM6qRVUXFJ/k2g4AqtOsRSg Brmvy7U73/1vVPKMG0kGVZoYuq6NIpwlEZyh58ei0O0vPArUpFAZnxRYdfbeWh8tKgPU +r8n5Jd3QO5vTS/FDD8GiIY9v3r6FMG8v10l10cTxfyZKSiKTPKh8gn0s93zVe+FkqQr 2ibgEcUJlE6y/nh5M5PeInamsgudGO2YHihTOzXv3UtAce1xbjlgayTce23oIxLSWcUB G89NL3+G+kC+qDbSiYv+6hr511iQvsVWoHeyJLDnHPhyD4nM7X7rBxmeX13oBXQ8MMG4 +9uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714386951; x=1714991751; 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=1P++aQSPc6pWnY3non1DpBZNviMvxG8QQjODyNDwQzI=; b=dMumVlALibDWsqvA+t74sFQFqDU+33brOe/sbBDkZkeRODkOTxYuqLCodeUUgv1VDl WoPjFlpu4NtW07h0MT6UYQuqlTVysFe7gUDJLeepHsXGsjHpnurDPlWxIWLHdEyb45CC wPodlPyhp2DRa+S2oPJ1Dkvzi1h21KvtPASCnBhTOgzfL+7NrmJnyogPSNEDrIUfwF9a FJPnMM6uAcm0aN0VleXAXhh46HGjGdroOP22QbxkX0QVNvCQFmGy8gJAQdLXbb4C39u0 fch83T/VNrldUHygwQDPBWL+HSe7WrGj5Pin+wUkaOtnqFo+UydZJSz8JA6BcnQWbNWv x5Cw== X-Forwarded-Encrypted: i=1; AJvYcCVuZFwzxZE6fwYsqg2TbPtP/QKSEha5Sz/B1TDz+M81zYVQEBFoJuHo+RrPl5Ntjp9xhY69LUu9xj4Llemc9J8ePScgzNMu/irA6Nftd/ma81ILkdE= X-Gm-Message-State: AOJu0Yx37SQo7ZbFwO6zXG+8var02KQeepkJPmym2hWfGfJ5Nolw/Mds JfQXde5wFcHHQNJHDqdnUCJ55V9RxSrTMw14K4pDA0O9BVS5GLHVvw4I1+7JcWs= X-Google-Smtp-Source: AGHT+IG2LaIhBRpKrhiNyxNfVcTeKVZT84nL2xVtGWqcgk4hja1Hk5xHRR/xQujTgEuZrNki/5RqzQ== X-Received: by 2002:a17:906:5fd3:b0:a58:e8c7:c0b8 with SMTP id k19-20020a1709065fd300b00a58e8c7c0b8mr4308756ejv.7.1714386951704; Mon, 29 Apr 2024 03:35: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 a7-20020a170906670700b00a522bef9f06sm13717707ejp.181.2024.04.29.03.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 03:35:51 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Mon, 29 Apr 2024 11:35:49 +0100 Subject: [PATCH v2 1/2] arm64: dts: exynos: gs101: add USB & USB-phy nodes MIME-Version: 1.0 Message-Id: <20240429-usb-dts-gs101-v2-1-7c1797c9db80@linaro.org> References: <20240429-usb-dts-gs101-v2-0-7c1797c9db80@linaro.org> In-Reply-To: <20240429-usb-dts-gs101-v2-0-7c1797c9db80@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-20240429_033558_805139_E6A98D25 X-CRM114-Status: GOOD ( 10.66 ) 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 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 --- v2: fix commit message --- 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 9755a0bb70a1..217699477b32 100644 --- a/arch/arm64/boot/dts/exynos/google/gs101.dtsi +++ b/arch/arm64/boot/dts/exynos/google/gs101.dtsi @@ -1261,6 +1261,47 @@ cmu_hsi0: clock-controller@11000000 { "usbdpdbg"; }; + 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 Mon Apr 29 10:35:50 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: 13646594 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 EA6EEC4345F for ; Mon, 29 Apr 2024 10:36:42 +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=pAIORjSeORZvv7N5iujKWXMX+tj82AB3bcq2cZF9F78=; b=dn1f3yibtpkqgW Rj/8kIKFrslxGH2mvKyh9cEslJ87zc+tuVnjtjZe4qYOcAB2RSTZQcRnQ4SbSxhm+Vq4tOeAK5Sgf b64lOZI/IsSwGQ43KSe75fnkjB7nlW5ypGiojirX1S0kvHQJ9ZS1GNB8HDNJorSh5c9dp9UCs7MBm JUP10azub1ytub1AF9MnLYAfydO5iStoO7GbN0Un5umaNqNpjAYcKFV9UJxbj1ESPAfL1dmrTRl8z uF/Tbj2adEq3R+AfCCEH/LPjmj8hULXXwElCJjymoIW8/UTmKK5Te3Y0ubKWiV4/xSuHKZFkv/Q7v fA90M+69MLFvEx31yItg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1ON3-00000002Ibr-0zbt; Mon, 29 Apr 2024 10:36:29 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s1OMg-00000002IKp-2ZpJ for linux-arm-kernel@lists.infradead.org; Mon, 29 Apr 2024 10:36:08 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a51a7d4466bso471516566b.2 for ; Mon, 29 Apr 2024 03:35:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714386952; x=1714991752; 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=BotRiJuMknWO6A5uoPFQl9tYeRWBO9rg60FRsrEoXKY=; b=zCRiJA7F3aB8RQqLXaPOpdbHR5mIEaLmHlKkRtBe+b8bxCcVytVLU4IB5F7Fp/V3FE Bn/hlRM8+jrgyIu6kRQhdOcUAi3WExCzWGMxrEKIR6BjRII8L9PTjxjcTWM4xVnZDsi6 xjWL6jejeJVCuYZvRmJCs4A6v+RcdOjwBXViSDhcYCctSN2UztEDCBCpjJljm1aInbmy G9QZepgIViIpsl3jFxgx7Ng+AbmFy+RnVhrNj2FRtZxPCeGsVbAh+1J6At6ja0D9X1lf jwroUzsleTemcx8zjEFejXxQRWOm+QGyaCl63IO05Mg0+UtrmDqs5wgwDkwfgegnosXw NLQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714386952; x=1714991752; 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=BotRiJuMknWO6A5uoPFQl9tYeRWBO9rg60FRsrEoXKY=; b=Qzff/LUem7pPJ/RKF5LH1F2ljrcW7zRhphU+94xVg8Ii+n/8y1uzD1yIi1ChcLgEvz rgDlSZ7zIwHjBFTUbrMhjsCL+ek9F8c1BP0krEVH+FKscWIv4SasAgTrEYp07a3JSajk PMf5JtgSuInCXTVa5yhhnkAyNieLb5a/Th0UexpgRZMIwLM0bFN2qUvUb0c9DjICDaYu zucF9UQinWsduOUysa3WiliECFw3VLIcQuaF+uA0azKgvdMZo4Cr75ehZHWCSb6SSvfi QrmItVLNo4Zc0pF5AShGtUfIAomdiALFMDsAVnJYZwGFSGw/DzrJTVYLzD42dGBbxEDF jRtg== X-Forwarded-Encrypted: i=1; AJvYcCXjzcT5yDqHlSv+k6izHSuHreMdx26Amts0dRSz+SFIVoy/94/UFsWioydCI+wddzKJDwtsikFqGOSBdySj00qkmtNnyytRK6RJa/yqvmFbs83tR3Q= X-Gm-Message-State: AOJu0Yw8xNTvDMzQZWXmGfPifbvNi2mH0dOQxY0GfTjoxnoEOP6csnKC PFrMrUiaujdmHawwIYeBoH40fiD9AWHF/FeIvZ9lD0PSF+sZEvJUNKNTNi3VGZ4= X-Google-Smtp-Source: AGHT+IGO+qUZw0HaGip2ru9OKaK2870UwQguaV2epeETrTGCGciSJ5nPdGOqzy/4vS/d1MIGqydbTg== X-Received: by 2002:a17:906:fa1a:b0:a52:1e53:febf with SMTP id lo26-20020a170906fa1a00b00a521e53febfmr5597846ejb.69.1714386952083; Mon, 29 Apr 2024 03:35:52 -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 a7-20020a170906670700b00a522bef9f06sm13717707ejp.181.2024.04.29.03.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 03:35:51 -0700 (PDT) From: =?utf-8?q?Andr=C3=A9_Draszik?= Date: Mon, 29 Apr 2024 11:35:50 +0100 Subject: [PATCH v2 2/2] arm64: dts: exynos: gs101-oriole: enable USB on this board MIME-Version: 1.0 Message-Id: <20240429-usb-dts-gs101-v2-2-7c1797c9db80@linaro.org> References: <20240429-usb-dts-gs101-v2-0-7c1797c9db80@linaro.org> In-Reply-To: <20240429-usb-dts-gs101-v2-0-7c1797c9db80@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-20240429_033606_723464_745A0583 X-CRM114-Status: GOOD ( 12.91 ) 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 by the bootloader. A placeholder regulator is used for now. Signed-off-by: AndrĂ© Draszik --- v2: fix commit message --- 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";