1*79f74d4cSKrzysztof Kozlowski// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2724ba675SRob Herring// Copyright (C) 2022 Arm Ltd. 3724ba675SRob Herring/* 4724ba675SRob Herring * Common peripherals and configurations for MangoPi MQ-R boards. 5724ba675SRob Herring */ 6724ba675SRob Herring 7724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 8724ba675SRob Herring#include <dt-bindings/leds/common.h> 9724ba675SRob Herring 10724ba675SRob Herring/ { 11724ba675SRob Herring aliases { 12724ba675SRob Herring serial3 = &uart3; 13724ba675SRob Herring }; 14724ba675SRob Herring 15724ba675SRob Herring chosen { 16724ba675SRob Herring stdout-path = "serial3:115200n8"; 17724ba675SRob Herring }; 18724ba675SRob Herring 19724ba675SRob Herring leds { 20724ba675SRob Herring compatible = "gpio-leds"; 21724ba675SRob Herring 22724ba675SRob Herring led-0 { 23724ba675SRob Herring color = <LED_COLOR_ID_BLUE>; 24724ba675SRob Herring function = LED_FUNCTION_STATUS; 25724ba675SRob Herring gpios = <&pio 3 22 GPIO_ACTIVE_LOW>; /* PD22 */ 26724ba675SRob Herring }; 27724ba675SRob Herring }; 28724ba675SRob Herring 29724ba675SRob Herring /* board wide 5V supply directly from the USB-C socket */ 30724ba675SRob Herring reg_vcc5v: regulator-5v { 31724ba675SRob Herring compatible = "regulator-fixed"; 32724ba675SRob Herring regulator-name = "vcc-5v"; 33724ba675SRob Herring regulator-min-microvolt = <5000000>; 34724ba675SRob Herring regulator-max-microvolt = <5000000>; 35724ba675SRob Herring regulator-always-on; 36724ba675SRob Herring }; 37724ba675SRob Herring 38724ba675SRob Herring /* SY8008 DC/DC regulator on the board */ 39724ba675SRob Herring reg_3v3: regulator-3v3 { 40724ba675SRob Herring compatible = "regulator-fixed"; 41724ba675SRob Herring regulator-name = "vcc-3v3"; 42724ba675SRob Herring regulator-min-microvolt = <3300000>; 43724ba675SRob Herring regulator-max-microvolt = <3300000>; 44724ba675SRob Herring vin-supply = <®_vcc5v>; 45724ba675SRob Herring }; 46724ba675SRob Herring 47724ba675SRob Herring /* SY8008 DC/DC regulator on the board, also supplying VDD-SYS */ 48724ba675SRob Herring reg_vcc_core: regulator-core { 49724ba675SRob Herring compatible = "regulator-fixed"; 50724ba675SRob Herring regulator-name = "vcc-core"; 51724ba675SRob Herring regulator-min-microvolt = <880000>; 52724ba675SRob Herring regulator-max-microvolt = <880000>; 53724ba675SRob Herring vin-supply = <®_vcc5v>; 54724ba675SRob Herring }; 55724ba675SRob Herring 56724ba675SRob Herring /* XC6206 LDO on the board */ 57724ba675SRob Herring reg_avdd2v8: regulator-avdd { 58724ba675SRob Herring compatible = "regulator-fixed"; 59724ba675SRob Herring regulator-name = "avdd2v8"; 60724ba675SRob Herring regulator-min-microvolt = <2800000>; 61724ba675SRob Herring regulator-max-microvolt = <2800000>; 62724ba675SRob Herring vin-supply = <®_3v3>; 63724ba675SRob Herring }; 64724ba675SRob Herring 65724ba675SRob Herring wifi_pwrseq: wifi-pwrseq { 66724ba675SRob Herring compatible = "mmc-pwrseq-simple"; 67724ba675SRob Herring reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */ 68724ba675SRob Herring }; 69724ba675SRob Herring}; 70724ba675SRob Herring 71724ba675SRob Herring&dcxo { 72724ba675SRob Herring clock-frequency = <24000000>; 73724ba675SRob Herring}; 74724ba675SRob Herring 75724ba675SRob Herring&ehci1 { 76724ba675SRob Herring status = "okay"; 77724ba675SRob Herring}; 78724ba675SRob Herring 79724ba675SRob Herring&mmc0 { 80724ba675SRob Herring pinctrl-0 = <&mmc0_pins>; 81724ba675SRob Herring pinctrl-names = "default"; 82724ba675SRob Herring vmmc-supply = <®_3v3>; 83724ba675SRob Herring cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 84724ba675SRob Herring disable-wp; 85724ba675SRob Herring bus-width = <4>; 86724ba675SRob Herring status = "okay"; 87724ba675SRob Herring}; 88724ba675SRob Herring 89724ba675SRob Herring&mmc1 { 90724ba675SRob Herring pinctrl-0 = <&mmc1_pins>; 91724ba675SRob Herring pinctrl-names = "default"; 92724ba675SRob Herring vmmc-supply = <®_3v3>; 93724ba675SRob Herring non-removable; 94724ba675SRob Herring bus-width = <4>; 95724ba675SRob Herring mmc-pwrseq = <&wifi_pwrseq>; 96724ba675SRob Herring status = "okay"; 97724ba675SRob Herring}; 98724ba675SRob Herring 99724ba675SRob Herring&ohci1 { 100724ba675SRob Herring status = "okay"; 101724ba675SRob Herring}; 102724ba675SRob Herring 103724ba675SRob Herring&pio { 104724ba675SRob Herring vcc-pb-supply = <®_3v3>; 105724ba675SRob Herring vcc-pd-supply = <®_3v3>; 106724ba675SRob Herring vcc-pe-supply = <®_avdd2v8>; 107724ba675SRob Herring vcc-pf-supply = <®_3v3>; 108724ba675SRob Herring vcc-pg-supply = <®_3v3>; 109724ba675SRob Herring}; 110724ba675SRob Herring 111724ba675SRob Herring&uart3 { 112724ba675SRob Herring pinctrl-names = "default"; 113724ba675SRob Herring pinctrl-0 = <&uart3_pb_pins>; 114724ba675SRob Herring status = "okay"; 115724ba675SRob Herring}; 116724ba675SRob Herring 117724ba675SRob Herring/* The USB-C socket has its CC pins pulled to GND, so is hardwired as a UFP. */ 118724ba675SRob Herring&usb_otg { 119724ba675SRob Herring dr_mode = "peripheral"; 120724ba675SRob Herring status = "okay"; 121724ba675SRob Herring}; 122724ba675SRob Herring 123724ba675SRob Herring&usbphy { 124724ba675SRob Herring usb1_vbus-supply = <®_vcc5v>; 125724ba675SRob Herring status = "okay"; 126724ba675SRob Herring}; 127