Message ID | 20240214-mbly-gpio-v1-3-f88c0ccf372b@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-65537-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp1336979dyb; Wed, 14 Feb 2024 08:32:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW0Gwucf4PWROYzXxb8tNgEpTX3T3pcxszpXnnWFvhBaLnXygIcQSa03yuN0S5F4+8eaXuPVHD2H5ciPwTJsCPCYIkwAQ== X-Google-Smtp-Source: AGHT+IHGLAGBnqU0ug3JUAewBZ4g6V2d9XcrSbxaCb3UfjME99sGOU0jR+P2bFe0hEEgo7LHWxX6 X-Received: by 2002:a05:6870:b023:b0:218:7597:2018 with SMTP id y35-20020a056870b02300b0021875972018mr3220559oae.16.1707928370668; Wed, 14 Feb 2024 08:32:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707928370; cv=pass; d=google.com; s=arc-20160816; b=zehuUTkl8IdHORNN5m7s0IbajIQPIqLNu+Kh3STgxS3aO6+WT8w/l9ahuD6XeeYHXJ tbqW6GwX/d3J5ByqQ1aj61HYf5I9bmuL8keEthQTzmVY7QiSwsZ4nPO3+UUWL0pFSk7N QAoUO4S273sIhjrBMO8nt4x9iv0275LR6HopzS99fFi5eQoPoHmEaNu8BSclZTjigoaF ZPZ0PaW4ZAa5WWSBxY/z3HDHd4DI4erq3J31uIjYYDFU+gd6K+h0MhXoNdO0RyNo/tLq zha4p8I3W0dW69+/nrtMldptZ2krdfbDaVsGT/umBWq3PNDlRofo/2m7BI1TBM1mL29f +lGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=2CFEvn1JhSX3ZuVhzX02CCphHBNtzeocyxguNU6h7H4=; fh=QxwNLhz3P5Nupl/zWH5IWn7ODGMNS/xRGrw2BBc6DCs=; b=yG1eWtGy60gcNRQRBdBhAlglOZ5w0F3wkHWM+Aic9LysbFmp0KNluXYLELO2IRTAaV Sq8GkhoFm9H9Fso2Az5hPMumykjb8heh6JnyoEpLs82bYOEJrVEi5IZCo+p1zw8sPwtG sPqlSIENPH6GHY4YvTfgy43UmGK5o8LYl+EhOlRSiAC1n6On6iBPIhl+8Opd7+xL2ndr sQQE0Md5Ru0ktdDaZY45W13/C9rJH4/UXA7tUFPrVfRhNk6mfdt5EI4+1oY6A9v+45vv SAvni0KEKDh/kFa2VvPe0UTlTqzmmF4tPRkQbkHtf07uQEOFsFyJ07RtYocxVsuomxyJ KCjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QQW1lvnc; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-65537-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65537-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com X-Forwarded-Encrypted: i=2; AJvYcCXn/cVQXg5I/iA9VHFb13teAV9pejIzEBECdZizsF0Zg5vYP1qEKeuDJ3++n9rpNaf/fO2JVTebPa8oTO3lIMecDDpGOA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id if8-20020a0561022c8800b0046b13d71a15si1818578vsb.44.2024.02.14.08.32.50 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Feb 2024 08:32:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-65537-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=QQW1lvnc; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-65537-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-65537-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com 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 7E0F21C28274 for <ouuuleilei@gmail.com>; Wed, 14 Feb 2024 16:31:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F054612DC; Wed, 14 Feb 2024 16:28:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="QQW1lvnc" Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) (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 B9D0060269; Wed, 14 Feb 2024 16:27:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.178.240 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707928079; cv=none; b=YalD04PVjr4L9NnczCE9iEmGlleWD35gvgYrttcjM1HKdHrMNzSwoG+/vQcutUxkWq2iVhEdky3D3QoraTwvpj5QALerz8WVvWHDhNCvU/QFHfQoxq9Yb8luHftRFeEQHRrkQck+fko1L9oHfG5ta1EPY3AnkgVA6LF2cRAr5lE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707928079; c=relaxed/simple; bh=tOmbsgpawIXduW2TWwieuZdQlagYgoHrmvJPU8bK318=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pB+AX95gg2YT0oSjt0yx1hqKN9IIOfwKAj8FtiRl9OkYSJaObsdK7vAP84wNI1b3kDLaZAypW29eisGqOJDibLWI6D9bNYniKLKWbtCRzwQGvuJQQnvdTaftFGL9zb8/deXx5ld4Ot4f3oa4NxlcgAVcYu5evRE7kl576RZXJpQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=QQW1lvnc; arc=none smtp.client-ip=217.70.178.240 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: from relay3-d.mail.gandi.net (unknown [IPv6:2001:4b98:dc4:8::223]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 14C8AC386D; Wed, 14 Feb 2024 16:24:55 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 327E16000A; Wed, 14 Feb 2024 16:24:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707927886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2CFEvn1JhSX3ZuVhzX02CCphHBNtzeocyxguNU6h7H4=; b=QQW1lvnc2VCJEDYpAwqitK++pYm9ED0eRCTv7HnbOjP/XQ2QcqHBSnCBuItW9b8/QAs70F xsmNgRDq2rtisOKO1VOYqBbY1BCAXFBTwCrVpr91NctL/Csp+rgHS1iica5Yu3r3un3fxw ia8s/7NVImO1CBTbZVicI/PMGn4fySFdaxbzp6qAV0YzcS6PdfWFKDisZ+T0BS1AFhnZ/8 QDG6ob+aEP+nGt4nJcm6ciZV7gQpd8uxiUSfwHK0HSwkYLESGCgi7Z2yH2/O4e929PcDFr 7XZjPz4j47ScAVmsBij6ORJJ0iGlzQGmLSw4YR4zQIiRZ3Wr5UIbMU/dYk4kgw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= <theo.lebrun@bootlin.com> Date: Wed, 14 Feb 2024 17:23:56 +0100 Subject: [PATCH 03/23] dt-bindings: gpio: nomadik: add mobileye,eyeq5-gpio compatible 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240214-mbly-gpio-v1-3-f88c0ccf372b@bootlin.com> References: <20240214-mbly-gpio-v1-0-f88c0ccf372b@bootlin.com> In-Reply-To: <20240214-mbly-gpio-v1-0-f88c0ccf372b@bootlin.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, Gregory CLEMENT <gregory.clement@bootlin.com>, Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Tawfik Bayouk <tawfik.bayouk@mobileye.com>, =?utf-8?q?Th=C3=A9o_Lebrun?= <theo.lebrun@bootlin.com> X-Mailer: b4 0.12.4 X-GND-Sasl: theo.lebrun@bootlin.com X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790892698839348050 X-GMAIL-MSGID: 1790892698839348050 |
Series |
Rework Nomadik GPIO to add Mobileye EyeQ5 support
|
|
Commit Message
Théo Lebrun
Feb. 14, 2024, 4:23 p.m. UTC
This GPIO controller is used on the Mobileye EyeQ5 SoC. Add its
compatible to the dt-bindings. One difference is that the block as
integrated on EyeQ5 does not support sleep-mode.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
.../devicetree/bindings/gpio/st,nomadik-gpio.yaml | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
Comments
On 14/02/2024 17:23, Théo Lebrun wrote: > This GPIO controller is used on the Mobileye EyeQ5 SoC. Add its > compatible to the dt-bindings. One difference is that the block as > integrated on EyeQ5 does not support sleep-mode. > > Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> > --- > .../devicetree/bindings/gpio/st,nomadik-gpio.yaml | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml b/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml > index bbd23daed229..e44cf292bc6d 100644 > --- a/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml > +++ b/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml > @@ -19,7 +19,9 @@ properties: > pattern: "^gpio@[0-9a-f]+$" > > compatible: > - const: st,nomadik-gpio > + enum: > + - st,nomadik-gpio > + - mobileye,eyeq5-gpio > > reg: > maxItems: 1 > @@ -65,6 +67,18 @@ required: > > unevaluatedProperties: false > > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: st,nomadik-gpio > + then: > + properties: > + st,supports-sleepmode: > + description: Whether the controller can sleep or not. > + $ref: /schemas/types.yaml#/definitions/flag You already have such property, so you are defining it second time. You want instead if: for eyeq5-gpio making it: then: properties: st,supports-sleepmode: false Best regards, Krzysztof
Hello, On Thu Feb 15, 2024 at 10:13 AM CET, Krzysztof Kozlowski wrote: > On 14/02/2024 17:23, Théo Lebrun wrote: > > This GPIO controller is used on the Mobileye EyeQ5 SoC. Add its > > compatible to the dt-bindings. One difference is that the block as > > integrated on EyeQ5 does not support sleep-mode. > > > > Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> > > --- > > .../devicetree/bindings/gpio/st,nomadik-gpio.yaml | 16 +++++++++++++++- > > 1 file changed, 15 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml b/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml > > index bbd23daed229..e44cf292bc6d 100644 > > --- a/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml > > +++ b/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml > > @@ -19,7 +19,9 @@ properties: > > pattern: "^gpio@[0-9a-f]+$" > > > > compatible: > > - const: st,nomadik-gpio > > + enum: > > + - st,nomadik-gpio > > + - mobileye,eyeq5-gpio > > > > reg: > > maxItems: 1 > > @@ -65,6 +67,18 @@ required: > > > > unevaluatedProperties: false > > > > +allOf: > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: st,nomadik-gpio > > + then: > > + properties: > > + st,supports-sleepmode: > > + description: Whether the controller can sleep or not. > > + $ref: /schemas/types.yaml#/definitions/flag > > You already have such property, so you are defining it second time. You > want instead if: for eyeq5-gpio making it: > then: > properties: > st,supports-sleepmode: false Good catch. I hesitated between declaring the property inside an if-statement or disabling it inside an if-statement as you show here. I ended-up mixing those two approaches. Wil pick the if-eyeq5-then-disable-prop solution. Thanks for the review Krzysztof! -- Théo Lebrun, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
diff --git a/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml b/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml index bbd23daed229..e44cf292bc6d 100644 --- a/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml +++ b/Documentation/devicetree/bindings/gpio/st,nomadik-gpio.yaml @@ -19,7 +19,9 @@ properties: pattern: "^gpio@[0-9a-f]+$" compatible: - const: st,nomadik-gpio + enum: + - st,nomadik-gpio + - mobileye,eyeq5-gpio reg: maxItems: 1 @@ -65,6 +67,18 @@ required: unevaluatedProperties: false +allOf: + - if: + properties: + compatible: + contains: + const: st,nomadik-gpio + then: + properties: + st,supports-sleepmode: + description: Whether the controller can sleep or not. + $ref: /schemas/types.yaml#/definitions/flag + examples: - | gpio1: gpio@8012e080 {