Home | History | Annotate | Download | only in dts
      1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
      2 /*
      3  * Copyright (C) 2017 Chen-Yu Tsai <wens (a] csie.org>
      4  */
      5 
      6 #include <dt-bindings/gpio/gpio.h>
      7 #include <dt-bindings/input/input.h>
      8 
      9 / {
     10 	aliases {
     11 		ethernet0 = &emac;
     12 		serial0 = &uart0;
     13 	};
     14 
     15 	chosen {
     16 		stdout-path = "serial0:115200n8";
     17 	};
     18 
     19 	leds {
     20 		compatible = "gpio-leds";
     21 
     22 		pwr_led {
     23 			label = "librecomputer:green:pwr";
     24 			gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
     25 			default-state = "on";
     26 		};
     27 
     28 		status_led {
     29 			label = "librecomputer:blue:status";
     30 			gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
     31 		};
     32 	};
     33 
     34 	gpio_keys {
     35 		compatible = "gpio-keys";
     36 
     37 		power {
     38 			label = "power";
     39 			linux,code = <KEY_POWER>;
     40 			gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
     41 		};
     42 	};
     43 
     44 	reg_vcc1v2: vcc1v2 {
     45 		compatible = "regulator-fixed";
     46 		regulator-name = "vcc1v2";
     47 		regulator-min-microvolt = <3300000>;
     48 		regulator-max-microvolt = <3300000>;
     49 		regulator-always-on;
     50 		regulator-boot-on;
     51 		vin-supply = <&reg_vcc5v0>;
     52 		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
     53 		enable-active-high;
     54 	};
     55 
     56 	reg_vcc3v3: vcc3v3 {
     57 		compatible = "regulator-fixed";
     58 		regulator-name = "vcc3v3";
     59 		regulator-min-microvolt = <3300000>;
     60 		regulator-max-microvolt = <3300000>;
     61 		vin-supply = <&reg_vcc5v0>;
     62 	};
     63 
     64 	/* This represents the board's 5V input */
     65 	reg_vcc5v0: vcc5v0 {
     66 		compatible = "regulator-fixed";
     67 		regulator-name = "vcc5v0";
     68 		regulator-min-microvolt = <5000000>;
     69 		regulator-max-microvolt = <5000000>;
     70 	};
     71 
     72 	reg_vcc_dram: vcc-dram {
     73 		compatible = "regulator-fixed";
     74 		regulator-name = "vcc-dram";
     75 		regulator-min-microvolt = <1500000>;
     76 		regulator-max-microvolt = <1500000>;
     77 		regulator-always-on;
     78 		regulator-boot-on;
     79 		vin-supply = <&reg_vcc5v0>;
     80 		gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
     81 		enable-active-high;
     82 	};
     83 
     84 	reg_vcc_io: vcc-io {
     85 		compatible = "regulator-fixed";
     86 		regulator-name = "vcc-io";
     87 		regulator-min-microvolt = <3300000>;
     88 		regulator-max-microvolt = <3300000>;
     89 		regulator-always-on;
     90 		regulator-boot-on;
     91 		vin-supply = <&reg_vcc3v3>;
     92 		gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
     93 	};
     94 
     95 	reg_vdd_cpux: vdd-cpux {
     96 		compatible = "regulator-fixed";
     97 		regulator-name = "vdd-cpux";
     98 		regulator-min-microvolt = <3300000>;
     99 		regulator-max-microvolt = <3300000>;
    100 		regulator-always-on;
    101 		regulator-boot-on;
    102 		vin-supply = <&reg_vcc5v0>;
    103 		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
    104 		enable-active-high;
    105 	};
    106 };
    107 
    108 &ehci1 {
    109 	status = "okay";
    110 };
    111 
    112 &ehci2 {
    113 	status = "okay";
    114 };
    115 
    116 &ehci3 {
    117 	status = "okay";
    118 };
    119 
    120 &emac {
    121 	phy-handle = <&int_mii_phy>;
    122 	phy-mode = "mii";
    123 	allwinner,leds-active-low;
    124 	status = "okay";
    125 };
    126 
    127 &ir {
    128 	pinctrl-names = "default";
    129 	pinctrl-0 = <&ir_pins_a>;
    130 	status = "okay";
    131 };
    132 
    133 &mmc0 {
    134 	pinctrl-names = "default";
    135 	pinctrl-0 = <&mmc0_pins_a>;
    136 	vmmc-supply = <&reg_vcc_io>;
    137 	bus-width = <4>;
    138 	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
    139 	cd-inverted;
    140 	status = "okay";
    141 };
    142 
    143 &ohci1 {
    144 	status = "okay";
    145 };
    146 
    147 &ohci2 {
    148 	status = "okay";
    149 };
    150 
    151 &ohci3 {
    152 	status = "okay";
    153 };
    154 
    155 &uart0 {
    156 	pinctrl-names = "default";
    157 	pinctrl-0 = <&uart0_pins_a>;
    158 	status = "okay";
    159 };
    160 
    161 &usbphy {
    162 	/* VBUS on USB ports are always on */
    163 	usb0_vbus-supply = <&reg_vcc5v0>;
    164 	usb1_vbus-supply = <&reg_vcc5v0>;
    165 	usb2_vbus-supply = <&reg_vcc5v0>;
    166 	usb3_vbus-supply = <&reg_vcc5v0>;
    167 	status = "okay";
    168 };
    169