Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0+ OR MIT
0002 // Copyright (C) 2021 Ivan Uvarov <i.uvarov@cognitivepilot.com>
0003 // Based on the sun8i-r40-bananapi-m2-ultra.dts, which is:
0004 //      Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org>
0005 //      Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
0006 
0007 /dts-v1/;
0008 #include "sun8i-r40-feta40i.dtsi"
0009 
0010 #include <dt-bindings/gpio/gpio.h>
0011 #include <dt-bindings/leds/common.h>
0012 
0013 / {
0014         model = "Forlinx OKA40i-C";
0015         compatible = "forlinx,oka40i-c", "forlinx,feta40i-c", "allwinner,sun8i-r40";
0016 
0017         aliases {
0018                 ethernet0 = &gmac;
0019                 serial0 = &uart0;
0020                 serial2 = &uart2;
0021                 serial3 = &uart3;
0022                 serial4 = &uart4;
0023                 serial5 = &uart5; /* RS485 */
0024                 serial7 = &uart7;
0025         };
0026 
0027         chosen {
0028                 stdout-path = "serial0:115200n8";
0029         };
0030 
0031         connector {
0032                 compatible = "hdmi-connector";
0033                 type = "a";
0034 
0035                 port {
0036                         hdmi_con_in: endpoint {
0037                                 remote-endpoint = <&hdmi_out_con>;
0038                         };
0039                 };
0040         };
0041 
0042         leds {
0043                 compatible = "gpio-leds";
0044 
0045                 led-5 { /* this is how the leds are labeled on the board */
0046                         gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */
0047                         color = <LED_COLOR_ID_GREEN>;
0048                         function = LED_FUNCTION_STATUS;
0049                 };
0050 
0051                 led-6 {
0052                         gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */
0053                         color = <LED_COLOR_ID_BLUE>;
0054                         function = LED_FUNCTION_STATUS;
0055                 };
0056         };
0057 
0058         reg_vcc5v0: vcc5v0 {
0059                 compatible = "regulator-fixed";
0060                 regulator-name = "vcc5v0";
0061                 regulator-min-microvolt = <5000000>;
0062                 regulator-max-microvolt = <5000000>;
0063         };
0064 
0065         wifi_pwrseq: wifi_pwrseq {
0066                 compatible = "mmc-pwrseq-simple";
0067                 reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; // PB10 WIFI_EN
0068                 clocks = <&ccu CLK_OUTA>;
0069                 clock-names = "ext_clock";
0070         };
0071 };
0072 
0073 &ahci {
0074         ahci-supply = <&reg_dldo4>;
0075         phy-supply = <&reg_eldo2>;
0076         status = "okay";
0077 };
0078 
0079 &de {
0080         status = "okay";
0081 };
0082 
0083 &ehci1 {
0084         status = "okay";
0085 };
0086 
0087 &ehci2 {
0088         status = "okay";
0089 };
0090 
0091 &gmac {
0092         pinctrl-names = "default";
0093         pinctrl-0 = <&gmac_rgmii_pins>;
0094         phy-handle = <&phy1>;
0095         phy-mode = "rgmii-id";
0096         phy-supply = <&reg_dcdc1>;
0097         status = "okay";
0098 };
0099 
0100 &gmac_mdio {
0101         phy1: ethernet-phy@1 {
0102                 compatible = "ethernet-phy-ieee802.3-c22";
0103                 reg = <1>;
0104         };
0105 };
0106 
0107 &hdmi {
0108         status = "okay";
0109 };
0110 
0111 &hdmi_out {
0112         hdmi_out_con: endpoint {
0113                 remote-endpoint = <&hdmi_con_in>;
0114         };
0115 };
0116 
0117 &i2c2 {
0118         status = "okay";
0119 };
0120 
0121 &mmc0 {
0122         vmmc-supply = <&reg_dcdc1>;
0123         vqmmc-supply = <&reg_dcdc1>;
0124         bus-width = <4>;
0125         cd-gpios = <&pio 8 11 GPIO_ACTIVE_LOW>; // PI11
0126         status = "okay";
0127 };
0128 
0129 &mmc3 {
0130         vmmc-supply = <&reg_dcdc1>;
0131         vqmmc-supply = <&reg_dcdc1>;
0132         bus-width = <4>;
0133         cd-gpios = <&pio 8 10 GPIO_ACTIVE_LOW>; // PI10
0134         status = "okay";
0135 };
0136 
0137 &ohci1 {
0138         status = "okay";
0139 };
0140 
0141 &ohci2 {
0142         status = "okay";
0143 };
0144 
0145 &reg_dc1sw {
0146         regulator-min-microvolt = <3300000>;
0147         regulator-max-microvolt = <3300000>;
0148         regulator-name = "vcc-lcd";
0149 };
0150 
0151 &reg_dldo2 {
0152         regulator-min-microvolt = <3300000>;
0153         regulator-max-microvolt = <3300000>;
0154         regulator-name = "vcc-wifi";
0155 };
0156 
0157 &tcon_tv0 {
0158         status = "okay";
0159 };
0160 
0161 &uart0 {
0162         pinctrl-names = "default";
0163         pinctrl-0 = <&uart0_pb_pins>;
0164         status = "okay";
0165 };
0166 
0167 &uart2 {
0168         pinctrl-names = "default";
0169         pinctrl-0 = <&uart2_pi_pins>, <&uart2_rts_cts_pi_pins>;
0170         uart-has-rtscts;
0171         status = "okay";
0172 };
0173 
0174 &uart3 {
0175         pinctrl-names = "default";
0176         pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>;
0177         uart-has-rtscts;
0178         status = "okay";
0179 };
0180 
0181 &uart4 {
0182         pinctrl-names = "default";
0183         pinctrl-0 = <&uart4_pg_pins>;
0184         status = "okay";
0185 };
0186 
0187 &uart5 { /* RS485 */
0188         pinctrl-names = "default";
0189         pinctrl-0 = <&uart5_ph_pins>;
0190         status = "okay";
0191 };
0192 
0193 &uart7 {
0194         pinctrl-names = "default";
0195         pinctrl-0 = <&uart7_pi_pins>;
0196         status = "okay";
0197 };
0198 
0199 &usbphy {
0200         usb1_vbus-supply = <&reg_vcc5v0>;
0201         usb2_vbus-supply = <&reg_vcc5v0>;
0202         status = "okay";
0203 };