Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions Documentation/devicetree/bindings/regulator/qcom,wcn3990-pmu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/qcom,wcn3990-pmu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Technologies, Inc. WCN3990 PMU Regulators

maintainers:
- Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

description:
The WCN3990 package contains discrete modules for WLAN and Bluetooth. They
are powered by the Power Management Unit (PMU) that takes inputs from the
host and provides LDO outputs. This document describes this module.

properties:
compatible:
enum:
- qcom,wcn3950-pmu
- qcom,wcn3988-pmu
- qcom,wcn3990-pmu
- qcom,wcn3991-pmu
- qcom,wcn3998-pmu

vddio-supply:
description: VDD_IO supply regulator handle

vddxo-supply:
description: VDD_XTAL supply regulator handle

vddrf-supply:
description: VDD_RF supply regulator handle

vddch0-supply:
description: chain 0 supply regulator handle

vddch1-supply:
description: chain 1 supply regulator handle

swctrl-gpios:
maxItems: 1
description: GPIO line indicating the state of the clock supply to the BT module

clocks:
maxItems: 1
description: Reference clock handle

regulators:
type: object
description:
LDO outputs of the PMU

patternProperties:
"^ldo[0-9]$":
$ref: regulator.yaml#
type: object
unevaluatedProperties: false

additionalProperties: false

required:
- compatible
- regulators
- vddio-supply
- vddxo-supply
- vddrf-supply
- vddch0-supply

additionalProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>
pmu {
compatible = "qcom,wcn3990-pmu";

vddio-supply = <&vreg_io>;
vddxo-supply = <&vreg_xo>;
vddrf-supply = <&vreg_rf>;
vddch0-supply = <&vreg_ch0>;

regulators {
vreg_pmu_io: ldo0 {
regulator-name = "vreg_pmu_io";
};

vreg_pmu_xo: ldo1 {
regulator-name = "vreg_pmu_xo";
};

vreg_pmu_rf: ldo2 {
regulator-name = "vreg_pmu_rf";
};

vreg_pmu_ch0: ldo3 {
regulator-name = "vreg_pmu_ch0";
};
};
};
60 changes: 52 additions & 8 deletions arch/arm64/boot/dts/qcom/qrb2210-rb1.dts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,42 @@
};
};
};

wcn3950-pmu {
compatible = "qcom,wcn3950-pmu";

pinctrl-0 = <&sw_ctrl_default>;
pinctrl-names = "default";

vddio-supply = <&pm4125_l15>;
vddxo-supply = <&pm4125_l13>;
vddrf-supply = <&pm4125_l10>;
vddch0-supply = <&pm4125_l22>;

swctrl-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;

regulators {
vreg_pmu_io: ldo0 {
regulator-name = "vreg_pmu_io";
};

vreg_pmu_xo: ldo1 {
regulator-name = "vreg_pmu_xo";
};

vreg_pmu_rf: ldo2 {
regulator-name = "vreg_pmu_rf";
};

vreg_pmu_ch0: ldo3 {
regulator-name = "vreg_pmu_ch0";
};

vreg_pmu_ch1: ldo4 {
regulator-name = "vreg_pmu_ch1";
};
};
};
};

&cpu_pd0 {
Expand Down Expand Up @@ -679,6 +715,12 @@
bias-disable;
};

sw_ctrl_default: sw-ctrl-default-state {
pins = "gpio87";
function = "gpio";
bias-pull-down;
};

sd_det_in_on: sd-det-in-on-state {
pins = "gpio88";
function = "gpio";
Expand Down Expand Up @@ -714,11 +756,10 @@
bluetooth {
compatible = "qcom,wcn3950-bt";

vddio-supply = <&pm4125_l15>;
vddxo-supply = <&pm4125_l13>;
vddrf-supply = <&pm4125_l10>;
vddch0-supply = <&pm4125_l22>;
enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
vddio-supply = <&vreg_pmu_io>;
vddxo-supply = <&vreg_pmu_xo>;
vddrf-supply = <&vreg_pmu_rf>;
vddch0-supply = <&vreg_pmu_ch0>;
max-speed = <3200000>;
};
};
Expand Down Expand Up @@ -759,10 +800,13 @@
};

&wifi {
/* SoC */
vdd-0.8-cx-mx-supply = <&pm4125_l7>;
vdd-1.8-xo-supply = <&pm4125_l13>;
vdd-1.3-rfa-supply = <&pm4125_l10>;
vdd-3.3-ch0-supply = <&pm4125_l22>;

/* WiFi / BT PMU */
vdd-1.8-xo-supply = <&vreg_pmu_xo>;
vdd-1.3-rfa-supply = <&vreg_pmu_rf>;
vdd-3.3-ch0-supply = <&vreg_pmu_ch0>;
qcom,calibration-variant = "Thundercomm_RB1";
firmware-name = "qcm2290";
status = "okay";
Expand Down
62 changes: 53 additions & 9 deletions arch/arm64/boot/dts/qcom/qrb4210-rb2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,42 @@
regulator-always-on;
regulator-boot-on;
};

wcn3988-pmu {
compatible = "qcom,wcn3988-pmu";

pinctrl-0 = <&sw_ctrl_default>;
pinctrl-names = "default";

vddio-supply = <&vreg_l9a_1p8>;
vddxo-supply = <&vreg_l16a_1p3>;
vddrf-supply = <&vreg_l17a_1p3>;
vddch0-supply = <&vreg_l23a_3p3>;

swctrl-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;

regulators {
vreg_pmu_io: ldo0 {
regulator-name = "vreg_pmu_io";
};

vreg_pmu_xo: ldo1 {
regulator-name = "vreg_pmu_xo";
};

vreg_pmu_rf: ldo2 {
regulator-name = "vreg_pmu_rf";
};

vreg_pmu_ch0: ldo3 {
regulator-name = "vreg_pmu_ch0";
};

vreg_pmu_ch1: ldo4 {
regulator-name = "vreg_pmu_ch1";
};
};
};
};

