From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEF06C4646D for ; Mon, 13 Aug 2018 19:17:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4FC062177A for ; Mon, 13 Aug 2018 19:17:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="mxN8Gy8i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FC062177A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731125AbeHMWBU (ORCPT ); Mon, 13 Aug 2018 18:01:20 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:43018 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730301AbeHMWBU (ORCPT ); Mon, 13 Aug 2018 18:01:20 -0400 Received: from [192.168.0.67] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D3DA1CE; Mon, 13 Aug 2018 21:17:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1534187865; bh=LdO0ghtQwqk+uKUc23GhRiVnO7po8gNB4WrPKORXCHM=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=mxN8Gy8iq7PTImEKHWIE+vsa4XjClMsMg1YE5QV9LC2aopIaE2Suf25fJF88sXkWh GimJh86iuFloBDu/CXo/YfKoG3JNO7SbzjhpTuW95LfiZbbp89mH6CRU8eqbu6BieQ 7qYyx3Emu5sBgVGZzyvBlbzJAOacYm74dNa/5Q/8= Reply-To: kieran.bingham@ideasonboard.com Subject: Re: [PATCH v3] dt-bindings: media: adv748x: Document re-mappable addresses To: Rob Herring Cc: Laurent Pinchart , mchehab@kernel.org, Mark Rutland , Hans Verkuil , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180809192944.7371-1-kieran.bingham@ideasonboard.com> <20180813174544.GA11379@rob-hp-laptop> From: Kieran Bingham Openpgp: preference=signencrypt Autocrypt: addr=kieran.bingham@ideasonboard.com; keydata= xsFNBFYE/WYBEACs1PwjMD9rgCu1hlIiUA1AXR4rv2v+BCLUq//vrX5S5bjzxKAryRf0uHat V/zwz6hiDrZuHUACDB7X8OaQcwhLaVlq6byfoBr25+hbZG7G3+5EUl9cQ7dQEdvNj6V6y/SC rRanWfelwQThCHckbobWiQJfK9n7rYNcPMq9B8e9F020LFH7Kj6YmO95ewJGgLm+idg1Kb3C potzWkXc1xmPzcQ1fvQMOfMwdS+4SNw4rY9f07Xb2K99rjMwZVDgESKIzhsDB5GY465sCsiQ cSAZRxqE49RTBq2+EQsbrQpIc8XiffAB8qexh5/QPzCmR4kJgCGeHIXBtgRj+nIkCJPZvZtf Kr2EAbc6tgg6DkAEHJb+1okosV09+0+TXywYvtEop/WUOWQ+zo+Y/OBd+8Ptgt1pDRyOBzL8 RXa8ZqRf0Mwg75D+dKntZeJHzPRJyrlfQokngAAs4PaFt6UfS+ypMAF37T6CeDArQC41V3ko lPn1yMsVD0p+6i3DPvA/GPIksDC4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/dWwshSKi/uwVZNycuLsz+ +OD8xPNCsMTqeUkAKfbD8xW4LCay3r/dD2ckoxRxtMD9eOAyu5wYzo/ydIPTh1QEj9SYyvp8 O0g6CpxEwyHUQtF5oh15O018z3ZLztFJKR3RD42VKVsrnNDKnoY0f4U0z7eJv2NeF8xHMuiU RCIzqxX1GVYaNkKTnb/Qja8hnYnkUzY1Lc+OtwiGmXTwYsPZjjAaDX35J/RSKAoy5wGo/YFA JxB1gWThL4kOTbsqqXj9GLcyOImkW0lJGGR3o/fV91Zh63S5TKnf2YGGGzxki+ADdxVQAm+Q sbsRB8KNNvVXBOVNwko86rQqF9drZuw= Organization: Ideas on Board Message-ID: Date: Mon, 13 Aug 2018 20:17:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180813174544.GA11379@rob-hp-laptop> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, On 13/08/18 18:45, Rob Herring wrote: > On Thu, Aug 09, 2018 at 08:29:44PM +0100, Kieran Bingham wrote: >> The ADV748x supports configurable slave addresses for its I2C pages. >> Document the page names, and provide an example for setting each of the >> pages explicitly. > > It would be good to say why you need this. In fact - I should probably have added a fixes tag here, which would have added more context: Fixes: 67537fe960e5 ("media: i2c: adv748x: Add support for i2c_new_secondary_device") Should I repost with this fixes tag? Or can it be collected with the RB tag? > The only use I can think of > is if there are other devices on the bus and you need to make sure the > addresses don't conflict. Yes, precisely. This driver has 'slave pages' which are created and mapped by the driver. The device has default addresses which are used by the driver - but it's very easy for these to conflict with other devices on the same I2C bus. Because the mappings are simply a software construct, we have a means to specify the desired mappings through DT at the board level - which allows the boards to ensure that conflicts do not appear. > Arguably, that information could be figured out without this in DT. How so ? Scanning the bus is error prone, and dependant upon driver state (and presence), and we have no means currently of requesting 'free/unused' addresses from the I2C core framework. > Regardless, > > Reviewed-by: Rob Herring Thank you. -- Regards Kieran > >> >> Signed-off-by: Kieran Bingham >> >> --- >> v2: >> - Fix commit message >> - Extend documentation for the "required property" reg: >> >> v3 >> - Fix missing comment from Laurent. >> - correct the reg descrption >> --- >> .../devicetree/bindings/media/i2c/adv748x.txt | 16 ++++++++++++++-- >> 1 file changed, 14 insertions(+), 2 deletions(-) >> >> diff --git a/Documentation/devicetree/bindings/media/i2c/adv748x.txt b/Documentation/devicetree/bindings/media/i2c/adv748x.txt >> index 21ffb5ed8183..25a02496f4ba 100644 >> --- a/Documentation/devicetree/bindings/media/i2c/adv748x.txt >> +++ b/Documentation/devicetree/bindings/media/i2c/adv748x.txt >> @@ -10,7 +10,11 @@ Required Properties: >> - "adi,adv7481" for the ADV7481 >> - "adi,adv7482" for the ADV7482 >> >> - - reg: I2C slave address >> + - reg: I2C slave addresses >> + The ADV748x has up to twelve 256-byte maps that can be accessed via the >> + main I2C ports. Each map has it own I2C address and acts as a standard >> + slave device on the I2C bus. The main address is mandatory, others are >> + optional and remain at default values if not specified. >> >> Optional Properties: >> >> @@ -18,6 +22,11 @@ Optional Properties: >> "intrq3". All interrupts are optional. The "intrq3" interrupt >> is only available on the adv7481 >> - interrupts: Specify the interrupt lines for the ADV748x >> + - reg-names : Names of maps with programmable addresses. >> + It shall contain all maps needing a non-default address. >> + Possible map names are: >> + "main", "dpll", "cp", "hdmi", "edid", "repeater", >> + "infoframe", "cbus", "cec", "sdp", "txa", "txb" >> >> The device node must contain one 'port' child node per device input and output >> port, in accordance with the video interface bindings defined in >> @@ -47,7 +56,10 @@ Example: >> >> video-receiver@70 { >> compatible = "adi,adv7482"; >> - reg = <0x70>; >> + reg = <0x70 0x71 0x72 0x73 0x74 0x75 >> + 0x60 0x61 0x62 0x63 0x64 0x65>; >> + reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater", >> + "infoframe", "cbus", "cec", "sdp", "txa", "txb"; >> >> #address-cells = <1>; >> #size-cells = <0>; >> -- >> 2.17.1 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe devicetree" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- Regards -- Kieran