Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5884644rwb; Tue, 22 Nov 2022 06:13:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4H98azoMgI7QH4asqflqq1dwxnaQQR2RPwy3S1bb1Lx/fXofD7ObL0LbrjJkgLp/rFCEmj X-Received: by 2002:a17:906:4b18:b0:7a1:b573:c99e with SMTP id y24-20020a1709064b1800b007a1b573c99emr3866620eju.55.1669126424152; Tue, 22 Nov 2022 06:13:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669126424; cv=none; d=google.com; s=arc-20160816; b=LQgX9RfAKvCCbDvFQeb1pcl4DA6ESECFSmv44tiK17q05UnaCNgFs/LVZ75GDaRBPY B5eJw+mfKIRPYN6m1f7xiEutIH/5C929dqVhzuWYGzGUTp8VLGov2AneQAN6GTEoOijh 3Sef9XBoGkoqWRM5vijuXG4zvAUkgM0VRFug5DcTtx3F1LDId5nQZOr3yGbomqw888zA LHY1eZ1tP83R079EyAvPrPuXvT7glQr9RsaHgayk/mfrtkrs5Nn1zuBbcACRq6U8BYVG i0z8yJuzzWkkEhP8pCR/U1Ff6JrGat7/Ui8RoQJBJmxR5Go9wtFmm0wEfdGs6idyJkpw lYgg== 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=a6KIhoL/FHnn9qdoY7rmWPJhql70rszn2U4cEmRZrEg=; b=q7Qy0xf9iwUfQnFcDL21lSVhgtkTq5EHENAc77gIU7djAFPusp7I9Zu9gPDHAdOBph tKjshXaxlUCM0JYqUb9LkkNzAQomiwmudVbcLSfB8NjRYaDwUqvuaiFwfWCsrGWQNDOv EiloYPQX3894MO6WPLmctGxnEo8iLIjcM/Z33w3DxjOQLhzG3J1i0NZ7nG4ZZXYKWrsh emyfIB52ayOG9UZxqmYG8LE2lRo5r09HOuE5kmUka46SpLbxM9DD5l4sICWLiRrobHWC wqM/pQ07XbZoSBtodYIh1XVXaOJGJJEjkG7U3/BVjod9+eArogw0N6mzvb65h5ejl4lz nsQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=lv2Zu3g5; 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 l18-20020a170906795200b007aed5ffeffbsi12847992ejo.78.2022.11.22.06.12.57; Tue, 22 Nov 2022 06:13:44 -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=@ti.com header.s=ti-com-17Q1 header.b=lv2Zu3g5; 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 S234001AbiKVOFY (ORCPT + 90 others); Tue, 22 Nov 2022 09:05:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233990AbiKVOFJ (ORCPT ); Tue, 22 Nov 2022 09:05:09 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 223C167F61; Tue, 22 Nov 2022 06:04:24 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AME4BaY029913; Tue, 22 Nov 2022 08:04:11 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1669125851; bh=a6KIhoL/FHnn9qdoY7rmWPJhql70rszn2U4cEmRZrEg=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=lv2Zu3g5unm5HBcHPo4N2mtkZO3YrTzmO893TawHeORq15HMozn07PQjrBGPiolrr IbxsF+od/I6tsOC+Jv+En9cLl6PPabCLTlW0DwUkvXhzxwigE4qKOtlAJeF+JCmg2A vdZ4f3W2tPcqcdFG70202u/Ui82bpP/ROoYc9gXs= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AME4BRJ006878 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Nov 2022 08:04:11 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Tue, 22 Nov 2022 08:04:10 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE108.ent.ti.com (10.64.6.29) 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; Tue, 22 Nov 2022 08:04:10 -0600 Received: from [10.24.69.141] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2AME46uM128116; Tue, 22 Nov 2022 08:04:07 -0600 Message-ID: Date: Tue, 22 Nov 2022 19:34:06 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v7 6/8] arm64: dts: ti: k3-j721s2: Add support for OSPI Flashes Content-Language: en-US To: Matt Ranostay , , , , , , , , CC: , , , Vaishnav Achath References: <20221122101616.770050-1-mranostay@ti.com> <20221122101616.770050-7-mranostay@ti.com> From: Vaishnav Achath In-Reply-To: <20221122101616.770050-7-mranostay@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 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_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 22/11/22 15:46, Matt Ranostay wrote: > From: Aswath Govindraju > > J721S2 has an OSPI NOR flash on its SOM connected the OSPI0 instance and a > QSPI NOR flash on the common processor board connected to the OSPI1 > instance. Add support for the same > > Signed-off-by: Aswath Govindraju > Signed-off-by: Matt Ranostay > --- > .../dts/ti/k3-j721s2-common-proc-board.dts | 34 +++++++++++++++ > arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi | 42 +++++++++++++++++++ > 2 files changed, 76 insertions(+) > > diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts > index c787d46f89de..0503e690cfaf 100644 > --- a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts > +++ b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts > @@ -206,6 +206,20 @@ mcu_mcan1_gpio_pins_default: mcu-mcan1-gpio-pins-default { > J721S2_WKUP_IOPAD(0x0c8, PIN_INPUT, 7) /* (C28) WKUP_GPIO0_2 */ > >; > }; > + > + mcu_fss0_ospi1_pins_default: mcu-fss0-ospi1-pins-default { > + pinctrl-single,pins = < > + J721S2_WKUP_IOPAD(0x040, PIN_OUTPUT, 0) /* (A19) MCU_OSPI1_CLK */ > + J721S2_WKUP_IOPAD(0x05c, PIN_OUTPUT, 0) /* (D20) MCU_OSPI1_CSn0 */ > + J721S2_WKUP_IOPAD(0x060, PIN_OUTPUT, 0) /* (C21) MCU_OSPI1_CSn1 */ > + J721S2_WKUP_IOPAD(0x04c, PIN_INPUT, 0) /* (D21) MCU_OSPI1_D0 */ > + J721S2_WKUP_IOPAD(0x050, PIN_INPUT, 0) /* (G20) MCU_OSPI1_D1 */ > + J721S2_WKUP_IOPAD(0x054, PIN_INPUT, 0) /* (C20) MCU_OSPI1_D2 */ > + J721S2_WKUP_IOPAD(0x058, PIN_INPUT, 0) /* (A20) MCU_OSPI1_D3 */ > + J721S2_WKUP_IOPAD(0x048, PIN_INPUT, 0) /* (B19) MCU_OSPI1_DQS */ > + J721S2_WKUP_IOPAD(0x044, PIN_INPUT, 0) /* (B20) MCU_OSPI1_LBCLKO */ > + >; > + }; > }; > > &main_gpio2 { > @@ -340,6 +354,26 @@ &usb0 { > maximum-speed = "high-speed"; > }; > > +&ospi1 { > + pinctrl-names = "default"; > + pinctrl-0 = <&mcu_fss0_ospi1_pins_default>; > + > + flash@0{ > + compatible = "jedec,spi-nor"; > + reg = <0x0>; > + spi-tx-bus-width = <1>; > + spi-rx-bus-width = <4>; > + spi-max-frequency = <40000000>; > + cdns,tshsl-ns = <60>; > + cdns,tsd2d-ns = <60>; > + cdns,tchsh-ns = <60>; > + cdns,tslch-ns = <60>; > + cdns,read-delay = <2>; > + #address-cells = <1>; > + #size-cells = <1>; > + }; > +}; > + > &mcu_mcan0 { > status = "okay"; > pinctrl-names = "default"; > diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi > index 6930efff8a5a..2ffea00e19d7 100644 > --- a/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi > +++ b/arch/arm64/boot/dts/ti/k3-j721s2-som-p0.dtsi > @@ -39,6 +39,28 @@ transceiver0: can-phy0 { > }; > }; > > +&wkup_pmx0 { > + mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-pins-default { > + pinctrl-single,pins = < > + J721S2_WKUP_IOPAD(0x000, PIN_OUTPUT, 0) /* (D19) MCU_OSPI0_CLK */ > + J721S2_WKUP_IOPAD(0x02c, PIN_OUTPUT, 0) /* (F15) MCU_OSPI0_CSn0 */ > + J721S2_WKUP_IOPAD(0x030, PIN_OUTPUT, 0) /* (G17) MCU_OSPI0_CSn1 */ > + J721S2_WKUP_IOPAD(0x038, PIN_OUTPUT, 0) /* (F14) MCU_OSPI0_CSn2 */ > + J721S2_WKUP_IOPAD(0x03c, PIN_OUTPUT, 0) /* (F17) MCU_OSPI0_CSn3 */ > + J721S2_WKUP_IOPAD(0x00c, PIN_INPUT, 0) /* (C19) MCU_OSPI0_D0 */ > + J721S2_WKUP_IOPAD(0x010, PIN_INPUT, 0) /* (F16) MCU_OSPI0_D1 */ > + J721S2_WKUP_IOPAD(0x014, PIN_INPUT, 0) /* (G15) MCU_OSPI0_D2 */ > + J721S2_WKUP_IOPAD(0x018, PIN_INPUT, 0) /* (F18) MCU_OSPI0_D3 */ > + J721S2_WKUP_IOPAD(0x01c, PIN_INPUT, 0) /* (E19) MCU_OSPI0_D4 */ > + J721S2_WKUP_IOPAD(0x020, PIN_INPUT, 0) /* (G19) MCU_OSPI0_D5 */ > + J721S2_WKUP_IOPAD(0x024, PIN_INPUT, 0) /* (F19) MCU_OSPI0_D6 */ > + J721S2_WKUP_IOPAD(0x028, PIN_INPUT, 0) /* (F20) MCU_OSPI0_D7 */ > + J721S2_WKUP_IOPAD(0x008, PIN_INPUT, 0) /* (E18) MCU_OSPI0_DQS */ > + J721S2_WKUP_IOPAD(0x004, PIN_INPUT, 0) /* (E20) MCU_OSPI0_LBCLKO */ > + >; > + }; > +}; > + > &main_pmx0 { > main_i2c0_pins_default: main-i2c0-pins-default { > pinctrl-single,pins = < > @@ -79,3 +101,23 @@ &main_mcan16 { > pinctrl-names = "default"; > phys = <&transceiver0>; > }; > + > +&ospi0 { > + 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>; > + #address-cells = <1>; > + #size-cells = <1>; > + }; Reviewed-by: Vaishnav Achath > +}; -- Regards, Vaishnav