From patchwork Fri Feb 15 04:56:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 158472 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp281940jaa; Thu, 14 Feb 2019 20:57:05 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia1QrbUVUoJDUcPjlM04FkuNGj5uR4iTagClZ1pXmU11VfwSRnsNi1aVX8U0f15o8z8nh2u X-Received: by 2002:a63:c34e:: with SMTP id e14mr3334936pgd.231.1550206625148; Thu, 14 Feb 2019 20:57:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550206625; cv=none; d=google.com; s=arc-20160816; b=VgbPxFJnruCu+8S6gXSf+lrNDVRVZg7oNnNjyaes3JOkO5VMjTdjS5ZA9NtEY2li0y 6tQDm2bwxbCkLuqxsKGIRBssbm5VEJpYetgR/joF5SIprXk7SaKrbPkNDNZKwP5qHT5h Ye37s+9RMoeVY3Rv6ibHK5YtNVnkdce32fdlS0/oGSjhZXHPaRQEzZ6cT79p5l4rKuIr SeA/9aHuCHmJvQEtlwhB/lgT/6CJemliofQg2h6EPeo/HQhSb6623JCGs7A4SPYnNmSI f/Pu6PNvNxruo2ORhuLrI0zrg3qflgVo6jnqP6sg6PE0KkAwfey4d20F9OeIwAwQBWg+ UpjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=kSA1TWJhCcW942nec5H5KUTcw9lD/Qj1J6bxw+KVpGs=; b=kKqQec6PdNWrcSZFq2ZGIlVZN0D85plhiw5uqExo4ro3G0FeFMRpO5wahG58JocoXg iKGKeoXpY5G1rcj0rRRFgQzQ7d9UKTEvKccUlRewmac/qwSIgBwjAzEwOI/VJbXVpZs3 8VpnS3sI+kPHT8Hdo5ONRs+dfS8zdhycaA09YIKPH3t6HUVEFuP4qVKdHgO5mkkStoSo FTNji3LnbrL4+O0Bq1y4fW9F6ImwPiH9bAgRtFv4B0me2zYvHHTk9fMA0h+8qYL26kWp LEJIJWKbaTDXY94vke2Q15n0Mqw6jcM3TbZxH5qFFoNGLx4LE4CPXCrWiluDd9guVo4n UZRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IKeEb0j6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b79si4517656pfe.273.2019.02.14.20.57.04; Thu, 14 Feb 2019 20:57:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IKeEb0j6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731526AbfBOE5D (ORCPT + 31 others); Thu, 14 Feb 2019 23:57:03 -0500 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35259 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfBOE5C (ORCPT ); Thu, 14 Feb 2019 23:57:02 -0500 Received: by mail-pf1-f194.google.com with SMTP id z15so4255645pfa.2 for ; Thu, 14 Feb 2019 20:57:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=kSA1TWJhCcW942nec5H5KUTcw9lD/Qj1J6bxw+KVpGs=; b=IKeEb0j6DAR83CuSjVdt+YyIhrkgUdVyBUvbEEJELqkUf4I5O2LdHtKSQF3GXDVXr8 p+lBX83Z8AvVqicqN6dgQpD90KQr6K48FvDCOEOuqkW+KYy9yRqDXj7PC2yKwQ7bsSJA kf6eR03uJ2NwVMbFYaGO08gzKuLMJ5dOQwZcfRP8oxrJWlps6mpeosxAbOA0+Mksm341 HpsUizT8a2SB9VvjXR6BMuDHyDh5i8VRHiVbIffyNCG7PIQ0ojP8GrEw23oylLkbfTSo n+f0ZEXu3X7tk8LvrL+bY22Ljry9OscxM/fZtUz5oaYUs9KlH+y5fir2gCmRAhtcTi5C koJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kSA1TWJhCcW942nec5H5KUTcw9lD/Qj1J6bxw+KVpGs=; b=UgRRrkFAFiz3W0RrUNX6LdWgfyUPTgO0f/y1dexPqf1rEUuE7KsKlJDtfX8p5POVlu p199JCyLwWPf+PL7sXubVVNX6zL9zjaKXpjPwyO/8QmYMTKO5JQy8AZnT9Rn/sC/wT1P 58RVpjcDLVcPAc1rFw/Xu8+FwnXOYJqmL+fEqLgo2rt689qpcARsTs0ZzONjcrdKP+jt MA6QOIdfi6vMibpKJpmyRdP7JUOpAqX+wTusFoeHOlkz83xKqkRpLTdtyarel4fBF60R oXm1GX5vV2OxI4XbCmLcH1a679Hx3vrG+R6mqasF8NESTA6r+mVKzIqLZ11yPCTIfFUv 0+TQ== X-Gm-Message-State: AHQUAuaEAq/4dPIxOsePdvGOCLwZ+uqnsxb5SyJYncEwcRkLX9eu5i9b eTxc7wcMOMEuMKacINOagfiH X-Received: by 2002:a63:6ac5:: with SMTP id f188mr3592785pgc.165.1550206621218; Thu, 14 Feb 2019 20:57:01 -0800 (PST) Received: from localhost.localdomain ([2409:4072:98a:c91:14c4:f458:9909:7fad]) by smtp.gmail.com with ESMTPSA id y12sm9021267pgh.38.2019.02.14.20.56.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 20:57:00 -0800 (PST) From: Manivannan Sadhasivam To: heiko@sntech.de Cc: linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, ezequiel@collabora.com, tom@vamrs.com, dev@vamrs.com, linux-kernel@vger.kernel.org, mani@kernel.org, pbrobinson@gmail.com, Manivannan Sadhasivam Subject: [PATCH v2] arm64: dts: rockchip: Add on-board WiFi/BT support for Rock960 boards Date: Fri, 15 Feb 2019 10:26:48 +0530 Message-Id: <20190215045648.26380-1-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add on-board WiFi/BT support for Rock960 boards such as Rock960 based on AP6356S and Ficus based on AP6354 wireless modules. Firmwares for the respective boards are available here: http://people.linaro.org/~manivannan.sadhasivam/rock960_wifi/ http://people.linaro.org/~manivannan.sadhasivam/ficus_wifi/ Signed-off-by: Manivannan Sadhasivam --- Changes in v2: * Added address and size cells property to sdio0 node .../boot/dts/rockchip/rk3399-rock960.dtsi | 98 ++++++++++++++++++- 1 file changed, 97 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi index 56abbb08c133..d33cd441dee9 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-rock960.dtsi @@ -9,6 +9,15 @@ #include "rk3399-opp.dtsi" / { + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>; + }; + vcc1v8_s0: vcc1v8-s0 { compatible = "regulator-fixed"; regulator-name = "vcc1v8_s0"; @@ -362,6 +371,20 @@ }; &pinctrl { + bt { + bt_enable_h: bt-enable-h { + rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_host_wake_l: bt-host-wake-l { + rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_wake_l: bt-wake-l { + rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + sdmmc { sdmmc_bus1: sdmmc-bus1 { rockchip,pins = @@ -387,6 +410,26 @@ }; }; + sdio0 { + sdio0_bus4: sdio0-bus4 { + rockchip,pins = + <2 20 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 21 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 22 RK_FUNC_1 &pcfg_pull_up_20ma>, + <2 23 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_cmd: sdio0-cmd { + rockchip,pins = + <2 24 RK_FUNC_1 &pcfg_pull_up_20ma>; + }; + + sdio0_clk: sdio0-clk { + rockchip,pins = + <2 25 RK_FUNC_1 &pcfg_pull_none_20ma>; + }; + }; + pmic { pmic_int_l: pmic-int-l { rockchip,pins = @@ -403,6 +446,19 @@ <1 14 RK_FUNC_GPIO &pcfg_pull_down>; }; }; + + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = + <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + + wifi { + wifi_host_wake_l: wifi-host-wake-l { + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pwm2 { @@ -413,6 +469,35 @@ status = "okay"; }; +&sdio0 { + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <50000000>; + bus-width = <4>; + cap-sdio-irq; + cap-sd-highspeed; + no-emmc; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + num-slots = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + + status = "okay"; + + brcmf: wifi@1 { + compatible = "brcm,bcm4329-fmac"; + reg = <1>; + interrupt-parent = <&gpio0>; + interrupts = ; + interrupt-names = "host-wake"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_host_wake_l>; + }; +}; + &sdhci { bus-width = <8>; mmc-hs400-1_8v; @@ -439,8 +524,19 @@ &uart0 { pinctrl-names = "default"; - pinctrl-0 = <&uart0_xfer &uart0_cts>; + pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>; status = "okay"; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + clocks = <&rk808 1>; + clock-names = "ext_clock"; + device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>; + pinctrl-names = "default"; + pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>; + }; }; &uart2 {