Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp145526imm; Thu, 26 Jul 2018 00:36:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdoL5ZSFTCDs+WTV3br/PeM17GjK+6xVewxcu72MVflaiYHcbgnhDFEuBO7Eb8YMVG0Cfso X-Received: by 2002:a63:be05:: with SMTP id l5-v6mr866335pgf.330.1532590587532; Thu, 26 Jul 2018 00:36:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532590587; cv=none; d=google.com; s=arc-20160816; b=TL1hWGYlwjZVLghhtaiG/VS/eStDFMt1Ls1LQa/P68TxvcXjY7a3F9V1vnVOidYGSs aSv6siCjiQsrKsBfD4l0HHuMSVlhD5+pqbIuIYm5K6b2jbFVCuJRHK+l/v1tZxldxpCc 2/LBUIdkL8adV8cQFQdI+gnkRnxIptmqgQ7vcitUOWdE2d4tl2nMt8LZXwCR5JgJETYi WvDo4jEPm1y+MLU7KgsjRlIu0fpVdcR0esgvXS4cN6BLM1YQNp+JI6J66a0rOcnroWVl ZSgZDKqkDL30CzNZ9U8h6gpntL+naznAh8bBEEcQkvQUD1T3kNPVNIyQrTbt27J0UVM5 3fNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:user-agent:message-id :references:cc:in-reply-to:from:to:content-transfer-encoding :mime-version:dkim-signature:arc-authentication-results; bh=/Gxy3/7xnsFKesbtGfS2WIF2Yzhff3DBGP1yYyG/bqY=; b=IHwQwlWUY6dXJTZGtohFr05uceMJyDR+3KFfzJE3MC1UipRKLgsvcO48v0DTlSPGMr S7D0w0xkRtEeik1SlvDvGKw/fQK2eRi+j/5F4tzaaUl4fbbXagm7XFfnNAZnXEgfiJkg SFWjBYU+ohFEF6Zpn9Mh0jUuIHI3OVwRGYp//UsaldY+E8XJeAbfEKClBgUHzKBj0SvP ckFdwG4lG2qnl8sjJuv9SRBLmC6brmpolkjHk8seAOvBzvCv2Z15wdiex4IsCHsB3Owp NGWGTM0UO4iSPcEmzf76+zbu9HNvyuItiYarw4yhNahjHANMiRop5oXiS2iGfCjEu7yK cYFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YFjtKAZ1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2-v6si688866pfb.365.2018.07.26.00.36.12; Thu, 26 Jul 2018 00:36:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YFjtKAZ1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729006AbeGZIut (ORCPT + 99 others); Thu, 26 Jul 2018 04:50:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:58278 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728749AbeGZIus (ORCPT ); Thu, 26 Jul 2018 04:50:48 -0400 Received: from localhost (unknown [104.132.1.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5B98120673; Thu, 26 Jul 2018 07:35:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1532590515; bh=X3YiETSP96EhHBeVSyqplLSFd+pOdmkw7T6shH6wR6Y=; h=To:From:In-Reply-To:Cc:References:Subject:Date:From; b=YFjtKAZ12ZxubWJwOYK/ca9XZxC/znVKAUPGSCmPeqeYNLY3ezB3h4/2NeQjErEA0 tJroZQW26R3KqbGxHdVWrHoZuihk9ZEWMagsFpjDUhz+6zAzqnbEHK1aGapCWYMhq9 P/yHj/kHKu5lyqYnlsaI+tLBJ7qqA8VGAdJJOa2M= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable To: Laurent Pinchart , Sean Wang From: Stephen Boyd In-Reply-To: <1531908387.8953.147.camel@mtkswgap22> Cc: mark.rutland@arm.com, airlied@linux.ie, mturquette@baylibre.com, dri-devel@lists.freedesktop.org, ulrich.hecht+renesas@gmail.com, lee.jones@linaro.org, linux-clk@vger.kernel.org, linux@armlinux.org.uk, ck.hu@mediatek.com, robh+dt@kernel.org, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, mchehab@kernel.org, linux-arm-kernel@lists.infradead.org, Matthias Brugger , gregkh@linuxfoundation.org, rdunlap@infradead.org, sboyd@codeaurora.org, linux-kernel@vger.kernel.org, p.zabel@pengutronix.de, matthias.bgg@kernel.org, pi-cheng.chen@linaro.org, davem@davemloft.net References: <20180717220328.792-1-matthias.bgg@kernel.org> <20180717220328.792-5-matthias.bgg@kernel.org> <1531882655.8953.83.camel@mtkswgap22> <51066716.k5MkZnrqCl@avalon> <1531908387.8953.147.camel@mtkswgap22> Message-ID: <153259051470.48062.4735087631606629738@swboyd.mtv.corp.google.com> User-Agent: alot/0.7 Subject: Re: [resend PATCH v4 4/5] drm/mediatek: Add support for mmsys through a pdev Date: Thu, 26 Jul 2018 00:35:14 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Sean Wang (2018-07-18 03:06:27) > On Wed, 2018-07-18 at 11:05 +0300, Laurent Pinchart wrote: > > Hi Sean, > > = > > On Wednesday, 18 July 2018 05:57:35 EEST Sean Wang wrote: > > > On Wed, 2018-07-18 at 00:03 +0200, matthias.bgg@kernel.org wrote: > > > > From: Matthias Brugger > > > > = > > > > The MMSYS subsystem includes clocks and drm components. > > > > This patch adds an initailization path through a platform device > > > > for the clock part, so that both drivers get probed from the same > > > > device tree compatible. > > > = > > > Sorry for that I should have a response earlier for the series. > > > = > > > Some points I felt they're not exactly right and should be fixed up > > > before we're moving on > > > = > > > Currently, drm driver have a wrong reference to the dt-binding, > > > "mediatek,mt2701-mmsys" or "mediatek,mt8173-mmsys", they should be all > > > for the subsystem exporting clock and reset line such common resource= to > > > its sub-devices. Every subsystem has a similar shape. I hope mmsys > > > shouldn't be an exception. > > > = > > > DRM device needs to have its own dt-binding show how connections betw= een > > > DRM components being made and its node should be put under mmsys node. > > > = > > > In this way, it becomes easy to see how the topology of the subsystem= is > > > and grows, like a tree "device tree", instead of hiding the details in > > > the implementation. > > > = > > > The similar example we already did for audsys on mt2701 and mt7623 as > > > below > > > = > > > audsys: clock-controller@11220000 { > > > = > > compatible =3D "mediatek,mt7623-audsys", > > > = > > "mediatek,mt2701-audsys", > > > = > > "syscon"; > > > = > > ... > > > = > > > = > > afe: audio-controller { > > > = > > compatible =3D "mediatek,mt7623-audio", > > > = > > = > > "mediatek,mt2701-audio"; > > > = > > > = > > ... > > > = > > }; > > > }; > > = > > This looks very strange to me. I'm not familiar with the hardware = > > architecture, but a clock controller that includes an audio controller = seems = > > like a very weird design. It's usually the other way around, you have a= n audio > = > yes, naming audsys as clock controller is really not good. it should be > worth a better naming. > = > mtk subsystem AFAIK works as a container, at least provides clocks, > reset, syscon access, these common resource to these devices running on > the subsystem. It also has a power gate independent from other > subsystem, that can be controlled when these devices all powered down > or once up. > = > And it should be better that we don't assume what exact devices are > running on since it is possible that there're different devices running > on the same subsystem per SoC. mtk has many subsystem working in this > way. mmsys is just a case. we can see in [1] > = > = > [1] > https://elixir.bootlin.com/linux/v4.18-rc5/source/Documentation/devicetre= e/bindings/arm/mediatek > = Sean, is this an ack for this patch series? I think the consensus is to not modify DT to add a subnode for the "clk" part of the hardware, but instead either register the clks from the device driver that has the clk hardware inside of it, or do what this patch series does and register a device in software from the "parent" device driver so that logically clk things are contained in drivers/clk/