Message ID | 20231217131838.7569-2-karelb@gimli.ms.mff.cuni.cz |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-2601-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp700608dyi; Sun, 17 Dec 2023 05:20:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IEAkv4oLzFYjk5eQDI8WRYjRny6+28GHsAZCMRD02m3FQFbx+jUqL08tGhFyRwwDUMDRosE X-Received: by 2002:a05:600c:4193:b0:40c:3276:253e with SMTP id p19-20020a05600c419300b0040c3276253emr8612938wmh.86.1702819239307; Sun, 17 Dec 2023 05:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702819239; cv=none; d=google.com; s=arc-20160816; b=bK/iDzG1eHq6/1BBGVewcrszAgB7IuSUrigXyipOw0DaQuAnJ/2tW+49kZQVVX9CQ2 6siW50tiEcxO1L6uhbDUYnPeez7ptwS5bgYcxoWAEmKscUi7gAInu2mSdywaU+fyj5m4 tBdo49c7s6dg9N1avSNm5fSXMudHQq/vIkbHkP1PaV+c+rUOgcYc1DX9Bs+EPB8T/SQB yyQvUXuPnj15+04tMFufmrv4/ftlSLzQKi4f/QXk+937iqsVP8T5CJXWEa01ka+Lnc1s CcgQuZMuTKfAbT870Nh8IMsFKHfO/SNysw2Kx9X3VsAQ5Pu/YfpJPkrXHmjf3FVdbAkC /3Hg== ARC-Message-Signature: i=1; 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=qP+2SKh6YVsuO7Mi8pHKLqQ7+a6eIrefH/tNra/ANO8=; fh=byZQJBCQWs0FCWKszxE7A5Om/MlZEW9RXICqsSfEzlA=; b=JdOYgyyuW6x+NOcOMhFxxYMdir4Mv2DO6BZ3isAMXSmvHPOig0ET+77OgGSg8qjrBA 55Hp7xUoBQ6uCBRBIln/xAXvPqK4MchIhvcQzVrc7P6DwABqwvIeg9V8QWLDUyIz9eWD rjFFvPKAsZrZ/M8BzD8eE1GH19B4WQETtrb4MD+xwoRUr6nejbTjTI3ZBte0zlYyfucX wwHCKrPtzZFoXtZJ2qGMuotJO+iFJvTi/jOXLqWIel9A8xVFElcqdML5/I+LCDDxAd7d CI2p2rNhGLWu1PG7KS5FU1AiXnlBEgRi9uytZoVuRDD1aw2vHT+393WB0OueL/bSBvWf OR3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b="Q/BNtnt+"; spf=pass (google.com: domain of linux-kernel+bounces-2601-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2601-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j23-20020a1709064b5700b00a2356a0b4f3si179577ejv.82.2023.12.17.05.20.39 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 05:20:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2601-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gimli.ms.mff.cuni.cz header.s=gen1 header.b="Q/BNtnt+"; spf=pass (google.com: domain of linux-kernel+bounces-2601-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2601-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gimli.ms.mff.cuni.cz 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 am.mirrors.kernel.org (Postfix) with ESMTPS id C040B1F21FC4 for <ouuuleilei@gmail.com>; Sun, 17 Dec 2023 13:20:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9837A4438C; Sun, 17 Dec 2023 13:20:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=gimli.ms.mff.cuni.cz header.i=@gimli.ms.mff.cuni.cz header.b="Q/BNtnt+" X-Original-To: linux-kernel@vger.kernel.org Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) (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 2B7C844361; Sun, 17 Dec 2023 13:20:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gimli.ms.mff.cuni.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gimli.ms.mff.cuni.cz Received: from gimli.ms.mff.cuni.cz (gimli.ms.mff.cuni.cz [195.113.20.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by nikam.ms.mff.cuni.cz (Postfix) with ESMTPS id 07D3228C344; Sun, 17 Dec 2023 14:20:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gimli.ms.mff.cuni.cz; s=gen1; t=1702819213; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qP+2SKh6YVsuO7Mi8pHKLqQ7+a6eIrefH/tNra/ANO8=; b=Q/BNtnt+Znw9AyDvAGAHx+qfoEuC4HEKUyKtH1yc4tXABKmi4fu6lU92YBsHhAa9mUJbNa E+Xk81MuQUuWvQPtPLdNWsAYtNVHc/8Vrg8Vag5B4cWhXDyf8yJ7xAc1TVTAO8Mc4J86aw mkr7k0zpZcLKVCDU9FQ1sua/a80g4jw= Received: from localhost (internet5.mraknet.com [185.200.108.250]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: karelb) by gimli.ms.mff.cuni.cz (Postfix) with ESMTPSA id DA5F844AF99; Sun, 17 Dec 2023 14:20:12 +0100 (CET) From: Karel Balej <karelb@gimli.ms.mff.cuni.cz> To: Karel Balej <balejk@matfyz.cz>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Lee Jones <lee@kernel.org>, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?utf-8?q?Duje_Mihanovi=C4=87?= <duje.mihanovic@skole.hr>, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org Subject: [RFC PATCH 1/5] dt-bindings: mfd: add entry for the Marvell 88PM88X PMICs Date: Sun, 17 Dec 2023 14:16:59 +0100 Message-ID: <20231217131838.7569-2-karelb@gimli.ms.mff.cuni.cz> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231217131838.7569-1-karelb@gimli.ms.mff.cuni.cz> References: <20231217131838.7569-1-karelb@gimli.ms.mff.cuni.cz> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785535386423545652 X-GMAIL-MSGID: 1785535386423545652 |
Series |
support for Marvell 88PM886 PMIC
|
|
Commit Message
Karel Balej
Dec. 17, 2023, 1:16 p.m. UTC
From: Karel Balej <balejk@matfyz.cz> Marvell 88PM880 and 88PM886 are two similar PMICs with mostly matching register mapping and subdevices such as onkey, regulators or battery and charger. Both seem to come in two revisions which seem to be handled slightly differently in some subdevice drivers. Signed-off-by: Karel Balej <balejk@matfyz.cz> --- .../bindings/mfd/marvell,88pm88x.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml
Comments
On Sun, 17 Dec 2023 14:16:59 +0100, Karel Balej wrote: > From: Karel Balej <balejk@matfyz.cz> > > Marvell 88PM880 and 88PM886 are two similar PMICs with mostly matching > register mapping and subdevices such as onkey, regulators or battery and > charger. Both seem to come in two revisions which seem to be handled > slightly differently in some subdevice drivers. > > Signed-off-by: Karel Balej <balejk@matfyz.cz> > --- > .../bindings/mfd/marvell,88pm88x.yaml | 55 +++++++++++++++++++ > 1 file changed, 55 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Error: Documentation/devicetree/bindings/mfd/marvell,88pm88x.example.dts:30.31-32 syntax error FATAL ERROR: Unable to parse input tree make[2]: *** [scripts/Makefile.lib:419: Documentation/devicetree/bindings/mfd/marvell,88pm88x.example.dtb] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [/builds/robherring/dt-review-ci/linux/Makefile:1424: dt_binding_check] Error 2 make: *** [Makefile:234: __sub-make] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20231217131838.7569-2-karelb@gimli.ms.mff.cuni.cz The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Sun, Dec 17, 2023 at 02:16:59PM +0100, Karel Balej wrote: > From: Karel Balej <balejk@matfyz.cz> > > Marvell 88PM880 and 88PM886 are two similar PMICs with mostly matching > register mapping and subdevices such as onkey, regulators or battery and > charger. Both seem to come in two revisions which seem to be handled > slightly differently in some subdevice drivers. > > Signed-off-by: Karel Balej <balejk@matfyz.cz> > --- > .../bindings/mfd/marvell,88pm88x.yaml | 55 +++++++++++++++++++ > 1 file changed, 55 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml > > diff --git a/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml > new file mode 100644 > index 000000000000..e075729c360f > --- /dev/null > +++ b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml > @@ -0,0 +1,55 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mfd/marvell,88pm88x.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Marvell 88PM88X PMIC core MFD Drop 'MFD'. > + > +maintainers: > + - Karel Balej <balejk@matfyz.cz> > + > +description: | Don't need '|' as there is no formatting to preserve. > + Marvell 88PM880 and 88PM886 are two similar PMICs providing > + several functions such as onkey, regulators or battery and > + charger. Both seem to come in two revisions -- A0 and A1. > + > +properties: > + compatible: > + const: marvell,88pm886-a1 The description talks about 4 different devices, but only 1 here. Do you expect to need A0 support? Devices with these PMICs should be known and few, right? > + > + reg: > + description: I2C device address Drop. > + maxItems: 1 > + > + interrupt-controller: true > + > + interrupts: > + maxItems: 1 > + > + "#interrupt-cells": > + const: 2 > + > +required: > + - compatible > + - reg > + - interrupt-controller > + - interrupts > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + pmic0: 88pm886@30 { pmic@30 Drop the unused label. > + compatible = "marvell,88pm886-a1"; > + reg = <0x30>; > + interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>; You need the header for this. You'll find the input binding fails too. Please test your bindings before sending. > + interrupt-parent = <&gic>; > + interrupt-controller; > + #interrupt-cells = <1>; > + }; > + }; > +... > -- > 2.43.0 >
Rob, thank you very much for your feedback. On Mon Dec 18, 2023 at 4:17 PM CET, Rob Herring wrote: > > + Marvell 88PM880 and 88PM886 are two similar PMICs providing > > + several functions such as onkey, regulators or battery and > > + charger. Both seem to come in two revisions -- A0 and A1. > > + > > +properties: > > + compatible: > > + const: marvell,88pm886-a1 > > The description talks about 4 different devices, but only 1 here. > > Do you expect to need A0 support? Devices with these PMICs should be > known and few, right? I know of three smartphones which have 88PM886 and all of them (at least the revisions that have been tested) seem to use A1. So no, I don't know of any device that would need A0, but I wanted have the driver ready in case somebody needed to add it later. What change do you then suggest? Thank you and kind regards, K. B.
diff --git a/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml new file mode 100644 index 000000000000..e075729c360f --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/marvell,88pm88x.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/marvell,88pm88x.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell 88PM88X PMIC core MFD + +maintainers: + - Karel Balej <balejk@matfyz.cz> + +description: | + Marvell 88PM880 and 88PM886 are two similar PMICs providing + several functions such as onkey, regulators or battery and + charger. Both seem to come in two revisions -- A0 and A1. + +properties: + compatible: + const: marvell,88pm886-a1 + + reg: + description: I2C device address + maxItems: 1 + + interrupt-controller: true + + interrupts: + maxItems: 1 + + "#interrupt-cells": + const: 2 + +required: + - compatible + - reg + - interrupt-controller + - interrupts + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + pmic0: 88pm886@30 { + compatible = "marvell,88pm886-a1"; + reg = <0x30>; + interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>; + interrupt-parent = <&gic>; + interrupt-controller; + #interrupt-cells = <1>; + }; + }; +...