From nobody Wed Dec 17 15:57:04 2025 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E573B2F25E1; Mon, 27 Oct 2025 11:05:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761563138; cv=none; b=a//+tbgjAKkkO61z5lB99bvHJ9FJbJRpmZHkyjQjEJCZyeKrSw4dRikIWHZbfjDe6IEDhYMTVEwFSWfnGSnNxLyJzAoZ/MdPJjESyz8VJJVT+EpFXtQOmCKt/lsdbzvjFhFyZU1hmeVh7IPOzMcXnsJIWTjIoqyEBR9JtJxSoiQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761563138; c=relaxed/simple; bh=IF7AM2gQNLnbcXW1+U68h00gmTreyqW0I2q0536VDeI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zie5cg5+isihXgxHdRwvIVZi8vroHI8UctxG/wxGERcUE5LHUYgo8O8hVo8OQa6uXDP6U94ZcOFFKFtR+HzaJOUaewe7ZtQMCfSz15KqtqwxzMNh7WevOdVcVEPI+Rt98HhFn9ARIaH8Gr0Mm1dPucrqZNQ6P2T2f7nmvJI51Zk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Cj4aISZB; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Cj4aISZB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1761563134; bh=IF7AM2gQNLnbcXW1+U68h00gmTreyqW0I2q0536VDeI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cj4aISZB3BT9o1F7Sk8pE5qNw0G0Bt0C5bKemSYCFEXMSCyK153KV9JrI9VpO/98Q xtIHA8l8YYDdWnFLIv7lSyXqNipkRqQTTyKDlA8YAIqqzmzQsW53tbvjIIi6o2kp8p s7VSu13V2xesEEKCSlvh2PDXxfI3K+awpbC098kLskv8mg5Cly349x+wKg6JlNkvfj 6IvMVqjkbkmx2TrZDbSP3q+HU/bAsojMiUnPqTZS7ObsYvksCJIYFwgh/Ir4LE8EkX 4jtS/YWpn3xv9qWvL1suxw9qro2b5LNJ21z3qcM73AD8ruDYcH/P9N9hML1mRP9nG7 U9xStBE5yZwyA== Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id 84D9017E12D5; Mon, 27 Oct 2025 12:05:33 +0100 (CET) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, lgirdwood@gmail.com, broonie@kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, wenst@chromium.org, igor.belwon@mentallysanemainliners.org Subject: [PATCH v11 1/9] dt-bindings: regulator: Document MediaTek MT6316 PMIC Regulators Date: Mon, 27 Oct 2025 12:05:19 +0100 Message-ID: <20251027110527.21002-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251027110527.21002-1-angelogioacchino.delregno@collabora.com> References: <20251027110527.21002-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add bindings for the regulators found in the MediaTek MT6316 PMIC, usually found in board designs using the MT6991 Dimensity 9400 and on MT8196 Kompanio SoC for Chromebooks. This chip is fully controlled by SPMI and has multiple variants providing different phase configurations. Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Conor Dooley --- .../regulator/mediatek,mt6316b-regulator.yaml | 76 +++++++++++++++++++ .../regulator/mediatek,mt6316c-regulator.yaml | 76 +++++++++++++++++++ .../regulator/mediatek,mt6316d-regulator.yaml | 75 ++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt= 6316b-regulator.yaml create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt= 6316c-regulator.yaml create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt= 6316d-regulator.yaml diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6316b-r= egulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6316= b-regulator.yaml new file mode 100644 index 000000000000..ea595935f4c4 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6316b-regulato= r.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6316b-regulator.ya= ml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6316 BP/VP SPMI PMIC Regulators + +maintainers: + - AngeloGioacchino Del Regno + +description: + The MediaTek MT6316BP/VP PMICs are fully controlled by SPMI interface, b= oth + feature four step-down DC/DC (buck) converters, and provides 2+2 Phases, + joining Buck 1+2 for the first phase, and Buck 3+4 for the second phase. + +properties: + compatible: + const: mediatek,mt6316b-regulator + + reg: + maxItems: 1 + +patternProperties: + "^vbuck(12|34)$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + properties: + regulator-allowed-modes: + description: | + Allowed Buck regulator operating modes allowed. Valid values bel= ow. + 0 - Normal mode with automatic power saving, reducing the swit= ching + frequency when light load conditions are detected + 1 - Forced Continuous Conduction mode (FCCM) for improved volt= age + regulation accuracy with constant switching frequency but = lower + regulator efficiency + 2 - Forced Low Power mode for improved regulator efficiency, u= sed + when no heavy load is expected, will shut down unnecessary= IP + blocks and secondary phases to reduce quiescent current. + This mode does not limit the maximum output current but un= less + only a light load is applied, there will be regulation acc= uracy + and efficiency losses. + minItems: 1 + maxItems: 3 + items: + enum: [ 0, 1, 2 ] + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + spmi { + #address-cells =3D <2>; + #size-cells =3D <0>; + + pmic@8 { + compatible =3D "mediatek,mt6316b-regulator"; + reg =3D <0x8 SPMI_USID>; + + vbuck12 { + regulator-name =3D "dvdd_core"; + regulator-min-microvolt =3D <450000>; + regulator-max-microvolt =3D <965000>; + regulator-allowed-modes =3D <0 1 2>; + regulator-enable-ramp-delay =3D <256>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6316c-r= egulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6316= c-regulator.yaml new file mode 100644 index 000000000000..186dcd3f11ed --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6316c-regulato= r.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6316c-regulator.ya= ml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6316 CP/HP/KP SPMI PMIC Regulators + +maintainers: + - AngeloGioacchino Del Regno + +description: + The MediaTek MT6316CP/HP/KP PMICs are fully controlled by SPMI interface, + features four step-down DC/DC (buck) converters, and provides 3+1 Phases, + joining Buck 1+2+4 for the first phase, and uses Buck 3 for the second. + +properties: + compatible: + const: mediatek,mt6316c-regulator + + reg: + maxItems: 1 + +patternProperties: + "^vbuck(124|3)$": + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + properties: + regulator-allowed-modes: + description: | + Allowed Buck regulator operating modes allowed. Valid values bel= ow. + 0 - Normal mode with automatic power saving, reducing the swit= ching + frequency when light load conditions are detected + 1 - Forced Continuous Conduction mode (FCCM) for improved volt= age + regulation accuracy with constant switching frequency but = lower + regulator efficiency + 2 - Forced Low Power mode for improved regulator efficiency, u= sed + when no heavy load is expected, will shut down unnecessary= IP + blocks and secondary phases to reduce quiescent current. + This mode does not limit the maximum output current but un= less + only a light load is applied, there will be regulation acc= uracy + and efficiency losses. + minItems: 1 + maxItems: 3 + items: + enum: [ 0, 1, 2 ] + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + spmi { + #address-cells =3D <2>; + #size-cells =3D <0>; + + pmic@6 { + compatible =3D "mediatek,mt6316c-regulator"; + reg =3D <0x6 SPMI_USID>; + + vbuck124 { + regulator-name =3D "dvdd_proc_m"; + regulator-min-microvolt =3D <450000>; + regulator-max-microvolt =3D <1277500>; + regulator-allowed-modes =3D <0 1 2>; + regulator-enable-ramp-delay =3D <256>; + }; + }; + }; +... diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6316d-r= egulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6316= d-regulator.yaml new file mode 100644 index 000000000000..aa9e9ef3b52d --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6316d-regulato= r.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6316d-regulator.ya= ml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6316 DP/TP SPMI PMIC Regulators + +maintainers: + - AngeloGioacchino Del Regno + +description: + The MediaTek MT6316DP/TP PMICs are fully controlled by SPMI interface, b= oth + feature four step-down DC/DC (buck) converters, and provides a single Ph= ase, + joining Buck 1+2+3+4. + +properties: + compatible: + const: mediatek,mt6316d-regulator + + reg: + maxItems: 1 + + vbuck1234: + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + properties: + regulator-allowed-modes: + description: | + Allowed Buck regulator operating modes allowed. Valid values bel= ow. + 0 - Normal mode with automatic power saving, reducing the swit= ching + frequency when light load conditions are detected + 1 - Forced Continuous Conduction mode (FCCM) for improved volt= age + regulation accuracy with constant switching frequency but = lower + regulator efficiency + 2 - Forced Low Power mode for improved regulator efficiency, u= sed + when no heavy load is expected, will shut down unnecessary= IP + blocks and secondary phases to reduce quiescent current. + This mode does not limit the maximum output current but un= less + only a light load is applied, there will be regulation acc= uracy + and efficiency losses. + minItems: 1 + maxItems: 3 + items: + enum: [ 0, 1, 2 ] + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + spmi { + #address-cells =3D <2>; + #size-cells =3D <0>; + + pmic@7 { + compatible =3D "mediatek,mt6316d-regulator"; + reg =3D <0x7 SPMI_USID>; + + vbuck1234 { + regulator-name =3D "dvdd_gpustack"; + regulator-min-microvolt =3D <400000>; + regulator-max-microvolt =3D <1277500>; + regulator-allowed-modes =3D <0 1 2>; + regulator-enable-ramp-delay =3D <256>; + }; + }; + }; +... --=20 2.51.1