From patchwork Mon Jul 6 14:03:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1443 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 23B6A3F0D3 for ; Mon, 6 Jul 2020 16:03:51 +0200 (CEST) Received: by mail-io1-f69.google.com with SMTP id x2sf23632759iof.0 for ; Mon, 06 Jul 2020 07:03:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594044229; cv=pass; d=google.com; s=arc-20160816; b=JDq+It2Kdn8wytp+b7YQOomyo/b4govaPJBW55dmJ1aPsiXy5vvyESVrkFzPthtG1C 0/+naBssDbvA5lVCMGuNgY0UP6XHuCcuKKU+a9w+UrqZ/Y4ga1jWDnQoKBgtXFVilpv3 oiAJULlxsxBV9A79A2cWQ00eJenSCaTC3DWqMcZ8xSS4371tL2emb8xbH5I02T73F17e OZ7Xw3N7SifvkyT2l7jrJlb/IhHQrh+lGasO3JVHtfDlqqc+5cbhKVHOWeAa7AeaSGxa uZYAgaTElHYZn24qM3qhJ73F39tq5n9mfThWEsGKjf8s6cKqpr1EMUD7yovgfT9xXsm3 wqzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=Jl9Mu3o6GqpRinAc5Il5OXlrM3POHZEawFqtOb/arPE=; b=KkZxzE58C3gGbYvMCwQApZ85oBb4JQxfVAzyCQKVf3aFdk1XHv2wNPEJzJGEGqwLKo qwzexfBFy06Q3J9Vlz5sA385+hTo4hX56b9jV7ickaqOvAT6J/5jQ4C4WovmjdKYX50x CLQ9nxrSiUZBIwvsq2+7MmPabXeiD97Qj0emF69AKJd9ciCd7GU5ZELy3pemvwygC0p/ PvWlrCHgY5OKizh0KbX3ZOdn7R5xgE404dNWmFvRBBHfvAgOtKfZjWATndJjXltRONb8 b34kA1BIIsFKH6VjmJcyILhwzjs/CizvhhNoS3lBGM+dO/zlA5lslxwVG/sn4xuTE1NH OAbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A4xxIxzt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Jl9Mu3o6GqpRinAc5Il5OXlrM3POHZEawFqtOb/arPE=; b=j1LZpNKmCV0bdPUZlgpcSvZzht206xlhPHoA804BqeukO3Y/ZI3G81s6fvfZT8hCX7 fc7S4hR17LGpBk3lxWLmJioCkipA5xObCuFER7ELQNaeZyHH+eckX7TSo6Rman+a2zyk Vlo/2KK60l5AJuoVSFxPuA0GPexlcSM78Hl9U= 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:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=Jl9Mu3o6GqpRinAc5Il5OXlrM3POHZEawFqtOb/arPE=; b=ptPmS3JzJhDorcyMb/VeaA1r6fPg5kQzJU+Ppp355zcaJTNBVa8eFZwbxyafZxhqwP HuFykhcZguiRFiVAtFlwj2RFmdx2XhH2g4fo2v418wm3iAOCioXRQJzTk7ERFUkkErBX XUEMASackElpZAObLxwBlMGI7++xT/AupeQqhJ3H0sAOBHBPEL86Yl9o69oHnnaPq1DX AEfjN0BodDbNKW04SfNeYc8Ex4jO3qapFPNkmoT2dFKK7Ys0gnFffm5oWLEwzAOygq/f 9TLvJ0tsRJ6sK8V089yt3XJ/Q6K/J/ixeQLMXNmZVZ1AzrdYhLE0Okak+oKNZsBN0WPC Yv+Q== X-Gm-Message-State: AOAM532CfzPdb9X06Rbfacy0rdFMf4otn1RVNVv3ENyaQ9gJBB3Jruxo 1ilcK4fUlo5J+ZNARfDW4XG7Lnmk X-Google-Smtp-Source: ABdhPJz9kVU9Ailc5eak0wK74CJG+kc/Hnagy2C/PGPfZpP2xpJqbKt6P4fvcPFCsCvDgkV1c1kn4Q== X-Received: by 2002:a92:c5cf:: with SMTP id s15mr28353420ilt.36.1594044229261; Mon, 06 Jul 2020 07:03:49 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6638:d0a:: with SMTP id q10ls2330246jaj.5.gmail; Mon, 06 Jul 2020 07:03:49 -0700 (PDT) X-Received: by 2002:a05:6638:1187:: with SMTP id f7mr54083299jas.58.1594044228894; Mon, 06 Jul 2020 07:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594044228; cv=none; d=google.com; s=arc-20160816; b=WtGDRvckVFDOVdCdrQaVv7myXL6c6FFZ4bCa8X0wNXNzgdjyQkKxeqHuj8Fs1wIOvy xH9N6Fv6tvxOGoST6DgrhwAJh1kRhk/G3ptMP3IXJqGcDi0Whf+tMu8pWp+c4SxpU+5E +Je2x1NQdJAo23/Sz/jAOSHV2rfgVms0F42caG37kjgDL59LXrKJviIubyn51W+/uEe3 od9hMlCtXkrbCJ0zs7FJ8zhiRIOVuDvxDxrrj9COaNaiEjwg8dTmmZ/Ll+meFATMbXr9 zG8Tjce+ry+NrxnFlkNuIqw+2J5dnmsDo19wriuMCIxQg3BvAXgvXZdPsn6ky7Tc3nib syDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=Wz9huT62m24Wml4R2qFVyvJo1NtG4D+i2oDa9K6fLVY=; b=BhyBe5V/9GKgqCDeBIBvaUuZAfdF6JoheG76gEEN+BK6bTcjnLAQcRIoWrPjME1haU JA1ycpfs3hM8es+BDk+YWZrfNKI2B2FMFnqu7cTqVLBDIfGw7E0wHtnrfjyQdOWmjksP P/jXyZNfHugESCJeXvEi7/3MVnq0PEptPjoo/gDr3nkLYXXqNjUOJ1dv/59pnnZBVbpT BgNXkAre6ptp4/SICKNgLCYQFa3c5SeE+XQwXE3WJHMzqzGkkFnAaZHDaWz8v3PjQU8/ bY/NId9yJ/4gsAr6Pfdgag21HXI9kRDbPseU89ewdxIAwi4m8OKsTlmj8+mt8ur1rWQi j8fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A4xxIxzt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id q15sor20876982iod.58.2020.07.06.07.03.48 for (Google Transport Security); Mon, 06 Jul 2020 07:03:48 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:90b:4c0b:: with SMTP id na11mr51934158pjb.176.1594044227706; Mon, 06 Jul 2020 07:03:47 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:417d:ce28:d901:cf6e]) by smtp.gmail.com with ESMTPSA id y198sm17014568pfg.116.2020.07.06.07.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 07:03:46 -0700 (PDT) From: Jagan Teki To: Suniel Mahesh Cc: Michael Nazzareno Trimarchi , linux-amarula , Jagan Teki Subject: [PATCH] ARM: dts: rockchip: Add WiFi/BT for RockPI N8/N10 Date: Mon, 6 Jul 2020 19:33:36 +0530 Message-Id: <20200706140336.45031-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A4xxIxzt; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This patch adds support to enable WiFi/BT for N10 and N8 combinations SBCs. Signed-off-by: Jagan Teki --- arch/arm/boot/dts/rk3288-vmarc-som.dtsi | 44 +++++++++++++++++++ .../dts/rockchip-radxa-dalang-carrier.dtsi | 40 +++++++++++++++++ .../dts/rockchip/rk3399pro-vmarc-som.dtsi | 39 ++++++++++++++++ 3 files changed, 123 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-vmarc-som.dtsi b/arch/arm/boot/dts/rk3288-vmarc-som.dtsi index dca426c978de..6d8958e893ab 100644 --- a/arch/arm/boot/dts/rk3288-vmarc-som.dtsi +++ b/arch/arm/boot/dts/rk3288-vmarc-som.dtsi @@ -20,6 +20,17 @@ vccio_flash: vccio-flash-regulator { }; }; +&brcmbt { + device-wakeup-gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; /* BT_WAKE */ + host-wakeup-gpios = <&gpio4 RK_PD7 GPIO_ACTIVE_HIGH>; /* BT_HOST_WAKE */ + shutdown-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>; /* BT_RST */ +}; + +&brcmwifi { + interrupt-parent = <&gpio4>; + interrupts = ; +}; + &emmc { bus-width = <8>; cap-mmc-highspeed; @@ -43,6 +54,11 @@ &hdmi { pinctrl-0 = <&hdmi_cec_c0>; }; +&hym8563 { + interrupt-parent = <&gpio5>; + interrupts = ; +}; + &i2c0 { clock-frequency = <400000>; status = "okay"; @@ -240,6 +256,20 @@ &io_domains { }; &pinctrl { + bt { + bt_wake: bt-wake { + rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_host_wake: bt-host-wake { + rockchip,pins = <4 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_rst: bt-rst { + rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { drive-strength = <8>; }; @@ -284,6 +314,20 @@ usb0_en_oc: usb0-en-oc { rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>; }; }; + + wifi { + wifi_reg_on: wifi-reg-on { + rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + wifi_host_wake: wifi-host-wake { + rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdio_pwrseq { + reset-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_LOW>; /* WIFI_REG_ON */ }; &usbphy { diff --git a/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi b/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi index 679d5e99e563..419cebf3b67c 100644 --- a/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi +++ b/arch/arm/boot/dts/rockchip-radxa-dalang-carrier.dtsi @@ -15,6 +15,14 @@ clkin_gmac: external-gmac-clock { #clock-cells = <0>; }; + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&hym8563>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_reg_on>; + }; + vcc12v_dcin: vcc12v-dcin-regulator { compatible = "regulator-fixed"; regulator-name = "vcc12v_dcin"; @@ -114,6 +122,30 @@ &pwm2 { status = "okay"; }; +&sdio0 { + #address-cells = <1>; + #size-cells = <0>; + bus-width = <4>; + clock-frequency = <50000000>; + cap-sdio-irq; + cap-sd-highspeed; + keep-power-in-suspend; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + pinctrl-names = "default"; + pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>; + sd-uhs-sdr104; + status = "okay"; + + brcmwifi: wifi@1 { + compatible = "brcm,bcm4329-fmac"; + reg = <1>; + interrupt-names = "host-wake"; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_host_wake>; + }; +}; + &sdmmc { bus-width = <4>; cap-mmc-highspeed; @@ -129,6 +161,14 @@ &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_xfer &uart0_cts>; status = "okay"; + + brcmbt: bluetooth { + compatible = "brcm,bcm43438-bt"; + clocks = <&hym8563>; + clock-names = "ext_clock"; + pinctrl-names = "default"; + pinctrl-0 = <&bt_wake &bt_host_wake &bt_rst>; + }; }; &uart2 { diff --git a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi index e9a0dfacf33b..be67ba04469a 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi @@ -28,6 +28,17 @@ vcc3v3_pcie: vcc-pcie-regulator { }; }; +&brcmbt { + device-wakeup-gpios = <&gpio2 RK_PD2 GPIO_ACTIVE_HIGH>; /* BT_WAKE */ + host-wakeup-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; /* BT_HOST_WAKE */ + shutdown-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>; /* BT_RST */ +}; + +&brcmwifi { + interrupt-parent = <&gpio0>; + interrupts = ; +}; + &cpu_l0 { cpu-supply = <&vdd_cpu_l>; }; @@ -313,6 +324,20 @@ &pcie0 { }; &pinctrl { + bt { + bt_wake: bt-wake { + rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_host_wake: bt-host-wake { + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + bt_rst: bt-rst { + rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; + hym8563 { hym8563_int: hym8563-int { rockchip,pins = <4 RK_PD6 0 &pcfg_pull_up>; @@ -342,6 +367,16 @@ usb0_en_oc: usb0-en-oc { rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>; }; }; + + wifi { + wifi_reg_on: wifi-reg-on { + rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + + wifi_host_wake: wifi-host-wake { + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; }; &pmu_io_domains { @@ -357,6 +392,10 @@ &sdhci { status = "okay"; }; +&sdio_pwrseq { + reset-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_LOW>; /* WIFI_REG_ON */ +}; + &sdmmc { cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; max-frequency = <150000000>;