1*724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ or MIT) 2*724ba675SRob Herring// Copyright (C) 2022 Arm Ltd. 3*724ba675SRob Herring/* 4*724ba675SRob Herring * Common peripherals and configurations for MangoPi MQ-R boards. 5*724ba675SRob Herring */ 6*724ba675SRob Herring 7*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 8*724ba675SRob Herring#include <dt-bindings/leds/common.h> 9*724ba675SRob Herring 10*724ba675SRob Herring/ { 11*724ba675SRob Herring aliases { 12*724ba675SRob Herring serial3 = &uart3; 13*724ba675SRob Herring }; 14*724ba675SRob Herring 15*724ba675SRob Herring chosen { 16*724ba675SRob Herring stdout-path = "serial3:115200n8"; 17*724ba675SRob Herring }; 18*724ba675SRob Herring 19*724ba675SRob Herring leds { 20*724ba675SRob Herring compatible = "gpio-leds"; 21*724ba675SRob Herring 22*724ba675SRob Herring led-0 { 23*724ba675SRob Herring color = <LED_COLOR_ID_BLUE>; 24*724ba675SRob Herring function = LED_FUNCTION_STATUS; 25*724ba675SRob Herring gpios = <&pio 3 22 GPIO_ACTIVE_LOW>; /* PD22 */ 26*724ba675SRob Herring }; 27*724ba675SRob Herring }; 28*724ba675SRob Herring 29*724ba675SRob Herring /* board wide 5V supply directly from the USB-C socket */ 30*724ba675SRob Herring reg_vcc5v: regulator-5v { 31*724ba675SRob Herring compatible = "regulator-fixed"; 32*724ba675SRob Herring regulator-name = "vcc-5v"; 33*724ba675SRob Herring regulator-min-microvolt = <5000000>; 34*724ba675SRob Herring regulator-max-microvolt = <5000000>; 35*724ba675SRob Herring regulator-always-on; 36*724ba675SRob Herring }; 37*724ba675SRob Herring 38*724ba675SRob Herring /* SY8008 DC/DC regulator on the board */ 39*724ba675SRob Herring reg_3v3: regulator-3v3 { 40*724ba675SRob Herring compatible = "regulator-fixed"; 41*724ba675SRob Herring regulator-name = "vcc-3v3"; 42*724ba675SRob Herring regulator-min-microvolt = <3300000>; 43*724ba675SRob Herring regulator-max-microvolt = <3300000>; 44*724ba675SRob Herring vin-supply = <®_vcc5v>; 45*724ba675SRob Herring }; 46*724ba675SRob Herring 47*724ba675SRob Herring /* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */ 48*724ba675SRob Herring reg_vcc_core: regulator-core { 49*724ba675SRob Herring compatible = "regulator-fixed"; 50*724ba675SRob Herring regulator-name = "vcc-core"; 51*724ba675SRob Herring regulator-min-microvolt = <880000>; 52*724ba675SRob Herring regulator-max-microvolt = <880000>; 53*724ba675SRob Herring vin-supply = <®_vcc5v>; 54*724ba675SRob Herring }; 55*724ba675SRob Herring 56*724ba675SRob Herring /* XC6206 LDO on the board */ 57*724ba675SRob Herring reg_avdd2v8: regulator-avdd { 58*724ba675SRob Herring compatible = "regulator-fixed"; 59*724ba675SRob Herring regulator-name = "avdd2v8"; 60*724ba675SRob Herring regulator-min-microvolt = <2800000>; 61*724ba675SRob Herring regulator-max-microvolt = <2800000>; 62*724ba675SRob Herring vin-supply = <®_3v3>; 63*724ba675SRob Herring }; 64*724ba675SRob Herring 65*724ba675SRob Herring wifi_pwrseq: wifi-pwrseq { 66*724ba675SRob Herring compatible = "mmc-pwrseq-simple"; 67*724ba675SRob Herring reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */ 68*724ba675SRob Herring }; 69*724ba675SRob Herring}; 70*724ba675SRob Herring 71*724ba675SRob Herring&dcxo { 72*724ba675SRob Herring clock-frequency = <24000000>; 73*724ba675SRob Herring}; 74*724ba675SRob Herring 75*724ba675SRob Herring&ehci1 { 76*724ba675SRob Herring status = "okay"; 77*724ba675SRob Herring}; 78*724ba675SRob Herring 79*724ba675SRob Herring&mmc0 { 80*724ba675SRob Herring pinctrl-0 = <&mmc0_pins>; 81*724ba675SRob Herring pinctrl-names = "default"; 82*724ba675SRob Herring vmmc-supply = <®_3v3>; 83*724ba675SRob Herring cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 84*724ba675SRob Herring disable-wp; 85*724ba675SRob Herring bus-width = <4>; 86*724ba675SRob Herring status = "okay"; 87*724ba675SRob Herring}; 88*724ba675SRob Herring 89*724ba675SRob Herring&mmc1 { 90*724ba675SRob Herring pinctrl-0 = <&mmc1_pins>; 91*724ba675SRob Herring pinctrl-names = "default"; 92*724ba675SRob Herring vmmc-supply = <®_3v3>; 93*724ba675SRob Herring non-removable; 94*724ba675SRob Herring bus-width = <4>; 95*724ba675SRob Herring mmc-pwrseq = <&wifi_pwrseq>; 96*724ba675SRob Herring status = "okay"; 97*724ba675SRob Herring}; 98*724ba675SRob Herring 99*724ba675SRob Herring&ohci1 { 100*724ba675SRob Herring status = "okay"; 101*724ba675SRob Herring}; 102*724ba675SRob Herring 103*724ba675SRob Herring&pio { 104*724ba675SRob Herring vcc-pb-supply = <®_3v3>; 105*724ba675SRob Herring vcc-pd-supply = <®_3v3>; 106*724ba675SRob Herring vcc-pe-supply = <®_avdd2v8>; 107*724ba675SRob Herring vcc-pf-supply = <®_3v3>; 108*724ba675SRob Herring vcc-pg-supply = <®_3v3>; 109*724ba675SRob Herring}; 110*724ba675SRob Herring 111*724ba675SRob Herring&uart3 { 112*724ba675SRob Herring pinctrl-names = "default"; 113*724ba675SRob Herring pinctrl-0 = <&uart3_pb_pins>; 114*724ba675SRob Herring status = "okay"; 115*724ba675SRob Herring}; 116*724ba675SRob Herring 117*724ba675SRob Herring/* The USB-C socket has its CC pins pulled to GND, so is hardwired as a UFP. */ 118*724ba675SRob Herring&usb_otg { 119*724ba675SRob Herring dr_mode = "peripheral"; 120*724ba675SRob Herring status = "okay"; 121*724ba675SRob Herring}; 122*724ba675SRob Herring 123*724ba675SRob Herring&usbphy { 124*724ba675SRob Herring usb1_vbus-supply = <®_vcc5v>; 125*724ba675SRob Herring status = "okay"; 126*724ba675SRob Herring}; 127