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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FA30C433EF for ; Wed, 6 Oct 2021 03:55:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05A51611C1 for ; Wed, 6 Oct 2021 03:55:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237037AbhJFD4I (ORCPT ); Tue, 5 Oct 2021 23:56:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230409AbhJFD4E (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 052AFC061760 for ; Tue, 5 Oct 2021 20:54:12 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id u18so4429369lfd.12 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=BVwhuLwYS5AucJhydPc1xcdJ+wPdb2ZsSwpHe4J046fpdi/VUH0JvT2xlWb9a2F6hU 7r4OJmQu5UgxnjlxPpuiHegswkBQehjWPRHQ1SU2NpRc4qlVJnIXKK2zRzk0dWDKZkQb Kru9RLF1Q1mX9MAFyJ4hm7sF8769rqRn1K9ZG4h3rEOc81PLpCxdaYXbOWvg4SFT0ebX z7AnzeNCALPQBYqGkLUUk9zOtgCF/4CsGfqsgSAaSlIv2aqj53iDBU/iunYIjL6zkig1 QPAOZBdphzWlgMj32kU5mmznQdrArYF6CSAJqjXSthQq1lew3s9sfP8pSzE7pqt9NlG2 zv3g== X-Gm-Message-State: AOAM532siuctJpPzUGs8wiSbmcvo4/Xk4j+jtntPbcv01voi2xE4AGik NuABF7P7dDnDkCJuDYYZduFUDg== X-Google-Smtp-Source: ABdhPJzPZd/pHGI4jIrZHD3KVL2DcSrVWuPmq+ruK4twP5QWTbb7x2llr5UqxIb5QV/vVHrqtwge4Q== 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-kernel@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.