Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2017 Jagan Teki <jteki@openedev.com>
0003 
0004 /dts-v1/;
0005 
0006 #include "sun50i-a64.dtsi"
0007 #include "sun50i-a64-cpu-opp.dtsi"
0008 
0009 #include <dt-bindings/gpio/gpio.h>
0010 
0011 / {
0012         model = "Olimex A64-Olinuxino";
0013         compatible = "olimex,a64-olinuxino", "allwinner,sun50i-a64";
0014 
0015         aliases {
0016                 ethernet0 = &emac;
0017                 serial0 = &uart0;
0018         };
0019 
0020         chosen {
0021                 stdout-path = "serial0:115200n8";
0022         };
0023 
0024         hdmi-connector {
0025                 compatible = "hdmi-connector";
0026                 type = "a";
0027 
0028                 port {
0029                         hdmi_con_in: endpoint {
0030                                 remote-endpoint = <&hdmi_out_con>;
0031                         };
0032                 };
0033         };
0034 
0035         leds {
0036                 compatible = "gpio-leds";
0037 
0038                 led-0 {
0039                         label = "a64-olinuxino:red:user";
0040                         gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
0041                 };
0042         };
0043 
0044         reg_usb1_vbus: usb1-vbus {
0045                 compatible = "regulator-fixed";
0046                 regulator-name = "usb1-vbus";
0047                 regulator-min-microvolt = <5000000>;
0048                 regulator-max-microvolt = <5000000>;
0049                 regulator-boot-on;
0050                 enable-active-high;
0051                 gpio = <&pio 6 9 GPIO_ACTIVE_HIGH>; /* PG9 */
0052                 status = "okay";
0053         };
0054 
0055         wifi_pwrseq: wifi_pwrseq {
0056                 compatible = "mmc-pwrseq-simple";
0057                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
0058         };
0059 };
0060 
0061 &codec {
0062         status = "okay";
0063 };
0064 
0065 &codec_analog {
0066         cpvdd-supply = <&reg_eldo1>;
0067         status = "okay";
0068 };
0069 
0070 &cpu0 {
0071         cpu-supply = <&reg_dcdc2>;
0072 };
0073 
0074 &cpu1 {
0075         cpu-supply = <&reg_dcdc2>;
0076 };
0077 
0078 &cpu2 {
0079         cpu-supply = <&reg_dcdc2>;
0080 };
0081 
0082 &cpu3 {
0083         cpu-supply = <&reg_dcdc2>;
0084 };
0085 
0086 &dai {
0087         status = "okay";
0088 };
0089 
0090 &de {
0091         status = "okay";
0092 };
0093 
0094 &ehci0 {
0095         status = "okay";
0096 };
0097 
0098 &ehci1 {
0099         status = "okay";
0100 };
0101 
0102 &emac {
0103         pinctrl-names = "default";
0104         pinctrl-0 = <&rgmii_pins>;
0105         phy-mode = "rgmii";
0106         phy-handle = <&ext_rgmii_phy>;
0107         phy-supply = <&reg_dcdc1>;
0108         allwinner,tx-delay-ps = <600>;
0109         status = "okay";
0110 };
0111 
0112 &hdmi {
0113         hvcc-supply = <&reg_dldo1>;
0114         status = "okay";
0115 };
0116 
0117 &hdmi_out {
0118         hdmi_out_con: endpoint {
0119                 remote-endpoint = <&hdmi_con_in>;
0120         };
0121 };
0122 
0123 &mdio {
0124         ext_rgmii_phy: ethernet-phy@1 {
0125                 compatible = "ethernet-phy-ieee802.3-c22";
0126                 reg = <1>;
0127         };
0128 };
0129 
0130 &mmc0 {
0131         pinctrl-names = "default";
0132         pinctrl-0 = <&mmc0_pins>;
0133         vmmc-supply = <&reg_dcdc1>;
0134         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
0135         disable-wp;
0136         bus-width = <4>;
0137         status = "okay";
0138 };
0139 
0140 &mmc1 {
0141         pinctrl-names = "default";
0142         pinctrl-0 = <&mmc1_pins>;
0143         vmmc-supply = <&reg_dcdc1>;
0144         vqmmc-supply = <&reg_dldo4>;
0145         mmc-pwrseq = <&wifi_pwrseq>;
0146         bus-width = <4>;
0147         non-removable;
0148         status = "okay";
0149 
0150         rtl8723bs: wifi@1 {
0151                 reg = <1>;
0152                 interrupt-parent = <&r_pio>;
0153                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
0154                 interrupt-names = "host-wake";
0155         };
0156 };
0157 
0158 &ohci0 {
0159         status = "okay";
0160 };
0161 
0162 &ohci1 {
0163         status = "okay";
0164 };
0165 
0166 &pio {
0167         vcc-pc-supply = <&reg_dcdc1>;
0168         vcc-pd-supply = <&reg_dcdc1>;
0169         vcc-pe-supply = <&reg_aldo1>;
0170         vcc-pg-supply = <&reg_dldo4>;
0171 };
0172 
0173 &r_pio {
0174         /*
0175          * FIXME: We can't add that supply for now since it would
0176          * create a circular dependency between pinctrl, the regulator
0177          * and the RSB Bus.
0178          *
0179          * vcc-pl-supply = <&reg_aldo2>;
0180          */
0181 };
0182 
0183 &pio {
0184         vcc-pa-supply = <&reg_dcdc1>;
0185         vcc-pb-supply = <&reg_dcdc1>;
0186         vcc-pc-supply = <&reg_dcdc1>;
0187         vcc-pd-supply = <&reg_dcdc1>;
0188         vcc-pe-supply = <&reg_aldo1>;
0189         vcc-pf-supply = <&reg_dcdc1>;
0190         vcc-pg-supply = <&reg_dldo4>;
0191         vcc-ph-supply = <&reg_dcdc1>;
0192 };
0193 
0194 &r_rsb {
0195         status = "okay";
0196 
0197         axp803: pmic@3a3 {
0198                 compatible = "x-powers,axp803";
0199                 reg = <0x3a3>;
0200                 interrupt-parent = <&r_intc>;
0201                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0202                 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
0203         };
0204 };
0205 
0206 /* VCC-PL is powered by aldo2 but we cannot add it as the RSB */
0207 /* interface used to talk to the PMIC in on the PL pins */
0208 /* &r_pio { */
0209 /*      vcc-pl-supply = <&reg_aldo2>; */
0210 /* }; */
0211 
0212 #include "axp803.dtsi"
0213 
0214 &ac_power_supply {
0215         status = "okay";
0216 };
0217 
0218 &battery_power_supply {
0219         status = "okay";
0220 };
0221 
0222 &reg_aldo1 {
0223         regulator-always-on;
0224         regulator-min-microvolt = <2800000>;
0225         regulator-max-microvolt = <2800000>;
0226         regulator-name = "vcc-pe";
0227 };
0228 
0229 &reg_aldo2 {
0230         regulator-always-on;
0231         regulator-min-microvolt = <3300000>;
0232         regulator-max-microvolt = <3300000>;
0233         regulator-name = "vcc-pl";
0234 };
0235 
0236 &reg_aldo3 {
0237         regulator-always-on;
0238         regulator-min-microvolt = <3000000>;
0239         regulator-max-microvolt = <3000000>;
0240         regulator-name = "vcc-pll-avcc";
0241 };
0242 
0243 &reg_dcdc1 {
0244         regulator-always-on;
0245         regulator-min-microvolt = <3300000>;
0246         regulator-max-microvolt = <3300000>;
0247         regulator-name = "vcc-3v3";
0248 };
0249 
0250 &reg_dcdc2 {
0251         regulator-always-on;
0252         regulator-min-microvolt = <1040000>;
0253         regulator-max-microvolt = <1300000>;
0254         regulator-name = "vdd-cpux";
0255 };
0256 
0257 /* DCDC3 is polyphased with DCDC2 */
0258 
0259 /*
0260  * The board uses DDR3L DRAM chips. 1.36V is the closest to the nominal
0261  * 1.35V that the PMIC can drive.
0262  */
0263 &reg_dcdc5 {
0264         regulator-always-on;
0265         regulator-min-microvolt = <1360000>;
0266         regulator-max-microvolt = <1360000>;
0267         regulator-name = "vcc-ddr3";
0268 };
0269 
0270 &reg_dcdc6 {
0271         regulator-always-on;
0272         regulator-min-microvolt = <1100000>;
0273         regulator-max-microvolt = <1100000>;
0274         regulator-name = "vdd-sys";
0275 };
0276 
0277 &reg_dldo1 {
0278         regulator-min-microvolt = <3300000>;
0279         regulator-max-microvolt = <3300000>;
0280         regulator-name = "vcc-hdmi";
0281 };
0282 
0283 &reg_dldo2 {
0284         regulator-min-microvolt = <3300000>;
0285         regulator-max-microvolt = <3300000>;
0286         regulator-name = "vcc-mipi";
0287 };
0288 
0289 &reg_dldo3 {
0290         regulator-min-microvolt = <2800000>;
0291         regulator-max-microvolt = <2800000>;
0292         regulator-name = "vcc-avdd-csi";
0293 };
0294 
0295 &reg_dldo4 {
0296         regulator-min-microvolt = <3300000>;
0297         regulator-max-microvolt = <3300000>;
0298         regulator-name = "vcc-wifi-io";
0299 };
0300 
0301 &reg_drivevbus {
0302         regulator-name = "usb0-vbus";
0303         status = "okay";
0304 };
0305 
0306 &reg_eldo1 {
0307         regulator-min-microvolt = <1800000>;
0308         regulator-max-microvolt = <1800000>;
0309         regulator-name = "cpvdd";
0310 };
0311 
0312 &reg_eldo2 {
0313         regulator-min-microvolt = <1800000>;
0314         regulator-max-microvolt = <1800000>;
0315         regulator-name = "vcc-dvdd-csi";
0316 };
0317 
0318 &reg_fldo1 {
0319         regulator-min-microvolt = <1200000>;
0320         regulator-max-microvolt = <1200000>;
0321         regulator-name = "vcc-1v2-hsic";
0322 };
0323 
0324 /*
0325  * The A64 chip cannot work without this regulator off, although
0326  * it seems to be only driving the AR100 core.
0327  * Maybe we don't still know well about CPUs domain.
0328  */
0329 &reg_fldo2 {
0330         regulator-always-on;
0331         regulator-min-microvolt = <1100000>;
0332         regulator-max-microvolt = <1100000>;
0333         regulator-name = "vdd-cpus";
0334 };
0335 
0336 &reg_rtc_ldo {
0337         regulator-name = "vcc-rtc";
0338 };
0339 
0340 &simplefb_hdmi {
0341         vcc-hdmi-supply = <&reg_dldo1>;
0342 };
0343 
0344 &sound {
0345         simple-audio-card,aux-devs = <&codec_analog>;
0346         simple-audio-card,widgets = "Microphone", "Microphone Jack Left",
0347                     "Microphone", "Microphone Jack Right",
0348                     "Headphone", "Headphone Jack";
0349         simple-audio-card,routing = "Left DAC", "DACL",
0350                     "Right DAC", "DACR",
0351                     "Headphone Jack", "HP",
0352                     "ADCL", "Left ADC",
0353                     "ADCR", "Right ADC",
0354                     "Microphone Jack Left", "MBIAS",
0355                     "MIC1", "Microphone Jack Left",
0356                     "Microphone Jack Right", "MBIAS",
0357                     "MIC2", "Microphone Jack Right";
0358         status = "okay";
0359 };
0360 
0361 &uart0 {
0362         pinctrl-names = "default";
0363         pinctrl-0 = <&uart0_pb_pins>;
0364         status = "okay";
0365 };
0366 
0367 &usb_otg {
0368         dr_mode = "otg";
0369         status = "okay";
0370 };
0371 
0372 &usbphy {
0373         status = "okay";
0374         usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
0375         usb0_vbus-supply = <&reg_drivevbus>;
0376         usb1_vbus-supply = <&reg_usb1_vbus>;
0377 };