From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 788A1C76195 for ; Mon, 27 Mar 2023 09:00:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232787AbjC0I77 (ORCPT ); Mon, 27 Mar 2023 04:59:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233139AbjC0I7Z (ORCPT ); Mon, 27 Mar 2023 04:59:25 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9DD75B9B; Mon, 27 Mar 2023 01:57:23 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 32R8v7Yp071080; Mon, 27 Mar 2023 03:57:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1679907427; bh=gpvh8embFevY7Yb9xj0+drMw50vCPv+1YQ2lGEkaDdw=; h=Date:Subject:To:References:From:In-Reply-To; b=vIrEsa8dXHwUexJ4UrGDCHHqRwc6Q7ucISDLZ348H8xWLDDnWTa0ldJwANDho8DY6 yeFFNjjl8SoEYbvjDDOBraHr9/T7l/fLUZNxlnl/nXJHatUPuWPtkFBaUbnqD+SAyI dB5cbX6HimrFXeknMplrhG0pl2i1oXLQrl+zrFRo= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 32R8v7lu124627 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 27 Mar 2023 03:57:07 -0500 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Mon, 27 Mar 2023 03:57:07 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE109.ent.ti.com (10.64.6.30) 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, 27 Mar 2023 03:57:07 -0500 Received: from [172.24.218.103] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 32R8v1Gk123170; Mon, 27 Mar 2023 03:57:03 -0500 Message-ID: <7aff4422-d82e-846a-7d84-a841acd00111@ti.com> Date: Mon, 27 Mar 2023 14:27:01 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] arm64: dts: ti: k3-j784s4-evm: Add OSPI0 flash support Content-Language: en-US To: Apurva Nandan , Nishanth Menon , Tero Kristo , Rob Herring , Krzysztof Kozlowski , , , References: <20230327082924.12427-1-a-nandan@ti.com> From: "Raghavendra, Vignesh" In-Reply-To: <20230327082924.12427-1-a-nandan@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/27/2023 1:59 PM, Apurva Nandan wrote: > Add support for OSPI flash connected to OSPI0 instance through FSS. > Also enumerate OSPI1 instance in MCU DTSI. > > Signed-off-by: Apurva Nandan > --- > arch/arm64/boot/dts/ti/k3-j784s4-evm.dts | 44 +++++++++++++++++++ > .../boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi | 43 ++++++++++++++++++ > 2 files changed, 87 insertions(+) > > diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts > index 8cd4a7ecc121..7480f37e89e8 100644 > --- a/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts > +++ b/arch/arm64/boot/dts/ti/k3-j784s4-evm.dts > @@ -138,6 +138,24 @@ vdd_sd_dv_pins_default: vdd-sd-dv-pins-default { > J784S4_IOPAD(0x020, PIN_INPUT, 7) /* (AJ35) MCAN15_RX.GPIO0_8 */ > >; > }; > + > + mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-pins-default { > + pinctrl-single,pins = < > + J784S4_WKUP_IOPAD(0x000, PIN_OUTPUT, 0) /* (E32) MCU_OSPI0_CLK */ > + J784S4_WKUP_IOPAD(0x02c, PIN_OUTPUT, 0) /* (A32) MCU_OSPI0_CSn0 */ > + J784S4_WKUP_IOPAD(0x00c, PIN_INPUT, 0) /* (B33) MCU_OSPI0_D0 */ > + J784S4_WKUP_IOPAD(0x010, PIN_INPUT, 0) /* (B32) MCU_OSPI0_D1 */ > + J784S4_WKUP_IOPAD(0x014, PIN_INPUT, 0) /* (C33) MCU_OSPI0_D2 */ > + J784S4_WKUP_IOPAD(0x018, PIN_INPUT, 0) /* (C35) MCU_OSPI0_D3 */ > + J784S4_WKUP_IOPAD(0x01c, PIN_INPUT, 0) /* (D33) MCU_OSPI0_D4 */ > + J784S4_WKUP_IOPAD(0x020, PIN_INPUT, 0) /* (D34) MCU_OSPI0_D5 */ > + J784S4_WKUP_IOPAD(0x024, PIN_INPUT, 0) /* (E34) MCU_OSPI0_D6 */ > + J784S4_WKUP_IOPAD(0x028, PIN_INPUT, 0) /* (E33) MCU_OSPI0_D7 */ > + J784S4_WKUP_IOPAD(0x008, PIN_INPUT, 0) /* (C34) MCU_OSPI0_DQS */ > + J784S4_WKUP_IOPAD(0x03c, PIN_OUTPUT, 6) /* (C32) MCU_OSPI0_CSn3.MCU_OSPI0_ECC_FAIL */ > + J784S4_WKUP_IOPAD(0x038, PIN_OUTPUT, 6) /* (B34) MCU_OSPI0_CSn2.MCU_OSPI0_RESET_OUT0 */ > + >; > + }; > }; > > &main_uart8 { > @@ -146,6 +164,32 @@ &main_uart8 { > pinctrl-0 = <&main_uart8_pins_default>; > }; > > +&fss { > + status = "okay"; > +}; > + > +&ospi0 { > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&mcu_fss0_ospi0_pins_default>; > + > + flash@0 { > + compatible = "jedec,spi-nor"; > + reg = <0x0>; > + spi-tx-bus-width = <8>; > + spi-rx-bus-width = <8>; > + spi-max-frequency = <25000000>; > + cdns,tshsl-ns = <60>; > + cdns,tsd2d-ns = <60>; > + cdns,tchsh-ns = <60>; > + cdns,tslch-ns = <60>; > + cdns,read-delay = <4>; > + cdns,phy-mode; Need binding doc > + #address-cells = <1>; > + #size-cells = <1>; > + }; > +}; > + > &main_i2c0 { > status = "okay"; > pinctrl-names = "default"; > diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi > index 93952af618f6..b29b95a532f6 100644 > --- a/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-j784s4-mcu-wakeup.dtsi > @@ -308,4 +308,47 @@ cpts@3d000 { > ti,cpts-periodic-outputs = <2>; > }; > }; > + > + fss: syscon@47000000 { > + compatible = "syscon", "simple-mfd"; NACK. Please run make dtbs_check and fix all the issues.. See whats being done for J721s2 [0] for example [0] https://lore.kernel.org/linux-arm-kernel/20230309082940.31535-1-r-gunasekaran@ti.com/ > + reg = <0x00 0x47000000 0x00 0x100>; > + #address-cells = <2>; > + #size-cells = <2>; > + ranges; > + status = "disabled"; Lets keep the FSS enabled as there is not board dependency and disable individual SPI controllers > + > + ospi0: spi@47040000 { > + compatible = "ti,am654-ospi", "cdns,qspi-nor"; > + reg = <0x00 0x47040000 0x00 0x100>, > + <0x5 0x0000000 0x1 0x0000000>; <0x05 0x0000000 0x01 0x0000000>; > + interrupts = ; > + cdns,fifo-depth = <256>; > + cdns,fifo-width = <4>; > + cdns,trigger-address = <0x0>; > + clocks = <&k3_clks 161 7>; > + assigned-clocks = <&k3_clks 161 7>; > + assigned-clock-parents = <&k3_clks 161 9>; > + assigned-clock-rates = <166666666>; > + power-domains = <&k3_pds 161 TI_SCI_PD_EXCLUSIVE>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + > + ospi1: spi@47050000 { > + compatible = "ti,am654-ospi", "cdns,qspi-nor"; > + reg = <0x00 0x47050000 0x00 0x100>, > + <0x7 0x0000000 0x1 0x0000000>; <0x07 0x0000000 0x01 0x0000000>; > + interrupts = ; > + cdns,fifo-depth = <256>; > + cdns,fifo-width = <4>; > + cdns,trigger-address = <0x0>; > + clocks = <&k3_clks 162 7>; > + power-domains = <&k3_pds 162 TI_SCI_PD_EXCLUSIVE>; > + #address-cells = <1>; > + #size-cells = <0>; > + status = "disabled"; > + }; > + }; > + > }; Regards Vignesh