Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp507339ybe; Wed, 4 Sep 2019 03:21:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfahXp3upl1dELCI7FXFPEN8xeu/AV2W6LLAFSvhtF1easGvzrfdLj0ZZ19XKJtocL2qbm X-Received: by 2002:a17:90a:e501:: with SMTP id t1mr4074103pjy.25.1567592514317; Wed, 04 Sep 2019 03:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567592514; cv=none; d=google.com; s=arc-20160816; b=KHcFf3QMQ8AYn6gSSH223/x8jglEqFynwKjF8zZSP421hXU9I3rDYTa7QctRc2RBkp 4bFJ1xEfxslZ3SU9yyo92cdS/sUvRuXfATF8uKW/ExanYJLV7i9I8zIB183gN0+0ItaZ R1HmkUiEtv1K9p7mQnQ+b6GmFUY5qx8ANT+/DSI2rGnA5GqOssbJI1qSQwX0uRgVu0iK pUDpBxbsJN2bX3JZOtIR4IeoVpWVJTnVdK/f2wLJ5UGIZ3wvqzY26Mr9zyf6G/zkQyYm 2G8d7lkmTaPU1rYZXf9Ai5mPi9P7zaa1c9WJGDlMvT3YSolssztK9WmvPkgCvUDfpMK0 619Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=J/+/1jhl4CuoY9Z/mhDhMnmKOIqzxcucbYzyGMDV3bY=; b=FwVPXIAnEkkcgtczKcZpiCx4a08XHHMI3OAUCjXUUM9gCuGUOzbMGHjkv8y6oNQgSX iEerkECsPfUOMk1bHIXKDQ+TjgOz8/KSdpHa4hFaa5nuPoqA3G3iCR19vIaTo6RzqR2M qz3xxAY+lT5sQ1CeVkfCl25TDMXBXGqwo+rW/VADNYrJZz8dhW1OOW5n+g1gICx89sQG XHI5XEOtD7/GaJs0bVSZza7Pl3aWxs/DnWkxlFbOAjxaWXvUVV6iRpxSXz5ILGdjFD11 rCeh/t118WQumdrDc8vp/ineuECkIDArydsLzWVIjxREUUcgc1oEGLSAfefIdrGcl6xG GM6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="CORLaL/C"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si16392265pgp.435.2019.09.04.03.21.38; Wed, 04 Sep 2019 03:21:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b="CORLaL/C"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729589AbfIDKUJ (ORCPT + 99 others); Wed, 4 Sep 2019 06:20:09 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:46492 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729068AbfIDKUJ (ORCPT ); Wed, 4 Sep 2019 06:20:09 -0400 Received: by mail-pg1-f195.google.com with SMTP id m3so10966623pgv.13 for ; Wed, 04 Sep 2019 03:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id; bh=J/+/1jhl4CuoY9Z/mhDhMnmKOIqzxcucbYzyGMDV3bY=; b=CORLaL/CvcphzgxSNJFn4X4v7kP4bDjHR6i/EX1ozp9IxvsGPO5SOgJVs12qRzD9zq 9FP+oVjN/1UAwoWfnjwhcQCUem38ccuPN2q9PM+47l+u31chxAQ+QyytYx8QyUj12sVZ yVJSvxJdNti3TuNpf7Fn/Km5A4itymNTEnpIRzEjtvDSJOKJmgZw6bNxmbI5VVkhZyl5 iYUqxGHivRS6JP6SO1VcgPMlvtwFaTUdt5bNyqvW7pOp3AKQyA5KdFC3BrJ/RL0wWlve MavDd6/n8d2fbjyajYj1s0NOlOf16VCs+HrORUVsiiwBV2BHKDD5AF0Gp0pVYImxXnC+ s5Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=J/+/1jhl4CuoY9Z/mhDhMnmKOIqzxcucbYzyGMDV3bY=; b=cJ7MAwsJLYqsLiWATorIoj9DGqWHqR2ohjF+ktsYWlihYJeVLSiAZ5DPLDTBswgLpr Jmmigciw7zZGQBT772DEY5K+kkWUxYKfgX6jUrgGMa9eChcTd1rl+mY+UHEWbIcieCVK NaAZhvzFDDIH6jgJab+5MeagrOHB0Dm3uPbqvaGCP5pjRcZCDVmTquIfkNWIpNohF8eV CXK2f47slJ6XyXuM8kRfz5qOm2H8sSh9u/KEuQk6nAPpSoXJUPq8j8PPp7psrgMuimxc GmlsXEf9+6sCye62lk/XzjKXru6+0MDQ4ysprsVgE/liP1BIv+t0KqaYoA6xHt1IB6/p +UAg== X-Gm-Message-State: APjAAAUWlWLl0+fPPV8i9HNGPR6+dqJ4vW6kqy+c9DlmKktuWjapNmFF AQD2cVvImOWUj/ODV+cM4Grknw== X-Received: by 2002:aa7:87d3:: with SMTP id i19mr31973373pfo.57.1567592408536; Wed, 04 Sep 2019 03:20:08 -0700 (PDT) Received: from pragneshp.open-silicon.com ([114.143.65.226]) by smtp.gmail.com with ESMTPSA id p20sm22806882pgi.81.2019.09.04.03.20.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Sep 2019 03:20:08 -0700 (PDT) From: Pragnesh Patel To: palmer@sifive.com, paul.walmsley@sifive.com Cc: Pragnesh Patel , Greg Kroah-Hartman , Rob Herring , Mark Rutland , Albert Ou , linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] dt-bindings: serial: Convert riscv,sifive-serial to json-schema Date: Wed, 4 Sep 2019 15:49:11 +0530 Message-Id: <1567592383-8920-1-git-send-email-pragnesh.patel@sifive.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the riscv,sifive-serial binding to DT schema using json-schema. Signed-off-by: Pragnesh Patel --- Changes in v2: - Replace enum with items in compatible property .../devicetree/bindings/serial/sifive-serial.txt | 33 ------------ .../devicetree/bindings/serial/sifive-serial.yaml | 62 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 33 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/sifive-serial.txt create mode 100644 Documentation/devicetree/bindings/serial/sifive-serial.yaml diff --git a/Documentation/devicetree/bindings/serial/sifive-serial.txt b/Documentation/devicetree/bindings/serial/sifive-serial.txt deleted file mode 100644 index c86b1e5..0000000 --- a/Documentation/devicetree/bindings/serial/sifive-serial.txt +++ /dev/null @@ -1,33 +0,0 @@ -SiFive asynchronous serial interface (UART) - -Required properties: - -- compatible: should be something similar to - "sifive,-uart" for the UART as integrated - on a particular chip, and "sifive,uart" for the - general UART IP block programming model. Supported - compatible strings as of the date of this writing are: - "sifive,fu540-c000-uart" for the SiFive UART v0 as - integrated onto the SiFive FU540 chip, or "sifive,uart0" - for the SiFive UART v0 IP block with no chip integration - tweaks (if any) -- reg: address and length of the register space -- interrupts: Should contain the UART interrupt identifier -- clocks: Should contain a clock identifier for the UART's parent clock - - -UART HDL that corresponds to the IP block version numbers can be found -here: - -https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/uart - - -Example: - -uart0: serial@10010000 { - compatible = "sifive,fu540-c000-uart", "sifive,uart0"; - interrupt-parent = <&plic0>; - interrupts = <80>; - reg = <0x0 0x10010000 0x0 0x1000>; - clocks = <&prci PRCI_CLK_TLCLK>; -}; diff --git a/Documentation/devicetree/bindings/serial/sifive-serial.yaml b/Documentation/devicetree/bindings/serial/sifive-serial.yaml new file mode 100644 index 0000000..e8d3aed --- /dev/null +++ b/Documentation/devicetree/bindings/serial/sifive-serial.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/sifive-serial.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SiFive asynchronous serial interface (UART) + +maintainers: + - Pragnesh Patel + - Paul Walmsley + - Palmer Dabbelt + +allOf: + - $ref: /schemas/serial.yaml# + +properties: + compatible: + items: + - const: sifive,fu540-c000-uart + - const: sifive,uart0 + + description: + Should be something similar to "sifive,-uart" + for the UART as integrated on a particular chip, + and "sifive,uart" for the general UART IP + block programming model. + + UART HDL that corresponds to the IP block version + numbers can be found here - + + https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/uart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + +required: + - compatible + - reg + - interrupts + - clocks + +additionalProperties: false + +examples: + - | + #include + serial@10010000 { + compatible = "sifive,fu540-c000-uart", "sifive,uart0"; + interrupt-parent = <&plic0>; + interrupts = <80>; + reg = <0x0 0x10010000 0x0 0x1000>; + clocks = <&prci PRCI_CLK_TLCLK>; + }; + +... -- 2.7.4