| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659 |
- // SPDX-License-Identifier: (GPL-2.0 OR MIT)
- /*
- * Copyright (c) 2022 Rockchip Electronics Co., Ltd.
- *
- */
- #include <dt-bindings/display/drm_mipi_dsi.h>
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/pinctrl/rockchip.h>
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/pinctrl/rockchip.h>
- #include <dt-bindings/sensor-dev.h>
- #include <dt-bindings/input/input.h>
- #include "rk3562.dtsi"
- #include "rk3562-linux.dtsi"
- #include "rk3562-rk809.dtsi"
- #include "rk3562-amp.dtsi"
- / {
- model = "Rockchip RK3562 IDO EVB3562 V2 Board";
- compatible = "rockchip,Industio-EVB3562V2-VS1.0.0", "rockchip,rk3562";
- adc_keys: adc-keys {
- compatible = "adc-keys";
- io-channels = <&saradc0 1>;
- io-channel-names = "buttons";
- keyup-threshold-microvolt = <1800000>;
- poll-interval = <100>;
- vol-up-key {
- linux,code = <KEY_VOLUMEUP>;
- label = "volume up";
- press-threshold-microvolt = <17000>;
- };
- vol-down-key {
- linux,code = <KEY_VOLUMEDOWN>;
- label = "volume down";
- press-threshold-microvolt = <414000>;
- };
- menu-key {
- linux,code = <KEY_MENU>;
- label = "menu";
- press-threshold-microvolt = <800000>;
- };
- back-key {
- linux,code = <KEY_BACK>;
- label = "back";
- press-threshold-microvolt = <1200000>;
- };
- };
- bt_sco: bt-sco {
- status = "okay";
- compatible = "delta,dfbmcs320";
- #sound-dai-cells = <0>;
- };
- bt_sound: bt-sound {
- status = "okay";
- compatible = "simple-audio-card";
- simple-audio-card,format = "dsp_a";
- simple-audio-card,bitclock-inversion = <0>;
- simple-audio-card,mclk-fs = <256>;
- simple-audio-card,name = "rockchip,bt";
- simple-audio-card,cpu {
- sound-dai = <&sai2>;
- };
- simple-audio-card,codec {
- sound-dai = <&bt_sco>;
- };
- };
- dc_12v: dc-12v {
- compatible = "regulator-fixed";
- regulator-name = "dc_12v";
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <12000000>;
- regulator-max-microvolt = <12000000>;
- };
- rk809_sound: rk809-sound {
- status = "okay";
- compatible = "rockchip,multicodecs-card";
- rockchip,card-name = "rockchip-rk809";
- hp-det-gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
- rockchip,format = "i2s";
- rockchip,mclk-fs = <256>;
- rockchip,cpu = <&sai0>;
- rockchip,codec = <&rk809_codec>;
- pinctrl-names = "default";
- pinctrl-0 = <&hp_det>;
- };
- vcc3v3_pcie20: vcc3v3-pcie20 {
- compatible = "regulator-fixed";
- regulator-name = "vcc3v3_pcie20";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- enable-active-high;
- // gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
- startup-delay-us = <5000>;
- vin-supply = <&dc_12v>;
- status = "okay";
- };
- vcc5v0_sys: vcc5v0-sys {
- compatible = "regulator-fixed";
- regulator-name = "vcc5v0_sys";
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- vin-supply = <&dc_12v>;
- };
- vcc5v0_usb: vcc5v0-usb {
- compatible = "regulator-fixed";
- regulator-name = "vcc5v0_usb";
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- vin-supply = <&dc_12v>;
- };
- vcc5v0_usb_host: vcc5v0-usb-host {
- compatible = "regulator-fixed";
- regulator-name = "vcc5v0_usb_host";
- regulator-boot-on;
- regulator-always-on;
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- // gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
- vin-supply = <&vcc5v0_usb>;
- pinctrl-names = "default";
- // pinctrl-0 = <&usb_host_pwren>;
- };
- vcc5v0_usb_otg: vcc5v0-usb-otg {
- compatible = "regulator-fixed";
- regulator-name = "vcc5v0_usb_otg";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- enable-active-high;
- gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
- vin-supply = <&vcc5v0_usb>;
- pinctrl-names = "default";
- pinctrl-0 = <&usb_otg_pwren>;
- };
- vcc3v3_clk: vcc3v3-clk {
- compatible = "regulator-fixed";
- regulator-name = "vcc3v3_clk";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- vin-supply = <&vcc5v0_sys>;
- };
- vcc3v3_sys: vcc-sys {
- compatible = "regulator-fixed";
- regulator-name = "vcc3v3_sys";
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- vin-supply = <&dc_12v>;
- };
- vcc25_ddr: vcc25-ddr {
- compatible = "regulator-fixed";
- regulator-name = "vcc25_ddr";
- regulator-always-on;
- regulator-boot-on;
- regulator-min-microvolt = <2500000>;
- regulator-max-microvolt = <2500000>;
- vin-supply = <&vcc3v3_sys>;
- };
- vdd_npu: vdd-npu {
- compatible = "pwm-regulator";
- pwms = <&pwm6 0 5000 1>;
- regulator-name = "vdd_npu";
- regulator-min-microvolt = <800000>;
- regulator-max-microvolt = <1100000>;
- regulator-init-microvolt = <900000>;
- regulator-always-on;
- regulator-boot-on;
- regulator-settling-time-up-us = <250>;
- pwm-supply = <&vcc5v0_sys>;
- voltage-table = <1000000 80>,
- <975000 75>,
- <925000 66>,
- <875000 57>,
- <825000 47>;
- status = "okay";
- };
- sdio_pwrseq: sdio-pwrseq {
- compatible = "mmc-pwrseq-simple";
- clocks = <&rk809 1>;
- clock-names = "ext_clock";
- pinctrl-names = "default";
- pinctrl-0 = <&wifi_enable_h>;
- /*
- * On the module itself this is one of these (depending
- * on the actual card populated):
- * - SDIO_RESET_L_WL_REG_ON
- * - PDN (power down when low)
- */
- post-power-on-delay-ms = <200>;
- reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
- };
- wireless-wlan {
- compatible = "wlan-platdata";
- rockchip,grf = <&sys_grf>;
- wifi_chip_type = "ap6256";
- pinctrl-names = "default";
- pinctrl-0 = <&wifi_host_wake_irq>;
- WIFI,host_wake_irq = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
- // WIFI,poweren_gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
- status = "okay";
- };
- wireless-bluetooth {
- compatible = "bluetooth-platdata";
- clocks = <&rk809 1>;
- clock-names = "ext_clock";
- //wifi-bt-power-toggle;
- uart_rts_gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default", "rts_gpio";
- pinctrl-0 = <&uart1m0_rtsn>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_irq_gpio>;
- pinctrl-1 = <&uart1_gpios>;
- BT,reset_gpio = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
- BT,wake_gpio = <&gpio0 RK_PA7 GPIO_ACTIVE_HIGH>;
- BT,wake_host_irq = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
- status = "okay";
- };
- test-power {
- status = "okay";
- };
- leds: leds {
- status = "okay";
- compatible = "gpio-leds";
- pinctrl-names = "default";
- pinctrl-0 =<&leds_gpio>;
- heartbeat {
- gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "heartbeat";
- };
- usb_host2 {
- gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_HIGH>;
- default-state = "on";
- };
- usb_host3 {
- gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
- default-state = "on";
- };
- usb_host4 {
- gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>;
- default-state = "on";
- };
- 4g_pwr {
- gpios = <&gpio2 RK_PA1 GPIO_ACTIVE_HIGH>;
- default-state = "on";
- };
- };
- };
- &gmac0 {
- phy-mode = "rgmii";
- clock_in_out = "input";
- snps,reset-gpio = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
- snps,reset-active-low;
- /* Reset time is 20ms, 100ms for rtl8211f */
- snps,reset-delays-us = <0 50000 100000>;
- //RTL8811
- // tx_delay = <0x3c>;
- // rx_delay = <0x2f>;
- tx_delay = <0x2c>;
- rx_delay = <0x35>;
- pinctrl-names = "default";
- pinctrl-0 = <&rgmiim0_miim
- &rgmiim0_tx_bus2
- &rgmiim0_rx_bus2
- &rgmiim0_rgmii_clk
- &rgmiim0_rgmii_bus
- &rgmiim0_clk>;
- phy-handle = <&rgmii_phy>;
- status = "okay";
- };
- &gmac1 {
- phy-mode = "rmii";
- clock_in_out = "input";
- // snps,reset-gpio = <&gpio2 RK_PA1 GPIO_ACTIVE_LOW>;
- snps,reset-active-low;
- snps,reset-delays-us = <0 20000 100000>;
- tx_delay = <0x10>;
- rx_delay = <0x2f>;
- pinctrl-names="default";
- // pinctrl-0 = <&rmii_pins>;
- phy-handle = <&rgmii_phy1>;
- status = "disabled";
- };
- &mdio1 {
- rgmii_phy1: phy@1 {
- compatible = "ethernet-phy-ieee802.3-c22";
- reg = <0x01>;
- };
- };
- &mdio0 {
- rgmii_phy: phy@1 {
- compatible = "ethernet-phy-ieee802.3-c22";
- reg = <0x1>;
- };
- };
- &pinctrl {
- headphone {
- hp_det: hp-det {
- rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- sdio-pwrseq {
- wifi_enable_h: wifi-enable-h {
- rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- usb {
- usb_host_pwren: usb-host-pwren {
- rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- usb_otg_pwren: usb-otg-pwren {
- rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- wireless-wlan {
- wifi_host_wake_irq: wifi-host-wake-irq {
- rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_down>;
- };
- };
- wireless-bluetooth {
- uart1_gpios: uart1-gpios {
- rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- bt_reset_gpio: bt-reset-gpio {
- rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- bt_wake_gpio: bt-wake-gpio {
- rockchip,pins = <0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- bt_irq_gpio: bt-irq-gpio {
- rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- gpio-leds {
- leds_gpio: leds-gpio {
- rockchip,pins =
- <0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>,
- <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
- <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>,
- <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>,
- <2 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
- };
- };
- };
- &pwm6 {
- pinctrl-0 = <&pwm6m0_pins>;
- status = "okay";
- };
- &sai0 {
- status = "disabled";
- pinctrl-names = "default";
- pinctrl-0 = <&i2s0m0_lrck
- &i2s0m0_sclk
- &i2s0m0_sdi0
- &i2s0m0_sdo0>;
- };
- &sdhci {
- bus-width = <8>;
- no-sdio;
- no-sd;
- non-removable;
- max-frequency = <200000000>;
- mmc-hs400-1_8v;
- mmc-hs400-enhanced-strobe;
- full-pwr-cycle-in-suspend;
- status = "okay";
- };
- &sdmmc0 {
- max-frequency = <150000000>;
- supports-sd;
- no-sdio;
- no-mmc;
- bus-width = <4>;
- cap-mmc-highspeed;
- cap-sd-highspeed;
- disable-wp;
- sd-uhs-sdr104;
- vmmc-supply = <&vcc3v3_sd>;
- vqmmc-supply = <&vccio_sd>;
- pinctrl-names = "default";
- pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
- status = "disabled";
- };
- &sdmmc1 {
- max-frequency = <150000000>;
- no-sd;
- no-mmc;
- bus-width = <4>;
- disable-wp;
- cap-sd-highspeed;
- cap-sdio-irq;
- keep-power-in-suspend;
- mmc-pwrseq = <&sdio_pwrseq>;
- non-removable;
- pinctrl-names = "default";
- pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
- // sd-uhs-sdr104;
- status = "okay";
- };
- &u2phy {
- status = "okay";
- };
- &u2phy_host {
- status = "okay";
- phy-supply = <&vcc5v0_usb_host>;
- };
- &u2phy_otg {
- status = "okay";
- vbus-supply = <&vcc5v0_usb_otg>;
- };
- &usb_host0_ehci {
- status = "okay";
- };
- &usb_host0_ohci {
- status = "okay";
- };
- &usbdrd30 {
- status = "okay";
- };
- &usbdrd_dwc3 {
- status = "okay";
- dr_mode = "otg";
- extcon = <&u2phy>;
- maximum-speed = "high-speed";
- phys = <&u2phy_otg>;
- phy-names = "usb2-phy";
- snps,dis_u2_susphy_quirk;
- snps,usb2-lpm-disable;
- };
- &combphy_pu {
- status = "okay";
- };
- &pcie2x1 {
- pinctrl-0 = <&pcie20m1_pins>;
- reset-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
- vpcie3v3-supply = <&vcc3v3_pcie20>;
- status = "okay";
- };
- &uart1 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
- };
- &uart3 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart3m1_xfer>;
- };
- &uart6 {
- status = "disabled";
- pinctrl-names = "default";
- pinctrl-0 = <&uart6m0_xfer>;
- };
- &uart8 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart8m0_xfer>;
- };
- &uart9 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart9m1_xfer>;
- };
- &can0 {
- status = "disabled";
- pinctrl-names = "default";
- pinctrl-0 = <&can0m2_pins>;
- };
- &spi0 {
- status = "disabled";
- pinctrl-0 = <&spi0m0_pins &spi0m0_csn0>;
- spi_dev@0 {
- compatible = "rockchip,spidev";
- reg = <0>;
- spi-max-frequency = <12000000>;
- spi-lsb-first;
- };
- };
- &saradc0 {
- status = "okay";
- vref-supply = <&vcc_1v8>;
- };
- &saradc1 {
- status = "okay";
- vref-supply = <&vcc_1v8>;
- };
- &tsadc {
- status = "okay";
- };
- &rk809_codec {
- spk-ctl-gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
- use-ext-amplifier;
- spk-mute-delay-ms = <300>;
- };
- &cpu0 {
- cpu-supply = <&vdd_cpu>;
- };
- &dfi {
- status = "okay";
- };
- &rknpu {
- rknpu-supply = <&vdd_npu>;
- status = "okay";
- };
- &rknpu_mmu {
- status = "okay";
- };
- &gpu {
- status = "okay";
- mali-supply = <&vdd_gpu>;
- };
- &jpegd {
- status = "okay";
- };
- &jpegd_mmu {
- status = "okay";
- };
- &mpp_srv {
- status = "okay";
- };
- &rga2 {
- status = "okay";
- };
- &rga2_mmu {
- status = "okay";
- };
- &rkvdec {
- status = "okay";
- };
- &rkvdec_mmu {
- status = "okay";
- };
- &rkvenc {
- status = "okay";
- };
- &rkvenc_mmu {
- status = "okay";
- };
- &vop {
- status = "okay";
- };
- &vop_mmu {
- status = "okay";
- };
- &bt_sco {
- status = "okay";
- };
- &bt_sound {
- status = "okay";
- };
- &sai2 {
- status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&i2s2m0_lrck
- &i2s2m0_sclk
- &i2s2m0_sdi
- &i2s2m0_sdo>;
- };
|