Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp648354pxj; Fri, 11 Jun 2021 08:03:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykHVD89Pl26KvskqTmagjSdrKMFwl1BY+kVtIheQJbrsS+NvCCUEAdc2Ruigff+17NoiVm X-Received: by 2002:a50:8751:: with SMTP id 17mr4220559edv.340.1623423839160; Fri, 11 Jun 2021 08:03:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623423839; cv=none; d=google.com; s=arc-20160816; b=FR95G+15JxGZp5vscxgnYQDdQISnB1fr7BCt1GdtRye67pfAG+2Jmb835jzzmK0aZ0 wu0UrmUBSxQkCMNL9Z3H9xQfgMevpqtwcv3AKbjh5bk7eRyd7JKGUS1XcxtQNx/hOJWZ jA10e+6v3yE2uQNKpDX88x0/CJdLFkvhuKRrprAw1+eIAK6JF9cYwDgpEgGgd6QgnFCj vKUKSf8RuLgmQmDlwW82AMT/7PubdBrrsgNpmrTwj5YYzuieFlfAmJqNPE/UujfPA3Dp I0FBhPz+BngAI4ofT1h8cKEDYJ3alv8GN2kTs6ircqPrQckAWpNibbLu0ksnD24a6hvd qBTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=6ODl6sE2Ol4r17J7fzNOCZpNjRTWhepUsqHifYZQDAM=; b=Da0ydbGKljAOQDeomnixjVULyC5CtJN8O7ezCXtbbUZ2gholoMF33PKFAVc9jbZo3p JeKHGk7+tXgshDvW2RJ3mhwpAet4GDqzL1kO/KhMAlZChLJ+x65G9msmWl5MmF8JOI2a afk+81CBBxTIdgV38vLh0Eb6f9l5QNmEm+u78pNgfE7nh8AdBPp0+FpEPmEN6nd1kSS+ hnY0Oqas5dfj8hOzjLHrat5Q/QJ2xH8jEjnNQUeNuKBun+wGuaBYwJ5KbdKxR+dqKkTE tSMnDyk63FQC72G7dmyzrRFA1eMVe1DbgUKnMZsvoaSSl3SKflZjAhjWt5DSpu0hKVyY uOCw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x2si5292485eju.99.2021.06.11.08.03.33; Fri, 11 Jun 2021 08:03:59 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231799AbhFKPDU (ORCPT + 99 others); Fri, 11 Jun 2021 11:03:20 -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: linux-kernel@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