Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1062954imu; Fri, 16 Nov 2018 15:12:21 -0800 (PST) X-Google-Smtp-Source: AJdET5cgxY1o9wFwJ6l4+/Ys5nTc1L9e0LEAXYkrkLhMhR3u3FEpZV03wvqrQAQxQ6CQuUuSpUYZ X-Received: by 2002:a63:4a0a:: with SMTP id x10mr11733250pga.237.1542409941385; Fri, 16 Nov 2018 15:12:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542409941; cv=none; d=google.com; s=arc-20160816; b=LLtIPPtNqPYN28IxL9k5aHegI4FesD/9bmkCCzfZju0LRl7Ll+vnsNx61jdMHrjgWU ZwYusKj9zEK0mUeu66RgRZl+7SswBwDQtipnRRo4vQsQ5zZq0dc6hX+qChd/us02woOu f0Ja6/1OG+/5KaPEhddwXzI+xEU/pILHyXKdK3NC7Ld48gmFzsth9ZZHQdwXLuHnoNCx 6dTcK7n6S9CbjMaEL8BZa9bo4cPa3d9Y0NUp5R3QQc0OmL3W/8gP7B/SdnNTTcwBbzq/ IfyYVZQHPu5vUgh9D01GGHMM530DhQh8t3adpgrPvYZ3TXNS8T49ll2wN/QSWoU3gSNe mf7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:date:from:dkim-signature; bh=1H2lGRxtevhCSYRUCI5TlF5LluRKBPaQ4iXlGKU2yyc=; b=YrLM8nT2/TdWCKk0wB2czxQJeE/ONcO+rZxFsZFdHsz720bVvz4j5bUrMKdLAAYRdW snyiEAv/CQ2HRD64HLNas+JRb0qT97AICfc6VWpCMBme4b1zsrNtvDptQQImIhldOQVr ubTGc1OWh5sC4aJvSCW0eouwBp92TDmvvTeaJSvKyAowWz89kcBITdoT0sjY1w+Kg1E4 5vnHX2rxHYkXvNbOBko39nRTVEVg+LnfFkiDvQ5rTxxfAZfmlSXyakIA2BJR9WMRBxGE Jbs2EmqxrFyFFk21U+lUdcLJICG9u7AqSPoBfPPsF4bOCTKz1ulQOyiTICCwXUtanuqH wvcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=hFjYKfWF; 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 s36-v6si34211766pld.387.2018.11.16.15.12.06; Fri, 16 Nov 2018 15:12:21 -0800 (PST) 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=hFjYKfWF; 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 S1730613AbeKQJY6 (ORCPT + 99 others); Sat, 17 Nov 2018 04:24:58 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:45415 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727505AbeKQJY6 (ORCPT ); Sat, 17 Nov 2018 04:24:58 -0500 Received: by mail-pf1-f195.google.com with SMTP id g62so8812664pfd.12 for ; Fri, 16 Nov 2018 15:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=1H2lGRxtevhCSYRUCI5TlF5LluRKBPaQ4iXlGKU2yyc=; b=hFjYKfWFMPwH92ilEtVWrUAXLc1lKMRa7srslaIcvriT78ZzNIviSMvlqmiWHnLF4J WZrS5Zd322KQQZ13lLcc3heyBzERKNGCPwFQddUk76hu0aXwEyt08czpLrgiGdHCu74I IRD7C7EdbAqtlI9L5TUaW+hR8VLGPC4nte9tRMvzFK2Cn1MErc5BGU9Dow1+sdBocHkJ qYOoyficMqLWEE9K+1ESSZNo/hF7Mvtb4HXi/IG8XpUgNXHLqTrZ7VAtAO2fjkl3AAi3 OMhpVwRB1aiVCt+hRjYvZar0Uk6ikUpgFmJpxHwenONGQdhTM1yrVk5I1FbSGDD9+dsg Wgmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=1H2lGRxtevhCSYRUCI5TlF5LluRKBPaQ4iXlGKU2yyc=; b=dH2usC0B2o+OA3pcLyHTDR4XrnIt/thFnDyDW0+j0931sdwNo2hG8Dk9xB9RwRH+OI zEtJ9r4GTy+7r4cyN3idYpnCCaYlN61sn1AyFOxzaePdNc/jV0reb29JoSO1YxT8N+2O Qbl5TJRuV0cI7sOZMAMhAeYNa+Z6+rBhJ0u6MWL9J3zVpCsm+N9lZDrLWkdPr3kmlgR6 wFs2f44Y43003Phf89TR5jizS8buCpUqbeYj+J+gtSnKuDeVMzy0LkfSSVNCelbfmNvt RrvF0p05mjYkjGa5e9mVOsp6tCDYCKII8DmVLzrFGn12XXlmUc98mRaXyCN0fN4xF65e MSQQ== X-Gm-Message-State: AGRZ1gIzbh2psW4liMagNDuzwXStL44tW//SKXNEj318de319qatxr0O mrrvkfaM2RqZMVzQQx9Ac1BZ9w== X-Received: by 2002:a63:e915:: with SMTP id i21mr11475723pgh.409.1542409839110; Fri, 16 Nov 2018 15:10:39 -0800 (PST) Received: from localhost ([216.234.200.180]) by smtp.gmail.com with ESMTPSA id u137sm25144578pfc.140.2018.11.16.15.10.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Nov 2018 15:10:38 -0800 (PST) From: Paul Walmsley X-Google-Original-From: Paul Walmsley Date: Fri, 16 Nov 2018 15:10:35 -0800 (PST) To: Rob Herring cc: Paul Walmsley , "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 Subject: Re: [PATCH v2 1/2] dt-bindings: serial: add documentation for the SiFive UART driver In-Reply-To: <20181024173232.GB5652@bogus> Message-ID: References: <20181019184827.12351-1-paul.walmsley@sifive.com> <20181019184827.12351-2-paul.walmsley@sifive.com> <4317548d-f831-29ba-3be9-35f080587db9@sifive.com> <6571bb0e-b36a-1196-4d90-8aa62d8a2a90@sifive.com> <20181024173232.GB5652@bogus> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-964611338-1542409835=:25712" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-964611338-1542409835=:25712 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 24 Oct 2018, Rob Herring wrote: > On Tue, Oct 23, 2018 at 10:05:40AM -0700, Paul Walmsley wrote: >> On 10/20/18 7:21 AM, Rob Herring wrote: >>> 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/sifiv= e-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" >>>>>> >>>>> 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? >> >> >> Seems like there might be some confusion between IP blocks as integrated= on >> an SoC vs. IP blocks in isolation.=A0 It's not necessarily the SoC integ= rator >> that sets an IP block version number; this can come from the IP block ve= ndor >> itself.=A0 So each IP block may have its own version numbering practices= for >> the IP block alone. >> >> >> For SiFive IP blocks, we at SiFive could probably align on a common vers= ion >> numbering structure for what's in the sifive-blocks repository. > > I thought you had that from what Palmer said and what I've seen so far. > You have at least 3 bindings so far it seems. Yep. >> But other IP blocks from other vendors may not align to that, or may not >> have version numbers exposed at all.=A0 In those cases there's no way fo= r >> software folks to find out what they are,=A0 as you pointed out earlier.= =A0 This >> is the case with most DT compatible strings in the kernel tree. >> >> For example, we've integrated the NVDLA IP block, from NVIDIA, on some >> designs.=A0 Any NVIDIA version numbers in that IP block will probably no= t >> follow the SiFive version numbering scheme.=A0 I'd propose the right thi= ng to >> do for an IP block compatible string is to follow the vendor's practice,= and >> then use the SoC integrator's version numbering practice for the >> SoC-integrated compatible string. > > Experience has shown that using compatible strings only specific to > vendor IP blocks (with or without version numbers) is pretty useless. > > For licensed IP, I'd suggest you follow standard practices. OK > A genericish fallback is generally only used when there's lots of SoCs=20 > sharing a block. > > In these cases though it needs to be clear what bindings follow some > common versioning scheme and which don't. That's accomplished > by referencing what the version scheme is. Otherwise, I'd expect I'll > see the versioning scheme copied when in fact the source IP in no way > follows it. > >> In effect, an SoC integration DT compatible string like >> "sifive,fu540-c000-uart" implicitly states an IP block version number: >> "whatever came out of the fab on the chip"[**].=A0=A0 I'd propose that e= ven in >> these cases, there's an advantage to keeping the "0" on the end, since i= t >> uniquely identifies an SoC-independent IP block, rather than just the ty= pe >> of the IP block. =A0 But if the "0" on the end of the SoC integration DT >> compatible string is problematic for you, we can certainly drop that las= t 0 >> from the SoC integration DT compatible string, and only suffer a slight = lack >> of clarity as to what version was integrated on that chip. > > Personally I'd leave it off, but I'm fine with either way. It just needs > to be the way you document for SiFive IP blocks. OK, we'll leave it off. > Really, I'd just like to see folks get better at putting version and > configuration information into registers. We only need DT for what we > can't discover. Yep, agreed. - Paul --8323329-964611338-1542409835=:25712--