Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright 2021 Conley Lee
0004  * Conley Lee <conleylee@foxmail.com>
0005  */
0006 
0007 /dts-v1/;
0008 #include "sun7i-a20.dtsi"
0009 #include "sunxi-common-regulators.dtsi"
0010 
0011 #include <dt-bindings/gpio/gpio.h>
0012 #include <dt-bindings/interrupt-controller/irq.h>
0013 
0014 / {
0015         model = "HAOYU Electronics Marsboard A20";
0016         compatible = "haoyu,a20-marsboard", "allwinner,sun7i-a20";
0017 
0018         aliases {
0019                 serial0 = &uart0;
0020         };
0021 
0022         chosen {
0023                 stdout-path = "serial0:115200n8";
0024         };
0025 
0026         hdmi-connector {
0027                 compatible = "hdmi-connector";
0028                 type = "a";
0029 
0030                 port {
0031                         hdmi_con_in: endpoint {
0032                                 remote-endpoint = <&hdmi_out_con>;
0033                         };
0034                 };
0035         };
0036 };
0037 
0038 &ahci {
0039         target-supply = <&reg_ahci_5v>;
0040         status = "okay";
0041 };
0042 
0043 &codec {
0044         status = "okay";
0045 };
0046 
0047 &cpu0 {
0048         cpu-supply = <&reg_dcdc2>;
0049 };
0050 
0051 &de {
0052         status = "okay";
0053 };
0054 
0055 &ehci0 {
0056         status = "okay";
0057 };
0058 
0059 &ehci1 {
0060         status = "okay";
0061 };
0062 
0063 &gmac {
0064         pinctrl-names = "default";
0065         pinctrl-0 = <&gmac_mii_pins>, <&gmac_txerr>;
0066         phy-handle = <&phy0>;
0067         phy-mode = "mii";
0068         status = "okay";
0069 };
0070 
0071 &hdmi {
0072         status = "okay";
0073 };
0074 
0075 &hdmi_out {
0076         hdmi_out_con: endpoint {
0077                 remote-endpoint = <&hdmi_con_in>;
0078         };
0079 };
0080 
0081 &i2c0 {
0082         status = "okay";
0083 
0084         axp209: pmic@34 {
0085                 reg = <0x34>;
0086                 interrupt-parent = <&nmi_intc>;
0087                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0088         };
0089 };
0090 
0091 &mmc0 {
0092         vmmc-supply = <&reg_vcc3v3>;
0093         bus-width = <4>;
0094         cd-gpios = <&pio 7 10 GPIO_ACTIVE_LOW>; /* PH10 */
0095         status = "okay";
0096 };
0097 
0098 &gmac_mdio {
0099         phy0: ethernet-phy@0 {
0100                 reg = <0>;
0101         };
0102 };
0103 
0104 &ohci0 {
0105         status = "okay";
0106 };
0107 
0108 &ohci1 {
0109         status = "okay";
0110 };
0111 
0112 &otg_sram {
0113         status = "okay";
0114 };
0115 
0116 &pio {
0117         gmac_txerr: gmac-txerr-pin {
0118                 pins = "PA17";
0119                 function = "gmac";
0120         };
0121 };
0122 
0123 &reg_ahci_5v {
0124         status = "okay";
0125 };
0126 
0127 #include "axp209.dtsi"
0128 
0129 &ac_power_supply {
0130         status = "okay";
0131 };
0132 
0133 &reg_dcdc2 {
0134         regulator-always-on;
0135         regulator-min-microvolt = <1000000>;
0136         regulator-max-microvolt = <1450000>;
0137         regulator-name = "vdd-cpu";
0138 };
0139 
0140 &reg_dcdc3 {
0141         regulator-always-on;
0142         regulator-min-microvolt = <1000000>;
0143         regulator-max-microvolt = <1400000>;
0144         regulator-name = "vdd-int-dll";
0145 };
0146 
0147 &reg_ldo1 {
0148         regulator-name = "vdd-rtc";
0149 };
0150 
0151 &reg_ldo2 {
0152         regulator-always-on;
0153         regulator-min-microvolt = <3000000>;
0154         regulator-max-microvolt = <3000000>;
0155         regulator-name = "avcc";
0156 };
0157 
0158 &reg_usb1_vbus {
0159         status = "okay";
0160 };
0161 
0162 &reg_usb2_vbus {
0163         status = "okay";
0164 };
0165 
0166 &uart0 {
0167         pinctrl-names = "default";
0168         pinctrl-0 = <&uart0_pb_pins>;
0169         status = "okay";
0170 };
0171 
0172 &usb_otg {
0173         dr_mode = "otg";
0174         status = "okay";
0175 };
0176 
0177 &usbphy {
0178         usb0_id_det-gpios = <&pio 7 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PH4 */
0179         usb1_vbus-supply = <&reg_usb1_vbus>;
0180         usb2_vbus-supply = <&reg_usb2_vbus>;
0181         status = "okay";
0182 };