From patchwork Thu Jan 18 15:35:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dasnavis Sabiya X-Patchwork-Id: 13522977 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1C0EC4707B for ; Thu, 18 Jan 2024 15:36:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7CxWC2hx7vZvYsv+bmgSJz5IZa7yFm+kS+oex5NYQ+k=; b=imFjOKq7pUcSYy QMwBG63Tcerc7yOSDo0kbkF0pFK6uoq2hW0VXexcdhvVWv0gsw7G6Q6AVzwqTItpcKnBynP4XjFjK sTzpm+1udxhobs0MQu/AqMNupylD6rUyl3CITlADD9i68mtBRoYoQvwiSvrHlpRHyk+ESQk/KT7Gr e0DVKDt+PoIOybVx6zyrV/MIzzQ/cmVAD/xSigj5IwDyk8n9CvBi1AG33sYlBWzH411S72j5pzq3d q+vHb5J6eMlapP4yKsGmKxZv8uPJuqYBeu6LhWYuzCf8mEWi9CXyL8pAK1w21XzpRMSiEIBfJUOOH bXzQmuMuEjQbq1pREO1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQURH-0037oo-1m; Thu, 18 Jan 2024 15:36:19 +0000 Received: from egress-ip43a.ess.de.barracuda.com ([18.185.115.202]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQUR4-0037kp-2h for linux-arm-kernel@lists.infradead.org; Thu, 18 Jan 2024 15:36:12 +0000 Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx-outbound40-32.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 18 Jan 2024 15:36:02 +0000 Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-1d4b8ad631dso73711575ad.0 for ; Thu, 18 Jan 2024 07:36:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mistralsolutions.com; s=google; t=1705592161; x=1706196961; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qsidD247MlOveZe6z0oTPZMJTm+NPsyrRqiMMm2tdIU=; b=idGNE9aG0aTi0rGtBNIwCQxeNTTDqvbHTj3Kv6caDnNmO8TkRy7xnIvl414ekSgoNv gROidgvcjDYb+xGlQS1EXpFkuAtIfEx5YtaEcCztWpusJ/dxckEr5M4zfm2PSWUER3NP TSyyLptOlSjRy3VxFJsepzp1Cs4fj9Yn4kwac= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705592161; x=1706196961; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qsidD247MlOveZe6z0oTPZMJTm+NPsyrRqiMMm2tdIU=; b=rVg2Hr2NacHF7ALlbnJoPzlq+HY1HopDeqZ8oVIQQidwkEKEZ2lLTI0g0v23qekuWZ 6bWLptpSj6XvzEPvDvJt8ig/HrO9aJyeaKGdlZfm34+ucQQIgPWU/REge+H452Sybyvs Tsa8x9ohYCwPAnqAvIuKnJz5uf4QvSPAls6usgLf5e4lOBoFWLYqvxh1+HvcrbWDZ+s4 J7wwJlwVi3Z29xapjM8rq9XXWqA/tn09ICirURCp9uwLrB7CUk+TesC4bQ+yy9XtLPQI yiYomM5Ynh80IzeTXeD+mznhO3nse4h/f/eby4o5HtI7n8w3BSB6dF2a38bcEK0BDpuY S7GA== X-Gm-Message-State: AOJu0Yw8RROYCtaE2B2EKwGsuQYNWp9mBmGK/Qh+qUGKVP9v7XaiYARp IQQch6BwHqR8Ts/RmejqNeeGn6fkFXY5gPFs05I0Chxve+xXEdnB3de8MZGZO7X+OQ5vVF593Ly l67nrGGTW/UqaNFq/7fb/xhgu49qv7RuDTIKG6GRL1wI+WRbtKkqwNedTvCYzUBNsnEh2YXeh0P Y98oRALtBbj+gPtnnwmngDirsnyx8c4os= X-Received: by 2002:a17:902:8c8a:b0:1d6:f1cb:7a95 with SMTP id t10-20020a1709028c8a00b001d6f1cb7a95mr996804plo.57.1705592161032; Thu, 18 Jan 2024 07:36:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1N6+Ujn+w8UVBkZ1EV2KSVM8fQeMcOeMJJDl5KrOUVoSdclCmcI0wvbfECLkpcqTISVUZdQ== X-Received: by 2002:a17:902:8c8a:b0:1d6:f1cb:7a95 with SMTP id t10-20020a1709028c8a00b001d6f1cb7a95mr996792plo.57.1705592160742; Thu, 18 Jan 2024 07:36:00 -0800 (PST) Received: from LAP559U.mistral.in ([106.51.69.35]) by smtp.gmail.com with ESMTPSA id kf13-20020a17090305cd00b001d0ca40158dsm1535207plb.280.2024.01.18.07.35.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 07:36:00 -0800 (PST) From: sabiya.d@mistralsolutions.com X-Google-Original-From: sabiya.d@ti.com To: nm@ti.com, vigneshr@ti.com, kristo@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, u-kumar1@ti.com, sabiya.d@mistralsolutions.com, Dasnavis Sabiya Subject: [PATCH 2/2] arm64: dts: ti: k3-am69-sk: Add support for OSPI flash Date: Thu, 18 Jan 2024 21:05:24 +0530 Message-Id: <20240118153524.4135901-3-sabiya.d@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240118153524.4135901-1-sabiya.d@ti.com> References: <20240118153524.4135901-1-sabiya.d@ti.com> MIME-Version: 1.0 X-BESS-ID: 1705592161-310272-12405-6103-1 X-BESS-VER: 2019.1_20240103.1634 X-BESS-Apparent-Source-IP: 209.85.214.199 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUirNy1bSUcovVrIysjQ2BrIygIIphskWlmmJ5o mmlqmJFqkWqUZGiYlJ5gbm5ilpFqmWlkq1sQAb1Lx9QQAAAA== X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.253601 [from cloudscan16-202.eu-central-1b.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_SC0_MISMATCH_TO META: Envelope rcpt doesn't match header 0.00 BSF_BESS_OUTBOUND META: BESS Outbound 0.00 NO_REAL_NAME HEADER: From: does not include a real name X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS91090 scores of KILL_LEVEL=7.0 tests=BSF_SC0_MISMATCH_TO, BSF_BESS_OUTBOUND, NO_REAL_NAME X-BESS-BRTS-Status: 1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240118_073607_017800_1C2CAE47 X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Dasnavis Sabiya AM69 SK has S28HS512T OSPI flash connected to MCU OSPI0. Enable support for the same. Also describe the partition information according to the offsets in the bootloader. Signed-off-by: Dasnavis Sabiya --- arch/arm64/boot/dts/ti/k3-am69-sk.dts | 81 +++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am69-sk.dts b/arch/arm64/boot/dts/ti/k3-am69-sk.dts index feb571a5a0f5..f368105942eb 100644 --- a/arch/arm64/boot/dts/ti/k3-am69-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am69-sk.dts @@ -474,6 +474,25 @@ J784S4_IOPAD(0x09C, PIN_OUTPUT, 0) /* (AF35) MCAN7_TX */ }; }; +&wkup_pmx0 { + bootph-all; + mcu_fss0_ospi0_pins_default: mcu-fss0-ospi0-default-pins { + 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 */ + >; + }; +}; + &wkup_pmx2 { bootph-all; pmic_irq_pins_default: pmic-irq-default-pins { @@ -1073,3 +1092,65 @@ &main_mcan7 { pinctrl-0 = <&main_mcan7_pins_default>; phys = <&transceiver4>; }; + +&ospi0 { + bootph-all; + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&mcu_fss0_ospi0_pins_default>; + + flash@0 { + bootph-all; + 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>; + }; + }; + }; +};