From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f13.google.com (mail-wm2-f13.google.com [74.125.225.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60F033CAA52 for ; Sun, 27 Sep 2026 15:58:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790524693; cv=none; b=RYg7pxFYZQBwJdZL/yTAGKMSBKMIM7+KaRjA8a8EHJ2H/q/IRc8w+C3/tfiY/yvWcE+zL2Gc2+KChvsOttAIETYr7ohKWb4wD4ORJhIFkwnrICSS+roXJaT3CsSHoyjotVuFLazv/RQ69oz+oyxb/lHYgVlGSfWn7LrZOjIbypQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790524693; c=relaxed/simple; bh=7gJB4mvwa2xHWihF4Xw9dNRVCEf0fr7Lo02mk3lMyTc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V0C4w3v5oMycbNvHzBidGA0COV0wKhWXSFJ66n33cOIxTEPmK48g+UMRAq0Hi+BO8FMQIjba5d9/zFpmSt4L0WIq1FoTWy/AfUdriZEpVf5B6m54/3KDwzbyzGeMrH0jkDZIZJ/+Y5wRmUPL0xodiAYkr5s0lxNMOv5pNE0skKw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=F+cfI8Uj; arc=none smtp.client-ip=74.125.225.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="F+cfI8Uj" Received: by mail-wm2-f13.google.com with SMTP id 5b1f17b1804b1-49e71cdb22bso16418095e9.2 for ; Sun, 27 Sep 2026 08:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790524689; x=1791129489; darn=vger.kernel.org; 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:content-type; bh=2vAzPMil5l1pqGNfvdWe+bW0U1JuR0wEC+RG90bs+48=; b=F+cfI8UjNjZ5dX4Bq2npArTh77lrFaiAqMlD4uW0EJssiKG0oVOTnpUo3X5mZSkT3D ptlMLWJAR3NWZNMoHH0BrMyUcEmYx9g3EP6UPNrbCe+vKCNBtZ5L53wbWYKqeF5ZgjfK C0pKW+OnaV1Pmuk5Pg9eCUsrVcGrBGUwAIP95FWXOYbdYKsO9xJUw60CpAq32m3RfuKF Sj9zqc2sEnnbZ+qI76QiJ7npEUb0G/IPW2Vufi38B0qMbFX6JeHb3qIQ1JodlbtgPd44 35tMP5/y3U1dXecvmWrF7k3aMEwrE0smxMO0dOOGPMHcjy70zrnCKdx6PIC91RLBstDO d+Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790524689; x=1791129489; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=2vAzPMil5l1pqGNfvdWe+bW0U1JuR0wEC+RG90bs+48=; b=25gyd7kycrNXNzghyfLHXdhqn7E+MNoGuVbDm+axd8jcR1AbKwsWKBMuUpYi2P/hzM TN9JRktBVBZdHCmEblO9RcEXsIpmVcpvps8dHKj3v5B7SbCCk8Eueq8ekOoGps0USNQm mda9OG8UtKuYMbnhrgtr3pid3lTUbhr1mTSANhECfWE3hN55Kk/cIHEyPPh5mAhQ2VGH w/gaz+yXerOx3NyufFzCscfMuVIzpE6rCHPM1vlYlzcJV6KOZtR4P59RY23LMV8Fay/I LLs8v/Qwe+MT/DBImFnOcLRZNEwawrvW0WLommi67ei77/Y6+LpcfHwXRMVbzk9Nuq2n CYzg== X-Gm-Message-State: AFuF++llPXAJev9ZEvbglQ4hmk6YzhDJ7eR49InGYdVh77QOwNpZhh7F Zrzxxa4UNIFMxl7S5IMF/lLfZ7D0Sijm0RXx2e4ydO07OXthsF8Q9Ua3 X-Gm-Gg: AYBFou2NoVa+ysImHiUR1wx3m4cWqHgSHNmhVhONDLOjRK8fcfmiEW+l6c52NvskaRC CmOTz+T2AV6MOi5mo6xE4FrRxHfhctzuus2qj4iytqXl91pLyqGUbSthWm+6mzmA0Jptzu7fUII STCJ4s1NstRucgQ3kLTHsfGoV+ELo7xcN3fVYqhvGLntZsQ3V65shO9lhzD4ViHaBB92dJ7sKsG 6KvyiL1M1HJ0tpO2RMG0Jzb3uSElR2VFkdBS0XHde39X8st3DtF89zsMLyu1dH9nKekEg3KXgyA Ix0z2rGQr+IspTzuW2FfhV5tfqvgpEfeSaCDYGf70SxZfcUaoQzRdYIinFqYT6cuX4i3hXaNzOV wHQG/iGzrAQYhV64dO4LwHz1ImhDAqLxT60+OmEVtoeWuo87ktA3aXDi1Eh67khtEUEvgiEf7N6 no8Y2kYMTjuo75o1r5fTFgWjFxhE2RLIM/+auz4Ms3w2GNk4JZWqSxd59HoGYpJLAhzh8N09sL7 gbCnLIclzSXQ8BrPLot4lZbADVwFQ== X-Received: by 2002:a05:600c:698c:b0:493:aa0a:45ad with SMTP id 5b1f17b1804b1-49fe66c385fmr191190815e9.2.1790524688570; Sun, 27 Sep 2026 08:58:08 -0700 (PDT) Received: from xeon ([188.163.112.76]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a0018dd5easm66708625e9.3.2026.09.27.08.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2026 08:58:08 -0700 (PDT) From: Svyatoslav Ryhel To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Lee Jones , Svyatoslav Ryhel Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, mfd@lists.linux.dev Subject: [PATCH v1 1/3] regulator: dt-bindings: maxim,max8907: Convert to DT schema Date: Sun, 27 Sep 2026 18:57:42 +0300 Message-ID: <20260927155745.187758-2-clamor95@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260927155745.187758-1-clamor95@gmail.com> References: <20260927155745.187758-1-clamor95@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert Maxim MAX8907 regulator binding from text to DT schema. Reference to nvidia,tegra-regulators-coupling in child regulator nodes. Signed-off-by: Svyatoslav Ryhel --- .../devicetree/bindings/regulator/max8907.txt | 69 ----- .../bindings/regulator/maxim,max8907.yaml | 285 ++++++++++++++++++ 2 files changed, 285 insertions(+), 69 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/max8907.txt create mode 100644 Documentation/devicetree/bindings/regulator/maxim,max8907.yaml diff --git a/Documentation/devicetree/bindings/regulator/max8907.txt b/Documentation/devicetree/bindings/regulator/max8907.txt deleted file mode 100644 index 371eccd1cd689..0000000000000 --- a/Documentation/devicetree/bindings/regulator/max8907.txt +++ /dev/null @@ -1,69 +0,0 @@ -MAX8907 regulator - -Required properties: -- compatible: "maxim,max8907" -- reg: I2C slave address -- interrupts: The interrupt output of the controller -- mbatt-supply: The input supply for MBATT, BBAT, SDBY, VRTC. -- in-v1-supply: The input supply for SD1. -- in-v2-supply: The input supply for SD2. -- in-v3-supply: The input supply for SD3. -- in1-supply: The input supply for LDO1. -... -- in20-supply: The input supply for LDO20. -- regulators: A node that houses a sub-node for each regulator within the - device. Each sub-node is identified using the node's name (or the deprecated - regulator-compatible property if present), with valid values listed below. - The content of each sub-node is defined by the standard binding for - regulators; see regulator.txt. - -Optional properties: -- maxim,system-power-controller: Boolean property indicating that the PMIC - controls the overall system power. - -The valid names for regulators are: - - sd1, sd2, sd3, ldo1, ldo2, ldo3, ldo4, ldo5, ldo6, ldo7, ldo8, ldo9, ldo10, - ldo11, ldo12, ldo13, ldo14, ldo15, ldo16, ldo17, ldo18, ldo19, ldo20, out5v, - out33v, bbat, sdby, vrtc. - -Example: - - max8907@3c { - compatible = "maxim,max8907"; - reg = <0x3c>; - interrupts = <0 86 0x4>; - - maxim,system-power-controller; - - mbatt-supply = <&some_reg>; - in-v1-supply = <&mbatt_reg>; - ... - in1-supply = <&mbatt_reg>; - ... - - regulators { - mbatt_reg: mbatt { - regulator-name = "vbat_pmu"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - regulator-always-on; - }; - - sd1 { - regulator-name = "nvvdd_sv1,vdd_cpu_pmu"; - regulator-min-microvolt = <1000000>; - regulator-max-microvolt = <1000000>; - regulator-always-on; - }; - - sd2 { - regulator-name = "nvvdd_sv2,vdd_core"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - regulator-always-on; - }; -... - }; - }; - }; diff --git a/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml b/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml new file mode 100644 index 0000000000000..e4e1390a49b9b --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/maxim,max8907.yaml @@ -0,0 +1,285 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/regulator/maxim,max8907.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Maxim Integrated MAX8907 PMIC + +maintainers: + - Svyatoslav Ryhel + +properties: + compatible: + const: maxim,max8907 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + maxim,system-power-controller: + type: boolean + deprecated: true + description: + Telling whether or not this PMIC is controlling the system power. + + system-power-controller: true + + mbatt-supply: + description: + The input supply for MBATT, BBAT, SDBY, VRTC. + + regulators: + type: object + additionalProperties: false + + patternProperties: + "^(sd[1-3]|ldo([1-9]|1[0-9]|20)|bbat|mbatt|out(5v|33v)|sdby|vrtc)$": + allOf: + - $ref: /schemas/regulator/regulator.yaml# + - $ref: /schemas/regulator/nvidia,tegra-regulators-coupling.yaml# + unevaluatedProperties: false + +patternProperties: + "^in-v[1-3]-supply$": + $ref: /schemas/types.yaml#/definitions/phandle + description: + The input supply for SD1, SD2 and SD3. + + "^in([1-9]|1[0-9]|20)-supply$": + $ref: /schemas/types.yaml#/definitions/phandle + description: + The input supply for LDO1 - LDO20. + +required: + - compatible + - reg + - interrupts + - regulators + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + pmic@3c { + compatible = "maxim,max8907"; + reg = <0x3c>; + interrupts = <0 86 0x4>; + + system-power-controller; + + mbatt-supply = <&vdd_5v0_sys>; + in-v1-supply = <&vdd_3v3_vbat>; + in-v2-supply = <&vdd_3v3_vbat>; + in-v3-supply = <&vdd_3v3_vbat>; + in1-supply = <&vdd_3v3_vbat>; + in2-supply = <&vdd_1v8_vio>; + in3-supply = <&vdd_3v3_vbat>; + in4-supply = <&vdd_3v3_vbat>; + in5-supply = <&vdd_3v3_vbat>; + in6-supply = <&vdd_3v3_vbat>; + in7-supply = <&vdd_3v3_vbat>; + in8-supply = <&vdd_3v3_vbat>; + in9-supply = <&vdd_3v3_vbat>; + in10-supply = <&vdd_3v3_vbat>; + in11-supply = <&vdd_3v3_vbat>; + in12-supply = <&vdd_3v3_vbat>; + in13-supply = <&vdd_3v3_vbat>; + in14-supply = <&vdd_3v3_vbat>; + in15-supply = <&vdd_3v3_vbat>; + in16-supply = <&vdd_3v3_vbat>; + in17-supply = <&vdd_1v8_vio>; + in18-supply = <&vdd_3v3_vbat>; + in19-supply = <&vdd_3v3_vbat>; + in20-supply = <&vdd_3v3_vbat>; + + regulators { + vdd_3v3_vbat: mbatt { + regulator-name = "v_powerrail"; + regulator-always-on; + }; + + sd1 { + regulator-name = "vcc_1v2_ddrio"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_core: sd2 { + regulator-name = "vdd_core"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + regulator-boot-on; + }; + + vdd_1v8_vio: sd3 { + regulator-name = "vcc_1v8_io"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + ldo1 { + regulator-name = "vcc_3v3_ddr"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + ldo2 { + regulator-name = "vcc_1v1_pll"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1100000>; + regulator-always-on; + regulator-boot-on; + }; + + iovcc_1v8_lcd: ldo3 { + regulator-name = "vcc_1v8_lcd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + + avdd_3v3_usb: ldo4 { + regulator-name = "avdd_3v3_usb"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + regulator-boot-on; + }; + + vcore_emmc: ldo5 { + regulator-name = "vcc_2v8_emmc"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-boot-on; + }; + + vcc_hdmi_pll: ldo6 { + regulator-name = "vcc_hdmi_pll"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vcc_3v0_sensor: ldo7 { + regulator-name = "vcc_3v0_sensor"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + regulator-boot-on; + }; + + vcc_1v8_sensor: ldo8 { + regulator-name = "vcc_1v8_sensor"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + + ldo9 { + regulator-name = "vcc_3v3_fuse"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vcc_3v1_touch: ldo10 { + regulator-name = "vcc_3v1_touch"; + regulator-min-microvolt = <3100000>; + regulator-max-microvolt = <3100000>; + regulator-boot-on; + }; + + vdd_3v3_hdmi: ldo11 { + regulator-name = "vdd_3v3_hdmi"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + + vdd_usd: ldo12 { + regulator-name = "vcc_2v8_sdio"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-boot-on; + }; + + vcc_3v0_motor: ldo13 { + regulator-name = "vcc_3v0_motor"; + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + vcc_2v8_lcd: ldo14 { + regulator-name = "vcc_2v8_lcd"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + regulator-boot-on; + }; + + vcc_3v3_temp: ldo15 { + regulator-name = "vcc_3v3_temp"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + }; + + /* LDO16 is not used */ + + avdd_dsi_csi: ldo17 { + regulator-name = "vcc_1v2_mipi"; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + ldo18 { + regulator-name = "vcc_1v8_vi"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + vcc_1v8_touch: ldo19 { + regulator-name = "vcc_1v8_touch"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + + /* LDO20 is not used */ + + out5v { + regulator-name = "usb0_vbus_reg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + }; + + /* OUT33V is not used */ + + bbat { + regulator-name = "vcc_bbat"; + }; + + vdd_rtc: sdby { + regulator-name = "vcc_rtc"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + regulator-boot-on; + }; + + vrtc { + regulator-name = "vrtc"; + }; + }; + }; + }; +... -- 2.53.0