0001 // SPDX-License-Identifier: GPL-2.0-only
0002 /*
0003 * Copyright (C) 2014 Texas Instruments Incorporated - https://www.ti.com/
0004 */
0005
0006 /dts-v1/;
0007
0008 #include "am4372.dtsi"
0009 #include <dt-bindings/pinctrl/am43xx.h>
0010 #include <dt-bindings/pwm/pwm.h>
0011 #include <dt-bindings/gpio/gpio.h>
0012 #include <dt-bindings/input/input.h>
0013
0014 / {
0015 model = "TI AM437x Industrial Development Kit";
0016 compatible = "ti,am437x-idk-evm","ti,am4372","ti,am43";
0017
0018 chosen {
0019 stdout-path = &uart0;
0020 };
0021
0022 v24_0d: fixed-regulator-v24_0d {
0023 compatible = "regulator-fixed";
0024 regulator-name = "V24_0D";
0025 regulator-min-microvolt = <24000000>;
0026 regulator-max-microvolt = <24000000>;
0027 regulator-always-on;
0028 regulator-boot-on;
0029 };
0030
0031 v3_3d: fixed-regulator-v3_3d {
0032 compatible = "regulator-fixed";
0033 regulator-name = "V3_3D";
0034 regulator-min-microvolt = <3300000>;
0035 regulator-max-microvolt = <3300000>;
0036 regulator-always-on;
0037 regulator-boot-on;
0038 vin-supply = <&v24_0d>;
0039 };
0040
0041 vdd_corereg: fixed-regulator-vdd_corereg {
0042 compatible = "regulator-fixed";
0043 regulator-name = "VDD_COREREG";
0044 regulator-min-microvolt = <1100000>;
0045 regulator-max-microvolt = <1100000>;
0046 regulator-always-on;
0047 regulator-boot-on;
0048 vin-supply = <&v24_0d>;
0049 };
0050
0051 vdd_core: fixed-regulator-vdd_core {
0052 compatible = "regulator-fixed";
0053 regulator-name = "VDD_CORE";
0054 regulator-min-microvolt = <1100000>;
0055 regulator-max-microvolt = <1100000>;
0056 regulator-always-on;
0057 regulator-boot-on;
0058 vin-supply = <&vdd_corereg>;
0059 };
0060
0061 v1_8dreg: fixed-regulator-v1_8dreg{
0062 compatible = "regulator-fixed";
0063 regulator-name = "V1_8DREG";
0064 regulator-min-microvolt = <1800000>;
0065 regulator-max-microvolt = <1800000>;
0066 regulator-always-on;
0067 regulator-boot-on;
0068 vin-supply = <&v24_0d>;
0069 };
0070
0071 v1_8d: fixed-regulator-v1_8d{
0072 compatible = "regulator-fixed";
0073 regulator-name = "V1_8D";
0074 regulator-min-microvolt = <1800000>;
0075 regulator-max-microvolt = <1800000>;
0076 regulator-always-on;
0077 regulator-boot-on;
0078 vin-supply = <&v1_8dreg>;
0079 };
0080
0081 v1_5dreg: fixed-regulator-v1_5dreg{
0082 compatible = "regulator-fixed";
0083 regulator-name = "V1_5DREG";
0084 regulator-min-microvolt = <1500000>;
0085 regulator-max-microvolt = <1500000>;
0086 regulator-always-on;
0087 regulator-boot-on;
0088 vin-supply = <&v24_0d>;
0089 };
0090
0091 v1_5d: fixed-regulator-v1_5d{
0092 compatible = "regulator-fixed";
0093 regulator-name = "V1_5D";
0094 regulator-min-microvolt = <1500000>;
0095 regulator-max-microvolt = <1500000>;
0096 regulator-always-on;
0097 regulator-boot-on;
0098 vin-supply = <&v1_5dreg>;
0099 };
0100
0101 gpio_keys: gpio-keys {
0102 compatible = "gpio-keys";
0103 pinctrl-names = "default";
0104 pinctrl-0 = <&gpio_keys_pins_default>;
0105
0106 switch-0 {
0107 label = "power-button";
0108 linux,code = <KEY_POWER>;
0109 gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
0110 };
0111 };
0112
0113 /* fixed 32k external oscillator clock */
0114 clk_32k_rtc: clk_32k_rtc {
0115 #clock-cells = <0>;
0116 compatible = "fixed-clock";
0117 clock-frequency = <32768>;
0118 };
0119
0120 leds-iio {
0121 status = "disabled";
0122 compatible = "gpio-leds";
0123 led-out0 {
0124 label = "out0";
0125 gpios = <&tpic2810 0 GPIO_ACTIVE_HIGH>;
0126 default-state = "off";
0127 };
0128
0129 led-out1 {
0130 label = "out1";
0131 gpios = <&tpic2810 1 GPIO_ACTIVE_HIGH>;
0132 default-state = "off";
0133 };
0134
0135 led-out2 {
0136 label = "out2";
0137 gpios = <&tpic2810 2 GPIO_ACTIVE_HIGH>;
0138 default-state = "off";
0139 };
0140
0141 led-out3 {
0142 label = "out3";
0143 gpios = <&tpic2810 3 GPIO_ACTIVE_HIGH>;
0144 default-state = "off";
0145 };
0146
0147 led-out4 {
0148 label = "out4";
0149 gpios = <&tpic2810 4 GPIO_ACTIVE_HIGH>;
0150 default-state = "off";
0151 };
0152
0153 led-out5 {
0154 label = "out5";
0155 gpios = <&tpic2810 5 GPIO_ACTIVE_HIGH>;
0156 default-state = "off";
0157 };
0158
0159 led-out6 {
0160 label = "out6";
0161 gpios = <&tpic2810 6 GPIO_ACTIVE_HIGH>;
0162 default-state = "off";
0163 };
0164
0165 led-out7 {
0166 label = "out7";
0167 gpios = <&tpic2810 7 GPIO_ACTIVE_HIGH>;
0168 default-state = "off";
0169 };
0170 };
0171 };
0172
0173 &am43xx_pinmux {
0174 gpio_keys_pins_default: gpio_keys_pins_default {
0175 pinctrl-single,pins = <
0176 AM4372_IOPAD(0x9b8, PIN_INPUT | MUX_MODE7) /* cam0_field.gpio4_2 */
0177 >;
0178 };
0179
0180 i2c0_pins_default: i2c0_pins_default {
0181 pinctrl-single,pins = <
0182 AM4372_IOPAD(0x988, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */
0183 AM4372_IOPAD(0x98c, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_scl.i2c0_scl */
0184 >;
0185 };
0186
0187 i2c0_pins_sleep: i2c0_pins_sleep {
0188 pinctrl-single,pins = <
0189 AM4372_IOPAD(0x988, PIN_INPUT_PULLDOWN | MUX_MODE7)
0190 AM4372_IOPAD(0x98c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0191 >;
0192 };
0193
0194 i2c2_pins_default: i2c2_pins_default {
0195 pinctrl-single,pins = <
0196 AM4372_IOPAD(0x9e8, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data1.i2c2_scl */
0197 AM4372_IOPAD(0x9ec, PIN_INPUT | SLEWCTRL_FAST | MUX_MODE3) /* cam1_data0.i2c2_sda */
0198 >;
0199 };
0200
0201 i2c2_pins_sleep: i2c2_pins_sleep {
0202 pinctrl-single,pins = <
0203 AM4372_IOPAD(0x9e8, PIN_INPUT_PULLDOWN | MUX_MODE7)
0204 AM4372_IOPAD(0x9ec, PIN_INPUT_PULLDOWN | MUX_MODE7)
0205 >;
0206 };
0207
0208 mmc1_pins_default: pinmux_mmc1_pins_default {
0209 pinctrl-single,pins = <
0210 AM4372_IOPAD(0x900, PIN_INPUT | MUX_MODE0) /* mmc0_clk.mmc0_clk */
0211 AM4372_IOPAD(0x904, PIN_INPUT | MUX_MODE0) /* mmc0_cmd.mmc0_cmd */
0212 AM4372_IOPAD(0x9f0, PIN_INPUT | MUX_MODE0) /* mmc0_dat3.mmc0_dat3 */
0213 AM4372_IOPAD(0x9f4, PIN_INPUT | MUX_MODE0) /* mmc0_dat2.mmc0_dat2 */
0214 AM4372_IOPAD(0x9f8, PIN_INPUT | MUX_MODE0) /* mmc0_dat1.mmc0_dat1 */
0215 AM4372_IOPAD(0x9fc, PIN_INPUT | MUX_MODE0) /* mmc0_dat0.mmc0_dat0 */
0216 AM4372_IOPAD(0x960, PIN_INPUT | MUX_MODE7) /* spi0_cs1.gpio0_6 */
0217 >;
0218 };
0219
0220 mmc1_pins_sleep: pinmux_mmc1_pins_sleep {
0221 pinctrl-single,pins = <
0222 AM4372_IOPAD(0x900, PIN_INPUT_PULLDOWN | MUX_MODE7)
0223 AM4372_IOPAD(0x904, PIN_INPUT_PULLDOWN | MUX_MODE7)
0224 AM4372_IOPAD(0x9f0, PIN_INPUT_PULLDOWN | MUX_MODE7)
0225 AM4372_IOPAD(0x9f4, PIN_INPUT_PULLDOWN | MUX_MODE7)
0226 AM4372_IOPAD(0x9f8, PIN_INPUT_PULLDOWN | MUX_MODE7)
0227 AM4372_IOPAD(0x9fc, PIN_INPUT_PULLDOWN | MUX_MODE7)
0228 AM4372_IOPAD(0x960, PIN_INPUT_PULLDOWN | MUX_MODE7)
0229 >;
0230 };
0231
0232 spi1_pins_default: spi1_pins_default {
0233 pinctrl-single,pins = <
0234 AM4372_IOPAD(0x908, PIN_INPUT | MUX_MODE2) /* mii1_col.spi1_sclk */
0235 AM4372_IOPAD(0x910, PIN_INPUT | MUX_MODE2) /* mii1_rx_er.spi1_d1 */
0236 AM4372_IOPAD(0x944, PIN_OUTPUT | MUX_MODE2) /* rmii1_ref_clk.spi1_cs0 */
0237 AM4372_IOPAD(0x90c, PIN_OUTPUT | MUX_MODE7) /* mii1_crs.gpio3_1 */
0238 >;
0239 };
0240
0241 spi1_pins_sleep: spi1_pins_sleep {
0242 pinctrl-single,pins = <
0243 AM4372_IOPAD(0x908, PIN_INPUT_PULLDOWN | MUX_MODE7)
0244 AM4372_IOPAD(0x910, PIN_INPUT_PULLDOWN | MUX_MODE7)
0245 AM4372_IOPAD(0x944, PIN_INPUT_PULLDOWN | MUX_MODE7)
0246 AM4372_IOPAD(0x90c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0247 >;
0248 };
0249
0250 ecap0_pins_default: backlight_pins_default {
0251 pinctrl-single,pins = <
0252 AM4372_IOPAD(0x964, PIN_OUTPUT | MUX_MODE0) /* ecap0_in_pwm0_out.ecap0_in_pwm0_out */
0253 >;
0254 };
0255
0256 cpsw_default: cpsw_default {
0257 pinctrl-single,pins = <
0258 AM4372_IOPAD(0x92c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txclk.rgmii1_tclk */
0259 AM4372_IOPAD(0x914, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txen.rgmii1_tctl */
0260 AM4372_IOPAD(0x928, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td0 */
0261 AM4372_IOPAD(0x924, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td1 */
0262 AM4372_IOPAD(0x920, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd0.rgmii1_td2 */
0263 AM4372_IOPAD(0x91c, PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* mii1_txd1.rgmii1_td3 */
0264 AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxclk.rmii1_rclk */
0265 AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxdv.rgmii1_rctl */
0266 AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd0 */
0267 AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd1 */
0268 AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd0.rgmii1_rd2 */
0269 AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mii1_rxd1.rgmii1_rd3 */
0270 >;
0271 };
0272
0273 cpsw_sleep: cpsw_sleep {
0274 pinctrl-single,pins = <
0275 AM4372_IOPAD(0x92c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0276 AM4372_IOPAD(0x914, PIN_INPUT_PULLDOWN | MUX_MODE7)
0277 AM4372_IOPAD(0x928, PIN_INPUT_PULLDOWN | MUX_MODE7)
0278 AM4372_IOPAD(0x924, PIN_INPUT_PULLDOWN | MUX_MODE7)
0279 AM4372_IOPAD(0x920, PIN_INPUT_PULLDOWN | MUX_MODE7)
0280 AM4372_IOPAD(0x91c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0281 AM4372_IOPAD(0x930, PIN_INPUT_PULLDOWN | MUX_MODE7)
0282 AM4372_IOPAD(0x918, PIN_INPUT_PULLDOWN | MUX_MODE7)
0283 AM4372_IOPAD(0x940, PIN_INPUT_PULLDOWN | MUX_MODE7)
0284 AM4372_IOPAD(0x93c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0285 AM4372_IOPAD(0x938, PIN_INPUT_PULLDOWN | MUX_MODE7)
0286 AM4372_IOPAD(0x934, PIN_INPUT_PULLDOWN | MUX_MODE7)
0287 >;
0288 };
0289
0290 davinci_mdio_default: davinci_mdio_default {
0291 pinctrl-single,pins = <
0292 /* MDIO */
0293 AM4372_IOPAD(0x948, PIN_INPUT_PULLUP | SLEWCTRL_FAST | MUX_MODE0) /* mdio_data.mdio_data */
0294 AM4372_IOPAD(0x94c, PIN_OUTPUT_PULLUP | MUX_MODE0) /* mdio_clk.mdio_clk */
0295 >;
0296 };
0297
0298 davinci_mdio_sleep: davinci_mdio_sleep {
0299 pinctrl-single,pins = <
0300 /* MDIO reset value */
0301 AM4372_IOPAD(0x948, PIN_INPUT_PULLDOWN | MUX_MODE7)
0302 AM4372_IOPAD(0x94c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0303 >;
0304 };
0305
0306 qspi_pins_default: qspi_pins_default {
0307 pinctrl-single,pins = <
0308 AM4372_IOPAD(0x87c, PIN_OUTPUT_PULLUP | MUX_MODE3) /* gpmc_csn0.qspi_csn */
0309 AM4372_IOPAD(0x888, PIN_OUTPUT | MUX_MODE2) /* gpmc_csn3.qspi_clk */
0310 AM4372_IOPAD(0x890, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_advn_ale.qspi_d0 */
0311 AM4372_IOPAD(0x894, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_oen_ren.qspi_d1 */
0312 AM4372_IOPAD(0x898, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_wen.qspi_d2 */
0313 AM4372_IOPAD(0x89c, PIN_INPUT_PULLUP | MUX_MODE3) /* gpmc_be0n_cle.qspi_d3 */
0314 >;
0315 };
0316
0317 qspi_pins_sleep: qspi_pins_sleep{
0318 pinctrl-single,pins = <
0319 AM4372_IOPAD(0x87c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0320 AM4372_IOPAD(0x888, PIN_INPUT_PULLDOWN | MUX_MODE7)
0321 AM4372_IOPAD(0x890, PIN_INPUT_PULLDOWN | MUX_MODE7)
0322 AM4372_IOPAD(0x894, PIN_INPUT_PULLDOWN | MUX_MODE7)
0323 AM4372_IOPAD(0x898, PIN_INPUT_PULLDOWN | MUX_MODE7)
0324 AM4372_IOPAD(0x89c, PIN_INPUT_PULLDOWN | MUX_MODE7)
0325 >;
0326 };
0327 };
0328
0329 &i2c0 {
0330 status = "okay";
0331 pinctrl-names = "default", "sleep";
0332 pinctrl-0 = <&i2c0_pins_default>;
0333 pinctrl-1 = <&i2c0_pins_sleep>;
0334 clock-frequency = <400000>;
0335
0336 at24@50 {
0337 compatible = "atmel,24c256";
0338 pagesize = <64>;
0339 reg = <0x50>;
0340 };
0341
0342 tps: tps62362@60 {
0343 compatible = "ti,tps62362";
0344 reg = <0x60>;
0345 regulator-name = "VDD_MPU";
0346 regulator-min-microvolt = <950000>;
0347 regulator-max-microvolt = <1330000>;
0348 regulator-boot-on;
0349 regulator-always-on;
0350 ti,vsel0-state-high;
0351 ti,vsel1-state-high;
0352 vin-supply = <&v3_3d>;
0353 };
0354 };
0355
0356 &i2c2 {
0357 status = "okay";
0358 pinctrl-names = "default", "sleep";
0359 pinctrl-0 = <&i2c2_pins_default>;
0360 pinctrl-1 = <&i2c2_pins_sleep>;
0361 clock-frequency = <100000>;
0362
0363 tpic2810: tpic2810@60 {
0364 compatible = "ti,tpic2810";
0365 reg = <0x60>;
0366 gpio-controller;
0367 #gpio-cells = <2>;
0368 };
0369 };
0370
0371 &spi1 {
0372 status = "okay";
0373 pinctrl-names = "default", "sleep";
0374 pinctrl-0 = <&spi1_pins_default>;
0375 pinctrl-1 = <&spi1_pins_sleep>;
0376 ti,pindir-d0-out-d1-in;
0377
0378 sn65hvs882: sn65hvs882@0 {
0379 compatible = "pisosr-gpio";
0380 gpio-controller;
0381 #gpio-cells = <2>;
0382
0383 load-gpios = <&gpio3 1 GPIO_ACTIVE_LOW>;
0384
0385 reg = <0>;
0386 spi-max-frequency = <1000000>;
0387 spi-cpol;
0388 };
0389 };
0390
0391 &epwmss0 {
0392 status = "okay";
0393 };
0394
0395 &ecap0 {
0396 status = "okay";
0397 pinctrl-names = "default";
0398 pinctrl-0 = <&ecap0_pins_default>;
0399 };
0400
0401 &gpio0 {
0402 status = "okay";
0403 };
0404
0405 &gpio1 {
0406 status = "okay";
0407 };
0408
0409 &gpio3 {
0410 status = "okay";
0411 };
0412
0413 &gpio4 {
0414 status = "okay";
0415 };
0416
0417 &gpio5 {
0418 status = "okay";
0419 };
0420
0421 &mmc1 {
0422 status = "okay";
0423 pinctrl-names = "default", "sleep";
0424 pinctrl-0 = <&mmc1_pins_default>;
0425 pinctrl-1 = <&mmc1_pins_sleep>;
0426 vmmc-supply = <&v3_3d>;
0427 bus-width = <4>;
0428 cd-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
0429 };
0430
0431 &qspi {
0432 status = "okay";
0433 pinctrl-names = "default", "sleep";
0434 pinctrl-0 = <&qspi_pins_default>;
0435 pinctrl-1 = <&qspi_pins_sleep>;
0436
0437 spi-max-frequency = <48000000>;
0438 flash@0 {
0439 compatible = "mx66l51235l";
0440 spi-max-frequency = <48000000>;
0441 reg = <0>;
0442 spi-cpol;
0443 spi-cpha;
0444 spi-tx-bus-width = <1>;
0445 spi-rx-bus-width = <4>;
0446 #address-cells = <1>;
0447 #size-cells = <1>;
0448
0449 /*
0450 * MTD partition table. The ROM checks the first 512KiB for a
0451 * valid file to boot(XIP).
0452 */
0453 partition@0 {
0454 label = "QSPI.U_BOOT";
0455 reg = <0x00000000 0x000080000>;
0456 };
0457 partition@1 {
0458 label = "QSPI.U_BOOT.backup";
0459 reg = <0x00080000 0x00080000>;
0460 };
0461 partition@2 {
0462 label = "QSPI.U-BOOT-SPL_OS";
0463 reg = <0x00100000 0x00010000>;
0464 };
0465 partition@3 {
0466 label = "QSPI.U_BOOT_ENV";
0467 reg = <0x00110000 0x00010000>;
0468 };
0469 partition@4 {
0470 label = "QSPI.U-BOOT-ENV.backup";
0471 reg = <0x00120000 0x00010000>;
0472 };
0473 partition@5 {
0474 label = "QSPI.KERNEL";
0475 reg = <0x00130000 0x0800000>;
0476 };
0477 partition@6 {
0478 label = "QSPI.FILESYSTEM";
0479 reg = <0x00930000 0x36D0000>;
0480 };
0481 };
0482 };
0483
0484 &mac_sw {
0485 pinctrl-names = "default", "sleep";
0486 pinctrl-0 = <&cpsw_default>;
0487 pinctrl-1 = <&cpsw_sleep>;
0488 status = "okay";
0489 };
0490
0491 &davinci_mdio_sw {
0492 pinctrl-names = "default", "sleep";
0493 pinctrl-0 = <&davinci_mdio_default>;
0494 pinctrl-1 = <&davinci_mdio_sleep>;
0495
0496 ethphy0: ethernet-phy@0 {
0497 reg = <0>;
0498 };
0499 };
0500
0501 &cpsw_port1 {
0502 phy-handle = <ðphy0>;
0503 phy-mode = "rgmii-rxid";
0504 ti,dual-emac-pvid = <1>;
0505 };
0506
0507 &cpsw_port2 {
0508 status = "disabled";
0509 };
0510
0511 &rtc {
0512 clocks = <&clk_32k_rtc>, <&clk_32768_ck>;
0513 clock-names = "ext-clk", "int-clk";
0514 status = "okay";
0515 };
0516
0517 &wdt {
0518 status = "okay";
0519 };
0520
0521 &cpu {
0522 cpu0-supply = <&tps>;
0523 };
0524
0525 &cpu0_opp_table {
0526 /*
0527 * Supply voltage supervisor on board will not allow opp50 so
0528 * disable it and set opp100 as suspend OPP.
0529 */
0530 opp50-300000000 {
0531 status = "disabled";
0532 };
0533
0534 opp100-600000000 {
0535 opp-suspend;
0536 };
0537 };
0538
0539 &pruss1_mdio {
0540 status = "disabled";
0541 };