From patchwork Sun Aug 11 18:17:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13759821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4574BC3DA4A for ; Sun, 11 Aug 2024 18:19:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=w+nOiSZVTAGXNGH6eneUy74cyMDNkjNt6P9eyPr5+K8=; b=cGFSYdCLwF8EcE5jLrPtNxOCeA CzS1y10zhLok8rgoxC93gWBgMcFpsk9WkX/qNa0PCT5IGpt5tK1Rle7vfhRCHlf4/CxUrzmndcQvB VBCDGBK4n8iRh++em8cMmeex6OGQHXWUPNiQ6cUfB/HupePzcVkMf1SxRMpmkto2UrAghRqhc4Z6Q wP+iifzJ6IlUKNCUzerqcvyAWmF/Ip2CtqlxBZJFbSQqCiCqX6DtwLhbe5GPVY3uJAcJO+c3ijLLm MxMaHmnc/Ij9Uqfrc3vUfu6nS4U/yKCWOynnu14b0uFzFVBjGoC0hCrwdy0h2IBDfchFDj1qkOxk2 Ayj0UWlw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdD9p-0000000Fw1V-30ku; Sun, 11 Aug 2024 18:19:09 +0000 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sdD88-0000000FvQR-0TfA for linux-arm-kernel@lists.infradead.org; Sun, 11 Aug 2024 18:17:26 +0000 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5bb8e62570fso4319771a12.1 for ; Sun, 11 Aug 2024 11:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723400242; x=1724005042; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=w+nOiSZVTAGXNGH6eneUy74cyMDNkjNt6P9eyPr5+K8=; b=ggyJHRPdkDj514gzLLITosgpekxff5X/X9yn/d6Q5s/XhzCfbUZsxxxDhXcrmPCysO fvDXEKf4YiwGm6xahD9a0T0AqE5SkeawtFKtquh77ut77NCerRmHFHmoxrCF5TFdbdAA 9p/0W0KitxTDqWpYxy3W+uY4crq4tW5+tGbSpFVYIkJ3FmfxI3jptPalYGdXJEMjQJE+ 2CtqJ0/HLoS/rQVG9+0h9t1QBMo5EqBe+Xv2Uk+tNw6h0qXgaoaYWhbt43NxeFdXNCOW RLdjgtvwhRHkQSBZqX1agmCkAdarelvK9WppOfiagDSp/huudNy3smDrThh97g9zTN5K pOyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723400242; x=1724005042; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w+nOiSZVTAGXNGH6eneUy74cyMDNkjNt6P9eyPr5+K8=; b=GX5xJfiymKNPXy7TFRamO/NV0NFAwsdA9Nml6M7MhBE3sRCS9lY/oQqOmlMFhv6rE1 LDKEkRApKoTqG/lyJp/AjOMtoMLL+L/lEC51790mqf1IKASwr3C0meqOwURnoPCngG5Q 9zRj+qncvUoYo0qVoEBnjUybSMeUWWN7+0+JqRkECjcQOrJJEtcA3tsC+Rqdrve6hr5f E8ByT8+1WrwlTr7wdwsitq8l6cJHpassaRpgQpoaPCqT+gzAePfGbfz6+SZg94wIgPW0 3fOwOmwGyWPvC1PP1ph0gOSsjhlB53MLlmH6ItMvf9e3L23Rwf1o0hR8ewaamx9WjLZN aOqw== X-Forwarded-Encrypted: i=1; AJvYcCVQRGoRb4DbQbLjKMzk7rUWqtpTXXTOaa6tgSDTSyNbWgDhoExsUHxWEm7DrN3kGf/FzRBkeclHbQ9jirTDyVVGtITBwB6C7Q6Fi9VkofWursAZ1QY= X-Gm-Message-State: AOJu0YxFDsrsFoi9x/kRIJMPZeAY/cflqwlmGmjvYib0N+SR2ydPbSWd oXxnGbBOqf6pjbSGiutTAKkDOQRXoI1ewgsr2yLiglmDhIj7Wh4HXKQ9ZeKOy4E= X-Google-Smtp-Source: AGHT+IE4wd/lzE9MdP0YQr2O7QtAWAX9rdSp6E7hYtxz3L9YKcOJCmCuv9Yp3oMvUw/jaUEBy1XhwQ== X-Received: by 2002:a05:6402:40d4:b0:5a3:8c9:3c1d with SMTP id 4fb4d7f45d1cf-5bd0a598365mr4773119a12.14.1723400241969; Sun, 11 Aug 2024 11:17:21 -0700 (PDT) Received: from [127.0.1.1] ([178.197.219.137]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5bd1a6032c1sm1610593a12.92.2024.08.11.11.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 11 Aug 2024 11:17:21 -0700 (PDT) From: Krzysztof Kozlowski Date: Sun, 11 Aug 2024 20:17:05 +0200 Subject: [PATCH 2/6] dt-bindings: serial: add common properties schema for UART children MIME-Version: 1.0 Message-Id: <20240811-dt-bindings-serial-peripheral-props-v1-2-1dba258b7492@linaro.org> References: <20240811-dt-bindings-serial-peripheral-props-v1-0-1dba258b7492@linaro.org> In-Reply-To: <20240811-dt-bindings-serial-peripheral-props-v1-0-1dba258b7492@linaro.org> To: Rob Herring , Greg Kroah-Hartman , Jiri Slaby , Krzysztof Kozlowski , Conor Dooley , Marcel Holtmann , Luiz Augusto von Dentz , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Linus Walleij , Johan Hovold , Liam Girdwood , Mark Brown , Daniel Kaehn Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-sound@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=4392; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=fCBvR5l2kfQnmClu3hY5hsw9S1f2r9uHvUNX7tLyV3A=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmuQAoN9Yt8uNW6oM1DQmDpVszXdEiFyOz3K0sA EqCIJvkLqKJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZrkAKAAKCRDBN2bmhouD 1yCPD/9U+1jRz1m9m7eSRZa9w5LcjzvIpO5u0gAUYN2i7+4oSzeapPYO1x3GLVZXs+CNtSqnGsa CVg8HZ3UA5a2m/BeSUdEYBEIBVAF2hiQMop7GNFrAh/i4ci0knu/KnN8OhbFoEAgQFDh4r9ssvT 9b7riBq5tjmjBJlKOOEGFSjdxyutpeR0nS/h56HFwHEPJ0p0QagC9u9PGUtQ7r4bHHl5Lod1Ifp 4Q4n6xQlYvEp2/B8I+elkuoJX6xcPMK7OA7JuhtiLmyxD6yrlx3KGt5LuFOxZuFNW44Vulk0f13 030ZkZqEnSMeYzOIxNLO6gKBYScLItTPL6bVll9dCm6p0aHOF6NSqZ2I2JZ2pDh36j3S93As6/J j2xkLjLf4UtuQsJLE7ff4XvgN4WOf7jGvh9em4o+X5tMOm3kXQY1r9tXg1L7ChySOd3Rm6Eb1s3 /1MNOq9SdUoQkxEEEO7aYSceeyYVrydUothpc1cai6L38N8ebsNym42PeKhzLUVv9Gwjuw374ez RJNHdgRRD2obRNRIlm5dksIrJYR0zBl5BwQ0Pq0JrUS0SYBC8Hq6CVgbgaB4NOaAT6L0n+/hBl1 PztglQZlN6QhDSheKlYJ+kl5JR/mAxi2Q1TlFIzySPqSQsE48lMkRheqw9IZiutKMXQK81xF16r 1VCwrDNITQCU+jQ== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240811_111724_280882_704E1541 X-CRM114-Status: GOOD ( 22.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Properties should be defined in only one place, thus add new serial-peripheral-props.yaml schema with definition of common properties for UART-connected devices (children of UART controller): current-speed and max-speed. The schema can be referenced by individual devices using these properties. Signed-off-by: Krzysztof Kozlowski --- This patch should probably go via Rob's Devicetree tree. This is the dependency for all further patches. --- .../bindings/serial/serial-peripheral-props.yaml | 41 ++++++++++++++++++++++ .../devicetree/bindings/serial/serial.yaml | 23 +----------- 2 files changed, 42 insertions(+), 22 deletions(-) diff --git a/Documentation/devicetree/bindings/serial/serial-peripheral-props.yaml b/Documentation/devicetree/bindings/serial/serial-peripheral-props.yaml new file mode 100644 index 000000000000..b4a73214d20d --- /dev/null +++ b/Documentation/devicetree/bindings/serial/serial-peripheral-props.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/serial-peripheral-props.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Common Properties for Serial-attached Devices + +maintainers: + - Rob Herring + - Greg Kroah-Hartman + +description: + Devices connected over serial/UART, expressed as children of a serial + controller, might need similar properties, e.g. for configuring the baud + rate. + +properties: + max-speed: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The maximum baud rate the device operates at. + This should only be present if the maximum is less than the slave + device can support. For example, a particular board has some + signal quality issue or the host processor can't support higher + baud rates. + + current-speed: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + The current baud rate the device operates at. + This should only be present in case a driver has no chance to know + the baud rate of the slave device. + Examples: + * device supports auto-baud + * the rate is setup by a bootloader and there is no way to reset + the device + * device baud rate is configured by its firmware but there is no + way to request the actual settings + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/serial/serial.yaml b/Documentation/devicetree/bindings/serial/serial.yaml index 40e05dd37826..30c85768d980 100644 --- a/Documentation/devicetree/bindings/serial/serial.yaml +++ b/Documentation/devicetree/bindings/serial/serial.yaml @@ -93,6 +93,7 @@ patternProperties: type: object then: additionalProperties: true + $ref: serial-peripheral-props.yaml# description: Serial attached devices shall be a child node of the host UART device the slave device is attached to. It is expected that the attached @@ -104,28 +105,6 @@ patternProperties: description: Compatible of the device connected to the serial port. - max-speed: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - The maximum baud rate the device operates at. - This should only be present if the maximum is less than the slave - device can support. For example, a particular board has some - signal quality issue or the host processor can't support higher - baud rates. - - current-speed: - $ref: /schemas/types.yaml#/definitions/uint32 - description: | - The current baud rate the device operates at. - This should only be present in case a driver has no chance to know - the baud rate of the slave device. - Examples: - * device supports auto-baud - * the rate is setup by a bootloader and there is no way to reset - the device - * device baud rate is configured by its firmware but there is no - way to request the actual settings - required: - compatible