Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3191663rwb; Mon, 7 Aug 2023 09:30:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHAuKAVWUtl7rQM912UGWZcWTo0JTVS3t9ftaHsav6iW+KIkeWHr3vV30VHEYFuaBe8j7LE X-Received: by 2002:a05:6e02:df4:b0:349:501:129f with SMTP id m20-20020a056e020df400b003490501129fmr10201194ilj.2.1691425808697; Mon, 07 Aug 2023 09:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691425808; cv=none; d=google.com; s=arc-20160816; b=tdKl4u+ARc249qvsx9u136p6l9K1qB+V38SpHqQHr2u+/PclQeB4vtsxc8GapD6e+v 5hgfzKYDuQaIq4FC7Ii30LiM9Nqw46inotGMxHQFPG5D1RCyT9icjncTkaOcxiIdFFJT 7NJcOhIhkQWYcVco48pgYmkOvJNsV6rEUDjWpEe59ptcqR3DiU2k0yxasfCu06btbVSX zg40AS2LAqRpm+0qk6USaN6ubNytCC/lPzKktcBrpZ4TScgmclUY//gI1VnUHnDmVsmM D1pDDPz1GlnoTdCBKFWb7VJD+S3DagK0aCtwSQbMENqpjgtSudKuu7pIAAo5FfMBAYjn C0bA== 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=Dz24on+wEQPpYN6Xa5J23UHkSkIVtlonN1jK6mdXl1U=; fh=9t5JuBQ5L6xXDZouTwQVnGwrBHow6A1/l59owERY8BI=; b=lDtb2cPwxnWNDSsv37Qnq9ZnZ/kDxg2a/VUH0opr3tAqfj6acYBjgUVIJDVNmS9Spr lnN78wynubfDkiPt0x4Io2l7hKEtXl03AWGvbtVyTjawN42Ps5nsa19N0aA7juv4R5Z5 V0GHEgrcwUKI9XXOQ0iV0weH+KYbmj6Tv0NccJn+s71+jP0JCDI6mC6hraqENs25eZbm 288CQ3aos6aX8va9vDGOISaUvIya66AUlapwaO7oc1ox9COzWidXPjulFfx6qhuXOV9i Tq6pZNi1ke3UAgENLSPppsVDmQAv9mu5eoz6A6qRfPNfmtvraTrArHWItd6G2j04aK0H 5ZHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aZ6cH+kL; 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 d23-20020a17090a111700b00263220254e2si6018571pja.41.2023.08.07.09.29.55; Mon, 07 Aug 2023 09:30:08 -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=aZ6cH+kL; 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 S229614AbjHGPTF (ORCPT + 99 others); Mon, 7 Aug 2023 11:19:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjHGPTD (ORCPT ); Mon, 7 Aug 2023 11:19:03 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F06010F6; Mon, 7 Aug 2023 08:19:02 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 377FIqAV054763; Mon, 7 Aug 2023 10:18:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1691421532; bh=Dz24on+wEQPpYN6Xa5J23UHkSkIVtlonN1jK6mdXl1U=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=aZ6cH+kLLO3iUkG3h0WaNDlO+IXT8BHHOfYn1YyAt4ArzSKLNVxHumvOffUIhNFCL Ard5U9FwfM6l6qkinxzHo2ps67N8WBoHHIdsgVt29diwn99wJHFI+0a4PD5uzGoqUb HQW9N0zVgI+Sti46hYTavBv3JAQFIY0YKQpyTHHQ= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 377FIqoP110743 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 7 Aug 2023 10:18:52 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 7 Aug 2023 10:18:52 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 7 Aug 2023 10:18:52 -0500 Received: from [10.250.36.243] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 377FIp5v017993; Mon, 7 Aug 2023 10:18:51 -0500 Message-ID: <627ed411-a6f7-cbc9-d48f-2678bf63c609@ti.com> Date: Mon, 7 Aug 2023 10:18:51 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 04/13] arm64: dts: ti: k3-am65: Enable OSPI nodes at the board level Content-Language: en-US To: Dhruva Gole , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , CC: , References: <20230802205309.257392-1-afd@ti.com> <20230802205309.257392-5-afd@ti.com> From: Andrew Davis In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-6.2 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,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 8/7/23 1:16 AM, Dhruva Gole wrote: > Hi Andrew, > > On 03/08/23 02:23, Andrew Davis wrote: >> OSPI nodes defined in the top-level AM65x SoC dtsi files are incomplete >> and may not be functional unless they are extended with pinmux and >> device information. >> >> As the attached OSPI device is only known about at the board integration >> level, these nodes should only be enabled when provided with this >> information. >> >> Disable the OSPI nodes in the dtsi files and only enable the ones that >> are actually pinned out on a given board. >> >> Signed-off-by: Andrew Davis >> --- >>   arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 1 + >>   arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi            | 2 ++ >>   arch/arm64/boot/dts/ti/k3-am654-base-board.dts     | 1 + >>   3 files changed, 4 insertions(+) >> >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi >> index e26bd988e5224..6041862d5aa75 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi >> @@ -593,6 +593,7 @@ adc { >>   }; >>   &ospi0 { >> +    status = "okay"; > > Ok, so this k3-am65-iot2050 series of DT files seem to be structured in > a bit different manner than our SKs and EVMs? > > The terminologies like advanced, advanced-m2, basic, etc. are a little > confusing to me. However, I am wondering if we don't do any status = .. > here, and rather make ospi status okays from the iot2050 dts files? > > Pardon me if I am making an invalid suggestion, I don't have much > background on these boards. > This is a valid question, and yes the IOT2050 DTS organization is slightly different than the one we use with our SK/EVMs. The way these DT files tend to work is layering more functionality or information in each file, starting with the core/most common in the base .dtsi, and ending with .dts that is specific to a given board. (In that way I would consider instances of "/delete-node/" to be an indicator of bad layering, but that is a different topic..) Any node that is only partially defined in a layer should be marked disabled, and then only enabled in the layer that finally completes the node. That is often the pinmux info at the board level. In this case, the OSPI nodes are complete after this point, there is no additional information given in the DTS files, so we can enable it here in this .dtsi file. Andrew >>       pinctrl-names = "default"; >>       pinctrl-0 = <&mcu_fss0_ospi0_pins_default>; >> diff --git a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi >> index 7b1f94a89eca8..2c9c20a9d9179 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi >> +++ b/arch/arm64/boot/dts/ti/k3-am65-mcu.dtsi >> @@ -295,6 +295,7 @@ ospi0: spi@47040000 { >>               power-domains = <&k3_pds 248 TI_SCI_PD_EXCLUSIVE>; >>               #address-cells = <1>; >>               #size-cells = <0>; >> +            status = "disabled"; >>           }; >>           ospi1: spi@47050000 { >> @@ -309,6 +310,7 @@ ospi1: spi@47050000 { >>               power-domains = <&k3_pds 249 TI_SCI_PD_EXCLUSIVE>; >>               #address-cells = <1>; >>               #size-cells = <0>; >> +            status = "disabled"; >>           }; >>       }; >> diff --git a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts >> index 973a89b04a22f..43de7c132d343 100644 >> --- a/arch/arm64/boot/dts/ti/k3-am654-base-board.dts >> +++ b/arch/arm64/boot/dts/ti/k3-am654-base-board.dts >> @@ -530,6 +530,7 @@ &mcu_r5fss0_core1 { >>   }; >>   &ospi0 { >> +    status = "okay"; >>       pinctrl-names = "default"; >>       pinctrl-0 = <&mcu_fss0_ospi0_pins_default>; >