1cabbaed7SClément Péron// SPDX-License-Identifier: (GPL-2.0 OR MIT) 2cabbaed7SClément Péron// Copyright (C) Harald Geyer <harald@ccbib.org> 3cabbaed7SClément Péron// based on sun50i-a64-olinuxino.dts by Jagan Teki <jteki@openedev.com> 4c916eb95SHarald Geyer 5c916eb95SHarald Geyer/dts-v1/; 6c916eb95SHarald Geyer 7c916eb95SHarald Geyer#include "sun50i-a64.dtsi" 8ac904843SVasily Khoruzhick#include "sun50i-a64-cpu-opp.dtsi" 9c916eb95SHarald Geyer 10c916eb95SHarald Geyer#include <dt-bindings/gpio/gpio.h> 11c916eb95SHarald Geyer#include <dt-bindings/input/input.h> 12c916eb95SHarald Geyer#include <dt-bindings/pwm/pwm.h> 13c916eb95SHarald Geyer 14c916eb95SHarald Geyer/ { 15c916eb95SHarald Geyer model = "Olimex A64 Teres-I"; 16c916eb95SHarald Geyer compatible = "olimex,a64-teres-i", "allwinner,sun50i-a64"; 17d900a1cdSArnaud Ferraris chassis-type = "laptop"; 18c916eb95SHarald Geyer 19c916eb95SHarald Geyer aliases { 20c916eb95SHarald Geyer serial0 = &uart0; 21c916eb95SHarald Geyer }; 22c916eb95SHarald Geyer 2324bd5d2cSHarald Geyer backlight: backlight { 2424bd5d2cSHarald Geyer compatible = "pwm-backlight"; 2524bd5d2cSHarald Geyer pwms = <&pwm 0 50000 0>; 2624bd5d2cSHarald Geyer power-supply = <®_dcdc1>; 2724bd5d2cSHarald Geyer brightness-levels = <0 5 7 10 14 20 28 40 56 80 112>; 2824bd5d2cSHarald Geyer default-brightness-level = <5>; 2924bd5d2cSHarald Geyer enable-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; /* PD23 */ 3024bd5d2cSHarald Geyer }; 3124bd5d2cSHarald Geyer 32c916eb95SHarald Geyer chosen { 33c916eb95SHarald Geyer stdout-path = "serial0:115200n8"; 34c916eb95SHarald Geyer 35c916eb95SHarald Geyer framebuffer-lcd { 36c916eb95SHarald Geyer eDP25-supply = <®_dldo2>; 37c916eb95SHarald Geyer eDP12-supply = <®_dldo3>; 38c916eb95SHarald Geyer }; 39c916eb95SHarald Geyer }; 40c916eb95SHarald Geyer 41c916eb95SHarald Geyer gpio-keys { 42c916eb95SHarald Geyer compatible = "gpio-keys"; 43c916eb95SHarald Geyer 44c916eb95SHarald Geyer lid-switch { 45c916eb95SHarald Geyer label = "Lid Switch"; 46c916eb95SHarald Geyer gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */ 47c916eb95SHarald Geyer linux,input-type = <EV_SW>; 48c916eb95SHarald Geyer linux,code = <SW_LID>; 4948f3e7bfSIcenowy Zheng wakeup-source; 50c916eb95SHarald Geyer }; 51c916eb95SHarald Geyer }; 52c916eb95SHarald Geyer 53c916eb95SHarald Geyer leds { 54c916eb95SHarald Geyer compatible = "gpio-leds"; 55c916eb95SHarald Geyer 56e299e6ddSMaxime Ripard led-0 { 57c916eb95SHarald Geyer label = "teres-i:green:capslock"; 58c916eb95SHarald Geyer gpios = <&pio 2 7 GPIO_ACTIVE_HIGH>; /* PC7 */ 59c916eb95SHarald Geyer }; 60c916eb95SHarald Geyer 61e299e6ddSMaxime Ripard led-1 { 62c916eb95SHarald Geyer label = "teres-i:green:numlock"; 63c916eb95SHarald Geyer gpios = <&pio 2 4 GPIO_ACTIVE_HIGH>; /* PC4 */ 64c916eb95SHarald Geyer }; 65c916eb95SHarald Geyer }; 66c916eb95SHarald Geyer 67c916eb95SHarald Geyer reg_usb1_vbus: usb1-vbus { 68c916eb95SHarald Geyer compatible = "regulator-fixed"; 69c916eb95SHarald Geyer regulator-name = "usb1-vbus"; 70c916eb95SHarald Geyer regulator-min-microvolt = <5000000>; 71c916eb95SHarald Geyer regulator-max-microvolt = <5000000>; 72c916eb95SHarald Geyer enable-active-high; 73c916eb95SHarald Geyer gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */ 74c916eb95SHarald Geyer status = "okay"; 75c916eb95SHarald Geyer }; 76c916eb95SHarald Geyer 77c916eb95SHarald Geyer wifi_pwrseq: wifi_pwrseq { 78c916eb95SHarald Geyer compatible = "mmc-pwrseq-simple"; 79c916eb95SHarald Geyer reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */ 80c916eb95SHarald Geyer }; 81439152aeSHarald Geyer 82439152aeSHarald Geyer speaker_amp: audio-amplifier { 83439152aeSHarald Geyer compatible = "simple-audio-amplifier"; 84439152aeSHarald Geyer enable-gpios = <&r_pio 0 12 GPIO_ACTIVE_HIGH>; /* PL12 */ 85439152aeSHarald Geyer sound-name-prefix = "Speaker Amp"; 86439152aeSHarald Geyer }; 87439152aeSHarald Geyer}; 88439152aeSHarald Geyer 89439152aeSHarald Geyer&codec { 90439152aeSHarald Geyer status = "okay"; 91439152aeSHarald Geyer}; 92439152aeSHarald Geyer 93439152aeSHarald Geyer&codec_analog { 94439152aeSHarald Geyer cpvdd-supply = <®_eldo1>; 95439152aeSHarald Geyer status = "okay"; 96439152aeSHarald Geyer}; 97439152aeSHarald Geyer 98439152aeSHarald Geyer&dai { 99439152aeSHarald Geyer status = "okay"; 100c916eb95SHarald Geyer}; 101c916eb95SHarald Geyer 10279bc02f1STorsten Duwe&de { 10379bc02f1STorsten Duwe status = "okay"; 10479bc02f1STorsten Duwe}; 10579bc02f1STorsten Duwe 106ac904843SVasily Khoruzhick&cpu0 { 107ac904843SVasily Khoruzhick cpu-supply = <®_dcdc2>; 108ac904843SVasily Khoruzhick}; 109ac904843SVasily Khoruzhick 110ac904843SVasily Khoruzhick&cpu1 { 111ac904843SVasily Khoruzhick cpu-supply = <®_dcdc2>; 112ac904843SVasily Khoruzhick}; 113ac904843SVasily Khoruzhick 114ac904843SVasily Khoruzhick&cpu2 { 115ac904843SVasily Khoruzhick cpu-supply = <®_dcdc2>; 116ac904843SVasily Khoruzhick}; 117ac904843SVasily Khoruzhick 118ac904843SVasily Khoruzhick&cpu3 { 119ac904843SVasily Khoruzhick cpu-supply = <®_dcdc2>; 120ac904843SVasily Khoruzhick}; 121ac904843SVasily Khoruzhick 122c916eb95SHarald Geyer&ehci1 { 123c916eb95SHarald Geyer status = "okay"; 124c916eb95SHarald Geyer}; 125c916eb95SHarald Geyer 126c916eb95SHarald Geyer 127c916eb95SHarald Geyer&i2c0 { 128c916eb95SHarald Geyer clock-frequency = <100000>; 129c916eb95SHarald Geyer status = "okay"; 13079bc02f1STorsten Duwe 13179bc02f1STorsten Duwe anx6345: anx6345@38 { 13279bc02f1STorsten Duwe compatible = "analogix,anx6345"; 13379bc02f1STorsten Duwe reg = <0x38>; 13479bc02f1STorsten Duwe reset-gpios = <&pio 3 24 GPIO_ACTIVE_LOW>; /* PD24 */ 13579bc02f1STorsten Duwe dvdd25-supply = <®_dldo2>; 13679bc02f1STorsten Duwe dvdd12-supply = <®_dldo3>; 13779bc02f1STorsten Duwe 13879bc02f1STorsten Duwe ports { 13979bc02f1STorsten Duwe #address-cells = <1>; 14079bc02f1STorsten Duwe #size-cells = <0>; 14179bc02f1STorsten Duwe 14279bc02f1STorsten Duwe port@0 { 14301312f74SMaxime Ripard reg = <0>; 14401312f74SMaxime Ripard 14579bc02f1STorsten Duwe anx6345_in: endpoint { 14679bc02f1STorsten Duwe remote-endpoint = <&tcon0_out_anx6345>; 14779bc02f1STorsten Duwe }; 14879bc02f1STorsten Duwe }; 14979bc02f1STorsten Duwe }; 15079bc02f1STorsten Duwe }; 15179bc02f1STorsten Duwe}; 15279bc02f1STorsten Duwe 15379bc02f1STorsten Duwe&mixer0 { 15479bc02f1STorsten Duwe status = "okay"; 155c916eb95SHarald Geyer}; 156c916eb95SHarald Geyer 157c916eb95SHarald Geyer&mmc0 { 158c916eb95SHarald Geyer pinctrl-names = "default"; 159c916eb95SHarald Geyer pinctrl-0 = <&mmc0_pins>; 160c916eb95SHarald Geyer vmmc-supply = <®_dcdc1>; 161c916eb95SHarald Geyer cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; 162c916eb95SHarald Geyer disable-wp; 163c916eb95SHarald Geyer bus-width = <4>; 164c916eb95SHarald Geyer status = "okay"; 165c916eb95SHarald Geyer}; 166c916eb95SHarald Geyer 167c916eb95SHarald Geyer&mmc1 { 168c916eb95SHarald Geyer pinctrl-names = "default"; 169c916eb95SHarald Geyer pinctrl-0 = <&mmc1_pins>; 170c916eb95SHarald Geyer vmmc-supply = <®_aldo2>; 171c916eb95SHarald Geyer vqmmc-supply = <®_dldo4>; 172c916eb95SHarald Geyer mmc-pwrseq = <&wifi_pwrseq>; 173c916eb95SHarald Geyer bus-width = <4>; 174c916eb95SHarald Geyer non-removable; 175c916eb95SHarald Geyer status = "okay"; 176c916eb95SHarald Geyer 177c916eb95SHarald Geyer rtl8723bs: wifi@1 { 178c916eb95SHarald Geyer reg = <1>; 179c916eb95SHarald Geyer interrupt-parent = <&r_pio>; 180c916eb95SHarald Geyer interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */ 181c916eb95SHarald Geyer interrupt-names = "host-wake"; 182c916eb95SHarald Geyer }; 183c916eb95SHarald Geyer}; 184c916eb95SHarald Geyer 185c916eb95SHarald Geyer&mmc2 { 186c916eb95SHarald Geyer pinctrl-names = "default"; 187c916eb95SHarald Geyer pinctrl-0 = <&mmc2_pins>; 188c916eb95SHarald Geyer vmmc-supply = <®_dcdc1>; 189c916eb95SHarald Geyer vqmmc-supply = <®_dcdc1>; 190c916eb95SHarald Geyer bus-width = <8>; 191c916eb95SHarald Geyer non-removable; 192c916eb95SHarald Geyer cap-mmc-hw-reset; 193c916eb95SHarald Geyer status = "okay"; 194c916eb95SHarald Geyer}; 195c916eb95SHarald Geyer 196c916eb95SHarald Geyer&ohci1 { 197c916eb95SHarald Geyer status = "okay"; 198c916eb95SHarald Geyer}; 199c916eb95SHarald Geyer 20050612cf9SHarald Geyer&pio { 20150612cf9SHarald Geyer vcc-pc-supply = <®_dcdc1>; 20250612cf9SHarald Geyer vcc-pd-supply = <®_dldo2>; 20350612cf9SHarald Geyer vcc-pe-supply = <®_aldo1>; 20450612cf9SHarald Geyer vcc-pf-supply = <®_dcdc1>; /* No dedicated supply-pin for this */ 20550612cf9SHarald Geyer vcc-pg-supply = <®_aldo2>; 20650612cf9SHarald Geyer}; 20750612cf9SHarald Geyer 20824bd5d2cSHarald Geyer&pwm { 20924bd5d2cSHarald Geyer status = "okay"; 21024bd5d2cSHarald Geyer}; 21124bd5d2cSHarald Geyer 212c916eb95SHarald Geyer&r_rsb { 213c916eb95SHarald Geyer status = "okay"; 214c916eb95SHarald Geyer 215c916eb95SHarald Geyer axp803: pmic@3a3 { 216c916eb95SHarald Geyer compatible = "x-powers,axp803"; 217c916eb95SHarald Geyer reg = <0x3a3>; 218c916eb95SHarald Geyer interrupt-parent = <&r_intc>; 21973088dfeSSamuel Holland interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>; 220c916eb95SHarald Geyer }; 221c916eb95SHarald Geyer}; 222c916eb95SHarald Geyer 223c916eb95SHarald Geyer#include "axp803.dtsi" 224c916eb95SHarald Geyer 22525f6f54fSHarald Geyer&ac_power_supply { 22625f6f54fSHarald Geyer status = "okay"; 22725f6f54fSHarald Geyer}; 22825f6f54fSHarald Geyer 22925f6f54fSHarald Geyer&battery_power_supply { 23025f6f54fSHarald Geyer status = "okay"; 23125f6f54fSHarald Geyer}; 23225f6f54fSHarald Geyer 233c916eb95SHarald Geyer®_aldo1 { 234c916eb95SHarald Geyer regulator-always-on; 235c916eb95SHarald Geyer regulator-min-microvolt = <2800000>; 236c916eb95SHarald Geyer regulator-max-microvolt = <2800000>; 237c916eb95SHarald Geyer regulator-name = "vcc-pe"; 238c916eb95SHarald Geyer}; 239c916eb95SHarald Geyer 240c916eb95SHarald Geyer®_aldo2 { 241c916eb95SHarald Geyer regulator-always-on; 242c916eb95SHarald Geyer regulator-min-microvolt = <3300000>; 243c916eb95SHarald Geyer regulator-max-microvolt = <3300000>; 244c916eb95SHarald Geyer regulator-name = "vcc-pl"; 245c916eb95SHarald Geyer}; 246c916eb95SHarald Geyer 247c916eb95SHarald Geyer®_aldo3 { 248c916eb95SHarald Geyer regulator-always-on; 249c916eb95SHarald Geyer regulator-min-microvolt = <3000000>; 250c916eb95SHarald Geyer regulator-max-microvolt = <3000000>; 251c916eb95SHarald Geyer regulator-name = "vcc-pll-avcc"; 252c916eb95SHarald Geyer}; 253c916eb95SHarald Geyer 254c916eb95SHarald Geyer®_dcdc1 { 255c916eb95SHarald Geyer regulator-always-on; 256c916eb95SHarald Geyer regulator-min-microvolt = <3300000>; 257c916eb95SHarald Geyer regulator-max-microvolt = <3300000>; 258c916eb95SHarald Geyer regulator-name = "vcc-3v3"; 259c916eb95SHarald Geyer}; 260c916eb95SHarald Geyer 261c916eb95SHarald Geyer®_dcdc2 { 262c916eb95SHarald Geyer regulator-always-on; 263c916eb95SHarald Geyer regulator-min-microvolt = <1040000>; 264c916eb95SHarald Geyer regulator-max-microvolt = <1300000>; 265c916eb95SHarald Geyer regulator-name = "vdd-cpux"; 266c916eb95SHarald Geyer}; 267c916eb95SHarald Geyer 268c916eb95SHarald Geyer/* DCDC3 is polyphased with DCDC2 */ 269c916eb95SHarald Geyer 270c916eb95SHarald Geyer®_dcdc5 { 271c916eb95SHarald Geyer regulator-always-on; 272c916eb95SHarald Geyer regulator-min-microvolt = <1500000>; 273c916eb95SHarald Geyer regulator-max-microvolt = <1500000>; 274c916eb95SHarald Geyer regulator-name = "vcc-ddr3"; 275c916eb95SHarald Geyer}; 276c916eb95SHarald Geyer 277c916eb95SHarald Geyer®_dcdc6 { 278c916eb95SHarald Geyer regulator-always-on; 279c916eb95SHarald Geyer regulator-min-microvolt = <1100000>; 280c916eb95SHarald Geyer regulator-max-microvolt = <1100000>; 281c916eb95SHarald Geyer regulator-name = "vdd-sys"; 282c916eb95SHarald Geyer}; 283c916eb95SHarald Geyer 284c916eb95SHarald Geyer®_dldo1 { 285c916eb95SHarald Geyer regulator-min-microvolt = <3300000>; 286c916eb95SHarald Geyer regulator-max-microvolt = <3300000>; 287c916eb95SHarald Geyer regulator-name = "vcc-hdmi"; 288c916eb95SHarald Geyer}; 289c916eb95SHarald Geyer 290c916eb95SHarald Geyer®_dldo2 { 291c916eb95SHarald Geyer regulator-min-microvolt = <2500000>; 292c916eb95SHarald Geyer regulator-max-microvolt = <2500000>; 293c916eb95SHarald Geyer regulator-name = "vcc-pd"; 294c916eb95SHarald Geyer}; 295c916eb95SHarald Geyer 296c916eb95SHarald Geyer®_dldo3 { 297c916eb95SHarald Geyer regulator-min-microvolt = <1200000>; 298c916eb95SHarald Geyer regulator-max-microvolt = <1200000>; 299e4357c82SIcenowy Zheng regulator-name = "vdd-edp"; 300c916eb95SHarald Geyer}; 301c916eb95SHarald Geyer 302c916eb95SHarald Geyer®_dldo4 { 303c916eb95SHarald Geyer regulator-min-microvolt = <3300000>; 304c916eb95SHarald Geyer regulator-max-microvolt = <3300000>; 305c916eb95SHarald Geyer regulator-name = "vcc-wifi-io"; 306c916eb95SHarald Geyer}; 307c916eb95SHarald Geyer 308c916eb95SHarald Geyer®_eldo1 { 309c916eb95SHarald Geyer regulator-min-microvolt = <1800000>; 310c916eb95SHarald Geyer regulator-max-microvolt = <1800000>; 311c916eb95SHarald Geyer regulator-name = "cpvdd"; 312c916eb95SHarald Geyer}; 313c916eb95SHarald Geyer 314c916eb95SHarald Geyer®_eldo2 { 315c916eb95SHarald Geyer regulator-min-microvolt = <1800000>; 316c916eb95SHarald Geyer regulator-max-microvolt = <1800000>; 317c916eb95SHarald Geyer regulator-name = "vcc-dvdd-csi"; 318c916eb95SHarald Geyer}; 319c916eb95SHarald Geyer 320c916eb95SHarald Geyer®_fldo1 { 321c916eb95SHarald Geyer regulator-min-microvolt = <1200000>; 322c916eb95SHarald Geyer regulator-max-microvolt = <1200000>; 323c916eb95SHarald Geyer regulator-name = "vcc-1v2-hsic"; 324c916eb95SHarald Geyer}; 325c916eb95SHarald Geyer 326c916eb95SHarald Geyer/* 327062904f2SJonathan Neuschäfer * The A64 chip cannot work with this regulator off, although 328c916eb95SHarald Geyer * it seems to be only driving the AR100 core. 329c916eb95SHarald Geyer * Maybe we don't still know well about CPUs domain. 330c916eb95SHarald Geyer */ 331c916eb95SHarald Geyer®_fldo2 { 332c916eb95SHarald Geyer regulator-always-on; 333c916eb95SHarald Geyer regulator-min-microvolt = <1100000>; 334c916eb95SHarald Geyer regulator-max-microvolt = <1100000>; 335c916eb95SHarald Geyer regulator-name = "vdd-cpus"; 336c916eb95SHarald Geyer}; 337c916eb95SHarald Geyer 338c916eb95SHarald Geyer®_rtc_ldo { 339c916eb95SHarald Geyer regulator-name = "vcc-rtc"; 340c916eb95SHarald Geyer}; 341c916eb95SHarald Geyer 3425cbef9f9SIcenowy Zheng&simplefb_hdmi { 3435cbef9f9SIcenowy Zheng vcc-hdmi-supply = <®_dldo1>; 3445cbef9f9SIcenowy Zheng}; 3455cbef9f9SIcenowy Zheng 346439152aeSHarald Geyer&sound { 347439152aeSHarald Geyer simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>; 348439152aeSHarald Geyer simple-audio-card,widgets = "Headphone", "Headphone Jack", 349439152aeSHarald Geyer "Microphone", "Headset Microphone", 350439152aeSHarald Geyer "Microphone", "Internal Microphone", 351439152aeSHarald Geyer "Speaker", "Internal Speaker"; 352439152aeSHarald Geyer simple-audio-card,routing = 353631e6a35SSamuel Holland "Left DAC", "DACL", 354631e6a35SSamuel Holland "Right DAC", "DACR", 355631e6a35SSamuel Holland "ADCL", "Left ADC", 356631e6a35SSamuel Holland "ADCR", "Right ADC", 357439152aeSHarald Geyer "Headphone Jack", "HP", 358439152aeSHarald Geyer "Speaker Amp INL", "LINEOUT", 359439152aeSHarald Geyer "Speaker Amp INR", "LINEOUT", 360439152aeSHarald Geyer "Internal Speaker", "Speaker Amp OUTL", 361439152aeSHarald Geyer "Internal Speaker", "Speaker Amp OUTR", 362439152aeSHarald Geyer "Internal Microphone", "MBIAS", 363439152aeSHarald Geyer "MIC1", "Internal Microphone", 364439152aeSHarald Geyer "Headset Microphone", "HBIAS", 365439152aeSHarald Geyer "MIC2", "Headset Microphone"; 366439152aeSHarald Geyer status = "okay"; 367439152aeSHarald Geyer}; 368439152aeSHarald Geyer 36979bc02f1STorsten Duwe&tcon0 { 37079bc02f1STorsten Duwe pinctrl-names = "default"; 37179bc02f1STorsten Duwe pinctrl-0 = <&lcd_rgb666_pins>; 372*94526fbfSVasily Khoruzhick assigned-clocks = <&ccu CLK_TCON0>; 373*94526fbfSVasily Khoruzhick assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>; 37479bc02f1STorsten Duwe 37579bc02f1STorsten Duwe status = "okay"; 37679bc02f1STorsten Duwe}; 37779bc02f1STorsten Duwe 37879bc02f1STorsten Duwe&tcon0_out { 37979bc02f1STorsten Duwe tcon0_out_anx6345: endpoint@0 { 38079bc02f1STorsten Duwe reg = <0>; 38179bc02f1STorsten Duwe remote-endpoint = <&anx6345_in>; 38279bc02f1STorsten Duwe }; 38379bc02f1STorsten Duwe}; 38479bc02f1STorsten Duwe 385c916eb95SHarald Geyer&uart0 { 386c916eb95SHarald Geyer pinctrl-names = "default"; 387d91ebb95SChen-Yu Tsai pinctrl-0 = <&uart0_pb_pins>; 388c916eb95SHarald Geyer status = "okay"; 389c916eb95SHarald Geyer}; 390c916eb95SHarald Geyer 391c916eb95SHarald Geyer&usbphy { 392c916eb95SHarald Geyer usb1_vbus-supply = <®_usb1_vbus>; 393c916eb95SHarald Geyer status = "okay"; 394c916eb95SHarald Geyer}; 395