Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3265564pxk; Tue, 15 Sep 2020 14:42:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwfHJG5n42Q+ei6YE3k3BLb4FSH9i1kIW3bOuUY5BQfNnrfbUHhULXQeU1MwDxp5ncKwyl X-Received: by 2002:aa7:da09:: with SMTP id r9mr24851525eds.7.1600206159806; Tue, 15 Sep 2020 14:42:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600206159; cv=none; d=google.com; s=arc-20160816; b=LUkyvHDZLLxiBUMAGY/M/7USYG/jdyKIR7/kNuQp3dZW+aaNCukfyzNTmIb29tukB9 a/RWr9KjiKLQJgf0Rb4mVmNEYdi75U9Sr7+OWGG9M8+D+4elOG28ryI8w9K4sSQafpiB 4D7MUpu0BpQFesGwptdJtwKRlUxVycsKLrxxcTAHaRUg9+Phe5YexvhbU7UcCgUHtXdt yOW+3q61bs3TVXbx8iMjbwcXURbrg6cXt+erYTCmaMdfp2mgFlj/02QzShA6Qyyy0791 QRn72O+BAPwN0xkYcgHYAwfnoJanJwr9NbdpnyNjN0bbDtZzXb5wA4vDoRTjGJ/m44mW seUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:date:message-id:autocrypt :from:references:cc:to:subject:dkim-signature; bh=ZyrGKVFDx4BGNZ/Sa7IJ5z8va1EbUDyxko9EIPRujuM=; b=iLqe8pgdv7fFblObPLsbgxWGcbdh02NWtSVbZBc2dS8tMfvwV4d3vnMo9V/8UJqfHp ZX1m8UU6wM9DF/g9lyLjGw80m/0q9J33zwMqFfQaINMpSXSq+jf0EJ7jn83pS3Hi60CJ gxJCPYB1uMIUplXeT3ZkgjcWNmG2UEnZRMM6tYM5TODv2Dt3nnq0f/WCjE9txPaKyejD usgKIjaCizJAK9wYmLPb8VRN1enJBeWTxZr0WEQAzjnUD4WKpWRkY8BL2W0Te/P3Jm3i 5TE4JRWxtxHX0kwjIhzev6256ukr9qRnB4O6I900PoTENeM11bSg22ccv3Iwha4JAb9D YDFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=veI3Avon; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz7si2753252ejb.726.2020.09.15.14.42.16; Tue, 15 Sep 2020 14:42:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=veI3Avon; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728066AbgIOVl1 (ORCPT + 99 others); Tue, 15 Sep 2020 17:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727591AbgIOVk0 (ORCPT ); Tue, 15 Sep 2020 17:40:26 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7182DC06178B for ; Tue, 15 Sep 2020 14:40:22 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id z1so4826954wrt.3 for ; Tue, 15 Sep 2020 14:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:autocrypt:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ZyrGKVFDx4BGNZ/Sa7IJ5z8va1EbUDyxko9EIPRujuM=; b=veI3AvonDskRaUwF5ORDqWFJETZI+22t06b/E6CdpcUb2Bzet3eVUU+UbEoXj1wSQD OGEwGLzQwLOITt4yQYbu1Ie+NhSn1/be3xk3XtV2QILTMQMBjh+aJ0UpN9pQ8mpszEeE kXSR8rL/V1SbcsTZ7EK2+nY4J4F4WSIfRRNfbWPSxbxhUMRUMI097f484mmSRO6pX6rY D6pt8gDg5MvVwfT1GtNlmnmorUrZ+k/hCNb2a2/hfjXAYcgXcJqZG+RTzVLyA2KUTthX ZjVfvZ0sTXMyhkyKNP+m95A/ZlvhmFnw/gYhj82/QTMufjmd/wgIM63mEm+fXS4iVePJ fpOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZyrGKVFDx4BGNZ/Sa7IJ5z8va1EbUDyxko9EIPRujuM=; b=a4m6Jsp+yCgrcXqD/EDD9rQBdyS2VYIQ2ZIUckz9Frw4zo0RyQ6R2q4OnCBAzOpzjs E3lmzRVXQ/oxdz8z2nUL76lEmoFRHj/U925xLu9pGTYo66EnewUiazrkfqmwaIJVILXF ZZxP6xZEiSOydbvMeVf+HQH5wRcb+pnye8keGyEdyR+Vlo688+NHBa/GGXQjFlFThseM rxKiJCFKQB874d00hRXc5LGSMehtR59E1YBbI1DV+pS44BUEuJz0dOr+RC9zeePl7rE+ JIMIiTcISK5A7XgYF1vR8lG/SAplcRXUzKVOUkBuYyOIQj1gD1CPH8ywbByCOAsNf6H9 ICGg== X-Gm-Message-State: AOAM531MONf8N7TA7Q3TNqUOgUwA98/DnFecDILd03L9QH4PZIap5oBU rEAlVkHZXiG0LOaugxWMoTo+jQ== X-Received: by 2002:a5d:69cd:: with SMTP id s13mr22613427wrw.379.1600206021323; Tue, 15 Sep 2020 14:40:21 -0700 (PDT) Received: from [10.44.66.8] ([212.45.67.2]) by smtp.googlemail.com with ESMTPSA id g14sm443358wrv.25.2020.09.15.14.40.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 15 Sep 2020 14:40:20 -0700 (PDT) Subject: Re: [PATCH RFC v6 1/6] dt-bindings: exynos-bus: Add documentation for interconnect properties To: Sylwester Nawrocki , Rob Herring Cc: cw00.choi@samsung.com, krzk@kernel.org, devicetree@vger.kernel.org, a.swigon@samsung.com, myungjoo.ham@samsung.com, inki.dae@samsung.com, sw0312.kim@samsung.com, b.zolnierkie@samsung.com, m.szyprowski@samsung.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org References: <20200702163724.2218-1-s.nawrocki@samsung.com> <20200702163724.2218-2-s.nawrocki@samsung.com> <20200709210448.GA876103@bogus> <65af1a5c-8f8a-ef65-07f8-e0b3d04c336c@samsung.com> <35d9d396-b553-a815-1f3b-1af4dc37a2ca@samsung.com> From: Georgi Djakov Autocrypt: addr=georgi.djakov@linaro.org; prefer-encrypt=mutual; keydata= xsFNBFjTuRcBEACyAOVzghvyN19Sa/Nit4LPBWkICi5W20p6bwiZvdjhtuh50H5q4ktyxJtp 1+s8dMSa/j58hAWhrc2SNL3fttOCo+MM1bQWwe8uMBQJP4swgXf5ZUYkSssQlXxGKqBSbWLB uFHOOBTzaQBaNgsdXo+mQ1h8UCgM0zQOmbs2ort8aHnH2i65oLs5/Xgv/Qivde/FcFtvEFaL 0TZ7odM67u+M32VetH5nBVPESmnEDjRBPw/DOPhFBPXtal53ZFiiRr6Bm1qKVu3dOEYXHHDt nF13gB+vBZ6x5pjl02NUEucSHQiuCc2Aaavo6xnuBc3lnd4z/xk6GLBqFP3P/eJ56eJv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LBg+sh3K6aiBDAdZPUMvGHzHK3fj gHK4GqGCFK76bFrHQYgiBOrcR4GDklj4Gk9osIfdXIAkBvRGw8zg1zzUYwMYk+A6v40gBn00 OOB13qJe9zyKpReWMAhg7BYPBKIm/qSr82aIQc4+FlDX2Ot6T/4tGUDr9MAHaBKFtVyIqXBO xOf0vQEokkUGRKWBE0uA3zFVRfLiT6NUjDQ0vdphTnsdA7h01MliZLQ2lLL2Mt5lsqU+6sup Tfql1omgEpjnFsPsyFebzcKGbdEr6vySGa3Cof+miX06hQXKe99a5+eHNhtZJcMAIO89wZmj 7ayYJIXFqjl/X0KBcCbiAl4vbdBw1bqFnO4zd1lMXKVoa29UHqby4MPbQhjWNVv9kqp8A39+ E9xw890l1xdERkjVKX6IEJu2hf7X3MMl9tOjBK6MvdOUxvh1bNNmXh7OlBL1MpJYY/ydIm3B KEmKjLDvB0pePJkdTw== Message-ID: Date: Wed, 16 Sep 2020 00:40:18 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sylwester, On 9/9/20 17:47, Sylwester Nawrocki wrote: > Hi Georgi, > > On 09.09.2020 11:07, Georgi Djakov wrote: >> On 8/28/20 17:49, Sylwester Nawrocki wrote: >>> On 30.07.2020 14:28, Sylwester Nawrocki wrote: >>>> On 09.07.2020 23:04, Rob Herring wrote: >>>>> On Thu, Jul 02, 2020 at 06:37:19PM +0200, Sylwester Nawrocki wrote: >>>>>> Add documentation for new optional properties in the exynos bus nodes: >>>>>> samsung,interconnect-parent, #interconnect-cells, bus-width. >>>>>> These properties allow to specify the SoC interconnect structure which >>>>>> then allows the interconnect consumer devices to request specific >>>>>> bandwidth requirements. >>>>>> >>>>>> Signed-off-by: Artur Świgoń >>>>>> Signed-off-by: Sylwester Nawrocki >>> >>>>>> --- a/Documentation/devicetree/bindings/devfreq/exynos-bus.txt >>>>>> +++ b/Documentation/devicetree/bindings/devfreq/exynos-bus.txt > >>>>>> +Optional properties for interconnect functionality (QoS frequency constraints): >>>>>> +- samsung,interconnect-parent: phandle to the parent interconnect node; for >>>>>> + passive devices should point to same node as the exynos,parent-bus property. >>> >>>>> Adding vendor specific properties for a common binding defeats the >>>>> point. >>> >>> Actually we could do without any new property if we used existing interconnect >>> consumers binding to specify linking between the provider nodes. I think those >>> exynos-bus nodes could well be considered both the interconnect providers >>> and consumers. The example would then be something along the lines >>> (yes, I know the bus node naming needs to be fixed): >>> >>> soc { >>> bus_dmc: bus_dmc { >>> compatible = "samsung,exynos-bus"; >>> /* ... */ >>> samsung,data-clock-ratio = <4>; >>> #interconnect-cells = <0>; >>> }; >>> >>> bus_leftbus: bus_leftbus { >>> compatible = "samsung,exynos-bus"; >>> /* ... */ >>> interconnects = <&bus_leftbus &bus_dmc>; >>> #interconnect-cells = <0>; >>> }; >>> >>> bus_display: bus_display { >>> compatible = "samsung,exynos-bus"; >>> /* ... */ >>> interconnects = <&bus_display &bus_leftbus>; >> >> Hmm, bus_display being a consumer of itself is a bit odd? Did you mean: >> interconnects = <&bus_dmc &bus_leftbus>; > > Might be, but we would need to swap the phandles so > order is maintained, i.e. interconnects = <&bus_leftbus &bus_dmc>; Ok, i see. Thanks for clarifying! Currently the "interconnects" property is defined as a pair of initiator and target nodes. You can keep it also as interconnects = <&bus_display &bus_dmc>, but you will need to figure out during probe that there is another node in the middle and defer. I assume that if a provider is also an interconnect consumer, we will link it to whatever nodes are specified in the "interconnects" property? > My intention here was to describe the 'bus_display -> bus_leftbus' part > of data path 'bus_display -> bus_leftbus -> bus_dmc', bus_display is > really a consumer of 'bus_leftbus -> bus_dmc' path. > > I'm not sure if it is allowed to specify only single phandle (and > interconnect provider specifier) in the interconnect property, that would > be needed for the bus_leftbus node to define bus_dmc as the interconnect > destination port. There seems to be such a use case in arch/arm64/boot/ > dts/allwinner/sun50i-a64.dtsi. In the general case you have to specify pairs. The "dma-mem" is a reserved name for devices that perform DMA through another bus with separate address translation rules. >>> #interconnect-cells = <0>; >>> }; >>> >>> >>> &mixer { >>> compatible = "samsung,exynos4212-mixer"; >>> interconnects = <&bus_display &bus_dmc>; >>> /* ... */ >>> }; >>> }; >>> >>> What do you think, Georgi, Rob? >> >> I can't understand the above example with bus_display being it's own consumer. >> This seems strange to me. Could you please clarify it? > >> Otherwise the interconnect consumer DT bindings are already well established >> and i don't see anything preventing a node to be both consumer and provider. >> So this should be okay in general. > > Thanks, below is an updated example according to your suggestions. > Does it look better now? > > ---------------------------8<------------------------------ > soc { > bus_dmc: bus_dmc { > compatible = "samsung,exynos-bus"; > /* ... */ > samsung,data-clock-ratio = <4>; > #interconnect-cells = <0>; > }; > > bus_leftbus: bus_leftbus { > compatible = "samsung,exynos-bus"; > /* ... */ > interconnects = <&bus_dmc>; > #interconnect-cells = <0>; > }; > > bus_display: bus_display { > compatible = "samsung,exynos-bus"; > /* ... */ > interconnects = <&bus_leftbus &bus_dmc>; > #interconnect-cells = <0>; > }; > > &mixer { > compatible = "samsung,exynos4212-mixer"; > interconnects = <&bus_display &bus_dmc>; > /* ... */ > }; > }; > ---------------------------8<------------------------------ It's difficult to have a common way to describe all the different kinds of topologies in DT, as some SoCs are very complex, having multi-tiered topologies with hundreds of nodes, with multiple links between them etc. Currently, the idea is to have the topology as platform data, but i guess that you want to avoid this. I hope that we will be able to describe simpler topologies in DT in the future, but we don't have such support in the framework yet. So maybe we could try your proposal and see how it will work for exynos. Thanks, Georgi