From patchwork Wed Apr 17 13:51:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pratik Farkase X-Patchwork-Id: 13633419 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 CCB3BC4345F for ; Wed, 17 Apr 2024 13:58:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=NeyH9r5fvUWmihJEi855aG96zA5OeUb11bDoW5pm48U=; b=017kWjCAeLb7Dd +ikU1Bh/Im6trxAG3Q0JamgDIJ9jdphJFcXoOPOaeyuACoLdi6JnIRtX0BbNsCAXyavcyeJIlHRUV sB2hX0/PxRIWUYX1jK7wJBj8bMwhAJMQHqA7n3fUy0cfwGIvwnPZZP9B5h0Enpw13exDvftIlaobP BcaEAZ705I6JAPhEidVqD/WrxfvpSR2UlXCFIJmCDWsGKmoiIT8IGPbz1oA5F5fBsgKnmHeGSMZV+ lctPSkupAPlhaU064/MHvkuTaWzmNyPBWgWDqYNtj7fPsLbrgikZIRjUcwlmfX50bsWPCogbjV7fk BR6uBVt3BSuIombjN2mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx5nN-0000000GFc2-1YLR; Wed, 17 Apr 2024 13:57:53 +0000 Received: from mail-lf1-x135.google.com ([2a00:1450:4864:20::135]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx5nG-0000000GFZX-3itj; Wed, 17 Apr 2024 13:57:51 +0000 Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-516d6e23253so6304481e87.1; Wed, 17 Apr 2024 06:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713362264; x=1713967064; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4CPt5wsPPyfiuSaFsXxCJvkSsW2VMZQ8yMjMPQ4gYeA=; b=k24cYfZfqPOSTzyJ5QV7d1YlyoQLO0pahA/uSYo3fORvruWpEL3Y47efJ8gWDHTlbQ KUv94XJK3yPHqf7Dh1PVNKCr+NBUa9GUP1XIbXBfLATJEKjWYLpBYYqXiRQktcVQ5Zz9 RlmtCpOlET6S7kZl93NrX2u/TdT53LfyLCH9pGg5EgF1UhhWAZzIK+9pe7P3RQ4lR8UR svLBqUGZ/CLSH0fyEye8Vq03ynmDFvhXb11ITHztWmcLXJTF75tjY+h+OCdf+JV/jgMY 8VETqV23nTFrOGX93q0ki/drlCpBPk5j/g/rqFEE2rLp6RSzbA4DcrTc10zbXazux1MQ jw2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713362264; x=1713967064; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4CPt5wsPPyfiuSaFsXxCJvkSsW2VMZQ8yMjMPQ4gYeA=; b=MUl0tQ6TuwQsNaCwWGyqIxId8BY21hKeZiU0V8UTE9bN1ns931p49/KsDxuxCpLBX5 W26MEfnaUuUls4yl5rmk6OlYGfGg66vhiP/m9sZUsytG6g+XaPCFUq08+qgvbPfN365A +fo/Gs49IVhCfqVCPhOLB7lDw9WV0gUCjODDy6niTQddXDRa4K4sQA7VlKM7Hh3T/PWQ /JtkSJ8QiJoQL7TWaIfOZPKYtH/q6tJ/uCJU5BJ7XnL9MDGKujJP5LeW1RIZ3wOFiH0k MU7mt/Ez+u7cQWltHgxAHkn37tCM4Kj3glnen5wDB3hIBPt/hXweHo1m0ANZ4k3JuMFv QC1Q== X-Forwarded-Encrypted: i=1; AJvYcCWFIOKhh0IQn4y2WfHVauWo1y1tGIM3cJSZ7Xbfew4hvKI+URAC/xup5LIF+b+K6PjyHjbUs+5pKSDm3+AlinvmKiPQfdEBwhzMUbR6z8SDLvNXb/qr4dSITCBQfOQwAPlryoDl2Jpa6jd4Fxj1mlT4ICC0VUtPXZtEZQ== X-Gm-Message-State: AOJu0YyTyo2F/g6VGquFCrlO4wLpxCc1i3DhIxTOtRc2LryYoQwqI4Cl PSURyuMKT5Mx9SmSo067I9czF2OGukM/YYvlpeoynbN09nR0q6YF X-Google-Smtp-Source: AGHT+IHxA3at9V3J8oOOjFoQI8Hxcudvb/valQNqHmVnxagYSsadcG/jKBH3OuVO++fYzASwT0Gzcg== X-Received: by 2002:a2e:a695:0:b0:2da:38e:f73d with SMTP id q21-20020a2ea695000000b002da038ef73dmr11056940lje.51.1713362264074; Wed, 17 Apr 2024 06:57:44 -0700 (PDT) Received: from pratik-IdeaPad.lan (customer-145-40-29-195.stosn.net. [145.40.29.195]) by smtp.googlemail.com with ESMTPSA id e9-20020a2e8189000000b002d7095bf808sm1864467ljg.128.2024.04.17.06.57.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 06:57:43 -0700 (PDT) From: Pratik Farkase X-Google-Original-From: Pratik Farkase To: Cc: Pratik Farkase , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Pratik Farkase , Stefan Wahren , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dt-bindings: serial: brcm,bcm2835-aux-uart: convert to dtschema Date: Wed, 17 Apr 2024 15:51:10 +0200 Message-Id: <20240417135111.20375-1-pratik.farkase@wsisweden.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_065747_049031_A6E158C7 X-CRM114-Status: GOOD ( 15.87 ) 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 Convert the Broadcom BCM2835 Auxiliary UART to newer DT schema. Created DT schema based on the .txt file which had `compatible`, `reg` `clocks` and `interrupts` as the required properties. This binding is used by Broadcom BCM2835 SOC used in some Raspberry PI boards. Changes from original file: Implemented complete example which the original txt binding lacked. Signed-off-by: Pratik Farkase Reviewed-by: Conor Dooley --- Changes in v2 - Updated Maintainers list according to feedback - Fixed typo `Auxiliar` to `Auxiliary` --- --- .../bindings/serial/brcm,bcm2835-aux-uart.txt | 18 ------- .../serial/brcm,bcm2835-aux-uart.yaml | 48 +++++++++++++++++++ 2 files changed, 48 insertions(+), 18 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.txt create mode 100644 Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.yaml diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.txt b/Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.txt deleted file mode 100644 index b5cc6297cd1b..000000000000 --- a/Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.txt +++ /dev/null @@ -1,18 +0,0 @@ -* BCM2835 AUXILIAR UART - -Required properties: - -- compatible: "brcm,bcm2835-aux-uart" -- reg: The base address of the UART register bank. -- interrupts: A single interrupt specifier. -- clocks: Clock driving the hardware; used to figure out the baud rate - divisor. - -Example: - - uart1: serial@7e215040 { - compatible = "brcm,bcm2835-aux-uart"; - reg = <0x7e215040 0x40>; - interrupts = <1 29>; - clocks = <&aux BCM2835_AUX_CLOCK_UART>; - }; diff --git a/Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.yaml b/Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.yaml new file mode 100644 index 000000000000..5d4d37371d6b --- /dev/null +++ b/Documentation/devicetree/bindings/serial/brcm,bcm2835-aux-uart.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/brcm,bcm2835-aux-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: BCM2835 AUXILIARY UART + +maintainers: + - Pratik Farkase + - Florian Fainelli + - Stefan Wahren + +allOf: + - $ref: serial.yaml + +properties: + compatible: + const: brcm,bcm2835-aux-uart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + uart1: serial@7e215040 { + compatible = "brcm,bcm2835-aux-uart"; + reg = <0x7e215040 0x40>; + interrupts = <1 29>; + clocks = <&aux BCM2835_AUX_CLOCK_UART>; + };