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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY 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 2CC74C48BE0 for ; Fri, 11 Jun 2021 15:01:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 12D6561278 for ; Fri, 11 Jun 2021 15:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231179AbhFKPDS (ORCPT ); Fri, 11 Jun 2021 11:03:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230382AbhFKPDO (ORCPT ); Fri, 11 Jun 2021 11:03:14 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45E24C061574; Fri, 11 Jun 2021 08:01:15 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id A3CD81F4479F Message-ID: <15d5728aeb7895f81f833e7f7e281861c1fcef9a.camel@collabora.com> Subject: Re: [PATCH v13 2/2] arm64: dts: imx: Add jpeg encoder/decoder nodes From: Ezequiel Garcia To: Dong Aisheng , Mirela Rabulea Cc: "linux-arm-kernel@lists.infradead.org" , "mchehab@kernel.org" , "shawnguo@kernel.org" , "robh+dt@kernel.org" , Aisheng Dong , "G.n. Zhou" , dl-linux-imx , "linux-kernel@vger.kernel.org" , Laurentiu Palcu , "linux-media@vger.kernel.org" , "paul.kocialkowski@bootlin.com" , "devicetree@vger.kernel.org" , Robert Chiras , "p.zabel@pengutronix.de" , Peng Fan , "hverkuil-cisco@xs4all.nl" , Daniel Baluta , "kernel@pengutronix.de" , "s.hauer@pengutronix.de" Date: Fri, 11 Jun 2021 12:00:59 -0300 In-Reply-To: References: <20210522211055.15988-1-mirela.rabulea@oss.nxp.com> <20210522211055.15988-3-mirela.rabulea@oss.nxp.com> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Fri, 2021-06-11 at 21:33 +0800, Dong Aisheng wrote: > [...] > > > > > +img_subsys: bus@58000000 { > > > > +   compatible = "simple-bus"; > > > > +   #address-cells = <1>; > > > > +   #size-cells = <1>; > > > > +   ranges = <0x58000000 0x0 0x58000000 0x1000000>; > > > > + > > > > +   img_ipg_clk: clock-img-ipg { > > > > +           compatible = "fixed-clock"; > > > > +           #clock-cells = <0>; > > > > +           clock-frequency = <200000000>; > > > > +           clock-output-names = "img_ipg_clk"; > > > > +   }; > > > > + > > > > +   jpegdec: jpegdec@58400000 { > > > > > > Node should be disabled by default. > > > And enable it in board dts including LPCG. > > > > At version v5 of this patch, the node was disabled by default, and I > > received this feedback from Ezequiel Garcia: > > > > "Pure memory-to-memory are typically not enabled per-board, but just > > per-platform. > > So you can drop the disabled status here." > > > > So, in v6 I made it enabled by default. > > > > Any strong reasons for enabled/disabled per platform? > > AFAIK we usually only enable system basic features and let other > user selectable features disabled by default in dts. > Even for device LPCG clocks, if it's enabled by default and later > enter runtime suspend if no users, it still consumes power. > Well-written drivers shouldn't draw any power if not used. And DT is about hardware-description, not about usage-description. Which means, at the soc.dtsi level you disable devices that need some board-level hardware thing to be enabled (e.g. a physical connected, a regulator, etc.). A pure memory-to-memory should be enabled by default, because in practice you can't predict what the users a board will want to use, nor the DT is the place for that. Sticking to hardware description is the best way to get DT right :-) Cheers, Ezequiel