Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3056332rwb; Mon, 16 Jan 2023 03:10:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXtRvlsF9K/AfY4mxs8f3y6PuQ4PQTNAz6w/dJ98VzL1LbALiO+jDj3AB6TY6O6ueSDyrE6L X-Received: by 2002:a17:90a:6403:b0:229:64a2:501e with SMTP id g3-20020a17090a640300b0022964a2501emr5649855pjj.1.1673867434819; Mon, 16 Jan 2023 03:10:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673867434; cv=none; d=google.com; s=arc-20160816; b=Fs92JQAllglp2CFWwpPh1/dg1lPQzhv4TssnLcW5YzfWgVVTZeEuyIMc/QLT5b6rka N58jCWMZmNp9GQOXvOY+zCdVuOzXJiRHNM3BHZkSo1judzwFGUZtfrMDQ3zbJcsNDbp/ mh+HKdqk/Jayt4bepquLY+9lceWlB4iPKhHaQRWqm9gtUhqfWXVA7pnKRnEHhYghDJDL xHKPwz2ifICXXJsJ9QmCBD8nTDaA1c5RWEtQJXbaj78XvvjAqa4Iyu5kMpq943DtdQ+Y a+SIpBjaUvQILnvMj7TmuChZEsc4aYhOIdtUquo5E535I1ULGAIQ+RKYKpXBJexhwTV0 AM5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ub1IltuuPTGiOpoZBxnkRWyKh1N9ylDkHOUiK2hYg9w=; b=bxarVuPEd1sPI2KiNRpR8gPb1h9OR3YYAelPt0VVwlsun3HUSG15blfM2eqKmHQf19 oauBMkyFPkNFpnyIVXZoF6V1oljznSbpOqktuVIo7dCkho5gdpQzA1qrhBQKduabTJXn wdWJE5LJ8mZhTyufUAtFodGSMGLCHkf8RlI1N8WvhVsEmUMFqmgQxz8KbYqyV64Owjy3 ntgtVbLF0L3BAat/TrBBXXX+LaNSrqJDdgz0xbruLyTUBJ4gHTrRqb1SWpvxMBIxfpkE X+q7fePpp+Bo4KCU8kQ3kcCqhCXYyWBY0Q03RVZZD9FjlAofEZ6040mUzWxApeFqKd6Z QpAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ynemqw6w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h132-20020a636c8a000000b00478bf137d96si28692719pgc.462.2023.01.16.03.10.28; Mon, 16 Jan 2023 03:10:34 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ynemqw6w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbjAPKQc (ORCPT + 51 others); Mon, 16 Jan 2023 05:16:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbjAPKQI (ORCPT ); Mon, 16 Jan 2023 05:16:08 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBA73C161 for ; Mon, 16 Jan 2023 02:15:13 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id b4so20534719edf.0 for ; Mon, 16 Jan 2023 02:15:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ub1IltuuPTGiOpoZBxnkRWyKh1N9ylDkHOUiK2hYg9w=; b=ynemqw6wwxgBl+4b2kXkFC+EGlDrNfMPXfAQ4yTtEeQ/2YwdChWmypIfai4He8Dm44 Nhe6Qr9YPI9ZLY4IEL5VXvQzl6nwlwSl5cf2FKLPAnVE3Pz8ab1f/lxZWh65/L+Zo1oW f3ucpAp9Me3owhAj0YMYppYFVu22ushl8l2PprkubjmQcVdoCo2I6dZfKO6Bn/KYYhDK gR+WUx4mxudw5D9c2O5FZa6M3rAGv+JjUou7Ee8cZHQDhgiXQUU/qu0CpISTYrZeP3JR s0mjY5J1+inDoDC6a+a9aLncV1471PIJ1Zi5gO5Rps+d8RlwCY90fj0fixb/ndxpZ/1x fPiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ub1IltuuPTGiOpoZBxnkRWyKh1N9ylDkHOUiK2hYg9w=; b=5uF3S5QueLVCyri5hjcP1fAkTgcJtefA0WiYw0fW+x5OvGNQFenq03EtTAn4wQvU7+ Av1Xv1Z4lhV8TSs5wYKVrdITc3q+t8WWwDRnZOwMjG11pQYm5d6KprgYiUia96Cc/sko XPmBAOBCAPjIGzRatoFEEp8AwyqVnfoPIDy3uFUAMXnDh0TNwhJ/C7AMXjRqg5ccMfr4 rUwVPrWMtK3/saqRI22q7PTeQl40O1IgijGONopCmVJV/0OHhwo5rBlLQg6o7JFHNzb8 0fiWAml1RsPilDyrBHAbIAtfm84qQbCoq5J94j2mlS3mkh1Tbk/7UmxRjRKSVq9R3jhQ TZIA== X-Gm-Message-State: AFqh2koQka374bG12JwmOe5C8HZ0Wvo96oUcgFs6jOImxpplh4lty4NT jEh2F2YvZQS3myRM3jWA9ZvUUg== X-Received: by 2002:a05:6402:3220:b0:49e:1d59:794f with SMTP id g32-20020a056402322000b0049e1d59794fmr1522549eda.22.1673864112349; Mon, 16 Jan 2023 02:15:12 -0800 (PST) Received: from [192.168.1.109] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id s1-20020aa7d781000000b0048ecd372fc9sm11290663edq.2.2023.01.16.02.15.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Jan 2023 02:15:11 -0800 (PST) Message-ID: <7cffc639-3b61-1479-115c-34dffdfd8cc9@linaro.org> Date: Mon, 16 Jan 2023 11:15:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 2/2] ARM: dts: imx6qdl: support child mfd cells for the reset controller Content-Language: en-US To: Ahmad Fatoum , Bastian Krause , Philipp Zabel , Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230113-syscon-child-mfd-v1-0-0dd31b7de373@pengutronix.de> <20230113-syscon-child-mfd-v1-2-0dd31b7de373@pengutronix.de> <392f6e9d-b7c2-37df-2067-f7d967a20f10@linaro.org> <12080bf5-2cc4-e215-555e-5438ed1bd851@pengutronix.de> <1b5613ad-6d0d-0979-ddd0-4677ade7beb9@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On 16/01/2023 10:26, Ahmad Fatoum wrote: > On 16.01.23 10:14, Krzysztof Kozlowski wrote: >> On 16/01/2023 09:27, Ahmad Fatoum wrote: >>> Hello Krzysztof, >>> >>> On 16.01.23 09:20, Krzysztof Kozlowski wrote: >>>> On 13/01/2023 18:32, Bastian Krause wrote: >>>>> The actual syscon-reboot-mode child node can be added by a board >>>>> device-tree or fixed up by the bootloader. For the child node to be >>>>> probed, the compatible needs to include simple-mfd. The binding now >>>>> specifies this, so have the SoC dtsi adhere to it. >>>>> >>>>> Suggested-by: Ahmad Fatoum >>>>> Signed-off-by: Bastian Krause >>>>> --- >>>>> arch/arm/boot/dts/imx6qdl.dtsi | 3 ++- >>>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi >>>>> index ff1e0173b39be..b16be39458aa6 100644 >>>>> --- a/arch/arm/boot/dts/imx6qdl.dtsi >>>>> +++ b/arch/arm/boot/dts/imx6qdl.dtsi >>>>> @@ -865,7 +865,8 @@ epit2: epit@20d4000 { /* EPIT2 */ >>>>> }; >>>>> >>>>> src: reset-controller@20d8000 { >>>>> - compatible = "fsl,imx6q-src", "fsl,imx51-src"; >>>>> + compatible = "fsl,imx6q-src", "fsl,imx51-src", >>>>> + "syscon", "simple-mfd"; >>>> >>>> You need children here. Otherwise simple-mfd does not make sense. If you >>>> expect something else to add children (I don't understand why, usually >>>> reboot capability is fixed per SoC and only sometimes extended with some >>>> other means), then this "else" will also change compatible. >>> >>> It's about syscon-reboot-mode, not syscon-reboot. Such modes are board- >>> not soc-specific. >> >> syscon-reboot-mode is also mostly SoC specific. What exactly would >> differ on different boards? Register offsets of SoC component? Register >> values used by SoC power management unit? > > The modes supported. Let's say you want a bootloader mode that drops > the board's bootloader into a fastboot gadget mode. You'd add a > syscon-reboot-mode pointing at one of the non-volatile registers and > you would define a magic value to indicate fastboot, both in the > bootloader and Linux. Bootloader and other firmware (e.g. ATF) is tightly tied to SoC, not to board. There might be differences between firmware used and OS (e.g. ChromeOS uses their own bootloader, different than Linux and Android on the same SoC), but again this is not board specific. > > In theory, the reboot mode could also talk to the bootrom[1] to change > the bootsource. This is also not board-agnostic, because it may not > make sense to have a spinor reboot mode if your board doesn't have one. > > We have this scheme for STM32MP1 already and that's why I suggested > Bastian to do it likewise for i.MX as he needs this functionality: > https://lore.kernel.org/all/20201021102855.18026-1-a.fatoum@pengutronix.de/ I don't understand why you use clearly wrong patches as examples. Bad patterns and bugs are not reason to use same approach. The binding is wrong - you do not allow syscon-reboot-mode and if you ever tested your patches, you would see the errors. > https://elixir.bootlin.com/barebox/latest/source/arch/arm/dts/stm32mp151.dtsi#L44 Whether this part is correct, tricky to say. Why these offsets are not valid for other board? Best regards, Krzysztof