Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 // Copyright (C) 2018 Amarula Solutions B.V.
0003 // Author: Jagan Teki <jagan@amarulasolutions.com>
0004 
0005 /dts-v1/;
0006 
0007 #include "sun50i-a64.dtsi"
0008 #include "sun50i-a64-cpu-opp.dtsi"
0009 
0010 #include <dt-bindings/gpio/gpio.h>
0011 
0012 / {
0013         model = "Amarula A64-Relic";
0014         compatible = "amarula,a64-relic", "allwinner,sun50i-a64";
0015 
0016         aliases {
0017                 serial0 = &uart0;
0018         };
0019 
0020         chosen {
0021                 stdout-path = "serial0:115200n8";
0022         };
0023 
0024         i2c {
0025                 compatible = "i2c-gpio";
0026                 sda-gpios = <&pio 4 13 GPIO_ACTIVE_HIGH>;
0027                 scl-gpios = <&pio 4 12 GPIO_ACTIVE_HIGH>;
0028                 i2c-gpio,delay-us = <5>;
0029                 #address-cells = <1>;
0030                 #size-cells = <0>;
0031 
0032                 ov5640: camera@3c {
0033                         compatible = "ovti,ov5640";
0034                         reg = <0x3c>;
0035                         pinctrl-names = "default";
0036                         pinctrl-0 = <&csi_mclk_pin>;
0037                         clocks = <&ccu CLK_CSI_MCLK>;
0038                         clock-names = "xclk";
0039 
0040                         AVDD-supply = <&reg_aldo1>;
0041                         DOVDD-supply = <&reg_dldo3>;
0042                         DVDD-supply = <&reg_eldo3>;
0043                         reset-gpios = <&pio 4 14 GPIO_ACTIVE_LOW>; /* CSI-RST-R: PE14 */
0044                         powerdown-gpios = <&pio 4 15 GPIO_ACTIVE_HIGH>; /* CSI-STBY-R: PE15 */
0045 
0046                         port {
0047                                 ov5640_ep: endpoint {
0048                                         remote-endpoint = <&csi_ep>;
0049                                         bus-width = <8>;
0050                                         hsync-active = <1>; /* Active high */
0051                                         vsync-active = <0>; /* Active low */
0052                                         data-active = <1>;  /* Active high */
0053                                         pclk-sample = <1>;  /* Rising */
0054                                 };
0055                         };
0056                 };
0057         };
0058 
0059         wifi_pwrseq: wifi-pwrseq {
0060                 compatible = "mmc-pwrseq-simple";
0061                 clocks = <&rtc CLK_OSC32K_FANOUT>;
0062                 clock-names = "ext_clock";
0063                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* WL-PMU-EN: PL2 */
0064         };
0065 };
0066 
0067 &cpu0 {
0068         cpu-supply = <&reg_dcdc2>;
0069 };
0070 
0071 &cpu1 {
0072         cpu-supply = <&reg_dcdc2>;
0073 };
0074 
0075 &cpu2 {
0076         cpu-supply = <&reg_dcdc2>;
0077 };
0078 
0079 &cpu3 {
0080         cpu-supply = <&reg_dcdc2>;
0081 };
0082 
0083 &csi {
0084         status = "okay";
0085 
0086         port {
0087                 csi_ep: endpoint {
0088                         remote-endpoint = <&ov5640_ep>;
0089                         bus-width = <8>;
0090                         hsync-active = <1>; /* Active high */
0091                         vsync-active = <0>; /* Active low */
0092                         data-active = <1>;  /* Active high */
0093                         pclk-sample = <1>;  /* Rising */
0094                 };
0095         };
0096 };
0097 
0098 &ehci0 {
0099         status = "okay";
0100 };
0101 
0102 &i2c0 {
0103         status = "okay";
0104 
0105         sensor@48 {
0106                 compatible = "st,stlm75";
0107                 reg = <0x48>;
0108         };
0109 };
0110 
0111 &i2c0_pins {
0112         bias-pull-up;
0113 };
0114 
0115 &i2c1 {
0116         status = "okay";
0117 
0118         touchscreen@5d {
0119                 compatible = "goodix,gt5663";
0120                 reg = <0x5d>;
0121                 AVDD28-supply = <&reg_ldo_io0>;                 /* VCC-CTP: GPIO0-LDO */
0122                 interrupt-parent = <&pio>;
0123                 interrupts = <7 4 IRQ_TYPE_EDGE_FALLING>;
0124                 irq-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>;        /* CTP-INT: PH4 */
0125                 reset-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>;      /* CTP-RST: PH8 */
0126                 touchscreen-inverted-x;
0127                 touchscreen-inverted-y;
0128         };
0129 };
0130 
0131 &mmc1 {
0132         pinctrl-names = "default";
0133         pinctrl-0 = <&mmc1_pins>;
0134         vmmc-supply = <&reg_dcdc1>;
0135         /*
0136          * Schematic shows both dldo4 and eldo1 connected for vcc-io-wifi, but
0137          * dldo4 connection shows DNP(Do Not Populate) and eldo1 connected with
0138          * 0Ohm register to vcc-io-wifi so eldo1 is used.
0139          */
0140         vqmmc-supply = <&reg_eldo1>;
0141         mmc-pwrseq = <&wifi_pwrseq>;
0142         bus-width = <4>;
0143         non-removable;
0144         status = "okay";
0145 
0146         brcmf: wifi@1 {
0147                 reg = <1>;
0148                 compatible = "brcm,bcm4329-fmac";
0149                 interrupt-parent = <&r_pio>;
0150                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>;  /* WL-WAKE-AP: PL3 */
0151                 interrupt-names = "host-wake";
0152         };
0153 };
0154 
0155 &mmc2 {
0156         pinctrl-names = "default";
0157         pinctrl-0 = <&mmc2_pins>;
0158         vmmc-supply = <&reg_dcdc1>;
0159         bus-width = <8>;
0160         non-removable;
0161         cap-mmc-hw-reset;
0162         status = "okay";
0163 };
0164 
0165 &ohci0 {
0166         status = "okay";
0167 };
0168 
0169 &r_rsb {
0170         status = "okay";
0171 
0172         axp803: pmic@3a3 {
0173                 compatible = "x-powers,axp803";
0174                 reg = <0x3a3>;
0175                 interrupt-parent = <&r_intc>;
0176                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0177                 x-powers,drive-vbus-en; /* set N_VBUSEN as output pin */
0178         };
0179 };
0180 
0181 #include "axp803.dtsi"
0182 
0183 &reg_aldo1 {
0184         regulator-always-on;
0185         regulator-min-microvolt = <2800000>;
0186         regulator-max-microvolt = <2800000>;
0187         regulator-name = "avdd-csi";
0188 };
0189 
0190 &reg_aldo2 {
0191         regulator-always-on;
0192         regulator-min-microvolt = <1800000>;
0193         regulator-max-microvolt = <3300000>;
0194         regulator-name = "vcc-pl";
0195 };
0196 
0197 &reg_aldo3 {
0198         regulator-always-on;
0199         regulator-min-microvolt = <3000000>;
0200         regulator-max-microvolt = <3000000>;
0201         regulator-name = "vcc-pll-avcc";
0202 };
0203 
0204 &reg_dcdc1 {
0205         regulator-always-on;
0206         regulator-min-microvolt = <3300000>;
0207         regulator-max-microvolt = <3300000>;
0208         regulator-name = "vcc-3v3";
0209 };
0210 
0211 &reg_dcdc2 {
0212         regulator-always-on;
0213         regulator-min-microvolt = <1040000>;
0214         regulator-max-microvolt = <1300000>;
0215         regulator-name = "vdd-cpux";
0216 };
0217 
0218 /* DCDC3 is polyphased with DCDC2 */
0219 
0220 &reg_dcdc5 {
0221         regulator-always-on;
0222         regulator-min-microvolt = <1500000>;
0223         regulator-max-microvolt = <1500000>;
0224         regulator-name = "vcc-dram";
0225 };
0226 
0227 &reg_dcdc6 {
0228         regulator-always-on;
0229         regulator-min-microvolt = <1100000>;
0230         regulator-max-microvolt = <1100000>;
0231         regulator-name = "vdd-sys";
0232 };
0233 
0234 &reg_dldo1 {
0235         regulator-min-microvolt = <3300000>;
0236         regulator-max-microvolt = <3300000>;
0237         regulator-name = "vcc-hdmi-dsi-sensor";
0238 };
0239 
0240 &reg_dldo2 {
0241         regulator-min-microvolt = <3300000>;
0242         regulator-max-microvolt = <3300000>;
0243         regulator-name = "vcc-mipi";
0244 };
0245 
0246 &reg_dldo3 {
0247         regulator-min-microvolt = <2800000>;
0248         regulator-max-microvolt = <2800000>;
0249         regulator-name = "dovdd-csi";
0250 };
0251 
0252 &reg_dldo4 {
0253         regulator-min-microvolt = <3300000>;
0254         regulator-max-microvolt = <3300000>;
0255         regulator-name = "vcc-wifi-io";
0256 };
0257 
0258 &reg_drivevbus {
0259         regulator-name = "usb0-vbus";
0260         status = "okay";
0261 };
0262 
0263 &reg_eldo1 {
0264         regulator-always-on;
0265         regulator-min-microvolt = <1800000>;
0266         regulator-max-microvolt = <1800000>;
0267         regulator-name = "cpvdd";
0268 };
0269 
0270 &reg_eldo3 {
0271         regulator-min-microvolt = <1800000>;
0272         regulator-max-microvolt = <1800000>;
0273         regulator-name = "dvdd-csi";
0274 };
0275 
0276 &reg_fldo1 {
0277         regulator-min-microvolt = <1200000>;
0278         regulator-max-microvolt = <1200000>;
0279         regulator-name = "vcc-1v2-hsic";
0280 };
0281 
0282 /*
0283  * The A64 chip cannot work without this regulator off, although
0284  * it seems to be only driving the AR100 core.
0285  * Maybe we don't still know well about CPUs domain.
0286  */
0287 &reg_fldo2 {
0288         regulator-always-on;
0289         regulator-min-microvolt = <1100000>;
0290         regulator-max-microvolt = <1100000>;
0291         regulator-name = "vdd-cpus";
0292 };
0293 
0294 &reg_ldo_io0 {
0295         regulator-min-microvolt = <2800000>;
0296         regulator-max-microvolt = <2800000>;
0297         regulator-name = "vcc-ctp";
0298         status = "okay";
0299 };
0300 
0301 &reg_rtc_ldo {
0302         regulator-name = "vcc-rtc";
0303 };
0304 
0305 &uart0 {
0306         pinctrl-names = "default";
0307         pinctrl-0 = <&uart0_pb_pins>;
0308         status = "okay";
0309 };
0310 
0311 &usb_otg {
0312         dr_mode = "otg";
0313         status = "okay";
0314 };
0315 
0316 &usbphy {
0317         usb0_id_det-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
0318         usb0_vbus-supply = <&reg_drivevbus>;
0319         status = "okay";
0320 };