From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5E67ACD379F for ; Tue, 3 Sep 2024 16:23:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:To:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ujcJQ5WbiK5TK1a1sgf7j5ujXkTQVZFXM9n+2iP5G8w=; b=2Yy1ns2Y9E+XCpvh7x2dOvxOFk rGXvS/EG1uPFX+i3huoBiHwDCzku+PawxCFsCL3y+YH8Z2rBHRZY4NSsfCbGcBUB1uGJxJP0mo/aC xfWVJCVcymjnRHxWm/P8UmIaVgNP6ck6h+fUbPxMjcDQxdqqIJFF9UkTbXcGsXyzUvPd3Q1XL2V2C 8z0YEnyDJj0ti+kyX2vGzNcpbDAh2E/nL8MkDISEIyyyBJHIw7GJoxOqUBWLmZksQNMMek/MSIllf HL2HgY8n1nuBJTMUDeGcAbzr40jhVFnwBU6xAIFewsFn563gQXhrNnLtl7fuKGrnURzEK74CQb2nV baxcq1YQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1slWJ0-000000015Sj-1fCF; Tue, 03 Sep 2024 16:22:58 +0000 Received: from mail-ej1-x641.google.com ([2a00:1450:4864:20::641]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1slWBN-0000000138t-1uWX for linux-arm-kernel@lists.infradead.org; Tue, 03 Sep 2024 16:15:06 +0000 Received: by mail-ej1-x641.google.com with SMTP id a640c23a62f3a-a7a9cf7d3f3so618104766b.1 for ; Tue, 03 Sep 2024 09:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1725380103; x=1725984903; darn=lists.infradead.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from:from:to :cc:subject:date:message-id:reply-to; bh=ujcJQ5WbiK5TK1a1sgf7j5ujXkTQVZFXM9n+2iP5G8w=; b=MAJvSRMkATYiYyCZB+TzgUgqZV7YtJFLP9O0pepTQYWYX3KUo5XRd5eRGndYbQiRP6 PGyLMXOy95lpy+5L4JB/5Sz5Z14U/J5G4nNK60hWANse1Jh0hFKLQfdXGxw5FJn9eAR/ k9muyeMyDgHi52IZ8v+83mmbM/Brg1dFQ2DhWJ6RQ7N3ffk9LTi3i6KPTlzJDn4uDC62 Xql/dMxYDOYxH4U5cSryd1uyZ0tz1v7E3tDygeYCTp85ckWcZva2PGZgWiKQ/MabtEB/ 9GigYHlY28MbDcoE5swXthL6UlbV502HHmo/tCIVLBpR0Edh4KggsiHWd/6DB7mYyhPU 4u9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725380103; x=1725984903; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ujcJQ5WbiK5TK1a1sgf7j5ujXkTQVZFXM9n+2iP5G8w=; b=i6DZ4zFN8ZGGjoiVZ36OZ+dYnFdyxyp/ZWwwq1DUDYMLTMc1sQan+HBdGWsSv4RKr2 vDSLFNiEW3G/82NiBHddZ9F8tXttYu8Bm1CT/bypd9N/4AvrOJ2XmdV+oDuoZ3Rx23Zq yBC8dhlEy2suw3Tliexi8DaFWISFJwkVkdK/NzVeoPk57xMp6/Sm0vDa/GNYLiPCa6Kp JxGUNw4iX5m8lNn8/4ETsstc+phps3HnrftI3lbGdVyeM5uXXXOt6vI7XAguE/NlU494 z2TUXV+1xdi70K0Lj6ZCVRaAfyl48O5WWRVYx3arvGOub9D7pipJ4rsb0GMWwhQ517g0 yEFA== X-Forwarded-Encrypted: i=1; AJvYcCUtIoBbHIMfkmrWsTsO8qhlIAr4NscxhgDNMSNtG/SXN+cB3DIH0hUrExtyfvUcE/jO2sKPOltYwzYwaBKbS/f1@lists.infradead.org X-Gm-Message-State: AOJu0Yw/5OJL/vjsiKJSVVJQ5/IKIuYD5VcPbcIGJsRd0O9QlrOUHDrY L3vQ1duccYKQUps0xeE38u3ibGiRVBrr1z+5WJ/Ei0RWt1jEXa+fl4u2GAGf+wI= X-Google-Smtp-Source: AGHT+IGOVI/KlbnVkPKcUFB/WP4ky/V34Mnqxzaki61Es6M5ZEdZH9hu90OMWXXvI1MZc9xKoKdrvw== X-Received: by 2002:a17:907:d08:b0:a86:6d39:cbfd with SMTP id a640c23a62f3a-a89fafad393mr618619866b.57.1725380102711; Tue, 03 Sep 2024 09:15:02 -0700 (PDT) Received: from localhost (host-80-182-198-72.pool80182.interbusiness.it. [80.182.198.72]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8a1dbfba91sm145366666b.225.2024.09.03.09.15.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 09:15:02 -0700 (PDT) From: Andrea della Porta X-Google-Original-From: Andrea della Porta Date: Tue, 3 Sep 2024 18:15:09 +0200 To: Rob Herring Subject: Re: [PATCH 04/11] of: address: Preserve the flags portion on 1:1 dma-ranges mapping Message-ID: References: <5ca13a5b01c6c737f07416be53eb05b32811da21.1724159867.git.andrea.porta@suse.com> <20240821001618.GA2309328-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240903_091505_521667_B4F4F847 X-CRM114-Status: GOOD ( 21.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Herve Codina , Catalin Marinas , Michael Turquette , Claudiu Beznea , Eric Dumazet , Dragan Cvetic , Thomas Petazzoni , Will Deacon , linux-clk@vger.kernel.org, linux-arch@vger.kernel.org, Florian Fainelli , Lee Jones , Saravana Kannan , Broadcom internal kernel review list , linux-pci@vger.kernel.org, Jakub Kicinski , Paolo Abeni , Luca Ceresoli , Linus Walleij , devicetree@vger.kernel.org, Conor Dooley , Arnd Bergmann , linux-gpio@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Bjorn Helgaas , Andrea della Porta , linux-arm-kernel@lists.infradead.org, Derek Kiernan , Stephen Boyd , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Stefan Wahren , netdev@vger.kernel.org, Krzysztof Kozlowski , "David S. Miller" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Rob, On 14:37 Fri 30 Aug , Rob Herring wrote: > On Thu, Aug 29, 2024 at 11:26 AM Andrea della Porta > wrote: > > > > Hi Rob, > > ... > > I think simple-bus where you have it is fine. It is really 1 level up > that needs to be specified. Basically something that's referenced from > the specific PCI device's schema (e.g. the RP1 schema (which you are > missing)). > > That schema needs to roughly look like this: > > properties: > "#address-cells": > const: 3 > "#size-cells": > const: 2 > ranges: > minItems: 1 > maxItems: 6 > items: > additionalItems: true > items: > - maximum: 5 # The BAR number > - const: 0 > - const: 0 > - # TODO: valid PCI memory flags > > patternProperties: > "^bar-bus@[0-5]$": > type: object > additionalProperties: true > properties: > compatible: > const: simple-bus > ranges: true > Hmmm.. not sure how this is going to work. The PCI device (RP1) will havei, at runtime, a compatible like this: compatible = "pci1de4,1\0pciclass,0200000\0pciclass,0200"; that is basically generated automatically by the OF framework. So, in the schema you proposed above, I can put something like: properties: compatible: contains: pattern: '^pci1de4,1' or maybe I could omit the compatible entirely, like in: https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/pci/pci-iommu.yaml that seems to refer to generic compatible values. In both cases though, I don't see how these binding could work with make dt_binding_check, since there's no compatible known at compile time (for the first approach), or no compatible at all (the second approach). Is it intended only as a loose documentation? Or are you proposing that for a future new bus (hence with a new, specific, compatible) that could be described by the schema above? Many thanks, Andrea > There were some discussions around interrupt handling that might also > factor into this. > > Rob