0001 // SPDX-License-Identifier: GPL-2.0+
0002 /*
0003 * Copyright (C) 2013 Steffen Trumtrar <s.trumtrar@pengutronix.de>
0004 */
0005
0006 #include "socfpga_cyclone5.dtsi"
0007
0008 / {
0009 model = "Terasic SoCkit";
0010 compatible = "terasic,socfpga-cyclone5-sockit", "altr,socfpga-cyclone5", "altr,socfpga";
0011
0012 chosen {
0013 bootargs = "earlyprintk";
0014 stdout-path = "serial0:115200n8";
0015 };
0016
0017 memory@0 {
0018 name = "memory";
0019 device_type = "memory";
0020 reg = <0x0 0x40000000>; /* 1GB */
0021 };
0022
0023 aliases {
0024 /* this allow the ethaddr uboot environmnet variable contents
0025 * to be added to the gmac1 device tree blob.
0026 */
0027 ethernet0 = &gmac1;
0028 };
0029
0030 leds {
0031 compatible = "gpio-leds";
0032
0033 hps_led0 {
0034 label = "hps:blue:led0";
0035 gpios = <&portb 24 0>; /* HPS_GPIO53 */
0036 linux,default-trigger = "heartbeat";
0037 };
0038
0039 hps_led1 {
0040 label = "hps:blue:led1";
0041 gpios = <&portb 25 0>; /* HPS_GPIO54 */
0042 linux,default-trigger = "heartbeat";
0043 };
0044
0045 hps_led2 {
0046 label = "hps:blue:led2";
0047 gpios = <&portb 26 0>; /* HPS_GPIO55 */
0048 linux,default-trigger = "heartbeat";
0049 };
0050
0051 hps_led3 {
0052 label = "hps:blue:led3";
0053 gpios = <&portb 27 0>; /* HPS_GPIO56 */
0054 linux,default-trigger = "heartbeat";
0055 };
0056 };
0057
0058 gpio-keys {
0059 compatible = "gpio-keys";
0060
0061 hps_sw0 {
0062 label = "hps_sw0";
0063 gpios = <&portc 20 0>; /* HPS_GPI7 */
0064 linux,input-type = <5>; /* EV_SW */
0065 linux,code = <0x0>; /* SW_LID */
0066 };
0067
0068 hps_sw1 {
0069 label = "hps_sw1";
0070 gpios = <&portc 19 0>; /* HPS_GPI6 */
0071 linux,input-type = <5>; /* EV_SW */
0072 linux,code = <0x5>; /* SW_DOCK */
0073 };
0074
0075 hps_sw2 {
0076 label = "hps_sw2";
0077 gpios = <&portc 18 0>; /* HPS_GPI5 */
0078 linux,input-type = <5>; /* EV_SW */
0079 linux,code = <0xa>; /* SW_KEYPAD_SLIDE */
0080 };
0081
0082 hps_sw3 {
0083 label = "hps_sw3";
0084 gpios = <&portc 17 0>; /* HPS_GPI4 */
0085 linux,input-type = <5>; /* EV_SW */
0086 linux,code = <0xc>; /* SW_ROTATE_LOCK */
0087 };
0088
0089 hps_hkey0 {
0090 label = "hps_hkey0";
0091 gpios = <&portc 21 1>; /* HPS_GPI8 */
0092 linux,code = <187>; /* KEY_F17 */
0093 };
0094
0095 hps_hkey1 {
0096 label = "hps_hkey1";
0097 gpios = <&portc 22 1>; /* HPS_GPI9 */
0098 linux,code = <188>; /* KEY_F18 */
0099 };
0100
0101 hps_hkey2 {
0102 label = "hps_hkey2";
0103 gpios = <&portc 23 1>; /* HPS_GPI10 */
0104 linux,code = <189>; /* KEY_F19 */
0105 };
0106
0107 hps_hkey3 {
0108 label = "hps_hkey3";
0109 gpios = <&portc 24 1>; /* HPS_GPI11 */
0110 linux,code = <190>; /* KEY_F20 */
0111 };
0112 };
0113
0114 regulator_3_3v: regulator {
0115 compatible = "regulator-fixed";
0116 regulator-name = "VCC3P3";
0117 regulator-min-microvolt = <3300000>;
0118 regulator-max-microvolt = <3300000>;
0119 };
0120 };
0121
0122 &gmac1 {
0123 status = "okay";
0124 phy-mode = "rgmii";
0125
0126 rxd0-skew-ps = <0>;
0127 rxd1-skew-ps = <0>;
0128 rxd2-skew-ps = <0>;
0129 rxd3-skew-ps = <0>;
0130 txen-skew-ps = <0>;
0131 txc-skew-ps = <2600>;
0132 rxdv-skew-ps = <0>;
0133 rxc-skew-ps = <2000>;
0134 };
0135
0136 &gpio0 { /* GPIO 0..29 */
0137 status = "okay";
0138 };
0139
0140 &gpio1 { /* GPIO 30..57 */
0141 status = "okay";
0142 };
0143
0144 &gpio2 { /* GPIO 58..66 (HLGPI 0..13 at offset 13) */
0145 status = "okay";
0146 };
0147
0148 &i2c1 {
0149 status = "okay";
0150
0151 accel1: accelerometer@53 {
0152 compatible = "adi,adxl345";
0153 reg = <0x53>;
0154
0155 interrupt-parent = <&portc>;
0156 interrupts = <3 2>;
0157 };
0158 };
0159
0160 &mmc0 {
0161 vmmc-supply = <®ulator_3_3v>;
0162 vqmmc-supply = <®ulator_3_3v>;
0163 status = "okay";
0164 };
0165
0166 &qspi {
0167 status = "okay";
0168
0169 flash: flash@0 {
0170 #address-cells = <1>;
0171 #size-cells = <1>;
0172 compatible = "micron,mt25qu02g", "jedec,spi-nor";
0173 reg = <0>;
0174 spi-max-frequency = <100000000>;
0175
0176 m25p,fast-read;
0177 cdns,page-size = <256>;
0178 cdns,block-size = <16>;
0179 cdns,read-delay = <4>;
0180 cdns,tshsl-ns = <50>;
0181 cdns,tsd2d-ns = <50>;
0182 cdns,tchsh-ns = <4>;
0183 cdns,tslch-ns = <4>;
0184 };
0185 };
0186
0187 &usb1 {
0188 status = "okay";
0189 };