Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1626606rdb; Tue, 20 Feb 2024 01:52:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXUFqlB/lJn6ITQfopfWVB4BECb4h5cr57rNDNWRgxs/OGi4wBtJlxmEv6ihnjLLOSfMVdsBZHagYigMeXswyTGkYxfkZXqCaFHPmteVQ== X-Google-Smtp-Source: AGHT+IGbiKaidFG/Ny+5jpIprBNlKHEQiUjrjHWWT3cRCx8nohfNchyaiXvhfr3DTbQ8sI0igJbm X-Received: by 2002:a05:6358:7305:b0:179:246f:6918 with SMTP id d5-20020a056358730500b00179246f6918mr17012659rwg.5.1708422721010; Tue, 20 Feb 2024 01:52:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708422720; cv=pass; d=google.com; s=arc-20160816; b=tyqeisEzbypFrG/xTLToXRUx0C1VpLHAj/cRVxtmsyRW1TcwtifoTSyKhLa33CNdgZ NHjPX6YFGg/1hkKRgQTaspOAtD20pKAfNkX28bFMBZTQ+rWRSBm3AtIuo7js5YgQ2Kgu qGW7+VBSORcSv45UqB1nB3RwYyqMh6F6ymL9wO10rxlSmrPt9uu1g2P7VPSB3cRFZS2v L0SPxdq8E3nGRlFstCmoQi2B/hseQrooRHsXLHQlHFidGcivJUpnFIhuE7i9Sg7W5Zky 0X6Z4yLaMOShJ1K4567Y0cjQChvX8OhL6S7vXHlOY775ifybWFmHUkr0gO6g5NpEVhyT lzUA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=UiakybdHbx8rY7NnuZZDYCRnrnocjLmFHQX/4uXHnW0=; fh=TKQlEElz7jVAAozkrsdnvi2Ikm8C19iEZlEqPbmCweI=; b=ohnO0Rgd01WnjqVDbqE7zJB2QyTLA70+Sf5dcjwSIJwE35wCWMTzG3Drlf0O6DV19W WpkWyxJ06L+qsulc4KMO8u0Y1Z8tKfq6SR6G15BKqrqYZLWo6Owh5jEK48VTPaYdTJRA Snmlq9jvAbc9iSRHvAXTY4IbnBejzKdB+M1GQmew3/xcxySoGH+/OJjE4siehlAsRycf 2dg8yfssec+g/sShp4SfYOo4NUihexHfPiQVONq1XHqCx3KFgExg7HTgiS+LGF4RpJJF KI1F/eg63AX/Ixc1sus46GpvKtfqmQlq/sAxEsQMrZmsn94ceI+6V0y/m53oRojy5YEw FNMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S0k2SM1Z; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-72740-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s28-20020a63925c000000b005dc855c40a4si5865318pgn.645.2024.02.20.01.52.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 01:52:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72740-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S0k2SM1Z; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-72740-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72740-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8AF2B282DDA for ; Tue, 20 Feb 2024 09:52:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4CEAC60ED4; Tue, 20 Feb 2024 09:50:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="S0k2SM1Z" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63B0B60244 for ; Tue, 20 Feb 2024 09:50:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708422605; cv=none; b=oBuJslrhJY0MIUj2UuLp3fwdKaaU1z/o8TLPDqIMVxX6OfhC3cqkuqqaDvmtvk+JbdY9jEvlutXxMlbZuUKMO9++J/jnwEeBClQ4KGj+oHqZcAvwZdTPGhNh49g8P1DbTw3f52+wovpzWEawzpEC9Z3xY/rcCclp+a0nPv7186I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708422605; c=relaxed/simple; bh=lsQhrl07NU9DvhxC+y0Qv1a0Ty3WWDaIUaM1Cq0PIfs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uvlbFRpyJoLhPPTC9AdLpfAHInux8dY66isUUT+p+whPXAdPdCxrDbbmMU2CldyPsC3ty5RJgKPZPzQhYVKMRaeZ+6lLNX1CbfvMKgk1TFpMdcn4RQ1bNKP+9PYyboRf4BtS1lNFoRNpGSLyjzv7+p5EpVAtNWBOzHR277HuzHE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=S0k2SM1Z; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-33d066f8239so2430593f8f.1 for ; Tue, 20 Feb 2024 01:50:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708422602; x=1709027402; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=UiakybdHbx8rY7NnuZZDYCRnrnocjLmFHQX/4uXHnW0=; b=S0k2SM1Z5lY6rRgU0kB5ZH7QNEJ+xwl/+Rr6nHN28swL47UZJbGec87WJFEcCLNM/d /JC7WomDg3d5yxlsmvuUQ282t+iYYLFa7saUDX0VGus6FNKdQdF9J+scPdBBzKRFKnKM EDgWyDkaA/hfhcgfrQ3TbiRf6KNZp1R05fxRp3JydZe1wMZAnRZAEjpYODxkGmtxrEeS 3lT4MfWRQG/vh7kPrKE7nKmtfyGljuL3uXk7HSwx7l6aqZXK6UKYsyVBM2HUS291wxtk Jz9UDuherpHHl6AEPzCN8ZUI+rMg7ranLRlg31XTLoSw5sDcX5NTicUwwfhpbavgwO+t DNNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708422602; x=1709027402; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UiakybdHbx8rY7NnuZZDYCRnrnocjLmFHQX/4uXHnW0=; b=hgHyJkjG6L+LhsKg9zDaLD20q5imof7sh5B2fbD2h+LDVR9N5B1ZtLoj07capwrPQH 6M9p77PZUFTPTF2/cLFbWSaZFYsBls9/2Ep1FKC378mhA+C6a3amsDpXR3qQ44DNaQts M9FLpe1fsmETj4Vsz7rjBa7A13WQoVeO3TWVJI0rVcbi1FdliEERCHhKoKjhu6Z7Nywl 1cnud9CFHZFrixRcdGv0gN5zX9WEWHYW1Lt2GzupOZvi6/+aDpFM1+iHqkBki2y6B2f8 gm/ItqEcrCW+v4uByKgt0DoIdmtzFkjD5MglANte/Uio/YI2darcjevLotna266gOIgV XvJA== X-Forwarded-Encrypted: i=1; AJvYcCXRUiQxwKqx5rGmZBdtm+Gs1/+UeW4fhel/NbwRw4QrNhv4B19rcKd2MrhTIik4+S1ClrKqUX1RtWS3evcVcXBZIf1sEx7+Gxxa7cIj X-Gm-Message-State: AOJu0YyoJ0mggtkddbFgPRJWhvzPoYOlnDtTIRmqW8PUQ6QIbazyVr+X sFLB59pUBVHipwNcenaWuaN/FvIKuLIZENpam1PQuuNCmbT4B6Qpk9AgMtt5sCA= X-Received: by 2002:a5d:6912:0:b0:33d:2629:c518 with SMTP id t18-20020a5d6912000000b0033d2629c518mr5819994wru.64.1708422601761; Tue, 20 Feb 2024 01:50:01 -0800 (PST) Received: from [192.168.1.20] ([178.197.222.116]) by smtp.gmail.com with ESMTPSA id n16-20020a5d4010000000b0033b888a0a63sm13016570wrp.0.2024.02.20.01.50.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Feb 2024 01:50:01 -0800 (PST) Message-ID: <37116892-bb59-4c40-85e2-8e1b4bc96b5f@linaro.org> Date: Tue, 20 Feb 2024 10:49:59 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 02/13] dt-bindings: i2c: nomadik: add mobileye,eyeq5-i2c bindings and example Content-Language: en-US To: =?UTF-8?Q?Th=C3=A9o_Lebrun?= , Rob Herring Cc: Linus Walleij , Andi Shyti , Krzysztof Kozlowski , Conor Dooley , Thomas Bogendoerfer , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, Gregory Clement , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk References: <20240215-mbly-i2c-v1-0-19a336e91dca@bootlin.com> <20240215-mbly-i2c-v1-2-19a336e91dca@bootlin.com> <20240216022227.GA850600-robh@kernel.org> <6effca50-29a4-43b9-86eb-310bd4e08e5c@linaro.org> From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9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B21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 19/02/2024 14:41, Théo Lebrun wrote: > Hello, > > On Sat Feb 17, 2024 at 9:25 AM CET, Krzysztof Kozlowski wrote: >> On 16/02/2024 11:40, Théo Lebrun wrote: >>> On Fri Feb 16, 2024 at 11:33 AM CET, Krzysztof Kozlowski wrote: >>>> On 16/02/2024 11:18, Théo Lebrun wrote: >>>>> >>>>>>> + mobileye,id: >>>>>>> + $ref: /schemas/types.yaml#/definitions/uint32 >>>>>>> + description: Platform-wide controller ID (integer starting from zero). >>>>>> >>>>>> instance indexes are a NAK. You can use i2cN aliases if you must. >>>>>> >>>>>> Why do you need it? To access OLB? If so, add cell args to the OLB >>>>>> phandle instead. >>>>> >>>>> Why we do what we do: I2C controller must write a 2 bit value depending >>>>> on the bus speed. All I2C controllers write into the same register. >>>> >>>> Which register? Your devices do not share IO address space. >>> >>> mobileye,olb is a prop with a phandle to a syscon. That syscon contains >>> the register we are interested in. >> >> So exactly what Rob said... I don't understand why you have chosen to go >> with alias. > > I had misunderstood Rob's original message. Now that I've done some > tests to use cells I get what was meant. I'd have a follow-up question. > What should the cells contain? I see two options: > > - phandle + I2C controller global index (from 0 thru 4). Then Linux > (or other) driver know how to map that index to register + mask > combo. ie: > > i2c2: i2c@500000 { > compatible = "mobileye,eyeq5-i2c", "arm,primecell"; > reg = <0 0x500000 0x0 0x1000>; > /* ... */ > mobileye,olb = <&olb 2>; > }; > > - phandle + register offset + mask. ie: > > i2c2: i2c@500000 { > compatible = "mobileye,eyeq5-i2c", "arm,primecell"; > reg = <0 0x500000 0x0 0x1000>; > /* ... */ > mobileye,olb = <&olb 0xB8 0x300>; /* phandle + offset + mask */ > }; Whichever works for your current and possibly future needs and hardware, because property should have one meaning. It's anyway specific to the property. Second option is quite popular. Please design it for entire hardware, not for this one particular case. Best regards, Krzysztof