From nobody Fri Sep 20 14:44:00 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9894EE49A3 for ; Tue, 22 Aug 2023 08:45:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233982AbjHVIpp (ORCPT ); Tue, 22 Aug 2023 04:45:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231970AbjHVIpm (ORCPT ); Tue, 22 Aug 2023 04:45:42 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCB8CC9 for ; Tue, 22 Aug 2023 01:45:38 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-689f9576babso2746329b3a.0 for ; Tue, 22 Aug 2023 01:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1692693938; x=1693298738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jxGCtJ2Wep5efB+WkbsRfN8SMwC+vT6DRMJNr+uJtTM=; b=cee35XBJgWrPIQZvclRYmKKPTK9TteoVtq9KR3/9hzVU2nQck7y1o5DKhwVRs7XFKK 4NNAL4bucDmYnAC41qmpYUalcs3WZJxxorUDN3ByYWT2Z+itOdYmg9JElY4L3SgA0z+D Aw6ZodFVgTHZEDCF6UcY5gD1H1sWwuxiB5K0g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692693938; x=1693298738; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jxGCtJ2Wep5efB+WkbsRfN8SMwC+vT6DRMJNr+uJtTM=; b=igfSarFH1Qhjx8sxbDb61wr7fgsO9tbvH0muaa7ODL3ivdBOWWOnjdx7Z00JxPJPjy 2vxAdHCEjyKkncNCNeQxr3KgIFB9inDDWBL85SDqErabUc85fgglBYMW17QVBTzWsjhY 1c+eij5j18+46gS9AF3Sw3R4PA2P00u015ZHUSpksUyHWIbTU3DZUeqLsGn12yv9tNfM hPawedEU1koBdmjPYdUNN+c2YN2p2BI8+IopTfA1UE9Fli8IKgwfUcwDJ4wdlM2Yd8ap VvQDTcwkIpTNPN8KzEIoytUgO16AnCngDTeBxky1NusdCsYA+PiqEZGFq+Pry/QImUXw tAYw== X-Gm-Message-State: AOJu0YwzS8ktE1RRVDt3uCqUwQ2DiuOgCdg053R+evqNfiP5pCltNDeD YBz+dGFauJlPy2B8g+oAw9yPHg== X-Google-Smtp-Source: AGHT+IFYd2YL0KrDWvgUIXKMErFKQPaxg058X5tel5M+GH8U6Yi8Ag0PHyjiaxw7yRafBPsTLXVK+A== X-Received: by 2002:a05:6a00:2389:b0:688:9516:f703 with SMTP id f9-20020a056a00238900b006889516f703mr8179341pfc.31.1692693937996; Tue, 22 Aug 2023 01:45:37 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:e619:3fa0:1a90:6bb0]) by smtp.gmail.com with ESMTPSA id s26-20020aa78d5a000000b00666b012baedsm7304790pfe.158.2023.08.22.01.45.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Aug 2023 01:45:37 -0700 (PDT) From: Chen-Yu Tsai To: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Mark Brown Cc: Chen-Yu Tsai , Zhiyong Tao , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2 03/11] regulator: dt-bindings: mt6358: Convert to DT schema Date: Tue, 22 Aug 2023 16:45:11 +0800 Message-ID: <20230822084520.564937-4-wenst@chromium.org> X-Mailer: git-send-email 2.42.0.rc1.204.g551eb34607-goog In-Reply-To: <20230822084520.564937-1-wenst@chromium.org> References: <20230822084520.564937-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Convert this from the old style text based binding to the new DT schema style. This will make adding the MT6366 portion easier. The examples have been trimmed down considerably, and the remaining entries now match what is seen in actual device trees. The original submitter seems to have left MediaTek, so instead the submitter and maintainer for the MT6366 binding is listed. Cc: Zhiyong Tao Signed-off-by: Chen-Yu Tsai --- .../regulator/mediatek,mt6358-regulator.yaml | 105 ++++++ .../bindings/regulator/mt6358-regulator.txt | 350 ------------------ 2 files changed, 105 insertions(+), 350 deletions(-) create mode 100644 Documentation/devicetree/bindings/regulator/mediatek,mt= 6358-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/regulator/mt6358-regu= lator.txt diff --git a/Documentation/devicetree/bindings/regulator/mediatek,mt6358-re= gulator.yaml b/Documentation/devicetree/bindings/regulator/mediatek,mt6358-= regulator.yaml new file mode 100644 index 000000000000..4d7924c5cc7d --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/mediatek,mt6358-regulator= .yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/mediatek,mt6358-regulator.yam= l# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MediaTek MT6358 Regulator + +maintainers: + - Zhiyong Tao + +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: + const: mediatek,mt6358-regulator + +patternProperties: + "^buck_v(core|dram1|gpu|modem|pa|proc1[12]|s[12])$": + description: Buck regulators + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo_v(a|rf)12": + description: LDOs with fixed 1.2V output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo_v((aux|cn|io|rf)18|camio)": + description: LDOs with fixed 1.8V output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo_vxo22": + description: LDOs with fixed 2.2V output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo_v(aud|bif|cn|fe|io)28": + description: LDOs with fixed 2.8V output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo_vusb": + description: LDOs with fixed 3.0V output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo_vsram_(gpu|others|proc1[12])$": + description: LDOs with variable output + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + + "^ldo_v(cama[12]|camd|cn33|dram2|efuse|emc|ibr|ldo28|mc|mch|sim[12])$": + description: LDOs with variable output and 0~100/10mV tuning + type: object + $ref: regulator.yaml# + unevaluatedProperties: false + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + + regulator { + compatible =3D "mediatek,mt6358-regulator"; + + buck_vgpu { + regulator-name =3D "vgpu"; + regulator-min-microvolt =3D <625000>; + regulator-max-microvolt =3D <900000>; + regulator-ramp-delay =3D <6250>; + regulator-enable-ramp-delay =3D <200>; + regulator-allowed-modes =3D ; + regulator-coupled-with =3D <&mt6358_vsram_gpu_reg>; + regulator-coupled-max-spread =3D <100000>; + }; + + ldo_vsram_gpu { + regulator-name =3D "vsram_gpu"; + regulator-min-microvolt =3D <850000>; + regulator-max-microvolt =3D <1000000>; + regulator-ramp-delay =3D <6250>; + regulator-enable-ramp-delay =3D <240>; + regulator-coupled-with =3D <&mt6358_vgpu_reg>; + regulator-coupled-max-spread =3D <100000>; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/regulator/mt6358-regulator.t= xt b/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt deleted file mode 100644 index b6384306db5c..000000000000 --- a/Documentation/devicetree/bindings/regulator/mt6358-regulator.txt +++ /dev/null @@ -1,350 +0,0 @@ -MediaTek MT6358 Regulator - -All voltage regulators provided by the MT6358 PMIC are described as the -subnodes of the MT6358 regulators node. Each regulator is named according -to its regulator type, buck_ and ldo_. The definition for each -of these nodes is defined using the standard binding for regulators at -Documentation/devicetree/bindings/regulator/regulator.txt. - -The valid names for regulators are:: -BUCK: - buck_vdram1, buck_vcore, buck_vpa, buck_vproc11, buck_vproc12, buck_vgpu, - buck_vs2, buck_vmodem, buck_vs1 -LDO: - ldo_vdram2, ldo_vsim1, ldo_vibr, ldo_vrf12, ldo_vio18, ldo_vusb, ldo_vca= mio, - ldo_vcamd, ldo_vcn18, ldo_vfe28, ldo_vsram_proc11, ldo_vcn28, ldo_vsram_= others, - ldo_vsram_gpu, ldo_vxo22, ldo_vefuse, ldo_vaux18, ldo_vmch, ldo_vbif28, - ldo_vsram_proc12, ldo_vcama1, ldo_vemc, ldo_vio28, ldo_va12, ldo_vrf18, - ldo_vcn33, ldo_vcama2, ldo_vmc, ldo_vldo28, ldo_vaud28, ldo_vsim2 - -Example: - - pmic { - compatible =3D "mediatek,mt6358"; - - mt6358regulator: mt6358regulator { - compatible =3D "mediatek,mt6358-regulator"; - - mt6358_vdram1_reg: buck_vdram1 { - regulator-compatible =3D "buck_vdram1"; - regulator-name =3D "vdram1"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <2087500>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <0>; - regulator-always-on; - }; - - mt6358_vcore_reg: buck_vcore { - regulator-name =3D "vcore"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <200>; - regulator-always-on; - }; - - mt6358_vpa_reg: buck_vpa { - regulator-name =3D "vpa"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <3650000>; - regulator-ramp-delay =3D <50000>; - regulator-enable-ramp-delay =3D <250>; - }; - - mt6358_vproc11_reg: buck_vproc11 { - regulator-name =3D "vproc11"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <200>; - regulator-always-on; - }; - - mt6358_vproc12_reg: buck_vproc12 { - regulator-name =3D "vproc12"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <200>; - regulator-always-on; - }; - - mt6358_vgpu_reg: buck_vgpu { - regulator-name =3D "vgpu"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <200>; - }; - - mt6358_vs2_reg: buck_vs2 { - regulator-name =3D "vs2"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <2087500>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <0>; - regulator-always-on; - }; - - mt6358_vmodem_reg: buck_vmodem { - regulator-name =3D "vmodem"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <900>; - regulator-always-on; - }; - - mt6358_vs1_reg: buck_vs1 { - regulator-name =3D "vs1"; - regulator-min-microvolt =3D <1000000>; - regulator-max-microvolt =3D <2587500>; - regulator-ramp-delay =3D <12500>; - regulator-enable-ramp-delay =3D <0>; - regulator-always-on; - }; - - mt6358_vdram2_reg: ldo_vdram2 { - regulator-name =3D "vdram2"; - regulator-min-microvolt =3D <600000>; - regulator-max-microvolt =3D <1800000>; - regulator-enable-ramp-delay =3D <3300>; - }; - - mt6358_vsim1_reg: ldo_vsim1 { - regulator-name =3D "vsim1"; - regulator-min-microvolt =3D <1700000>; - regulator-max-microvolt =3D <3100000>; - regulator-enable-ramp-delay =3D <540>; - }; - - mt6358_vibr_reg: ldo_vibr { - regulator-name =3D "vibr"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <60>; - }; - - mt6358_vrf12_reg: ldo_vrf12 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vrf12"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <1200000>; - regulator-enable-ramp-delay =3D <120>; - }; - - mt6358_vio18_reg: ldo_vio18 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vio18"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <1800000>; - regulator-enable-ramp-delay =3D <2700>; - regulator-always-on; - }; - - mt6358_vusb_reg: ldo_vusb { - regulator-name =3D "vusb"; - regulator-min-microvolt =3D <3000000>; - regulator-max-microvolt =3D <3100000>; - regulator-enable-ramp-delay =3D <270>; - regulator-always-on; - }; - - mt6358_vcamio_reg: ldo_vcamio { - compatible =3D "regulator-fixed"; - regulator-name =3D "vcamio"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <1800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vcamd_reg: ldo_vcamd { - regulator-name =3D "vcamd"; - regulator-min-microvolt =3D <900000>; - regulator-max-microvolt =3D <1800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vcn18_reg: ldo_vcn18 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vcn18"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <1800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vfe28_reg: ldo_vfe28 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vfe28"; - regulator-min-microvolt =3D <2800000>; - regulator-max-microvolt =3D <2800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vsram_proc11_reg: ldo_vsram_proc11 { - regulator-name =3D "vsram_proc11"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <240>; - regulator-always-on; - }; - - mt6358_vcn28_reg: ldo_vcn28 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vcn28"; - regulator-min-microvolt =3D <2800000>; - regulator-max-microvolt =3D <2800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vsram_others_reg: ldo_vsram_others { - regulator-name =3D "vsram_others"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <240>; - regulator-always-on; - }; - - mt6358_vsram_gpu_reg: ldo_vsram_gpu { - regulator-name =3D "vsram_gpu"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <240>; - }; - - mt6358_vxo22_reg: ldo_vxo22 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vxo22"; - regulator-min-microvolt =3D <2200000>; - regulator-max-microvolt =3D <2200000>; - regulator-enable-ramp-delay =3D <120>; - regulator-always-on; - }; - - mt6358_vefuse_reg: ldo_vefuse { - regulator-name =3D "vefuse"; - regulator-min-microvolt =3D <1700000>; - regulator-max-microvolt =3D <1900000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vaux18_reg: ldo_vaux18 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vaux18"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <1800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vmch_reg: ldo_vmch { - regulator-name =3D "vmch"; - regulator-min-microvolt =3D <2900000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <60>; - }; - - mt6358_vbif28_reg: ldo_vbif28 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vbif28"; - regulator-min-microvolt =3D <2800000>; - regulator-max-microvolt =3D <2800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vsram_proc12_reg: ldo_vsram_proc12 { - regulator-name =3D "vsram_proc12"; - regulator-min-microvolt =3D <500000>; - regulator-max-microvolt =3D <1293750>; - regulator-ramp-delay =3D <6250>; - regulator-enable-ramp-delay =3D <240>; - regulator-always-on; - }; - - mt6358_vcama1_reg: ldo_vcama1 { - regulator-name =3D "vcama1"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <3000000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vemc_reg: ldo_vemc { - regulator-name =3D "vemc"; - regulator-min-microvolt =3D <2900000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <60>; - regulator-always-on; - }; - - mt6358_vio28_reg: ldo_vio28 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vio28"; - regulator-min-microvolt =3D <2800000>; - regulator-max-microvolt =3D <2800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_va12_reg: ldo_va12 { - compatible =3D "regulator-fixed"; - regulator-name =3D "va12"; - regulator-min-microvolt =3D <1200000>; - regulator-max-microvolt =3D <1200000>; - regulator-enable-ramp-delay =3D <270>; - regulator-always-on; - }; - - mt6358_vrf18_reg: ldo_vrf18 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vrf18"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <1800000>; - regulator-enable-ramp-delay =3D <120>; - }; - - mt6358_vcn33_reg: ldo_vcn33 { - regulator-name =3D "vcn33"; - regulator-min-microvolt =3D <3300000>; - regulator-max-microvolt =3D <3500000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vcama2_reg: ldo_vcama2 { - regulator-name =3D "vcama2"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <3000000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vmc_reg: ldo_vmc { - regulator-name =3D "vmc"; - regulator-min-microvolt =3D <1800000>; - regulator-max-microvolt =3D <3300000>; - regulator-enable-ramp-delay =3D <60>; - }; - - mt6358_vldo28_reg: ldo_vldo28 { - regulator-name =3D "vldo28"; - regulator-min-microvolt =3D <2800000>; - regulator-max-microvolt =3D <3000000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vaud28_reg: ldo_vaud28 { - compatible =3D "regulator-fixed"; - regulator-name =3D "vaud28"; - regulator-min-microvolt =3D <2800000>; - regulator-max-microvolt =3D <2800000>; - regulator-enable-ramp-delay =3D <270>; - }; - - mt6358_vsim2_reg: ldo_vsim2 { - regulator-name =3D "vsim2"; - regulator-min-microvolt =3D <1700000>; - regulator-max-microvolt =3D <3100000>; - regulator-enable-ramp-delay =3D <540>; - }; - }; - }; --=20 2.42.0.rc1.204.g551eb34607-goog