1*84943d6fSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2cb7aa33aSEmmanuel Vadot// Copyright (C) 2022 Samuel Holland <samuel@sholland.org> 3cb7aa33aSEmmanuel Vadot 4cb7aa33aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 5cb7aa33aSEmmanuel Vadot#include <dt-bindings/leds/common.h> 6cb7aa33aSEmmanuel Vadot 7cb7aa33aSEmmanuel Vadot/dts-v1/; 8cb7aa33aSEmmanuel Vadot 9cb7aa33aSEmmanuel Vadot#include "sun20i-d1s.dtsi" 10cb7aa33aSEmmanuel Vadot#include "sun20i-common-regulators.dtsi" 11cb7aa33aSEmmanuel Vadot 12cb7aa33aSEmmanuel Vadot/ { 13cb7aa33aSEmmanuel Vadot model = "MangoPi MQ"; 14cb7aa33aSEmmanuel Vadot compatible = "widora,mangopi-mq", "allwinner,sun20i-d1s"; 15cb7aa33aSEmmanuel Vadot 16cb7aa33aSEmmanuel Vadot aliases { 17cb7aa33aSEmmanuel Vadot ethernet0 = &rtl8189ftv; 18cb7aa33aSEmmanuel Vadot serial3 = &uart3; 19cb7aa33aSEmmanuel Vadot }; 20cb7aa33aSEmmanuel Vadot 21cb7aa33aSEmmanuel Vadot chosen { 22cb7aa33aSEmmanuel Vadot stdout-path = "serial3:115200n8"; 23cb7aa33aSEmmanuel Vadot }; 24cb7aa33aSEmmanuel Vadot 25cb7aa33aSEmmanuel Vadot leds { 26cb7aa33aSEmmanuel Vadot compatible = "gpio-leds"; 27cb7aa33aSEmmanuel Vadot 28cb7aa33aSEmmanuel Vadot led-0 { 29cb7aa33aSEmmanuel Vadot color = <LED_COLOR_ID_BLUE>; 30cb7aa33aSEmmanuel Vadot function = LED_FUNCTION_STATUS; 31cb7aa33aSEmmanuel Vadot gpios = <&pio 3 22 GPIO_ACTIVE_LOW>; /* PD22 */ 32cb7aa33aSEmmanuel Vadot }; 33cb7aa33aSEmmanuel Vadot }; 34cb7aa33aSEmmanuel Vadot 35cb7aa33aSEmmanuel Vadot reg_avdd2v8: avdd2v8 { 36cb7aa33aSEmmanuel Vadot compatible = "regulator-fixed"; 37cb7aa33aSEmmanuel Vadot regulator-name = "avdd2v8"; 38cb7aa33aSEmmanuel Vadot regulator-min-microvolt = <2800000>; 39cb7aa33aSEmmanuel Vadot regulator-max-microvolt = <2800000>; 40cb7aa33aSEmmanuel Vadot vin-supply = <®_vcc_3v3>; 41cb7aa33aSEmmanuel Vadot }; 42cb7aa33aSEmmanuel Vadot 43cb7aa33aSEmmanuel Vadot reg_dvdd: dvdd { 44cb7aa33aSEmmanuel Vadot compatible = "regulator-fixed"; 45cb7aa33aSEmmanuel Vadot regulator-name = "dvdd"; 46cb7aa33aSEmmanuel Vadot regulator-min-microvolt = <1200000>; 47cb7aa33aSEmmanuel Vadot regulator-max-microvolt = <1200000>; 48cb7aa33aSEmmanuel Vadot vin-supply = <®_vcc_3v3>; 49cb7aa33aSEmmanuel Vadot }; 50cb7aa33aSEmmanuel Vadot 51cb7aa33aSEmmanuel Vadot reg_vcc_core: vcc-core { 52cb7aa33aSEmmanuel Vadot compatible = "regulator-fixed"; 53cb7aa33aSEmmanuel Vadot regulator-name = "vcc-core"; 54cb7aa33aSEmmanuel Vadot regulator-min-microvolt = <900000>; 55cb7aa33aSEmmanuel Vadot regulator-max-microvolt = <900000>; 56cb7aa33aSEmmanuel Vadot vin-supply = <®_vcc>; 57cb7aa33aSEmmanuel Vadot }; 58cb7aa33aSEmmanuel Vadot 59cb7aa33aSEmmanuel Vadot wifi_pwrseq: wifi-pwrseq { 60cb7aa33aSEmmanuel Vadot compatible = "mmc-pwrseq-simple"; 61cb7aa33aSEmmanuel Vadot reset-gpios = <&pio 6 12 GPIO_ACTIVE_LOW>; /* PG12 */ 62cb7aa33aSEmmanuel Vadot }; 63cb7aa33aSEmmanuel Vadot}; 64cb7aa33aSEmmanuel Vadot 65cb7aa33aSEmmanuel Vadot&cpu0 { 66cb7aa33aSEmmanuel Vadot cpu-supply = <®_vcc_core>; 67cb7aa33aSEmmanuel Vadot}; 68cb7aa33aSEmmanuel Vadot 69cb7aa33aSEmmanuel Vadot&dcxo { 70cb7aa33aSEmmanuel Vadot clock-frequency = <24000000>; 71cb7aa33aSEmmanuel Vadot}; 72cb7aa33aSEmmanuel Vadot 73cb7aa33aSEmmanuel Vadot&ehci1 { 74cb7aa33aSEmmanuel Vadot status = "okay"; 75cb7aa33aSEmmanuel Vadot}; 76cb7aa33aSEmmanuel Vadot 77cb7aa33aSEmmanuel Vadot&mmc0 { 78cb7aa33aSEmmanuel Vadot bus-width = <4>; 79cb7aa33aSEmmanuel Vadot cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ 80cb7aa33aSEmmanuel Vadot disable-wp; 81cb7aa33aSEmmanuel Vadot vmmc-supply = <®_vcc_3v3>; 82cb7aa33aSEmmanuel Vadot vqmmc-supply = <®_vcc_3v3>; 83cb7aa33aSEmmanuel Vadot pinctrl-0 = <&mmc0_pins>; 84cb7aa33aSEmmanuel Vadot pinctrl-names = "default"; 85cb7aa33aSEmmanuel Vadot status = "okay"; 86cb7aa33aSEmmanuel Vadot}; 87cb7aa33aSEmmanuel Vadot 88cb7aa33aSEmmanuel Vadot&mmc1 { 89cb7aa33aSEmmanuel Vadot bus-width = <4>; 90cb7aa33aSEmmanuel Vadot mmc-pwrseq = <&wifi_pwrseq>; 91cb7aa33aSEmmanuel Vadot non-removable; 92cb7aa33aSEmmanuel Vadot vmmc-supply = <®_vcc_3v3>; 93cb7aa33aSEmmanuel Vadot vqmmc-supply = <®_vcc_3v3>; 94cb7aa33aSEmmanuel Vadot pinctrl-0 = <&mmc1_pins>; 95cb7aa33aSEmmanuel Vadot pinctrl-names = "default"; 96cb7aa33aSEmmanuel Vadot status = "okay"; 97cb7aa33aSEmmanuel Vadot 98cb7aa33aSEmmanuel Vadot rtl8189ftv: wifi@1 { 99cb7aa33aSEmmanuel Vadot reg = <1>; 100cb7aa33aSEmmanuel Vadot interrupt-parent = <&pio>; 101cb7aa33aSEmmanuel Vadot interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 */ 102cb7aa33aSEmmanuel Vadot interrupt-names = "host-wake"; 103cb7aa33aSEmmanuel Vadot }; 104cb7aa33aSEmmanuel Vadot}; 105cb7aa33aSEmmanuel Vadot 106cb7aa33aSEmmanuel Vadot&ohci1 { 107cb7aa33aSEmmanuel Vadot status = "okay"; 108cb7aa33aSEmmanuel Vadot}; 109cb7aa33aSEmmanuel Vadot 110cb7aa33aSEmmanuel Vadot&pio { 111cb7aa33aSEmmanuel Vadot vcc-pe-supply = <®_avdd2v8>; 112cb7aa33aSEmmanuel Vadot}; 113cb7aa33aSEmmanuel Vadot 114cb7aa33aSEmmanuel Vadot&uart3 { 115cb7aa33aSEmmanuel Vadot pinctrl-0 = <&uart3_pb_pins>; 116cb7aa33aSEmmanuel Vadot pinctrl-names = "default"; 117cb7aa33aSEmmanuel Vadot status = "okay"; 118cb7aa33aSEmmanuel Vadot}; 119cb7aa33aSEmmanuel Vadot 120cb7aa33aSEmmanuel Vadot&usb_otg { 121cb7aa33aSEmmanuel Vadot dr_mode = "peripheral"; 122cb7aa33aSEmmanuel Vadot status = "okay"; 123cb7aa33aSEmmanuel Vadot}; 124cb7aa33aSEmmanuel Vadot 125cb7aa33aSEmmanuel Vadot&usbphy { 126cb7aa33aSEmmanuel Vadot usb1_vbus-supply = <®_vcc>; 127cb7aa33aSEmmanuel Vadot status = "okay"; 128cb7aa33aSEmmanuel Vadot}; 129