Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp5205745pxb; Tue, 5 Oct 2021 20:54:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhaGfmCt7cXKqUM54PH3ia0FiUGenzLRmxjNhX2CRQZxFrVjbMBuSCyQfMnAYMlOl+Nu5w X-Received: by 2002:a17:90b:4c11:: with SMTP id na17mr8406577pjb.105.1633492492608; Tue, 05 Oct 2021 20:54:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633492492; cv=none; d=google.com; s=arc-20160816; b=NW9PqQvaaTL95Zj/tSurpaaHzBNEDQgXetp2IfmehY1FV0i1KoKUQBKAh8Ya9F8YvE AaKz73O5hI+nMxTqk18br8hMR+5f+L59zsZnxmnvOQZ9K7ADd+rEmvBuYcL+/XtJyW7s fFKcRdDBVRX1EBq64WV69IDXXookdX6PC4kbX/H48pBANx67AEZ6zniw3ELXTVbVuLtZ ttV8olBhMiQ6l1XW7hlPAEyU0JVdzxyhBL4GHjIpcMs8ZBxTW84yHFmCZOMhJ9EHxSLk N+0l2UrUYYlfTDVtumUtU0Qg2xsIiJ6kZqKg3nuIu/D4b13gSqvgkVLF1FJq0lf0qLn9 GNAQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wCCx9f0vU16fSdLBhKBfZ5+A5fVVaqTGyNcvLThJsng=; b=sJVmythuOLDWVDkqeoclMGu71nXIfx9Q7l7i/YkDrdIbvphYas5lPcPMGiDp9eAjkN tRnHH1bN8V6UzUYhV9aLkL3qh/bH3jsH/shvoNFBL0X8z9EmzwJ+FmASrt0F+iu6y9SW DaOFAjtycPosZcoj9jF5zWMA9YEAbqrSrZlbDESmtLMy4YPbXpnsIw3gvjMCJu9k1E10 qUpHGQWQeJYCM+h82dKULRw+St0JETgY02Q0Vkv5txZ/elI8iSkO0XUNoRV8WCOEgC89 sze0WorovBeGgsMhdWfq+w7AorvYkG0bGQG+mWRiGMyiyyRk9C22NWZVMmGtVG+Xh7U1 GrJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zX3kiQrg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 u2si25370109pgf.491.2021.10.05.20.54.33; Tue, 05 Oct 2021 20:54:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=zX3kiQrg; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-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 S231511AbhJFD4F (ORCPT + 75 others); Tue, 5 Oct 2021 23:56:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbhJFD4E (ORCPT ); Tue, 5 Oct 2021 23:56:04 -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 E1D75C06174E for ; Tue, 5 Oct 2021 20:54:12 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id j5so4511087lfg.8 for ; Tue, 05 Oct 2021 20:54:12 -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=wCCx9f0vU16fSdLBhKBfZ5+A5fVVaqTGyNcvLThJsng=; b=zX3kiQrgVD4tpCNxddaJIVuuZr83i4g79u+zwZciJ77tUFwMh3CYloNfFJQLdYRPNN 9TyzfJxsklBDvCzSMoS7/jD6FZTPsXfgaQJEALQMGbwasZVOOApUh+YcFz/B3/tiqTL3 eXF8DTyXAcLwVaCircGD2OYyT66dx6HqGlS9glAh8PR8QSu5T00/1N99gOgovQYU+HyQ OnQGFx4mKlyIptzEkXQ74qIX6k0Gs1XV5vgMKRDExo/OlTpWFMPDf8NNDUrPdTUqYzHw pb0VnYqIB/bHUt0QOdiyLMFzQjv6z98jVYbLnPO/Diris3Az5EsHfwsZ7pGSBMxKJgm8 X+3g== 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:mime-version :content-transfer-encoding; bh=wCCx9f0vU16fSdLBhKBfZ5+A5fVVaqTGyNcvLThJsng=; b=6nCqutOp1UzFKWZZbxn7TOMXXeneEA19XnuT5t92kcA1PrxUrZqVOsSQ7BVDuSDaPk d6nzzTdPMHqiCcxRXytth22FvMjP9VmaS00Gwo+q6SHaY5Euls3ZJJ2cTyfl5LTfnsU9 yiUN/7/ymtJm/W7NVSXR+eQwDfFp6084jy/97ymxsg5KuFYGnQGEOjrGyVu6ESyeg7o3 /o1KRyj7x8S2CG/hxyapRaDVFZGPHnbN/MAodrF5cnl5cEHGZ6ujA5JTncohkTNNf8je LaZhvxoRzo1IHys2CoJUuNU+OJ8cWvgOxtNePeXgSjD010RM3sdASYTmpdJkISves+th UgSg== X-Gm-Message-State: AOAM532fWIR75rq9buz1zbZQeOqRYUf+5cytZLxL5Y82Yze3rr2c12Ts ByjzTRdJvpZ9KIzfoosS/SQ7Xw== X-Received: by 2002:a05:6512:553:: with SMTP id h19mr7453728lfl.7.1633492451130; Tue, 05 Oct 2021 20:54:11 -0700 (PDT) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id s4sm2142967lfd.103.2021.10.05.20.54.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 20:54:10 -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 00/15] create power sequencing subsystem Date: Wed, 6 Oct 2021 06:53:52 +0300 Message-Id: <20211006035407.1147909-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This is a proposed power sequencer subsystem. This is a generification of the MMC pwrseq code. The subsystem tries to abstract the idea of complex power-up/power-down/reset of the devices. The primary set of devices that promted me to create this patchset is the Qualcomm BT+WiFi family of chips. They reside on serial+platform or serial + SDIO interfaces (older generations) or on serial+PCIe (newer generations). They require a set of external voltage regulators to be powered on and (some of them) have separate WiFi and Bluetooth enable GPIOs. The major drawback for now is the lack of proper PCIe integration At this moment support for PCIe is hacked up to be able to test the PCIe part of qca6390. Proper PCIe support would require automatically powering up the devices before the scan basing on the proper device structure in the device tree. This two last patches are noted as WIP and are included into the patchset for the purpose of testing WiFi on newer chips (like qca6390/qca6391). Changes since RFC v2: - Add documentation for the pwrseq code. Document data structures, macros and exported functions. - Export of_pwrseq_xlate_onecell() - Add separate pwrseq_set_drvdata() function to follow the typical API design - Remove pwrseq_get_optional()/devm_pwrseq_get_optional() - Moved code to handle old mmc-pwrseq binding to the MMC patch - Split of_pwrseq_xlate_onecell() support to a separate patch Changes since RFC v1: - Provider pwrseq fallback support - Implement fallback support in pwrseq_qca. - Mmove susclk handling to pwrseq_qca. - Significantly simplify hci_qca.c changes, by dropping all legacy code. Now hci_qca uses only pwrseq calls to power up/down bluetooth parts of the chip.