From patchwork Mon Nov 9 18:10:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 11892193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B73A1C388F7 for ; Mon, 9 Nov 2020 18:12:12 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A41C2068D for ; Mon, 9 Nov 2020 18:12:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cfDO2msA"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="dtzywe1c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A41C2068D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=YWEHyZC1NKx83zOFDsPJi4Opzw0M5Q/XIUYznG563ks=; b=cfDO2msAKasBI0bcHYfZGNZtA Ku/9XC5tCASRV05H8ZlcdnfpNGnbxb4eGT906lafyhvHUtjKFC2xmYn8rWZHNi0hskZb4xXTuusjr X3/qMevLRW5I6oswWYaMwxoDWl4QIxnnOzav+iUNXsCB1i4nI1Ju6FA6NUH2iiVARqIzakqT5J8nH c4BggIXycNu2TNBRUo/3549KAZ3B8Udnz+eUgnt5h+N0QKv3PZ59kNX8kP17mCHuJDRzFgP8pkcMg EgoOzdzo4B/KbWceORtYJOrE2ZRu6Sh5aI/yv2sZaV0stHuDjyZq31ppF5dJTBmbzBPji8BzcVPdQ aanxZt/8w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcBdo-0006GU-Mc; Mon, 09 Nov 2020 18:11:44 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kcBdB-0005tn-TB for linux-arm-kernel@lists.infradead.org; Mon, 09 Nov 2020 18:11:07 +0000 Received: by mail-pf1-x442.google.com with SMTP id v12so8880618pfm.13 for ; Mon, 09 Nov 2020 10:11:05 -0800 (PST) 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=Oy1WSzwflsIVOZ5/8uOOaITBP+5WayH2aQR8Kgtsxu4=; b=dtzywe1cxALk0HOLgXYLQHuMEw5wtkpRrCRO1LcqdGzpqPSjpudcguae2oXb17dbk/ GwUqqWz9f731aSDaicAPQAXJQfmD1F/4rxNNN5d78ecdbyQd5Xd9YCBSSccmqBfXU2XB 6E8gvPn/7KpyJ06lM0tNavY5VEgpSHiI/6i+U= 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=Oy1WSzwflsIVOZ5/8uOOaITBP+5WayH2aQR8Kgtsxu4=; b=g5JcqRmhs1N3/a9cxTt51+FOS/ffKGeRhzaTiz0eh/Qe525Mcbvg7o1u9RPrOHTC7a OucM/NVuzph+og7bm/e7ZZprB3vziw2UlT9SrRpU8iMJvac+qEKKPGf8hmjakes04T8K n+/xQX5Yy9wzsZqIF9o1INuDpyO/xaPMnVJoLrX4doQRat6XIKl5YDsKaCtqZZotWpn7 bptv7Iuv1Sc53oVXAlKZLuPOWYr2ZL0URap5rBikkmKu3WZYubBj80yOCEE2HKc/ZHnj 5V7Tikh72pP53PZxepTt5oDFZgN7AHvE4Z6aiqBQ3fsOYHg5D7JbS8yq2gV5wD6lWMpY Z32Q== X-Gm-Message-State: AOAM5330T0UCIws0l2zQcg82vhjc8VcaHLS2XSTmWyjbI0xuPcjao72A z5xOyQPeFREy8pQnQcTOhHS7EQ== X-Google-Smtp-Source: ABdhPJwwjh5/eOsviuhwmOZ4kdqHmmRdEhkA7XeJSn1GUE3T5tptRqYWzbbTsQov7XVLc6W81o+9Fw== X-Received: by 2002:a63:f611:: with SMTP id m17mr13686101pgh.178.1604945463867; Mon, 09 Nov 2020 10:11:03 -0800 (PST) Received: from localhost.localdomain ([2405:201:c809:c7a4:c0f0:b8ab:4687:594d]) by smtp.gmail.com with ESMTPSA id 136sm12027685pfa.132.2020.11.09.10.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 10:11:03 -0800 (PST) From: Jagan Teki To: Heiko Stuebner , Rob Herring , Catalin Marinas , Will Deacon Subject: [PATCH 5/9] arm64: dts: rockchip: px30-engicam: Add WiFi support Date: Mon, 9 Nov 2020 23:40:13 +0530 Message-Id: <20201109181017.206834-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201109181017.206834-1-jagan@amarulasolutions.com> References: <20201109181017.206834-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201109_131106_003645_95A13792 X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Jagan Teki , Suniel Mahesh , Michael Trimarchi , linux-amarula , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Suniel Mahesh Engicam PX30 carrier boards like EDIMM2.2 and C.TOUCH2.0 have an onboard Sterling-LWD Wifi/BT chip based on BCM43430 connected on the SDIO bus. The SDIO power sequnce is connacted with exteernal 32KHz oscillator and it require 3V3 regulator input. This patch adds WiFi enablement nodes for these respective boards. Signed-off-by: Michael Trimarchi Signed-off-by: Suniel Mahesh Signed-off-by: Jagan Teki --- .../dts/rockchip/px30-engicam-common.dtsi | 45 +++++++++++++++++++ .../dts/rockchip/px30-engicam-ctouch2.dtsi | 12 +++++ .../px30-engicam-px30-core-edimm2.2.dts | 12 +++++ 3 files changed, 69 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/px30-engicam-common.dtsi b/arch/arm64/boot/dts/rockchip/px30-engicam-common.dtsi index 8fdd7ff2fdf9..92681ccf50f1 100644 --- a/arch/arm64/boot/dts/rockchip/px30-engicam-common.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30-engicam-common.dtsi @@ -14,6 +14,51 @@ vcc5v0_sys: vcc5v0-sys { regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; }; + + xin32k: xin32k { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <32768>; + clock-output-names = "xin32k"; + }; + + vcc3v3_rf_aux_mod: vcc3v3-rf-aux-mod { + compatible = "regulator-fixed"; + regulator-name = "vcc3v3_rf_aux_mod"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + vin-supply = <&vcc5v0_sys>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple"; + clocks = <&xin32k>; + clock-names = "ext_clock"; + post-power-on-delay-ms = <80>; + pinctrl-names = "default"; + pinctrl-0 = <&wifi_enable_h>; + }; +}; + +&sdio { + #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; + sd-uhs-sdr104; + status = "okay"; + + brcmf: wifi@1 { + compatible = "brcm,bcm4329-fmac"; + reg = <1>; + }; }; &gmac { diff --git a/arch/arm64/boot/dts/rockchip/px30-engicam-ctouch2.dtsi b/arch/arm64/boot/dts/rockchip/px30-engicam-ctouch2.dtsi index 58425b1e559f..d5708779c285 100644 --- a/arch/arm64/boot/dts/rockchip/px30-engicam-ctouch2.dtsi +++ b/arch/arm64/boot/dts/rockchip/px30-engicam-ctouch2.dtsi @@ -6,3 +6,15 @@ */ #include "px30-engicam-common.dtsi" + +&pinctrl { + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdio_pwrseq { + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; +}; diff --git a/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-edimm2.2.dts b/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-edimm2.2.dts index e54d1e480daa..913444548b59 100644 --- a/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-edimm2.2.dts +++ b/arch/arm64/boot/dts/rockchip/px30-engicam-px30-core-edimm2.2.dts @@ -19,3 +19,15 @@ chosen { stdout-path = "serial2:115200n8"; }; }; + +&pinctrl { + sdio-pwrseq { + wifi_enable_h: wifi-enable-h { + rockchip,pins = <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&sdio_pwrseq { + reset-gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>; +};