From patchwork Wed Oct 6 03:53:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 515273 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp154992imy; Tue, 5 Oct 2021 20:54:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwlnO/Xqd9pCTUrl24puRNtyR/TYf266Rg9KwfPQUfQSy5elD7khxT3TTU80YErjpinUVz X-Received: by 2002:aa7:c418:: with SMTP id j24mr15090281edq.227.1633492464833; Tue, 05 Oct 2021 20:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633492464; cv=none; d=google.com; s=arc-20160816; b=ln17ATr1npbYolbgY0YgLcrfeZyFyPFeg9Y9H2ijEHZANG/JndUpYt3QuNOUnmvz/L qlo+PWuiV1Sd8PMkhPlvxvx7cbZKQJBeduSIxruCd8FJikH9KICvVdygx0hNdr0RtTQa USZxJ7xogfSsdjBxFaMjUXM7x2vspH1bZqEG2Fc6GmPuvLOLevxRS2M2tTzvdUa+ilKz obemb5FhxseqrIBvs53F9sK6BLBMd++E65ncPHwpJk26JPi9wjUEkMrvv/inJfOcKor/ gjxmTpmsNBjU+yhRV5ZqcofzTtw92ptfiC1FEQvksz46kUHl13dpEcbIY7vqWxIPyzGp ONnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9lmj4z2XmvtgOeyuCcLAR8+/FQoqDUZMLX1DvXWCDtk=; b=Q36589Mjpv0XNr9WKJLVdGK0s7+Ly1eYUZlrVPmFOqVlHZeKw/LfVMLceCk0be6SsK o4LoW37IljM8Qc1hv/57WUilNMVVQT+V99tWxCCu323ITWicmzmTtBzgI49UNaGWmhT0 XYfeweZd/UfxNBXWEgWjowvZlwguxLFvnbuXl6HNed3Fvkc3EWcgpTNeWDLksIw7JtHu ML6WGRG5n8FmK77mXKGqnR8fAhe2nr1EjUxRlrd0kt9VtGtW/x3QPucd+sjm0eU8cTg+ Yev7b3On52+0ektAq1pXOmHKL0VQOz9LRr8vGlJQi3TzkX2YMLOR7I4Bw58BDdqlgAXl XmNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cMeYaNyT; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id eb13si4889864edb.395.2021.10.05.20.54.24; Tue, 05 Oct 2021 20:54:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cMeYaNyT; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237395AbhJFD4L (ORCPT + 1 other); Tue, 5 Oct 2021 23:56:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237305AbhJFD4I (ORCPT ); Tue, 5 Oct 2021 23:56:08 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35A43C0613EC for ; Tue, 5 Oct 2021 20:54:16 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id y15so4539644lfk.7 for ; Tue, 05 Oct 2021 20:54:16 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=9lmj4z2XmvtgOeyuCcLAR8+/FQoqDUZMLX1DvXWCDtk=; b=cMeYaNyTbMR8bGLWrM98suMs6L0Yshkz2dJCZMFbLzamLV+tOYwNg1q0EFd9rZZwzK s8gV/uthkE5+RN9/bQV52t78R7tU+hMwu5HPOWsXPtkNGO7hLm/LNVw8Hp2TBYl00uzz iymzZ1siy3Li2jScYl44aSSBG9jSWzs9v/KmkCDSZz9zzaaglKVqTaly7cIpwImQleY3 Jt4e6dBAOpLzYca9ka7Px/snHAZI4r9SdZ+9YGAvn14Rplfp5SBZVVELE7D81vuDlhfm aT8G1R+idv20rIeIr63bDBletPmiwDxaQNaFYqFaWNUbKY54EfayHITiwHWGc7opOUh9 we0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9lmj4z2XmvtgOeyuCcLAR8+/FQoqDUZMLX1DvXWCDtk=; b=Os4a+uH2XJ1rZx1TlMxRXSmpYencu2ZfUwbyOpjw4wHJN6MwmhjQDJneOTEoh2QGHM fbixqxp4DArc/Hx6I+b7bk0w0DOfFi4iA3rkvgnFMQGarZ9+Jbl6KvRVXOhYiRRwC/S8 4qz8lu+1kTp/hGaBQec7UN46KgWR+5eHdLO/6qYbRW5xpqFKowc248HDgLExtGaBSRwN lHGdo4XFMw3oYYamaSlDv5k+DDsZUP15VXdmmJk2YaPzkpBK4oE92nmADsnRfGb4Vblu 8yc6ViqSdtz5AYGFcYAoxtP0Jt6wxfJ012emjF9wq6FMpQKtiiAH8t0MQQqAsC7szd9w V7fw== X-Gm-Message-State: AOAM531SmIFg953x/uMOEwoXzq1HTSek4ToK0IkDtBdYHctq55+QcXGm Xkv6I3hilkuawO/cZlaS+1dKJQ== X-Received: by 2002:a2e:7f14:: with SMTP id a20mr27460466ljd.259.1633492454543; Tue, 05 Oct 2021 20:54:14 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id s4sm2142967lfd.103.2021.10.05.20.54.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 20:54:14 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Ulf Hansson , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Kalle Valo , "David S. Miller" , Jakub Kicinski , Stanimir Varbanov Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v1 04/15] mmc: core: switch to new pwrseq subsystem Date: Wed, 6 Oct 2021 06:53:56 +0300 Message-Id: <20211006035407.1147909-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> References: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Drop old MMC pwrseq code and use new pwrseq subsystem instead. Individual drivers are already ported to new subsystem. Signed-off-by: Dmitry Baryshkov --- drivers/mmc/core/Makefile | 1 - drivers/mmc/core/core.c | 9 ++- drivers/mmc/core/host.c | 8 ++- drivers/mmc/core/mmc.c | 3 +- drivers/mmc/core/pwrseq.c | 117 ------------------------------------ drivers/mmc/core/pwrseq.h | 58 ------------------ drivers/power/pwrseq/core.c | 8 +++ include/linux/mmc/host.h | 4 +- 8 files changed, 20 insertions(+), 188 deletions(-) delete mode 100644 drivers/mmc/core/pwrseq.c delete mode 100644 drivers/mmc/core/pwrseq.h -- 2.33.0 diff --git a/drivers/mmc/core/Makefile b/drivers/mmc/core/Makefile index 322eb69bd00e..a504d873cf8e 100644 --- a/drivers/mmc/core/Makefile +++ b/drivers/mmc/core/Makefile @@ -9,7 +9,6 @@ mmc_core-y := core.o bus.o host.o \ sdio.o sdio_ops.o sdio_bus.o \ sdio_cis.o sdio_io.o sdio_irq.o \ slot-gpio.o regulator.o -mmc_core-$(CONFIG_OF) += pwrseq.o mmc_core-$(CONFIG_DEBUG_FS) += debugfs.o obj-$(CONFIG_MMC_BLOCK) += mmc_block.o mmc_block-objs := block.o queue.o diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 240c5af793dc..c4b08067ab9f 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -41,7 +41,6 @@ #include "bus.h" #include "host.h" #include "sdio_bus.h" -#include "pwrseq.h" #include "mmc_ops.h" #include "sd_ops.h" @@ -1322,7 +1321,7 @@ void mmc_power_up(struct mmc_host *host, u32 ocr) if (host->ios.power_mode == MMC_POWER_ON) return; - mmc_pwrseq_pre_power_on(host); + pwrseq_pre_power_on(host->pwrseq); host->ios.vdd = fls(ocr) - 1; host->ios.power_mode = MMC_POWER_UP; @@ -1337,7 +1336,7 @@ void mmc_power_up(struct mmc_host *host, u32 ocr) */ mmc_delay(host->ios.power_delay_ms); - mmc_pwrseq_post_power_on(host); + pwrseq_power_on(host->pwrseq); host->ios.clock = host->f_init; @@ -1356,7 +1355,7 @@ void mmc_power_off(struct mmc_host *host) if (host->ios.power_mode == MMC_POWER_OFF) return; - mmc_pwrseq_power_off(host); + pwrseq_power_off(host->pwrseq); host->ios.clock = 0; host->ios.vdd = 0; @@ -1986,7 +1985,7 @@ EXPORT_SYMBOL(mmc_set_blocklen); static void mmc_hw_reset_for_init(struct mmc_host *host) { - mmc_pwrseq_reset(host); + pwrseq_reset(host->pwrseq); if (!(host->caps & MMC_CAP_HW_RESET) || !host->ops->hw_reset) return; diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index d4683b1d263f..aa5326db7c60 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -28,7 +28,6 @@ #include "crypto.h" #include "host.h" #include "slot-gpio.h" -#include "pwrseq.h" #include "sdio_ops.h" #define cls_dev_to_mmc_host(d) container_of(d, struct mmc_host, class_dev) @@ -422,7 +421,11 @@ int mmc_of_parse(struct mmc_host *host) device_property_read_u32(dev, "post-power-on-delay-ms", &host->ios.power_delay_ms); - return mmc_pwrseq_alloc(host); + host->pwrseq = devm_pwrseq_get(dev, "mmc"); + if (IS_ERR(host->pwrseq)) + return PTR_ERR(host->pwrseq); + + return 0; } EXPORT_SYMBOL(mmc_of_parse); @@ -641,7 +644,6 @@ EXPORT_SYMBOL(mmc_remove_host); */ void mmc_free_host(struct mmc_host *host) { - mmc_pwrseq_free(host); put_device(&host->class_dev); } diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 29e58ffae379..d7e1c083fa12 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -24,7 +24,6 @@ #include "mmc_ops.h" #include "quirks.h" #include "sd_ops.h" -#include "pwrseq.h" #define DEFAULT_CMD6_TIMEOUT_MS 500 #define MIN_CACHE_EN_TIMEOUT_MS 1600 @@ -2222,7 +2221,7 @@ static int _mmc_hw_reset(struct mmc_host *host) } else { /* Do a brute force power cycle */ mmc_power_cycle(host, card->ocr); - mmc_pwrseq_reset(host); + pwrseq_reset(host->pwrseq); } return mmc_init_card(host, card->ocr, card); } diff --git a/drivers/mmc/core/pwrseq.c b/drivers/mmc/core/pwrseq.c deleted file mode 100644 index ef675f364bf0..000000000000 --- a/drivers/mmc/core/pwrseq.c +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Copyright (C) 2014 Linaro Ltd - * - * Author: Ulf Hansson - * - * MMC power sequence management - */ -#include -#include -#include -#include - -#include - -#include "pwrseq.h" - -static DEFINE_MUTEX(pwrseq_list_mutex); -static LIST_HEAD(pwrseq_list); - -int mmc_pwrseq_alloc(struct mmc_host *host) -{ - struct device_node *np; - struct mmc_pwrseq *p; - - np = of_parse_phandle(host->parent->of_node, "mmc-pwrseq", 0); - if (!np) - return 0; - - mutex_lock(&pwrseq_list_mutex); - list_for_each_entry(p, &pwrseq_list, pwrseq_node) { - if (p->dev->of_node == np) { - if (!try_module_get(p->owner)) - dev_err(host->parent, - "increasing module refcount failed\n"); - else - host->pwrseq = p; - - break; - } - } - - of_node_put(np); - mutex_unlock(&pwrseq_list_mutex); - - if (!host->pwrseq) - return -EPROBE_DEFER; - - dev_info(host->parent, "allocated mmc-pwrseq\n"); - - return 0; -} - -void mmc_pwrseq_pre_power_on(struct mmc_host *host) -{ - struct mmc_pwrseq *pwrseq = host->pwrseq; - - if (pwrseq && pwrseq->ops->pre_power_on) - pwrseq->ops->pre_power_on(host); -} - -void mmc_pwrseq_post_power_on(struct mmc_host *host) -{ - struct mmc_pwrseq *pwrseq = host->pwrseq; - - if (pwrseq && pwrseq->ops->post_power_on) - pwrseq->ops->post_power_on(host); -} - -void mmc_pwrseq_power_off(struct mmc_host *host) -{ - struct mmc_pwrseq *pwrseq = host->pwrseq; - - if (pwrseq && pwrseq->ops->power_off) - pwrseq->ops->power_off(host); -} - -void mmc_pwrseq_reset(struct mmc_host *host) -{ - struct mmc_pwrseq *pwrseq = host->pwrseq; - - if (pwrseq && pwrseq->ops->reset) - pwrseq->ops->reset(host); -} - -void mmc_pwrseq_free(struct mmc_host *host) -{ - struct mmc_pwrseq *pwrseq = host->pwrseq; - - if (pwrseq) { - module_put(pwrseq->owner); - host->pwrseq = NULL; - } -} - -int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq) -{ - if (!pwrseq || !pwrseq->ops || !pwrseq->dev) - return -EINVAL; - - mutex_lock(&pwrseq_list_mutex); - list_add(&pwrseq->pwrseq_node, &pwrseq_list); - mutex_unlock(&pwrseq_list_mutex); - - return 0; -} -EXPORT_SYMBOL_GPL(mmc_pwrseq_register); - -void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) -{ - if (pwrseq) { - mutex_lock(&pwrseq_list_mutex); - list_del(&pwrseq->pwrseq_node); - mutex_unlock(&pwrseq_list_mutex); - } -} -EXPORT_SYMBOL_GPL(mmc_pwrseq_unregister); diff --git a/drivers/mmc/core/pwrseq.h b/drivers/mmc/core/pwrseq.h deleted file mode 100644 index f3bb103db9ad..000000000000 --- a/drivers/mmc/core/pwrseq.h +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) 2014 Linaro Ltd - * - * Author: Ulf Hansson - */ -#ifndef _MMC_CORE_PWRSEQ_H -#define _MMC_CORE_PWRSEQ_H - -#include - -struct mmc_host; -struct device; -struct module; - -struct mmc_pwrseq_ops { - void (*pre_power_on)(struct mmc_host *host); - void (*post_power_on)(struct mmc_host *host); - void (*power_off)(struct mmc_host *host); - void (*reset)(struct mmc_host *host); -}; - -struct mmc_pwrseq { - const struct mmc_pwrseq_ops *ops; - struct device *dev; - struct list_head pwrseq_node; - struct module *owner; -}; - -#ifdef CONFIG_OF - -int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq); -void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq); - -int mmc_pwrseq_alloc(struct mmc_host *host); -void mmc_pwrseq_pre_power_on(struct mmc_host *host); -void mmc_pwrseq_post_power_on(struct mmc_host *host); -void mmc_pwrseq_power_off(struct mmc_host *host); -void mmc_pwrseq_reset(struct mmc_host *host); -void mmc_pwrseq_free(struct mmc_host *host); - -#else - -static inline int mmc_pwrseq_register(struct mmc_pwrseq *pwrseq) -{ - return -ENOSYS; -} -static inline void mmc_pwrseq_unregister(struct mmc_pwrseq *pwrseq) {} -static inline int mmc_pwrseq_alloc(struct mmc_host *host) { return 0; } -static inline void mmc_pwrseq_pre_power_on(struct mmc_host *host) {} -static inline void mmc_pwrseq_post_power_on(struct mmc_host *host) {} -static inline void mmc_pwrseq_power_off(struct mmc_host *host) {} -static inline void mmc_pwrseq_reset(struct mmc_host *host) {} -static inline void mmc_pwrseq_free(struct mmc_host *host) {} - -#endif - -#endif diff --git a/drivers/power/pwrseq/core.c b/drivers/power/pwrseq/core.c index d29b4b97b95c..0aaba4e79a44 100644 --- a/drivers/power/pwrseq/core.c +++ b/drivers/power/pwrseq/core.c @@ -68,6 +68,14 @@ static struct pwrseq *_of_pwrseq_get(struct device *dev, const char *id) snprintf(prop_name, sizeof(prop_name), "%s-pwrseq", id); ret = of_parse_phandle_with_args(dev->of_node, prop_name, "#pwrseq-cells", 0, &args); + + /* + * Parsing failed. Try locating old bindings for mmc-pwrseq, which did + * not use #pwrseq-cells. + */ + if (ret == -EINVAL && !strcmp(id, "mmc")) + ret = of_parse_phandle_with_args(dev->of_node, prop_name, NULL, 0, &args); + if (ret == -ENOENT) return NULL; else if (ret < 0) diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 0c0c9a0fdf57..f5daee6c1d7b 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -16,6 +16,7 @@ #include #include #include +#include struct mmc_ios { unsigned int clock; /* clock rate */ @@ -278,7 +279,6 @@ struct mmc_context_info { }; struct regulator; -struct mmc_pwrseq; struct mmc_supply { struct regulator *vmmc; /* Card power supply */ @@ -294,7 +294,7 @@ struct mmc_host { struct device class_dev; int index; const struct mmc_host_ops *ops; - struct mmc_pwrseq *pwrseq; + struct pwrseq *pwrseq; unsigned int f_min; unsigned int f_max; unsigned int f_init; From patchwork Wed Oct 6 03:53:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 515276 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp155080imy; Tue, 5 Oct 2021 20:54:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze2SzbFR/l/y56dlzkiXdw2MRqDbJjcXZKjsVJHf2aiNnOnTdV2JyvD8U+72V10Zv/nJRM X-Received: by 2002:a17:906:b05a:: with SMTP id bj26mr28552957ejb.226.1633492477488; Tue, 05 Oct 2021 20:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633492477; cv=none; d=google.com; s=arc-20160816; b=TBwqQuPiJILAfLn8EYEoD4bKa/MujjFsEl1xzrJqJq0bRsGj9Bv+61jVsQKcEe+cPV lV966wOef9/d0kMmn++nMEf1e6aTrA9UtVMOMW3lgVKKaG1ZZaY3xaI9al7cfp+IHF32 E9OVbqh0OyQl2jsmGOvZTUqNHQ+5dHLtljdlE/VLHvZJyNlzXZMMkpkBBHGSsTIy7eLo SfezJLtFqwbRTKmMpyg5QkTiwisrxcd8gJ2Q4clandp75TAdoM+6Fu2o1zz91xAo6fRj AliLI7etYVOnwZaRUYOI+hq/sx517UkT3MXVuZqQTYWKzGUusi7Ic58Vf3O5t6dRpT2U RQcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NeHIhsZMUr5ykJB6Caqyp6Vh5XIKp8x7h5mO8Gk2lJA=; b=eTNh5gOZ6gLga9iRcmbJ8BM4uRk6SYcdDqhijCMUymD94DXlIc6cZ2evGDbwA+L85c rdDTimgHzEHUgixuv/U6Nee4B9Ri1BP80mVxHfGh08qMlc8pJkqRi0iD2dfg32sqrhis FllYa758DqoQiw4lBqNwwdtDiJQac1aX6EH2lA8xWNJk5EUgkCs3GrIH+83IkrojlaT9 fMm5uJc0qfsIhzrrVTyaWuFtgLkD9pxNpheWK1x9GiKjgRdA/w8FsBEiPI62xacQC3d9 ShIdq/An6tdl4I+n8GSwUfaTKidB3spC24NL3s+D0NWcdt68hf0q+1FKd+oFA5A8maLg 8d/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JUxbS46H; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f11si1037704edf.613.2021.10.05.20.54.37; Tue, 05 Oct 2021 20:54:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JUxbS46H; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237553AbhJFD4Z (ORCPT + 1 other); Tue, 5 Oct 2021 23:56:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237372AbhJFD4L (ORCPT ); Tue, 5 Oct 2021 23:56:11 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41833C061768 for ; Tue, 5 Oct 2021 20:54:19 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id i4so4605226lfv.4 for ; Tue, 05 Oct 2021 20:54:19 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=NeHIhsZMUr5ykJB6Caqyp6Vh5XIKp8x7h5mO8Gk2lJA=; b=JUxbS46H6NBi4pyhUO9ZGHUxljkmmFsu0pJ1MztZTmIx0lOvzlLsrza/qzXhdcfkqA tzHNBu7cho4Ik8BtD9OCsxGoTX0Zhkwq7V+9F31Nt/K4XnLL1j9MSWzoIl+BfwAi2zvB cnoAJpYHzi8Km7qVHJnTMsUttYGJWKqH5V5h3gMpzb4xJ14mpDQrGrl7RvE2hInpCSoP MSAkuk5ii1PH1RSLcCglGm7JDtaOdzA5caqSLHHPViXNkIbGS7xeO+YNFWkqoYHM5IAS MMI7xXBA/oj04pXU6xndAQjW3s2+1gueXHAu78GYMaidhyyqvCgOyGi6JYaoeHC87Xo2 bLQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NeHIhsZMUr5ykJB6Caqyp6Vh5XIKp8x7h5mO8Gk2lJA=; b=zZo2QzrJLP61xBPFQUXKhfR2DBSI/boSAxBP4Pmc3aYPEIowDUPca6AM0d2RKpfRWR w3D9k3ZCA/6sbjC/JAzSzzM+DI8QRqL01KSK6AaIaY4SbiCmGtyVHDARP9RF08IPPVfC D6c88lIKHrqhc3GlJLvXR6/MZsspocvhdS9/C6REXFUgDgz6Kc1SKJkhx79g1FHFjsty 4h3SqjPzV4q8S1Qt02PJAstcd0MzuwVqlPpKQ+9RFKADVH75jLLoXk8PONMT21xoF68X wm5OnJVknp1+okyidAHulQq+Fktn4vSV7Jv9Ntk/dOQF61pXASvw3uYoM7L7RObNELF7 m4DA== X-Gm-Message-State: AOAM5309qjSNLVqFbPJBwBhxFJLd1jgOUfLQK0Q3/hnsp6YL6hJZNxt2 Gi0JxTTD/laQx6XAnlIEn6jIfQ== X-Received: by 2002:a19:7109:: with SMTP id m9mr7621114lfc.112.1633492457604; Tue, 05 Oct 2021 20:54:17 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id s4sm2142967lfd.103.2021.10.05.20.54.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 20:54:16 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Ulf Hansson , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Kalle Valo , "David S. Miller" , Jakub Kicinski , Stanimir Varbanov Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v1 07/15] pwrseq: add fallback support Date: Wed, 6 Oct 2021 06:53:59 +0300 Message-Id: <20211006035407.1147909-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> References: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Power sequencer support requires changing device tree. To ease migration to pwrseq, add support for pwrseq 'fallback': let the power sequencer driver register special handler that if matched will create pwrseq instance basing on the consumer device tree data. Signed-off-by: Dmitry Baryshkov --- drivers/power/pwrseq/Makefile | 2 +- drivers/power/pwrseq/core.c | 3 ++ drivers/power/pwrseq/fallback.c | 88 +++++++++++++++++++++++++++++++++ include/linux/pwrseq/fallback.h | 60 ++++++++++++++++++++++ 4 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 drivers/power/pwrseq/fallback.c create mode 100644 include/linux/pwrseq/fallback.h -- 2.33.0 diff --git a/drivers/power/pwrseq/Makefile b/drivers/power/pwrseq/Makefile index 556bf5582d47..949ec848cf00 100644 --- a/drivers/power/pwrseq/Makefile +++ b/drivers/power/pwrseq/Makefile @@ -3,7 +3,7 @@ # Makefile for power sequencer drivers. # -obj-$(CONFIG_PWRSEQ) += core.o +obj-$(CONFIG_PWRSEQ) += core.o fallback.o obj-$(CONFIG_PWRSEQ_EMMC) += pwrseq_emmc.o obj-$(CONFIG_PWRSEQ_QCA) += pwrseq_qca.o diff --git a/drivers/power/pwrseq/core.c b/drivers/power/pwrseq/core.c index 3dffa52f65ee..30380ca6159a 100644 --- a/drivers/power/pwrseq/core.c +++ b/drivers/power/pwrseq/core.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #define to_pwrseq(a) (container_of((a), struct pwrseq, dev)) @@ -120,6 +121,8 @@ struct pwrseq * pwrseq_get(struct device *dev, const char *id) struct pwrseq *pwrseq; pwrseq = _of_pwrseq_get(dev, id); + if (pwrseq == NULL) + pwrseq = pwrseq_fallback_get(dev, id); if (IS_ERR_OR_NULL(pwrseq)) return pwrseq; diff --git a/drivers/power/pwrseq/fallback.c b/drivers/power/pwrseq/fallback.c new file mode 100644 index 000000000000..b83bd5795ccb --- /dev/null +++ b/drivers/power/pwrseq/fallback.c @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright 2021 (c) Linaro Ltd. + * Author: Dmitry Baryshkov + */ + +#include +#include +#include +#include +#include +#include + +static DEFINE_MUTEX(pwrseq_fallback_mutex); +static LIST_HEAD(pwrseq_fallback_list); + +/** + * __pwrseq_fallback_register - internal helper for pwrseq_fallback_register + * @fallback - struct pwrseq_fallback to be registered + * @owner: module containing fallback callback + * + * Internal helper for pwrseq_fallback_register. It should not be called directly. + */ +int __pwrseq_fallback_register(struct pwrseq_fallback *fallback, struct module *owner) +{ + if (!try_module_get(owner)) + return -EPROBE_DEFER; + + fallback->owner = owner; + + mutex_lock(&pwrseq_fallback_mutex); + list_add_tail(&fallback->list, &pwrseq_fallback_list); + mutex_unlock(&pwrseq_fallback_mutex); + + return 0; +} +EXPORT_SYMBOL_GPL(__pwrseq_fallback_register); + +/** + * pwrseq_fallback_unregister() - unregister fallback helper + * @fallback - struct pwrseq_fallback to unregister + * + * Unregister pwrseq fallback handler registered by pwrseq_fallback_handler. + */ +void pwrseq_fallback_unregister(struct pwrseq_fallback *fallback) +{ + mutex_lock(&pwrseq_fallback_mutex); + list_del(&fallback->list); + mutex_unlock(&pwrseq_fallback_mutex); + + module_put(fallback->owner); + + kfree(fallback); +} +EXPORT_SYMBOL_GPL(pwrseq_fallback_unregister); + +static bool pwrseq_fallback_match(struct device *dev, struct pwrseq_fallback *fallback) +{ + if (of_match_device(fallback->of_match_table, dev) != NULL) + return true; + + /* We might add support for other matching options later */ + + return false; +} + +struct pwrseq *pwrseq_fallback_get(struct device *dev, const char *id) +{ + struct pwrseq_fallback *fallback; + struct pwrseq *pwrseq = ERR_PTR(-ENODEV); + + mutex_lock(&pwrseq_fallback_mutex); + + list_for_each_entry(fallback, &pwrseq_fallback_list, list) { + if (!pwrseq_fallback_match(dev, fallback)) + continue; + + pwrseq = fallback->get(dev, id); + break; + } + + mutex_unlock(&pwrseq_fallback_mutex); + + if (!IS_ERR_OR_NULL(pwrseq)) + dev_warn(dev, "legacy pwrseq support used for the device\n"); + + return pwrseq; +} diff --git a/include/linux/pwrseq/fallback.h b/include/linux/pwrseq/fallback.h new file mode 100644 index 000000000000..14f9aa527692 --- /dev/null +++ b/include/linux/pwrseq/fallback.h @@ -0,0 +1,60 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (c) 2021 Linaro Ltd. + */ + +#ifndef __LINUX_PWRSEQ_FALLBACK_H__ +#define __LINUX_PWRSEQ_FALLBACK_H__ + +#include + +struct pwrseq; + +struct device; +struct module; +struct of_device_id; + +/** + * struct pwrseq_fallback - structure providing fallback data/ + * @list: a list node for the fallback handlers + * @owner: module containing fallback callback + * @of_match_table: match table for this fallback + * + * Pwrseq fallback is a mechanism for handling backwards compatibility in the + * case device tree was not updated to use proper pwrseq providers. + * + * In case the pwrseq instance is not registered, core will automatically try + * locating and calling fallback getter. If the requesting device matches + * against @of_match_table, the @get callback will be called to retrieve pwrseq + * instance. + * + * The driver should fill of_match_table and @get fields only. @list and @owner + * will be filled by the core code. + */ +struct pwrseq_fallback { + struct list_head list; + struct module *owner; + + const struct of_device_id *of_match_table; + + struct pwrseq *(*get)(struct device *dev, const char *id); +}; + +/* provider interface */ + +int __pwrseq_fallback_register(struct pwrseq_fallback *fallback, struct module *owner); + +/** + * pwrseq_fallback_register() - register fallback helper + * @fallback - struct pwrseq_fallback to be registered + * + * Register pwrseq fallback handler to assist pwrseq core. + */ +#define pwrseq_fallback_register(fallback) __pwrseq_fallback_register(fallback, THIS_MODULE) + +void pwrseq_fallback_unregister(struct pwrseq_fallback *fallback); + +/* internal interface to be used by pwrseq core */ +struct pwrseq *pwrseq_fallback_get(struct device *dev, const char *id); + +#endif /* __LINUX_PWRSEQ_DRIVER_H__ */ From patchwork Wed Oct 6 03:54:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 515278 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp155142imy; Tue, 5 Oct 2021 20:54:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNvDkwvpXjqFkMS0TTf3duj/wZf4UPguTFuiMkxsvhAowqN8q51WEGjHX4ER7kkXTIIlXJ X-Received: by 2002:a05:6402:1d15:: with SMTP id dg21mr8246707edb.96.1633492483962; Tue, 05 Oct 2021 20:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633492483; cv=none; d=google.com; s=arc-20160816; b=L9OtxmvI09OUTSUgJh/TcOHsSatNB9LJCflY3bZifJ/xqL5ylOvectd4xEK46b58gN EoItAghp/DtwLBIxBta9hIo3877H/KUcCxbn9eC2JNBZhssAsl/hm91fW4bgFOapT3uu QLAIzz6xCFnS+0gk1HuPH/2f7Dv4bpeK5cO/Cb1vFc7SYhpR/hXURYxC5f92eEwBoJRr uoOdfsdUb8Fk4m9zChK8s2aEYb70CshZlR5LxYBS6MVWDYGbWu8NKSsc0GkjSGD6VdT9 oGz2/wva49FYZ7pv3YXqWQVjl4uwVQNqE58Rc2/GRcpnIJupEPDO5i11MN+xuvqSvcTC Gzmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gLxBTtcfVl4dtJ5J9RXz2IWihrIE1icg8208P8LI768=; b=nfDKncDmItj0r2/PLM4/T5Qykmmr1Cl1OncKTJgC5XwrGJeodzppuZ/uK5f3b5CLZM 6wq542IJ/uuo1nY8BR9RM/ulZzShwa0yiOw9XM12wWUpa0LYkkMv+AS/y48TwGzWe8Eg SQP5AyE+Yse4jLmVjRakwYkmGEQ1aYf7OfndutVpwyNzi3uHCWFdmG0lYOF3Tqa9eVLm RWZ4uzzRGINNwJOROe9ljvqzgqyXnyrmlULSarA0srGUeMeu8tzVjp5LIs48PYsPcSWw 6bNe5sJd0qRBfNv+uJPEDvT8oSfQ6RAW0FsoIoQjl1PgfKE+1uJO4x7rD4saAW/6/SzS qjZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o7/Ze/q0"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si28825141edc.191.2021.10.05.20.54.43; Tue, 05 Oct 2021 20:54:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o7/Ze/q0"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237615AbhJFD4d (ORCPT + 1 other); Tue, 5 Oct 2021 23:56:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237436AbhJFD4N (ORCPT ); Tue, 5 Oct 2021 23:56:13 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 405EDC061767 for ; Tue, 5 Oct 2021 20:54:22 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id y23so4776855lfb.0 for ; Tue, 05 Oct 2021 20:54:22 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=gLxBTtcfVl4dtJ5J9RXz2IWihrIE1icg8208P8LI768=; b=o7/Ze/q0htXc3MD9r6CcG3LU411fiLFkjclIYt5gxydc/GKQKyTk+c7fhvbcoYtnXY 7/e9Y6P+WvNC7PaRnuR6Fs8f/HGSu4cm8HPQMOPF+D42Ao70Z9MCpH+fqsIDFK5zJkDR R6gWSvzoe/3HsUDPDcO1qFwjWV7xhaNAeaxJGZ4Ca0smcF2WjV7pCfl0Im0ofCDBFxmf ZqpC8OxUr+Gjxy55TUUZGalgayt6UEOiDNBvCOqr7z2uJPL94ZyCRoG6wWTIlDvMj9/F Fom9EcqTv3xJHX1Gutf93jM/YB4tttS/qRFlfCz1mTrwIXBMkWVUSeIxW/9VKgUMzgNQ ExTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gLxBTtcfVl4dtJ5J9RXz2IWihrIE1icg8208P8LI768=; b=Gq0xErN/MIauQcrfeQ0kyGDXDCZqqROwq+vvKukSs0pCJ7mlge3VMJ+dHZV04dzWxZ zUH8hbltVZPGoUF0fAb/xXZxzbwR/cFAbbfwKxIo/iUvyGiM69q9pjiqwshTlGGs49wu TW42hSogDqVHYLRUZRaIr+l/iaw2MCGIvduRd7uZ9YwWYBVkFkLB5n76q1EaxV+rofQm nngG5cRsfxV1P6Ssfgenu+V5nGGPEUz+Jp4z/sZCbdhIvNAfHvKdB+1x57AAV/If/PJu o9sJJeEsarLfgtGy27SiRF8yXFs2/RaRB7Enw1omElQq4dq/KMl4OvMtmHv731Rf3QIv YsyQ== X-Gm-Message-State: AOAM53222FSyK+DYEKrXWT6S3zKZ7vwB6wTAprB//HSrPcmXWANu8C0h OmE3G3ItusOoFsdhlQpPUycPFA== X-Received: by 2002:ac2:4c51:: with SMTP id o17mr7353777lfk.457.1633492460649; Tue, 05 Oct 2021 20:54:20 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id s4sm2142967lfd.103.2021.10.05.20.54.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 20:54:19 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Ulf Hansson , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Kalle Valo , "David S. Miller" , Jakub Kicinski , Stanimir Varbanov Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v1 10/15] ath10k: add support for pwrseq sequencing Date: Wed, 6 Oct 2021 06:54:02 +0300 Message-Id: <20211006035407.1147909-11-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> References: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Power sequencing for Qualcomm WiFi+BT chipsets are being reworked to use pwrseq rather than individually handling all the regulators. Add support for pwrseq to ath10k SNOC driver. Signed-off-by: Dmitry Baryshkov --- drivers/net/wireless/ath/ath10k/snoc.c | 45 +++++++++++++------------- drivers/net/wireless/ath/ath10k/snoc.h | 4 +-- 2 files changed, 25 insertions(+), 24 deletions(-) -- 2.33.0 diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index ea00fbb15601..8578c56982df 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -14,6 +14,7 @@ #include #include #include +#include #include "ce.h" #include "coredump.h" @@ -41,14 +42,6 @@ static char *const ce_name[] = { "WLAN_CE_11", }; -static const char * const ath10k_regulators[] = { - "vdd-0.8-cx-mx", - "vdd-1.8-xo", - "vdd-1.3-rfa", - "vdd-3.3-ch0", - "vdd-3.3-ch1", -}; - static const char * const ath10k_clocks[] = { "cxo_ref_clk_pin", "qdss", }; @@ -1010,10 +1003,14 @@ static int ath10k_hw_power_on(struct ath10k *ar) ath10k_dbg(ar, ATH10K_DBG_SNOC, "soc power on\n"); - ret = regulator_bulk_enable(ar_snoc->num_vregs, ar_snoc->vregs); + ret = pwrseq_full_power_on(ar_snoc->pwrseq); if (ret) return ret; + ret = regulator_enable(ar_snoc->vreg_cx_mx); + if (ret) + goto vreg_pwrseq_off; + ret = clk_bulk_prepare_enable(ar_snoc->num_clks, ar_snoc->clks); if (ret) goto vreg_off; @@ -1021,11 +1018,14 @@ static int ath10k_hw_power_on(struct ath10k *ar) return ret; vreg_off: - regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs); + regulator_disable(ar_snoc->vreg_cx_mx); +vreg_pwrseq_off: + pwrseq_power_off(ar_snoc->pwrseq); + return ret; } -static int ath10k_hw_power_off(struct ath10k *ar) +static void ath10k_hw_power_off(struct ath10k *ar) { struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); @@ -1033,7 +1033,9 @@ static int ath10k_hw_power_off(struct ath10k *ar) clk_bulk_disable_unprepare(ar_snoc->num_clks, ar_snoc->clks); - return regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs); + regulator_disable(ar_snoc->vreg_cx_mx); + + pwrseq_power_off(ar_snoc->pwrseq); } static void ath10k_snoc_wlan_disable(struct ath10k *ar) @@ -1691,20 +1693,19 @@ static int ath10k_snoc_probe(struct platform_device *pdev) goto err_release_resource; } - ar_snoc->num_vregs = ARRAY_SIZE(ath10k_regulators); - ar_snoc->vregs = devm_kcalloc(&pdev->dev, ar_snoc->num_vregs, - sizeof(*ar_snoc->vregs), GFP_KERNEL); - if (!ar_snoc->vregs) { - ret = -ENOMEM; + ar_snoc->pwrseq = devm_pwrseq_get(&pdev->dev, "wifi"); + if (IS_ERR(ar_snoc->pwrseq)) { + ret = PTR_ERR(ar_snoc->pwrseq); + if (ret != -EPROBE_DEFER) + ath10k_warn(ar, "failed to acquire pwrseq: %d\n", ret); goto err_free_irq; } - for (i = 0; i < ar_snoc->num_vregs; i++) - ar_snoc->vregs[i].supply = ath10k_regulators[i]; - ret = devm_regulator_bulk_get(&pdev->dev, ar_snoc->num_vregs, - ar_snoc->vregs); - if (ret < 0) + ar_snoc->vreg_cx_mx = devm_regulator_get(&pdev->dev, "vdd-0.8-cx-mx"); + if (IS_ERR(ar_snoc->vreg_cx_mx)) { + ret = PTR_ERR(ar_snoc->vreg_cx_mx); goto err_free_irq; + } ar_snoc->num_clks = ARRAY_SIZE(ath10k_clocks); ar_snoc->clks = devm_kcalloc(&pdev->dev, ar_snoc->num_clks, diff --git a/drivers/net/wireless/ath/ath10k/snoc.h b/drivers/net/wireless/ath/ath10k/snoc.h index 5095d1893681..5188d6f6f850 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.h +++ b/drivers/net/wireless/ath/ath10k/snoc.h @@ -70,10 +70,10 @@ struct ath10k_snoc { struct ath10k_snoc_ce_irq ce_irqs[CE_COUNT_MAX]; struct ath10k_ce ce; struct timer_list rx_post_retry; - struct regulator_bulk_data *vregs; - size_t num_vregs; + struct regulator *vreg_cx_mx; struct clk_bulk_data *clks; size_t num_clks; + struct pwrseq *pwrseq; struct ath10k_qmi *qmi; unsigned long flags; bool xo_cal_supported; From patchwork Wed Oct 6 03:54:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 515282 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp155546imy; Tue, 5 Oct 2021 20:55:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaXaVZrLWvGvKGBNviPjBMCDcJK9AltK530nt8d0538CnBBxvjv2aZXX/+YfW/63qJ/93l X-Received: by 2002:a05:6402:4389:: with SMTP id o9mr19248175edc.38.1633492546283; Tue, 05 Oct 2021 20:55:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633492546; cv=none; d=google.com; s=arc-20160816; b=e3Fssct9jQtJSaCUSy+a3Wg2395lHwFtiPSl3h9XQfNx0h5edKQ72852HuqiPhv6gX sz6nUtxntNFDdC/HfT1K4YZk8xjtMmCEAUbRfECIa+eGiNMSnFGsWUDATUfTPdT60bib iCbC0vIaQp82ipQg/vSrbUo+u2JLbIXqAxHL2XmKLqYUp3gtd7zDb366KdQRt7J/RG7J //P1IBTb32C2oqRXuuIET52QHm83C7IcPFUKZWHJ1rjf2rGYQNZwXGEi/5MJd4yQo2rr 9ff8Octn+eCJKZoeHDnATZtYOi791WZMRH9X9J8RvFZ1qtRGWirEqmdPRB6ofKnxkLZe uxQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fc0GoKyWHbaDUKZRwzSCHWvKPWvkUL1O7EIfFaZFJjw=; b=jAV3mUXVyOltZwVng76dytVZ+MyNNI/TgQfVVxVyBaDQ6BIYxxd+hSZ6Ukcsf4hwEJ IZ3JWx8BjqfeSc6Y/Y3cETUBgwU8vHuBqAPWi6nfaYSCAAeW7J3nxdSWEzwRAtqkBv3D Zz+JyggQwVAH5Du5JY0NMfLLviRrTkBVl/hTIAiQq4vNUaPDCcsfPCEDOBegtQF4NzlT DuHDhnSr3Lqq7mae4mkIKg0qFeds+ny9EQWI6R72NeHFqcO+bXgVmcQjPf+SClZI435R pzx1jw8HQ3l+uWk/QsDvsvCLkVb5U0YBqnT0W5GooabFCq4boYk7PP/67nuA7UTA1cc2 2whA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ek+UBm52; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn19si27872202ejc.517.2021.10.05.20.55.46; Tue, 05 Oct 2021 20:55:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ek+UBm52; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237979AbhJFD5g (ORCPT + 1 other); Tue, 5 Oct 2021 23:57:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237595AbhJFD4b (ORCPT ); Tue, 5 Oct 2021 23:56:31 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35A22C0617B0 for ; Tue, 5 Oct 2021 20:54:24 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id x27so4497012lfa.9 for ; Tue, 05 Oct 2021 20:54:24 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=fc0GoKyWHbaDUKZRwzSCHWvKPWvkUL1O7EIfFaZFJjw=; b=ek+UBm52N/dNF84c5mtTjMTJvJ5oGZ0lbXTAAjAyV1XvQDUOFH0l/tTMhfVzJAVy1s 5A9IIqqQjiddD6Xxi2TTAaGdSgVqpk0Rmqtk98pIDkXppBKhslgFJvZPuN4VYjg8Kh/k NvN7a6TOOxfaYoA9A7SJwXWmEtuPXBVt4gb8badGbZhlGOA620Gyxh4R+YbZd6q49MOv 2Qi1wfxZ+XCc8YcurEshmk0YU/rcgY4765nt9Wx5F406K53k2YpQJYrDUJTkWqNBikGf xKtKknzKdnRkKPLuVnIzXFOf+W03r/taVjHXCFr1DlAWSxc5MKil96Ym1SLsZZZJqpo+ ufLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fc0GoKyWHbaDUKZRwzSCHWvKPWvkUL1O7EIfFaZFJjw=; b=QuA47KUgISmWpYbxs+YscMMtiyTwvn4uo2t7NGjj3YwQd2IR8bLkWIh8dGXFUpNdH1 UubYobL43Nh1fMJiIgxyc9kDH/fUskw1Hj4KfQ4+bRDuTkmLTVZx6cwUiXJKg5WsENXa bXUcwMvkSsN8RQ7GgD0Tl8Zzudv3qcct+29ewbMqDhDyicc7gjEjX/yE2JMCHPwJNaRi GDZd27nMRyD+LN9a3PMu6fWJvlPJOOP3md2DL9NAwEr/248BQpAph/5sUiYz2Mbxm4QC 6wSwLtDWKnj8QPgF34ylG4/HZRdEhZw/pCXNDfXacoFtK2cAX/6miIj+kd36d7T7Ow3X MG4Q== X-Gm-Message-State: AOAM531B2rrFaASWalkVHuzvi9nrA4aOIbdumE3HtbX7zQt7WkXSoQKz Z+iK46stHYxK6qDMKMb8klQxKw== X-Received: by 2002:a2e:9893:: with SMTP id b19mr26949222ljj.112.1633492462601; Tue, 05 Oct 2021 20:54:22 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id s4sm2142967lfd.103.2021.10.05.20.54.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 20:54:22 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Ulf Hansson , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Kalle Valo , "David S. Miller" , Jakub Kicinski , Stanimir Varbanov Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v1 12/15] arm64: dts: qcom: qrb5165-rb5: add bluetooth support Date: Wed, 6 Oct 2021 06:54:04 +0300 Message-Id: <20211006035407.1147909-13-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> References: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Add support for the bluetooth part of the QCA6391 BT+WiFi chip present on the RB5 board. WiFi is not supported yet, as it requires separate handling of the PCIe device power. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) -- 2.33.0 diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 8ac96f8e79d4..326330f528fc 100644 --- a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts +++ b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts @@ -19,6 +19,7 @@ / { aliases { serial0 = &uart12; + serial1 = &uart6; sdhc2 = &sdhc_2; }; @@ -98,6 +99,25 @@ lt9611_3v3: lt9611-3v3 { regulator-always-on; }; + qca_pwrseq: qca-pwrseq { + compatible = "qcom,qca6390-pwrseq"; + + #pwrseq-cells = <1>; + + vddaon-supply = <&vreg_s6a_0p95>; + vddpmu-supply = <&vreg_s2f_0p95>; + vddrfa1-supply = <&vreg_s2f_0p95>; + vddrfa2-supply = <&vreg_s8c_1p3>; + vddrfa3-supply = <&vreg_s5a_1p9>; + vddpcie1-supply = <&vreg_s8c_1p3>; + vddpcie2-supply = <&vreg_s5a_1p9>; + vddio-supply = <&vreg_s4a_1p8>; + + bt-enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; + wifi-enable-gpios = <&tlmm 20 GPIO_ACTIVE_HIGH>; + swctrl-gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>; + }; + thermal-zones { conn-thermal { polling-delay-passive = <0>; @@ -804,6 +824,26 @@ lt9611_rst_pin: lt9611-rst-pin { }; }; +&qup_uart6_default { + ctsrx { + pins = "gpio16", "gpio19"; + drive-strength = <2>; + bias-disable; + }; + + rts { + pins = "gpio17"; + drive-strength = <2>; + bias-disable; + }; + + tx { + pins = "gpio18"; + drive-strength = <2>; + bias-pull-up; + }; +}; + &qupv3_id_0 { status = "okay"; }; @@ -1193,6 +1233,16 @@ sdc2_card_det_n: sd-card-det-n { }; }; +&uart6 { + status = "okay"; + bluetooth { + compatible = "qcom,qca6390-bt"; + clocks = <&sleep_clk>; + + bt-pwrseq = <&qca_pwrseq 1>; + }; +}; + &uart12 { status = "okay"; }; From patchwork Wed Oct 6 03:54:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 515283 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp155714imy; Tue, 5 Oct 2021 20:56:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHLM20AHBpbs1pbFZ0TBHUW0ARg1hGdjMayi+EBI7n4IZMdnRepaNIc6sy5q0j4agK8S6G X-Received: by 2002:a17:906:3854:: with SMTP id w20mr27855692ejc.537.1633492571047; Tue, 05 Oct 2021 20:56:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633492571; cv=none; d=google.com; s=arc-20160816; b=yo0GqJa/y05yo4MzEi0zTS4/7KVmDNXRx7UKKql+yW6BCmqBUKwuyVMn4EqA87Gp+v IJhFHKuKIOniRK9x6CDwLsHtO45dRjkv8cAsaRpvsA2vYuu6V9vuzBzQZ5lZWG88In97 eUjAEqJHXc+xu1k40hD3ok/IDfvoFgEHTaqK3N6pV/3U9yBgoW7hQOqOC1L9a7ZuDepL RNsH7qRoVwJms5NIZ388fBTQRt4J/D6MI9PVtccc73SPzDc+BrZf79HD83Wsk/dYlYrw PssDm+tDq/R2zIHdv9ojdm+KbA5UrrnjByqJLU/IFS6zlI6FGynJG5CAhtZBCDEV6k0C Q9aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lOnAyrBq8epXVQrN/WDXQeiKNCDBNkNLvVnOhj3ua+A=; b=LbtG5fYVUu4CgGGaiIuAcm/5widwJVz3n5TEU+b7Z6EwXP4MdHU0166qZwWyAs9/Z0 xUk6jrn6foKjuPxWXNgtbk3enq+h6NHSiRbNWSJI1iyggop7FslvXhthARKNIlbnSHo9 agrJF+set1cUbFyj9SxjWF0yxFYaSLoeFDgQ+dcsFh+rb/jOpQ3P2euskm+0vkHbLOWe yDI3WHy/mY8zn/kOWgXnS+8jTSGFt4Bu7esNB0U3wX0unkzGaHVzZeOaT0uwUYJcxdxI bcJEkVDVzzFNx4V2IbSqhIIezvyuOMY1agD0TlptGjuW3v5p+239HiABNQ7lpSoeiciU sjzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EXdBcPTC; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 91si15902499edf.128.2021.10.05.20.56.10; Tue, 05 Oct 2021 20:56:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EXdBcPTC; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233064AbhJFD6B (ORCPT + 1 other); Tue, 5 Oct 2021 23:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237429AbhJFD4o (ORCPT ); Tue, 5 Oct 2021 23:56:44 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B995C0617BF for ; Tue, 5 Oct 2021 20:54:25 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id n8so4533173lfk.6 for ; Tue, 05 Oct 2021 20:54:25 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=lOnAyrBq8epXVQrN/WDXQeiKNCDBNkNLvVnOhj3ua+A=; b=EXdBcPTCi9Pbs0BZua/dU4gI91si5Iub0rrfb+BVmheSvGSqXRSQ1kTj9Kqk/o+YSw Sp1PzSb7XxDE6ZWrp4WTBqXtYUK5/iu+ZIPqibNy9cycqyaln2LWVHuzozAYV3rtzlq5 9JDIe22v3Rl6vzgtu8z/JAtQVwEN+sxrE1TnWj64YrQE2kjXFEYtiB6BN+wWrm+JRh2z 9/9v8A1FYXQ/r87Ky9Q+TyRfQMzrhSFQ1bsbzanHx72oRBfaCXppxWib6kYzeC6exCA9 QhKWbm+NHDc5HuI/TPTVgPnlLzD9VM/8PG/YDbKoHhCMtKa7spNdHPUdjZwN94pYp1e4 Xn7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lOnAyrBq8epXVQrN/WDXQeiKNCDBNkNLvVnOhj3ua+A=; b=pz1NF7luIod9wF9i8XgIbm+HIu2gS9o4yiYeUi4WYynaetaCCcLMGqAJCoYbTjQeuM 2BoyWelWonl2jEaXFjqD0OG0NgyumvrBAP+7RyhlKCnauVHrnRvgmlcwmcU6usCZ/2RE CQwfGlQNjAN/1dQYvK/Do+kGxY0FzkYAHQKqc7g6aITJEO5SbQ7yqPw+VJjD+JA1o7vY aA9l8qN7wKG7zCRnfexdhWMjHHqAMAgHx9ctHqJbTSEg9EaxyK1y1B/w4EwYs5+4wM5o k/iVDeTdxn53qnkWyMSBG0GW9AJEK+451nJwwEbDINeo4ydFplxu1fsNcqdO8Y6colwR BbCA== X-Gm-Message-State: AOAM532iPs+8lr0YzovbnNVRLPXwpmGhJwNFXDfLfqF/f+jn5qKdASnN HTeH4K1FS1kDVyN78iaHP6q79g== X-Received: by 2002:a2e:812:: with SMTP id 18mr26729407lji.497.1633492463509; Tue, 05 Oct 2021 20:54:23 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id s4sm2142967lfd.103.2021.10.05.20.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 20:54:23 -0700 (PDT) From: Dmitry Baryshkov To: Andy Gross , Bjorn Andersson , Ulf Hansson , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Kalle Valo , "David S. Miller" , Jakub Kicinski , Stanimir Varbanov Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v1 13/15] arm64: dts: qcom: sdm845-db845c: add second channel to qca power sequencer Date: Wed, 6 Oct 2021 06:54:05 +0300 Message-Id: <20211006035407.1147909-14-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> References: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On DB845c board WiFi/BT chip can use both RF channels/antennas, so add vddch1-supply property. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.33.0 diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index a6a34a959a91..0f3214c60980 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -342,6 +342,12 @@ vreg_l21a_2p95: ldo21 { regulator-initial-mode = ; }; + vreg_l23a_3p3: ldo23 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3312000>; + regulator-initial-mode = ; + }; + vreg_l24a_3p075: ldo24 { regulator-min-microvolt = <3088000>; regulator-max-microvolt = <3088000>; @@ -637,6 +643,7 @@ &qca_pwrseq { vddxo-supply = <&vreg_l7a_1p8>; vddrf-supply = <&vreg_l17a_1p3>; vddch0-supply = <&vreg_l25a_3p3>; + vddch1-supply = <&vreg_l23a_3p3>; }; &sdhc_2 {