&gpi_dma0 {
Expand Down Expand Up @@ -684,6 +720,12 @@
bias-disable;
};

sw_ctrl_default: sw-ctrl-default-state {
pins = "gpio87";
function = "gpio";
bias-pull-down;
};

sdc2_card_det_n: sd-card-det-n-state {
pins = "gpio88";
function = "gpio";
Expand All @@ -694,7 +736,7 @@

&uart3 {
interrupts-extended = <&intc GIC_SPI 330 IRQ_TYPE_LEVEL_HIGH>,
<&tlmm 11 IRQ_TYPE_LEVEL_HIGH>;
<&tlmm 11 IRQ_TYPE_EDGE_FALLING>;
pinctrl-0 = <&uart3_default>;
pinctrl-1 = <&uart3_sleep>;
pinctrl-names = "default", "sleep";
Expand All @@ -703,11 +745,10 @@
bluetooth {
compatible = "qcom,wcn3988-bt";

vddio-supply = <&vreg_l9a_1p8>;
vddxo-supply = <&vreg_l16a_1p3>;
vddrf-supply = <&vreg_l17a_1p3>;
vddch0-supply = <&vreg_l23a_3p3>;
enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
vddio-supply = <&vreg_pmu_io>;
vddxo-supply = <&vreg_pmu_xo>;
vddrf-supply = <&vreg_pmu_rf>;
vddch0-supply = <&vreg_pmu_ch0>;
max-speed = <3200000>;
};
};
Expand Down Expand Up @@ -744,10 +785,13 @@
};

&wifi {
/* SoC */
vdd-0.8-cx-mx-supply = <&vreg_l8a_0p664>;
vdd-1.8-xo-supply = <&vreg_l16a_1p3>;
vdd-1.3-rfa-supply = <&vreg_l17a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l23a_3p3>;

/* WiFi / BT PMU */
vdd-1.8-xo-supply = <&vreg_pmu_xo>;
vdd-1.3-rfa-supply = <&vreg_pmu_rf>;
vdd-3.3-ch0-supply = <&vreg_pmu_ch0>;
qcom,calibration-variant = "Thundercomm_RB2";
firmware-name = "qrb4210";

Expand Down
66 changes: 58 additions & 8 deletions arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,43 @@
regulator-always-on;
regulator-boot-on;
};

wcn3990-pmu {
compatible = "qcom,wcn3990-pmu";

pinctrl-0 = <&sw_ctrl_default>;
pinctrl-names = "default";

vddio-supply = <&vreg_l13a_1p8>;
vddxo-supply = <&vreg_l9a_1p8>;
vddrf-supply = <&vreg_l6a_1p3>;
vddch0-supply = <&vreg_l19a_3p3>;
vddch1-supply = <&vreg_l8b_3p3>;

swctrl-gpios = <&pm660_gpios 5 GPIO_ACTIVE_HIGH>;

regulators {
vreg_pmu_io: ldo0 {
regulator-name = "vreg_pmu_io";
};

vreg_pmu_xo: ldo1 {
regulator-name = "vreg_pmu_xo";
};

vreg_pmu_rf: ldo2 {
regulator-name = "vreg_pmu_rf";
};

vreg_pmu_ch0: ldo3 {
regulator-name = "vreg_pmu_ch0";
};

vreg_pmu_ch1: ldo4 {
regulator-name = "vreg_pmu_ch1";
};
};
};
};

&adreno_gpu {
Expand Down Expand Up @@ -197,10 +234,10 @@
bluetooth {
compatible = "qcom,wcn3990-bt";

vddio-supply = <&vreg_l13a_1p8>;
vddxo-supply = <&vreg_l9a_1p8>;
vddrf-supply = <&vreg_l6a_1p3>;
vddch0-supply = <&vreg_l19a_3p3>;
vddio-supply = <&vreg_pmu_io>;
vddxo-supply = <&vreg_pmu_xo>;
vddrf-supply = <&vreg_pmu_rf>;
vddch0-supply = <&vreg_pmu_ch0>;
max-speed = <3200000>;
};
};
Expand Down Expand Up @@ -238,6 +275,16 @@
linux,code = <KEY_VOLUMEUP>;
};

&pm660_gpios {
sw_ctrl_default: sw-ctrl-default-state {
pins = "gpio5";
function = "normal";

input-enable;
bias-pull-down;
};
};

&qusb2phy0 {
status = "okay";

Expand Down Expand Up @@ -503,11 +550,14 @@
};

&wifi {
/* SoC */
vdd-0.8-cx-mx-supply = <&vreg_l5a_0p8>;
vdd-1.8-xo-supply = <&vreg_l9a_1p8>;
vdd-1.3-rfa-supply = <&vreg_l6a_1p3>;
vdd-3.3-ch0-supply = <&vreg_l19a_3p3>;
vdd-3.3-ch1-supply = <&vreg_l8b_3p3>;

/* WiFi / BT PMU */
vdd-1.8-xo-supply = <&vreg_pmu_xo>;
vdd-1.3-rfa-supply = <&vreg_pmu_rf>;
vdd-3.3-ch0-supply = <&vreg_pmu_ch0>;
vdd-3.3-ch1-supply = <&vreg_pmu_ch1>;

qcom,calibration-variant = "Inforce_IFC6560";

Expand Down
Loading