| 1 |
// SPDX-License-Identifier: (GPL-2.0+ OR MIT) |
| 2 |
/* |
| 3 |
* Copyright (c) 2025 Radxa Computer (Shenzhen) Co., Ltd. |
| 4 |
*/ |
| 5 |
|
| 6 |
/dts-v1/; |
| 7 |
|
| 8 |
#include <dt-bindings/leds/common.h> |
| 9 |
#include <dt-bindings/gpio/gpio.h> |
| 10 |
#include <dt-bindings/pinctrl/rockchip.h> |
| 11 |
#include "rk3568-radxa-cm3j.dtsi" |
| 12 |
|
| 13 |
/ { |
| 14 |
model = "Radxa CM3J on RPi CM4 IO Board"; |
| 15 |
compatible = "radxa,cm3j-rpi-cm4", "radxa,cm3j", "rockchip,rk3568"; |
| 16 |
|
| 17 |
aliases { |
| 18 |
ethernet0 = &gmac1; |
| 19 |
mmc1 = &sdmmc0; |
| 20 |
rtc0 = &pcf85063; |
| 21 |
}; |
| 22 |
|
| 23 |
chosen { |
| 24 |
stdout-path = "serial2:1500000n8"; |
| 25 |
}; |
| 26 |
|
| 27 |
hdmi-con { |
| 28 |
compatible = "hdmi-connector"; |
| 29 |
type = "a"; |
| 30 |
|
| 31 |
port { |
| 32 |
hdmi_con_in: endpoint { |
| 33 |
remote-endpoint = <&hdmi_out_con>; |
| 34 |
}; |
| 35 |
}; |
| 36 |
}; |
| 37 |
|
| 38 |
leds-1 { |
| 39 |
compatible = "gpio-leds"; |
| 40 |
|
| 41 |
led-1 { |
| 42 |
color = <LED_COLOR_ID_RED>; |
| 43 |
default-state = "on"; |
| 44 |
function = LED_FUNCTION_POWER; |
| 45 |
gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_LOW>; |
| 46 |
pinctrl-names = "default"; |
| 47 |
pinctrl-0 = <&npwr_led>; |
| 48 |
}; |
| 49 |
|
| 50 |
led-2 { |
| 51 |
color = <LED_COLOR_ID_GREEN>; |
| 52 |
default-state = "on"; |
| 53 |
function = LED_FUNCTION_STATUS; |
| 54 |
gpios = <&gpio4 RK_PC6 GPIO_ACTIVE_LOW>; |
| 55 |
linux,default-trigger = "heartbeat"; |
| 56 |
pinctrl-names = "default"; |
| 57 |
pinctrl-0 = <&pi_nled_activity>; |
| 58 |
}; |
| 59 |
}; |
| 60 |
|
| 61 |
dc12v: regulator-12v0 { |
| 62 |
compatible = "regulator-fixed"; |
| 63 |
regulator-name = "dc12v"; |
| 64 |
regulator-always-on; |
| 65 |
regulator-boot-on; |
| 66 |
regulator-min-microvolt = <12000000>; |
| 67 |
regulator-max-microvolt = <12000000>; |
| 68 |
}; |
| 69 |
|
| 70 |
dc3v3_pcie: regulator-3v3-2 { |
| 71 |
compatible = "regulator-fixed"; |
| 72 |
regulator-name = "dc3v3_pcie"; |
| 73 |
regulator-always-on; |
| 74 |
regulator-boot-on; |
| 75 |
regulator-min-microvolt = <3300000>; |
| 76 |
regulator-max-microvolt = <3300000>; |
| 77 |
vin-supply = <&dc12v>; |
| 78 |
}; |
| 79 |
|
| 80 |
gpio_vref: regulator-3v3-3 { |
| 81 |
compatible = "regulator-fixed"; |
| 82 |
regulator-name = "gpio_vref"; |
| 83 |
regulator-always-on; |
| 84 |
regulator-boot-on; |
| 85 |
regulator-min-microvolt = <3300000>; |
| 86 |
regulator-max-microvolt = <3300000>; |
| 87 |
vin-supply = <&dc3v3>; |
| 88 |
}; |
| 89 |
|
| 90 |
dc5v: regulator-5v0 { |
| 91 |
compatible = "regulator-fixed"; |
| 92 |
regulator-name = "dc5v"; |
| 93 |
regulator-always-on; |
| 94 |
regulator-boot-on; |
| 95 |
regulator-min-microvolt = <5000000>; |
| 96 |
regulator-max-microvolt = <5000000>; |
| 97 |
vin-supply = <&dc12v>; |
| 98 |
}; |
| 99 |
}; |
| 100 |
|
| 101 |
&combphy0 { |
| 102 |
status = "okay"; |
| 103 |
}; |
| 104 |
|
| 105 |
&combphy2 { |
| 106 |
status = "okay"; |
| 107 |
}; |
| 108 |
|
| 109 |
&gmac1 { |
| 110 |
status = "okay"; |
| 111 |
}; |
| 112 |
|
| 113 |
&gpio0 { |
| 114 |
nextrst-hog { |
| 115 |
gpio-hog; |
| 116 |
/* |
| 117 |
* GPIO_ACTIVE_LOW + output-low here means that the pin is set |
| 118 |
* to high, because output-low decides the value pre-inversion. |
| 119 |
*/ |
| 120 |
gpios = <RK_PC0 GPIO_ACTIVE_LOW>; |
| 121 |
line-name = "nEXTRST"; |
| 122 |
output-low; |
| 123 |
}; |
| 124 |
}; |
| 125 |
|
| 126 |
&hdmi { |
| 127 |
status = "okay"; |
| 128 |
}; |
| 129 |
|
| 130 |
&hdmi_sound { |
| 131 |
status = "okay"; |
| 132 |
}; |
| 133 |
|
| 134 |
&i2c0 { |
| 135 |
emc2301: fan-controller@2f { |
| 136 |
compatible = "microchip,emc2301", "microchip,emc2305"; |
| 137 |
reg = <0x2f>; |
| 138 |
#address-cells = <1>; |
| 139 |
#size-cells = <0>; |
| 140 |
#pwm-cells = <3>; |
| 141 |
|
| 142 |
fan@0 { |
| 143 |
reg = <0x0>; |
| 144 |
pwms = <&emc2301 26000 0 1>; |
| 145 |
#cooling-cells = <2>; |
| 146 |
}; |
| 147 |
}; |
| 148 |
|
| 149 |
pcf85063: rtc@51 { |
| 150 |
compatible = "nxp,pcf85063a"; |
| 151 |
reg = <0x51>; |
| 152 |
wakeup-source; |
| 153 |
}; |
| 154 |
}; |
| 155 |
|
| 156 |
&i2s0_8ch { |
| 157 |
status = "okay"; |
| 158 |
}; |
| 159 |
|
| 160 |
&pinctrl { |
| 161 |
leds { |
| 162 |
npwr_led: npwr-led { |
| 163 |
rockchip,pins = <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; |
| 164 |
}; |
| 165 |
|
| 166 |
pi_nled_activity: pi-nled-activity { |
| 167 |
rockchip,pins = <4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; |
| 168 |
}; |
| 169 |
}; |
| 170 |
}; |
| 171 |
|
| 172 |
&pcie2x1 { |
| 173 |
vpcie3v3-supply = <&dc3v3_pcie>; |
| 174 |
status = "okay"; |
| 175 |
}; |
| 176 |
|
| 177 |
&sdmmc0 { |
| 178 |
bus-width = <4>; |
| 179 |
cap-sd-highspeed; |
| 180 |
broken-cd; |
| 181 |
disable-wp; |
| 182 |
no-mmc; |
| 183 |
no-sdio; |
| 184 |
pinctrl-names = "default"; |
| 185 |
pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd>; |
| 186 |
vmmc-supply = <&dc3v3>; |
| 187 |
status = "okay"; |
| 188 |
}; |
| 189 |
|
| 190 |
&uart2 { |
| 191 |
status = "okay"; |
| 192 |
}; |
| 193 |
|
| 194 |
&usb2phy0 { |
| 195 |
status = "okay"; |
| 196 |
}; |
| 197 |
|
| 198 |
&usb2phy0_otg { |
| 199 |
status = "okay"; |
| 200 |
}; |
| 201 |
|
| 202 |
&usb_host0_xhci { |
| 203 |
status = "okay"; |
| 204 |
}; |