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";