From nobody Thu Oct 9 01:13:12 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 D072624502E; Mon, 23 Jun 2025 12:02:00 +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=1750680122; cv=none; b=eKXXV1GCyb6/t+I6OY17pzt+bBRVSPA7A9fimME+jSXDOjyKO+QXzJPZiuj2gUIPjzc6wspOR9L+4+7eOTX1P95k1l5nk4kMyAfwqj8WUGlF/5L1cVAuSpKr6NxVNncRuWO96cGm9UWBBI5LlahZOIOCJePq1bb4OqEKO5QapYE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750680122; c=relaxed/simple; bh=jO2rjFk9i243G6Aw+p0m6PxiIWHJHcPYQISiJmBvTKc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VXnLym0H6dKYbNDNURKa5xcOtwypZrhgV0crtXUWPLqG3I01egDZR95+Tn5WSaQ9UrL38ATUsCcoBpHp+thUCFRwajNMrhdJU+BRJ0wt+impT9Pwrcy/O0QVDM9dvdhGX3tzWXx3TUNdhbCVyoKG+3C14SnE4MAJrVgldBxpaCs= 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=lcj5TK7b; 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="lcj5TK7b" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1750680119; bh=jO2rjFk9i243G6Aw+p0m6PxiIWHJHcPYQISiJmBvTKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lcj5TK7bu0qWiStHrfRqT5uzRdTb+RFr//YbMOPGIrLZVCm3fqtqdVy+nx8Cz//IY ZN6FQru9SwLvQSOxLd5gLnu6WejVqE17vNXgijzEiMSBBSZBXwLgeUqyBL2L2Y/6/l b45jYNHxeK8HOILW8U/S73VtjeM4d6+FRSuzQ8Nt6YWTH5Nkvz8xEHSZqjjYL+nKhZ yQZKfyGFbR64Zq3RXxvdJhiUDua12xqn3V/26qQoy6J0cSVYg9kq+St4ZMaFzN8oaR PU8QsUCFYxVphCBODtuLC4j3dUDDtbyeASNXh07BoQis+F6irHUtMkXL5JIJro/V1m 7Z9Tpu7hi9ycA== 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 4540017E0342; Mon, 23 Jun 2025 14:01:58 +0200 (CEST) From: AngeloGioacchino Del Regno To: linux-mediatek@lists.infradead.org Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, ulf.hansson@linaro.org, y.oudjana@protonmail.com, fshao@chromium.org, wenst@chromium.org, lihongbo22@huawei.com, mandyjh.liu@mediatek.com, mbrugger@suse.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, kernel@collabora.com Subject: [PATCH v1 01/13] dt-bindings: power: mediatek: Document mediatek,bus-protection Date: Mon, 23 Jun 2025 14:01:42 +0200 Message-ID: <20250623120154.109429-2-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250623120154.109429-1-angelogioacchino.delregno@collabora.com> References: <20250623120154.109429-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 a new mediatek,bus-protection property in the main power controller node and deprecate the old mediatek,infracfg, mediatek,infracfg-nao and mediatek,smi properties located in the children. This is done in order to both simplify the power controller nodes and in preparation for adding support for new generation SoCs like MT8196/MT6991 and other variants, which will need to set protection on new busses. Signed-off-by: AngeloGioacchino Del Regno --- .../power/mediatek,power-controller.yaml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/Documentation/devicetree/bindings/power/mediatek,power-control= ler.yaml b/Documentation/devicetree/bindings/power/mediatek,power-controlle= r.yaml index 9c7cc632abee..2530c873bb3c 100644 --- a/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml +++ b/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml @@ -44,6 +44,18 @@ properties: '#size-cells': const: 0 =20 + mediatek,bus-protection: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: + A number of phandles to external blocks to set and clear the required + bits to enable or disable bus protection, necessary to avoid any bus + faults while enabling or disabling a power domain. + For example, this may hold phandles to INFRACFG and SMI. + minItems: 1 + maxItems: 3 + items: + maxItems: 1 + patternProperties: "^power-domain@[0-9a-f]+$": $ref: "#/$defs/power-domain-node" @@ -123,14 +135,17 @@ $defs: mediatek,infracfg: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the device containing the INFRACFG registe= r range. + deprecated: true =20 mediatek,infracfg-nao: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the device containing the INFRACFG-NAO reg= ister range. + deprecated: true =20 mediatek,smi: $ref: /schemas/types.yaml#/definitions/phandle description: phandle to the device containing the SMI register ran= ge. + deprecated: true =20 required: - reg @@ -138,6 +153,31 @@ $defs: required: - compatible =20 +allOf: + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8183-power-controller + then: + properties: + mediatek,bus-protection: + minItems: 2 + maxItems: 2 + + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8365-power-controller + then: + properties: + mediatek,bus-protection: + minItems: 3 + maxItems: 3 + additionalProperties: false =20 examples: --=20 2.49.0