From patchwork Wed Oct 31 18:36:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10663219 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CE0A13B5 for ; Wed, 31 Oct 2018 19:47:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D1C82ADAA for ; Wed, 31 Oct 2018 19:47:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 606D82B752; Wed, 31 Oct 2018 19:47:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1D65E2ADAA for ; Wed, 31 Oct 2018 19:47:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7n1zWVTGQc2lnLvZ99GVROs+hlqJ/oqhaJ9OdNbXSG8=; b=HhnFKN752YyKgV 5EUanzoxxstw8oj1FdhVGmJn97GPMSmSMvlNGDu0w3OlMy5H+utuaI9FiwyPQwG2itzhbCXGmhJbf e2AaVsleNMYXmD9meN47nEe67NbuT7GN2RK9oTa8E/tYhtHpvPVs4a8NnQz5wYfRLj1WM1tVLh2jg k3hG3h8Yt1Ni46vNi+d7EqxU4dUXgEJVWt2pmWnLoHDLBkI1k3yrVkNMXFrwgCQCo0scGmVrnPhgG 0o54v+Ugiz+B9ldJi0o2SWGKxU0CnjdE/BteJ3ivpmJZLxW8PeSgTBnPBkvH2R234XlIT59I9kdMS pzv9Mdn8M3hgR/Vn0a6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHwSR-00008t-RT; Wed, 31 Oct 2018 19:47:15 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHwS8-0008Je-RR for linux-arm-kernel@bombadil.infradead.org; Wed, 31 Oct 2018 19:46:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=wHPgnCxqq5e0L9jJ6bVuEGeSV4D7Kq7aHeh6/Y3ccbE=; b=C1+VtWLNQeVCVPAMo8DHZwvuXV cGKEG1gIUREV0sLUHFhz+AHyGk8nurR/iAW1gz98ICOG9JR5EpbGzlC8fTAgWzx3ZnxdbntlV2VuN dqL9NgHMsXpKRHWCcmxjW3PqFUgBkUUZ7cKOjJCfV0AiWbOTsdz4uIJiXyUv02paqX8WgqsalCAes cHnP2Jf/1WYT4pFpbWH+GkkBrGpl5bD5Ypom73sFHJybWygVSg8RQjMZ4e+kHkp9oZxObrGTwyztE MO6ssDYk+w1BNQoLkef44lgyrAfDlc33yp1Su5l2vUbovN0VVOEN2kN6N3PcFoMxqaeR4q0YJc/cK I2+gZfZA==; Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHvN6-0006DX-JP for linux-arm-kernel@lists.infradead.org; Wed, 31 Oct 2018 18:37:41 +0000 Received: by mail-pf1-x430.google.com with SMTP id c25-v6so8028607pfe.6 for ; Wed, 31 Oct 2018 11:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wHPgnCxqq5e0L9jJ6bVuEGeSV4D7Kq7aHeh6/Y3ccbE=; b=EMrQreV6Yi1OdKVIn3mcavYfygx+uGfowj7ltEWaFFo/xLaQJwyrIxoH2cJz8YmfWt E12j4obY1c8NgMf2Snm2qrW0onUE3yiHPDjjUzkWuRaAi0r5jhxG7uIpR70XzIdmZSLe NQcs4ugCwBWxdEX1XFairG+vNsiA+cahpX9Mw= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=wHPgnCxqq5e0L9jJ6bVuEGeSV4D7Kq7aHeh6/Y3ccbE=; b=Xe/u5ohe1R9ss6Ams+rph3Ma3pnxgIiZhD0QVGssAnpVHQLJTroU1+mGE8XulJeUyg 2Q8hBdhzsEgQXmpWDZh7qmjUdKh8c4MxRnRgJxulLTuA0vVDUgcJ/Unfh3brbCpP+xNN gRjMAJch7GwMHV7jmXd4QaUR5mgNT2vWBwJxOZOOP94oMYm8GIRddFCIYzJKddKRzI1k Ok9I4uLlkARVgAXX4h9YpOIn7eYHUtx+pPzcQyUZgRQbp07sVdRIFxeRgR1dJfQ4lZhI TpiBO5Gj5sRgSuWsCbINB1rWpqGwX7p7eVD1XSUIYsWaXNU0sjI/RuWqhPNVOmBVNt7s uCOQ== X-Gm-Message-State: AGRZ1gKn7Y1KlFn7zHG+LK2m+9QjAodugLFSQhWaUXUYScfm2M14uhrN UQpTT+uti+YHFPhkP/F75w6rPbOOdM4= X-Google-Smtp-Source: AJdET5dIKqaeL7zBZUtwMgEeuzpgCaemCrL4QomOCbt2bDBlLxFL6ksUdMv3tbqYH4SljTb2D3VWAw== X-Received: by 2002:a62:8145:: with SMTP id t66-v6mr4533951pfd.246.1541011045621; Wed, 31 Oct 2018 11:37:25 -0700 (PDT) Received: from localhost.localdomain ([2409:4070:221e:94ae:dc27:379e:a542:5441]) by smtp.gmail.com with ESMTPSA id 72-v6sm37165627pfl.126.2018.10.31.11.37.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Oct 2018 11:37:25 -0700 (PDT) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [RFC PATCH 7/7] arm64: allwinner: h6: orangepi-liet2: Enable AP6356S WiFi support Date: Thu, 1 Nov 2018 00:06:34 +0530 Message-Id: <20181031183634.29640-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20181031183634.29640-1-jagan@amarulasolutions.com> References: <20181031183634.29640-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181031_143740_647097_0EA9BE5C X-CRM114-Status: GOOD ( 11.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jagan Teki Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jagan Teki Enable AP6356S WiFi/BT combo chip on Orangepi Lite2 board: - WiFi SDIO interface is connected to MMC1 - WiFi WL-PMU-EN pin connected to gpio PM3: attach to mmc-pwrseq - WiFi WL-WAKE-AP pin connected to gpio PM0 - 32kHz external oscillator gate clock from RTC Signed-off-by: Jagan Teki --- Note: - chip detected, but failed to connect [ 129.084504] brcmfmac: brcmf_sdio_hostmail: mailbox indicates firmware halted [ 135.906409] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout .../allwinner/sun50i-h6-orangepi-lite2.dts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts index e098a2475f2d..b8012208c185 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-lite2.dts @@ -8,4 +8,31 @@ / { model = "OrangePi Lite2"; compatible = "xunlong,orangepi-lite2", "allwinner,sun50i-h6"; + + wifi_pwrseq: wifi-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&rtc 1>; + clock-names = "ext_clock"; + reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* WL-REG-ON: PM3 */ + post-power-on-delay-ms = <200>; + }; +}; + +&mmc1 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc1_pins>; + vmmc-supply = <®_cldo2>; + vqmmc-supply = <®_bldo3>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; + + brcmf: wifi@1 { + reg = <1>; + compatible = "brcm,bcm4329-fmac"; + interrupt-parent = <&r_pio>; + interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* WL-WAKE-AP: PM0 */ + interrupt-names = "host-wake"; + }; };