Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 | /* |
| 3 | * Copyright (c) 2023 Collabora Ltd. |
| 4 | */ |
| 5 | |
| 6 | #include "rk3588-u-boot.dtsi" |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 7 | #include <dt-bindings/pinctrl/rockchip.h> |
| 8 | #include <dt-bindings/input/input.h> |
| 9 | #include <dt-bindings/gpio/gpio.h> |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 10 | |
| 11 | / { |
| 12 | aliases { |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 13 | mmc1 = &sdmmc; |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 14 | }; |
| 15 | |
| 16 | chosen { |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 17 | u-boot,spl-boot-order = "same-as-spl", &sdmmc, &sdhci; |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 18 | }; |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 19 | |
| 20 | vcc5v0_host: vcc5v0-host-regulator { |
| 21 | compatible = "regulator-fixed"; |
| 22 | regulator-name = "vcc5v0_host"; |
| 23 | regulator-min-microvolt = <5000000>; |
| 24 | regulator-max-microvolt = <5000000>; |
| 25 | enable-active-high; |
| 26 | gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; |
| 27 | pinctrl-names = "default"; |
| 28 | pinctrl-0 = <&vcc5v0_host_en>; |
| 29 | vin-supply = <&vcc5v0_sys>; |
| 30 | }; |
| 31 | }; |
| 32 | |
Christopher Obbard | 6abdb9c | 2023-05-17 13:01:01 +0300 | [diff] [blame] | 33 | &combphy0_ps { |
| 34 | status = "okay"; |
| 35 | }; |
| 36 | |
Jonas Karlman | 90e924d | 2023-05-17 18:26:39 +0000 | [diff] [blame] | 37 | &emmc_bus8 { |
| 38 | bootph-all; |
| 39 | }; |
| 40 | |
| 41 | &emmc_clk { |
| 42 | bootph-all; |
| 43 | }; |
| 44 | |
| 45 | &emmc_cmd { |
| 46 | bootph-all; |
| 47 | }; |
| 48 | |
| 49 | &emmc_data_strobe { |
| 50 | bootph-all; |
| 51 | }; |
| 52 | |
| 53 | &emmc_rstnout { |
| 54 | bootph-all; |
| 55 | }; |
| 56 | |
Christopher Obbard | 6abdb9c | 2023-05-17 13:01:01 +0300 | [diff] [blame] | 57 | &pcie2x1l2 { |
| 58 | pinctrl-names = "default"; |
| 59 | pinctrl-0 = <&pcie2x1l2_pins &pcie_reset_h>; |
| 60 | reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>; |
| 61 | status = "okay"; |
| 62 | }; |
| 63 | |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 64 | &pinctrl { |
Eugen Hristev | b98429b | 2023-05-15 16:44:02 +0300 | [diff] [blame] | 65 | bootph-all; |
| 66 | |
Christopher Obbard | 6abdb9c | 2023-05-17 13:01:01 +0300 | [diff] [blame] | 67 | pcie { |
| 68 | pcie_reset_h: pcie-reset-h { |
| 69 | rockchip,pins = <3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 70 | }; |
| 71 | |
| 72 | pcie2x1l2_pins: pcie2x1l2-pins { |
| 73 | rockchip,pins = <3 RK_PC7 4 &pcfg_pull_none>, |
| 74 | <3 RK_PD0 4 &pcfg_pull_none>; |
| 75 | }; |
| 76 | }; |
| 77 | |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 78 | usb { |
| 79 | vcc5v0_host_en: vcc5v0-host-en { |
| 80 | rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 81 | }; |
| 82 | }; |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 83 | }; |
| 84 | |
Jonas Karlman | 90e924d | 2023-05-17 18:26:39 +0000 | [diff] [blame] | 85 | &pcfg_pull_none { |
| 86 | bootph-all; |
| 87 | }; |
| 88 | |
Eugen Hristev | b98429b | 2023-05-15 16:44:02 +0300 | [diff] [blame] | 89 | &pcfg_pull_up_drv_level_2 { |
| 90 | bootph-all; |
| 91 | }; |
| 92 | |
| 93 | &pcfg_pull_up { |
| 94 | bootph-all; |
| 95 | }; |
| 96 | |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 97 | &sdmmc { |
| 98 | bus-width = <4>; |
Eugen Hristev | 32f36cf | 2023-02-22 11:05:12 +0200 | [diff] [blame] | 99 | status = "okay"; |
| 100 | }; |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 101 | |
Eugen Hristev | b98429b | 2023-05-15 16:44:02 +0300 | [diff] [blame] | 102 | &sdmmc_bus4 { |
| 103 | bootph-all; |
| 104 | }; |
| 105 | |
| 106 | &sdmmc_clk { |
| 107 | bootph-all; |
| 108 | }; |
| 109 | |
| 110 | &sdmmc_cmd { |
| 111 | bootph-all; |
| 112 | }; |
| 113 | |
| 114 | &sdmmc_det { |
| 115 | bootph-all; |
| 116 | }; |
| 117 | |
Jonas Karlman | ced8be0 | 2023-04-18 16:46:41 +0000 | [diff] [blame] | 118 | &sdhci { |
| 119 | cap-mmc-highspeed; |
| 120 | mmc-ddr-1_8v; |
| 121 | mmc-hs200-1_8v; |
| 122 | pinctrl-names = "default"; |
| 123 | pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_data_strobe &emmc_rstnout>; |
| 124 | }; |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 125 | |
Jonas Karlman | 90e924d | 2023-05-17 18:26:39 +0000 | [diff] [blame] | 126 | &uart2m0_xfer { |
| 127 | bootph-all; |
| 128 | }; |
| 129 | |
Eugen Hristev | a856b1a | 2023-05-15 12:59:45 +0300 | [diff] [blame] | 130 | &usb_host0_ehci { |
| 131 | companion = <&usb_host0_ohci>; |
| 132 | phys = <&u2phy2_host>; |
| 133 | phy-names = "usb2-phy"; |
| 134 | status = "okay"; |
| 135 | }; |
| 136 | |
| 137 | &usb_host0_ohci { |
| 138 | phys = <&u2phy2_host>; |
| 139 | phy-names = "usb2-phy"; |
| 140 | status = "okay"; |
| 141 | }; |
| 142 | |
| 143 | &usb2phy2_grf { |
| 144 | status = "okay"; |
| 145 | }; |
| 146 | |
| 147 | &u2phy2 { |
| 148 | resets = <&cru SRST_OTGPHY_U2_0>, <&cru SRST_P_USB2PHY_U2_0_GRF0>; |
| 149 | reset-names = "phy", "apb"; |
| 150 | clock-output-names = "usb480m_phy2"; |
| 151 | status = "okay"; |
| 152 | }; |
| 153 | |
| 154 | &u2phy2_host { |
| 155 | phy-supply = <&vcc5v0_host>; |
| 156 | status = "okay"; |
| 157 | }; |
| 158 | |
| 159 | &usb_host1_ehci { |
| 160 | companion = <&usb_host1_ohci>; |
| 161 | phys = <&u2phy3_host>; |
| 162 | phy-names = "usb2-phy"; |
| 163 | status = "okay"; |
| 164 | }; |
| 165 | |
| 166 | &usb_host1_ohci { |
| 167 | phys = <&u2phy3_host>; |
| 168 | phy-names = "usb2-phy"; |
| 169 | status = "okay"; |
| 170 | }; |
| 171 | |
| 172 | &usb2phy3_grf { |
| 173 | status = "okay"; |
| 174 | }; |
| 175 | |
| 176 | &u2phy3 { |
| 177 | resets = <&cru SRST_OTGPHY_U2_1>, <&cru SRST_P_USB2PHY_U2_1_GRF0>; |
| 178 | reset-names = "phy", "apb"; |
| 179 | clock-output-names = "usb480m_phy3"; |
| 180 | status = "okay"; |
| 181 | }; |
| 182 | |
| 183 | &u2phy3_host { |
| 184 | phy-supply = <&vcc5v0_host>; |
| 185 | status = "okay"; |
| 186 | }; |
| 187 | |