Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp791398lqp; Wed, 22 May 2024 23:02:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXC56d7hBWwiNYU4VtxDpHavTpfe+rMNaMvY9PAVlg9KnVXbQGpBAlAWwuz5MT2MJx06UYjwAQXimkSt3vPXf1gby2YJU2oDDgP2iSBxQ== X-Google-Smtp-Source: AGHT+IH+9T2Up5H7D55LoKqzhNN1lCEORnreu6PcWJWFrlaugCBcxjm52YMJk8OzL06vBefWLbw0 X-Received: by 2002:a05:6358:614b:b0:184:fdb:6cc8 with SMTP id e5c5f4694b2df-1979202658emr340446255d.24.1716444156589; Wed, 22 May 2024 23:02:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716444156; cv=pass; d=google.com; s=arc-20160816; b=oBHPtdkQzhqm7CYMqrjIBNv7qzR0YvwpZ5lY7P9y7CvtucF7HePZRufGCszfiY2qL1 pVmuQg4TTJxzXTzk1/u4NHVeScHWDFmU/qRbcQgnKJP/uyLRiunJ5du96tku7WkEf9xg izSDIt0iVlFWbe47qbgk0NxTLjJrXSZuYu+bQQdl79OaWj8N/1JExo2cYIjWJS+0AWef ArUDL+oBS6JdrCW0bOZybZT+GGU0tiBLVdXdMQK/E8wMf8VOBCAXNE6bXO+cZFa5HXgI wUDSPy5F7+z/0RGbwqE7SJ+x2/TWGMMFPfyE4+uZ+/mCwoR/QliCiONJ3dOoR6fu1oSt FeEw== 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=4X7BoLbMdMqQ1pM0nUAVzFWjxzrTvVPMC5L9TnHQ9rg=; fh=pwWc6Yy6hZpEyCsfSMNuXgxcQhIp5qlkZskeqa/Por0=; b=o0greZFQ++pj3K/Xy0zT//Hpt4jy402mAM2S00oudw5ikT52XqsCYYp5Qj4azpDyQE ATTw/o7AQi147v9nA6yq+BCnlqwmmZxjcMqTP58WZeFwsAqnBx97gMxzksXafmNKBra7 pScHk5SfzZzymq/mZPTJi2+EJruluHjIlkCP2fOonfnypJEqDBvODyLRazi5wv0YR6yR 0IHGMo4DK2Kd7JQP7KrlQ39wG36zvuvfu7FYy9bz3d3IeUSDz1u+hhHz5jrsyfZI/wBf L9q4pCstUZdSRz22g+8ZRAwck4jRf1y48PXCgi84fSaaTBCEyFbM81qEAkZ41E+PZjx1 UTLg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LebcymsR; 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-187024-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187024-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f660539a91si3699671b3a.126.2024.05.22.23.02.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 23:02:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187024-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LebcymsR; 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-187024-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187024-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 40732B217DF for ; Thu, 23 May 2024 06:02:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4CE813B2B0; Thu, 23 May 2024 06:02:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LebcymsR" Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 3B2A647A7C for ; Thu, 23 May 2024 06:02:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716444138; cv=none; b=Q23wF9uXsIs4ZaFall2ztcuEAf8jKW9FlHha2pTtvHYDMuQLLBBrWL1cW2GUJ3NJIMnqiTL43Lk2gkz08VoTu9+I1lPv0IwuuWhJH94C/dbwx1kKApPmObMUMnPovDeUXenzX7zqaG99JDGFYbVY7VlwDLXzJkRNuCcl+upo9yI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716444138; c=relaxed/simple; bh=2gmKtc+dZO5bDPMUobHzDeKPQg4fDrYmuDcbFtmuwk8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cDOERZ0v22+pwaXoL94iTi229QgRlWvlucDCZWXdG/MEuTSu++TW3Wj+CBJ0F4G2DNQ8wcP4oQernZZiPJ3oBiiUoGwwOwFkgXt5IJz0fhDXTXeYwvt/A8LnddO2/j5o4VruSfynMHB2+bD7dLecn6R8hrykFvfZqSdhbk8FHdg= 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=LebcymsR; arc=none smtp.client-ip=209.85.128.53 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-wm1-f53.google.com with SMTP id 5b1f17b1804b1-420180b58c5so15890735e9.3 for ; Wed, 22 May 2024 23:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716444135; x=1717048935; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=4X7BoLbMdMqQ1pM0nUAVzFWjxzrTvVPMC5L9TnHQ9rg=; b=LebcymsR3oC0hrj4SUOU7MnKoc24fe8OO/kDpokvMvjbKXrtrYXcFFK0X0SiGTQCVi vNWwKOO1smVtHKIvLrfeZQdQa9vkElDXEk+BlLxJ9H4YdH4q4cackvbso+ioG6p0XMcF juUqd2O5fwd3LKah0kSxvyTHX/wV3DoCakXBpe1b0ltfhS8vKo8Uch8oX2su2pCwpx+O T/6LmiZfTXsJY2G+no+Z6PD4BTZMhFdadzmJt8WXKAbPMdOP5CN5sLnc0nekW9JSiuDb kX3ua2Oa2YLheKg7AT8bQR8MF20HsMHKtu/kRKm8eA8m00WUfsTnp3PkrJwChb3dSsAx tbXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716444135; x=1717048935; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4X7BoLbMdMqQ1pM0nUAVzFWjxzrTvVPMC5L9TnHQ9rg=; b=C1vswXyaEn+5Hl8aYuKeVSIlCkq8xwitdVNmIEAN3kTsbqMpzuU1JepluK/N+fxKD/ oBEwx298qI/scIXP2K3OVF25mJS1X1wJP9ASZU5aMpu+4/RsQUe2ocin/tT24SFwv/Ai Qz/cu04SHXL5kmh/xKbwCnkXlKTIRLEVwGgDE+bzgEgXagiLNqH5aslw3RChkQg2RpzK wtvo4bHmKlHH4S0gnChqoGIvGCXXM7678N1QAmTj82SG5Io88nJyVGyipIV4vvaf2cGR GjgEKlSMcKuMjDqg73+sY1GkN/xfKQcMTLszNgMqyltcvdrVxvyL70ZQYTln5JCB8d1E Q8EA== X-Forwarded-Encrypted: i=1; AJvYcCVud6JkoTQQ8AkduzMpHf/Ym7DinhGI8VAFkoESUu48NGVn4RK9LzA3u+l7bQh1R2rM2p0bFwgEU6RCGXKrfe8ChbG7rcjysNZL5xUe X-Gm-Message-State: AOJu0YwxLC8isrEux/FFmcW5HMMaFD0+H6mOqniIksny1HjSLI919ZTW PbtOQ2sQMv4Rh+1fwT9yEajOOSof4kq2qQlqzO7gA/Obpjto0p6Sl8cc0L9e/mU= X-Received: by 2002:a7b:cd17:0:b0:418:fb6f:5f59 with SMTP id 5b1f17b1804b1-420fd2dd186mr31257765e9.2.1716444135435; Wed, 22 May 2024 23:02:15 -0700 (PDT) Received: from [192.168.1.20] ([178.197.206.169]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100f759f0sm14493435e9.28.2024.05.22.23.02.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 23:02:14 -0700 (PDT) Message-ID: Date: Thu, 23 May 2024 08:02:13 +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> <5780452.DvuYhMxLoT@g550jk> <12896bf6-412c-40af-9ad5-f9391ff81f63@kernel.org> <6253429.lOV4Wx5bFT@g550jk> From: Krzysztof Kozlowski Content-Language: en-US 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/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/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F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <6253429.lOV4Wx5bFT@g550jk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 22/05/2024 19:34, Luca Weiss wrote: > On Mittwoch, 22. Mai 2024 08:49:43 MESZ Krzysztof Kozlowski wrote: >> 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? > > There's nothing special from driver side about any mailbox. Some SoCs have > a mailbox for e.g. hosts 1&2&3, some have only 1&3, and apq8064 even has > 1&2&3&4. > > And if the driver doesn't find a mailbox for a host, it just ignores it > but then of course it can't 'ring' the mailbox for that host when necessary. > > Not sure how much more I can add here, to be fair I barely understand what > this driver is doing myself apart from the obvious. From what you said, it looks like it is enough to just list mailboxes, e.g. for ipc-1, ipc-2 and ipc-4 (so no ipc-0 and ipc-3): mboxes = <&apcs 13>, <&apcs 9>, <&apcs 19>; Best regards, Krzysztof