Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp480360pxp; Wed, 9 Mar 2022 06:47:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzYjUj4asxiRX6j12xHJtGWkxypPOsJi5/YmIcb89mfS2lM9sQemirYgvO0YgA28Ac5o07L X-Received: by 2002:a17:902:f68f:b0:151:fbf5:db45 with SMTP id l15-20020a170902f68f00b00151fbf5db45mr10267179plg.60.1646837243059; Wed, 09 Mar 2022 06:47:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646837243; cv=none; d=google.com; s=arc-20160816; b=rK11KKz28a2EoG55tf9c53gfo4pamQ7+PtH5zEqsIpddthHve8n2tf0jCKfPphVRYL 1T8wsK8i+Po8kz7KGvL8xO5vO3crHisMGokz2LQwHCM6uHMVLhzCbP8UPEft5dLP3P3Q RQOAKmIRBQjiOKuzyndXkkBy+TkXtX/ukeYayVHpo8lr55U8aIXeeXYXAxmHzzRcnjqu gMzQWHlnDfTCJ8sa0QwDetQfJ8iFUFCy25vpjZqOvFOxrOZckrMDgD9ZWUgJP5QcVUpL vOseTrNoMcHWdCAzc+Si0cV4ts+UKfMtIDNLmtEtMwxhJFRRZJXbwto3EHO1ayuA8Wli ci/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=S18YdnTUkeM0dqYc5WyAraFx/d7o41hPIf8+ANoxRDQ=; b=hZvfZR8RHOvXkBwRSBvzVQRgfOHm6dDaaEyfhI0mJ4lPhF/m6Yn/PQXykKikCjoz3w ToWNHuQBmsbjRW5ThaK5PBYyiSFP2GPhoYDlRZWu9lzzo2Ege9vb6iLR9oeofZgyrCZo SPje5b9HNksZEpaIdu9wohenPetftbhAhhqIus1l5CLaQe3iPqGcPZ+eDyW+vKoSqQsu 0vdk6Be3HjSfAgHonQpUNyz0tMKa4oXzOmZBGqbl04DG7J0xv1IT2s9lCnm/ORtY9Xq0 w/Z+rhaxxzvuqHyb/IXV3eybi1X5ZIOpNn47EQbVE281w4IGsqa4CguaeNy9XxdhNvV/ pR9A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a170903228b00b001514a03bf28si2223332plh.558.2022.03.09.06.47.04; Wed, 09 Mar 2022 06:47:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233409AbiCIOEd (ORCPT + 99 others); Wed, 9 Mar 2022 09:04:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233389AbiCIOEc (ORCPT ); Wed, 9 Mar 2022 09:04:32 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BB0EBA1476; Wed, 9 Mar 2022 06:03:31 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 1289480C1; Wed, 9 Mar 2022 14:02:07 +0000 (UTC) Date: Wed, 9 Mar 2022 16:03:29 +0200 From: Tony Lindgren To: Matthias Schiffer Cc: Rob Herring , Arnd Bergmann , Olof Johansson , soc@kernel.org, Vignesh Raghavendra , Tero Kristo , jan.kiszka@siemens.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Nishanth Menon Subject: Re: [PATCH v2 1/2] arm64: dts: ti: k3-am65: disable optional peripherals by default Message-ID: References: <20220203140240.973690-1-matthias.schiffer@ew.tq-group.com> <20220204143108.653qk2ihnlhsr5aa@prior> <5944ba0ce568eaf507917799b1dfd89a3d0ca492.camel@ew.tq-group.com> <9923df6525212389b86cb635624bcfb5c27a8bc5.camel@ew.tq-group.com> <1356e93cd5b101c3d896e35250c66959ed631544.camel@ew.tq-group.com> <5058591a3e0f0cb82b26cffe888d87b4d1bdd713.camel@ew.tq-group.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5058591a3e0f0cb82b26cffe888d87b4d1bdd713.camel@ew.tq-group.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Matthias Schiffer [220309 11:09]: > while I agree that it would be great if drivers could just detect when > hardware is not available, this is simply not how most drivers work - > when you instantiate the driver via a non-disabled(/reserved/...) DT > node, the driver expects a usable device. > > Especially for busses like I2C, there is no way for a driver to > reliably detect whether the bus is usable or not. (There are several > states that can't really be distinguished: Is pinmuxing missing, or > does the device not need any muxing? Is a line low because it is not > actually connected to anything, or is there another master currently > using the bus, or is the bus stuck due to a faulty device?) Well how about set only the problem devices with status = "disabled" with a proper comment in the SoC dtsi file? See for example what has been done in arch/arm64/boot/dts/apple that has been pretty widely reviewed and done with a good taste :) Not sure what can be done to idle the unused devices in the disabled case though, maybe some firmware call to disable all unclaimed devices could be done if it does not exist already. The firmware may not have the capability to idle devices that need firmware loaded to idle them for example though. Regards, Tony