Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp160502lqp; Tue, 21 May 2024 23:50:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURcs4eJjMHBELxY69k7M8T7NthTH73CtIfjDwYwERHWN4+WdxSNwCTyDKJH/AAkO+pzyRn78J0DfU47kXOU7ZDIrbht0HD7ff5mYrTNA== X-Google-Smtp-Source: AGHT+IFeOiUtM8EJ0KGHBASPWHcAv04S8EuCNZ4WUiSwY/tmgLJOnTK/PE3DOL3jyPR5v8ef0Beq X-Received: by 2002:a05:620a:66b:b0:792:e36d:8b90 with SMTP id af79cd13be357-794994e7441mr112885285a.78.1716360615815; Tue, 21 May 2024 23:50:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716360615; cv=pass; d=google.com; s=arc-20160816; b=x6eZsqOFrG6FPnjTG7M7jgLgaP/j6ket/Wjg5VN46D0MEXMBGESy52A9gguT0l7sWI WO4loHTpF4FN3W2gmUd8TtP/gxFrYe51wEXQwjwAml7m5L1oXPh5SchTCSPk+w2mzyup 27ZI9xrDQf+AyLd8sSDZxwbYu0Qz3ZVkeTsjjoLM7fhPjbq+xOb+c7zvLHZJOJJCr1zm DknH6mIO2r+K+zPNG2dOO62oj9zAOnVfc54QhgCNiwjgKgoDxUCci2edottTa4dGm3hl YjyqC2R4SJWFfJsTW8ft8iaN5T/DRIFvE7ob8e6Zyd38DRt0awad5aMfb+TiNlreYpFK mTWw== 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:content-language :from:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=6z8VZO2E5Yp2+MYIV+M/atvBljF9TwEeqI7sWlmt+mc=; fh=24cc7K+EAZVLihACZpxhWCzu/pCOjKkmRYFxKWyKBOc=; b=W8wf9RCX3fQ07M4V7JibYdJREDEbAmHMxKQytmzAYBFmcQYQJ5+fhHZUc/DeBUPCQn SCH5Tg9T/O1GshVH0P7BYr3JNddSANrfWfXtqimMWJAmOEz+2tNx+6Radkvg5Vw3hhlx UkOgOh2GBteSshm9SGeBmK806E3Qr5QwiRWTp3iLnqUqDFWAbEJPucqMXujCsnEXgsqI KTtpNKKqqDWIJZ9wJLtiLl3Lfh1kqRnV/wiS4w7mkLjWV5omX0EZI0g3plCcf8l5KXP+ oL2ZtDZ/VWWVOeOwyVB3ThFegyRRlOs8oC5K4keMG/17jX/ZK0UMGLItq/L8ZbwmgzmA yuNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="G0iMaK/V"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185826-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-792bf33ade3si831793185a.498.2024.05.21.23.50.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 23:50:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185826-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="G0iMaK/V"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-185826-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 79E1F1C2177C for ; Wed, 22 May 2024 06:50:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EA41C7CF1A; Wed, 22 May 2024 06:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G0iMaK/V" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EAEC6763EE; Wed, 22 May 2024 06:49:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716360591; cv=none; b=g2PzQ/pipeoD0IPZWDUv2uWxPJnMdnNFc6H6pheHS0v4H0h9AJ5EZAmD5wgMu1iSYy4kngv9e1QMd2pcgsj5KJ9ZJKZbgFG/t9mCAMzS82Bfe2IONrG/BJzG/PDzlKLiCRMsAYgPwgGCapiXafpEUfWgTxfxAk+EO8TJTED4mog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716360591; c=relaxed/simple; bh=GKIxfqewTLJtrl909K/lWYRo22JlV2kAJyJlmMIgcdk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=S+MVE7RzmTRYErdJI+XKGyabM2qspwykuJ3WuBRybRVWxBCe/ZoLjecw3rXOnWksF0CnxSaGaw9qBCi2Prl/oRNOYOlm5vYK8M0O0l/jfd2QmCDfTnYqTdGMasC7vUbj7jyRvFVW3+aPkM4JP8iU37zABWgvcWVubaRr4fIyc90= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G0iMaK/V; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F1E0C2BD11; Wed, 22 May 2024 06:49:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716360590; bh=GKIxfqewTLJtrl909K/lWYRo22JlV2kAJyJlmMIgcdk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=G0iMaK/VQKUmVBS/mUPHbx5BAqNY2L/ABCvPvsS9rgGRHuVKv68sj3R5foOr2b2D3 FTN7q4GRFuFDokzSvj/Uv9icsUNoN/n/UYEedheYjXUsWb0aKna2YlbmWzcJUju6CC nFUF3po1fEP83Vlu9rXp9LPfNnLZZxIYp017YN8gYClJFXj9DQhYsIHnNKeBF1wUfd KhzZz0U8FTJ1UHutaWA5EPPQ6UbNyudKv4mEibQIdWWFta2hNNIMe4CVN6hMICSQb7 Fy3B+kXzA731ACzVlnKTOS0TzcEUlX1qZq9B9XXSHTU6GHMifwqltwnsOISMATltqd bRDkTio+eHHCw== Message-ID: <12896bf6-412c-40af-9ad5-f9391ff81f63@kernel.org> Date: Wed, 22 May 2024 08:49:43 +0200 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 RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc To: Luca Weiss , Rob Herring , Krzysztof Kozlowski Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Bjorn Andersson , Konrad Dybcio , Krzysztof Kozlowski , Conor Dooley , Andy Gross , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240424-smsm-mbox-v1-0-555f3f442841@z3ntu.xyz> <12437992.O9o76ZdvQC@g550jk> <06565532-987a-465a-b2ab-a03fce7279e1@kernel.org> <5780452.DvuYhMxLoT@g550jk> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkUX63hAAoJEBuTQ307 QWKb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RRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <5780452.DvuYhMxLoT@g550jk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 21/05/2024 22:35, Luca Weiss wrote: > On Dienstag, 21. Mai 2024 10:58:07 MESZ Krzysztof Kozlowski wrote: >> On 20/05/2024 17:11, Luca Weiss wrote: >>> Hi Krzysztof >>> >>> Ack, sounds good. >>> >>> Maybe also from you, any opinion between these two binding styles? >>> >>> So first using index of mboxes for the numbering, where for the known >>> usages the first element (and sometimes the 3rd - ipc-2) are empty <>. >>> >>> The second variant is using mbox-names to get the correct channel-mbox >>> mapping. >>> >>> - qcom,ipc-1 = <&apcs 8 13>; >>> - qcom,ipc-2 = <&apcs 8 9>; >>> - qcom,ipc-3 = <&apcs 8 19>; >>> + mboxes = <0>, <&apcs 13>, <&apcs 9>, <&apcs 19>; >>> >>> vs. >>> >>> - qcom,ipc-1 = <&apcs 8 13>; >>> - qcom,ipc-2 = <&apcs 8 9>; >>> - qcom,ipc-3 = <&apcs 8 19>; >>> + mboxes = <&apcs 13>, <&apcs 9>, <&apcs 19>; >>> + mbox-names = "ipc-1", "ipc-2", "ipc-3"; >> >> Sorry, don't get, ipc-1 is the first mailbox, so why would there be <0> >> in first case? > > Actually not, ipc-0 would be permissible by the driver, used for the 0th host > > e.g. from: > > /* Iterate over all hosts to check whom wants a kick */ > for (host = 0; host < smsm->num_hosts; host++) { > hostp = &smsm->hosts[host]; > > Even though no mailbox is specified in any upstream dts for this 0th host I > didn't want the bindings to restrict that, that's why in the first example > there's an empty element (<0>) for the 0th smsm host > >> Anyway, the question is if you need to know that some >> mailbox is missing. But then it is weird to name them "ipc-1" etc. > > In either case we'd just query the mbox (either by name or index) and then > see if it's there? Not quite sure I understand the sentence.. > Pretty sure either binding would work the same way. The question is: does the driver care only about having some mailboxes or the driver cares about each specific mailbox? IOW, is skipping ipc-0 important for the driver? Best regards, Krzysztof