Received: by 10.213.65.68 with SMTP id h4csp627573imn; Wed, 28 Mar 2018 09:45:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx48JXEh+Jxt2YN+ZkelttuIIztpETY0w3mhDs0bidYvvPjQBXEecAIEhFF//1WhHuzs9O2PJ X-Received: by 10.98.198.195 with SMTP id x64mr3576736pfk.11.1522255523404; Wed, 28 Mar 2018 09:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522255523; cv=none; d=google.com; s=arc-20160816; b=VPU1rDD18Bu6EVJgGs5LwleVNwK4hHZJVn2EeD+CuO3fISjaYKjQRr1x3fICUQVgd4 RLPra3C7Krm+mrWtPKP04z2zdR6G2yZoh6YprYgAjgWK21f2qZi/NX5b4V98zzhmsZ/c BblQA5pcWt4oaGCxyzWnCE4kXYAI2bg36okeFpUaZWDHQI3g7VvCI65GPpwb0cZliW+z UQKFFJbU243sF5WKMEF1hLjdCyvduXR0E4wg2AH0baht97sw2aVp3bjIWvo6snprSbN4 n8bfzd6b19E6B7nJDfxNWx7AFsP7gftcOHizJ1Q6RNnu3qONgcqTtnW42Fs/gEhbBHix mSBQ== 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 :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=a+BkJBm014riogF91T1U0H7r/JoR5pZY4C84/dpg2i0=; b=SUoQOHgbXqN+e5zP34NTgJI3Q2IgoJIGOFDH/U98iGwQNNuz/ReQ3d4a1Pi19c+4Og WEK7tF9kPSA1UPa0/W4sXeNbzy2ikoLMhcByPttKlnay8YAsk9dAQFdJjLIDCSLyJ/Xg Kc3pe6Nn4LwovmAcMijHaFScZKoDEoqtlXhKLR0Q6h5rN5vLljADJWRce3p4AG3xqAA3 VHiXKfKIO/20M2Laj//5YahHBQdGmKnUUlVgdF2IQIe56wBtzO4QqJKyK3zWx4vF5fV0 3J9lQS0JEgLIImskdyd/Jz2z972idaHEWZ66UfiI8U8zvN7tGF8NkxFOHRYY+nHtUDML GYTA== ARC-Authentication-Results: i=1; mx.google.com; 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 c24-v6si3731649plo.273.2018.03.28.09.45.08; Wed, 28 Mar 2018 09:45:23 -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; 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 S1753339AbeC1Qmc (ORCPT + 99 others); Wed, 28 Mar 2018 12:42:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:56678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752836AbeC1Qm3 (ORCPT ); Wed, 28 Mar 2018 12:42:29 -0400 Received: from mail-qt0-f171.google.com (mail-qt0-f171.google.com [209.85.216.171]) (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 0D3AB21839; Wed, 28 Mar 2018 16:42:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D3AB21839 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh@kernel.org Received: by mail-qt0-f171.google.com with SMTP id f8so3198578qtg.12; Wed, 28 Mar 2018 09:42:29 -0700 (PDT) X-Gm-Message-State: ALQs6tDGknfV+oj635OYdat+FQMVGOTv47aJl8obH007bu6B1Mbk/inR bQThQuVw5UWboJCuC5TjUXFBKYDRx5KzoQij1g== X-Received: by 10.237.38.135 with SMTP id q7mr6316136qtd.205.1522255348129; Wed, 28 Mar 2018 09:42:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.213.166 with HTTP; Wed, 28 Mar 2018 09:42:07 -0700 (PDT) In-Reply-To: <20180328101922.22a7039d@bbrezillon> References: <20180323110020.19080-1-boris.brezillon@bootlin.com> <20180323110020.19080-6-boris.brezillon@bootlin.com> <20180326071946.dtrhhxx3iwwymk73@rob-hp-laptop> <20180328101922.22a7039d@bbrezillon> From: Rob Herring Date: Wed, 28 Mar 2018 11:42:07 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 05/11] dt-bindings: i3c: Document core bindings To: Boris Brezillon Cc: Wolfram Sang , Linux I2C , Jonathan Corbet , linux-doc@vger.kernel.org, Greg Kroah-Hartman , Arnd Bergmann , Przemyslaw Sroka , Arkadiusz Golec , Alan Douglas , Bartosz Folta , Damian Kos , Alicja Jurasik-Urbaniak , Cyprian Wronka , Suresh Punnoose , Rafal Ciepiela , Thomas Petazzoni , Nishanth Menon , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Vitor Soares , Geert Uytterhoeven , Linus Walleij , Xiang Lin , linux-gpio@vger.kernel.org, Boris Brezillon 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 Wed, Mar 28, 2018 at 3:19 AM, Boris Brezillon wrote: > Hi Rob, > > On Mon, 26 Mar 2018 17:24:58 -0500 > Rob Herring wrote: > >> > + >> > +I3C devices >> > +=========== >> > + >> > +All I3C devices are supposed to support DAA (Dynamic Address Assignment), and >> > +are thus discoverable. So, by default, I3C devices do not have to be described >> > +in the device tree. >> > +This being said, one might want to attach extra resources to these devices, >> > +and those resources may have to be described in the device tree, which in turn >> > +means we have to describe I3C devices. >> > + >> > +Another use case for describing an I3C device in the device tree is when this >> > +I3C device has a static address and we want to assign it a specific dynamic >> > +address before the DAA takes place (so that other devices on the bus can't >> >> static is I2C address and dynamic is an I3C address. That could be >> clearer throughout. > > I'll clarify that. > >> >> > +take this dynamic address). >> > + >> > +The I3C device should be names @,, >> >> s/static-address/static-i2c-address/ > > Okay. > >> >> > +where device-type is describing the type of device connected on the bus >> > +(gpio-controller, sensor, ...). >> > + >> > +Required properties >> > +------------------- >> > +- reg: contains 3 cells >> > + + first cell : encodes the I2C address. Should be 0 if the device does not >> > + have one (0 is not a valid I3C address). >> >> Change here to "encodes the static I2C address". >> >> 0 is not a valid I2C address? > > According to [1] it is reserved, and it's reserved in the I3C spec > anyway (see "Table 9 I3C Slave Address Restrictions" in the I3C spec). Sorry, what I meant was s/I3C/I2C/. The first cell is I2C address and 0 is not valid. >> > + >> > + + second and third cells: should encode the ProvisionalID. The second cell >> > + contains the manufacturer ID left-shifted by 1. >> > + The third cell contains ORing of the part ID >> > + left-shifted by 16, the instance ID left-shifted >> > + by 12 and the extra information. This encoding is >> > + following the PID definition provided by the I3C >> > + specification. > > One extra question for you: should I refer to the I3C_DEV(), > I3C_DEV_WITH_STATIC_ADDR() and I2C_DEV() macros in the bindings doc? > And if I do, should I use them my example? Well, I don't want to see "device@I3C_DEV(...)" for unit-addresses. You can use them for reg property, but it's somewhat pointless to use it in one place and not the other. Rob