Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp130503lqp; Sat, 8 Jun 2024 08:59:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWgDhEqzdcc44x6kKJvqLHyFQX3wNr071sFL/80Tc5RBTcPG9VgxRDVrGo5bVuyWXEGKuv63Wb7vBYuljFvlCQItz7pO59sEiKDiilo9w== X-Google-Smtp-Source: AGHT+IHmW7+TFAdNmySLY1ZrE/hUAciWy0Oj+vsg9sBhOKrRHAaxy3xg0LM0qOnutJwsVGnJc0E3 X-Received: by 2002:a05:622a:1a04:b0:43e:3d29:4311 with SMTP id d75a77b69052e-44041b4e929mr65297601cf.12.1717862360934; Sat, 08 Jun 2024 08:59:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717862360; cv=pass; d=google.com; s=arc-20160816; b=jiw1YtroQ+rvS2JgzeVKqVz+hF00GMwn3MA2kSRMHvKFOLZdoE2SbEF8xENoYy/2gE cO7HX/Yc5/W/0ydLOGhZLkECmoi7t2DXQHvJOB1WaT/MvCvCUilRiFP761ccSFpu/cWf D9LKKgiQFnfG3DXB/2+AZcJ8lvD3lcY1oqx08PxXtRoKIgSK44L3sV/piV0dr50t157x PdRRv21Z/940S1I415QUKBsgfEruikpvEE3fnS1Vhpdk2nlDyHdgDbF6mkqf4fkQRyFn v4CbnClTCGh7uHOv/QxDThuRHgKB4Cdhdt7/xVehBDmHbcTLodQGu0ObpClW9rr+vc+4 gntg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=z+MsWuBICouk0Q+dsPoSyWykzHOW9UGznvOvGOlttPA=; fh=QhgSg1Zbhg0k1Y3sexI0DeQQQskTWRSzxoSuuRe9W3s=; b=XtXispAgfeijNN4Zgign3wJTk2+2HdDNh6y2twIhrvm3BGHB+a5Dik5HioQn6jbMTO W+KQ2k5s/uaXSVt8GdpcF5sKiGgN3ou4fnjwK2hKgMacOMUywZeBpeRTVUyPgzLuH5oH LKo8lGMwozgHfNsO12pvoEZ0pROeoOFw7oOywkfuSGbUBxm+i46vbQGN1tKrx1rX8YX9 wi97HtLsP4AYdIE3TQXFzZ5zxf/MGNxV2Afe9t9ktxAmadeZhbvHcEIrVmh76agFdv4l KbMSGiOqzmc4JCvf1lUkfoNbUuE4id5J/eANBZRylEIe+2d74oRDoWbL4ImeTz/jrOZr GwTg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bDTpz8c2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038a6e88dsi67846561cf.59.2024.06.08.08.59.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 08:59:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bDTpz8c2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-207115-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207115-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 970681C206A5 for ; Sat, 8 Jun 2024 15:59:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6507F17D894; Sat, 8 Jun 2024 15:57:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bDTpz8c2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5790C17B423; Sat, 8 Jun 2024 15:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717862241; cv=none; b=UY6vrrnzoVficyCGK3+lv7SPve33J+JWXb4SHOloXIroIFtzFS8Oq0YG8GgC5aOTjhv77VYf6htnDIeEumMjiFWWvkkOWFT1ALQkjP1AUPK1836pNCwN6pVWDXa1RzyGh4P2BkBuzsoCjnp0wHFU6/VMbhIggn+zHkiSY98J+rg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717862241; c=relaxed/simple; bh=A+xExKU+oPZGcncBlPzW/LTT+ijy3dTQcw/wRTkPK6Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nHD68jahZ0ZzkzwZnoNHZaag0MeZDLu/IT6nz5K6A7cX4EOMWUUCxXnsfb2DEn/ud2u4krEmkZdQ9UFtCR9YnuRyj7ToLgO6T/ZXK/tBxMO00u+irK7FwoVx+b1pRGASyNz77R6wIt3HVRkPuYVifbw7phBb0JoyjyyGDHAlDbE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bDTpz8c2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6289C4AF4D; Sat, 8 Jun 2024 15:57:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717862240; bh=A+xExKU+oPZGcncBlPzW/LTT+ijy3dTQcw/wRTkPK6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bDTpz8c2+vFsft9p/oX0QKa8QQBumyVgFkOWa1QLeE7k8ioJyKSDdROajuLP11QLz LoZFyRC4swrwtgy2NJ9TYfDHPb6idzfh3jFJ6yrOx9jd2BJ3ba9E7uImg7BTK07XTf MNGj/I9jzp2qFckHT0jAmJWD4zBRTVsExPmIW37xFB+pa1bbZ15edumiMx+1CepFvj bnhk1K6JYJSY3MX+bUXSnHmlRTDCtP0Z/9tmP+6sqkN+HbuGjrY8CO1yOXOZjsJSO7 gL8ekdu3DJrCryDA0BRzfsVNs5SjZ5eRDeBOLL6NoBvq1DwyDMy/khlbjZG2EtItp+ ntzik3v4eryyQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sFyRU-000000003QA-18FM; Sat, 08 Jun 2024 17:57:20 +0200 From: Johan Hovold To: Lee Jones , Mark Brown , Bjorn Andersson Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , Liam Girdwood , Das Srinagesh , Satya Priya Kakitapalli , Linus Walleij , Stephen Boyd , Bryan O'Donoghue , Andy Shevchenko , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH v3 09/12] dt-bindings: mfd: pm8008: Rework binding Date: Sat, 8 Jun 2024 17:55:23 +0200 Message-ID: <20240608155526.12996-10-johan+linaro@kernel.org> X-Mailer: git-send-email 2.44.1 In-Reply-To: <20240608155526.12996-1-johan+linaro@kernel.org> References: <20240608155526.12996-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Rework the pm8008 binding, which is currently unused, by dropping internal details like register offsets and interrupts and by adding the missing regulator and temperature alarm properties. Note that child nodes are still used for pinctrl and regulator configuration. Also note that the pinctrl state definition will be extended later and could eventually also be shared with other PMICs (e.g. by breaking out bits of qcom,pmic-gpio.yaml). Signed-off-by: Johan Hovold --- .../devicetree/bindings/mfd/qcom,pm8008.yaml | 135 +++++++++++------- 1 file changed, 80 insertions(+), 55 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml index d71657f488db..0c6e1870db1d 100644 --- a/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml +++ b/Documentation/devicetree/bindings/mfd/qcom,pm8008.yaml @@ -27,103 +27,128 @@ properties: reset-gpios: maxItems: 1 - "#interrupt-cells": + vdd-l1-l2-supply: true + vdd-l3-l4-supply: true + vdd-l5-supply: true + vdd-l6-supply: true + vdd-l7-supply: true + + gpio-controller: true + + "#gpio-cells": const: 2 - description: | - The first cell is the IRQ number, the second cell is the IRQ trigger - flag. All interrupts are listed in include/dt-bindings/mfd/qcom-pm8008.h. + gpio-ranges: + maxItems: 1 interrupt-controller: true - "#address-cells": - const: 1 + "#interrupt-cells": + const: 2 - "#size-cells": + "#thermal-sensor-cells": const: 0 -patternProperties: - "^gpio@[0-9a-f]+$": + pinctrl: type: object + additionalProperties: false + patternProperties: + "-state$": + type: object - description: | - The GPIO peripheral. This node may be specified twice, one for each GPIO. - - properties: - compatible: - items: - - const: qcom,pm8008-gpio - - const: qcom,spmi-gpio - - reg: - description: Peripheral address of one of the two GPIO peripherals. - maxItems: 1 - - gpio-controller: true - - gpio-ranges: - maxItems: 1 + allOf: + - $ref: /schemas/pinctrl/pinmux-node.yaml + - $ref: /schemas/pinctrl/pincfg-node.yaml - interrupt-controller: true + properties: + pins: + items: + pattern: "^gpio[12]$" - "#interrupt-cells": - const: 2 + function: + items: + - enum: + - normal - "#gpio-cells": - const: 2 + required: + - pins + - function - required: - - compatible - - reg - - gpio-controller - - interrupt-controller - - "#gpio-cells" - - gpio-ranges - - "#interrupt-cells" + additionalProperties: false + regulators: + type: object additionalProperties: false + patternProperties: + "^ldo[1-7]$": + type: object + $ref: /schemas/regulator/regulator.yaml# + unevaluatedProperties: false required: - compatible - reg - interrupts - - "#address-cells" - - "#size-cells" + - vdd-l1-l2-supply + - vdd-l3-l4-supply + - vdd-l5-supply + - vdd-l6-supply + - vdd-l7-supply + - gpio-controller + - "#gpio-cells" + - gpio-ranges + - interrupt-controller - "#interrupt-cells" + - "#thermal-sensor-cells" additionalProperties: false examples: - | #include - #include #include i2c { #address-cells = <1>; #size-cells = <0>; - pmic@8 { + pm8008: pmic@8 { compatible = "qcom,pm8008"; reg = <0x8>; - #address-cells = <1>; - #size-cells = <0>; - interrupt-controller; - #interrupt-cells = <2>; interrupt-parent = <&tlmm>; interrupts = <32 IRQ_TYPE_EDGE_RISING>; reset-gpios = <&tlmm 42 GPIO_ACTIVE_LOW>; - pm8008_gpios: gpio@c000 { - compatible = "qcom,pm8008-gpio", "qcom,spmi-gpio"; - reg = <0xc000>; - gpio-controller; - gpio-ranges = <&pm8008_gpios 0 0 2>; - #gpio-cells = <2>; - interrupt-controller; - #interrupt-cells = <2>; + vdd-l1-l2-supply = <&vreg_s8b_1p2>; + vdd-l3-l4-supply = <&vreg_s1b_1p8>; + vdd-l5-supply = <&vreg_bob>; + vdd-l6-supply = <&vreg_bob>; + vdd-l7-supply = <&vreg_bob>; + + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pm8008 0 0 2>; + + interrupt-controller; + #interrupt-cells = <2>; + + #thermal-sensor-cells = <0>; + + pinctrl { + gpio-keys-state { + pins = "gpio1"; + function = "normal"; + }; + }; + + regulators { + ldo1 { + regulator-name = "vreg_l1"; + regulator-min-microvolt = <950000>; + regulator-max-microvolt = <1300000>; + }; }; }; }; -- 2.44.1