1096ebfb7SJagan Teki// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2096ebfb7SJagan Teki/* 3096ebfb7SJagan Teki * Copyright (c) 2022 Radxa Limited 4096ebfb7SJagan Teki * Copyright (c) 2022 Amarula Solutions(India) 5096ebfb7SJagan Teki */ 6096ebfb7SJagan Teki 7096ebfb7SJagan Teki/dts-v1/; 8096ebfb7SJagan Teki#include <dt-bindings/soc/rockchip,vop2.h> 9096ebfb7SJagan Teki#include "rk3566.dtsi" 10096ebfb7SJagan Teki#include "rk3566-radxa-cm3.dtsi" 11096ebfb7SJagan Teki 12096ebfb7SJagan Teki/ { 13096ebfb7SJagan Teki model = "Radxa Compute Module 3(CM3) IO Board"; 148f198288SJagan Teki compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566"; 15096ebfb7SJagan Teki 16096ebfb7SJagan Teki aliases { 17096ebfb7SJagan Teki mmc1 = &sdmmc0; 18096ebfb7SJagan Teki }; 19096ebfb7SJagan Teki 20096ebfb7SJagan Teki chosen: chosen { 21096ebfb7SJagan Teki stdout-path = "serial2:1500000n8"; 22096ebfb7SJagan Teki }; 23096ebfb7SJagan Teki 24cc52bfc0SManoj Sai gmac1_clkin: external-gmac1-clock { 25cc52bfc0SManoj Sai compatible = "fixed-clock"; 26cc52bfc0SManoj Sai clock-frequency = <125000000>; 27cc52bfc0SManoj Sai clock-output-names = "gmac1_clkin"; 28cc52bfc0SManoj Sai #clock-cells = <0>; 29cc52bfc0SManoj Sai }; 30cc52bfc0SManoj Sai 31096ebfb7SJagan Teki hdmi-con { 32096ebfb7SJagan Teki compatible = "hdmi-connector"; 33096ebfb7SJagan Teki type = "a"; 34096ebfb7SJagan Teki 35096ebfb7SJagan Teki port { 36096ebfb7SJagan Teki hdmi_con_in: endpoint { 37096ebfb7SJagan Teki remote-endpoint = <&hdmi_out_con>; 38096ebfb7SJagan Teki }; 39096ebfb7SJagan Teki }; 40096ebfb7SJagan Teki }; 41096ebfb7SJagan Teki 42096ebfb7SJagan Teki leds { 43096ebfb7SJagan Teki compatible = "gpio-leds"; 44096ebfb7SJagan Teki 45096ebfb7SJagan Teki led-1 { 46096ebfb7SJagan Teki gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>; 47096ebfb7SJagan Teki color = <LED_COLOR_ID_GREEN>; 48096ebfb7SJagan Teki function = LED_FUNCTION_ACTIVITY; 49096ebfb7SJagan Teki linux,default-trigger = "heartbeat"; 50096ebfb7SJagan Teki pinctrl-names = "default"; 51096ebfb7SJagan Teki pinctrl-0 = <&pi_nled_activity>; 52096ebfb7SJagan Teki }; 53096ebfb7SJagan Teki }; 54096ebfb7SJagan Teki 55096ebfb7SJagan Teki vcc5v0_usb30: vcc5v0-usb30-regulator { 56096ebfb7SJagan Teki compatible = "regulator-fixed"; 57096ebfb7SJagan Teki regulator-name = "vcc5v0_usb30"; 58096ebfb7SJagan Teki enable-active-high; 59096ebfb7SJagan Teki gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>; 60096ebfb7SJagan Teki pinctrl-names = "default"; 61096ebfb7SJagan Teki pinctrl-0 = <&vcc5v0_usb30_en_h>; 62096ebfb7SJagan Teki regulator-always-on; 63096ebfb7SJagan Teki regulator-min-microvolt = <5000000>; 64096ebfb7SJagan Teki regulator-max-microvolt = <5000000>; 65096ebfb7SJagan Teki vin-supply = <&vcc_sys>; 66096ebfb7SJagan Teki }; 67096ebfb7SJagan Teki 68096ebfb7SJagan Teki vcca1v8_image: vcca1v8-image-regulator { 69096ebfb7SJagan Teki compatible = "regulator-fixed"; 70096ebfb7SJagan Teki regulator-name = "vcca1v8_image"; 71096ebfb7SJagan Teki regulator-always-on; 72096ebfb7SJagan Teki regulator-boot-on; 73096ebfb7SJagan Teki regulator-min-microvolt = <1800000>; 74096ebfb7SJagan Teki regulator-max-microvolt = <1800000>; 75096ebfb7SJagan Teki vin-supply = <&vcc_1v8_p>; 76096ebfb7SJagan Teki }; 77096ebfb7SJagan Teki 78096ebfb7SJagan Teki vdda0v9_image: vdda0v9-image-regulator { 79096ebfb7SJagan Teki compatible = "regulator-fixed"; 80096ebfb7SJagan Teki regulator-name = "vcca0v9_image"; 81096ebfb7SJagan Teki regulator-always-on; 82096ebfb7SJagan Teki regulator-boot-on; 83096ebfb7SJagan Teki regulator-min-microvolt = <900000>; 84096ebfb7SJagan Teki regulator-max-microvolt = <900000>; 85096ebfb7SJagan Teki vin-supply = <&vdda_0v9>; 86096ebfb7SJagan Teki }; 87096ebfb7SJagan Teki}; 88096ebfb7SJagan Teki 89096ebfb7SJagan Teki&combphy1 { 90096ebfb7SJagan Teki status = "okay"; 91096ebfb7SJagan Teki}; 92096ebfb7SJagan Teki 93cc52bfc0SManoj Sai&gmac1 { 94cc52bfc0SManoj Sai assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>; 95cc52bfc0SManoj Sai assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>; 96cc52bfc0SManoj Sai assigned-clock-rates = <0>, <125000000>; 97cc52bfc0SManoj Sai clock_in_out = "input"; 98cc52bfc0SManoj Sai phy-handle = <&rgmii_phy1>; 99cc52bfc0SManoj Sai phy-mode = "rgmii"; 100cc52bfc0SManoj Sai pinctrl-names = "default"; 101cc52bfc0SManoj Sai pinctrl-0 = <&gmac1m0_miim 102cc52bfc0SManoj Sai &gmac1m0_tx_bus2 103cc52bfc0SManoj Sai &gmac1m0_rx_bus2 104cc52bfc0SManoj Sai &gmac1m0_rgmii_clk 105cc52bfc0SManoj Sai &gmac1m0_rgmii_bus 106cc52bfc0SManoj Sai &gmac1m0_clkinout>; 107cc52bfc0SManoj Sai snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>; 108cc52bfc0SManoj Sai snps,reset-active-low; 109cc52bfc0SManoj Sai /* Reset time is 20ms, 100ms for rtl8211f */ 110cc52bfc0SManoj Sai snps,reset-delays-us = <0 20000 100000>; 111cc52bfc0SManoj Sai tx_delay = <0x46>; 112cc52bfc0SManoj Sai rx_delay = <0x2e>; 113cc52bfc0SManoj Sai status = "okay"; 114cc52bfc0SManoj Sai}; 115cc52bfc0SManoj Sai 116096ebfb7SJagan Teki&hdmi { 117096ebfb7SJagan Teki avdd-0v9-supply = <&vdda0v9_image>; 118096ebfb7SJagan Teki avdd-1v8-supply = <&vcca1v8_image>; 119096ebfb7SJagan Teki status = "okay"; 120096ebfb7SJagan Teki}; 121096ebfb7SJagan Teki 122096ebfb7SJagan Teki&hdmi_in { 123096ebfb7SJagan Teki hdmi_in_vp0: endpoint { 124096ebfb7SJagan Teki remote-endpoint = <&vp0_out_hdmi>; 125096ebfb7SJagan Teki }; 126096ebfb7SJagan Teki}; 127096ebfb7SJagan Teki 128096ebfb7SJagan Teki&hdmi_out { 129096ebfb7SJagan Teki hdmi_out_con: endpoint { 130096ebfb7SJagan Teki remote-endpoint = <&hdmi_con_in>; 131096ebfb7SJagan Teki }; 132096ebfb7SJagan Teki}; 133096ebfb7SJagan Teki 134096ebfb7SJagan Teki&hdmi_sound { 135096ebfb7SJagan Teki status = "okay"; 136096ebfb7SJagan Teki}; 137096ebfb7SJagan Teki 138cc52bfc0SManoj Sai&mdio1 { 139cc52bfc0SManoj Sai rgmii_phy1: ethernet-phy@0 { 140cc52bfc0SManoj Sai compatible = "ethernet-phy-ieee802.3-c22"; 141cc52bfc0SManoj Sai reg = <0x0>; 142cc52bfc0SManoj Sai }; 143cc52bfc0SManoj Sai}; 144cc52bfc0SManoj Sai 145096ebfb7SJagan Teki&pinctrl { 146cc52bfc0SManoj Sai gmac1 { 147cc52bfc0SManoj Sai gmac1m0_miim: gmac1m0-miim { 148cc52bfc0SManoj Sai rockchip,pins = 149cc52bfc0SManoj Sai /* gmac1_mdcm0 */ 150cc52bfc0SManoj Sai <3 RK_PC4 3 &pcfg_pull_none_drv_level_15>, 151cc52bfc0SManoj Sai /* gmac1_mdiom0 */ 152cc52bfc0SManoj Sai <3 RK_PC5 3 &pcfg_pull_none_drv_level_15>; 153cc52bfc0SManoj Sai }; 154cc52bfc0SManoj Sai 155cc52bfc0SManoj Sai gmac1m0_rx_bus2: gmac1m0-rx-bus2 { 156cc52bfc0SManoj Sai rockchip,pins = 157cc52bfc0SManoj Sai /* gmac1_rxd0m0 */ 158cc52bfc0SManoj Sai <3 RK_PB1 3 &pcfg_pull_none_drv_level_15>, 159cc52bfc0SManoj Sai /* gmac1_rxd1m0 */ 160cc52bfc0SManoj Sai <3 RK_PB2 3 &pcfg_pull_none_drv_level_15>, 161cc52bfc0SManoj Sai /* gmac1_rxdvcrsm0 */ 162cc52bfc0SManoj Sai <3 RK_PB3 3 &pcfg_pull_none_drv_level_15>; 163cc52bfc0SManoj Sai }; 164cc52bfc0SManoj Sai 165cc52bfc0SManoj Sai gmac1m0_tx_bus2: gmac1m0-tx-bus2 { 166cc52bfc0SManoj Sai rockchip,pins = 167cc52bfc0SManoj Sai /* gmac1_txd0m0 */ 168cc52bfc0SManoj Sai <3 RK_PB5 3 &pcfg_pull_none_drv_level_15>, 169cc52bfc0SManoj Sai /* gmac1_txd1m0 */ 170cc52bfc0SManoj Sai <3 RK_PB6 3 &pcfg_pull_none_drv_level_15>, 171cc52bfc0SManoj Sai /* gmac1_txenm0 */ 172cc52bfc0SManoj Sai <3 RK_PB7 3 &pcfg_pull_none_drv_level_15>; 173cc52bfc0SManoj Sai }; 174cc52bfc0SManoj Sai 175cc52bfc0SManoj Sai gmac1m0_rgmii_clk: gmac1m0-rgmii-clk { 176cc52bfc0SManoj Sai rockchip,pins = 177cc52bfc0SManoj Sai /* gmac1_rxclkm0 */ 178cc52bfc0SManoj Sai <3 RK_PA7 3 &pcfg_pull_none_drv_level_15>, 179cc52bfc0SManoj Sai /* gmac1_txclkm0 */ 180cc52bfc0SManoj Sai <3 RK_PA6 3 &pcfg_pull_none_drv_level_15>; 181cc52bfc0SManoj Sai }; 182cc52bfc0SManoj Sai 183cc52bfc0SManoj Sai gmac1m0_rgmii_bus: gmac1m0-rgmii-bus { 184cc52bfc0SManoj Sai rockchip,pins = 185cc52bfc0SManoj Sai /* gmac1_rxd2m0 */ 186cc52bfc0SManoj Sai <3 RK_PA4 3 &pcfg_pull_none_drv_level_15>, 187cc52bfc0SManoj Sai /* gmac1_rxd3m0 */ 188cc52bfc0SManoj Sai <3 RK_PA5 3 &pcfg_pull_none_drv_level_15>, 189cc52bfc0SManoj Sai /* gmac1_txd2m0 */ 190cc52bfc0SManoj Sai <3 RK_PA2 3 &pcfg_pull_none_drv_level_15>, 191cc52bfc0SManoj Sai /* gmac1_txd3m0 */ 192cc52bfc0SManoj Sai <3 RK_PA3 3 &pcfg_pull_none_drv_level_15>; 193cc52bfc0SManoj Sai }; 194cc52bfc0SManoj Sai 195cc52bfc0SManoj Sai gmac1m0_clkinout: gmac1m0-clkinout { 196cc52bfc0SManoj Sai rockchip,pins = 197cc52bfc0SManoj Sai /* gmac1_mclkinoutm0 */ 198cc52bfc0SManoj Sai <3 RK_PC0 3 &pcfg_pull_none_drv_level_15>; 199cc52bfc0SManoj Sai }; 200cc52bfc0SManoj Sai }; 201cc52bfc0SManoj Sai 202096ebfb7SJagan Teki leds { 203096ebfb7SJagan Teki pi_nled_activity: pi-nled-activity { 204096ebfb7SJagan Teki rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 205096ebfb7SJagan Teki }; 206096ebfb7SJagan Teki }; 207096ebfb7SJagan Teki 208096ebfb7SJagan Teki sdcard { 209096ebfb7SJagan Teki sdmmc_pwren: sdmmc-pwren { 210096ebfb7SJagan Teki rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 211096ebfb7SJagan Teki }; 212096ebfb7SJagan Teki }; 213096ebfb7SJagan Teki 214096ebfb7SJagan Teki usb { 215096ebfb7SJagan Teki vcc5v0_usb30_en_h: vcc5v0-host-en-h { 216096ebfb7SJagan Teki rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; 217096ebfb7SJagan Teki }; 218096ebfb7SJagan Teki }; 219096ebfb7SJagan Teki}; 220096ebfb7SJagan Teki 221096ebfb7SJagan Teki&sdmmc0 { 222096ebfb7SJagan Teki bus-width = <4>; 223096ebfb7SJagan Teki cap-mmc-highspeed; 224096ebfb7SJagan Teki cap-sd-highspeed; 225096ebfb7SJagan Teki disable-wp; 226096ebfb7SJagan Teki vqmmc-supply = <&vccio_sd>; 227096ebfb7SJagan Teki pinctrl-names = "default"; 228096ebfb7SJagan Teki pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_pwren>; 229096ebfb7SJagan Teki status = "okay"; 230096ebfb7SJagan Teki}; 231096ebfb7SJagan Teki 232096ebfb7SJagan Teki&uart2 { 233096ebfb7SJagan Teki status = "okay"; 234096ebfb7SJagan Teki}; 235096ebfb7SJagan Teki 236096ebfb7SJagan Teki&usb2phy0_host { 237096ebfb7SJagan Teki phy-supply = <&vcc5v0_usb30>; 238096ebfb7SJagan Teki status = "okay"; 239096ebfb7SJagan Teki}; 240096ebfb7SJagan Teki 241096ebfb7SJagan Teki&usb2phy1_host { 242096ebfb7SJagan Teki status = "okay"; 243096ebfb7SJagan Teki}; 244096ebfb7SJagan Teki 245096ebfb7SJagan Teki&usb2phy1_otg { 246096ebfb7SJagan Teki status = "okay"; 247096ebfb7SJagan Teki}; 248096ebfb7SJagan Teki 249096ebfb7SJagan Teki&usb_host0_ehci { 250096ebfb7SJagan Teki status = "okay"; 251096ebfb7SJagan Teki}; 252096ebfb7SJagan Teki 253096ebfb7SJagan Teki&usb_host1_xhci { 254096ebfb7SJagan Teki status = "okay"; 255096ebfb7SJagan Teki}; 256096ebfb7SJagan Teki 257*477ed3adSManoj Sai&usb2phy0_otg { 258*477ed3adSManoj Sai status = "okay"; 259*477ed3adSManoj Sai}; 260*477ed3adSManoj Sai 261*477ed3adSManoj Sai&usb_host0_xhci { 262*477ed3adSManoj Sai status = "okay"; 263*477ed3adSManoj Sai}; 264*477ed3adSManoj Sai 265096ebfb7SJagan Teki&vop { 266096ebfb7SJagan Teki assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; 267096ebfb7SJagan Teki assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; 268096ebfb7SJagan Teki status = "okay"; 269096ebfb7SJagan Teki}; 270096ebfb7SJagan Teki 271096ebfb7SJagan Teki&vop_mmu { 272096ebfb7SJagan Teki status = "okay"; 273096ebfb7SJagan Teki}; 274096ebfb7SJagan Teki 275096ebfb7SJagan Teki&vp0 { 276096ebfb7SJagan Teki vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { 277096ebfb7SJagan Teki reg = <ROCKCHIP_VOP2_EP_HDMI0>; 278096ebfb7SJagan Teki remote-endpoint = <&hdmi_in_vp0>; 279096ebfb7SJagan Teki }; 280096ebfb7SJagan Teki}; 281