|
| 1 | +// SPDX-License-Identifier: (GPL-2.0 OR MIT) |
| 2 | +/* |
| 3 | + * Copyright (C) 2025 Michael Opdenacker <michael.opdenacker@rootcommit.com> |
| 4 | + */ |
| 5 | + |
| 6 | +#include <dt-bindings/gpio/gpio.h> |
| 7 | +#include <dt-bindings/leds/common.h> |
| 8 | +#include <dt-bindings/pinctrl/rockchip.h> |
| 9 | +#include <dt-bindings/soc/rockchip,vop2.h> |
| 10 | +#include "rk3566.dtsi" |
| 11 | + |
| 12 | +/ { |
| 13 | + aliases { |
| 14 | + i2c0 = &i2c0; |
| 15 | + i2c2 = &i2c2; |
| 16 | + mmc1 = &sdmmc0; |
| 17 | + serial2 = &uart2; |
| 18 | + }; |
| 19 | + |
| 20 | + chosen { |
| 21 | + stdout-path = "serial2:1500000n8"; |
| 22 | + }; |
| 23 | + |
| 24 | + gpio_leds: gpio-leds { |
| 25 | + compatible = "gpio-leds"; |
| 26 | + |
| 27 | + act-led { |
| 28 | + gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; |
| 29 | + linux,default-trigger="mmc1"; |
| 30 | + }; |
| 31 | + |
| 32 | + rsv-led { |
| 33 | + gpios = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>; |
| 34 | + linux,default-trigger="none"; |
| 35 | + }; |
| 36 | + }; |
| 37 | + |
| 38 | + vcc3v3_sys: regulator-3v3-vcc-sys { |
| 39 | + compatible = "regulator-fixed"; |
| 40 | + regulator-name = "vcc3v3_sys"; |
| 41 | + regulator-always-on; |
| 42 | + regulator-boot-on; |
| 43 | + regulator-min-microvolt = <3300000>; |
| 44 | + regulator-max-microvolt = <3300000>; |
| 45 | + vin-supply = <&vcc5v0_sys>; |
| 46 | + }; |
| 47 | + |
| 48 | + vcc5v0_sys: regulator-5v0-vcc-sys { |
| 49 | + compatible = "regulator-fixed"; |
| 50 | + regulator-name = "vcc5v0_sys"; |
| 51 | + regulator-always-on; |
| 52 | + regulator-boot-on; |
| 53 | + regulator-min-microvolt = <5000000>; |
| 54 | + regulator-max-microvolt = <5000000>; |
| 55 | + }; |
| 56 | + |
| 57 | + vcc5v0_usb_host: regulator-5v0-vcc-usb-host { |
| 58 | + compatible = "regulator-fixed"; |
| 59 | + enable-active-high; |
| 60 | + gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; |
| 61 | + pinctrl-names = "default"; |
| 62 | + pinctrl-0 = <&u2_a_vbus_en>; |
| 63 | + regulator-name = "vcc5v0_usb_host"; |
| 64 | + regulator-min-microvolt = <5000000>; |
| 65 | + regulator-max-microvolt = <5000000>; |
| 66 | + vin-supply = <&vcc5v0_sys>; |
| 67 | + }; |
| 68 | +}; |
| 69 | + |
| 70 | +&cpu0 { |
| 71 | + cpu-supply = <&vdd_cpu>; |
| 72 | +}; |
| 73 | + |
| 74 | +&cpu1 { |
| 75 | + cpu-supply = <&vdd_cpu>; |
| 76 | +}; |
| 77 | + |
| 78 | +&cpu2 { |
| 79 | + cpu-supply = <&vdd_cpu>; |
| 80 | +}; |
| 81 | + |
| 82 | +&cpu3 { |
| 83 | + cpu-supply = <&vdd_cpu>; |
| 84 | +}; |
| 85 | + |
| 86 | +&i2c0 { |
| 87 | + status = "okay"; |
| 88 | + |
| 89 | + rk809: pmic@20 { |
| 90 | + compatible = "rockchip,rk809"; |
| 91 | + reg = <0x20>; |
| 92 | + assigned-clocks = <&cru I2S1_MCLKOUT_TX>; |
| 93 | + assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>; |
| 94 | + #clock-cells = <1>; |
| 95 | + clocks = <&cru I2S1_MCLKOUT_TX>; |
| 96 | + clock-names = "mclk"; |
| 97 | + clock-output-names = "rk809-clkout1", "rk809-clkout2"; |
| 98 | + interrupt-parent = <&gpio0>; |
| 99 | + interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>; |
| 100 | + pinctrl-names = "default"; |
| 101 | + pinctrl-0 = <&pmic_int_l>, <&i2s1m0_mclk>; |
| 102 | + #sound-dai-cells = <0>; |
| 103 | + system-power-controller; |
| 104 | + wakeup-source; |
| 105 | + |
| 106 | + vcc1-supply = <&vcc3v3_sys>; |
| 107 | + vcc2-supply = <&vcc3v3_sys>; |
| 108 | + vcc3-supply = <&vcc3v3_sys>; |
| 109 | + vcc4-supply = <&vcc3v3_sys>; |
| 110 | + vcc5-supply = <&vcc3v3_sys>; |
| 111 | + vcc6-supply = <&vcc3v3_sys>; |
| 112 | + vcc7-supply = <&vcc3v3_sys>; |
| 113 | + vcc8-supply = <&vcc3v3_sys>; |
| 114 | + vcc9-supply = <&vcc3v3_sys>; |
| 115 | + |
| 116 | + regulators { |
| 117 | + vcc_1v8: DCDC_REG5 { |
| 118 | + regulator-name = "vcc_1v8"; |
| 119 | + regulator-always-on; |
| 120 | + regulator-boot-on; |
| 121 | + regulator-min-microvolt = <1800000>; |
| 122 | + regulator-max-microvolt = <1800000>; |
| 123 | + |
| 124 | + regulator-state-mem { |
| 125 | + regulator-off-in-suspend; |
| 126 | + }; |
| 127 | + }; |
| 128 | + |
| 129 | + vcc_3v3: SWITCH_REG1 { |
| 130 | + regulator-name = "vcc_3v3"; |
| 131 | + regulator-always-on; |
| 132 | + regulator-boot-on; |
| 133 | + |
| 134 | + regulator-state-mem { |
| 135 | + regulator-off-in-suspend; |
| 136 | + }; |
| 137 | + }; |
| 138 | + |
| 139 | + vcc3v3_sd: SWITCH_REG2 { |
| 140 | + regulator-name = "vcc3v3_sd"; |
| 141 | + regulator-always-on; |
| 142 | + regulator-boot-on; |
| 143 | + |
| 144 | + regulator-state-mem { |
| 145 | + regulator-off-in-suspend; |
| 146 | + }; |
| 147 | + }; |
| 148 | + |
| 149 | + vccio_sd: LDO_REG5 { |
| 150 | + regulator-name = "vccio_sd"; |
| 151 | + regulator-always-on; |
| 152 | + regulator-boot-on; |
| 153 | + regulator-min-microvolt = <1800000>; |
| 154 | + regulator-max-microvolt = <3300000>; |
| 155 | + |
| 156 | + regulator-state-mem { |
| 157 | + regulator-off-in-suspend; |
| 158 | + }; |
| 159 | + }; |
| 160 | + }; |
| 161 | + }; |
| 162 | + |
| 163 | + vdd_cpu: regulator@40 { |
| 164 | + compatible = "silergy,syr827"; |
| 165 | + reg = <0x40>; |
| 166 | + fcs,suspend-voltage-selector = <1>; |
| 167 | + regulator-name = "vdd_cpu"; |
| 168 | + regulator-always-on; |
| 169 | + regulator-boot-on; |
| 170 | + regulator-min-microvolt = <830000>; |
| 171 | + regulator-max-microvolt = <1200000>; |
| 172 | + regulator-ramp-delay = <2300>; |
| 173 | + vin-supply = <&vcc3v3_sys>; |
| 174 | + |
| 175 | + regulator-state-mem { |
| 176 | + regulator-off-in-suspend; |
| 177 | + }; |
| 178 | + }; |
| 179 | +}; |
| 180 | + |
| 181 | +&i2c2 { |
| 182 | + status = "okay"; |
| 183 | + |
| 184 | + eeprom@50 { |
| 185 | + compatible = "atmel,24c08"; |
| 186 | + reg = <0x50>; |
| 187 | + pinctrl-names = "default"; |
| 188 | + pinctrl-0 = <&eeprom_wc_n>; |
| 189 | + }; |
| 190 | + |
| 191 | + rtc_isl1208: rtc@6f { |
| 192 | + compatible = "isil,isl1208"; |
| 193 | + reg = <0x6f>; |
| 194 | + interrupt-names = "irq"; |
| 195 | + interrupts-extended = <&gpio0 RK_PD3 IRQ_TYPE_EDGE_FALLING>; |
| 196 | + pinctrl-names = "default"; |
| 197 | + pinctrl-0 = <&rtcic_int_l>; |
| 198 | + }; |
| 199 | +}; |
| 200 | + |
| 201 | +&pinctrl { |
| 202 | + eeprom { |
| 203 | + eeprom_wc_n: eeprom-wc-n { |
| 204 | + rockchip,pins = <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>; |
| 205 | + }; |
| 206 | + }; |
| 207 | + |
| 208 | + pmic { |
| 209 | + pmic_int_l: pmic-int-l { |
| 210 | + rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; |
| 211 | + }; |
| 212 | + }; |
| 213 | + |
| 214 | + rtc { |
| 215 | + rtcic_int_l: rtcic-int-l { |
| 216 | + rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; |
| 217 | + }; |
| 218 | + }; |
| 219 | + |
| 220 | + usb { |
| 221 | + u2_a_vbus_en: u2-a-vbus-en { |
| 222 | + rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 223 | + }; |
| 224 | + |
| 225 | + u3_a_vbus_en: u3-a-vbus-en { |
| 226 | + rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; |
| 227 | + }; |
| 228 | + }; |
| 229 | +}; |
| 230 | + |
| 231 | +&sdmmc0 { |
| 232 | + bus-width = <4>; |
| 233 | + cap-sd-highspeed; |
| 234 | + disable-wp; |
| 235 | + pinctrl-names = "default"; |
| 236 | + pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; |
| 237 | + vmmc-supply = <&vcc3v3_sd>; |
| 238 | + vqmmc-supply = <&vccio_sd>; |
| 239 | + status = "okay"; |
| 240 | +}; |
| 241 | + |
| 242 | +&uart2 { |
| 243 | + status = "okay"; |
| 244 | +}; |
| 245 | + |
| 246 | +&usb_host0_ehci { |
| 247 | + status = "okay"; |
| 248 | +}; |
| 249 | + |
| 250 | +&usb_host0_ohci { |
| 251 | + status = "okay"; |
| 252 | +}; |
| 253 | + |
| 254 | +&usb_host1_ehci { |
| 255 | + status = "okay"; |
| 256 | +}; |
| 257 | + |
| 258 | +&usb_host1_ohci { |
| 259 | + status = "okay"; |
| 260 | +}; |
| 261 | + |
| 262 | +&usb2phy0 { |
| 263 | + status = "okay"; |
| 264 | +}; |
| 265 | + |
| 266 | +&usb2phy0_host { |
| 267 | + phy-supply = <&vcc5v0_usb_host>; |
| 268 | + status = "okay"; |
| 269 | +}; |
| 270 | + |
| 271 | +&usb2phy1 { |
| 272 | + status = "okay"; |
| 273 | +}; |
| 274 | + |
| 275 | +&usb2phy1_host { |
| 276 | + phy-supply = <&vcc5v0_usb_host>; |
| 277 | + status = "okay"; |
| 278 | +}; |
0 commit comments