0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2018 Collabora Ltd.
0004 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd.
0005 *
0006 * Schematics available at https://dl.vamrs.com/products/ficus/docs/hw
0007 */
0008
0009 /dts-v1/;
0010 #include "rk3399-rock960.dtsi"
0011
0012 / {
0013 model = "96boards RK3399 Ficus";
0014 compatible = "vamrs,ficus", "rockchip,rk3399";
0015
0016 chosen {
0017 stdout-path = "serial2:1500000n8";
0018 };
0019
0020 clkin_gmac: external-gmac-clock {
0021 compatible = "fixed-clock";
0022 clock-frequency = <125000000>;
0023 clock-output-names = "clkin_gmac";
0024 #clock-cells = <0>;
0025 };
0026
0027 leds {
0028 compatible = "gpio-leds";
0029 pinctrl-names = "default";
0030 pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>,
0031 <&user_led3_pin>, <&user_led4_pin>,
0032 <&wlan_led_pin>, <&bt_led_pin>;
0033
0034 user_led1: led-1 {
0035 label = "red:user1";
0036 gpios = <&gpio4 25 0>;
0037 linux,default-trigger = "heartbeat";
0038 };
0039
0040 user_led2: led-2 {
0041 label = "red:user2";
0042 gpios = <&gpio4 26 0>;
0043 linux,default-trigger = "mmc0";
0044 };
0045
0046 user_led3: led-3 {
0047 label = "red:user3";
0048 gpios = <&gpio4 30 0>;
0049 linux,default-trigger = "mmc1";
0050 };
0051
0052 user_led4: led-4 {
0053 label = "red:user4";
0054 gpios = <&gpio1 0 0>;
0055 panic-indicator;
0056 linux,default-trigger = "none";
0057 };
0058
0059 wlan_active_led: led-5 {
0060 label = "red:wlan";
0061 gpios = <&gpio1 1 0>;
0062 linux,default-trigger = "phy0tx";
0063 default-state = "off";
0064 };
0065
0066 bt_active_led: led-6 {
0067 label = "red:bt";
0068 gpios = <&gpio1 4 0>;
0069 linux,default-trigger = "hci0-power";
0070 default-state = "off";
0071 };
0072 };
0073 };
0074
0075 &gmac {
0076 assigned-clocks = <&cru SCLK_RMII_SRC>;
0077 assigned-clock-parents = <&clkin_gmac>;
0078 clock_in_out = "input";
0079 phy-supply = <&vcc3v3_sys>;
0080 phy-mode = "rgmii";
0081 pinctrl-names = "default";
0082 pinctrl-0 = <&rgmii_pins>;
0083 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
0084 snps,reset-active-low;
0085 snps,reset-delays-us = <0 10000 50000>;
0086 tx_delay = <0x28>;
0087 rx_delay = <0x11>;
0088 status = "okay";
0089 };
0090
0091 &pcie0 {
0092 ep-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>;
0093 };
0094
0095 &pinctrl {
0096 gmac {
0097 rgmii_sleep_pins: rgmii-sleep-pins {
0098 rockchip,pins =
0099 <3 RK_PB7 RK_FUNC_GPIO &pcfg_output_low>;
0100 };
0101 };
0102
0103 pcie {
0104 pcie_drv: pcie-drv {
0105 rockchip,pins =
0106 <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
0107 };
0108 };
0109
0110 usb2 {
0111 host_vbus_drv: host-vbus-drv {
0112 rockchip,pins =
0113 <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
0114 };
0115 };
0116
0117 leds {
0118 user_led1_pin: user-led1-pin {
0119 rockchip,pins =
0120 <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
0121 };
0122
0123 user_led2_pin: user-led2-pin {
0124 rockchip,pins =
0125 <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
0126 };
0127
0128 user_led3_pin: user-led3-pin {
0129 rockchip,pins =
0130 <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
0131 };
0132
0133 user_led4_pin: user-led4-pin {
0134 rockchip,pins =
0135 <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
0136 };
0137
0138 wlan_led_pin: wlan-led-pin {
0139 rockchip,pins =
0140 <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
0141 };
0142
0143 bt_led_pin: bt-led-pin {
0144 rockchip,pins =
0145 <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
0146 };
0147 };
0148 };
0149
0150 &spi1 {
0151 /* On both Low speed and High speed expansion */
0152 cs-gpios = <0>, <&gpio4 RK_PA6 0>, <&gpio4 RK_PA7 0>;
0153 status = "okay";
0154 };
0155
0156 &usbdrd_dwc3_0 {
0157 dr_mode = "host";
0158 };
0159
0160 &usbdrd_dwc3_1 {
0161 dr_mode = "host";
0162 };
0163
0164 &vcc3v3_pcie {
0165 gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
0166 };
0167
0168 &vcc5v0_host {
0169 gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>;
0170 };