Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp335175rdh; Mon, 18 Dec 2023 23:35:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+64kKiAid/ZdIhgyxVmd5sc7Bt+pbew4qgLHcLd/bUjmyRPY/SuYxkhrGvYdq2u0HOVZq X-Received: by 2002:a17:906:802:b0:a1d:5483:d152 with SMTP id e2-20020a170906080200b00a1d5483d152mr682752ejd.68.1702971306042; Mon, 18 Dec 2023 23:35:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702971306; cv=none; d=google.com; s=arc-20160816; b=effBE6rP1gjtxnJv+6DvhqbgybOPKnY57XSSYqsFI1F0qhtgRbeukxOhTK2tfdherX WCLDvVF01QqTKfCydF46XfSCyOPeYKwvPZETyMsfOF0sGp1WaJPvwLutDRv6L0IsKFSr 7/iaUGTJIT4Fye8VWlwPNZn8z2UZRjCamaKxf/4DghVTaiBWrgcOA2EL7OH/VszrvNI4 3uDeBNyOBbENyDArTaFxsALadESkleDTs4hCyJDvHI+3YFK4NGoSw/hw++oROGNpOQIU gUxJG5LASc4ZOikd3b++kWSSYdTTmLj7hWj1VxzDEDSgdwZLxlJsC5EJ6tRwnak0CZ6b NldQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=P3hlpIDBqsqrYWXFJYqKY1bnRljFNGMm8+LBasOqKbg=; fh=aK8Xna1QmUjBmmcbSxvAewRaEQfN8MDLp8oH3mmfy3I=; b=q0ZODSyBtAC1U+ZFKfCBx9tb/3WPSvTUuHgZiSp2BFS4ZKRxdWe+bf+9OJMlYVEC5P RxRfWkR1+DekZxHWhbzQ04OL6+lZwaWFunyASXhAVMvQhLF3yx9SBlDtnE9qH8Nqab8g mplqNJD79KnsGWdVeABCySxHpVk84NUvXagmQ7ZFdlrYScBMZZzssTGdvtzFehtpBiNh voUmTvBCpH4i94bZW8IDqFs3bmXDOYevMk5WQN7pIeiHHEb+LO0oft/GzlGJzCqkLgBN SECGRviQprcvgS2y8UItDiL4pYnaQJveXIN5L6g1nusiZlU4d6sp8NmaJTvlUnfz+dOb lSXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W5SWEtxd; spf=pass (google.com: domain of linux-kernel+bounces-4811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l12-20020a170906078c00b00a23338363bfsi2399961ejc.479.2023.12.18.23.35.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 23:35:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W5SWEtxd; spf=pass (google.com: domain of linux-kernel+bounces-4811-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4811-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 872C21F25C83 for ; Tue, 19 Dec 2023 07:35:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EE6CC134; Tue, 19 Dec 2023 07:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W5SWEtxd" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (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 109218C0A for ; Tue, 19 Dec 2023 07:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-552ff8d681aso5687043a12.1 for ; Mon, 18 Dec 2023 23:34:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702971294; x=1703576094; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=P3hlpIDBqsqrYWXFJYqKY1bnRljFNGMm8+LBasOqKbg=; b=W5SWEtxdWMUQPe9OmS6myUTaOMPC2SWdp6lI7xRgiZPw2WxxeZCpz7A31e+10P0DmX IEbp5VYLCxVEceRmxlxpORUM0O+9lav//Uc6cuxOm2OinBKQ1tTg/jItRwXI6Gnc07Ck 26YzwVgFlKjV0HIiHUPGAcLTeWFHHimBiD7ynKgavWupDt4KYBFpLM4fFFBebuNZJ+G8 Ewcumwoea298HFcjUtqL7locA7V53+s94cxGm5eQqypVWaIllKbU4Hrc6nLeDRDXVskV +E9BrdDfZ5ZYIbIr5BnBG68NHwT/mdFHtFuHpLAmcJR8+BdqlGw+7NxS969yVKpPpB7R /wIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702971294; x=1703576094; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=P3hlpIDBqsqrYWXFJYqKY1bnRljFNGMm8+LBasOqKbg=; b=TovX8rRfwZX4YwHiKmtCkqEY3yfFGekmRh/yAhxMXEChGu7gFxc8mkhd23ZKLcPhi1 /rk2vhIhgHsT2OZGngrToLznLSjGgaHkHy1DP1m0TBvuYOKTPLlxYmVGet3GYxBfH9vw 93ku8MOgui+iuwnBN1cRVHCmX+T1cyxgMoEqLg8PMOVAl7KBCrrg8T+6XVO0abY+ds+Y ABaK9aP0GavaRv+KIgHSFJQkotxGL6ib+Iug851zc2G1N4ztIIfkh7cF7XwXHo5hWW3H Xk1qKkCIgA4jhJvarKzOoXGL9CmcLUNECKJ4LLQPoLUW3RuW9yJDPjW0ZLxAWf5FWUyu NAUw== X-Gm-Message-State: AOJu0YxDyR4gV5etLf0DhZnSsfSoe3MGDxk/Y6SNCeu+CcbnSJMm81tS wrL+D2Q0qhX0BTmT3iyXNmPnmg== X-Received: by 2002:a50:9f4f:0:b0:553:5abb:457 with SMTP id b73-20020a509f4f000000b005535abb0457mr635030edf.8.1702971294228; Mon, 18 Dec 2023 23:34:54 -0800 (PST) Received: from [192.168.1.20] ([178.197.218.27]) by smtp.gmail.com with ESMTPSA id x9-20020aa7cd89000000b0055289f60e3bsm4644445edv.79.2023.12.18.23.34.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Dec 2023 23:34:53 -0800 (PST) Message-ID: <0f0c0d16-f736-419e-9ffc-c3dc507b815c@linaro.org> Date: Tue, 19 Dec 2023 08:34:51 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] dt-bindings: pinctrl: mobileye,eyeq5-pinctrl: add bindings Content-Language: en-US To: =?UTF-8?Q?Th=C3=A9o_Lebrun?= , Vladimir Kondratiev , Gregory CLEMENT , Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Tawfik Bayouk References: <20231218-mbly-pinctrl-v1-0-2f7d366c2051@bootlin.com> <20231218-mbly-pinctrl-v1-1-2f7d366c2051@bootlin.com> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvM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v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20231218-mbly-pinctrl-v1-1-2f7d366c2051@bootlin.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 18/12/2023 18:19, Théo Lebrun wrote: > Add dt-schema type bindings for the Mobileye EyeQ5 pin controller. > > Signed-off-by: Théo Lebrun > --- > .../bindings/pinctrl/mobileye,eyeq5-pinctrl.yaml | 125 +++++++++++++++++++++ > MAINTAINERS | 1 + > 2 files changed, 126 insertions(+) > > diff --git a/Documentation/devicetree/bindings/pinctrl/mobileye,eyeq5-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mobileye,eyeq5-pinctrl.yaml > new file mode 100644 > index 000000000000..5faddebe2413 > --- /dev/null > +++ b/Documentation/devicetree/bindings/pinctrl/mobileye,eyeq5-pinctrl.yaml > @@ -0,0 +1,125 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/pinctrl/mobileye,eyeq5-pinctrl.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mobileye EyeQ5 pinctrl (pinmux & pinconf) controller pinctrl means pin controller, so you basically wrote: pin controller pinmux and pin configuration controller Just "pin controller" > + > +description: > + The EyeQ5 pin controller handles a pin bank. It is custom to this platform, Can part of SoC be not custom to given platform? I mean... describe the hardware, not write essay. > + its registers live in a shared region called OLB. > + There are two pin banks on the platform, each having a specific compatible. Instead of repeating something obvious - visible from the binding - explain why. Say something different than the binding is saying. > + Pins and groups are bijective. > + > +maintainers: > + - Grégory Clement > + - Théo Lebrun > + - Vladimir Kondratiev > + > +properties: > + $nodename: > + pattern: "^pinctrl([0-9]+)?$" > + description: > + We have no unique address, we rely on OLB; we therefore can't keep the > + standard pattern and cannot inherit from pinctrl.yaml. No, instead fix pinctrl.yaml > + > + compatible: > + enum: > + - mobileye,eyeq5-a-pinctrl > + - mobileye,eyeq5-b-pinctrl Why two compatibles? Description provided no rationale for this. > + > + "#pinctrl-cells": > + const: 1 > + > + mobileye,olb: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + A phandle to the OLB syscon. This is a fallback to using the parent as > + syscon node. So here is the explanation for missing unit address. If all registers, as you claim in description, belong to OLB, then this should be part of OLB. Drop the phandle. > + > +required: > + - compatible > + - "#pinctrl-cells" So now please test your code without olb phandle... > + > +patternProperties: patternProperties go after properties > + "-pins?$": > + type: object > + description: Pin muxing configuration. > + $ref: pinmux-node.yaml# > + additionalProperties: false Why not unevaluatedProperties? > + properties: > + pins: true > + function: true > + bias-disable: true > + bias-pull-down: true > + bias-pull-up: true > + drive-strength: true > + required: > + - pins > + - function > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: mobileye,eyeq5-a-pinctrl > + then: > + patternProperties: > + "-pins?$": > + properties: > + function: > + enum: [gpio, timer0, timer1, timer2, timer5, uart0, uart1, can0, > + can1, spi0, spi1, refclk0] > + - if: > + properties: > + compatible: > + contains: > + const: mobileye,eyeq5-b-pinctrl > + then: > + patternProperties: > + "-pins?$": > + properties: > + function: > + enum: [gpio, timer3, timer4, timer6, uart2, can2, spi2, spi3, > + mclk0] > + > +additionalProperties: false > + > +examples: > + - | > + olb@e00000 { > + compatible = "mobileye,eyeq5-olb", "syscon", "simple-mfd"; Drop, not erlated. > + reg = <0xe00000 0x400>; > + reg-io-width = <4>; > + > + pinctrl0 { Suffixes are always after - > + compatible = "mobileye,eyeq5-a-pinctrl"; > + #pinctrl-cells = <1>; Where is the phandle? > + }; > + > + pinctrl1 { > + compatible = "mobileye,eyeq5-b-pinctrl"; > + #pinctrl-cells = <1>; > + }; > + }; > + - | > + olb: olb@e00000 { > + compatible = "mobileye,eyeq5-olb", "syscon", "simple-mfd"; > + reg = <0xe00000 0x400>; > + reg-io-width = <4>; > + }; > + > + pinctrl0 { > + compatible = "mobileye,eyeq5-a-pinctrl"; > + #pinctrl-cells = <1>; > + mobileye,olb = <&olb>; Really, why? This is just confusing. There is no explanation for supporting both. Hardware is either this or that, not both! Best regards, Krzysztof