From patchwork Sun Oct 2 09:28:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tom Fitzhenry X-Patchwork-Id: 12996814 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 96288C433FE for ; Sun, 2 Oct 2022 09:29:57 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=QKYDaw/P9oaejcofSpamX/1tdQ44lp+IyrhoE3sXxNE=; b=JLMqHp/T17qwa2 VTJSJbKGGQICx6JUhPwjTcrs8kRVPH15N4ar3mTMqCP4hxtqQcW2WyV4qo68ogGvhp7/fV1CcJNzp 0uqpmhAPFolil62oMala2MlcuOyOzIgalp8D/7IMCGvQmlAt15t/aDc3uslnm/z5RaWwpdXzDx1SQ nrb9i01V7oi4jjPYCxwoNNnHr44AsO0W4mbvLhNojst4kmRbAzqGhhLsmcC/PkZrzrMigUz2GrxNv zO5lXRGd23MkbbORTH3TICOnQIqDnUCO3jvs+Y+S6rUpNNesdLmhdG9TuKXcqv4KT6TsUASX53n1z Zjyh3PcT0izRAa0yZxQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oevH7-000Vhy-Sx; Sun, 02 Oct 2022 09:28:42 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oevH4-000VgI-B7; Sun, 02 Oct 2022 09:28:40 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 5CE2E32008FB; Sun, 2 Oct 2022 05:28:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 02 Oct 2022 05:28:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= tom-fitzhenry.me.uk; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t= 1664702910; x=1664789310; bh=o4YZVV66nFlu/Ivg+JUF8MHi6wK7LZJ8ljN xD8TAngo=; b=Om3/r7JinO6Vdm0SovcvEVyrIeO7eOyiYs5icSZX2fbe2bJLD5F HRMkOyHvvcDMDeoh6N1yjISEejau0w6+HSI5aTUf6XZTk7snAWytpfhbAlvnP8Ti zvoYk1bRNfcS4kXT+0stj5MQbPO77Mh+itoDRWguyRb2m4w6GxGKdknZv+t4e9Wz UyVzGY57v9iMX3uq1afNQXg7ChyI/hbZBvg0AaU+wr9AJTwoMzm721n04R9lsBwD pw2x9eaALxmH595QroH2SaXu8zDRRoDbTOrVktrJW6OtpTbup0n/B/sUv45FeNQE G/kBU1Vk3tMug3Ty3kpFJ9i5xW+5QkSZRNQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1664702910; x=1664789310; bh=o4YZVV66nFlu/ Ivg+JUF8MHi6wK7LZJ8ljNxD8TAngo=; b=enNGwLxAIwmVqkIYRXEUMN3GkDFDa iF61ssUyYJml5oxleHED9YCI8iMRb/5+6yH+DDptE8dyo3wMN6ejwZNhDgVPD/0T 5eut+C7SzbxMfjB1mFuHFve0G6eb8R6D0eXXNXxKapVWlygeSP0I+sAiitVhIFnh dJQByo4Li5v/nuTzQfYeSu50zrJtDg/Nj6nfon2cauQjD+VYI0UBJmeuuc3FuDdL N23zPMS8FQ34o9hxiN2sVbnCvvZhVfJpN0HHs7clDGcTj/Zx57RYx4jKXtiORCxQ fFTbOtvM1qPLExbZibf+p9OXwHt4zLUP5qYdQ2QVXwpQan6hOsGUuJLnQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeehjedgudeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpefvohhmucfh ihhtiihhvghnrhihuceothhomhesthhomhdqfhhithiihhgvnhhrhidrmhgvrdhukheqne cuggftrfgrthhtvghrnheptdfgteduheeljeeiieduveehhffgfeelvedvjefhudetudeh udffleefffeuheeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhomhesthhomhdqfhhithiihhgvnhhrhidrmhgvrdhukh X-ME-Proxy: Feedback-ID: iefc945ae:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 2 Oct 2022 05:28:27 -0400 (EDT) From: Tom Fitzhenry To: Rob Herring , Krzysztof Kozlowski , Heiko Stuebner Cc: Ondrej Jirman , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, Tom Fitzhenry Subject: [PATCH v2] arm64: dts: rockchip: add BT/wifi nodes to Pinephone Pro Date: Sun, 2 Oct 2022 20:28:09 +1100 Message-Id: <20221002092809.451501-1-tom@tom-fitzhenry.me.uk> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221002_022838_868283_F07969C3 X-CRM114-Status: UNSURE ( 8.98 ) X-CRM114-Notice: Please train this message. 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 Pinephone Pro includes a AzureWave AW-CM256SM wifi (sdio0) and bt (uart0) combo module, which is based on Cypress CYP43455 (BCM43455). The CYP43455 datasheet ("Power-Up Sequence and Timing") documents: * needing to wait 10ms between consecutive WL_REG_ON toggles * needing to wait 110ms between power-on and SDIO access. Signed-off-by: Tom Fitzhenry Reviewed-by: Ondřej Jirman --- Changes since v1: * changed wifi power delays according to datasheet * renamed sdio_pwrseq node to wifi_pwrseq * reorder nodes alphabetically --- .../dts/rockchip/rk3399-pinephone-pro.dts | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) base-commit: b985063870727be3e94747b1c929219d04e77665 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index 2e058c315025..04403a76238b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts @@ -81,6 +81,27 @@ vcc1v8_codec: vcc1v8-codec-regulator { regulator-max-microvolt = <1800000>; vin-supply = <&vcc3v3_sys>; }; + + wifi_pwrseq: sdio-wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk818 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h_pin>; + /* + * Wait between power-on and SDIO access for CYP43455 + * POR circuit. + */ + post-power-on-delay-ms = <110>; + /* + * Wait between consecutive toggles for CYP43455 CBUCK + * regulator discharge. + */ + power-off-delay-us = <10000>; + + /* WL_REG_ON on module */ + reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; + }; }; &cpu_l0 { @@ -360,11 +381,45 @@ vsel2_pin: vsel2-pin { }; }; + sdio-pwrseq { + wifi_enable_h_pin: wifi-enable-h-pin { + rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + sound { vcc1v8_codec_en: vcc1v8-codec-en { rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>; }; }; + + wireless-bluetooth { + bt_wake_pin: bt-wake-pin { + rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_host_wake_pin: bt-host-wake-pin { + rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_reset_pin: bt-reset-pin { + rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdio0 { + bus-width = <4>; + cap-sd-highspeed; + cap-sdio-irq; + disable-wp; + keep-power-in-suspend; + mmc-pwrseq = <&wifi_pwrseq>; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + status = "okay"; }; &sdmmc { @@ -393,6 +448,27 @@ &tsadc { status = "okay"; }; +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "brcm,bcm4345c5"; + clocks = <&rk818 1>; + clock-names = "lpo"; + device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; + max-speed = <1500000>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_host_wake_pin &bt_wake_pin &bt_reset_pin>; + shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; + vbat-supply = <&vcc3v3_sys>; + vddio-supply = <&vcc_1v8>; + }; +}; + &uart2 { status = "okay"; };