Manivannan Sadhasivam | 88a0f50 | 2018-09-28 00:33:01 +0530 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2018 Collabora Ltd. |
| 4 | * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd. |
| 5 | * |
| 6 | * Schematics available at https://dl.vamrs.com/products/ficus/docs/hw |
| 7 | */ |
| 8 | |
| 9 | /dts-v1/; |
| 10 | #include "rk3399-rock960.dtsi" |
Manivannan Sadhasivam | 88a0f50 | 2018-09-28 00:33:01 +0530 | [diff] [blame] | 11 | |
| 12 | / { |
| 13 | model = "96boards RK3399 Ficus"; |
| 14 | compatible = "vamrs,ficus", "rockchip,rk3399"; |
| 15 | |
| 16 | chosen { |
| 17 | stdout-path = "serial2:1500000n8"; |
| 18 | }; |
| 19 | |
| 20 | clkin_gmac: external-gmac-clock { |
| 21 | compatible = "fixed-clock"; |
| 22 | clock-frequency = <125000000>; |
| 23 | clock-output-names = "clkin_gmac"; |
| 24 | #clock-cells = <0>; |
| 25 | }; |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 26 | |
| 27 | leds { |
| 28 | compatible = "gpio-leds"; |
| 29 | pinctrl-names = "default"; |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 30 | pinctrl-0 = <&user_led1_pin>, <&user_led2_pin>, |
| 31 | <&user_led3_pin>, <&user_led4_pin>, |
| 32 | <&wlan_led_pin>, <&bt_led_pin>; |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 33 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 34 | user_led1: led-1 { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 35 | label = "red:user1"; |
| 36 | gpios = <&gpio4 25 0>; |
| 37 | linux,default-trigger = "heartbeat"; |
| 38 | }; |
| 39 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 40 | user_led2: led-2 { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 41 | label = "red:user2"; |
| 42 | gpios = <&gpio4 26 0>; |
| 43 | linux,default-trigger = "mmc0"; |
| 44 | }; |
| 45 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 46 | user_led3: led-3 { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 47 | label = "red:user3"; |
| 48 | gpios = <&gpio4 30 0>; |
| 49 | linux,default-trigger = "mmc1"; |
| 50 | }; |
| 51 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 52 | user_led4: led-4 { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 53 | label = "red:user4"; |
| 54 | gpios = <&gpio1 0 0>; |
| 55 | panic-indicator; |
| 56 | linux,default-trigger = "none"; |
| 57 | }; |
| 58 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 59 | wlan_active_led: led-5 { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 60 | label = "red:wlan"; |
| 61 | gpios = <&gpio1 1 0>; |
| 62 | linux,default-trigger = "phy0tx"; |
| 63 | default-state = "off"; |
| 64 | }; |
| 65 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 66 | bt_active_led: led-6 { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 67 | label = "red:bt"; |
| 68 | gpios = <&gpio1 4 0>; |
| 69 | linux,default-trigger = "hci0-power"; |
| 70 | default-state = "off"; |
| 71 | }; |
| 72 | }; |
Manivannan Sadhasivam | 88a0f50 | 2018-09-28 00:33:01 +0530 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | &gmac { |
| 76 | assigned-clocks = <&cru SCLK_RMII_SRC>; |
| 77 | assigned-clock-parents = <&clkin_gmac>; |
| 78 | clock_in_out = "input"; |
| 79 | phy-supply = <&vcc3v3_sys>; |
| 80 | phy-mode = "rgmii"; |
| 81 | pinctrl-names = "default"; |
| 82 | pinctrl-0 = <&rgmii_pins>; |
| 83 | snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; |
| 84 | snps,reset-active-low; |
| 85 | snps,reset-delays-us = <0 10000 50000>; |
| 86 | tx_delay = <0x28>; |
| 87 | rx_delay = <0x11>; |
| 88 | status = "okay"; |
| 89 | }; |
| 90 | |
| 91 | &pcie0 { |
| 92 | ep-gpios = <&gpio4 RK_PD4 GPIO_ACTIVE_HIGH>; |
| 93 | }; |
| 94 | |
| 95 | &pinctrl { |
| 96 | gmac { |
| 97 | rgmii_sleep_pins: rgmii-sleep-pins { |
| 98 | rockchip,pins = |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 99 | <3 RK_PB7 RK_FUNC_GPIO &pcfg_output_low>; |
Manivannan Sadhasivam | 88a0f50 | 2018-09-28 00:33:01 +0530 | [diff] [blame] | 100 | }; |
| 101 | }; |
| 102 | |
| 103 | pcie { |
| 104 | pcie_drv: pcie-drv { |
| 105 | rockchip,pins = |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 106 | <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; |
Manivannan Sadhasivam | 88a0f50 | 2018-09-28 00:33:01 +0530 | [diff] [blame] | 107 | }; |
| 108 | }; |
| 109 | |
| 110 | usb2 { |
| 111 | host_vbus_drv: host-vbus-drv { |
| 112 | rockchip,pins = |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 113 | <4 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; |
Manivannan Sadhasivam | 88a0f50 | 2018-09-28 00:33:01 +0530 | [diff] [blame] | 114 | }; |
| 115 | }; |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 116 | |
| 117 | leds { |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 118 | user_led1_pin: user-led1-pin { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 119 | rockchip,pins = |
| 120 | <4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 121 | }; |
| 122 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 123 | user_led2_pin: user-led2-pin { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 124 | rockchip,pins = |
| 125 | <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; |
| 126 | }; |
| 127 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 128 | user_led3_pin: user-led3-pin { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 129 | rockchip,pins = |
| 130 | <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 131 | }; |
| 132 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 133 | user_led4_pin: user-led4-pin { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 134 | rockchip,pins = |
| 135 | <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 136 | }; |
| 137 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 138 | wlan_led_pin: wlan-led-pin { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 139 | rockchip,pins = |
| 140 | <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 141 | }; |
| 142 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 143 | bt_led_pin: bt-led-pin { |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 144 | rockchip,pins = |
| 145 | <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; |
| 146 | }; |
| 147 | }; |
| 148 | }; |
| 149 | |
Jagan Teki | 5cc2118 | 2020-04-28 15:30:17 +0530 | [diff] [blame] | 150 | &spi1 { |
| 151 | /* On both Low speed and High speed expansion */ |
| 152 | cs-gpios = <0>, <&gpio4 RK_PA6 0>, <&gpio4 RK_PA7 0>; |
| 153 | status = "okay"; |
| 154 | }; |
| 155 | |
Peter Robinson | c91fb87 | 2019-07-01 17:05:49 +0100 | [diff] [blame] | 156 | &usbdrd_dwc3_0 { |
| 157 | dr_mode = "host"; |
| 158 | }; |
| 159 | |
| 160 | &usbdrd_dwc3_1 { |
| 161 | dr_mode = "host"; |
Manivannan Sadhasivam | 88a0f50 | 2018-09-28 00:33:01 +0530 | [diff] [blame] | 162 | }; |
| 163 | |
| 164 | &vcc3v3_pcie { |
| 165 | gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; |
| 166 | }; |
| 167 | |
| 168 | &vcc5v0_host { |
| 169 | gpio = <&gpio4 27 GPIO_ACTIVE_HIGH>; |
| 170 | }; |