xref: /freebsd/sys/contrib/device-tree/src/arm64/ti/k3-am62-lp-sk-nand.dtso (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0
2*0e8011faSEmmanuel Vadot/*
3*0e8011faSEmmanuel Vadot * Copyright (C) 2022-2024 Texas Instruments Incorporated - https://www.ti.com/
4*0e8011faSEmmanuel Vadot */
5*0e8011faSEmmanuel Vadot
6*0e8011faSEmmanuel Vadot/dts-v1/;
7*0e8011faSEmmanuel Vadot/plugin/;
8*0e8011faSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
9*0e8011faSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
10*0e8011faSEmmanuel Vadot#include "k3-pinctrl.h"
11*0e8011faSEmmanuel Vadot
12*0e8011faSEmmanuel Vadot&mcasp1 {
13*0e8011faSEmmanuel Vadot	status = "disabled";
14*0e8011faSEmmanuel Vadot};
15*0e8011faSEmmanuel Vadot
16*0e8011faSEmmanuel Vadot&main_pmx0 {
17*0e8011faSEmmanuel Vadot	gpmc0_pins_default: gpmc0-pins-default {
18*0e8011faSEmmanuel Vadot		pinctrl-single,pins = <
19*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x003c, PIN_INPUT, 0) /* (K19) GPMC0_AD0 */
20*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0040, PIN_INPUT, 0) /* (L19) GPMC0_AD1 */
21*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0044, PIN_INPUT, 0) /* (L20) GPMC0_AD2 */
22*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0048, PIN_INPUT, 0) /* (L21) GPMC0_AD3 */
23*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x004c, PIN_INPUT, 0) /* (M21) GPMC0_AD4 */
24*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0050, PIN_INPUT, 0) /* (L17) GPMC0_AD5 */
25*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0054, PIN_INPUT, 0) /* (L18) GPMC0_AD6 */
26*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0058, PIN_INPUT, 0) /* (M20) GPMC0_AD7 */
27*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0098, PIN_INPUT, 0) /* (P21) GPMC0_WAIT0 */
28*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x00a8, PIN_OUTPUT, 0) /* (J18) GPMC0_CSn0 */
29*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0084, PIN_OUTPUT, 0) /* (K20) GPMC0_ADVn_ALE */
30*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0088, PIN_OUTPUT, 0) /* (K21) GPMC0_OEn_REn */
31*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x008c, PIN_OUTPUT, 0) /* (J17) GPMC0_WEn */
32*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x0090, PIN_OUTPUT, 0) /* (K17) GPMC0_BE0n_CLE */
33*0e8011faSEmmanuel Vadot			AM62X_IOPAD(0x00a0, PIN_OUTPUT, 0) /* (J20) GPMC0_WPn */
34*0e8011faSEmmanuel Vadot		>;
35*0e8011faSEmmanuel Vadot	};
36*0e8011faSEmmanuel Vadot};
37*0e8011faSEmmanuel Vadot
38*0e8011faSEmmanuel Vadot&elm0 {
39*0e8011faSEmmanuel Vadot	status = "okay";
40*0e8011faSEmmanuel Vadot};
41*0e8011faSEmmanuel Vadot
42*0e8011faSEmmanuel Vadot&gpmc0 {
43*0e8011faSEmmanuel Vadot	status = "okay";
44*0e8011faSEmmanuel Vadot	pinctrl-names = "default";
45*0e8011faSEmmanuel Vadot	pinctrl-0 = <&gpmc0_pins_default>;
46*0e8011faSEmmanuel Vadot	#address-cells = <2>;
47*0e8011faSEmmanuel Vadot	#size-cells = <1>;
48*0e8011faSEmmanuel Vadot
49*0e8011faSEmmanuel Vadot	nand@0,0 {
50*0e8011faSEmmanuel Vadot		compatible = "ti,am64-nand";
51*0e8011faSEmmanuel Vadot		reg = <0 0 64>;		/* device IO registers */
52*0e8011faSEmmanuel Vadot		interrupt-parent = <&gpmc0>;
53*0e8011faSEmmanuel Vadot		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
54*0e8011faSEmmanuel Vadot			     <1 IRQ_TYPE_NONE>;	/* termcount */
55*0e8011faSEmmanuel Vadot		rb-gpios = <&gpmc0 0 GPIO_ACTIVE_HIGH>;	/* gpmc_wait0 */
56*0e8011faSEmmanuel Vadot		ti,nand-xfer-type = "prefetch-polled";
57*0e8011faSEmmanuel Vadot		ti,nand-ecc-opt = "bch8";	/* BCH8: Bootrom limitation */
58*0e8011faSEmmanuel Vadot		ti,elm-id = <&elm0>;
59*0e8011faSEmmanuel Vadot		nand-bus-width = <8>;
60*0e8011faSEmmanuel Vadot		gpmc,device-width = <1>;
61*0e8011faSEmmanuel Vadot		gpmc,sync-clk-ps = <0>;
62*0e8011faSEmmanuel Vadot		gpmc,cs-on-ns = <0>;
63*0e8011faSEmmanuel Vadot		gpmc,cs-rd-off-ns = <40>;
64*0e8011faSEmmanuel Vadot		gpmc,cs-wr-off-ns = <40>;
65*0e8011faSEmmanuel Vadot		gpmc,adv-on-ns = <0>;
66*0e8011faSEmmanuel Vadot		gpmc,adv-rd-off-ns = <25>;
67*0e8011faSEmmanuel Vadot		gpmc,adv-wr-off-ns = <25>;
68*0e8011faSEmmanuel Vadot		gpmc,we-on-ns = <0>;
69*0e8011faSEmmanuel Vadot		gpmc,we-off-ns = <20>;
70*0e8011faSEmmanuel Vadot		gpmc,oe-on-ns = <3>;
71*0e8011faSEmmanuel Vadot		gpmc,oe-off-ns = <30>;
72*0e8011faSEmmanuel Vadot		gpmc,access-ns = <30>;
73*0e8011faSEmmanuel Vadot		gpmc,rd-cycle-ns = <40>;
74*0e8011faSEmmanuel Vadot		gpmc,wr-cycle-ns = <40>;
75*0e8011faSEmmanuel Vadot		gpmc,bus-turnaround-ns = <0>;
76*0e8011faSEmmanuel Vadot		gpmc,cycle2cycle-delay-ns = <0>;
77*0e8011faSEmmanuel Vadot		gpmc,clk-activation-ns = <0>;
78*0e8011faSEmmanuel Vadot		gpmc,wr-access-ns = <40>;
79*0e8011faSEmmanuel Vadot		gpmc,wr-data-mux-bus-ns = <0>;
80*0e8011faSEmmanuel Vadot
81*0e8011faSEmmanuel Vadot		partitions {
82*0e8011faSEmmanuel Vadot			compatible = "fixed-partitions";
83*0e8011faSEmmanuel Vadot			#address-cells = <1>;
84*0e8011faSEmmanuel Vadot			#size-cells = <1>;
85*0e8011faSEmmanuel Vadot
86*0e8011faSEmmanuel Vadot			partition@0 {
87*0e8011faSEmmanuel Vadot				label = "NAND.tiboot3";
88*0e8011faSEmmanuel Vadot				reg = <0x00000000 0x00200000>;	/* 2M */
89*0e8011faSEmmanuel Vadot			};
90*0e8011faSEmmanuel Vadot			partition@200000 {
91*0e8011faSEmmanuel Vadot				label = "NAND.tispl";
92*0e8011faSEmmanuel Vadot				reg = <0x00200000 0x00200000>;	/* 2M */
93*0e8011faSEmmanuel Vadot			};
94*0e8011faSEmmanuel Vadot			partition@400000 {
95*0e8011faSEmmanuel Vadot				label = "NAND.tiboot3.backup";	/* 2M */
96*0e8011faSEmmanuel Vadot				reg = <0x00400000 0x00200000>;	/* BootROM looks at 4M */
97*0e8011faSEmmanuel Vadot			};
98*0e8011faSEmmanuel Vadot			partition@600000 {
99*0e8011faSEmmanuel Vadot				label = "NAND.u-boot";
100*0e8011faSEmmanuel Vadot				reg = <0x00600000 0x00400000>;	/* 4M */
101*0e8011faSEmmanuel Vadot			};
102*0e8011faSEmmanuel Vadot			partition@a00000 {
103*0e8011faSEmmanuel Vadot				label = "NAND.u-boot-env";
104*0e8011faSEmmanuel Vadot				reg = <0x00a00000 0x00040000>;	/* 256K */
105*0e8011faSEmmanuel Vadot			};
106*0e8011faSEmmanuel Vadot			partition@a40000 {
107*0e8011faSEmmanuel Vadot				label = "NAND.u-boot-env.backup";
108*0e8011faSEmmanuel Vadot				reg = <0x00a40000 0x00040000>;	/* 256K */
109*0e8011faSEmmanuel Vadot			};
110*0e8011faSEmmanuel Vadot			partition@a80000 {
111*0e8011faSEmmanuel Vadot				label = "NAND.file-system";
112*0e8011faSEmmanuel Vadot				reg = <0x00a80000 0x3f580000>;
113*0e8011faSEmmanuel Vadot			};
114*0e8011faSEmmanuel Vadot		};
115*0e8011faSEmmanuel Vadot	};
116*0e8011faSEmmanuel Vadot};
117