1*710a568bSChristopher Obbard// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2*710a568bSChristopher Obbard/* 3*710a568bSChristopher Obbard * Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd 4*710a568bSChristopher Obbard */ 5*710a568bSChristopher Obbard 6*710a568bSChristopher Obbard/dts-v1/; 7*710a568bSChristopher Obbard#include <dt-bindings/input/input.h> 8*710a568bSChristopher Obbard#include <dt-bindings/leds/common.h> 9*710a568bSChristopher Obbard#include "px30-firefly-jd4-core.dtsi" 10*710a568bSChristopher Obbard 11*710a568bSChristopher Obbard/ { 12*710a568bSChristopher Obbard compatible = "firefly,px30-jd4-core-mb", "firefly,px30-jd4-core", 13*710a568bSChristopher Obbard "rockchip,px30"; 14*710a568bSChristopher Obbard model = "Firefly Core-PX30-JD4 on MB-JD4-PX30 baseboard"; 15*710a568bSChristopher Obbard 16*710a568bSChristopher Obbard aliases { 17*710a568bSChristopher Obbard ethernet0 = &gmac; 18*710a568bSChristopher Obbard mmc0 = &sdmmc; 19*710a568bSChristopher Obbard mmc1 = &sdio; 20*710a568bSChristopher Obbard mmc2 = &emmc; 21*710a568bSChristopher Obbard }; 22*710a568bSChristopher Obbard 23*710a568bSChristopher Obbard chosen { 24*710a568bSChristopher Obbard stdout-path = "serial2:115200n8"; 25*710a568bSChristopher Obbard }; 26*710a568bSChristopher Obbard 27*710a568bSChristopher Obbard dc_12v: regulator-dc-12v { 28*710a568bSChristopher Obbard compatible = "regulator-fixed"; 29*710a568bSChristopher Obbard regulator-name = "dc_12v"; 30*710a568bSChristopher Obbard regulator-always-on; 31*710a568bSChristopher Obbard regulator-boot-on; 32*710a568bSChristopher Obbard regulator-min-microvolt = <12000000>; 33*710a568bSChristopher Obbard regulator-max-microvolt = <12000000>; 34*710a568bSChristopher Obbard }; 35*710a568bSChristopher Obbard 36*710a568bSChristopher Obbard adc-keys { 37*710a568bSChristopher Obbard compatible = "adc-keys"; 38*710a568bSChristopher Obbard io-channels = <&saradc 2>; 39*710a568bSChristopher Obbard io-channel-names = "buttons"; 40*710a568bSChristopher Obbard keyup-threshold-microvolt = <1500000>; 41*710a568bSChristopher Obbard poll-interval = <100>; 42*710a568bSChristopher Obbard 43*710a568bSChristopher Obbard button-recovery { 44*710a568bSChristopher Obbard label = "Recovery"; 45*710a568bSChristopher Obbard linux,code = <KEY_VENDOR>; 46*710a568bSChristopher Obbard press-threshold-microvolt = <18000>; 47*710a568bSChristopher Obbard }; 48*710a568bSChristopher Obbard }; 49*710a568bSChristopher Obbard 50*710a568bSChristopher Obbard leds { 51*710a568bSChristopher Obbard compatible = "gpio-leds"; 52*710a568bSChristopher Obbard pinctrl-names = "default"; 53*710a568bSChristopher Obbard pinctrl-0 = <&blue_led>, <&green_led>; 54*710a568bSChristopher Obbard 55*710a568bSChristopher Obbard blue-led { 56*710a568bSChristopher Obbard color = <LED_COLOR_ID_BLUE>; 57*710a568bSChristopher Obbard default-state = "on"; 58*710a568bSChristopher Obbard function = LED_FUNCTION_HEARTBEAT; 59*710a568bSChristopher Obbard gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>; 60*710a568bSChristopher Obbard label = "px30-mb-jd4:blue:work"; 61*710a568bSChristopher Obbard linux,default-trigger = "heartbeat"; 62*710a568bSChristopher Obbard }; 63*710a568bSChristopher Obbard 64*710a568bSChristopher Obbard green-led { 65*710a568bSChristopher Obbard color = <LED_COLOR_ID_GREEN>; 66*710a568bSChristopher Obbard default-state = "on"; 67*710a568bSChristopher Obbard function = LED_FUNCTION_POWER; 68*710a568bSChristopher Obbard gpios = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>; 69*710a568bSChristopher Obbard label = "px30-mb-jd4:blue:diy"; 70*710a568bSChristopher Obbard linux,default-trigger = "default-on"; 71*710a568bSChristopher Obbard }; 72*710a568bSChristopher Obbard }; 73*710a568bSChristopher Obbard 74*710a568bSChristopher Obbard sdio_pwrseq: sdio-pwrseq { 75*710a568bSChristopher Obbard compatible = "mmc-pwrseq-simple"; 76*710a568bSChristopher Obbard pinctrl-names = "default"; 77*710a568bSChristopher Obbard pinctrl-0 = <&wifi_enable_h>; 78*710a568bSChristopher Obbard 79*710a568bSChristopher Obbard /* 80*710a568bSChristopher Obbard * On the module itself this is one of these (depending 81*710a568bSChristopher Obbard * on the actual card populated): 82*710a568bSChristopher Obbard * - SDIO_RESET_L_WL_REG_ON 83*710a568bSChristopher Obbard * - PDN (power down when low) 84*710a568bSChristopher Obbard */ 85*710a568bSChristopher Obbard reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */ 86*710a568bSChristopher Obbard }; 87*710a568bSChristopher Obbard 88*710a568bSChristopher Obbard vcc5v0_baseboard: regulator-vcc5v0-baseboard { 89*710a568bSChristopher Obbard compatible = "regulator-fixed"; 90*710a568bSChristopher Obbard regulator-name = "vcc5v0_baseboard"; 91*710a568bSChristopher Obbard regulator-always-on; 92*710a568bSChristopher Obbard regulator-boot-on; 93*710a568bSChristopher Obbard regulator-min-microvolt = <5000000>; 94*710a568bSChristopher Obbard regulator-max-microvolt = <5000000>; 95*710a568bSChristopher Obbard vin-supply = <&dc_12v>; 96*710a568bSChristopher Obbard }; 97*710a568bSChristopher Obbard}; 98*710a568bSChristopher Obbard 99*710a568bSChristopher Obbard&gmac { 100*710a568bSChristopher Obbard clock_in_out = "output"; 101*710a568bSChristopher Obbard phy-supply = <&vcc_rmii>; 102*710a568bSChristopher Obbard snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>; 103*710a568bSChristopher Obbard snps,reset-active-low; 104*710a568bSChristopher Obbard snps,reset-delays-us = <0 50000 50000>; 105*710a568bSChristopher Obbard status = "okay"; 106*710a568bSChristopher Obbard}; 107*710a568bSChristopher Obbard 108*710a568bSChristopher Obbard&pinctrl { 109*710a568bSChristopher Obbard leds { 110*710a568bSChristopher Obbard blue_led: blue-led { 111*710a568bSChristopher Obbard rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; 112*710a568bSChristopher Obbard }; 113*710a568bSChristopher Obbard 114*710a568bSChristopher Obbard green_led: green-led { 115*710a568bSChristopher Obbard rockchip,pins = <1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; 116*710a568bSChristopher Obbard }; 117*710a568bSChristopher Obbard }; 118*710a568bSChristopher Obbard 119*710a568bSChristopher Obbard sdio-pwrseq { 120*710a568bSChristopher Obbard wifi_enable_h: wifi-enable-h { 121*710a568bSChristopher Obbard rockchip,pins = 122*710a568bSChristopher Obbard <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 123*710a568bSChristopher Obbard }; 124*710a568bSChristopher Obbard }; 125*710a568bSChristopher Obbard}; 126*710a568bSChristopher Obbard 127*710a568bSChristopher Obbard&sdmmc { 128*710a568bSChristopher Obbard bus-width = <4>; 129*710a568bSChristopher Obbard cap-mmc-highspeed; 130*710a568bSChristopher Obbard cap-sd-highspeed; 131*710a568bSChristopher Obbard card-detect-delay = <800>; 132*710a568bSChristopher Obbard sd-uhs-sdr12; 133*710a568bSChristopher Obbard sd-uhs-sdr25; 134*710a568bSChristopher Obbard sd-uhs-sdr50; 135*710a568bSChristopher Obbard sd-uhs-sdr104; 136*710a568bSChristopher Obbard vmmc-supply = <&vcc_sd>; 137*710a568bSChristopher Obbard vqmmc-supply = <&vccio_sd>; 138*710a568bSChristopher Obbard status = "okay"; 139*710a568bSChristopher Obbard}; 140*710a568bSChristopher Obbard 141*710a568bSChristopher Obbard&sdio { 142*710a568bSChristopher Obbard bus-width = <4>; 143*710a568bSChristopher Obbard cap-sd-highspeed; 144*710a568bSChristopher Obbard keep-power-in-suspend; 145*710a568bSChristopher Obbard non-removable; 146*710a568bSChristopher Obbard mmc-pwrseq = <&sdio_pwrseq>; 147*710a568bSChristopher Obbard sd-uhs-sdr104; 148*710a568bSChristopher Obbard status = "okay"; 149*710a568bSChristopher Obbard}; 150*710a568bSChristopher Obbard 151*710a568bSChristopher Obbard&u2phy { 152*710a568bSChristopher Obbard status = "okay"; 153*710a568bSChristopher Obbard 154*710a568bSChristopher Obbard u2phy_host: host-port { 155*710a568bSChristopher Obbard status = "okay"; 156*710a568bSChristopher Obbard }; 157*710a568bSChristopher Obbard 158*710a568bSChristopher Obbard u2phy_otg: otg-port { 159*710a568bSChristopher Obbard status = "okay"; 160*710a568bSChristopher Obbard }; 161*710a568bSChristopher Obbard}; 162*710a568bSChristopher Obbard 163*710a568bSChristopher Obbard&uart2 { 164*710a568bSChristopher Obbard pinctrl-names = "default"; 165*710a568bSChristopher Obbard pinctrl-0 = <&uart2m1_xfer>; 166*710a568bSChristopher Obbard status = "okay"; 167*710a568bSChristopher Obbard}; 168*710a568bSChristopher Obbard 169*710a568bSChristopher Obbard&usb20_otg { 170*710a568bSChristopher Obbard status = "okay"; 171*710a568bSChristopher Obbard}; 172*710a568bSChristopher Obbard 173*710a568bSChristopher Obbard&usb_host0_ehci { 174*710a568bSChristopher Obbard status = "okay"; 175*710a568bSChristopher Obbard}; 176*710a568bSChristopher Obbard 177*710a568bSChristopher Obbard&usb_host0_ohci { 178*710a568bSChristopher Obbard status = "okay"; 179*710a568bSChristopher Obbard}; 180