From patchwork Tue Feb 6 09:23:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinthu Raja X-Patchwork-Id: 197283 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1419290dyb; Tue, 6 Feb 2024 01:25:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IHyteLczWyx4qDkWTHP1hlpDVWqTTVUVajj58hOkE94laQFweKD2ueixKVGiyZ3QC7Zajc9 X-Received: by 2002:a05:6870:a2c7:b0:210:bcb3:2733 with SMTP id w7-20020a056870a2c700b00210bcb32733mr2240444oak.3.1707211549671; Tue, 06 Feb 2024 01:25:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707211549; cv=pass; d=google.com; s=arc-20160816; b=gaozPzd6ygCTY95nHSzVfDgvyIlz/MOXBwS5Oqw/CEnoVfiMPWL2XZROkvNW42qyvD mszso54So7LSPghBg9CNL188svsPsEXFZYi3std0hb1z4Ua1pdVU2KH1PfXwYdWJ1A83 18nbFi4FSADiJmb/kJOPw8UQjCHHGuw1URJv8BcLPxbDvLcw5xN5BckOjGgTdEedCG4u NWsw/J0oZBYxMDmtCIO8Oh2ecgMAXGErRhpqVZcqX2ERc3t61LJgbsDMe+T+TXDxB/Ki BNeJ87wDAaxS4krctZll6/lzei68LPQXR7bPLPTx1zPaVr7uGjDJzGx6kb3XHGgO+Y3J z2aA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=eLR7NoGZT/8JoUn3Uf2bBEtjROgQUHEqybAlPKSbqdg=; fh=b+CXY1KzClb8+KiL5uC+XTOgbDyG2QL93zzBoID2mdo=; b=ni9cO+asS2nK54HMA+QsQe9iFBfQWdIACOCYhit7be3U58XLGWrAG55rdDdJ7gryWM MdpXCqJO9CiPapfJ01Ig8IQMD3aaWmTdEdwpuFQx5T8hDfxYLxa9LUMm3+fAk28D6yUe CB7mDteJ9KgY09bFSB+/L30UgteVkbL/zhisqKJpE4Mzfvishjj/fNoDfeWrf2VDVH48 Ctc+UMLhxS8Q35Mr17D5QI/v3aX2duAjCS2hvRKdTnhvcuFVF2QD2rPdNCqlQvox1B14 sbGt/xlJfsEn9usK5K651/OwaMDERdhAp7gOxjjygUzEVkdJ4dlG8ngYvKD5PpFrXPx1 rSDA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mistralsolutions.com header.s=google header.b=ZU44W1Mt; arc=pass (i=1 spf=pass spfdomain=mistralsolutions.com dkim=pass dkdomain=mistralsolutions.com dmarc=pass fromdomain=mistralsolutions.com); spf=pass (google.com: domain of linux-kernel+bounces-54581-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54581-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mistralsolutions.com X-Forwarded-Encrypted: i=1; AJvYcCUAQbq8UHfGjgsRnEtRk4sEULkhKQ+E8Vk+hWviVNA8Ff2D4ZSk93PQ5z5pd8NYR7/vcJZqOMoxXeYVQ/kCA9rdtYz4PQ== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id g5-20020a635645000000b005d8d34e1982si1338078pgm.236.2024.02.06.01.25.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 01:25:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54581-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mistralsolutions.com header.s=google header.b=ZU44W1Mt; arc=pass (i=1 spf=pass spfdomain=mistralsolutions.com dkim=pass dkdomain=mistralsolutions.com dmarc=pass fromdomain=mistralsolutions.com); spf=pass (google.com: domain of linux-kernel+bounces-54581-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54581-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mistralsolutions.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E7E0C28840E for ; Tue, 6 Feb 2024 09:24:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA15412D16A; Tue, 6 Feb 2024 09:23:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mistralsolutions.com header.i=@mistralsolutions.com header.b="ZU44W1Mt" Received: from egress-ip12a.ess.de.barracuda.com (egress-ip12a.ess.de.barracuda.com [18.184.203.235]) (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 633B812C81F for ; Tue, 6 Feb 2024 09:23:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=18.184.203.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211429; cv=none; b=e4+lECvZ+JCGqn/1/ujV59EzZ72U50lL0mJB/IdepGbLlcI6T/xOrpxSzBZSt9WJXmV/fL/k8ZOjibre1Y9dFcHPiPgvCWsD+vI0pvxARXS+Wsy7Qt7PxLl2ppB/l4cCZ2emd2LP2gQ854BO3GH4jnGZSu85KmXHsXP7CU17cII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707211429; c=relaxed/simple; bh=fNc/6Pc9VCl6HzTg3CC6Gpd9Gmf49+v9PFWelq2ov3o=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=eilOmV9M3ZXQblKypQ0guKAf5R+QEY9DS5aJrt9q2WJC+SPsYNEzUNc3T9CVLGd+VeyMuEZ4IIUoCqTqd/RD1PuLsdQJPmr3sM0eFLL1YmYchLJtlQ7eJmDtnocU73k7iwlLCnEMelPmEGh5WXXCvW0OY1xDgCOCVtl1FAKZNCU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mistralsolutions.com; spf=pass smtp.mailfrom=mistralsolutions.com; dkim=pass (1024-bit key) header.d=mistralsolutions.com header.i=@mistralsolutions.com header.b=ZU44W1Mt; arc=none smtp.client-ip=18.184.203.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mistralsolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mistralsolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by mx-outbound8-99.eu-central-1a.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 06 Feb 2024 09:23:44 +0000 Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-6e044d773dfso1491040b3a.1 for ; Tue, 06 Feb 2024 01:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mistralsolutions.com; s=google; t=1707211423; x=1707816223; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eLR7NoGZT/8JoUn3Uf2bBEtjROgQUHEqybAlPKSbqdg=; b=ZU44W1Mt+zyJxqZKk4YNoVqTSHeOexTnP4N1NVwCdEK9qfs4GMREaBACsPtNfm1uZl HTvByBthE7Fdwisu1ogiBkU9JpMHXKsll3VuEQSMDt3Bn/ppvh00nPhJGH3aiML26+J6 fL3Auijksv/pc5DB0c6YHauCe09zMrc/xaaCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707211423; x=1707816223; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eLR7NoGZT/8JoUn3Uf2bBEtjROgQUHEqybAlPKSbqdg=; b=cdxWIVcVcYvU7ZjgiM7CowDYle0ISpAv6w6zAfhJiuw/CCXVhBZHnn2on1gCEaSzRr byWwfq9/lBcEJR9zVRtsPNt70vCqjjEfOoezLQ5ZlkcuDVZPVwy6oMj7Px+yDp+u1ro5 WQp9aTEV28PfleFJ80KRFzgcRtlvQ0huywUd3kZou9ICCRCq2h3/sdUlNoa1l0NcuPzR 5mM+oIUHq1VOa5UxpHIPgHOE9l9luYg7S0vYVngUzqMFQnjJdWg7aOajaMRyIoFSe+xq 1CwRDR0HO8WgqLy0jVG5OQRKta1ccuVHZeKIfIwGZ2t9J9JLz7eTUW/xa59c3eslZTVw ywzg== X-Gm-Message-State: AOJu0YzxM1mAB98izOCe/bS59ESYeMdsitsk+Jja0Y7wFDg+Jfj7ch+v IaHNl8P1C+HBgXiUiVwPO3MxzPYiU6TscV/R8YGyOJWLBGwo6YuIdoGg8fGd1c8LDkhPWO3QMq0 R7/d7P6CJOtJ/1i4R6uJwjjhN7Fg5DBsxm1aU3Gq+vtwGBJ8tP8yDQQHUHfoiyqhKmABVasFYaP RxGlo2jYZN27LF1/XOmJnB X-Received: by 2002:a62:848f:0:b0:6db:af73:bd9a with SMTP id k137-20020a62848f000000b006dbaf73bd9amr1893466pfd.30.1707211423452; Tue, 06 Feb 2024 01:23:43 -0800 (PST) X-Received: by 2002:a62:848f:0:b0:6db:af73:bd9a with SMTP id k137-20020a62848f000000b006dbaf73bd9amr1893457pfd.30.1707211423126; Tue, 06 Feb 2024 01:23:43 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVV3qv16AOmIuv8F63Xrt+qOqHB1NfMJVkhmtqINylET7rEXFiGG6MMhF8oNStus33yzsttnb/T1TvE6qHWM0rQ3Co+dYbKU4dBHv1XcBSJyZC8v7FYxJoU4zcXpBhzMeeoavZ8RnDwwTZf5F+I3u542zohU/wQ/nOW2V9I87QeiWPDVe84tIP0+X6AQSSmSkyBgKJfVn8ve1dt7BnbfFpN Received: from LAP568U.mistral.in ([106.51.69.35]) by smtp.gmail.com with ESMTPSA id w20-20020aa78594000000b006e02da39dbcsm1418493pfn.10.2024.02.06.01.23.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 01:23:42 -0800 (PST) From: Sinthu Raja X-Google-Original-From: Sinthu Raja To: Nishanth Menon , Tero Kristo , Vignesh Raghavendra Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sinthu Raja Subject: [PATCH] arm64: dts: ti: k3-am68-sk-som: Add support for OSPI flash Date: Tue, 6 Feb 2024 14:53:34 +0530 Message-Id: <20240206092334.30307-1-sinthu.raja@ti.com> X-Mailer: git-send-email 2.36.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-BESS-ID: 1707211423-302147-12420-747-1 X-BESS-VER: 2019.1_20240206.0113 X-BESS-Apparent-Source-IP: 209.85.210.198 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUirNy1bSUcovVrIyNjA2AbIygIKpSckWaclJho ZGxmZJxoZmiZYmhsnmiYkpBqlJFmlmRkq1sQBce/OXQQAAAA== X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.254018 [from cloudscan9-28.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.00 BSF_SC0_MISMATCH_TO META: Envelope rcpt doesn't match header X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS91090 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND, BSF_SC0_MISMATCH_TO X-BESS-BRTS-Status: 1 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790141057855096361 X-GMAIL-MSGID: 1790141057855096361 From: Sinthu Raja AM68 SK has an OSPI NOR flash on its SOM connected to OSPI0 instance. Enable support for the same. Also, describe the OSPI flash partition information through the device tree, according to the offsets in the bootloader. Signed-off-by: Sinthu Raja --- arch/arm64/boot/dts/ti/k3-am68-sk-som.dtsi | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am68-sk-som.dtsi b/arch/arm64/boot/dts/ti/k3-am68-sk-som.dtsi index 20861a0a46b0..84011d5e1b3b 100644 --- a/arch/arm64/boot/dts/ti/k3-am68-sk-som.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am68-sk-som.dtsi @@ -130,6 +130,25 @@ rtos_ipc_memory_region: ipc-memories@a8000000 { }; }; +&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(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 */ + >; + }; +}; + &wkup_pmx2 { wkup_i2c0_pins_default: wkup-i2c0-default-pins { pinctrl-single,pins = < @@ -152,6 +171,66 @@ eeprom@51 { }; }; +&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>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "ospi.tiboot3"; + reg = <0x0 0x80000>; + }; + + partition@80000 { + label = "ospi.tispl"; + reg = <0x80000 0x200000>; + }; + + partition@280000 { + label = "ospi.u-boot"; + reg = <0x280000 0x400000>; + }; + + partition@680000 { + label = "ospi.env"; + reg = <0x680000 0x40000>; + }; + + partition@6c0000 { + label = "ospi.env.backup"; + reg = <0x6c0000 0x40000>; + }; + + partition@800000 { + label = "ospi.rootfs"; + reg = <0x800000 0x37c0000>; + }; + + partition@3fc0000 { + label = "ospi.phypattern"; + reg = <0x3fc0000 0x40000>; + }; + }; + }; +}; + &mailbox0_cluster0 { status = "okay"; interrupts = <436>;