| 1 |
// SPDX-License-Identifier: (GPL-2.0-or-later OR MIT) |
| 2 |
/* |
| 3 |
* Device tree overlay for the WolfVision PF5 IO Expander board. |
| 4 |
* |
| 5 |
* Copyright (C) 2024 WolfVision GmbH. |
| 6 |
*/ |
| 7 |
|
| 8 |
/dts-v1/; |
| 9 |
/plugin/; |
| 10 |
|
| 11 |
#include <dt-bindings/clock/rk3568-cru.h> |
| 12 |
#include <dt-bindings/gpio/gpio.h> |
| 13 |
#include <dt-bindings/interrupt-controller/irq.h> |
| 14 |
#include <dt-bindings/pinctrl/rockchip.h> |
| 15 |
|
| 16 |
&{/} { |
| 17 |
gmac0_clkin: external-gmac0-clock { |
| 18 |
compatible = "fixed-clock"; |
| 19 |
clock-frequency = <50000000>; |
| 20 |
clock-output-names = "gmac0_clkin"; |
| 21 |
#clock-cells = <0>; |
| 22 |
}; |
| 23 |
|
| 24 |
usb_host_vbus: regulator-usb-host-vbus { |
| 25 |
compatible = "regulator-fixed"; |
| 26 |
enable-active-high; |
| 27 |
gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>; |
| 28 |
pinctrl-names = "default"; |
| 29 |
pinctrl-0 = <&usb_host_vbus_en>; |
| 30 |
regulator-name = "usb_host_vbus"; |
| 31 |
regulator-min-microvolt = <5000000>; |
| 32 |
regulator-max-microvolt = <5000000>; |
| 33 |
vin-supply = <&vcc5v_in>; |
| 34 |
}; |
| 35 |
|
| 36 |
vcc1v8_eth: regulator-vcc1v8-eth { |
| 37 |
compatible = "regulator-fixed"; |
| 38 |
enable-active-high; |
| 39 |
gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>; |
| 40 |
pinctrl-names = "default"; |
| 41 |
pinctrl-0 = <&vcc1v8_eth_en>; |
| 42 |
regulator-always-on; |
| 43 |
regulator-boot-on; |
| 44 |
regulator-name = "1v8_eth"; |
| 45 |
regulator-min-microvolt = <1800000>; |
| 46 |
regulator-max-microvolt = <1800000>; |
| 47 |
vin-supply = <&vcc3v3_sys>; |
| 48 |
}; |
| 49 |
|
| 50 |
vcc3v3_eth: regulator-vcc3v3-eth { |
| 51 |
compatible = "regulator-fixed"; |
| 52 |
gpio = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>; |
| 53 |
pinctrl-names = "default"; |
| 54 |
pinctrl-0 = <&vcc3v3_eth_enn>; |
| 55 |
regulator-always-on; |
| 56 |
regulator-boot-on; |
| 57 |
regulator-name = "3v3_eth"; |
| 58 |
regulator-min-microvolt = <3300000>; |
| 59 |
regulator-max-microvolt = <3300000>; |
| 60 |
vin-supply = <&vcc3v3_sys>; |
| 61 |
}; |
| 62 |
}; |
| 63 |
|
| 64 |
&gmac0 { |
| 65 |
assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, |
| 66 |
<&cru SCLK_GMAC0>; |
| 67 |
assigned-clock-parents = <&cru SCLK_GMAC0_RMII_SPEED>, |
| 68 |
<&gmac0_clkin>; |
| 69 |
clock_in_out = "input"; |
| 70 |
phy-handle = <&dp83826>; |
| 71 |
phy-mode = "rmii"; |
| 72 |
phy-supply = <&vcc3v3_eth>; |
| 73 |
pinctrl-names = "default"; |
| 74 |
pinctrl-0 = <&gmac0_miim |
| 75 |
&gmac0_clkinout |
| 76 |
&gmac0_rx_er |
| 77 |
&gmac0_rx_bus2 |
| 78 |
&gmac0_tx_bus2>; |
| 79 |
status = "okay"; |
| 80 |
}; |
| 81 |
|
| 82 |
&mdio0 { |
| 83 |
#address-cells = <1>; |
| 84 |
#size-cells = <0>; |
| 85 |
|
| 86 |
dp83826: ethernet-phy@0 { |
| 87 |
compatible = "ethernet-phy-ieee802.3-c22"; |
| 88 |
reg = <0x0>; |
| 89 |
interrupt-parent = <&gpio0>; |
| 90 |
interrupts = <RK_PD3 IRQ_TYPE_EDGE_FALLING>; |
| 91 |
pinctrl-names = "default"; |
| 92 |
pinctrl-0 = <ð_wake_intn ð_phy_rstn>; |
| 93 |
reset-assert-us = <1000>; |
| 94 |
reset-deassert-us = <2000>; |
| 95 |
reset-gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_LOW>; |
| 96 |
wakeup-source; |
| 97 |
}; |
| 98 |
}; |
| 99 |
|
| 100 |
&pinctrl { |
| 101 |
ethernet { |
| 102 |
eth_wake_intn: eth-wake-intn-pinctrl { |
| 103 |
rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 104 |
}; |
| 105 |
|
| 106 |
eth_phy_rstn: eth-phy-rstn-pinctrl { |
| 107 |
rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>; |
| 108 |
}; |
| 109 |
|
| 110 |
vcc1v8_eth_en: vcc1v8-eth-en-pinctrl { |
| 111 |
rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; |
| 112 |
}; |
| 113 |
|
| 114 |
vcc3v3_eth_enn: vcc3v3-eth-enn-pinctrl { |
| 115 |
rockchip,pins = <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>; |
| 116 |
}; |
| 117 |
}; |
| 118 |
|
| 119 |
usb { |
| 120 |
usb_host_vbus_en: usb-host-vbus-en-pinctrl { |
| 121 |
rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; |
| 122 |
}; |
| 123 |
}; |
| 124 |
}; |
| 125 |
|
| 126 |
&usb_host1_xhci { |
| 127 |
maximum-speed = "high-speed"; |
| 128 |
phys = <&usb2phy0_host>; |
| 129 |
phy-names = "usb2-phy"; |
| 130 |
status = "okay"; |
| 131 |
}; |
| 132 |
|
| 133 |
&usb2phy0_host { |
| 134 |
phy-supply = <&usb_host_vbus>; |
| 135 |
status = "okay"; |
| 136 |
}; |