[RFC v2 13/13] WIP: arm64: dts: qcom: qrb5165-rb5: add bus-pwrseq property to pcie0

2021-08-29 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts b/arch/arm64/boot/dts/qcom/qrb5165-rb5.dts index 326330f528fc..0c347cb6f8e0 100644 ---

[RFC v2 11/13] arm64: dts: qcom: sdm845-db845c: add second channel to qca power sequencer

2021-08-29 Thread Dmitry Baryshkov
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(+) diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts

[RFC v2 12/13] WIP: PCI: qcom: use pwrseq to power up bus devices

2021-08-29 Thread Dmitry Baryshkov
Use bus-pwrseq device tree node to power up the devices on the bus. This is to be rewritten with the proper code parsing the device tree and powering up individual devices. Signed-off-by: Dmitry Baryshkov --- drivers/pci/controller/dwc/pcie-qcom.c | 13 + 1 file changed, 13

[RFC v2 08/13] ath10k: add support for pwrseq sequencing

2021-08-29 Thread Dmitry Baryshkov
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 +-

[RFC v2 07/13] Bluetooth: hci_qca: switch to using pwrseq

2021-08-29 Thread Dmitry Baryshkov
Signed-off-by: Dmitry Baryshkov --- drivers/bluetooth/hci_qca.c | 260 +--- 1 file changed, 37 insertions(+), 223 deletions(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 53deea2eb7b4..1e4416916533 100644 ---

[RFC v2 02/13] pwrseq: port MMC's pwrseq drivers to new pwrseq subsystem

2021-08-29 Thread Dmitry Baryshkov
Port MMC's all pwrseq drivers to new pwrseq subsystem. Signed-off-by: Dmitry Baryshkov --- .../pwrseq}/mmc-pwrseq-emmc.yaml | 0 .../pwrseq}/mmc-pwrseq-sd8787.yaml| 0 .../pwrseq}/mmc-pwrseq-simple.yaml| 0 drivers/mmc/core/Kconfig

[RFC v2 10/13] arm64: dts: qcom: qrb5165-rb5: add bluetooth support

2021-08-29 Thread Dmitry Baryshkov
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

[RFC v2 00/13] create power sequencing subsystem

2021-08-29 Thread Dmitry Baryshkov
This is the second RFC on the 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. To ease migration to pwrseq and to provide compatibility with older device trees, while

[RFC v2 06/13] pwrseq: pwrseq_qca: implement fallback support

2021-08-29 Thread Dmitry Baryshkov
While we are waiting for all users of wcn399x-bt to be converted to the pwrseq declaration in the device tree, provide support for the pwrseq fallback: if the regulators are declared in the device itself, create pwrseq instance. This way the hci_qca driver doesn't have to cope with old and new dts

[RFC v2 03/13] mmc: core: switch to new pwrseq subsystem

2021-08-29 Thread Dmitry Baryshkov
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

[RFC v2 05/13] pwrseq: add fallback support

2021-08-29 Thread Dmitry Baryshkov
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 ---

[RFC v2 09/13] arm64: dts: qcom: sdm845-db845c: switch bt+wifi to qca power sequencer

2021-08-29 Thread Dmitry Baryshkov
Switch sdm845-db845c device tree to use new power sequencer driver rather than separate regulators. Signed-off-by: Dmitry Baryshkov --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 21 ++--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 6 ++ 2 files changed, 20

[RFC v2 01/13] power: add power sequencer subsystem

2021-08-29 Thread Dmitry Baryshkov
Basing on MMC's pwrseq support code, add separate power sequencer subsystem. It will be used by other drivers to handle device power up requirements. Signed-off-by: Dmitry Baryshkov --- drivers/power/Kconfig | 1 + drivers/power/Makefile | 1 +

[RFC v2 04/13] pwrseq: add support for QCA BT+WiFi power sequencer

2021-08-29 Thread Dmitry Baryshkov
Add support for power sequencer used in the Qualcomm BT+WiFi SoCs. They require several external volate regulators and some of them use separate BT and WiFi enable GPIO pins. This code is mostly extracted from the hci_qca.c bluetooth driver and ath10k WiFi driver. Instead of having each of them