123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
- // Copyright (C) 2019 Ondřej Jirman <megous@megous.com>
- /dts-v1/;
- #include "sun50i-h6.dtsi"
- #include "sun50i-h6-cpu-opp.dtsi"
- #include <dt-bindings/input/linux-event-codes.h>
- #include <dt-bindings/gpio/gpio.h>
- / {
- model = "OrangePi 3 LTS";
- compatible = "xunlong,orangepi-3-lts", "allwinner,sun50i-h6";
- aliases {
- serial0 = &uart0;
- serial1 = &uart1;
- serial9 = &r_uart;
- ethernet0 = &emac;
- };
- chosen {
- stdout-path = "serial0:115200n8";
- };
- connector {
- compatible = "hdmi-connector";
- ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
- type = "a";
- port {
- hdmi_con_in: endpoint {
- remote-endpoint = <&hdmi_out_con>;
- };
- };
- };
- ext_osc32k: ext_osc32k_clk {
- #clock-cells = <0>;
- compatible = "fixed-clock";
- clock-frequency = <32768>;
- clock-output-names = "ext_osc32k";
- };
- leds {
- compatible = "gpio-leds";
- power {
- label = "red-led";
- gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
- default-state = "on";
- };
- status {
- label = "green-led";
- gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
- };
- };
- reg_vcc5v: vcc5v {
- /* board wide 5V supply directly from the DC jack */
- compatible = "regulator-fixed";
- regulator-name = "vcc-5v";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- };
- reg_gmac_3v3: gmac-3v3 {
- compatible = "regulator-fixed";
- regulator-name = "vcc-gmac-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- startup-delay-us = <100000>;
- gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- };
- reg_vcc33_wifi: vcc33-wifi {
- /* Always on 3.3V regulator for WiFi and BT */
- compatible = "regulator-fixed";
- regulator-name = "vcc33-wifi";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- enable-active-high;
- gpio = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
- };
- reg_vcc_wifi_io: vcc-wifi-io {
- /* Always on 1.8V/300mA regulator for WiFi and BT IO */
- compatible = "regulator-fixed";
- regulator-name = "vcc-wifi-io";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-always-on;
- vin-supply = <®_vcc33_wifi>;
- };
- wifi_pwrseq: wifi-pwrseq {
- compatible = "mmc-pwrseq-simple";
- clocks = <&rtc 1>;
- clock-names = "ext_clock";
- reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
- post-power-on-delay-ms = <200>;
- };
- };
- &spi1 {
- status="okay";
- ili9341: ili9341@0{
- compatible = "ilitek,ili9341";//这个要跟fb_ili9341.c对应上
- reg = <0>;
- status = "okay";
- spi-max-frequency = <24000000>;//最大速率
- spi-cpol;//spi模式
- spi-cpha;
- rotate = <0>;//屏幕翻转
- fps = <60>;//帧率
- buswidth = <8>;//数据位宽
- rgb;
- dc-gpios = <&pio 3 23 GPIO_ACTIVE_HIGH>; // PD23 gpio 0对应A、1对应B...
- reset-gpios = <&pio 3 24 GPIO_ACTIVE_HIGH>; // PD24
- led-gpios = <&pio 3 15 GPIO_ACTIVE_HIGH>; // PD15
-
- PL2-gpios = <&pio 11 2 GPIO_ACTIVE_HIGH>;
- PL3-gpios = <&pio 11 3 GPIO_ACTIVE_HIGH>;
- PL8-gpios = <&pio 11 8 GPIO_ACTIVE_HIGH>;
- PL10-gpios = <&pio 11 10 GPIO_ACTIVE_HIGH>;
-
- PD16-gpios = <&pio 3 16 GPIO_ACTIVE_HIGH>;
- PD18-gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>;
- PD21-gpios = <&pio 3 21 GPIO_ACTIVE_HIGH>;
-
- debug = <0>;
- };
- };
- &cpu0 {
- cpu-supply = <®_dcdca>;
- };
- &de {
- status = "okay";
- };
- &dwc3 {
- status = "okay";
- };
- &ehci0 {
- status = "okay";
- };
- &ehci3 {
- status = "okay";
- };
- &gpu {
- mali-supply = <®_dcdcc>;
- status = "okay";
- };
- &hdmi {
- status = "okay";
- };
- &hdmi_sound {
- status = "okay";
- };
- &i2s1 {
- status = "okay";
- };
- &ac200_sound {
- status = "okay";
- };
- &hdmi_out {
- hdmi_out_con: endpoint {
- remote-endpoint = <&hdmi_con_in>;
- };
- };
- &emac {
- pinctrl-names = "default";
- pinctrl-0 = <&ext_rgmii_pins>;
- phy-mode = "rgmii-id";
- phy-handle = <&ext_rgmii_phy>;
- phy-supply = <®_gmac_3v3>;
- allwinner,rx-delay-ps = <200>;
- allwinner,tx-delay-ps = <300>;
- status = "okay";
- };
- &mdio {
- ext_rgmii_phy: ethernet-phy@1 {
- compatible = "ethernet-phy-ieee802.3-c22";
- reg = <1>;
- reset-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */
- reset-assert-us = <15000>;
- reset-deassert-us = <40000>;
- };
- };
- &mmc0 {
- vmmc-supply = <®_cldo1>;
- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
- bus-width = <4>;
- status = "okay";
- };
- &mmc1 {
- vmmc-supply = <®_vcc33_wifi>;
- vqmmc-supply = <®_vcc_wifi_io>;
- mmc-pwrseq = <&wifi_pwrseq>;
- bus-width = <4>;
- non-removable;
- status = "okay";
- };
- &mmc2 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc2_pins>;
- vmmc-supply = <®_cldo1>;
- vqmmc-supply = <®_bldo2>;
- bus-width = <8>;
- non-removable;
- cap-mmc-hw-reset;
- mmc-hs200-1_8v;
- status = "okay";
- };
- &ohci0 {
- status = "okay";
- };
- &ohci3 {
- status = "okay";
- };
- &pio {
- vcc-pc-supply = <®_bldo2>;
- vcc-pd-supply = <®_cldo1>;
- vcc-pg-supply = <®_vcc_wifi_io>;
- };
- &r_i2c {
- status = "okay";
- axp805: pmic@36 {
- compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x36>;
- interrupt-parent = <&r_intc>;
- interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
- interrupt-controller;
- #interrupt-cells = <1>;
- x-powers,self-working-mode;
- vina-supply = <®_vcc5v>;
- vinb-supply = <®_vcc5v>;
- vinc-supply = <®_vcc5v>;
- vind-supply = <®_vcc5v>;
- vine-supply = <®_vcc5v>;
- aldoin-supply = <®_vcc5v>;
- bldoin-supply = <®_vcc5v>;
- cldoin-supply = <®_vcc5v>;
- regulators {
- reg_aldo1: aldo1 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc-pl-led-ir";
- };
- reg_aldo2: aldo2 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc33-audio-tv-ephy-mac";
- regulator-enable-ramp-delay = <100000>;
- };
- /* ALDO3 is shorted to CLDO1 */
- reg_aldo3: aldo3 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-1";
- };
- reg_bldo1: bldo1 {
- regulator-always-on;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-name = "vcc18-dram-bias-pll";
- };
- reg_bldo2: bldo2 {
- regulator-always-on;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-name = "vcc-efuse-pcie-hdmi-pc";
- };
-
- reg_bldo3: bldo3 {
- regulator-always-on;
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- regulator-name = "vcc-dcxoio";
- };
- reg_cldo1: cldo1 {
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc33-io-pd-emmc-sd-usb-uart-2";
- };
- reg_cldo2: cldo2 {
- /*
- * This regulator is connected with CLDO3.
- * Before the kernel can support synchronized
- * enable of coupled regulators, keep them
- * both always on as a ugly hack.
- */
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc-wifi-1";
- };
- cldo3 {
- /*
- * This regulator is connected with CLDO2.
- * See the comments for CLDO2.
- */
- regulator-always-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-name = "vcc-wifi-2";
- };
- reg_dcdca: dcdca {
- regulator-always-on;
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <1160000>;
- regulator-ramp-delay = <2500>;
- regulator-name = "vdd-cpu";
- };
- reg_dcdcc: dcdcc {
- regulator-enable-ramp-delay = <32000>;
- regulator-min-microvolt = <810000>;
- regulator-max-microvolt = <1080000>;
- regulator-ramp-delay = <2500>;
- regulator-name = "vdd-gpu";
- };
- reg_dcdcd: dcdcd {
- regulator-always-on;
- regulator-min-microvolt = <960000>;
- regulator-max-microvolt = <960000>;
- regulator-name = "vdd-sys";
- };
- reg_dcdce: dcdce {
- regulator-always-on;
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
- regulator-name = "vcc-dram";
- };
- sw {
- /* unused */
- };
- };
- };
- };
- &pwm {
- status = "okay";
- };
- &ac200_pwm_clk {
- status = "okay";
- };
- &i2s3 {
- status = "okay";
- };
- &i2c3 {
- status = "okay";
- };
- &r_ir {
- status = "okay";
- };
- &rtc {
- clocks = <&ext_osc32k>;
- };
- /delete-node/ &spi0;
- &uart0 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart0_ph_pins>;
- status = "okay";
- };
- &uart1 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
- uart-has-rtscts;
- status = "disabled";
- };
- &usb2otg {
- /*
- * This board doesn't have a controllable VBUS even though it
- * does have an ID pin. Using it as anything but a USB host is
- * unsafe.
- */
- dr_mode = "host";
- status = "okay";
- };
- &usb2phy {
- usb0_id_det-gpios = <&pio 2 15 GPIO_ACTIVE_HIGH>; /* PC15 */
- usb0_vbus-supply = <®_vcc5v>;
- usb3_vbus-supply = <®_vcc5v>;
- status = "okay";
- };
- &usb3phy {
- status = "okay";
- };
|