Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp288956ima; Sat, 20 Oct 2018 07:22:32 -0700 (PDT) X-Google-Smtp-Source: ACcGV631r6Xfz0SRmamjiV6tgcxES96mI5aTKGyX5fcgBTwvjEmPykwHuCqgUyMbw5eYYewgUrt+ X-Received: by 2002:a17:902:2:: with SMTP id 2-v6mr38892353pla.178.1540045352027; Sat, 20 Oct 2018 07:22:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540045352; cv=none; d=google.com; s=arc-20160816; b=K7GL3WP35J1EQ9Uxq1M/Gx4DWx4eHgte2U4jVN+J88gq2CGw37jrfBP0C9WmcvqTVd l5S6f+kz11qF/wYBsC3kTZXAhBQHcAja0/DOBiuzV8/gHcEYrtSva9BF6wBPca8lYoX7 qoZQdjruBCJWsb3HNPYRBxnlcTPTx+0aQPiq5CnRzPLtwViDLjnglhTzLPlHeH4ZiuYC VtN1qBxzFcnkje/vR5RS9jjMajN5r11H71ptaWkHTqo12cHicpzPzLoiZN03PVFg0en2 /hwdjd3ljT3tRVN5WqBd0zkjfHz1WhwQ0/Nh/OGlvdnyYxjdr/g1nZK6Uq/8MD98NTSo ppxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=YWU7ncOwevDaC2Zn215Hf+PdFCFmT2RS9nYQ3/lWl64=; b=woL3iQNG/+JMJrnDWicTZW1+0Y5mwUQZoIUpBtIV6q8TD0dTIJ18Iu8G77vtQ+ezaE gdptyiv3QeBiMQM5hcyeLVCGD6OXEwcZRSSdcRg4yYZOgbbCdacsd2sd5J7oAf0E/FgJ rgcm5xT95rdj1qMjKgw1meUHP/RXXOTaTOBHemnSexEAZ0HPjHzTDpV01ktbWcj/fPbC Qo/Qc8Wjz/d4JpPUifFVeFnq6tkzS/eWJrwuQofD9kQNpTz/Zfz1n+RUF/UMu2XfO8OX 3cv+cdS4Qe2is06eAhRdyKifxqGT4RidOX9Mjv9k+2oqq/fulA53KICajYL40SXFRkjA DXeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="j0H+dFP/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si488331pgq.136.2018.10.20.07.22.16; Sat, 20 Oct 2018 07:22:31 -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=@kernel.org header.s=default header.b="j0H+dFP/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727470AbeJTWce (ORCPT + 99 others); Sat, 20 Oct 2018 18:32:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:47298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727353AbeJTWce (ORCPT ); Sat, 20 Oct 2018 18:32:34 -0400 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 791B621547; Sat, 20 Oct 2018 14:21:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1540045314; bh=+40t+JokEkPKqjA0ZzxhopmJPSulcQLzupa1A3k6mn4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=j0H+dFP/92P57M9unZq3GMC4bFqGbY3BJzIsL/pIq8AL02ZmLry9U8Lr+tX8UMJCO 0YddfIRN9VSjXCjN3ilhx2oLHmlOD0PEqoDVy2gT8GV1XfRTnNGEklE4GBRHZtoJ05 6GRGrW9SINyVZTHdUit0ZPeLvp37xpsuPs+3FvV8= Received: by mail-qt1-f172.google.com with SMTP id x24-v6so9985434qtx.11; Sat, 20 Oct 2018 07:21:54 -0700 (PDT) X-Gm-Message-State: ABuFfoiWJY+j22hnRQUPay7WNqwfFddRjeyq59B0+DdM8d5fXxhHxf3b UiIy4ht7BCOHJkAr4WpjXSTOyYAOMLxKhJ7e/g== X-Received: by 2002:ac8:1701:: with SMTP id w1-v6mr4831981qtj.76.1540045313584; Sat, 20 Oct 2018 07:21:53 -0700 (PDT) MIME-Version: 1.0 References: <20181019184827.12351-1-paul.walmsley@sifive.com> <20181019184827.12351-2-paul.walmsley@sifive.com> <4317548d-f831-29ba-3be9-35f080587db9@sifive.com> In-Reply-To: <4317548d-f831-29ba-3be9-35f080587db9@sifive.com> From: Rob Herring Date: Sat, 20 Oct 2018 09:21:42 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 1/2] dt-bindings: serial: add documentation for the SiFive UART driver To: Paul Walmsley Cc: "open list:SERIAL DRIVERS" , devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, "linux-kernel@vger.kernel.org" , Greg Kroah-Hartman , Mark Rutland , Palmer Dabbelt , Paul Walmsley Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 19, 2018 at 5:06 PM Paul Walmsley wrote: > > > On 10/19/18 1:45 PM, Rob Herring wrote: > > On Fri, Oct 19, 2018 at 1:48 PM Paul Walmsley wrote: > >> Add DT binding documentation for the Linux driver for the SiFive > >> asynchronous serial IP block. Nothing too exotic. > >> > >> Cc: linux-serial@vger.kernel.org > >> Cc: devicetree@vger.kernel.org > >> Cc: linux-riscv@lists.infradead.org > >> Cc: linux-kernel@vger.kernel.org > >> Cc: Greg Kroah-Hartman > >> Cc: Rob Herring > >> Cc: Mark Rutland > >> Cc: Palmer Dabbelt > >> Reviewed-by: Palmer Dabbelt > >> Signed-off-by: Paul Walmsley > >> Signed-off-by: Paul Walmsley > >> --- > >> .../bindings/serial/sifive-serial.txt | 21 +++++++++++++++++++ > >> 1 file changed, 21 insertions(+) > >> create mode 100644 Documentation/devicetree/bindings/serial/sifive-serial.txt > >> > >> diff --git a/Documentation/devicetree/bindings/serial/sifive-serial.txt b/Documentation/devicetree/bindings/serial/sifive-serial.txt > >> new file mode 100644 > >> index 000000000000..8982338512f5 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/serial/sifive-serial.txt > >> @@ -0,0 +1,21 @@ > >> +SiFive asynchronous serial interface (UART) > >> + > >> +Required properties: > >> + > >> +- compatible: should be "sifive,fu540-c000-uart0" or "sifive,uart0" > > I assume once again, the last '0' is a version? > > > Yes. > > > > Palmer mentioned the > > compatible string is part of the IP block repository? > > > It is, but there's no guarantee that the compatible string from the RTL > will make it into a ROM for any given chip. For example, a customer may > want the UART, but not want to take the DT ROM to keep area down. Optional? Well, that's pointless to have then. > This is one of the reasons why we'll likely switch to the usual > software-maintained DTS files for Linux, just like the rest of arch/arm, > arch/powerpc, etc. Then you should probably just follow normal conventions. I don't think DT in the h/w is the best strategy anyways. Ideally, what the h/w should have are version and capabilities (assuming there are configuration options) registers which aren't optional and can't be forgotten to be updated. The version should probably have a vendor too. > > As I mentioned for the > > intc and now the pwm block bindings, if you are going to do version > > numbers please document the versioning scheme. > > > Will add that to the binding document. I don't seem to be making my point clear. I don't want any of this added to a binding doc for particular IP blocks. Write a common doc that explains the scheme and addresses the questions I asked. Then just reference that doc here. Maybe this is documented somewhere already? Otherwise, if one is creating a new IP block, how do they know what the versioning scheme is or what goes in the DT ROM? > > > > Where does the > > number come from? > > > It comes from the RTL, which is public: > > https://github.com/sifive/sifive-blocks/blob/master/src/main/scala/devices/uart/UART.scala#L43 I'm not going to go read your RTL, sorry. Rob