Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
0002 // Copyright (C) Harald Geyer <harald@ccbib.org>
0003 // based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.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 #include <dt-bindings/input/input.h>
0012 #include <dt-bindings/pwm/pwm.h>
0013 
0014 / {
0015         model = "Olimex A64 Teres-I";
0016         compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64";
0017         chassis-type = "laptop";
0018 
0019         aliases {
0020                 serial0 = &uart0;
0021         };
0022 
0023         backlight: backlight {
0024                 compatible = "pwm-backlight";
0025                 pwms = <&pwm 0 50000 0>;
0026                 power-supply = <&reg_dcdc1>;
0027                 brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>;
0028                 default-brightness-level = <5>;
0029                 enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */
0030         };
0031 
0032         chosen {
0033                 stdout-path = "serial0:115200n8";
0034 
0035                 framebuffer-lcd {
0036                         eDP25-supply = <&reg_dldo2>;
0037                         eDP12-supply = <&reg_dldo3>;
0038                 };
0039         };
0040 
0041         gpio-keys {
0042                 compatible = "gpio-keys";
0043 
0044                 lid-switch {
0045                         label = "Lid Switch";
0046                         gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
0047                         linux,input-type = <EV_SW>;
0048                         linux,code = <SW_LID>;
0049                         wakeup-source;
0050                 };
0051         };
0052 
0053         leds {
0054                 compatible = "gpio-leds";
0055 
0056                 led-0 {
0057                         label = "teres-i:green:capslock";
0058                         gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */
0059                 };
0060 
0061                 led-1 {
0062                         label = "teres-i:green:numlock";
0063                         gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */
0064                 };
0065         };
0066 
0067         reg_usb1_vbus: usb1-vbus {
0068                 compatible = "regulator-fixed";
0069                 regulator-name = "usb1-vbus";
0070                 regulator-min-microvolt = <5000000>;
0071                 regulator-max-microvolt = <5000000>;
0072                 enable-active-high;
0073                 gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
0074                 status = "okay";
0075         };
0076 
0077         wifi_pwrseq: wifi_pwrseq {
0078                 compatible = "mmc-pwrseq-simple";
0079                 reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
0080         };
0081 
0082         speaker_amp: audio-amplifier {
0083                 compatible = "simple-audio-amplifier";
0084                 enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */
0085                 sound-name-prefix = "Speaker Amp";
0086         };
0087 };
0088 
0089 &codec {
0090         status = "okay";
0091 };
0092 
0093 &codec_analog {
0094         cpvdd-supply = <&reg_eldo1>;
0095         status = "okay";
0096 };
0097 
0098 &dai {
0099         status = "okay";
0100 };
0101 
0102 &de {
0103         status = "okay";
0104 };
0105 
0106 &cpu0 {
0107         cpu-supply = <&reg_dcdc2>;
0108 };
0109 
0110 &cpu1 {
0111         cpu-supply = <&reg_dcdc2>;
0112 };
0113 
0114 &cpu2 {
0115         cpu-supply = <&reg_dcdc2>;
0116 };
0117 
0118 &cpu3 {
0119         cpu-supply = <&reg_dcdc2>;
0120 };
0121 
0122 &ehci1 {
0123         status = "okay";
0124 };
0125 
0126 
0127 &i2c0 {
0128         clock-frequency = <100000>;
0129         status = "okay";
0130 
0131         anx6345: anx6345@38 {
0132                 compatible = "analogix,anx6345";
0133                 reg = <0x38>;
0134                 reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */
0135                 dvdd25-supply = <&reg_dldo2>;
0136                 dvdd12-supply = <&reg_dldo3>;
0137 
0138                 ports {
0139                         #address-cells = <1>;
0140                         #size-cells = <0>;
0141 
0142                         port@0 {
0143                                 reg = <0>;
0144 
0145                                 anx6345_in: endpoint {
0146                                         remote-endpoint = <&tcon0_out_anx6345>;
0147                                 };
0148                         };
0149                 };
0150         };
0151 };
0152 
0153 &mixer0 {
0154         status = "okay";
0155 };
0156 
0157 &mmc0 {
0158         pinctrl-names = "default";
0159         pinctrl-0 = <&mmc0_pins>;
0160         vmmc-supply = <&reg_dcdc1>;
0161         cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
0162         disable-wp;
0163         bus-width = <4>;
0164         status = "okay";
0165 };
0166 
0167 &mmc1 {
0168         pinctrl-names = "default";
0169         pinctrl-0 = <&mmc1_pins>;
0170         vmmc-supply = <&reg_aldo2>;
0171         vqmmc-supply = <&reg_dldo4>;
0172         mmc-pwrseq = <&wifi_pwrseq>;
0173         bus-width = <4>;
0174         non-removable;
0175         status = "okay";
0176 
0177         rtl8723bs: wifi@1 {
0178                 reg = <1>;
0179                 interrupt-parent = <&r_pio>;
0180                 interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
0181                 interrupt-names = "host-wake";
0182         };
0183 };
0184 
0185 &mmc2 {
0186         pinctrl-names = "default";
0187         pinctrl-0 = <&mmc2_pins>;
0188         vmmc-supply = <&reg_dcdc1>;
0189         vqmmc-supply = <&reg_dcdc1>;
0190         bus-width = <8>;
0191         non-removable;
0192         cap-mmc-hw-reset;
0193         status = "okay";
0194 };
0195 
0196 &ohci1 {
0197         status = "okay";
0198 };
0199 
0200 &pio {
0201         vcc-pc-supply = <&reg_dcdc1>;
0202         vcc-pd-supply = <&reg_dldo2>;
0203         vcc-pe-supply = <&reg_aldo1>;
0204         vcc-pf-supply = <&reg_dcdc1>;  /* No dedicated supply-pin for this */
0205         vcc-pg-supply = <&reg_aldo2>;
0206 };
0207 
0208 &pwm {
0209         status = "okay";
0210 };
0211 
0212 &r_rsb {
0213         status = "okay";
0214 
0215         axp803: pmic@3a3 {
0216                 compatible = "x-powers,axp803";
0217                 reg = <0x3a3>;
0218                 interrupt-parent = <&r_intc>;
0219                 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
0220         };
0221 };
0222 
0223 #include "axp803.dtsi"
0224 
0225 &ac_power_supply {
0226         status = "okay";
0227 };
0228 
0229 &battery_power_supply {
0230         status = "okay";
0231 };
0232 
0233 &reg_aldo1 {
0234         regulator-always-on;
0235         regulator-min-microvolt = <2800000>;
0236         regulator-max-microvolt = <2800000>;
0237         regulator-name = "vcc-pe";
0238 };
0239 
0240 &reg_aldo2 {
0241         regulator-always-on;
0242         regulator-min-microvolt = <3300000>;
0243         regulator-max-microvolt = <3300000>;
0244         regulator-name = "vcc-pl";
0245 };
0246 
0247 &reg_aldo3 {
0248         regulator-always-on;
0249         regulator-min-microvolt = <3000000>;
0250         regulator-max-microvolt = <3000000>;
0251         regulator-name = "vcc-pll-avcc";
0252 };
0253 
0254 &reg_dcdc1 {
0255         regulator-always-on;
0256         regulator-min-microvolt = <3300000>;
0257         regulator-max-microvolt = <3300000>;
0258         regulator-name = "vcc-3v3";
0259 };
0260 
0261 &reg_dcdc2 {
0262         regulator-always-on;
0263         regulator-min-microvolt = <1040000>;
0264         regulator-max-microvolt = <1300000>;
0265         regulator-name = "vdd-cpux";
0266 };
0267 
0268 /* DCDC3 is polyphased with DCDC2 */
0269 
0270 &reg_dcdc5 {
0271         regulator-always-on;
0272         regulator-min-microvolt = <1500000>;
0273         regulator-max-microvolt = <1500000>;
0274         regulator-name = "vcc-ddr3";
0275 };
0276 
0277 &reg_dcdc6 {
0278         regulator-always-on;
0279         regulator-min-microvolt = <1100000>;
0280         regulator-max-microvolt = <1100000>;
0281         regulator-name = "vdd-sys";
0282 };
0283 
0284 &reg_dldo1 {
0285         regulator-min-microvolt = <3300000>;
0286         regulator-max-microvolt = <3300000>;
0287         regulator-name = "vcc-hdmi";
0288 };
0289 
0290 &reg_dldo2 {
0291         regulator-min-microvolt = <2500000>;
0292         regulator-max-microvolt = <2500000>;
0293         regulator-name = "vcc-pd";
0294 };
0295 
0296 &reg_dldo3 {
0297         regulator-min-microvolt = <1200000>;
0298         regulator-max-microvolt = <1200000>;
0299         regulator-name = "vdd-edp";
0300 };
0301 
0302 &reg_dldo4 {
0303         regulator-min-microvolt = <3300000>;
0304         regulator-max-microvolt = <3300000>;
0305         regulator-name = "vcc-wifi-io";
0306 };
0307 
0308 &reg_eldo1 {
0309         regulator-min-microvolt = <1800000>;
0310         regulator-max-microvolt = <1800000>;
0311         regulator-name = "cpvdd";
0312 };
0313 
0314 &reg_eldo2 {
0315         regulator-min-microvolt = <1800000>;
0316         regulator-max-microvolt = <1800000>;
0317         regulator-name = "vcc-dvdd-csi";
0318 };
0319 
0320 &reg_fldo1 {
0321         regulator-min-microvolt = <1200000>;
0322         regulator-max-microvolt = <1200000>;
0323         regulator-name = "vcc-1v2-hsic";
0324 };
0325 
0326 /*
0327  * The A64 chip cannot work with this regulator off, although
0328  * it seems to be only driving the AR100 core.
0329  * Maybe we don't still know well about CPUs domain.
0330  */
0331 &reg_fldo2 {
0332         regulator-always-on;
0333         regulator-min-microvolt = <1100000>;
0334         regulator-max-microvolt = <1100000>;
0335         regulator-name = "vdd-cpus";
0336 };
0337 
0338 &reg_rtc_ldo {
0339         regulator-name = "vcc-rtc";
0340 };
0341 
0342 &simplefb_hdmi {
0343         vcc-hdmi-supply = <&reg_dldo1>;
0344 };
0345 
0346 &sound {
0347         simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
0348         simple-audio-card,widgets = "Headphone", "Headphone Jack",
0349                                     "Microphone", "Headset Microphone",
0350                                     "Microphone", "Internal Microphone",
0351                                     "Speaker", "Internal Speaker";
0352         simple-audio-card,routing =
0353                         "Left DAC", "DACL",
0354                         "Right DAC", "DACR",
0355                         "ADCL", "Left ADC",
0356                         "ADCR", "Right ADC",
0357                         "Headphone Jack", "HP",
0358                         "Speaker Amp INL", "LINEOUT",
0359                         "Speaker Amp INR", "LINEOUT",
0360                         "Internal Speaker", "Speaker Amp OUTL",
0361                         "Internal Speaker", "Speaker Amp OUTR",
0362                         "Internal Microphone", "MBIAS",
0363                         "MIC1", "Internal Microphone",
0364                         "Headset Microphone", "HBIAS",
0365                         "MIC2", "Headset Microphone";
0366         status = "okay";
0367 };
0368 
0369 &tcon0 {
0370         pinctrl-names = "default";
0371         pinctrl-0 = <&lcd_rgb666_pins>;
0372 
0373         status = "okay";
0374 };
0375 
0376 &tcon0_out {
0377         tcon0_out_anx6345: endpoint@0 {
0378                 reg = <0>;
0379                 remote-endpoint = <&anx6345_in>;
0380         };
0381 };
0382 
0383 &uart0 {
0384         pinctrl-names = "default";
0385         pinctrl-0 = <&uart0_pb_pins>;
0386         status = "okay";
0387 };
0388 
0389 &usbphy {
0390         usb1_vbus-supply = <&reg_usb1_vbus>;
0391         status = "okay";
0392 };