Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 3 | * FriendlyElec NanoPC-T4 board device tree source |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 4 | * |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 5 | * Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd. |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 6 | * (http://www.friendlyarm.com) |
| 7 | * |
| 8 | * Copyright (c) 2018 Collabora Ltd. |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 9 | * |
| 10 | * Copyright (c) 2020 Jensen Huang <jensenhuang@friendlyarm.com> |
| 11 | * Copyright (c) 2020 Marty Jones <mj8263788@gmail.com> |
| 12 | * Copyright (c) 2021 Tianling Shen <cnsztl@gmail.com> |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 13 | */ |
| 14 | |
| 15 | /dts-v1/; |
| 16 | #include "rk3399-nanopi4.dtsi" |
| 17 | |
| 18 | / { |
| 19 | model = "FriendlyElec NanoPi R4S"; |
| 20 | compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399"; |
| 21 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 22 | /delete-node/ display-subsystem; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 23 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 24 | gpio-leds { |
| 25 | pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 26 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 27 | /delete-node/ led-0; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 28 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 29 | lan_led: led-lan { |
| 30 | gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>; |
| 31 | label = "green:lan"; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 32 | }; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 33 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 34 | sys_led: led-sys { |
| 35 | gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; |
| 36 | label = "red:power"; |
| 37 | default-state = "on"; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 38 | }; |
| 39 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 40 | wan_led: led-wan { |
| 41 | gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>; |
| 42 | label = "green:wan"; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 43 | }; |
| 44 | }; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 45 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 46 | gpio-keys { |
| 47 | pinctrl-0 = <&reset_button_pin>; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 48 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 49 | /delete-node/ power; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 50 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 51 | reset { |
| 52 | debounce-interval = <50>; |
| 53 | gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>; |
| 54 | label = "reset"; |
| 55 | linux,code = <KEY_RESTART>; |
| 56 | }; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 57 | }; |
| 58 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 59 | vdd_5v: vdd-5v { |
| 60 | compatible = "regulator-fixed"; |
| 61 | regulator-name = "vdd_5v"; |
| 62 | regulator-always-on; |
| 63 | regulator-boot-on; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 64 | }; |
| 65 | }; |
| 66 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 67 | &emmc_phy { |
| 68 | status = "disabled"; |
| 69 | }; |
| 70 | |
| 71 | &i2c4 { |
| 72 | status = "disabled"; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 73 | }; |
| 74 | |
| 75 | &pcie0 { |
| 76 | max-link-speed = <1>; |
| 77 | num-lanes = <1>; |
| 78 | vpcie3v3-supply = <&vcc3v3_sys>; |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 79 | }; |
| 80 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 81 | &pinctrl { |
| 82 | gpio-leds { |
| 83 | /delete-node/ status-led-pin; |
| 84 | |
| 85 | lan_led_pin: lan-led-pin { |
| 86 | rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 87 | }; |
| 88 | |
| 89 | sys_led_pin: sys-led-pin { |
| 90 | rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 91 | }; |
| 92 | |
| 93 | wan_led_pin: wan-led-pin { |
| 94 | rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 95 | }; |
| 96 | }; |
| 97 | |
| 98 | rockchip-key { |
| 99 | /delete-node/ power-key; |
| 100 | |
| 101 | reset_button_pin: reset-button-pin { |
| 102 | rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>; |
| 103 | }; |
| 104 | }; |
| 105 | }; |
| 106 | |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 107 | &sdhci { |
| 108 | status = "disabled"; |
| 109 | }; |
| 110 | |
| 111 | &sdio0 { |
| 112 | status = "disabled"; |
| 113 | }; |
| 114 | |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 115 | &u2phy0_host { |
| 116 | phy-supply = <&vdd_5v>; |
| 117 | }; |
| 118 | |
| 119 | &u2phy1_host { |
| 120 | status = "disabled"; |
| 121 | }; |
| 122 | |
Peter Robinson | 7c79b87 | 2021-07-22 16:20:42 +0100 | [diff] [blame] | 123 | &uart0 { |
| 124 | status = "disabled"; |
| 125 | }; |
| 126 | |
Xiaobo Tian | c116dfe | 2021-02-27 22:39:11 +0800 | [diff] [blame] | 127 | &usbdrd_dwc3_0 { |
| 128 | dr_mode = "host"; |
| 129 | }; |
| 130 | |
| 131 | &vcc3v3_sys { |
| 132 | vin-supply = <&vcc5v0_sys>; |
| 133 | }; |