From mboxrd@z Thu Jan 1 00:00:00 1970 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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 C0054C433DB for ; Sat, 20 Mar 2021 01:12:30 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 4815B61974 for ; Sat, 20 Mar 2021 01:12:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4815B61974 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=OngfkMBolCNoMyriWUiTovvK/d6KZQ7Vz/S9dEOdhOs=; b=CMggmHqgm7T/z2GLg7YVBdj+Sg pLHljJ+2bhh3uQqkGPybuh3EGYrl6/B/XSOCvoYt4SFnmbPIwu7ZUvlNjPCpw5GQ8x7G42sVyWoCt SDmKuijmY99Dj3GI2nfcVRalNdAe2m2tJCF72R4GbCQWBgW4YVWm6c6JpuhRL76WivnIcuMYhIZFx EnjJrIeWSVFRVTm/0czgg4mbBM6Q371iyFt4nQglFzT2vuTONWcl8MyXbZU/mMAvjmiTaveWM6KFF 5BYhqVzYuvCR/bgY/kORfSlpIdQOTJof/SnQjMI+pgpTFJTcKB+2fvsJBXJuorev7RgHQcmsK3+VJ 7KnJXN9g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lNQ8g-008NpB-04; Sat, 20 Mar 2021 01:10:50 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lNQ8Z-008NoT-Pw for linux-arm-kernel@lists.infradead.org; Sat, 20 Mar 2021 01:10:47 +0000 Received: by mail-lf1-x136.google.com with SMTP id x28so12717527lfu.6 for ; Fri, 19 Mar 2021 18:10:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=IwgsaSrUJnM/ouQQNMtRB+VHBXtL/5V+r1vmtS8xKD4=; b=Iz4E6Y0fo+42K1NVlckSF5Xx4Xg6wpKeYzNJDw89/R9J7QWnAJdmQhrloANXyx05vc ZEQo2n/cBh8YYGnAXh1UMQtVZoHmjx0pXpGa+SR7pZ1fZAIKcDCPN8MQ5TopeYmBPidn KZQthRMLYoCctfKeHjLfoJXU6fscMWEVdFEsAdifBM0QvFt90WXdsTcoZsdh4hrQteFr RdMicHat83lDfI2SOkuBTkaib2F8NYDHLJMODU7MtMjhBWOZK7EJFbmaeLYUoZB45oJO ViDC92CljqHOURdr9qLA5aiPfv/YWZl5MpdwWAMwEi4SL7i88Vxn11PWHsVMwAbywawp 7EXA== 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 :content-transfer-encoding; bh=IwgsaSrUJnM/ouQQNMtRB+VHBXtL/5V+r1vmtS8xKD4=; b=IcNYWm9nlmEYff3Zal+2fgst1n2JPWqM2046gETemg7Ef3nzEbCt6qAu8KAKs6nt/i xElixmU+ogiWT/M9O5VApNY9SFO5gJG1X4zY2CgRrNwIyAtmpGMIYR/sdx5669tj/fxG Zszq+5d36oJAyxa/xrCkqTIp2j0c6LimCn3WWjOsvT5rAvAf0jvEPGkkTLDCUMNpMdF6 vGRbF54gl5RS53dQKp5KUwdOYUIysA1+2lZhJujMel3alVzEzxSEv3LrmzEYu2qcghVF 8owUec9QTwP6UhGfT09+aKKrD/GGZhuvdUifAZLmfQ8jJkA+HZgSQ+zO7kl8GyXe5dXH oz2w== X-Gm-Message-State: AOAM5334ALtZUjPrcy+pgTQyKS/dUbtRZAdnS9KJ/KaTpUlWex77PwPx xjGSqLTzAMXWqn0O6Lz/31uKf33KcsY01g8TLeo= X-Google-Smtp-Source: ABdhPJw0WjoNs7YEYaGrzHDtERhjPxxt2XxeopHEx7Yn6XoXtnDcumsm/bU9tYR4WhwMacb5pH6nqw== X-Received: by 2002:ac2:5103:: with SMTP id q3mr2419025lfb.26.1616202639514; Fri, 19 Mar 2021 18:10:39 -0700 (PDT) Received: from localhost.localdomain (c-d7cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.215]) by smtp.gmail.com with ESMTPSA id r66sm786228lff.93.2021.03.19.18.10.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 18:10:38 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Cc: Linus Walleij , Stephan Gerhold Subject: [PATCH v4] ARM: dts: ux500: Fix BT+WLAN on Janice Date: Sat, 20 Mar 2021 02:10:35 +0100 Message-Id: <20210320011035.655087-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210320_011045_781546_02B50A20 X-CRM114-Status: GOOD ( 22.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org GPIO215 has a rail named WLAN_RST_N but it is actually connected to the pin WLAN_REG_ON on the BCM4330 chip, so this should be the WLAN regulator GPIO rather than GPIO222. The misunderstanding comes from the erroneous naming of the rail on the schematic. GPIO222 is indeed connected to the rail BT_VREG_EN and the pin BT_REG_ON, and can be handled by the driver as usual. This corrects misunderstandings and makes Janice's WLAN and BT setup look like that of Golden and Skomer. Add explicit BCM4330 compatible to the WLAN chip. Cc: Stephan Gerhold Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Resolve the confusion around WLAN_RST_N ChangeLog v2->v3: - Break out patch, Janice has BCM4330 and is different from Golden and Skomer. ChangeLog v1->v2: - Change compatible strings on the WLAN chips to be specific-to-generic indicating the exact model. --- .../arm/boot/dts/ste-ux500-samsung-janice.dts | 48 +++++++------------ 1 file changed, 18 insertions(+), 30 deletions(-) diff --git a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts index 7411bfeda285..f24369873ce2 100644 --- a/arch/arm/boot/dts/ste-ux500-samsung-janice.dts +++ b/arch/arm/boot/dts/ste-ux500-samsung-janice.dts @@ -135,21 +135,22 @@ lcd_1v8_reg: regulator-gpio-lcd-1v8 { /* * This regulator is a GPIO line that drives the Broadcom WLAN - * line BT_VREG_EN high and enables the internal regulators - * inside the chip. + * line WL_REG_ON high and enables the internal regulators + * inside the chip. Unfortunatley it is erroneously named + * WLAN_RST_N on the schematic but it is not a reset line. * * The voltage specified here is only used to determine the OCR mask, * the for the SDIO connector, the chip is actually connected * directly to VBAT. */ - wl_bt_reg: regulator-gpio-wlan { + wl_reg: regulator-gpio-wlan { compatible = "regulator-fixed"; - regulator-name = "BT_VREG_EN"; + regulator-name = "WL_REG_ON"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; startup-delay-us = <100000>; - /* GPIO222 (BT_VREG_EN) */ - gpio = <&gpio6 30 GPIO_ACTIVE_HIGH>; + /* GPIO215 (WLAN_RST_N to WL_REG_ON) */ + gpio = <&gpio6 23 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default"; pinctrl-0 = <&wlan_ldo_en_default>; @@ -390,11 +391,10 @@ mmc@80118000 { pinctrl-1 = <&mc1_a_2_sleep>; /* * GPIO-controlled voltage enablement: this drives - * the BT_VREG_EN line high when we use this device. - * Represented as regulator to fill OCR mask and to - * be usable in parallel with the Bluetooth chip. + * the WL_REG_ON line high when we use this device. + * Represented as regulator to fill OCR mask. */ - vmmc-supply = <&wl_bt_reg>; + vmmc-supply = <&wl_reg>; #address-cells = <1>; #size-cells = <0>; @@ -408,9 +408,6 @@ wifi@1 { interrupt-parent = <&gpio6>; interrupts = <24 IRQ_TYPE_EDGE_FALLING>; interrupt-names = "host-wake"; - /* GPIO215 WLAN_RST_N */ - /* FIXME: kernel does not use this assert/deassert */ - reset-gpios = <&gpio6 23 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&wlan_default_mode>; }; @@ -440,15 +437,8 @@ uart@80120000 { bluetooth { compatible = "brcm,bcm4330-bt"; - /* - * We actually have shutdown-gpios, BT_VREG_EN on GPIO222, - * but since this GPIO is shared with the WLAN chip, we need - * to reference the regulator instead. The regulator - * framework will reference count the GPIO usage and - * make sure we can use the same GPIO for several supplies. - */ - // shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>; - vbat-supply = <&wl_bt_reg>; + /* GPIO222 rail BT_VREG_EN to BT_REG_ON */ + shutdown-gpios = <&gpio6 30 GPIO_ACTIVE_HIGH>; /* BT_WAKE on GPIO199 */ device-wakeup-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; /* BT_HOST_WAKE on GPIO97 */ @@ -759,9 +749,9 @@ janice_cfg1 { /* GPIO that enables the WLAN internal LDO regulators */ wlan-ldo { wlan_ldo_en_default: wlan_ldo_default { - /* GPIO222 BT_VREG_ON */ + /* GPIO215 named WLAN_RST_N */ janice_cfg1 { - pins = "GPIO222_AJ9"; + pins = "GPIO215_AH13"; ste,config = <&gpio_out_lo>; }; }; @@ -875,11 +865,6 @@ janice_cfg2 { }; wlan { wlan_default_mode: wlan_default { - /* GPIO215 used for RESET_N */ - janice_cfg1 { - pins = "GPIO215_AH13"; - ste,config = <&gpio_out_lo>; - }; /* GPIO216 for WL_HOST_WAKE */ janice_cfg2 { pins = "GPIO216_AG12"; @@ -889,14 +874,17 @@ janice_cfg2 { }; bluetooth { bluetooth_default_mode: bluetooth_default { + /* GPIO199 BT_WAKE and GPIO222 BT_VREG_ON */ janice_cfg1 { - pins = "GPIO199_AH23"; + pins = "GPIO199_AH23", "GPIO222_AJ9"; ste,config = <&gpio_out_lo>; }; + /* GPIO97 BT_HOST_WAKE */ janice_cfg2 { pins = "GPIO97_D9"; ste,config = <&gpio_in_nopull>; }; + /* GPIO209 BT_RST_N */ janice_cfg3 { pins = "GPIO209_AG15"; ste,config = <&gpio_out_hi>; -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel