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