1c48ac0efSWadim Egorov// SPDX-License-Identifier: GPL-2.0 2c48ac0efSWadim Egorov/* 3c48ac0efSWadim Egorov * Copyright (C) 2021 PHYTEC America, LLC - https://www.phytec.com 4c48ac0efSWadim Egorov * Author: Matt McKee <mmckee@phytec.com> 5c48ac0efSWadim Egorov * 6c48ac0efSWadim Egorov * Copyright (C) 2022 PHYTEC Messtechnik GmbH 7c48ac0efSWadim Egorov * Author: Wadim Egorov <w.egorov@phytec.de> 8c48ac0efSWadim Egorov * 9c48ac0efSWadim Egorov * Product homepage: 10c48ac0efSWadim Egorov * https://www.phytec.com/product/phycore-am64x 11c48ac0efSWadim Egorov */ 12c48ac0efSWadim Egorov 13c48ac0efSWadim Egorov#include <dt-bindings/gpio/gpio.h> 14c48ac0efSWadim Egorov#include <dt-bindings/leds/common.h> 15c48ac0efSWadim Egorov#include <dt-bindings/net/ti-dp83867.h> 16c48ac0efSWadim Egorov 17c48ac0efSWadim Egorov/ { 18c48ac0efSWadim Egorov model = "PHYTEC phyCORE-AM64x"; 19c48ac0efSWadim Egorov compatible = "phytec,am64-phycore-som", "ti,am642"; 20c48ac0efSWadim Egorov 21c48ac0efSWadim Egorov aliases { 22c48ac0efSWadim Egorov ethernet0 = &cpsw_port1; 23c48ac0efSWadim Egorov mmc0 = &sdhci0; 24c48ac0efSWadim Egorov rtc0 = &i2c_som_rtc; 25c48ac0efSWadim Egorov }; 26c48ac0efSWadim Egorov 27c48ac0efSWadim Egorov memory@80000000 { 28c48ac0efSWadim Egorov device_type = "memory"; 29c48ac0efSWadim Egorov reg = <0x00000000 0x80000000 0x00000000 0x80000000>; 30c48ac0efSWadim Egorov }; 31c48ac0efSWadim Egorov 32c48ac0efSWadim Egorov reserved-memory { 33c48ac0efSWadim Egorov #address-cells = <2>; 34c48ac0efSWadim Egorov #size-cells = <2>; 35c48ac0efSWadim Egorov ranges; 36c48ac0efSWadim Egorov 37c48ac0efSWadim Egorov secure_ddr: optee@9e800000 { 38c48ac0efSWadim Egorov reg = <0x00 0x9e800000 0x00 0x01800000>; /* for OP-TEE */ 39c48ac0efSWadim Egorov alignment = <0x1000>; 40c48ac0efSWadim Egorov no-map; 41c48ac0efSWadim Egorov }; 42c48ac0efSWadim Egorov }; 43c48ac0efSWadim Egorov 44c48ac0efSWadim Egorov leds { 45c48ac0efSWadim Egorov compatible = "gpio-leds"; 46c48ac0efSWadim Egorov pinctrl-names = "default"; 47c48ac0efSWadim Egorov pinctrl-0 = <&leds_pins_default>; 48c48ac0efSWadim Egorov 49c48ac0efSWadim Egorov led-0 { 50c48ac0efSWadim Egorov color = <LED_COLOR_ID_GREEN>; 51c48ac0efSWadim Egorov gpios = <&main_gpio0 12 GPIO_ACTIVE_HIGH>; 52c48ac0efSWadim Egorov linux,default-trigger = "heartbeat"; 53c48ac0efSWadim Egorov function = LED_FUNCTION_HEARTBEAT; 54c48ac0efSWadim Egorov }; 55c48ac0efSWadim Egorov }; 56c48ac0efSWadim Egorov 57c48ac0efSWadim Egorov vcc_5v0_som: regulator-vcc-5v0-som { 58c48ac0efSWadim Egorov /* VIN / VCC_5V0_SOM */ 59c48ac0efSWadim Egorov compatible = "regulator-fixed"; 60c48ac0efSWadim Egorov regulator-name = "VCC_5V0_SOM"; 61c48ac0efSWadim Egorov regulator-min-microvolt = <5000000>; 62c48ac0efSWadim Egorov regulator-max-microvolt = <5000000>; 63c48ac0efSWadim Egorov regulator-always-on; 64c48ac0efSWadim Egorov regulator-boot-on; 65c48ac0efSWadim Egorov }; 66c48ac0efSWadim Egorov}; 67c48ac0efSWadim Egorov 68c48ac0efSWadim Egorov&main_pmx0 { 69a4956811STony Lindgren cpsw_mdio_pins_default: cpsw-mdio-default-pins { 70c48ac0efSWadim Egorov pinctrl-single,pins = < 71c48ac0efSWadim Egorov AM64X_IOPAD(0x01f8, PIN_INPUT, 4) /* (P5) PRG0_PRU1_GPO18.MDIO0_MDIO */ 72c48ac0efSWadim Egorov AM64X_IOPAD(0x01fc, PIN_OUTPUT, 4) /* (R2) PRG0_PRU1_GPO19.MDIO0_MDC */ 73c48ac0efSWadim Egorov AM64X_IOPAD(0x0100, PIN_OUTPUT, 7) /* (V7) PRG1_PRU0_GPO18.GPIO0_63 */ 74c48ac0efSWadim Egorov >; 75c48ac0efSWadim Egorov }; 76c48ac0efSWadim Egorov 77a4956811STony Lindgren cpsw_rgmii1_pins_default: cpsw-rgmii1-default-pins { 78c48ac0efSWadim Egorov pinctrl-single,pins = < 79c48ac0efSWadim Egorov AM64X_IOPAD(0x0184, PIN_INPUT, 4) /* (W6) PRG0_PRU0_GPO9.RGMII1_RX_CTL */ 80c48ac0efSWadim Egorov AM64X_IOPAD(0x0188, PIN_INPUT, 4) /* (AA5) PRG0_PRU0_GPO10.RGMII1_RXC */ 81c48ac0efSWadim Egorov AM64X_IOPAD(0x00dc, PIN_OUTPUT, 4) /* (U15) PRG1_PRU0_GPO9.RGMII1_TX_CTL */ 82c48ac0efSWadim Egorov AM64X_IOPAD(0x00e0, PIN_OUTPUT, 4) /* (U14) PRG1_PRU0_GPO10.RGMII1_TXC */ 83c48ac0efSWadim Egorov AM64X_IOPAD(0x01cc, PIN_INPUT, 4) /* (W5) PRG0_PRU1_GPO7.RGMII1_RD0 */ 84c48ac0efSWadim Egorov AM64X_IOPAD(0x0124, PIN_OUTPUT, 4) /* (V15) PRG1_PRU1_GPO7.RGMII1_TD0 */ 85c48ac0efSWadim Egorov AM64X_IOPAD(0x01d4, PIN_INPUT, 4) /* (Y5) PRG0_PRU1_GPO9.RGMII1_RD1 */ 86c48ac0efSWadim Egorov AM64X_IOPAD(0x012c, PIN_OUTPUT, 4) /* (V14) PRG1_PRU1_GPO9.RGMII1_TD1 */ 87c48ac0efSWadim Egorov AM64X_IOPAD(0x01d8, PIN_INPUT, 4) /* (V6) PRG0_PRU1_GPO10.RGMII1_RD2 */ 88c48ac0efSWadim Egorov AM64X_IOPAD(0x0130, PIN_OUTPUT, 4) /* (W14) PRG1_PRU1_GPO10.RGMII1_TD2 */ 89c48ac0efSWadim Egorov AM64X_IOPAD(0x01f4, PIN_INPUT, 4) /* (V5) PRG0_PRU1_GPO17.RGMII1_RD3 */ 90c48ac0efSWadim Egorov AM64X_IOPAD(0x014c, PIN_OUTPUT, 4) /* (AA14) PRG1_PRU1_GPO17.RGMII1_TD3 */ 91c48ac0efSWadim Egorov AM64X_IOPAD(0x0154, PIN_INPUT, 7) /* (V12) PRG1_PRU1_GPO19.GPIO0_84 */ 92c48ac0efSWadim Egorov >; 93c48ac0efSWadim Egorov }; 94c48ac0efSWadim Egorov 95a4956811STony Lindgren eeprom_wp_pins_default: eeprom-wp-default-pins { 96c48ac0efSWadim Egorov pinctrl-single,pins = < 97c48ac0efSWadim Egorov AM64X_IOPAD(0x0208, PIN_OUTPUT, 7) /* (D12) SPI0_CS0.GPIO1_42 */ 98c48ac0efSWadim Egorov >; 99c48ac0efSWadim Egorov }; 100c48ac0efSWadim Egorov 101a4956811STony Lindgren leds_pins_default: leds-default-pins { 102c48ac0efSWadim Egorov pinctrl-single,pins = < 103c48ac0efSWadim Egorov AM64X_IOPAD(0x0030, PIN_OUTPUT, 7) /* (L18) OSPI0_CSn1.GPIO0_12 */ 104c48ac0efSWadim Egorov >; 105c48ac0efSWadim Egorov }; 106c48ac0efSWadim Egorov 107a4956811STony Lindgren main_i2c0_pins_default: main-i2c0-default-pins { 108c48ac0efSWadim Egorov pinctrl-single,pins = < 109c48ac0efSWadim Egorov AM64X_IOPAD(0x0260, PIN_INPUT, 0) /* (A18) I2C0_SCL */ 110c48ac0efSWadim Egorov AM64X_IOPAD(0x0264, PIN_INPUT, 0) /* (B18) I2C0_SDA */ 111c48ac0efSWadim Egorov >; 112c48ac0efSWadim Egorov }; 113c48ac0efSWadim Egorov 114a4956811STony Lindgren ospi0_pins_default: ospi0-default-pins { 115c48ac0efSWadim Egorov pinctrl-single,pins = < 116c48ac0efSWadim Egorov AM64X_IOPAD(0x0000, PIN_OUTPUT, 0) /* (N20) OSPI0_CLK */ 117c48ac0efSWadim Egorov AM64X_IOPAD(0x0008, PIN_INPUT, 0) /* (N19) OSPI0_DQS */ 118c48ac0efSWadim Egorov AM64X_IOPAD(0x000c, PIN_INPUT, 0) /* (M19) OSPI0_D0 */ 119c48ac0efSWadim Egorov AM64X_IOPAD(0x0010, PIN_INPUT, 0) /* (M18) OSPI0_D1 */ 120c48ac0efSWadim Egorov AM64X_IOPAD(0x0014, PIN_INPUT, 0) /* (M20) OSPI0_D2 */ 121c48ac0efSWadim Egorov AM64X_IOPAD(0x0018, PIN_INPUT, 0) /* (M21) OSPI0_D3 */ 122c48ac0efSWadim Egorov AM64X_IOPAD(0x001c, PIN_INPUT, 0) /* (P21) OSPI0_D4 */ 123c48ac0efSWadim Egorov AM64X_IOPAD(0x0020, PIN_INPUT, 0) /* (P20) OSPI0_D5 */ 124c48ac0efSWadim Egorov AM64X_IOPAD(0x0024, PIN_INPUT, 0) /* (N18) OSPI0_D6 */ 125c48ac0efSWadim Egorov AM64X_IOPAD(0x0028, PIN_INPUT, 0) /* (M17) OSPI0_D7 */ 126c48ac0efSWadim Egorov AM64X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (L19) OSPI0_CSn0 */ 127c48ac0efSWadim Egorov >; 128c48ac0efSWadim Egorov }; 129c48ac0efSWadim Egorov}; 130c48ac0efSWadim Egorov 131c48ac0efSWadim Egorov&cpsw3g { 132c48ac0efSWadim Egorov pinctrl-names = "default"; 133c48ac0efSWadim Egorov pinctrl-0 = <&cpsw_rgmii1_pins_default>; 134c48ac0efSWadim Egorov}; 135c48ac0efSWadim Egorov 136c48ac0efSWadim Egorov&cpsw3g_mdio { 137c48ac0efSWadim Egorov status = "okay"; 138c48ac0efSWadim Egorov pinctrl-names = "default"; 139c48ac0efSWadim Egorov pinctrl-0 = <&cpsw_mdio_pins_default>; 140c48ac0efSWadim Egorov 141c48ac0efSWadim Egorov cpsw3g_phy1: ethernet-phy@1 { 142c48ac0efSWadim Egorov compatible = "ethernet-phy-id2000.a231", "ethernet-phy-ieee802.3-c22"; 143c48ac0efSWadim Egorov reg = <1>; 144c48ac0efSWadim Egorov interrupt-parent = <&main_gpio0>; 145c48ac0efSWadim Egorov interrupts = <84 IRQ_TYPE_EDGE_FALLING>; 146c48ac0efSWadim Egorov ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; 147c48ac0efSWadim Egorov ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>; 148c48ac0efSWadim Egorov reset-gpios = <&main_gpio0 63 GPIO_ACTIVE_LOW>; 149c48ac0efSWadim Egorov reset-assert-us = <1000>; 150c48ac0efSWadim Egorov reset-deassert-us = <1000>; 151c48ac0efSWadim Egorov }; 152c48ac0efSWadim Egorov}; 153c48ac0efSWadim Egorov 154c48ac0efSWadim Egorov&cpsw_port1 { 155c48ac0efSWadim Egorov phy-mode = "rgmii-rxid"; 156c48ac0efSWadim Egorov phy-handle = <&cpsw3g_phy1>; 157c48ac0efSWadim Egorov}; 158c48ac0efSWadim Egorov 159c48ac0efSWadim Egorov&cpsw_port2 { 160c48ac0efSWadim Egorov status = "disabled"; 161c48ac0efSWadim Egorov}; 162c48ac0efSWadim Egorov 163c48ac0efSWadim Egorov&main_i2c0 { 164c48ac0efSWadim Egorov status = "okay"; 165c48ac0efSWadim Egorov pinctrl-names = "default"; 166c48ac0efSWadim Egorov pinctrl-0 = <&main_i2c0_pins_default>; 167c48ac0efSWadim Egorov clock-frequency = <400000>; 168c48ac0efSWadim Egorov 169c48ac0efSWadim Egorov eeprom@50 { 170c48ac0efSWadim Egorov compatible = "atmel,24c32"; 171c48ac0efSWadim Egorov pinctrl-names = "default"; 172c48ac0efSWadim Egorov pinctrl-0 = <&eeprom_wp_pins_default>; 173c48ac0efSWadim Egorov pagesize = <32>; 174c48ac0efSWadim Egorov reg = <0x50>; 175c48ac0efSWadim Egorov }; 176c48ac0efSWadim Egorov 177c48ac0efSWadim Egorov i2c_som_rtc: rtc@52 { 178c48ac0efSWadim Egorov compatible = "microcrystal,rv3028"; 179c48ac0efSWadim Egorov reg = <0x52>; 180c48ac0efSWadim Egorov }; 181c48ac0efSWadim Egorov}; 182c48ac0efSWadim Egorov 183c48ac0efSWadim Egorov&ospi0 { 184cd9f6b32SAndrew Davis status = "okay"; 185c48ac0efSWadim Egorov pinctrl-names = "default"; 186c48ac0efSWadim Egorov pinctrl-0 = <&ospi0_pins_default>; 187c48ac0efSWadim Egorov 188c48ac0efSWadim Egorov flash@0 { 189c48ac0efSWadim Egorov compatible = "jedec,spi-nor"; 190c48ac0efSWadim Egorov reg = <0x0>; 191c48ac0efSWadim Egorov spi-tx-bus-width = <8>; 192c48ac0efSWadim Egorov spi-rx-bus-width = <8>; 193c48ac0efSWadim Egorov spi-max-frequency = <25000000>; 194c48ac0efSWadim Egorov cdns,tshsl-ns = <60>; 195c48ac0efSWadim Egorov cdns,tsd2d-ns = <60>; 196c48ac0efSWadim Egorov cdns,tchsh-ns = <60>; 197c48ac0efSWadim Egorov cdns,tslch-ns = <60>; 198c48ac0efSWadim Egorov cdns,read-delay = <0>; 199c48ac0efSWadim Egorov }; 200c48ac0efSWadim Egorov}; 201c48ac0efSWadim Egorov 202c48ac0efSWadim Egorov&sdhci0 { 203*b0e4672fSAndrew Davis status = "okay"; 204c48ac0efSWadim Egorov bus-width = <8>; 205c48ac0efSWadim Egorov non-removable; 206c48ac0efSWadim Egorov ti,driver-strength-ohm = <50>; 207c48ac0efSWadim Egorov disable-wp; 208c48ac0efSWadim Egorov keep-power-in-suspend; 209c48ac0efSWadim Egorov}; 210