From nobody Fri Dec 19 18:49:04 2025 Received: from lelvem-ot01.ext.ti.com (lelvem-ot01.ext.ti.com [198.47.23.234]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6FCA2EA158; Wed, 13 Aug 2025 09:03:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755075811; cv=none; b=MgxvqlERl0JQ8r9f99DhEM3iWkSXUd8u/lrM9V1qvHQllfkAsmwt0Lt9927L60WDVTK7CVxJ5Gsz2XOMtbTM0mY1VU8QmLkmJrZg12iWAET9rTzRWAWhz3PkRvbQCPv4HLddAgnNJjLI8SN6eYEjW0ST+bCv5F/JD8aGB3TTc8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755075811; c=relaxed/simple; bh=/HJ5BV9Tl/wMzaYKd4FJI7MonKqXA4dhk5zT6cSspK8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=sIqOk9DFIQCEW8lZvVpQLajbR6WhMkneSBIRBw7K44E2kNAFiMZs0lmQTICBS4mObqvtIDtONUJDy4J3IZRixKxVi2K+tjEMOKL3nguHLLAJDMXh8qkdiqg8SiiXh9S7C0/mpNf2Rda1njWML3hEyXAU7tthDTPRdrYvqkS6EAM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=nKxN741v; arc=none smtp.client-ip=198.47.23.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="nKxN741v" Received: from lelvem-sh01.itg.ti.com ([10.180.77.71]) by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTP id 57D93Mtv1666077; Wed, 13 Aug 2025 04:03:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1755075802; bh=MGJVCy2K2rFeomeyTb+nJIJD2M0UrbgVKPDG9tdz29s=; h=From:To:CC:Subject:Date; b=nKxN741vvaYzCnk9q5FRLcT5n6SO8FBG+yx+iX0yQztvwbrXEn1WIeX9zzlHH31Rl wilCNcacibEC4eBQIejHlmwGmT53QPcDw/CpYQ/Dg68keC5arDFkp1P+ldjaPLa8dN 1nho6C1SDigELMni1ncu/sMXPItGA5i9djlNUGjU= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 57D93MfB4138200 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Wed, 13 Aug 2025 04:03:22 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Wed, 13 Aug 2025 04:03:22 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55 via Frontend Transport; Wed, 13 Aug 2025 04:03:22 -0500 Received: from localhost (ula0502350.dhcp.ti.com [172.24.233.249]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 57D93L3u2074113; Wed, 13 Aug 2025 04:03:21 -0500 From: Paresh Bhagat To: , , CC: , , , , , , , , , , , Subject: [PATCH] arm64: dts: ti: k3-am62d2-evm: Add support for OSPI flash Date: Wed, 13 Aug 2025 14:33:00 +0530 Message-ID: <20250813090300.733295-1-p-bhagat@ti.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" AM62D2 EVM has S28HS512T 64 MiB Octal SPI NOR flash connected to the OSPI interface. Add support for the flash and describe the partition information as per bootloader. Signed-off-by: Paresh Bhagat Reviewed-by: Santhosh Kumar K --- Boot logs https://gist.github.com/paresh-bhagat12/262d8c64e692d22c4e48363d246fb083 Tech Ref Manual-https://www.ti.com/lit/pdf/sprujd4 Schematics Link-https://www.ti.com/lit/zip/sprcal5 arch/arm64/boot/dts/ti/k3-am62d2-evm.dts | 86 ++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62d2-evm.dts b/arch/arm64/boot/dts= /ti/k3-am62d2-evm.dts index daea18b0bc61..aa943ef52fb5 100644 --- a/arch/arm64/boot/dts/ti/k3-am62d2-evm.dts +++ b/arch/arm64/boot/dts/ti/k3-am62d2-evm.dts @@ -25,6 +25,7 @@ aliases { rtc0 =3D &wkup_rtc0; ethernet0 =3D &cpsw_port1; ethernet1 =3D &cpsw_port2; + spi0 =3D &ospi0; }; =20 chosen { @@ -367,6 +368,26 @@ usr_led_pins_default: usr-led-default-pins { AM62DX_IOPAD(0x0244, PIN_INPUT, 7) /* (D18) MMC1_SDWP.GPIO1_49 */ >; }; + + ospi0_pins_default: ospi0-default-pins { + pinctrl-single,pins =3D < + AM62DX_IOPAD(0x0000, PIN_OUTPUT, 0) /* (L22) OSPI0_CLK */ + AM62DX_IOPAD(0x002c, PIN_OUTPUT, 0) /* (H21) OSPI0_CSn0 */ + AM62DX_IOPAD(0x0030, PIN_OUTPUT, 0) /* (G19) OSPI0_CSn1 */ + AM62DX_IOPAD(0x0034, PIN_OUTPUT, 0) /* (K20) OSPI0_CSn2 */ + AM62DX_IOPAD(0x0038, PIN_OUTPUT, 0) /* (G20) OSPI0_CSn3 */ + AM62DX_IOPAD(0x000c, PIN_INPUT, 0) /* (J21) OSPI0_D0 */ + AM62DX_IOPAD(0x0010, PIN_INPUT, 0) /* (J18) OSPI0_D1 */ + AM62DX_IOPAD(0x0014, PIN_INPUT, 0) /* (J19) OSPI0_D2 */ + AM62DX_IOPAD(0x0018, PIN_INPUT, 0) /* (H18) OSPI0_D3 */ + AM62DX_IOPAD(0x001c, PIN_INPUT, 0) /* (K21) OSPI0_D4 */ + AM62DX_IOPAD(0x0020, PIN_INPUT, 0) /* (H19) OSPI0_D5 */ + AM62DX_IOPAD(0x0024, PIN_INPUT, 0) /* (J20) OSPI0_D6 */ + AM62DX_IOPAD(0x0028, PIN_INPUT, 0) /* (J22) OSPI0_D7 */ + AM62DX_IOPAD(0x0008, PIN_INPUT, 0) /* (L21) OSPI0_DQS */ + >; + bootph-all; + }; }; =20 &mcu_gpio0 { @@ -613,3 +634,68 @@ &c7x_0 { &main_rti4 { status =3D "reserved"; }; + +&fss { + status =3D "okay"; +}; + +&ospi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&ospi0_pins_default>; + status =3D "okay"; + + flash@0{ + compatible =3D "jedec,spi-nor"; + reg =3D <0x0>; + spi-tx-bus-width =3D <8>; + spi-rx-bus-width =3D <8>; + spi-max-frequency =3D <25000000>; + cdns,tshsl-ns =3D <60>; + cdns,tsd2d-ns =3D <60>; + cdns,tchsh-ns =3D <60>; + cdns,tslch-ns =3D <60>; + cdns,read-delay =3D <4>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + label =3D "ospi.tiboot3"; + reg =3D <0x0 0x80000>; + }; + + partition@80000 { + label =3D "ospi.tispl"; + reg =3D <0x80000 0x200000>; + }; + + partition@280000 { + label =3D "ospi.u-boot"; + reg =3D <0x280000 0x400000>; + }; + + partition@680000 { + label =3D "ospi.env"; + reg =3D <0x680000 0x40000>; + }; + + partition@6c0000 { + label =3D "ospi.env.backup"; + reg =3D <0x6c0000 0x40000>; + }; + + partition@800000 { + label =3D "ospi.rootfs"; + reg =3D <0x800000 0x37c0000>; + }; + + partition@3fc0000 { + label =3D "ospi.phypattern"; + reg =3D <0x3fc0000 0x40000>; + bootph-all; + }; + }; + }; +}; --=20 2.34.1