Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5902334rwr; Mon, 24 Apr 2023 10:31:58 -0700 (PDT) X-Google-Smtp-Source: AKy350ZX+sdQgXtas3Kz7OU5Qah8z3sO5lewnNQRyKqHxknc7kqHbru0/bm6NhHnz070xKYn+hye X-Received: by 2002:a05:6a00:1794:b0:63d:3c39:ecc2 with SMTP id s20-20020a056a00179400b0063d3c39ecc2mr17933895pfg.12.1682357517845; Mon, 24 Apr 2023 10:31:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682357517; cv=none; d=google.com; s=arc-20160816; b=J8S9Yxvyo1YHKhgcXXZQnfNKGu1RFi4T9UJ/vpiJQu5cdiFWJ9hEq380QJXDLufRtr wnqiBjEpKLabcz8u8D84l7J1L0DYvoyR8ubdKjDEL6aUnjjBeJTm5cAcdWfC1khe8kYZ 7egT4IBke+pQpmIkZjOQmqz/BJamM+oF1m0Zj80VpK4otSOEoIFvvlj06yufLvhYHJNA wpEx5WQ4vw3kd1pynmDR7RQQWId12B1qXdCoqyzy56HL6mSIvcleLYPBk+rqy+fo5fPt rwy8Nc+5MujFhP3otj2uglwmtbuvYBEuHpikSk8RKZiHzX1Elax7o0JI9DUddtUXu7/L DP/w== 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=vrYfILk+8/33VxPwT4F9AJ+MJUhKGzAtHjT8mjTXeVI=; b=qbUuVhYuxv7jDG8Fzc9ZuLhIZ2EdTr0HcDThAb/02kxhWUSsxVaT2VyyaAYDPFY3bs 1VLFvAC+F0M3PbjLFEuxKAGqrjliG9VRiEFbFfK/Uzz5GvcTaW24K9Jqlhz7oH1Y4YIY Li4ySbk1MQKK4Yfe2C0ufKz6hcwVbJw5DYqPSUGOCChvhx7KBGh7r6oyAAAfgO8SierR 81ymcYtt9i9SM+D7n9WKbEz7zgBZex4+qCWVj2liMlMIeDAoQXuK0Agr8s/aDgA8XMLs tmb0NVAKn2PHU22dZJPjwXZp0XLRJHFroq2Zw6CJMBfYvJaI0Zb+E5U+LlB798i8tGMm FoMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=EFQszo9F; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020aa798d0000000b0063b84b5b53asi11204290pfm.9.2023.04.24.10.31.44; Mon, 24 Apr 2023 10:31:57 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=EFQszo9F; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232064AbjDXRYZ (ORCPT + 99 others); Mon, 24 Apr 2023 13:24:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231796AbjDXRYX (ORCPT ); Mon, 24 Apr 2023 13:24:23 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CAF549D0; Mon, 24 Apr 2023 10:24:21 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33OHO9qJ035948; Mon, 24 Apr 2023 12:24:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1682357049; bh=vrYfILk+8/33VxPwT4F9AJ+MJUhKGzAtHjT8mjTXeVI=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=EFQszo9FX4kRocpff6xDv1JNaWG5a0sqwpm3E5QbbeSsnLFrseya4YLGreXZ80Klg Gd4W0yqr9SnDIEn4kbog9j3AdvJwL7/SHGbLEh4gK2hFr+OgIlK6MBsWeckvCqcgx7 akaMTpvV0CIqjE3teN/3ieJpwsLcv41uuzdZ8LJs= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33OHO9kU016920 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 24 Apr 2023 12:24:09 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 24 Apr 2023 12:24:09 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Mon, 24 Apr 2023 12:24:09 -0500 Received: from [10.250.35.77] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33OHO8sk027965; Mon, 24 Apr 2023 12:24:08 -0500 Message-ID: <76da0b98-3274-b047-db11-ecabc117ae11@ti.com> Date: Mon, 24 Apr 2023 12:24:08 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 3/7] arm64: dts: ti: k3-am65: Switch to "ti,j721e-system-controller" compatible Content-Language: en-US To: Nishanth Menon , Krzysztof Kozlowski , Rob Herring , Vignesh Raghavendra CC: , , , Tero Kristo , Jan Kiszka References: <20230424144949.244135-1-nm@ti.com> <20230424144949.244135-4-nm@ti.com> From: Andrew Davis In-Reply-To: <20230424144949.244135-4-nm@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,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 On 4/24/23 9:49 AM, Nishanth Menon wrote: > Switch scm-conf to "ti,j721e-system-controller" compatible to be more > specific. > > Signed-off-by: Nishanth Menon > --- > arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +- > arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > index 227573773b26..40fa631f2f3d 100644 > --- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi > @@ -475,7 +475,7 @@ sdhci1: mmc@4fa0000 { > }; > > scm_conf: scm-conf@100000 { > - compatible = "syscon", "simple-mfd"; > + compatible = "ti,j721e-system-controller", "syscon", "simple-mfd"; > reg = <0 0x00100000 0 0x1c000>; > #address-cells = <1>; > #size-cells = <1>; > diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi > index 5dfa31840e9c..566dc584d3f3 100644 > --- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi > @@ -7,7 +7,7 @@ > > &cbass_mcu { > mcu_conf: scm-conf@40f00000 { > - compatible = "syscon", "simple-mfd"; > + compatible = "ti,j721e-system-controller", "syscon", "simple-mfd"; This node is not a "j721e-system-controller". Only the one in main could be said to be one, but even it is different enough that this is not correct IMHO. It almost seems like you are using "ti,j721e-system-controller" as a workaround for the restriction on raw "syscon", "simple-mfd" nodes. And just replacing all instance of those with something that avoids the warning. What we should do here is turn both of these nodes into "simple-bus". The sub-nodes themselves would describe what they are. This is the normal DT way vs having all our device nodes pointing into one big "syscon" node with various offsets (which makes it hard to see all users of a node and near impossible to work out the real memory map in these "system-controller" nodes). Worse, if the parent is a "syscon" then the whole memory region gets one big regmap over it, and any child nodes that also build a regmap for their smaller sub-range leads to having two regmaps pointing to the same memory area. This breaks some assumptions around atomic access and reg caching. Taking a quick look I see some of our sub-node drivers expecting the parent to always be a syscon, others turn themselves into a syscon, and others still do the normal "reg" mapping. What a mess.. To unwind this I'd suggest we do this: * Add support for these sub-node drivers to use the normal "reg" property by default if available, falling back to expecting the parent to be a syscon only for backwards compatibility. * Add "reg" properties to the sub-nodes. * Remove "syscon" from our system-controller nodes and instead use "simple-bus". Which more accurately describes what these regions are, and prevents issues like having a regmap over gaps (as these system-controller have gaps in between the sub device memory regions) We would still have to add simple compatibles for the efuse and pcie mode/id regions, but that is much more correct than hiding them in the device's node like done in patch 1/7 of this series. Andrew > reg = <0x0 0x40f00000 0x0 0x20000>; > #address-cells = <1>; > #size-cells = <1>;