Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1386922pxj; Fri, 18 Jun 2021 06:08:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcnIm9TMrH2DMvIv3vvs1R4zD1w3FQ9J1MkXp/f73gqbnk3OHmCsUQfXZJgsc9kegxXWwH X-Received: by 2002:a17:906:4dd1:: with SMTP id f17mr10722369ejw.528.1624021715616; Fri, 18 Jun 2021 06:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624021715; cv=none; d=google.com; s=arc-20160816; b=MdyeN9fVzXqF03vlQviyToHgsQRZ9Kwn+O12eEZvOVZExwS2hTGxkFHUYJh9j8Y+Ox PUI+UIfVBJumgRCp0w5XeGe5M5bSwiM/AG5hFGb8mKrF75cf4O73K6ey+WPO7VCScrzG rf6HoITy1j/HPBig7dElK9ag/Z3RFIix4H7m6xjawnoz07tjbeIx8yBppiA3gkqpFEAk /MeNJblegJdCu2IoA1wMOhTgjPSqkkOncCsVXMYiwVxvDAvb8hv3Uyi8BGn3DDmxflh2 udybabWb71ISjzeBTwRnMIa0kssdFu/XmoXjmI1lpIGspe8vEVIveKGVYW4cdye340pY q5jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=gYRQQqkflstokbPMQ45EOzFFXs3cNTWmXdnRNdqXloc=; b=e8EsGUGv6rJqdYWqhw+JIuRUR/zDaCZ/LvfKtntDRc/ih/OoO2Wfd/HQNkyz3QCcR+ 8byQ7aQzl+neWJEAtorXIogLSxQ+QV4xxE/UpMm+DW75hO9e21j2qm5Gf+xOFBPuDw5q bHW/9tyvjbjm9Z81LyPxe1YsBeI3ahl0xsN3TGiJdUiTb9GLDtUgs2TpO0Az2r4+tpGG JrTcV4XyPzj/EQ/NeCgajeSe8VIWTzl8gj8EXUxLPzLJLhptZ8gBZZmbNUusOYDRs7Fj tbLoAQIoPGjyvLp1OR2tZYZGdRYecPud0ldOUAOK0WzTbbVv3pzQWSCCh9D59sDRfwui MiCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EfWWbdEB; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u5si4914996edy.95.2021.06.18.06.08.12; Fri, 18 Jun 2021 06:08:35 -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=@gmail.com header.s=20161025 header.b=EfWWbdEB; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232246AbhFRMv6 (ORCPT + 99 others); Fri, 18 Jun 2021 08:51:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231585AbhFRMvz (ORCPT ); Fri, 18 Jun 2021 08:51:55 -0400 Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63415C061574; Fri, 18 Jun 2021 05:49:45 -0700 (PDT) Received: by mail-oo1-xc30.google.com with SMTP id x22-20020a4a62160000b0290245cf6b7feeso2419219ooc.13; Fri, 18 Jun 2021 05:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=gYRQQqkflstokbPMQ45EOzFFXs3cNTWmXdnRNdqXloc=; b=EfWWbdEB7R4vC8/JNVZrzmPs2b0Lrk5xFdvgVOkGZNtXPLiBcnD9WGYIogCKJi8RyQ ft70CvqyLzeUFrs5Eq+xMAwhu9Mai+9jh3kUOMYXm+V5rCQ8WGRh6ORbsqTpCtYch6Rg GdJCgPBbFHq3lLDGLp3ejWzlHdyhzpaY7yOfkV0pRri1HqU0I59pSwcu1Pemc9RdF/PF u7SyMC5//oe4mmhUVqRmX/XEeQgFrWTAD4+24xYgLf9/h/mvFhNHlUxcA4DM3vYw3JqH pI24vSWnm9gbcZRoEgtSwZE+LH4KHsnMj5skC5Wg1FN8dXD4SXis/QzT3wIM8AgvuQqp WFCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=gYRQQqkflstokbPMQ45EOzFFXs3cNTWmXdnRNdqXloc=; b=OFxxdEnRuulN0g0pU5FUuugIQZF62v6K0ZTAOasmtTT+ryQidyN3soaxR5IMn5gtjd LD95ctp+Fg/SpTnUAJX1DICPJGjOoQVDAjDlthIZUJSAc+xGcciFnAeXQtbGAdsdhryB dmWChIA539o+YTdmmrzK5vbMchCMQhabPqQG1jFv+qeruzLjyPm+X8SMPFN4aCYd1yqx HXWG1Amepjp0q316dO1AZlNmHMMpm/HEDS/V6q7RigZ7gJ3aTtC/8KChTHuBRvbRLRXj vb8u3VDdZ38NdoCwcq85DKXyOFiWZjM9ibRm/xeOHqZUDdMPKJMw0tjHmoFqPSJ1yrUF yM0A== X-Gm-Message-State: AOAM533T+iZJkPRDHtWsN07C8/RcNkae+pEgK2xGRL8oZk2bLA2IokZq xsvvUehDoepJ66yNsIcQHHkqjXNxSTn5OSqE1pU= X-Received: by 2002:a4a:b1c2:: with SMTP id j2mr8926777ooo.78.1624020584775; Fri, 18 Jun 2021 05:49:44 -0700 (PDT) MIME-Version: 1.0 References: <20210522211055.15988-1-mirela.rabulea@oss.nxp.com> <20210522211055.15988-3-mirela.rabulea@oss.nxp.com> <15d5728aeb7895f81f833e7f7e281861c1fcef9a.camel@collabora.com> In-Reply-To: <15d5728aeb7895f81f833e7f7e281861c1fcef9a.camel@collabora.com> From: Dong Aisheng Date: Fri, 18 Jun 2021 20:47:57 +0800 Message-ID: Subject: Re: [PATCH v13 2/2] arm64: dts: imx: Add jpeg encoder/decoder nodes To: Ezequiel Garcia Cc: Mirela Rabulea , "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" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 11, 2021 at 11:01 PM Ezequiel Garcia wrote: > > 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. > LPCG won't draw power when not used. But the power domain used by LPCG will still draw power when enter idle state. > 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. It makes sense to me. Thanks Mirela, Please follow up with Ezequiel's suggestion. For LPCGS used by jpeg, you can keep it enabled by default. Regards Aisheng > > Sticking to hardware description is the best way to get DT right :-) > > Cheers, > Ezequiel >