From nobody Thu Sep 19 23:10:34 2024 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (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 0D9101D0DEB; Wed, 7 Aug 2024 09:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723022288; cv=none; b=sHEe9hy2v0/mZOIhXsdgCudMqXUOQig9LIeV1BwcFbYTpxBH+qf9Voz0K7b+j+tcjlnkqoNu6CivcV/NTxckoi3XLIm6cn+g6kK4P0DKgXF6sI+123NuviliGpSZVAO+ADB0eCTP7Kk9LMOtduh/oiKXm6Xxxws4Zb8L6jOaj4U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723022288; c=relaxed/simple; bh=xpuXkfC99cseuPtMLKPA7hWreyFF2FJaTjPbUqEtNow=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=g5c1FEHRGSs5Di/VTsNWsuNr+5LL+FdpA6GEJFL35MWZs6nCHZuRcnaD4Mw9Q3TAoX1klhS3GEPZtA4u1xslYPCcbvkC36YSK26QWtmWJvNKI9IaDw8ziXKlt6ZDWE2CZ5x4+V1C5qwAONukAOSzozpnaYzoCGgjyalV2aqr5wA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=bOv9wSod; arc=none smtp.client-ip=210.61.82.184 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="bOv9wSod" X-UUID: ef3be980549d11ef87684b57767b52b1-20240807 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=4adnKWsx8j+xY9XsC5ULWsr2arXgZtlYtnwhVJWPCIA=; b=bOv9wSodG3YYF2vR5w9T9N7sqAGUswVch66rAt/Jp6MbzfG0aWISS1alZIxWIfPhrc+brqigOXYhutFTat3hequ2nFtqyOPEnMynAdlLfBIxo1lSqifq8cW6mD7TIj3Wzoh4gAo1yyIRWm9JJYADF4JLUwl79sulAQsmf4+T1IU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.41,REQID:a0aec6e8-1ca9-4bd1-90dc-0540a62e981c,IP:0,U RL:25,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:25 X-CID-META: VersionHash:6dc6a47,CLOUDID:5a92d63e-6019-4002-9080-12f7f4711092,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|1,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0,LES :1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULN X-UUID: ef3be980549d11ef87684b57767b52b1-20240807 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1953208826; Wed, 07 Aug 2024 17:17:57 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Wed, 7 Aug 2024 17:17:57 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Wed, 7 Aug 2024 17:17:57 +0800 From: Macpaul Lin To: AngeloGioacchino Del Regno , Matthias Brugger , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Bear Wang , Pablo Sun , Macpaul Lin , Macpaul Lin , Sen Chu , Jason-ch Chen , Chris-qj chen , MediaTek Chromebook Upstream , , , , , Chen-Yu Tsai Subject: [PATCH v2] dt-bindings: regulator: mediatek,mt6397-regulator: convert to YAML Date: Wed, 7 Aug 2024 17:17:38 +0800 Message-ID: <20240807091738.18387-1-macpaul.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 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 X-MTK: N Content-Type: text/plain; charset="utf-8" Convert the MediaTek MT6397 regulator bindings to DT schema. Signed-off-by: Sen Chu Signed-off-by: Macpaul Lin Acked-by: Conor Dooley --- .../regulator/mediatek,mt6397-regulator.yaml | 238 ++++++++++++++++++ .../bindings/regulator/mt6397-regulator.txt | 220 ---------------- 2 files changed, 238 insertions(+), 220 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt= 6397-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/mt6397-regu= lator.txt Changes for v2: - Remove unnecessary regulator-compatibles. - Drop the top node of the parent device. Since the parent device is still in txt format, we are not moving this example to the parent device schema. - Use 4 spaces for indentation in the example. - Replace the old name in the example with the generic name "mt6397_regula= tors: regulators". diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6397-re= gulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6397-= regulator.yaml new file mode 100644 index 0000000..50db678 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6397-regulator= .yaml @@ -0,0 +1,238 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6397-regulator.yam= l# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6397 Regulator + +maintainers: + - Sen Chu + - Macpaul Lin + +description: + Regulator node of the PMIC. This node should under the PMIC's device nod= e. + All voltage regulators provided by the PMIC are described as sub-nodes of + this node. + +properties: + compatible: + items: + - const: mediatek,mt6397-regulator + +patternProperties: + "^(buck_)?v(core|drm|gpu|io18|pca(7|15)|sramca(7|15))$": + description: Buck regulators + type: object + $ref: regulator.yaml# + properties: + regulator-allowed-modes: + description: | + BUCK regulators can set regulator-initial-mode and regulator-all= owed-modes to + values specified in dt-bindings/regulator/mediatek,mt6397-regula= tor.h + items: + enum: [0, 1] + unevaluatedProperties: false + + "^(ldo_)?v(tcxo|(a|io)28)$": + description: LDOs with fixed 2.8V output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + properties: + regulator-allowed-modes: false + unevaluatedProperties: false + + "^(ldo_)?vusb$": + description: LDOs with fixed 3.0V output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + properties: + regulator-allowed-modes: false + unevaluatedProperties: false + + "^(ldo_)?v(cama|emc3v3|gp[123456]|ibr|mc|mch)$": + description: LDOs with variable output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + properties: + regulator-allowed-modes: false + unevaluatedProperties: false + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + + mt6397_regulators: regulators { + compatible =3D "mediatek,mt6397-regulator"; + + mt6397_vpca15_reg: buck_vpca15 { + regulator-name =3D "vpca15"; + regulator-min-microvolt =3D < 850000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <200>; + }; + + mt6397_vpca7_reg: buck_vpca7 { + regulator-name =3D "vpca7"; + regulator-min-microvolt =3D < 850000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <115>; + }; + + mt6397_vsramca15_reg: buck_vsramca15 { + regulator-name =3D "vsramca15"; + regulator-min-microvolt =3D < 850000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <115>; + }; + + mt6397_vsramca7_reg: buck_vsramca7 { + regulator-name =3D "vsramca7"; + regulator-min-microvolt =3D < 850000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <115>; + }; + + mt6397_vcore_reg: buck_vcore { + regulator-name =3D "vcore"; + regulator-min-microvolt =3D < 850000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <115>; + }; + + mt6397_vgpu_reg: buck_vgpu { + regulator-name =3D "vgpu"; + regulator-min-microvolt =3D < 700000>; + regulator-max-microvolt =3D <1350000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <115>; + }; + + mt6397_vdrm_reg: buck_vdrm { + regulator-name =3D "vdrm"; + regulator-min-microvolt =3D < 800000>; + regulator-max-microvolt =3D <1400000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <500>; + }; + + mt6397_vio18_reg: buck_vio18 { + regulator-name =3D "vio18"; + regulator-min-microvolt =3D <1500000>; + regulator-max-microvolt =3D <2120000>; + regulator-ramp-delay =3D <12500>; + regulator-enable-ramp-delay =3D <500>; + }; + + mt6397_vtcxo_reg: ldo_vtcxo { + regulator-name =3D "vtcxo"; + regulator-min-microvolt =3D <2800000>; + regulator-max-microvolt =3D <2800000>; + regulator-enable-ramp-delay =3D <90>; + }; + + mt6397_va28_reg: ldo_va28 { + regulator-name =3D "va28"; + /* fixed output 2.8 V */ + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vcama_reg: ldo_vcama { + regulator-name =3D "vcama"; + regulator-min-microvolt =3D <1500000>; + regulator-max-microvolt =3D <2800000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vio28_reg: ldo_vio28 { + regulator-name =3D "vio28"; + /* fixed output 2.8 V */ + regulator-enable-ramp-delay =3D <240>; + }; + + mt6397_usb_reg: ldo_vusb { + regulator-name =3D "vusb"; + /* fixed output 3.3 V */ + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vmc_reg: ldo_vmc { + regulator-name =3D "vmc"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vmch_reg: ldo_vmch { + regulator-name =3D "vmch"; + regulator-min-microvolt =3D <3000000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vemc_3v3_reg: ldo_vemc3v3 { + regulator-name =3D "vemc_3v3"; + regulator-min-microvolt =3D <3000000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vgp1_reg: ldo_vgp1 { + regulator-name =3D "vcamd"; + regulator-min-microvolt =3D <1220000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <240>; + }; + + mt6397_vgp2_reg: ldo_vgp2 { + regulator-name =3D "vcamio"; + regulator-min-microvolt =3D <1000000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vgp3_reg: ldo_vgp3 { + regulator-name =3D "vcamaf"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vgp4_reg: ldo_vgp4 { + regulator-name =3D "vgp4"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vgp5_reg: ldo_vgp5 { + regulator-name =3D "vgp5"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3000000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vgp6_reg: ldo_vgp6 { + regulator-name =3D "vgp6"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + + mt6397_vibr_reg: ldo_vibr { + regulator-name =3D "vibr"; + regulator-min-microvolt =3D <1200000>; + regulator-max-microvolt =3D <3300000>; + regulator-enable-ramp-delay =3D <218>; + }; + }; diff --git a/Documentation/devicetree/bindings/regulator/mt6397-regulator.t= xt b/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt deleted file mode 100644 index c080086..0000000 --- a/Documentation/devicetree/bindings/regulator/mt6397-regulator.txt +++ /dev/null @@ -1,220 +0,0 @@ -Mediatek MT6397 Regulator - -Required properties: -- compatible: "mediatek,mt6397-regulator" -- mt6397regulator: List of regulators provided by this controller. It is n= amed - according to its regulator type, buck_ and ldo_. - The definition for each of these nodes is defined using the standard bin= ding - for regulators at Documentation/devicetree/bindings/regulator/regulator.= txt. - -The valid names for regulators are:: -BUCK: - buck_vpca15, buck_vpca7, buck_vsramca15, buck_vsramca7, buck_vcore, buck= _vgpu, - buck_vdrm, buck_vio18 -LDO: - ldo_vtcxo, ldo_va28, ldo_vcama, ldo_vio28, ldo_vusb, ldo_vmc, ldo_vmch, - ldo_vemc3v3, ldo_vgp1, ldo_vgp2, ldo_vgp3, ldo_vgp4, ldo_vgp5, ldo_vgp6, - ldo_vibr - -BUCK regulators can set regulator-initial-mode and regulator-allowed-modes= to -values specified in dt-bindings/regulator/mediatek,mt6397-regulator.h - -Example: - pmic { - compatible =3D "mediatek,mt6397"; - - mt6397regulator: mt6397regulator { - compatible =3D "mediatek,mt6397-regulator"; - - mt6397_vpca15_reg: buck_vpca15 { - regulator-compatible =3D "buck_vpca15"; - regulator-name =3D "vpca15"; - regulator-min-microvolt =3D < 850000>; - regulator-max-microvolt =3D <1350000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <200>; - }; - - mt6397_vpca7_reg: buck_vpca7 { - regulator-compatible =3D "buck_vpca7"; - regulator-name =3D "vpca7"; - regulator-min-microvolt =3D < 850000>; - regulator-max-microvolt =3D <1350000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <115>; - }; - - mt6397_vsramca15_reg: buck_vsramca15 { - regulator-compatible =3D "buck_vsramca15"; - regulator-name =3D "vsramca15"; - regulator-min-microvolt =3D < 850000>; - regulator-max-microvolt =3D <1350000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <115>; - - }; - - mt6397_vsramca7_reg: buck_vsramca7 { - regulator-compatible =3D "buck_vsramca7"; - regulator-name =3D "vsramca7"; - regulator-min-microvolt =3D < 850000>; - regulator-max-microvolt =3D <1350000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <115>; - - }; - - mt6397_vcore_reg: buck_vcore { - regulator-compatible =3D "buck_vcore"; - regulator-name =3D "vcore"; - regulator-min-microvolt =3D < 850000>; - regulator-max-microvolt =3D <1350000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <115>; - }; - - mt6397_vgpu_reg: buck_vgpu { - regulator-compatible =3D "buck_vgpu"; - regulator-name =3D "vgpu"; - regulator-min-microvolt =3D < 700000>; - regulator-max-microvolt =3D <1350000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <115>; - }; - - mt6397_vdrm_reg: buck_vdrm { - regulator-compatible =3D "buck_vdrm"; - regulator-name =3D "vdrm"; - regulator-min-microvolt =3D < 800000>; - regulator-max-microvolt =3D <1400000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <500>; - }; - - mt6397_vio18_reg: buck_vio18 { - regulator-compatible =3D "buck_vio18"; - regulator-name =3D "vio18"; - regulator-min-microvolt =3D <1500000>; - regulator-max-microvolt =3D <2120000>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <500>; - }; - - mt6397_vtcxo_reg: ldo_vtcxo { - regulator-compatible =3D "ldo_vtcxo"; - regulator-name =3D "vtcxo"; - regulator-min-microvolt =3D <2800000>; - regulator-max-microvolt =3D <2800000>; - regulator-enable-ramp-delay =3D <90>; - }; - - mt6397_va28_reg: ldo_va28 { - regulator-compatible =3D "ldo_va28"; - regulator-name =3D "va28"; - /* fixed output 2.8 V */ - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vcama_reg: ldo_vcama { - regulator-compatible =3D "ldo_vcama"; - regulator-name =3D "vcama"; - regulator-min-microvolt =3D <1500000>; - regulator-max-microvolt =3D <2800000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vio28_reg: ldo_vio28 { - regulator-compatible =3D "ldo_vio28"; - regulator-name =3D "vio28"; - /* fixed output 2.8 V */ - regulator-enable-ramp-delay =3D <240>; - }; - - mt6397_usb_reg: ldo_vusb { - regulator-compatible =3D "ldo_vusb"; - regulator-name =3D "vusb"; - /* fixed output 3.3 V */ - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vmc_reg: ldo_vmc { - regulator-compatible =3D "ldo_vmc"; - regulator-name =3D "vmc"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vmch_reg: ldo_vmch { - regulator-compatible =3D "ldo_vmch"; - regulator-name =3D "vmch"; - regulator-min-microvolt =3D <3000000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vemc_3v3_reg: ldo_vemc3v3 { - regulator-compatible =3D "ldo_vemc3v3"; - regulator-name =3D "vemc_3v3"; - regulator-min-microvolt =3D <3000000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vgp1_reg: ldo_vgp1 { - regulator-compatible =3D "ldo_vgp1"; - regulator-name =3D "vcamd"; - regulator-min-microvolt =3D <1220000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <240>; - }; - - mt6397_vgp2_reg: ldo_vgp2 { - egulator-compatible =3D "ldo_vgp2"; - regulator-name =3D "vcamio"; - regulator-min-microvolt =3D <1000000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vgp3_reg: ldo_vgp3 { - regulator-compatible =3D "ldo_vgp3"; - regulator-name =3D "vcamaf"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vgp4_reg: ldo_vgp4 { - regulator-compatible =3D "ldo_vgp4"; - regulator-name =3D "vgp4"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vgp5_reg: ldo_vgp5 { - regulator-compatible =3D "ldo_vgp5"; - regulator-name =3D "vgp5"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <3000000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vgp6_reg: ldo_vgp6 { - regulator-compatible =3D "ldo_vgp6"; - regulator-name =3D "vgp6"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - - mt6397_vibr_reg: ldo_vibr { - regulator-compatible =3D "ldo_vibr"; - regulator-name =3D "vibr"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <218>; - }; - }; - }; --=20 2.18.0