153 lines
2.7 KiB
Plaintext
153 lines
2.7 KiB
Plaintext
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
// Copyright (C) 2022 Arm Ltd.
|
|
/*
|
|
* Common peripherals and configurations for MangoPi MQ-R boards.
|
|
*/
|
|
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
#include <dt-bindings/leds/common.h>
|
|
|
|
/ {
|
|
aliases {
|
|
serial2 = &uart2;
|
|
mmc0 = &mmc0;
|
|
mmc2 = &mmc2;
|
|
};
|
|
|
|
chosen {
|
|
stdout-path = "serial2:115200n8";
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
|
|
led-0 {
|
|
color = <LED_COLOR_ID_GREEN>;
|
|
function = LED_FUNCTION_STATUS;
|
|
gpios = <&pio 2 0 GPIO_ACTIVE_HIGH>; /* PC0 */
|
|
};
|
|
|
|
led-1 {
|
|
color = <LED_COLOR_ID_RED>;
|
|
function = LED_FUNCTION_STATUS;
|
|
gpios = <&pio 2 1 GPIO_ACTIVE_HIGH>; /* PC1 */
|
|
};
|
|
|
|
};
|
|
|
|
/* EC2232E DC/DC regulator on SoM */
|
|
reg_vcc5v: regulator-5v {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc-5v";
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
/* EC2232E DC/DC regulator on SoM */
|
|
reg_3v3: regulator-3v3 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc-3v3";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
vin-supply = <®_vcc5v>;
|
|
};
|
|
|
|
/* EC2232E DC/DC regulator on SoM, also supplying VDD-SYS */
|
|
reg_vcc_core: regulator-core {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "vcc-core";
|
|
regulator-min-microvolt = <880000>;
|
|
regulator-max-microvolt = <880000>;
|
|
vin-supply = <®_vcc5v>;
|
|
};
|
|
};
|
|
|
|
&dcxo {
|
|
clock-frequency = <24000000>;
|
|
};
|
|
|
|
&ehci1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&ohci1 {
|
|
status = "okay";
|
|
};
|
|
|
|
&pio {
|
|
vcc-pb-supply = <®_3v3>;
|
|
vcc-pd-supply = <®_3v3>;
|
|
vcc-pe-supply = <®_3v3>;
|
|
vcc-pf-supply = <®_3v3>;
|
|
vcc-pg-supply = <®_3v3>;
|
|
|
|
uart2_pg_pins: uart2_pg_pins {
|
|
pins = "PG17", "PG18";
|
|
function = "uart2";
|
|
};
|
|
};
|
|
|
|
&uart2 {
|
|
bootph-all;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&uart2_pg_pins>;
|
|
status = "okay";
|
|
};
|
|
|
|
&mmc2 {
|
|
bootph-all;
|
|
pinctrl-0 = <&mmc2_pins>;
|
|
pinctrl-names = "default";
|
|
vmmc-supply = <®_3v3>;
|
|
non-removable;
|
|
disable-wp;
|
|
bus-width = <4>;
|
|
status = "okay";
|
|
};
|
|
|
|
&spi0 {
|
|
bootph-all;
|
|
pinctrl-names = "default";
|
|
pinctrl-0 = <&spi0_pins>;
|
|
status = "okay";
|
|
|
|
spi_nand@0 {
|
|
bootph-all;
|
|
compatible = "spi-nand";
|
|
reg = <0>;
|
|
spi-max-frequency = <50000000>;
|
|
partitions {
|
|
#address-cells = <1>;
|
|
#size-cells = <1>;
|
|
|
|
compatible = "fixed-partitions";
|
|
partition@0 {
|
|
label = "u-boot";
|
|
reg = <0x0 0x100000>; /* 1MB */
|
|
};
|
|
|
|
partition@100000 {
|
|
label = "env";
|
|
reg = <0x100000 0x400000>; /* 4MB */
|
|
};
|
|
|
|
partition@500000 {
|
|
label = "rootfs";
|
|
reg = <0x500000 0xfb00000>; /* 251MB */
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
/* The USB-C socket has its CC pins pulled to GND, so is hardwired as a UFP. */
|
|
&usb_otg {
|
|
dr_mode = "peripheral";
|
|
status = "okay";
|
|
};
|
|
|
|
&usbphy {
|
|
usb1_vbus-supply = <®_vcc5v>;
|
|
status = "okay";
|
|
};
|