From 53765c8d581eedf8ff8c122fe9fa9a18f4da9d53 Mon Sep 17 00:00:00 2001 From: Rajkumar Patel Date: Sat, 15 Mar 2025 15:31:09 +0530 Subject: [PATCH 1/6] dt-bindings: Add QUSB & USB BAM on dt-bindings This change adds the entries of qusb phys and usb bam in yaml format. Change-Id: I5697f28cf786ab6cc61c462a164ff4b0e4e68aac Signed-off-by: Rajkumar Patel --- bindings/soc/qcom/qcom,usb-bam.yaml | 189 +++++++++++++++++++++++ bindings/usb/qcom,qusb2phy.yaml | 228 ++++++++++++++++++++++++++++ 2 files changed, 417 insertions(+) create mode 100644 bindings/soc/qcom/qcom,usb-bam.yaml create mode 100644 bindings/usb/qcom,qusb2phy.yaml diff --git a/bindings/soc/qcom/qcom,usb-bam.yaml b/bindings/soc/qcom/qcom,usb-bam.yaml new file mode 100644 index 00000000..1f8c905b --- /dev/null +++ b/bindings/soc/qcom/qcom,usb-bam.yaml @@ -0,0 +1,189 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,usb-bam.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: MSM USB Bus Access Manager (BAM) + +maintainers: + - Abdul Salam + +description: + This describes the device used to interface the USB controller + with the Smart Peripheral Subsystem (SPS). The BAM serves to + connect USB directly with other peer peripherals in the system + and is statically configured with a number of unidirectional pipes. + +properties: + compatible: + const: qcom,usb-bam-msm + + reg: + description: pair of physical base addresses and region size of BAM device + + interrupts: + description: IRQ line for BAM device + maxItems: 1 + + qcom,usb-bam-num-pipes: + description: max number of pipes that can be used + + qcom,usb-bam-fifo-baseaddr: + description: | + base address for bam pipe's data and descriptor + fifos. This can be on chip memory (ocimem). This + property is required if sub-node's mem-type is ocimem or usb private mem. + + qcom,disable-clk-gating: + description: If present then disable BAM clock gating. + + qcom,usb-bam-override-threshold: + description: | + If present then the default 512 byte threshold + is overridden. This threshold configures the threshold value for Read/Write + event generation by the BAM towards another BAM. + + qcom,usb-bam-max-mbps-highspeed: + description: | + max mbps in high speed connection + for either rx or tx direction. + + qcom,usb-bam-max-mbps-superspeed: + description: | + max mbps in super speed connection + for either rx or tx direction. + + qcom,reset-bam-on-connect: + description: | + If present then BAM is RESET before connecting + pipe. This may be required if BAM peripheral is also reset before connect. + + qcom,reset-bam-on-disconnect: + description: If present then BAM is RESET after disconnecting pipes. + +required: + - compatible + - reg + - interrupts + - qcom,usb-bam-num-pipes + +additionalProperties: false + +patternProperties: + "^qcom,pipe[0-9]+$": + type: object + description: A number of USB BAM pipe parameters are represented as sub-nodes + + properties: + label: + description: | + a string describing uniquely the usb bam pipe. The string can be + constracted as follows- ---. + core options- hsusb, ssusb/dwc3, hsic + peer options- qdss, ipa + direction options- in (from peer to usb), out (from usb to peer) + pipe num options- 0..127 + + qcom,usb-bam-mem-type: + description: | + Type of memory used by this PIPE. Can be one of + 0 - Uses SPS's dedicated pipe memory + 1 - System RAM allocated by driver + 2 - OCI memory residing @ 'qcom,usb-bam-fifo-baseaddr' + + qcom,dir: + description: | + pipe direction + 0 - from usb (out) + 1 - to usb (in) + + qcom,pipe-num: + description: pipe number + + qcom,peer-bam: + description: | + peer BAM can be one of + 0 - QDSS_P_BAM + 1 - IPA_P_BAM + + qcom,data-fifo-size: + description: data fifo size + + qcom,descriptor-fifo-size: + description: descriptor fifo size + + qcom,peer-bam-physical-address: + description: | + peer BAM's physical address. + Not specified for IPA and used only for qdss connection + + qcom,dst-bam-pipe-index: + description: destination BAM pipe index + + qcom,src-bam-pipe-index: + description: source BAM pipe index + + qcom,data-fifo-offset: + description: data fifo offset address + + qcom,descriptor-fifo-offset: + description: descriptor fifo offset address + + qcom,pipe-connection-type: + description: | + type of pipe connection. Can be one of + 0 - BAM2BAM (default if not specified) + 1 - SYS2BAM (only supported on UL) + + required: + - label + - qcom,usb-bam-mem-type + - qcom,dir + - qcom,pipe-num + - qcom,peer-bam + - qcom,data-fifo-size + - qcom,descriptor-fifo-size + + additionalProperties: false + +examples: + - | + qcom,usbbam@f9a44000 { + compatible = "qcom,usb-bam-msm"; + reg = <0xf9a44000 0x11000>; + interrupts = <0 135 0>; + qcom,usb-bam-num-pipes = <16>; + qcom,ignore-core-reset-ack; + qcom,disable-clk-gating; + qcom,usb-bam-max-mbps-highspeed = <400>; + qcom,usb-bam-max-mbps-superspeed = <3600>; + qcom,bam-type = <1>; + qcom,bam-mode = <0>; + + qcom,pipe0 { + label = "hsusb-ipa-out-0"; + qcom,usb-bam-mem-type = <0>; + qcom,dir = <0>; + qcom,pipe-num = <0>; + qcom,peer-bam = <2>; + qcom,src-bam-pipe-index = <1>; + qcom,data-fifo-offset = <0x2200>; + qcom,data-fifo-size = <0x1e00>; + qcom,descriptor-fifo-offset = <0x2100>; + qcom,descriptor-fifo-size = <0x100>; + }; + qcom,pipe1 { + label = "hsusb-ipa-in-0"; + qcom,usb-bam-mem-type = <0>; + qcom,dir = <1>; + qcom,pipe-num = <0>; + qcom,peer-bam = <2>; + qcom,dst-bam-pipe-index = <0>; + qcom,data-fifo-offset = <0x300>; + qcom,data-fifo-size = <0x1e00>; + qcom,descriptor-fifo-offset = <0>; + qcom,descriptor-fifo-size = <0x300>; + }; + }; +... diff --git a/bindings/usb/qcom,qusb2phy.yaml b/bindings/usb/qcom,qusb2phy.yaml new file mode 100644 index 00000000..63480d94 --- /dev/null +++ b/bindings/usb/qcom,qusb2phy.yaml @@ -0,0 +1,228 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/usb/qcom,qusb2phy.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. Qualcomm USB Phy + +maintainers: + - Udipto Goswami + +properties: + compatible: + enum: + - qcom,qusb2phy + - qcom,qusb2phy-v2 + + reg: + description: Address and length of the registers set for the phy. + minItems: 1 + maxItems: 7 + + reg-names: + minItems: 1 + items: + - const: qusb_phy_base + - const: eud_enable_reg + - const: efuse_addr + - const: refgen_north_bg_reg_addr + + qcom,efuse-bit-pos: + description: External fuse register bit required for phy functionality. + $ref: /schemas/types.yaml#/definitions/uint32 + + qcom,efuse-num-bits: + description: External fuse register number of bit to be read. + + vdd-supply: + description: vdd supply for HSPHY digital circuit operation. + + vdda18-supply: + description: 1.8 V for HSPHY. + + vdda33-supply: + description: 3.3 V for HSPHY. + + refgen-supply: + description: Refgen regulator required for phy to work. + + qcom,vdd-voltage-level: + description: Voltage level of the vdd supply. + This is set to min value to vote from usb. + $ref: /schemas/types.yaml#/definitions/uint32-array + + clocks: + description: | + A list of phandles to the phy clocks:: + - ref_clk_src:: Reference clk source required for enumeration. + - ref_clk:: Reference clk required for enumeration. + minItems: 1 + maxItems: 3 + + clock-names: + minItems: 1 + items: + - const: ref_clk_src + - const: ref_clk + + resets: + maxItems: 1 + + reset-names: + items: + - const: phy_reset + + phy_type: + oneOf: + - items: + - const: utmi + - items: + - const: ulpi + + qcom,qusb-phy-init-seq: + description: Phy Initialization sequence required for init. + items: + items: + - + description: address + - + description: value + + qcom,qusb-phy-reg-offset: + description: Phy Register offsets required for probe. + $ref: /schemas/types.yaml#/definitions/uint32-array + items: + - + description: address + + qcom,qusb-phy-host-init-seq: + description: Host mode phy initialization sequence required for init. + items: + items: + - + description: address + - + description: value + +if: + properties: + compatible: + contains: + enum: + - qcom,qusb2phy-v2 +then: + required: + - qcom,qusb-phy-reg-offset + - qcom,qusb-phy-host-init-seq +else: + properties: + qcom,qusb-phy-reg-offset: false + qcom,qusb-phy-host-init-seq: false + +additionalProperties: false + +required: + - compatible + - reg + - clocks + - clock-names + - vdd-supply + - vdda18-supply + - vdda33-supply + - resets + - phy_type + - qcom,qusb-phy-init-seq + + +examples: + - | + #include + #include + + qusb2_phy0: qusb@162b000 { + compatible = "qcom,qusb2phy-v2"; + reg = <0x162B000 0x114>, + <0x0162A000 0x1000>, + <0x1b40268 0x4>, + <0x0162f014 0x4>; + + reg-names = "qusb_phy_base", + "eud_enable_reg", + "efuse_addr", + "refgen_north_bg_reg_addr"; + + qcom,efuse-bit-pos = <25>; + qcom,efuse-num-bits = <3>; + + vdd-supply = <&L18A>; + vdda18-supply = <&L2A>; + vdda33-supply = <&L3A>; + refgen-supply = <&L22A>; + qcom,vdd-voltage-level = <0 880000 880000>; + + clocks = <&rpmcc RPM_SMD_XO_CLK_SRC>, + <&gcc GCC_USB3_PRIM_CLKREF_CLK>; + clock-names = "ref_clk_src", "ref_clk"; + + resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>; + reset-names = "phy_reset"; + + phy_type= "utmi"; + + qcom,qusb-phy-reg-offset = + <0x240 /* QUSB2PHY_PORT_TUNE1 */ + 0x1a0 /* QUSB2PHY_PLL_COMMON_STATUS_ONE */ + 0x210 /* QUSB2PHY_PWR_CTRL1 */ + 0x230 /* QUSB2PHY_INTR_CTRL */ + 0x0a8 /* QUSB2PHY_PLL_CORE_INPUT_OVERRIDE */ + 0x254 /* QUSB2PHY_TEST1 */ + 0x198 /* PLL_BIAS_CONTROL_2 */ + 0x27c /* QUSB2PHY_DEBUG_CTRL1 */ + 0x280 /* QUSB2PHY_DEBUG_CTRL2 */ + 0x284 /* QUSB2PHY_DEBUG_CTRL3 */ + 0x288 /* QUSB2PHY_DEBUG_CTRL4 */ + 0x2a0>; /* QUSB2PHY_STAT5 */ + + qcom,qusb-phy-init-seq = + /* */ + <0x23 0x210 /* PWR_CTRL1 */ + 0x03 0x04 /* PLL_ANALOG_CONTROLS_TWO */ + 0x7c 0x18c /* PLL_CLOCK_INVERTERS */ + 0x80 0x2c /* PLL_CMODE */ + 0x0a 0x184 /* PLL_LOCK_DELAY */ + 0x19 0xb4 /* PLL_DIGITAL_TIMERS_TWO */ + 0x40 0x194 /* PLL_BIAS_CONTROL_1 */ + 0x22 0x198 /* PLL_BIAS_CONTROL_2 */ + 0x21 0x214 /* PWR_CTRL2 */ + 0x08 0x220 /* IMP_CTRL1 */ + 0x58 0x224 /* IMP_CTRL2 */ + 0x45 0x240 /* TUNE1 */ + 0x29 0x244 /* TUNE2 */ + 0xca 0x248 /* TUNE3 */ + 0x04 0x24c /* TUNE4 */ + 0x03 0x250 /* TUNE5 */ + 0x30 0x23c /* CHG_CTRL2 */ + 0x22 0x210>; /* PWR_CTRL1 */ + + qcom,qusb-phy-host-init-seq = + /* */ + <0x23 0x210 /* PWR_CTRL1 */ + 0x03 0x04 /* PLL_ANALOG_CONTROLS_TWO */ + 0x7c 0x18c /* PLL_CLOCK_INVERTERS */ + 0x80 0x2c /* PLL_CMODE */ + 0x0a 0x184 /* PLL_LOCK_DELAY */ + 0x19 0xb4 /* PLL_DIGITAL_TIMERS_TWO */ + 0x40 0x194 /* PLL_BIAS_CONTROL_1 */ + 0x22 0x198 /* PLL_BIAS_CONTROL_2 */ + 0x21 0x214 /* PWR_CTRL2 */ + 0x08 0x220 /* IMP_CTRL1 */ + 0x58 0x224 /* IMP_CTRL2 */ + 0x45 0x240 /* TUNE1 */ + 0x29 0x244 /* TUNE2 */ + 0xca 0x248 /* TUNE3 */ + 0x04 0x24c /* TUNE4 */ + 0x03 0x250 /* TUNE5 */ + 0x30 0x23c /* CHG_CTRL2 */ + 0x22 0x210>; /* PWR_CTRL1 */ + }; From 61331f06390fc1177c9e4f813f3020389bdbfc1e Mon Sep 17 00:00:00 2001 From: Dhaval Radiya Date: Wed, 5 Mar 2025 15:44:28 +0530 Subject: [PATCH 2/6] ARM: dts: msm: Add RPMH controlled PMIC regulators for SM6150 Add rpmh-regulator snapshot for SM6150 from qcom-6.1 branch commits 0dcf0e0ea8bb ("ARM: dts: msm: Initial DTS support for SA6155"). Change-Id: Ica7b4c09b98233cce66f72b5ecc73fcb38d1a0b0 Signed-off-by: Dhaval Radiya --- qcom/sm6150-regulator.dtsi | 706 +++++++++++++++++++++++++++++++++++++ qcom/sm6150.dtsi | 3 + 2 files changed, 709 insertions(+) create mode 100644 qcom/sm6150-regulator.dtsi diff --git a/qcom/sm6150-regulator.dtsi b/qcom/sm6150-regulator.dtsi new file mode 100644 index 00000000..f7b93815 --- /dev/null +++ b/qcom/sm6150-regulator.dtsi @@ -0,0 +1,706 @@ +// SPDX-License-Identifier: BSD-3-Clause +/* + * Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved. + */ + +#include + +&apps_rsc_drv2 { + /* RPMh regulators: */ + + /* pm6150 S3 - VDD_MX supply */ + rpmh-regulator-mxlvl { + compatible = "qcom,rpmh-arc-regulator"; + qcom,resource-name = "mx.lvl"; + + VDD_MX_LEVEL: + S3A_LEVEL: pm6150_s3_level: regulator-pm6150-s3 { + regulator-name = "pm6150_s3_level"; + qcom,set = ; + regulator-min-microvolt = + ; + regulator-max-microvolt = + ; + qcom,init-voltage-level = + ; + }; + + VDD_MX_LEVEL_AO: + S3A_LEVEL_AO: pm6150_s3_level_ao: regulator-pm6150-s3-level-ao { + regulator-name = "pm6150_s3_level_ao"; + qcom,set = ; + regulator-min-microvolt = + ; + regulator-max-microvolt = + ; + qcom,init-voltage-level = + ; + }; + }; + + /* pm6150 S1 - VDD_CX supply */ + rpmh-regulator-cxlvl { + compatible = "qcom,rpmh-arc-regulator"; + qcom,resource-name = "cx.lvl"; + proxy-supply = <&VDD_CX_LEVEL>; + + VDD_CX_LEVEL: + S1A_LEVEL: pm6150_s1_level: regulator-pm6150-s1 { + regulator-name = "pm6150_s1_level"; + qcom,set = ; + pm6150_s1_level-parent-supply = <&VDD_MX_LEVEL>; + regulator-min-microvolt = + ; + regulator-max-microvolt = + ; + qcom,init-voltage-level = + ; + qcom,min-dropout-voltage-level = <(-1)>; + }; + + VDD_CX_LEVEL_AO: + S1A_LEVEL_AO: pm6150_s1_level_ao: regulator-pm6150-s1-level-ao { + qcom,set = ; + regulator-name = "pm6150_s1_level_ao"; + vin-supply = <&VDD_MX_LEVEL_AO>; + regulator-min-microvolt = + ; + regulator-max-microvolt = + ; + qcom,init-voltage-level = + ; + qcom,min-dropout-voltage-level = <(-1)>; + }; + }; + + rpmh-regulator-smpc1 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "smpc1"; + S1C: pm6150l_s1: regulator-pm6150l-s1 { + regulator-name = "pm6150l_s1"; + qcom,set = ; + regulator-min-microvolt = <1128000>; + regulator-max-microvolt = <1128000>; + qcom,init-voltage = <1128000>; + }; + }; + + rpmh-regulator-smpc2 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "smpc2"; + S2C: pm6150l_s2: regulator-pm6150l-s2 { + regulator-name = "pm6150l_s2"; + qcom,set = ; + regulator-min-microvolt = <348000>; + regulator-max-microvolt = <648000>; + qcom,init-voltage = <348000>; + }; + }; + + /* pm6150l S7 - VDD_MSS supply */ + rpmh-regulator-modemlvl { + compatible = "qcom,rpmh-arc-regulator"; + qcom,resource-name = "mss.lvl"; + + VDD_MSS_LEVEL: + S7C_LEVEL: pm6150l_s7_level: regulator-pm6150l-s7 { + regulator-name = "pm6150l_s7_level"; + qcom,set = ; + regulator-min-microvolt = + ; + regulator-max-microvolt = + ; + qcom,init-voltage-level = + ; + }; + }; + + rpmh-regulator-smpc8 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "smpc8"; + S8C: pm6150l_s8: regulator-pm6150l-s8 { + regulator-name = "pm6150l_s8"; + qcom,set = ; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1400000>; + qcom,init-voltage = <1200000>; + }; + }; + + rpmh-regulator-ldoa1 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa1"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L1A: pm6150_l1: regulator-pm6150-l1 { + regulator-name = "pm6150_l1"; + qcom,set = ; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1252000>; + qcom,init-voltage = <1200000>; + }; + }; + + rpmh-regulator-ldoa2 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa2"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L2A: pm6150_l2: regulator-pm6150-l2 { + regulator-name = "pm6150_l2"; + qcom,set = ; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1050000>; + qcom,init-voltage = <1000000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa3 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa3"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L3A: pm6150_l3: regulator-pm6150-l3 { + regulator-name = "pm6150_l3"; + qcom,set = ; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1060000>; + qcom,init-voltage = <1000000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa4 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa4"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + proxy-supply = <&pm6150_l4>; + L4A: pm6150_l4: regulator-pm6150-l4 { + regulator-name = "pm6150_l4"; + qcom,set = ; + regulator-min-microvolt = <875000>; + regulator-max-microvolt = <975000>; + qcom,init-voltage = <875000>; + qcom,init-mode = ; + qcom,proxy-consumer-enable; + qcom,proxy-consumer-current = <23800>; + }; + }; + + rpmh-regulator-ldoa5 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa5"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L5A: pm6150_l5: regulator-pm6150-l5 { + regulator-name = "pm6150_l5"; + qcom,set = ; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2970000>; + qcom,init-voltage = <2500000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa6 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa6"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L6A: pm6150_l6: regulator-pm6150-l6 { + regulator-name = "pm6150_l6"; + qcom,set = ; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <650000>; + qcom,init-voltage = <600000>; + qcom,init-mode = ; + }; + }; + + /* pm6150 L7 - LPI_MX supply */ + rpmh-regulator-lmxlvl { + compatible = "qcom,rpmh-arc-regulator"; + qcom,resource-name = "lmx.lvl"; + L7A_LEVEL: pm6150_l7_level: regulator-pm6150-l7 { + regulator-name = "pm6150_l7_level"; + qcom,set = ; + regulator-min-microvolt = + ; + regulator-max-microvolt = + ; + qcom,init-voltage-level = + ; + }; + }; + + /* pm6150 L8 - LPI_CX supply */ + rpmh-regulator-lcxlvl { + compatible = "qcom,rpmh-arc-regulator"; + qcom,resource-name = "lcx.lvl"; + L8A_LEVEL: pm6150_l8_level: regulator-pm6150-l8 { + regulator-name = "pm6150_l8_level"; + qcom,set = ; + regulator-min-microvolt = + ; + regulator-max-microvolt = + ; + qcom,init-voltage-level = + ; + }; + }; + + /* pm6150 L9 - WCSS_CX supply */ + rpmh-regulator-ldoa9 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa9"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L9A: pm6150_l9: regulator-pm6150-l9 { + regulator-name = "pm6150_l9"; + qcom,set = ; + regulator-min-microvolt = <400000>; + regulator-max-microvolt = <728000>; + qcom,init-voltage = <400000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa10 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa10"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L10A: pm6150_l10: regulator-pm6150-l10 { + regulator-name = "pm6150_l10"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1829000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa11 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa11"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L11A: pm6150_l11: regulator-pm6150-l11 { + regulator-name = "pm6150_l11"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1890000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa12 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa12"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L12A: pm6150_l12: regulator-pm6150-l12 { + regulator-name = "pm6150_l12"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1950000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa13 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa13"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + proxy-supply = <&pm6150_l13>; + L13A: pm6150_l13: regulator-pm6150-l13 { + regulator-name = "pm6150_l13"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1900000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + qcom,proxy-consumer-enable; + qcom,proxy-consumer-current = <115000>; + }; + }; + + rpmh-regulator-ldoa14 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa14"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L14A: pm6150_l14: regulator-pm6150-l14 { + regulator-name = "pm6150_l14"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1850000>; + qcom,init-voltage = <1800000>; + regulator-always-on; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa15 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa15"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L15A: pm6150_l15: regulator-pm6150-l15 { + regulator-name = "pm6150_l15"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1900000>; + qcom,init-voltage = <1800000>; + regulator-always-on; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa16 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa16"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L16A: pm6150_l16: regulator-pm6150-l16 { + regulator-name = "pm6150_l16"; + qcom,set = ; + regulator-min-microvolt = <2430000>; + regulator-max-microvolt = <2970000>; + qcom,init-voltage = <2430000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa17 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa17"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L17A: pm6150_l17: regulator-pm6150-l17 { + regulator-name = "pm6150_l17"; + qcom,set = ; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3230000>; + qcom,init-voltage = <3000000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa18 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa18"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L18A: pm6150_l18: regulator-pm6150-l18 { + regulator-name = "pm6150_l18"; + qcom,set = ; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3008000>; + qcom,init-voltage = <3000000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoa19 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoa19"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L19A: pm6150_l19: regulator-pm6150-l19 { + regulator-name = "pm6150_l19"; + qcom,set = ; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3008000>; + qcom,init-voltage = <2700000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc1 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc1"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L1C: pm6150l_l1: regulator-pm6150l-l1 { + regulator-name = "pm6150l_l1"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1900000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc2 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc2"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L2C: pm6150l_l2: regulator-pm6150l-l2 { + regulator-name = "pm6150l_l2"; + qcom,set = ; + regulator-min-microvolt = <1304000>; + regulator-max-microvolt = <1304000>; + qcom,init-voltage = <1304000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc3 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc3"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + proxy-supply = <&pm6150l_l3>; + L3C: pm6150l_l3: regulator-pm6150l-l3 { + regulator-name = "pm6150l_l3"; + qcom,set = ; + regulator-min-microvolt = <1232000>; + regulator-max-microvolt = <1260000>; + qcom,init-voltage = <1232000>; + qcom,init-mode = ; + qcom,proxy-consumer-enable; + qcom,proxy-consumer-current = <51800>; + }; + }; + + rpmh-regulator-ldoc4 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc4"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L4C: pm6150l_l4: regulator-pm6150l-l4 { + regulator-name = "pm6150l_l4"; + qcom,set = ; + regulator-min-microvolt = <1650000>; + regulator-max-microvolt = <2950000>; + qcom,init-voltage = <1650000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc5 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc5"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L5C: pm6150l_l5: regulator-pm6150l-l5 { + regulator-name = "pm6150l_l5"; + qcom,set = ; + regulator-min-microvolt = <1650000>; + regulator-max-microvolt = <2950000>; + qcom,init-voltage = <1650000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc6 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc6"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L6C: pm6150l_l6: regulator-pm6150l-l6 { + regulator-name = "pm6150l_l6"; + qcom,set = ; + regulator-min-microvolt = <1650000>; + regulator-max-microvolt = <3100000>; + qcom,init-voltage = <1650000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc7 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc7"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L7C: pm6150l_l7: regulator-pm6150l-l7 { + regulator-name = "pm6150l_l7"; + qcom,set = ; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3312000>; + qcom,init-voltage = <3000000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc8 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc8"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L8C: pm6150l_l8: regulator-pm6150l-l8 { + regulator-name = "pm6150l_l8"; + qcom,set = ; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1900000>; + qcom,init-voltage = <1800000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc9 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc9"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L9C: pm6150l_l9: regulator-pm6150l-l9 { + regulator-name = "pm6150l_l9"; + qcom,set = ; + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <3312000>; + qcom,init-voltage = <2950000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc10 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc10"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 10000>; + L10C: pm6150l_l10: regulator-pm6150l-l10 { + regulator-name = "pm6150l_l10"; + qcom,set = ; + regulator-min-microvolt = <3200000>; + regulator-max-microvolt = <3312000>; + qcom,init-voltage = <3200000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-ldoc11 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "ldoc11"; + qcom,regulator-type = "pmic5-ldo"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1>; + L11C: pm6150l_l11: regulator-pm6150l-l11 { + regulator-name = "pm6150l_l11"; + qcom,set = ; + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <3312000>; + qcom,init-voltage = <2950000>; + qcom,init-mode = ; + }; + }; + + rpmh-regulator-bobc1 { + compatible = "qcom,rpmh-vrm-regulator"; + qcom,resource-name = "bobc1"; + qcom,regulator-type = "pmic5-bob"; + qcom,supported-modes = + ; + qcom,mode-threshold-currents = <0 1000000 2000000>; + qcom,send-defaults; + + BOB: pm6150l_bob: regulator-pm6150l-bob { + regulator-name = "pm6150l_bob"; + qcom,set = ; + regulator-min-microvolt = <3296000>; + regulator-max-microvolt = <3960000>; + qcom,init-voltage = <3296000>; + qcom,init-mode = ; + }; + + BOB_AO: pm6150l_bob_ao: regulator-pm6150l-bob-ao { + regulator-name = "pm6150l_bob_ao"; + qcom,set = ; + regulator-min-microvolt = <3296000>; + regulator-max-microvolt = <3960000>; + qcom,init-voltage = <3296000>; + qcom,init-mode = ; + }; + }; +}; diff --git a/qcom/sm6150.dtsi b/qcom/sm6150.dtsi index 8b0d7c2c..72b62dd6 100644 --- a/qcom/sm6150.dtsi +++ b/qcom/sm6150.dtsi @@ -5,6 +5,7 @@ #include #include +#include / { model = "Qualcomm Technologies, Inc. SM6150"; @@ -566,3 +567,5 @@ "l3-scu-faultirq"; }; }; + +#include "sm6150-regulator.dtsi" From 65717ed0862c9efd396b27ce805813308d4a4c07 Mon Sep 17 00:00:00 2001 From: Kamal Wadhwa Date: Tue, 18 Mar 2025 17:19:12 +0530 Subject: [PATCH 3/6] ARM: dts: qcom: Add XO calibration trigger support for tuna WLAN has a requirement to trigger a PBS sequence for XO calibration for factory testing. To support this, expose a new register under PMK8550 SDAM2 for clients to write input data into and a new PBS regulator on which clients can vote to trigger the PBS sequence. Change-Id: Ia314c8cba7a6205943b99e7530990ea6dde8b09c Signed-off-by: Kamal Wadhwa --- qcom/tuna-regulators.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/qcom/tuna-regulators.dtsi b/qcom/tuna-regulators.dtsi index 32bfa254..99caf721 100644 --- a/qcom/tuna-regulators.dtsi +++ b/qcom/tuna-regulators.dtsi @@ -1367,4 +1367,15 @@ qcom,init-voltage = <3304000>; }; }; + + rpmh-regulator-vrm-wcal { + compatible = "qcom,rpmh-pbs-regulator"; + qcom,resource-name = "vrm.wcal"; + + WCAL_PBS: + pmk8550_wcal_pbs: regulator-pmk8550-wcal-pbs { + regulator-name = "pmk8550_wcal_pbs"; + qcom,set = ; + }; + }; }; From c5ac33f01fa73e1a51fa062e42614bad9342348a Mon Sep 17 00:00:00 2001 From: Kamal Wadhwa Date: Wed, 2 Apr 2025 16:43:08 +0530 Subject: [PATCH 4/6] ARM: dts: qcom: Add XO calibration NVMEM in PMK8550 WLAN has a requirement to trigger a PBS sequence for XO calibration for factory testing. As part of this feature expose a new register under PMK8550 SDAM2, which will be used by PBS for reading XO trims settings. Change-Id: I620b2d9d0ca6b7452f693ff665ddf995f17e4e2c Signed-off-by: Kamal Wadhwa --- qcom/pmk8550.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qcom/pmk8550.dtsi b/qcom/pmk8550.dtsi index 53b8a139..100e7ca5 100644 --- a/qcom/pmk8550.dtsi +++ b/qcom/pmk8550.dtsi @@ -61,6 +61,10 @@ reg = <0x58 0x1>; }; + xo_calib_data: xo_calib-data@59 { + reg = <0x59 0x1>; + }; + alarm_log: alarm-log@76 { reg = <0x76 0x6>; }; From c62c4c7af3227b912ec593f9146a87c560b55516 Mon Sep 17 00:00:00 2001 From: Kamal Wadhwa Date: Tue, 18 Mar 2025 14:30:16 +0530 Subject: [PATCH 5/6] ARM: dts: qcom: Add XO calibration trigger support for sun WLAN has a requirement to trigger a PBS sequence for XO calibration for factory testing. To support this, expose a new register under PMK8550 SDAM2 for clients to write input data into and a new PBS regulator on which clients can vote to trigger the PBS sequence. Change-Id: I0e4882d842ea57def4dfdfe4baa5e606a3847f40 Signed-off-by: Kamal Wadhwa --- qcom/sun-regulators.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/qcom/sun-regulators.dtsi b/qcom/sun-regulators.dtsi index 5b075b50..04eab768 100644 --- a/qcom/sun-regulators.dtsi +++ b/qcom/sun-regulators.dtsi @@ -1,6 +1,6 @@ // SPDX-License-Identifier: BSD-3-Clause /* - * Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2023-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -1489,4 +1489,16 @@ qcom,init-voltage = <3304000>; }; }; + + rpmh-regulator-vrm-wcal { + compatible = "qcom,rpmh-pbs-regulator"; + qcom,resource-name = "vrm.wcal"; + + WCAL_PBS: + pmk8550_wcal_pbs: regulator-pmk8550-wcal-pbs { + regulator-name = "pmk8550_wcal_pbs"; + qcom,set = ; + }; + }; + }; From 9beba3aef1e33db17ca65e8a3461785b1351a2b8 Mon Sep 17 00:00:00 2001 From: Ankur Matariya Date: Tue, 8 Apr 2025 11:36:42 +0530 Subject: [PATCH 6/6] bindings: pinctrl: Add pinctrl bindings for SM610 Added bindings for SM6150 pinctrl. Change-Id: I7e06b398f3bdd705669f14bd94b652dfd8d2c19c Signed-off-by: Ankur Matariya --- bindings/pinctrl/qcom,sm6150-pinctrl.yaml | 97 +++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 bindings/pinctrl/qcom,sm6150-pinctrl.yaml diff --git a/bindings/pinctrl/qcom,sm6150-pinctrl.yaml b/bindings/pinctrl/qcom,sm6150-pinctrl.yaml new file mode 100644 index 00000000..9fed1124 --- /dev/null +++ b/bindings/pinctrl/qcom,sm6150-pinctrl.yaml @@ -0,0 +1,97 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pinctrl/qcom,sm6150-pinctrl.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. SM6150 TLMM block + +maintainers: + - Ankur Matariya + +description: | + This binding describes the Top Level Mode Multiplexer block found in the SM6150 platform. + +allOf: + - $ref: "pinctrl.yaml#" + - $ref: "/schemas/pinctrl/qcom,tlmm-common.yaml#" + +properties: + compatible: + description: Must be "qcom,sm6150-pinctrl" + + reg: + description: The base address and size of the north, south, west, and east TLMM tiles. + minItems: 1 + items: + - description: "North TLMM tile" + - description: "South TLMM tile" + - description: "West TLMM tile" + - description: "East TLMM tile" + + reg-names: + description: Names for the reg cells, must contain "north", "south", "west", and "east". + items: + - const: "west" + - const: "south" + - const: "east" + - const: "north" + + interrupts: + description: Specifies the TLMM summary IRQ. + maxItems: 1 + + interrupt-controller: + description: Identifies this node as an interrupt controller. + type: boolean + + '#interrupt-cells': + description: Must be 2, specifying the pin number and flags. + const: 2 + + gpio-controller: + description: Identifies this node as a GPIO controller. + type: boolean + + '#gpio-cells': + description: Must be 2, specifying the pin number and flags. + const: 2 + + gpio-ranges: + description: See ../gpio/gpio.txt. + maxItems: 1 + + gpio-reserved-ranges: + description: Optional reserved ranges of GPIOs. + maxItems: 1 + +required: + - compatible + - reg + - reg-names + - interrupts + - interrupt-controller + - '#interrupt-cells' + - gpio-controller + - '#gpio-cells' + - gpio-ranges + +unevaluatedProperties: false + +examples: + - | + tlmm: pinctrl@3000000 { + compatible = "qcom,sm6150-pinctrl"; + reg = <0x03100000 0x300000>, + <0x03500000 0x300000>, + <0x03900000 0x300000>, + <0x03D00000 0x300000>; + reg-names = "west", "east", "north", "south"; + interrupts = ; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&tlmm 0 0 175>; + gpio-reserved-ranges = <0 4>, <126 4>; + interrupt-controller; + #interrupt-cells = <2>; + }; \ No newline at end of file