From patchwork Mon Aug 16 08:55:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12438011 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 64668C4320E for ; Mon, 16 Aug 2021 08:57:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D45561B48 for ; Mon, 16 Aug 2021 08:57:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235081AbhHPI6O (ORCPT ); Mon, 16 Aug 2021 04:58:14 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:16223 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235107AbhHPI6N (ORCPT ); Mon, 16 Aug 2021 04:58:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1629104263; x=1660640263; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d5Um85a163Mv7pkkXoHd1V4ZSq/GFRUVPlIyt5VmkFg=; b=eRYF4RaTciTihUHDpjwgEsEAbO5jxWdCo2YjRT3h9MTLR4MkTemx7fBP G1XwbEIxnJcwsEOi7v4eJZlcT//Y8q00nIv2GRuKFV0pUdhr44GbXJjEj wQuh0TG5ZKgmgABtklNnwX006FCZRqJhklgDAL76ZcNRtR2t+7wt3pPwk VfcEaImIwYOhinl0RAS/K4AkEXQzngeO5npwCgUci6ZkiXnTdDyMB3/Fg P0LJQu42hGJK3EydUnijGqvvmivW7y7HNnbt1glkQwCJWdSyFetnTDZYy 790KU5sDM8l14dbbkkXK7RsfT7YRd21XvpGEBbJ4n+551YlyT3CpwtEI8 A==; IronPort-SDR: zXgvwnIDWcLSDtfpl/odq2M90Q0YjFZq0j7DkKgiKRQVoxLILLCU0G25RKIcXoiZnv+mstmYEA lBzGUxfMG8aVUtPsgywuiaZpC4Ju+BJe105OyEhD8YqkeGE6HMsD173yutUu6lEaFImU787/Ky z9SZeHWGg0+7q4de1YMpYjkS0YMxhEJ2GFJRvr220hZDsdEvwPwX804SmFDY5OLlgSOhN+oTJ9 gBnoQ7Ab8V34VbqzgH6bl/dlbFnggDFVBATaD2NHkUAX17sb0fSfOBEBZN5bGOHSW/hynJBwOX Zc5i4i8HIT1f8ntlrsm1V6aa X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="132377649" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Aug 2021 01:57:42 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 16 Aug 2021 01:57:41 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 16 Aug 2021 01:57:37 -0700 From: Claudiu Beznea To: , , , , CC: , , , , , Claudiu Beznea Subject: [PATCH v2 1/4] dt-bindings: pwrseq-sd8787: add binding for wilc1000 Date: Mon, 16 Aug 2021 11:55:27 +0300 Message-ID: <20210816085530.1723402-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210816085530.1723402-1-claudiu.beznea@microchip.com> References: <20210816085530.1723402-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add binding for wilc1000 devices. Signed-off-by: Claudiu Beznea --- Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml index e0169a285aa2..e1a51ef70e77 100644 --- a/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml +++ b/Documentation/devicetree/bindings/mmc/mmc-pwrseq-sd8787.yaml @@ -11,7 +11,9 @@ maintainers: properties: compatible: - const: mmc-pwrseq-sd8787 + oneOf: + const: mmc-pwrseq-sd8787 + const: mmc-pwrseq-wilc1000 powerdown-gpios: minItems: 1 From patchwork Mon Aug 16 08:55:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12438013 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,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 7C488C4320A for ; Mon, 16 Aug 2021 08:57:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FB1F61B44 for ; Mon, 16 Aug 2021 08:57:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235199AbhHPI6S (ORCPT ); Mon, 16 Aug 2021 04:58:18 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:48673 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234837AbhHPI6R (ORCPT ); Mon, 16 Aug 2021 04:58:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1629104266; x=1660640266; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hUNGvSAHMAe2Et6tQj52rv5zSHPnoXZNUtoreKoOsu4=; b=a2SIomSxyHg+D0kg5PF+kdS0BW5M5a1lozGO9MKKeBbFePcU2F6zci5z 7/lyS8BPXz+11zwHTs28Ig3hBDWTTd+lsmezWZgelO5612/hVbuYEQaQM pCRiUNh4SiWpV00a3c4YdApPr9L2fAHOi5gZOl0P10M/fdnkyq3jvu2LZ Zq9UgFvl+7Ld2FeHThw8wqkpCMcRxo6qyjlSucNdB6tkYs0V2e+IyuaxM goGT7LaZG/s7cRl+xvWYMvj95PXNn2GCmo5cpS8VT+qKxSwxb+Ky4/vsc 2X+ANHEHsQ+RXNf+CH2U9Hg6SVkOx9BOGbDfXs145cBwyXqu955HvOxhe w==; IronPort-SDR: UtmEfJVICDtJIxpcP+p1JO8ykrsg5+R1fOdQi3OHOAg/6+Yo75Kit5PTmcUwIsDDPsji+Axaj9 Z/gK+f4hT1+iDoF3COWCeZ4Nlkz/qDnElbkw6tXz2s8FeWjjS5iD1Wz2xOFBUw+FlLYSTb7KQN 9naFRapcnDbpTlcX4kJBDtAHBeAfir1b/hw/k/l6R0ckE6wtLAYHQvoPKh6WxNQq+18nc0Brnu Iy/HkQ/Apsl+hX0135RPUYv1bCBjEXplO72wnsWJRrjCIJXyPCmKSTZKe7kLzM/YUdtlT8gCHt teQl+gYND+R+2xhFeWqdWQ0S X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="125916720" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Aug 2021 01:57:45 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 16 Aug 2021 01:57:45 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 16 Aug 2021 01:57:41 -0700 From: Claudiu Beznea To: , , , , CC: , , , , , Claudiu Beznea Subject: [PATCH v2 2/4] mmc: pwrseq: sd8787: add support for wilc1000 Date: Mon, 16 Aug 2021 11:55:28 +0300 Message-ID: <20210816085530.1723402-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210816085530.1723402-1-claudiu.beznea@microchip.com> References: <20210816085530.1723402-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add new compatible for wilc1000 devices and specify the delay in .data member of struct of_device_id. WILC1000, WILC3000 devices needs a minimum of 5ms delay b/w reset and power lines. Signed-off-by: Claudiu Beznea --- drivers/mmc/core/pwrseq_sd8787.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/pwrseq_sd8787.c b/drivers/mmc/core/pwrseq_sd8787.c index 68a826f1c0a1..264e48067af2 100644 --- a/drivers/mmc/core/pwrseq_sd8787.c +++ b/drivers/mmc/core/pwrseq_sd8787.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -27,6 +28,7 @@ struct mmc_pwrseq_sd8787 { struct mmc_pwrseq pwrseq; struct gpio_desc *reset_gpio; struct gpio_desc *pwrdn_gpio; + u32 reset_pwrdwn_delay_ms; }; #define to_pwrseq_sd8787(p) container_of(p, struct mmc_pwrseq_sd8787, pwrseq) @@ -37,7 +39,7 @@ static void mmc_pwrseq_sd8787_pre_power_on(struct mmc_host *host) gpiod_set_value_cansleep(pwrseq->reset_gpio, 1); - msleep(300); + msleep(pwrseq->reset_pwrdwn_delay_ms); gpiod_set_value_cansleep(pwrseq->pwrdn_gpio, 1); } @@ -55,7 +57,8 @@ static const struct mmc_pwrseq_ops mmc_pwrseq_sd8787_ops = { }; static const struct of_device_id mmc_pwrseq_sd8787_of_match[] = { - { .compatible = "mmc-pwrseq-sd8787",}, + { .compatible = "mmc-pwrseq-sd8787", .data = (void *)300 }, + { .compatible = "mmc-pwrseq-wilc1000", .data = (void *)5 }, {/* sentinel */}, }; MODULE_DEVICE_TABLE(of, mmc_pwrseq_sd8787_of_match); @@ -64,11 +67,15 @@ static int mmc_pwrseq_sd8787_probe(struct platform_device *pdev) { struct mmc_pwrseq_sd8787 *pwrseq; struct device *dev = &pdev->dev; + const struct of_device_id *match; pwrseq = devm_kzalloc(dev, sizeof(*pwrseq), GFP_KERNEL); if (!pwrseq) return -ENOMEM; + match = of_match_node(mmc_pwrseq_sd8787_of_match, pdev->dev.of_node); + pwrseq->reset_pwrdwn_delay_ms = (u32)match->data; + pwrseq->pwrdn_gpio = devm_gpiod_get(dev, "powerdown", GPIOD_OUT_LOW); if (IS_ERR(pwrseq->pwrdn_gpio)) return PTR_ERR(pwrseq->pwrdn_gpio); From patchwork Mon Aug 16 08:55:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12438015 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 24AB4C4320A for ; Mon, 16 Aug 2021 08:57:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0F5F061B5F for ; Mon, 16 Aug 2021 08:57:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235226AbhHPI6X (ORCPT ); Mon, 16 Aug 2021 04:58:23 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:48673 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235189AbhHPI6W (ORCPT ); Mon, 16 Aug 2021 04:58:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1629104271; x=1660640271; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fWsatgcloSsqrB7wvaudTGqBX8SMP/WQ4Wac0C232F0=; b=WKsp2yKEJN/p+AFhr+mWiRm/gUifUZKx8OufVJZ7jeltjkAHe899avAU ncLU7Wroc0IeIlViGRaz+bNIAcuGg9GQFB47mypIGrWxqvmekOcyHUmq8 SYMEaVmfuXAGyVefmdEVOsbBTVhUozPI73X6L+bVd7+/5QWQjrEYZb67+ 1RoMoTHFcuOrq+o2hkinb9GUZ5kLL013MRMY3CoUitz6119uXd5pymhKm tX7DOqva/fRFLdcjboH8jlLMhQRZviMWHkOBEfp6oFqVCzq0mOot5fXrN 4HW0qsRFePDpape9sKwvjLZ29Qz3OjDGFgse3cWzjUI61RAYLqV0l7gRU g==; IronPort-SDR: zoDmpNR//NEe4Gw8fOC1oIP0UG2W4XcVt8Wwqcqt16yAe4juCLQmwKgIpcsWXNj5FLF6OqFcge 4UPMlCTLug7+P2C3ByFrGXrViJ/VSEVPsFX5JtlhzEOiYi39vN2vVMAqtQxv/0PbFSBfPzs4Eu U4I5HIriZDkXYvH2TL5mNEhrBQAGbWZlayFFL0rofWqqnXUn3i7PpFmdhNRikiaOHoysXSUVNn SO+L3hLuQgmj0jPhfIAs1dVSqDw70QOjCOKQFYaZqfDLvo1CjgmKXiu84a+On1kvzpfDlW2j3O pUnP7cs59dkbszqASc3IqZUI X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="125916745" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Aug 2021 01:57:50 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 16 Aug 2021 01:57:49 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 16 Aug 2021 01:57:46 -0700 From: Claudiu Beznea To: , , , , CC: , , , , , Claudiu Beznea Subject: [PATCH v2 3/4] mmc: pwrseq: add wilc1000_sdio dependency for pwrseq_sd8787 Date: Mon, 16 Aug 2021 11:55:29 +0300 Message-ID: <20210816085530.1723402-4-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210816085530.1723402-1-claudiu.beznea@microchip.com> References: <20210816085530.1723402-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org pwseq_sd8787 could also be used with wilc1000_sdio driver. Add a dependency for this. Signed-off-by: Claudiu Beznea --- drivers/mmc/core/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/Kconfig b/drivers/mmc/core/Kconfig index ae8b69aee619..6f25c34e4fec 100644 --- a/drivers/mmc/core/Kconfig +++ b/drivers/mmc/core/Kconfig @@ -15,7 +15,7 @@ config PWRSEQ_EMMC config PWRSEQ_SD8787 tristate "HW reset support for SD8787 BT + Wifi module" - depends on OF && (MWIFIEX || BT_MRVL_SDIO || LIBERTAS_SDIO) + depends on OF && (MWIFIEX || BT_MRVL_SDIO || LIBERTAS_SDIO || WILC1000_SDIO) help This selects hardware reset support for the SD8787 BT + Wifi module. By default this option is set to n. From patchwork Mon Aug 16 08:55:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12438017 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 859C4C4338F for ; Mon, 16 Aug 2021 08:58:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5EE8361B4F for ; Mon, 16 Aug 2021 08:58:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235319AbhHPI60 (ORCPT ); Mon, 16 Aug 2021 04:58:26 -0400 Received: from esa.microchip.iphmx.com ([68.232.153.233]:3412 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235189AbhHPI60 (ORCPT ); Mon, 16 Aug 2021 04:58:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1629104274; x=1660640274; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zEDBcUygp2aN/sqFtPomk6+2LN5nut6ZU9LjTMWFbOE=; b=kwf18lMCa1cRX7tEhSItB45kjTw743Gb1CxsFntRSG4Po9OKFDxiIZRH OefaEbNgJPhfyd/Y6bwIg4KBg/ulnW6/y1Mr+cn9vSRJ584vx50uHI4pS injjBGpFbpJvF3STJDIr4qLGhk6h3XW5QAJ2fkko1XtohFrRP7j3WkZl0 0lb95VhSOhcjnoGjOXV1hhBhvfEx7koJtoI4HaSFMWOldn/TVCXQCNV3H ak2FZU6z1A2AbzY9RunfApQPlEOl2ziyjtAnucv5t4f2PC8LiTx7agFmT 7e7kB5y1AkafiHcsiUZWTCTz9kX8rjsJ2vC5V2CbkM6rXcP4ax79n+ZmN w==; IronPort-SDR: VsR9HM+Nezc1WKHqp8MLq767UdOk5xzwJ3Ywhc4Q62xrR99pE1wOuO30Voh4zEKCEPWWpjIwEd /zmHhx9Bii/m2qqrkH8T2S0EEa1LrJY+Lhi6yWh3Aq3ieVzwMjT1Hqb9bz/BS6LdLfhfw9v8EP HH2gCWYmdC4seh/fFfcxne2xDlvpef1R038kkhzUc3pX6eLC5Rx+S0oXBqvXPHgzuWiSmJQoZh I7Jr9momL+/dCr10q9N/FYRty1dRy3/PbWAZr8oIdpVnrMMP01VUy3czlJgLxeRiwtgaokvjy0 4Pg6+qZ/MRDLz1ra4+ohsAIf X-IronPort-AV: E=Sophos;i="5.84,324,1620716400"; d="scan'208";a="132933807" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 16 Aug 2021 01:57:54 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 16 Aug 2021 01:57:54 -0700 Received: from m18063-ThinkPad-T460p.mchp-main.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 16 Aug 2021 01:57:50 -0700 From: Claudiu Beznea To: , , , , CC: , , , , , Eugen Hristev , Claudiu Beznea Subject: [PATCH v2 4/4] ARM: dts: at91: sama5d27_wlsom1: add wifi device Date: Mon, 16 Aug 2021 11:55:30 +0300 Message-ID: <20210816085530.1723402-5-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210816085530.1723402-1-claudiu.beznea@microchip.com> References: <20210816085530.1723402-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Eugen Hristev SAMA5D27 WLSOM1 boards has a WILC3000 device soldered. Add proper device tree nodes for this. [eugen.hristev: original author of this code] Signed-off-by: Eugen Hristev [nicolas.ferre: original author of this code] Signed-off-by: Nicolas Ferre Signed-off-by: Claudiu Beznea --- arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi | 71 +++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi index 025a78310e3a..c7bcfd3ce91d 100644 --- a/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi +++ b/arch/arm/boot/dts/at91-sama5d27_wlsom1.dtsi @@ -30,6 +30,15 @@ main_xtal { clock-frequency = <24000000>; }; }; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-wilc1000"; + reset-gpios = <&pioA PIN_PA27 GPIO_ACTIVE_HIGH>; + powerdown-gpios = <&pioA PIN_PA29 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&pinctrl_wilc_pwrseq>; + pinctrl-names = "default"; + status = "okay"; + }; }; &flx1 { @@ -310,5 +319,67 @@ pinctrl_qspi1_default: qspi1_default { ; bias-pull-up; }; + + pinctrl_sdmmc1_default: sdmmc1_default { + cmd-data { + pinmux = , + , + , + , + ; + bias-disable; + }; + + conf-ck { + pinmux = ; + bias-disable; + }; + }; + + pinctrl_wilc_default: wilc_default { + conf-irq { + pinmux = ; + bias-disable; + }; + }; + + pinctrl_wilc_pwrseq: wilc_pwrseq { + conf-ce-nrst { + pinmux = , + ; + bias-disable; + }; + + conf-rtcclk { + pinmux = ; + bias-disable; + }; + }; +}; + +&sdmmc1 { + #address-cells = <1>; + #size-cells = <0>; + bus-width = <4>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sdmmc1_default>; + mmc-pwrseq = <&wifi_pwrseq>; + no-1-8-v; + non-removable; + status = "okay"; + + wilc: wilc@0 { + reg = <0>; + bus-width = <4>; + compatible = "microchip,wilc3000", "microchip,wilc1000"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_wilc_default>; + irq-gpios = <&pioA PIN_PB25 GPIO_ACTIVE_LOW>; + clocks = <&pmc PMC_TYPE_SYSTEM 9>; + clock-names = "rtc"; + assigned-clocks = <&pmc PMC_TYPE_SYSTEM 9>; + assigned-clock-rates = <32768>; + status = "okay"; + }; };