0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2019 Chen-Yu Tsai <wens@csie.org>
0003
0004 #include <dt-bindings/gpio/gpio.h>
0005 #include <dt-bindings/input/input.h>
0006
0007 / {
0008 aliases {
0009 serial0 = &uart0;
0010 spi0 = &spi0;
0011 };
0012
0013 chosen {
0014 stdout-path = "serial0:115200n8";
0015 };
0016
0017 connector {
0018 compatible = "hdmi-connector";
0019 type = "d";
0020
0021 port {
0022 hdmi_con_in: endpoint {
0023 remote-endpoint = <&hdmi_out_con>;
0024 };
0025 };
0026 };
0027
0028 leds {
0029 compatible = "gpio-leds";
0030
0031 status_led {
0032 label = "librecomputer:blue:status";
0033 gpios = <&pio 0 7 GPIO_ACTIVE_HIGH>; /* PA7 */
0034 };
0035 };
0036
0037 reg_vcc3v3: vcc3v3 {
0038 compatible = "regulator-fixed";
0039 regulator-name = "vcc3v3";
0040 regulator-min-microvolt = <3300000>;
0041 regulator-max-microvolt = <3300000>;
0042 regulator-always-on;
0043 regulator-boot-on;
0044 vin-supply = <®_vcc5v0>;
0045 };
0046
0047 /* This represents the board's 5V input */
0048 reg_vcc5v0: vcc5v0 {
0049 compatible = "regulator-fixed";
0050 regulator-name = "vcc5v0";
0051 regulator-min-microvolt = <5000000>;
0052 regulator-max-microvolt = <5000000>;
0053 regulator-always-on;
0054 regulator-boot-on;
0055 };
0056
0057 reg_vcc_dram: vcc-dram {
0058 compatible = "regulator-fixed";
0059 regulator-name = "vcc-dram";
0060 regulator-min-microvolt = <1500000>;
0061 regulator-max-microvolt = <1500000>;
0062 regulator-always-on;
0063 regulator-boot-on;
0064 vin-supply = <®_vcc5v0>;
0065 gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
0066 enable-active-high;
0067 };
0068
0069 reg_vcc_io: vcc-io {
0070 compatible = "regulator-fixed";
0071 regulator-name = "vcc-io";
0072 /* This is simply a MOSFET switch */
0073 regulator-always-on;
0074 regulator-boot-on;
0075 vin-supply = <®_vcc3v3>;
0076 gpio = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
0077 };
0078
0079 reg_vcc_usbwifi: vcc-usbwifi {
0080 compatible = "regulator-fixed";
0081 regulator-name = "vcc-usbwifi";
0082 regulator-min-microvolt = <3300000>;
0083 regulator-max-microvolt = <3300000>;
0084 vin-supply = <®_vcc5v0>;
0085 gpio = <&pio 6 4 GPIO_ACTIVE_HIGH>; /* PG4 */
0086 enable-active-high;
0087 };
0088
0089 reg_vdd_cpux: vdd-cpux {
0090 compatible = "regulator-fixed";
0091 regulator-name = "vdd-cpux";
0092 regulator-min-microvolt = <1100000>;
0093 regulator-max-microvolt = <1100000>;
0094 regulator-always-on;
0095 regulator-boot-on;
0096 vin-supply = <®_vcc5v0>;
0097 gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
0098 enable-active-high;
0099 };
0100 };
0101
0102 &cpu0 {
0103 cpu-supply = <®_vdd_cpux>;
0104 };
0105
0106 &cpu1 {
0107 cpu-supply = <®_vdd_cpux>;
0108 };
0109
0110 &cpu2 {
0111 cpu-supply = <®_vdd_cpux>;
0112 };
0113
0114 &cpu3 {
0115 cpu-supply = <®_vdd_cpux>;
0116 };
0117
0118 &de {
0119 status = "okay";
0120 };
0121
0122 &ehci1 {
0123 status = "okay";
0124 };
0125
0126 &hdmi {
0127 status = "okay";
0128 };
0129
0130 &hdmi_out {
0131 hdmi_out_con: endpoint {
0132 remote-endpoint = <&hdmi_con_in>;
0133 };
0134 };
0135
0136 &mmc0 {
0137 vmmc-supply = <®_vcc_io>;
0138 bus-width = <4>;
0139 cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
0140 status = "okay";
0141 };
0142
0143 &pio {
0144 vcc-pa-supply = <®_vcc_io>;
0145 vcc-pc-supply = <®_vcc_io>;
0146 vcc-pd-supply = <®_vcc_io>;
0147 vcc-pe-supply = <®_vcc_io>;
0148 vcc-pf-supply = <®_vcc_io>;
0149 vcc-pg-supply = <®_vcc_io>;
0150 };
0151
0152 &r_pio {
0153 vcc-pl-supply = <®_vcc3v3>;
0154 };
0155
0156 &spi0 {
0157 status = "okay";
0158
0159 flash@0 {
0160 compatible = "jedec,spi-nor";
0161 reg = <0>;
0162 spi-max-frequency = <50000000>;
0163 };
0164 };
0165
0166 &uart0 {
0167 pinctrl-names = "default";
0168 pinctrl-0 = <&uart0_pa_pins>;
0169 status = "okay";
0170 };
0171
0172 &usb_otg {
0173 dr_mode = "peripheral";
0174 status = "okay";
0175 };
0176
0177 &usbphy {
0178 usb1_vbus-supply = <®_vcc_usbwifi>;
0179 status = "okay";
0180 };