Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp3336412lqo; Tue, 21 May 2024 14:00:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3PjUlj+RUrRJDtF4t0osBg7A02rt18et4/619dgF6eueC9JbD8WcDv7ihBCX4mG1Vuu6wm2YD/lrIlCgLXahXoVqjb++UmBljBGrevQ== X-Google-Smtp-Source: AGHT+IESBB6Wn5MiprsUMKjNpf5eVqNIonNWHrtr/QYHwJHoc7g5dQDiR/zg4XLSttAQ8OJQwDQh X-Received: by 2002:a05:6a00:188e:b0:6e8:f57d:f1ec with SMTP id d2e1a72fcca58-6f6d60c1c32mr102706b3a.17.1716325258093; Tue, 21 May 2024 14:00:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716325258; cv=pass; d=google.com; s=arc-20160816; b=uB2Kg4N+ctMDlBOvjM3R2BdDRCPrI1QaOYXmE144toZ4hQSoYf5VHh96JYG+PfVuQ2 eTi86QWbVeMPgF7Cue+vVrGQgIZmfHDA1D+vS5rpT6+eju7FFlrQZUQE6XqVxW6tKjrq sdTqt2XYBtMbeSXKTYAkN1I9lgkCHu805khdRbXy0J6cnqxRB2jMMjmcbSnGnKFU2M0u a3UmaYgoRW3xM+ts8/kF6Lz3ta2jB48+igkdEFUnEpfvbh2rmoAjwoXxUncMATpEZoFz HfVVcTD+jCKgDbSYPI9tqOSBxNr/o4v62m77tIJoFF+T1uMV+KhdhfxJeWqcet99/kYI j5hQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2LUz8CT2QCfp+tzH2iX9tzVSjTGpTbopSe3Tlh3kCsQ=; fh=UkyvUXjqOIMfqpDpk5Q/YY0SmvCxT8nI6ha7uLvcF4U=; b=PH6D9utEcaX0SlpoEhyQ0sl/ZDxvZbAGayJevZCldCnOFyj38I6KjmngEutzfCYnyj aGSMo6WHR2b66T18oghfnWh2lEADW6oRgkMESjX5pk5XHfkvaChCXEkGcl/YNxD6LwGk OT5yWkppCKQxHE4rPVzDM4qHK2QHxF3DppN+8pimKjcT5bwUs6T72FaLA2kl2VsY1uM9 WgRkknEwYiVC9zd3UP8jLNnCciD4hpsBXz0X81YY7axmndZuOAW3nO99jHvGhtArJNMh ohU5RmhiN8aCGD1VFu6dNud2cyygFxXvkfQnIid8qBH/zHNppE2KV9qRd92HPn9b4kbc xBZQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=s1 header.b=B12jAF1u; arc=pass (i=1 spf=pass spfdomain=z3ntu.xyz dkim=pass dkdomain=z3ntu.xyz dmarc=pass fromdomain=z3ntu.xyz); spf=pass (google.com: domain of linux-kernel+bounces-185422-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185422-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6340a06c2d9si24451879a12.4.2024.05.21.14.00.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 14:00:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-185422-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@z3ntu.xyz header.s=s1 header.b=B12jAF1u; arc=pass (i=1 spf=pass spfdomain=z3ntu.xyz dkim=pass dkdomain=z3ntu.xyz dmarc=pass fromdomain=z3ntu.xyz); spf=pass (google.com: domain of linux-kernel+bounces-185422-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-185422-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=z3ntu.xyz 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 6B045282F48 for ; Tue, 21 May 2024 20:35:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EC181494CD; Tue, 21 May 2024 20:35:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=z3ntu.xyz header.i=@z3ntu.xyz header.b="B12jAF1u" Received: from ahti.lucaweiss.eu (ahti.lucaweiss.eu [128.199.32.197]) (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 5B59D208D0; Tue, 21 May 2024 20:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=128.199.32.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716323734; cv=none; b=GKP/TM5uD4KERMyBXswY3Dx0f8rffmXFgoTqSjZyiaq2Iv+jpJHn00O9a0Szp8IupgL4AZa3aVLFc9xgeo2wSRy/tXAo7vLm3m3jX3PKzFjEFK+zwOYoNPBivd+3tMftuGGntPRxmojWEKiWtSsFUeYvgxeakJLmMl8aKl8v5is= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716323734; c=relaxed/simple; bh=VD0WPH4YtO8joXqpqEu3C3HFCEbCEhDdVQcK/6wzdIE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GVX5f8Ub35AL5rbgNVwM24YRvo+pCeOifjl2fNVreoIg6lHSz2bRoy7irjDrZgoBa9ii3QCsimuZ45buWhKbJVjfaGn6tNR1/tzY/6Lq6TrBpczK1TceJ5zOCQd7OqWFlAuKj/b/9idQ5IWkQthdEbNDpbUuWFVhQkUp4ZR+mJY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=z3ntu.xyz; spf=pass smtp.mailfrom=z3ntu.xyz; dkim=pass (1024-bit key) header.d=z3ntu.xyz header.i=@z3ntu.xyz header.b=B12jAF1u; arc=none smtp.client-ip=128.199.32.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=z3ntu.xyz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=z3ntu.xyz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=z3ntu.xyz; s=s1; t=1716323725; bh=VD0WPH4YtO8joXqpqEu3C3HFCEbCEhDdVQcK/6wzdIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=B12jAF1udb/kmzGgJ0dTaa5Ev3EAM6BJ3vy/kgHmqQrHRP0KU74Z0MeQakzQNvu8L lsjUzX5MV2KvuJQhLcl52TA2D68ncTsb7iB8rk0SqQ5nZSWdLaxUUxr1gchQZtGkVA J5CiVF/G/2wWGETx1CEm0wsgdYNEBjFPH1KBU95Q= From: Luca Weiss To: Rob Herring , Krzysztof Kozlowski , 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 Subject: Re: [PATCH RFC 1/2] dt-bindings: soc: qcom,smsm: Allow specifying mboxes instead of qcom,ipc Date: Tue, 21 May 2024 22:35:22 +0200 Message-ID: <5780452.DvuYhMxLoT@g550jk> In-Reply-To: <06565532-987a-465a-b2ab-a03fce7279e1@kernel.org> References: <20240424-smsm-mbox-v1-0-555f3f442841@z3ntu.xyz> <12437992.O9o76ZdvQC@g550jk> <06565532-987a-465a-b2ab-a03fce7279e1@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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. Regards Luca > > Best regards, > Krzysztof > >