Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1122192pxb; Wed, 6 Apr 2022 09:13:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwC7Cj8ZU2sIYBe3eRC+qsSdFdJObyIFEowENyait3R9aCuyY4kLOjr9zAj7hBhGZ5wAEli X-Received: by 2002:a17:902:d2d2:b0:156:cda5:e8a1 with SMTP id n18-20020a170902d2d200b00156cda5e8a1mr9455054plc.85.1649261581186; Wed, 06 Apr 2022 09:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649261581; cv=none; d=google.com; s=arc-20160816; b=vFbQVyXGOvjqpUM+3StccV4GWEYol3/rJnalkS2nLstCgqDsXowZP4vhJqCSWo0OyQ 0oJvmE2fokLCuOLfMBLKI+rFJUiHBKzNtm8DGCwqDBVKvCVUSTWO412BxWR5gGucZkQI xDdwTsWm49ci5xKZaKsh3RSGHbgmC9BJLl60a//kGbX4nYgkdiB/LzG3aXcDsMmSHltn D0N0XEzUpkfDHxYAaeceErgqEau6e7eCOX8imekzJTmyETY5y1DVr4FXoajP51dKrTh4 ous40EOO2eJIHz7+3U9p1i+2uH29cCtp48jJK5LL6twX9Z694Ey9lH7so4joglhqeJGh mToA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=dcCn6+XhT4ZAObTnqeDa3+6jzJY/nPJWbAVScaaz0bE=; b=Vvrwap889JUUV2/d3jh9oDUsRJAJvHrhIvURwcjxKSa2stfZF3iWxU5zg3+V2wCsLQ MPFbPO85OtBqHQe+PzNf71BhIsFNYf0VzBRMwoyz7vO1+GS7ugKUU0ES61GyHcXfaGsG C0ipQykz4zN+DhD/OEXagS8pIpNXkPIHMcpgV2GLgASdKSIXJW9lV8tdPCC7sm2TS+da G+Azk/yx1SJqEPqOwnnlpzKToNm2egMxtgRf1eB54kfUR1YfL9c2jigic2J7waRg5J23 IRcWuqhnV4DIyuhsqeC0uKkza1nEtvpdCNv6DRSK+j4EC5sfn7SqLe2p7QFc+3EwBx+0 rIZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=kQqBANK8; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z18-20020a170903019200b00156a2cedc71si10097183plg.20.2022.04.06.09.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 09:13:01 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=kQqBANK8; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C7F0B4C0A3B; Wed, 6 Apr 2022 07:35:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235000AbiDFOhF (ORCPT + 99 others); Wed, 6 Apr 2022 10:37:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234924AbiDFOg4 (ORCPT ); Wed, 6 Apr 2022 10:36:56 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE3EB4557F2; Wed, 6 Apr 2022 04:01:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:Subject: From:References:Cc:To:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=dcCn6+XhT4ZAObTnqeDa3+6jzJY/nPJWbAVScaaz0bE=; b=kQqBANK8BkSsr7+yPmY+Z09efb 0NOveqsRX9wrNdCFVXF3J7Kr26T56o2BgYYrrD0jeoekQZkIe0TDN+4d99hR04yYGpj7/adwmWZcy dYUrxYIc73Kk/I1LEnAkxfk4ldascCUl2i3HfC4tKXcdMyWi9snsBXDlpl06K6FF4cJ4=; Received: from p200300daa70ef200456864e8b8d10029.dip0.t-ipconnect.de ([2003:da:a70e:f200:4568:64e8:b8d1:29] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nc3PP-0001v5-AM; Wed, 06 Apr 2022 13:01:07 +0200 Message-ID: <318163cb-c771-c7eb-73ba-35c66f7d0e68@nbd.name> Date: Wed, 6 Apr 2022 13:01:06 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: Krzysztof Kozlowski , netdev@vger.kernel.org, Rob Herring , Krzysztof Kozlowski , Matthias Brugger , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Lorenzo Bianconi Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220405195755.10817-1-nbd@nbd.name> <20220405195755.10817-6-nbd@nbd.name> <4bafe244-6a3d-d0ec-59d3-3f3f00e71caf@linaro.org> From: Felix Fietkau Subject: Re: [PATCH v2 05/14] dt-bindings: arm: mediatek: document the pcie mirror node on MT7622 In-Reply-To: <4bafe244-6a3d-d0ec-59d3-3f3f00e71caf@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06.04.22 10:20, Krzysztof Kozlowski wrote: > On 05/04/2022 21:57, Felix Fietkau wrote: >> From: Lorenzo Bianconi >> >> This patch adds the pcie mirror document bindings for MT7622 SoC. >> The feature is used for intercepting PCIe MMIO access for the WED core >> Add related info in mediatek-net bindings. >> >> Signed-off-by: Lorenzo Bianconi >> Signed-off-by: Felix Fietkau >> --- >> .../mediatek/mediatek,mt7622-pcie-mirror.yaml | 42 +++++++++++++++++++ > > Eh, I wanted to ask to not put it inside arm/, but judging by your usage > - you did not create drivers for both of these (WED and PCIe mirror). > > You only need them to expose address spaces via syscon. > > This actually looks hacky. Either WED and PCIe mirror are part of > network driver, then add the address spaces via "reg". If they are not, > but instead they are separate blocks, why you don't have drivers for them? The code that uses the WED block is built into the Ethernet driver, but not all SoCs that use this ethernet core have it. Also, there are two WED blocks, and I'm not sure if future SoCs might have a different number of them at some point. The WED code also needs to access registers of the ethernet MAC. One reason for having a separate device is this: As long as WED is not in use, ethernet supports coherent DMA for increased performance. When the first wireless device attaches to WED, IO coherency gets disabled and the ethernet DMA rings are cleaned up and allocated again, this time with the struct device of WED (which doesn't have the dma-coherent property). - Felix