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