Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
0004  */
0005 
0006 #include <dt-bindings/gpio/gpio.h>
0007 #include <dt-bindings/input/input.h>
0008 
0009 / {
0010         aliases {
0011                 ethernet0 = &emac;
0012                 serial0 = &uart0;
0013         };
0014 
0015         chosen {
0016                 stdout-path = "serial0:115200n8";
0017         };
0018 
0019         connector {
0020                 compatible = "hdmi-connector";
0021                 type = "a";
0022 
0023                 port {
0024                         hdmi_con_in: endpoint {
0025                                 remote-endpoint = <&hdmi_out_con>;
0026                         };
0027                 };
0028         };
0029 
0030         leds {
0031                 compatible = "gpio-leds";
0032 
0033                 pwr_led {
0034                         label = "librecomputer:green:pwr";
0035                         gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; /* PL10 */
0036                         default-state = "on";
0037                 };
0038 
0039                 status_led {
0040                         label = "librecomputer:blue:status";
0041                         gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
0042                 };
0043         };
0044 
0045         gpio-keys {
0046                 compatible = "gpio-keys";
0047 
0048                 key-power {
0049                         label = "power";
0050                         linux,code = <KEY_POWER>;
0051                         gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
0052                         wakeup-source;
0053                 };
0054         };
0055 
0056         reg_vcc1v2: vcc1v2 {
0057                 compatible = "regulator-fixed";
0058                 regulator-name = "vcc1v2";
0059                 regulator-min-microvolt = <1200000>;
0060                 regulator-max-microvolt = <1200000>;
0061                 regulator-always-on;
0062                 regulator-boot-on;
0063                 vin-supply = <&reg_vcc5v0>;
0064                 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
0065                 enable-active-high;
0066         };
0067 
0068         reg_vcc3v3: vcc3v3 {
0069                 compatible = "regulator-fixed";
0070                 regulator-name = "vcc3v3";
0071                 regulator-min-microvolt = <3300000>;
0072                 regulator-max-microvolt = <3300000>;
0073                 vin-supply = <&reg_vcc5v0>;
0074         };
0075 
0076         /* This represents the board's 5V input */
0077         reg_vcc5v0: vcc5v0 {
0078                 compatible = "regulator-fixed";
0079                 regulator-name = "vcc5v0";
0080                 regulator-min-microvolt = <5000000>;
0081                 regulator-max-microvolt = <5000000>;
0082         };
0083 
0084         reg_vcc_dram: vcc-dram {
0085                 compatible = "regulator-fixed";
0086                 regulator-name = "vcc-dram";
0087                 regulator-min-microvolt = <1500000>;
0088                 regulator-max-microvolt = <1500000>;
0089                 regulator-always-on;
0090                 regulator-boot-on;
0091                 vin-supply = <&reg_vcc5v0>;
0092                 gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
0093                 enable-active-high;
0094         };
0095 
0096         reg_vcc_io: vcc-io {
0097                 compatible = "regulator-fixed";
0098                 regulator-name = "vcc-io";
0099                 regulator-min-microvolt = <3300000>;
0100                 regulator-max-microvolt = <3300000>;
0101                 regulator-always-on;
0102                 regulator-boot-on;
0103                 vin-supply = <&reg_vcc3v3>;
0104                 gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
0105         };
0106 
0107         reg_vdd_cpux: vdd-cpux {
0108                 compatible = "regulator-fixed";
0109                 regulator-name = "vdd-cpux";
0110                 regulator-min-microvolt = <1200000>;
0111                 regulator-max-microvolt = <1200000>;
0112                 regulator-always-on;
0113                 regulator-boot-on;
0114                 vin-supply = <&reg_vcc5v0>;
0115                 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
0116                 enable-active-high;
0117         };
0118 };
0119 
0120 &codec {
0121         allwinner,audio-routing =
0122                 "Line Out", "LINEOUT",
0123                 "MIC1", "Mic",
0124                 "Mic",  "MBIAS";
0125         status = "okay";
0126 };
0127 
0128 &cpu0 {
0129         cpu-supply = <&reg_vdd_cpux>;
0130 };
0131 
0132 &cpu1 {
0133         cpu-supply = <&reg_vdd_cpux>;
0134 };
0135 
0136 &cpu2 {
0137         cpu-supply = <&reg_vdd_cpux>;
0138 };
0139 
0140 &cpu3 {
0141         cpu-supply = <&reg_vdd_cpux>;
0142 };
0143 
0144 &de {
0145         status = "okay";
0146 };
0147 
0148 &ehci0 {
0149         status = "okay";
0150 };
0151 
0152 &ehci1 {
0153         status = "okay";
0154 };
0155 
0156 &ehci2 {
0157         status = "okay";
0158 };
0159 
0160 &ehci3 {
0161         status = "okay";
0162 };
0163 
0164 &emac {
0165         phy-handle = <&int_mii_phy>;
0166         phy-mode = "mii";
0167         allwinner,leds-active-low;
0168         status = "okay";
0169 };
0170 
0171 &hdmi {
0172         status = "okay";
0173 };
0174 
0175 &hdmi_out {
0176         hdmi_out_con: endpoint {
0177                 remote-endpoint = <&hdmi_con_in>;
0178         };
0179 };
0180 
0181 &ir {
0182         pinctrl-names = "default";
0183         pinctrl-0 = <&r_ir_rx_pin>;
0184         status = "okay";
0185 };
0186 
0187 &mmc0 {
0188         vmmc-supply = <&reg_vcc_io>;
0189         bus-width = <4>;
0190         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0191         status = "okay";
0192 };
0193 
0194 &mmc2 {
0195         pinctrl-names = "default";
0196         pinctrl-0 = <&mmc2_8bit_pins>;
0197         vmmc-supply = <&reg_vcc_io>;
0198         bus-width = <8>;
0199         non-removable;
0200         status = "okay";
0201 };
0202 
0203 &ohci0 {
0204         status = "okay";
0205 };
0206 
0207 &ohci1 {
0208         status = "okay";
0209 };
0210 
0211 &ohci2 {
0212         status = "okay";
0213 };
0214 
0215 &ohci3 {
0216         status = "okay";
0217 };
0218 
0219 &uart0 {
0220         pinctrl-names = "default";
0221         pinctrl-0 = <&uart0_pa_pins>;
0222         status = "okay";
0223 };
0224 
0225 &usb_otg {
0226         dr_mode = "host";
0227         status = "okay";
0228 };
0229 
0230 &usbphy {
0231         /* VBUS on USB ports are always on */
0232         usb0_vbus-supply = <&reg_vcc5v0>;
0233         usb1_vbus-supply = <&reg_vcc5v0>;
0234         usb2_vbus-supply = <&reg_vcc5v0>;
0235         usb3_vbus-supply = <&reg_vcc5v0>;
0236         status = "okay";
0237 };