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 DFFD4C87FD3 for ; Fri, 8 Aug 2025 12:27:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=aiPizj4xPQHgrz0IL3+WPEQFuPXWX/y9HlO9/wOe3L4=; b=EC0n+R9frSoLGY0hCKMuWV6YTH u43vwipXQVtlVEtYMU4ufQytxWoZ4VErkv+ZnTueABMtguflkDv9A/vyVeYKCKZysYiEungdkTMn6 SMsVYEtt+qya1GCWMD/+vT0122T25Vu5F+p2nlEZvqUUrwg9H7ABqzoJWhzOWqQsBm411h+0kMTYj oeXaHR9Tcyfe8R97kmpNEsuo9nF2qc2gJDndf86cvFPnPoNpupPBjPTcbPT6z4qSn01CWwoMLPDXf GHTCuK3G46UAL8+3G9W6ZP8tM2YR2Ngldc8sjTE5PQ/J0ms7PFlQYlWysoE9+KGe9mA+ZKBN1Th8j m5JZolVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ukMBf-00000002nnU-2Lrp; Fri, 08 Aug 2025 12:27:07 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ukLp4-00000002kPn-3ThS for linux-arm-kernel@lists.infradead.org; Fri, 08 Aug 2025 12:03:48 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3b783ea502eso1595619f8f.1 for ; Fri, 08 Aug 2025 05:03:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1754654625; x=1755259425; darn=lists.infradead.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=aiPizj4xPQHgrz0IL3+WPEQFuPXWX/y9HlO9/wOe3L4=; b=MUyw8/RDONABqUYnyUgPlNF0CixpZEmfEmuWHeDOyrlITmfBp5Bq0mDCH5U4woOSZv I04Tn9+sYNzUaGVOMmtFIkpj6AugQuJcCfM1gdI2IB1HqDdePlVQOSjBJ6o2bc9qxj5y zblT54C9neJyW3rSr82tO713PAwlNMTsEPc9m2JLdE8r3W+cw9y0Ta7z8PRklK/eVL/T w6coScQD2gyvFOIxWxrG88qyoV7FyCZajOoE16BLLn1IiRby2IMkJ3rcrSHDKqqy88Lj dOtJvLyHFYW5hf0pbXkF/8vzhSPZspCXu3M6U2nWUVI97Vjr60zbfBwou5aMOvlNkAjk DNqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754654625; x=1755259425; h=content-transfer-encoding:in-reply-to: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=aiPizj4xPQHgrz0IL3+WPEQFuPXWX/y9HlO9/wOe3L4=; b=tkgf3OGlytAgb9tcFyCLb4UP4fo4GpiR9wTGKajqQuqxv8+9qOke27X5V5+c603esP 0x4Lb/X/MAMMJl14RteUc45TF2DzMOmZ3XtZeS85CqIer1sr6E6E35WC09XjanaAgA7c H649hywqs9COeAhXxaU3+2vBDPv+RHAXOf/BZX2qr/GZsA4hbmvuRi4s2OthD6kt0RRj YLjpDal/fj999S539/xXNKy3NDuzc1E5WzeIEdaRQRHlyI2i99G+eNZHcoTjGdO1Ri4W J8QDTMj5qlavnZDWNvcZNweNI0Sy6am3t/oitcX4OvYQrsXfilz0BQXoJs4nyM+0a8mC f4kQ== X-Forwarded-Encrypted: i=1; AJvYcCVwCNfvTQNtFTfTyg8H6zlmreE5zQ5bU3P1OFpaY5LiDlUv9h4HSX+VmJdxU71xYAp7ODQotx469k+m0wQYBaEj@lists.infradead.org X-Gm-Message-State: AOJu0YxrJ1CBrjSxYjcmloTm/L1Ixu1LF9eTXIXcT51OwOsaeh3cDP/k JDrXN+T1cPvpVuEE55j00l4aAOMHaqom1oJ3c6LrioERdRGoNmXCDX3a6vi/tXBn75E= X-Gm-Gg: ASbGnct24J6IycQQ5iss9/Ian/h3BZAH2Zk77qPVNDwYAE/9H7MhzpgawcNfQ5wt/Gz Zm6vav4koQhWLsRWrccRNYFyqxS1Fh21C8SUwOSHAowL9BPiBbbwkfZzCs86EgnVFqsSeWVQMTG WqpugAl47sxrfqaorbq7hnGMSNNx9HStnUmKladmWKN/qQkh8era5z4WUsye4HyatZV+EpwtviJ KrM7gLyJ13y8B3lnfLE1aWLEcYLnPY2AfpxFrkHpOX+BFhJFsojlA26T7IUt9g0yWbaHFocXMOJ G0Ov6euxder4m3GT9hqKTfYDIWa55xgNHYyksEcBr4aMBjOyDZH0DIzKbAZ9JvrSpd6QplbI29v W7ZlsrVWop3PahlGQ2u9Imq+4QB/ZDQs= X-Google-Smtp-Source: AGHT+IEhH09YKqZt2qdtQad23ji4V+O1nbR0nqNA6VFV5zpI+IyNp61P/t7lTEC8XtYM0WJsfb+osw== X-Received: by 2002:a05:6000:4028:b0:3b7:8842:8a0c with SMTP id ffacd0b85a97d-3b8f97ec49emr6554498f8f.19.1754654625233; Fri, 08 Aug 2025 05:03:45 -0700 (PDT) Received: from [192.168.50.4] ([82.78.167.188]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b8e009e465sm21298841f8f.43.2025.08.08.05.03.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 Aug 2025 05:03:44 -0700 (PDT) Message-ID: <6638d8cb-5770-416f-84f7-670de71ec63d@tuxon.dev> Date: Fri, 8 Aug 2025 15:03:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 7/9] arm64: dts: renesas: rzg3s-smarc-som: Update dma-ranges for PCIe To: Biju Das , "bhelgaas@google.com" , "lpieralisi@kernel.org" , "kwilczynski@kernel.org" , "mani@kernel.org" , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "geert+renesas@glider.be" , "magnus.damm" , "catalin.marinas@arm.com" , "will@kernel.org" , "mturquette@baylibre.com" , "sboyd@kernel.org" , "p.zabel@pengutronix.de" , "lizhi.hou@amd.com" Cc: "linux-pci@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-clk@vger.kernel.org" , Claudiu Beznea , wsa+renesas References: <20250704161410.3931884-1-claudiu.beznea.uj@bp.renesas.com> <20250704161410.3931884-8-claudiu.beznea.uj@bp.renesas.com> <7c8c7a25-c373-452a-9fe8-8b2d92ddd885@tuxon.dev> From: Claudiu Beznea Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250808_050346_874438_F6B9F11D X-CRM114-Status: GOOD ( 17.94 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 08.08.2025 14:44, Biju Das wrote: > > >> -----Original Message----- >> From: Claudiu Beznea >> Sent: 08 August 2025 12:28 > .org; Claudiu Beznea >> ; wsa+renesas >> Subject: Re: [PATCH v3 7/9] arm64: dts: renesas: rzg3s-smarc-som: Update dma-ranges for PCIe >> >> Hi, Biju, >> >> On 09.07.2025 08:05, Biju Das wrote: >>> Hi Claudiu Beznea, >>> >>>> -----Original Message----- >>>> From: Claudiu Beznea >>>> Sent: 08 July 2025 11:10 >>>> Subject: Re: [PATCH v3 7/9] arm64: dts: renesas: rzg3s-smarc-som: >>>> Update dma-ranges for PCIe >>>> >>>> Hi, Biju, >>>> >>>> On 07.07.2025 11:18, Biju Das wrote: >>>>> Hi Claudiu, >>>>> >>>>>> -----Original Message----- >>>>>> From: Claudiu >>>>>> Sent: 04 July 2025 17:14 >>>>>> Subject: [PATCH v3 7/9] arm64: dts: renesas: rzg3s-smarc-som: >>>>>> Update dma-ranges for PCIe >>>>>> >>>>>> From: Claudiu Beznea >>>>>> >>>>>> The first 128MB of memory is reserved on this board for secure area. >>>>>> Update the PCIe dma-ranges property to reflect this. >>>>> >>>>> I see R-Car PCIe dma-ranges[1] and [2] maps all possible DDR area supported by the SoC? >>>>> Do we need to make board specific as well there? >>>> >>>> I'm not familiar with R-Car, but if there are ranges reserved for >>>> other purposes, I think we should reflect it in board specific device trees. >>> >>> >>> Already Linux has this DDR info[1]. Linux provides DMA memory only from this region. >> >> What we provide though dma-ranges DT property is setup in the PCI controller register corresponding to >> the AXI windows. It is the same in case of R-Car (as of my investigation on driver). >> >>> >>> In your testing, have you faced any issue like system allocated DMA >>> region other than [1] and you don't want to use it, then the changes are ok?? >> >> I haven't currently encounter any issues. >> >> As the values passed though the dma-ranges DT property are setup in the controller register for AXI >> windows, and the DMA endpoints can act as bus masters, to avoid any issue where the DMA endpoints may >> corrupt memory specific to the secure area, I chose to update the "dma-ranges" though board specific >> bindings (to reflect the presence of the secure area and tell the PCIe controller to not use it). >> >>> >>> Not sure, PCIe can work on internal memory such as SRAM? >> >> Inbound window is RAM, outbound window is a PCIe specific memory described though "ranges" DT property. > > You mean SRAM cannot work on PCIe subsystem and work only for DRAM This PCIe driver uses the PCIe specific memory (named "PCIe area" in Figure 5.2 Overall Address Space or RZ/G3S HW manual) and DRAM. > that is the reason you are not defining SRAM region in "dma-ranges". Am I correct? The DRAM region is described though dma-ranges, the PCIe memory is described through ranges property. The above is from this series: dma-ranges = <0x42000000 0 0x48000000 0 0x48000000 0x0 0x38000000>; ranges = <0x02000000 0 0x30000000 0 0x30000000 0 0x8000000>; Thank you, Claudiu > > Cheers, > Biju