1*724ba675SRob Herring// SPDX-License-Identifier: GPL-2.0+ OR MIT 2*724ba675SRob Herring// Copyright (C) 2021 Ivan Uvarov <i.uvarov@cognitivepilot.com> 3*724ba675SRob Herring// Based on the sun8i-r40-bananapi-m2-ultra.dts, which is: 4*724ba675SRob Herring// Copyright (C) 2017 Chen-Yu Tsai <wens@csie.org> 5*724ba675SRob Herring// Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io> 6*724ba675SRob Herring 7*724ba675SRob Herring/dts-v1/; 8*724ba675SRob Herring#include "sun8i-r40-feta40i.dtsi" 9*724ba675SRob Herring 10*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 11*724ba675SRob Herring#include <dt-bindings/leds/common.h> 12*724ba675SRob Herring 13*724ba675SRob Herring/ { 14*724ba675SRob Herring model = "Forlinx OKA40i-C"; 15*724ba675SRob Herring compatible = "forlinx,oka40i-c", "forlinx,feta40i-c", "allwinner,sun8i-r40"; 16*724ba675SRob Herring 17*724ba675SRob Herring aliases { 18*724ba675SRob Herring ethernet0 = &gmac; 19*724ba675SRob Herring serial0 = &uart0; 20*724ba675SRob Herring serial2 = &uart2; 21*724ba675SRob Herring serial3 = &uart3; 22*724ba675SRob Herring serial4 = &uart4; 23*724ba675SRob Herring serial5 = &uart5; /* RS485 */ 24*724ba675SRob Herring serial7 = &uart7; 25*724ba675SRob Herring }; 26*724ba675SRob Herring 27*724ba675SRob Herring chosen { 28*724ba675SRob Herring stdout-path = "serial0:115200n8"; 29*724ba675SRob Herring }; 30*724ba675SRob Herring 31*724ba675SRob Herring connector { 32*724ba675SRob Herring compatible = "hdmi-connector"; 33*724ba675SRob Herring type = "a"; 34*724ba675SRob Herring 35*724ba675SRob Herring port { 36*724ba675SRob Herring hdmi_con_in: endpoint { 37*724ba675SRob Herring remote-endpoint = <&hdmi_out_con>; 38*724ba675SRob Herring }; 39*724ba675SRob Herring }; 40*724ba675SRob Herring }; 41*724ba675SRob Herring 42*724ba675SRob Herring leds { 43*724ba675SRob Herring compatible = "gpio-leds"; 44*724ba675SRob Herring 45*724ba675SRob Herring led-5 { /* this is how the leds are labeled on the board */ 46*724ba675SRob Herring gpios = <&pio 7 26 GPIO_ACTIVE_LOW>; /* PH26 */ 47*724ba675SRob Herring color = <LED_COLOR_ID_GREEN>; 48*724ba675SRob Herring function = LED_FUNCTION_STATUS; 49*724ba675SRob Herring }; 50*724ba675SRob Herring 51*724ba675SRob Herring led-6 { 52*724ba675SRob Herring gpios = <&pio 8 15 GPIO_ACTIVE_LOW>; /* PI15 */ 53*724ba675SRob Herring color = <LED_COLOR_ID_BLUE>; 54*724ba675SRob Herring function = LED_FUNCTION_STATUS; 55*724ba675SRob Herring }; 56*724ba675SRob Herring }; 57*724ba675SRob Herring 58*724ba675SRob Herring reg_vcc5v0: vcc5v0 { 59*724ba675SRob Herring compatible = "regulator-fixed"; 60*724ba675SRob Herring regulator-name = "vcc5v0"; 61*724ba675SRob Herring regulator-min-microvolt = <5000000>; 62*724ba675SRob Herring regulator-max-microvolt = <5000000>; 63*724ba675SRob Herring }; 64*724ba675SRob Herring 65*724ba675SRob Herring wifi_pwrseq: wifi_pwrseq { 66*724ba675SRob Herring compatible = "mmc-pwrseq-simple"; 67*724ba675SRob Herring reset-gpios = <&pio 1 10 GPIO_ACTIVE_LOW>; // PB10 WIFI_EN 68*724ba675SRob Herring clocks = <&ccu CLK_OUTA>; 69*724ba675SRob Herring clock-names = "ext_clock"; 70*724ba675SRob Herring }; 71*724ba675SRob Herring}; 72*724ba675SRob Herring 73*724ba675SRob Herring&ahci { 74*724ba675SRob Herring ahci-supply = <®_dldo4>; 75*724ba675SRob Herring phy-supply = <®_eldo2>; 76*724ba675SRob Herring status = "okay"; 77*724ba675SRob Herring}; 78*724ba675SRob Herring 79*724ba675SRob Herring&de { 80*724ba675SRob Herring status = "okay"; 81*724ba675SRob Herring}; 82*724ba675SRob Herring 83*724ba675SRob Herring&ehci1 { 84*724ba675SRob Herring status = "okay"; 85*724ba675SRob Herring}; 86*724ba675SRob Herring 87*724ba675SRob Herring&ehci2 { 88*724ba675SRob Herring status = "okay"; 89*724ba675SRob Herring}; 90*724ba675SRob Herring 91*724ba675SRob Herring&gmac { 92*724ba675SRob Herring pinctrl-names = "default"; 93*724ba675SRob Herring pinctrl-0 = <&gmac_rgmii_pins>; 94*724ba675SRob Herring phy-handle = <&phy1>; 95*724ba675SRob Herring phy-mode = "rgmii-id"; 96*724ba675SRob Herring phy-supply = <®_dcdc1>; 97*724ba675SRob Herring status = "okay"; 98*724ba675SRob Herring}; 99*724ba675SRob Herring 100*724ba675SRob Herring&gmac_mdio { 101*724ba675SRob Herring phy1: ethernet-phy@1 { 102*724ba675SRob Herring compatible = "ethernet-phy-ieee802.3-c22"; 103*724ba675SRob Herring reg = <1>; 104*724ba675SRob Herring }; 105*724ba675SRob Herring}; 106*724ba675SRob Herring 107*724ba675SRob Herring&hdmi { 108*724ba675SRob Herring status = "okay"; 109*724ba675SRob Herring}; 110*724ba675SRob Herring 111*724ba675SRob Herring&hdmi_out { 112*724ba675SRob Herring hdmi_out_con: endpoint { 113*724ba675SRob Herring remote-endpoint = <&hdmi_con_in>; 114*724ba675SRob Herring }; 115*724ba675SRob Herring}; 116*724ba675SRob Herring 117*724ba675SRob Herring&i2c2 { 118*724ba675SRob Herring status = "okay"; 119*724ba675SRob Herring}; 120*724ba675SRob Herring 121*724ba675SRob Herring&mmc0 { 122*724ba675SRob Herring vmmc-supply = <®_dcdc1>; 123*724ba675SRob Herring vqmmc-supply = <®_dcdc1>; 124*724ba675SRob Herring bus-width = <4>; 125*724ba675SRob Herring cd-gpios = <&pio 8 11 GPIO_ACTIVE_LOW>; // PI11 126*724ba675SRob Herring status = "okay"; 127*724ba675SRob Herring}; 128*724ba675SRob Herring 129*724ba675SRob Herring&mmc3 { 130*724ba675SRob Herring vmmc-supply = <®_dcdc1>; 131*724ba675SRob Herring vqmmc-supply = <®_dcdc1>; 132*724ba675SRob Herring bus-width = <4>; 133*724ba675SRob Herring cd-gpios = <&pio 8 10 GPIO_ACTIVE_LOW>; // PI10 134*724ba675SRob Herring status = "okay"; 135*724ba675SRob Herring}; 136*724ba675SRob Herring 137*724ba675SRob Herring&ohci1 { 138*724ba675SRob Herring status = "okay"; 139*724ba675SRob Herring}; 140*724ba675SRob Herring 141*724ba675SRob Herring&ohci2 { 142*724ba675SRob Herring status = "okay"; 143*724ba675SRob Herring}; 144*724ba675SRob Herring 145*724ba675SRob Herring®_dc1sw { 146*724ba675SRob Herring regulator-min-microvolt = <3300000>; 147*724ba675SRob Herring regulator-max-microvolt = <3300000>; 148*724ba675SRob Herring regulator-name = "vcc-lcd"; 149*724ba675SRob Herring}; 150*724ba675SRob Herring 151*724ba675SRob Herring®_dldo2 { 152*724ba675SRob Herring regulator-min-microvolt = <3300000>; 153*724ba675SRob Herring regulator-max-microvolt = <3300000>; 154*724ba675SRob Herring regulator-name = "vcc-wifi"; 155*724ba675SRob Herring}; 156*724ba675SRob Herring 157*724ba675SRob Herring&tcon_tv0 { 158*724ba675SRob Herring status = "okay"; 159*724ba675SRob Herring}; 160*724ba675SRob Herring 161*724ba675SRob Herring&uart0 { 162*724ba675SRob Herring pinctrl-names = "default"; 163*724ba675SRob Herring pinctrl-0 = <&uart0_pb_pins>; 164*724ba675SRob Herring status = "okay"; 165*724ba675SRob Herring}; 166*724ba675SRob Herring 167*724ba675SRob Herring&uart2 { 168*724ba675SRob Herring pinctrl-names = "default"; 169*724ba675SRob Herring pinctrl-0 = <&uart2_pi_pins>, <&uart2_rts_cts_pi_pins>; 170*724ba675SRob Herring uart-has-rtscts; 171*724ba675SRob Herring status = "okay"; 172*724ba675SRob Herring}; 173*724ba675SRob Herring 174*724ba675SRob Herring&uart3 { 175*724ba675SRob Herring pinctrl-names = "default"; 176*724ba675SRob Herring pinctrl-0 = <&uart3_pg_pins>, <&uart3_rts_cts_pg_pins>; 177*724ba675SRob Herring uart-has-rtscts; 178*724ba675SRob Herring status = "okay"; 179*724ba675SRob Herring}; 180*724ba675SRob Herring 181*724ba675SRob Herring&uart4 { 182*724ba675SRob Herring pinctrl-names = "default"; 183*724ba675SRob Herring pinctrl-0 = <&uart4_pg_pins>; 184*724ba675SRob Herring status = "okay"; 185*724ba675SRob Herring}; 186*724ba675SRob Herring 187*724ba675SRob Herring&uart5 { /* RS485 */ 188*724ba675SRob Herring pinctrl-names = "default"; 189*724ba675SRob Herring pinctrl-0 = <&uart5_ph_pins>; 190*724ba675SRob Herring status = "okay"; 191*724ba675SRob Herring}; 192*724ba675SRob Herring 193*724ba675SRob Herring&uart7 { 194*724ba675SRob Herring pinctrl-names = "default"; 195*724ba675SRob Herring pinctrl-0 = <&uart7_pi_pins>; 196*724ba675SRob Herring status = "okay"; 197*724ba675SRob Herring}; 198*724ba675SRob Herring 199*724ba675SRob Herring&usbphy { 200*724ba675SRob Herring usb1_vbus-supply = <®_vcc5v0>; 201*724ba675SRob Herring usb2_vbus-supply = <®_vcc5v0>; 202*724ba675SRob Herring status = "okay"; 203*724ba675SRob Herring}; 204