Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5315514ybe; Tue, 10 Sep 2019 01:37:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqymj+oc/iLpqvXxteC7u+a5EzkaU4qar+HTZlQg0aO3iZQW3k/jJM6KUP3Y3yHPKeL0lB2v X-Received: by 2002:aa7:d40d:: with SMTP id z13mr28306730edq.229.1568104649092; Tue, 10 Sep 2019 01:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568104649; cv=none; d=google.com; s=arc-20160816; b=BnaBHYusR4B4XBmZx0GtVfu9n1v5rboGgzx0YqJipKq6HIHC2q82sCaJTMYO4S6dQW 0nfqG80M1n373AIxkD7hl99X74oFfBkJOzPI+7h7uLbSanbNzJK/WcZ8VJdE2qAXhP9n jX6sbS0Vr44aDdXjyMxCafR6BHii7YoMP5LwbWAEvgRFWk83T179/2zNVB+NKNL5gyYS ZvsESrC1aSHUP6v+eD32PNDmeDAyD3mEs1/gRJdIpwIBBCd4MtVd07M5V7xQ543Cr/bJ RmTZptFDGSNIDLULUwlWOCf5UtSsgENzE0VvO8+q5bfuUoDBBkasQvf49nUKs3QlfRDJ WhLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YKOhdBJvUihFwiKCm2jTtsPpRN6v0g7NNw1wQ4YTUNs=; b=TelSQVZ2zah8Z5s3qz1+60J4itjEbV3nIyp+XZXeob4jLEo+2Jqdoh973Wp1xQ8QCV Sr4Dz8SQS2Bafiz3H9E4foqeoW+U8A/u0SIaMiJTueRLiaGGFQ9dYz8wE5Cy9AaPKVSo 57msTuGIg9LKa2Qe2FemV8uOcLIwdquxFqk/IfwzHr29cMkX0mDvAjhz17LibFevKwb9 86IB/jr8i9KFDOmzrbVGxKtQj7sfXaYL2RlCNgg9JyxwOcpbzF9HbNln0M7M9gpvEG+Q sofW+DWCnYc07PuvSLzqxl/uiDjEaVzPoQbUXzCfgCorOpiQ+BGalBzDhGxoILtEABlc 6lig== 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 o9si8853052eja.247.2019.09.10.01.37.05; Tue, 10 Sep 2019 01:37:29 -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 S2387751AbfIIPKt (ORCPT + 99 others); Mon, 9 Sep 2019 11:10:49 -0400 Received: from mleia.com ([178.79.152.223]:43654 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727278AbfIIPKs (ORCPT ); Mon, 9 Sep 2019 11:10:48 -0400 Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id C66E339CB18; Mon, 9 Sep 2019 15:10:45 +0000 (UTC) Subject: Re: [RFC,v2 2/6] i2c: add I2C Address Translator (ATR) support To: Wolfram Sang , jacopo mondi , Luca Ceresoli , Peter Rosin Cc: linux-media@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Sakari Ailus , Hans Verkuil , Laurent Pinchart , Kieran Bingham References: <20190723203723.11730-1-luca@lucaceresoli.net> <20190723203723.11730-3-luca@lucaceresoli.net> <20190901143101.humomdehy5ee73sk@vino> <20190909072232.GA990@kunai> From: Vladimir Zapolskiy Message-ID: <8af9a049-06b9-dbe8-827b-5134d20e9435@mleia.com> Date: Mon, 9 Sep 2019 18:10:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20190909072232.GA990@kunai> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20190909_151045_839705_75E56B8F X-CRM114-Status: GOOD ( 22.12 ) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wolfram, On 09/09/2019 10:22 AM, Wolfram Sang wrote: > Hi Vladimir, > >> I won't attend the LPC, however I would appreciate if you book some > > A pity. I would have liked to have you in the room. Let's see if we can > get enough input from you via mail here. > if it might help, I'll attend the Embedded Recipes and ELCE conferences this year. >> time to review my original / alternative implementation of the TI >> DS90Ux9xx I2C bridge device driver. > > We have only 45 minutes, this will not allow to review specific > implementations. I want to give an overview of existing implementations > with pros/cons... > Sure! Any shared summary/opinions are greatly welcome. >> The reasons why my driver is better/more flexible/more functional are >> discussed earlier, please let me know, if you expect anything else >> from me to add, also I would be happy to get a summary of your offline >> discussion. > > ... and I'd appreciate support here from you, like your summary of the > back then discussion (from where I can dive deeper if needed). > > Also, with Luca's new series we discussed some scenarios which can > happen WRT to I2C address conflicts. Maybe you could comment on them, > too? I do remember I've commented on the Luca's suggestion of using dynamic I2C addresses from a pool (the introduced "i2c-alias-pool" property). I have to scrutinize it in Luca's v2, but then it might happen that the userspace won't know to which IC on the remote side it communicates to. > As I read the old thread, you have a hardcoded aliases using > "ti,i2c-bridge-maps". This means you can't have own DTSI files for e.g. > add-on modules, do I get this correctly? > Basically hardcoding of aliases completely resolves the highlighted above problem. Still it is possible to have own DTSI files for the FPD link detachable PCBs, and this is an exceptionally important scenario, however some limitations shall be applied: * dt overlays for "local" derializer/deserializer ICs, it's a generic and universal solution, it is successfully used in the field, * only "compatible" PCBs are supposed to be connected (same set of I2C devices/addresses on every such PCB), this is imperfect for sure, * "ti,i2c-bridge-maps" list is excessive to cover "almost compatible" (in the sense from above) PCBs, some of the missed alias matches just won't instantiate a driver, this is of course also imperfect. In general nothing critical should happen, if some I2C device on the remote side is simply not probed in runtime, in opposite you can imagine that writing for instance to another EEPROM of two on the remote side could be harmful. Any technically better solution to the two given approaches (from Luca and from me) is more than appreciated. For non-dynamic/fixed local and remote PCBs the fixed mapping is better, the dynamic case is covered by the dt overlays, why not? As a side note please do remember that the I2C bridging on Maxim GMSL and TI DS90Ux9xx are different, the former one is a real mux, and the latter one is not, I'm uncertain if it's reasonable to think of a generalized solution which covers both IC series, so likely we have to review the developed solutions for them separately instead of trying to work out a combined one. -- Best wishes, Vladimir