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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1C72C5B578 for ; Mon, 1 Jul 2019 03:55:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 79729208CA for ; Mon, 1 Jul 2019 03:55:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KjdrNaO0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 79729208CA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=s5Mo40UIGlAlwJ/lQUTECHtiUJPjPxEW0mw8DpsBp4k=; b=KjdrNaO0+DLk78 yFE3aQaUME4EqKCyuVu0R5kOiII2AeoNzYAuClqAPnTh/fE05AbxyNEnDwrwyWvowBxNs1/vzGjaB JU7vzgZQPqYhreFV6DQi98W0CdbJhLnhkprT3Glai5gMqfTmk67RIwWavlqj0yVVkeQXTzDRfxzt1 Idd5xC+FP94nTPTLsmdpuiAKDjgsHBOLW3lWEe1+jzKkrInsgf2ug41nsfOED/gutMJAdXAJ56sHT rRgnO8zX6PHeVN2GtOJrqbQLn+yZ3gG9y4x0pAwMx1yib07yk+7Xv1ACZHZFB0Om4SphDeCUAlBLR w80iqTXKAuxJqS0S32Ow==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hhnPt-0002uC-3P; Mon, 01 Jul 2019 03:55:45 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hhnPo-0002se-Ih; Mon, 01 Jul 2019 03:55:42 +0000 X-UUID: 76ba95d6d2514c458ff21c20a745eb5d-20190630 X-UUID: 76ba95d6d2514c458ff21c20a745eb5d-20190630 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 228163531; Sun, 30 Jun 2019 19:55:34 -0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sun, 30 Jun 2019 20:55:31 -0700 Received: from [172.21.77.4] (172.21.77.4) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Mon, 1 Jul 2019 11:55:17 +0800 Message-ID: <1561953318.25914.9.camel@mtksdaap41> Subject: Re: [PATCH v5 08/12] dt-bindings: mediatek: Change the binding for mmsys clocks From: CK Hu To: Matthias Brugger Date: Mon, 1 Jul 2019 11:55:18 +0800 In-Reply-To: References: <20181116125449.23581-1-matthias.bgg@kernel.org> <20181116125449.23581-9-matthias.bgg@kernel.org> <20181116231522.GA18006@bogus> <2a23e407-4cd4-2e2b-97a5-4e2bb96846e0@gmail.com> <154281878765.88331.10581984256202566195@swboyd.mtv.corp.google.com> <458178ac-c0fc-9671-7fc8-ed2d6f61424c@suse.com> <154356023767.88331.18401188808548429052@swboyd.mtv.corp.google.com> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190630_205540_625544_22D4A58D X-CRM114-Status: GOOD ( 26.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , Sean Wang , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Rob Herring , Stephen Boyd , Michael Turquette , Sean Wang , Stephen Boyd , "linux-kernel@vger.kernel.org" , dri-devel , David Airlie , Chen-Yu Tsai , "linux-mediatek@lists.infradead.org" , Randy Dunlap , Philipp Zabel , "matthias.bgg@kernel.org" , Matthias Brugger , linux-clk , Ulrich Hecht , Laurent Pinchart Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Matthias: On Fri, 2018-11-30 at 16:59 +0800, Matthias Brugger wrote: > > On 30/11/2018 07:43, Stephen Boyd wrote: > > Quoting Matthias Brugger (2018-11-21 09:09:52) > >> > >> > >> On 21/11/2018 17:46, Stephen Boyd wrote: > >>> Quoting Rob Herring (2018-11-19 11:15:16) > >>>> On Sun, Nov 18, 2018 at 11:12 AM Matthias Brugger > >>>> wrote: > >>>>> On 11/17/18 12:15 AM, Rob Herring wrote: > >>>>>> On Fri, Nov 16, 2018 at 01:54:45PM +0100, matthias.bgg@kernel.org wrote: > >>>>>>> - #clock-cells = <1>; > >>>>>>> + > >>>>>>> + mmsys_clk: clock-controller@14000000 { > >>>>>>> + compatible = "mediatek,mt2712-mmsys-clk"; > >>>>>>> + #clock-cells = <1>; > >>>>>> > >>>>>> This goes against the general direction of not defining separate nodes > >>>>>> for providers with no resources. > >>>>>> > >>>>>> Why do you need this and what does it buy if you have to continue to > >>>>>> support the existing chips? > >>>>>> > >>>>> > >>>>> It would show explicitly that the mmsys block is used to probe two > >>>>> drivers, one for the gpu and one for the clocks. Otherwise that is > >>>>> hidden in the drm driver code. I think it is cleaner to describe that in > >>>>> the device tree. > >>>> > >>>> No, that's maybe cleaner for the driver implementation in the Linux > >>>> kernel. What about other OS's or when Linux drivers and subsystems > >>>> needs change? Cleaner for DT is design bindings that reflect the h/w. > >>>> Hardware is sometimes just messy. > >>>> > >>> > >>> I agree. I fail to see what this patch series is doing besides changing > >>> driver probe and device creation methods and making a backwards > >>> incompatible change to DT. Is there any other benefit here? > >>> > >> > >> You are referring whole series? > >> Citing the cover letter: > >> "MMSYS in Mediatek SoCs has some registers to control clock gates (which is > >> used in the clk driver) and some registers to set the routing and enable > >> the differnet (sic!) blocks of the display subsystem. > >> > >> Up to now both drivers, clock and drm are probed with the same device tree > >> compatible. But only the first driver get probed, which in effect breaks > >> graphics on mt8173 and mt2701. > > > > Ouch! > > > > Yes :) > > >> > >> This patch uses a platform device registration in the DRM driver, which > >> will trigger the probe of the corresponding clock driver. It was tested on the > >> bananapi-r2 and the Acer R13 Chromebook." > > > > Alright, please don't add nodes in DT just to make device drivers probe. > > Instead, register clks from the drm driver or create a child platform > > device for the clk bits purely in the drm driver and have that probe the > > associated clk driver from there. > > > > I'll make the other SoCs probe via a child platform device from the drm driver, > as already done in 2/12 and 3/12. This series have been pending for half an year, would you keep going on this series? If you're busy, I could complete this series, but I need to know what you have plan to do. I guess that 1/12 ~ 5/12 is for MT2701/MT8173 and that patches meet this discussion. 6/12 ~ 12/12 is for MT2712/MT6797 but that patches does not meet this discussion. So the unfinished work is to make MT2712/MT6797 to align MT2701/MT8173, is this right? Regards, CK > > Regards, > Matthias > > >> > >> DT is broken right now, because two drivers rely on the same node, which gets > >> consumed just once. The new DT introduced does not break anything because it is > >> only used for boards that: "[..] are not available to the general public > >> (mt2712e) or only have the mmsys clock driver part implemented (mt6797)." > > > > Ok, so backwards compatibility is irrelevant then. Sounds fine to me. > > > > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel