272 lines
5.6 KiB
Devicetree
272 lines
5.6 KiB
Devicetree
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
|
/*
|
|
* Copyright (c) 2022 Wesion, Inc. All rights reserved.
|
|
*/
|
|
|
|
/dts-v1/;
|
|
|
|
#include "amlogic-t7.dtsi"
|
|
#include <dt-bindings/gpio/amlogic,t7-periphs-pinctrl.h>
|
|
#include <dt-bindings/gpio/gpio.h>
|
|
|
|
/ {
|
|
model = "Khadas VIM4";
|
|
compatible = "khadas,vim4", "amlogic,a311d2", "amlogic,t7";
|
|
|
|
aliases {
|
|
serial0 = &uart_a;
|
|
mmc0 = &sd_emmc_c;
|
|
mmc1 = &sd_emmc_b;
|
|
mmc2 = &sd_emmc_a;
|
|
};
|
|
|
|
memory@0 {
|
|
device_type = "memory";
|
|
reg = <0x0 0x0 0x0 0xE0000000
|
|
0x1 0x0 0x0 0xE0000000
|
|
0x2 0x0 0x0 0x40000000>; /* 8 GB */
|
|
};
|
|
|
|
reserved-memory {
|
|
#address-cells = <2>;
|
|
#size-cells = <2>;
|
|
ranges;
|
|
|
|
/* 3 MiB reserved for ARM Trusted Firmware (BL31) */
|
|
secmon_reserved: secmon@5000000 {
|
|
reg = <0x0 0x05000000 0x0 0x300000>;
|
|
no-map;
|
|
};
|
|
|
|
/* 32 MiB reserved for ARM Trusted Firmware (BL32) */
|
|
secmon_reserved_bl32: secmon@5300000 {
|
|
reg = <0x0 0x05300000 0x0 0x2000000>;
|
|
no-map;
|
|
};
|
|
};
|
|
|
|
dc_in: regulator-dc-in {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "DC_IN";
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
pwm-leds {
|
|
compatible = "pwm-leds";
|
|
|
|
status {
|
|
linux,default-trigger="heartbeat";
|
|
max-brightness = <255>;
|
|
pwms = <&pwm_ao_cd 0 30040 0>;
|
|
};
|
|
};
|
|
|
|
sd_3v3: regulator-sdcard-3v3 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "SD_3V3";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
vin-supply = <&vddao_3v3>;
|
|
gpio = <&gpio GPIOD_11 GPIO_ACTIVE_LOW>;
|
|
regulator-boot-on;
|
|
regulator-always-on;
|
|
};
|
|
|
|
sdio_pwrseq: sdio-pwrseq {
|
|
compatible = "mmc-pwrseq-simple";
|
|
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
|
|
post-power-on-delay-ms = <500>;
|
|
power-off-delay-us = <200000>;
|
|
clocks = <&wifi32k>;
|
|
clock-names = "ext_clock";
|
|
};
|
|
|
|
vcc5v: regulator-vcc-5v {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "VCC5V";
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
vin-supply = <&dc_in>;
|
|
|
|
gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
|
|
enable-active-high;
|
|
};
|
|
|
|
vcc5v0_usb: regulator-vcc-usb {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "VCC5V0_USB";
|
|
regulator-min-microvolt = <5000000>;
|
|
regulator-max-microvolt = <5000000>;
|
|
vin-supply = <&vcc5v>;
|
|
|
|
gpio = <&gpio GPIOY_5 GPIO_ACTIVE_HIGH>;
|
|
enable-active-high;
|
|
};
|
|
|
|
vddao_1v8: regulator-vddao-1v8 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "VDDAO_1V8";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
vin-supply = <&vddao_3v3>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
vddao_3v3: regulator-vddao-3v3 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "VDDAO_3V3";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
vin-supply = <&dc_in>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
vddio_1v8: regulator-vddio-1v8 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "VDDIO_1V8";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <1800000>;
|
|
vin-supply = <&vddio_3v3>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
vddio_3v3: regulator-vddio-3v3 {
|
|
compatible = "regulator-fixed";
|
|
regulator-name = "VDDIO_3V3";
|
|
regulator-min-microvolt = <3300000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
vin-supply = <&vddao_3v3>;
|
|
regulator-always-on;
|
|
};
|
|
|
|
vddio_c: regulator-gpio-c {
|
|
compatible = "regulator-gpio";
|
|
regulator-name = "VDDIO_C";
|
|
regulator-min-microvolt = <1800000>;
|
|
regulator-max-microvolt = <3300000>;
|
|
vin-supply = <&vddio_3v3>;
|
|
gpios = <&gpio GPIOD_9 GPIO_ACTIVE_HIGH>;
|
|
states = <1800000 1
|
|
3300000 0>;
|
|
};
|
|
|
|
wifi32k: wifi32k {
|
|
compatible = "pwm-clock";
|
|
#clock-cells = <0>;
|
|
clock-frequency = <32768>;
|
|
pwms = <&pwm_ab 0 30518 0>;
|
|
};
|
|
|
|
xtal: xtal-clk {
|
|
compatible = "fixed-clock";
|
|
clock-frequency = <24000000>;
|
|
clock-output-names = "xtal";
|
|
#clock-cells = <0>;
|
|
};
|
|
};
|
|
|
|
&pwm_ab {
|
|
status = "okay";
|
|
pinctrl-0 = <&pwm_a_pins>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
&pwm_ao_cd {
|
|
status = "okay";
|
|
pinctrl-0 = <&pwm_ao_c_d_pins>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
/* SDIO */
|
|
&sd_emmc_a {
|
|
status = "okay";
|
|
pinctrl-0 = <&sdio_pins>;
|
|
pinctrl-1 = <&sdio_clk_gate_pins>;
|
|
pinctrl-names = "default", "clk-gate";
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
bus-width = <4>;
|
|
cap-sd-highspeed;
|
|
sd-uhs-sdr12;
|
|
sd-uhs-sdr25;
|
|
sd-uhs-sdr50;
|
|
sd-uhs-sdr104;
|
|
cap-sdio-irq;
|
|
max-frequency = <200000000>;
|
|
non-removable;
|
|
disable-wp;
|
|
no-mmc;
|
|
no-sd;
|
|
|
|
power-domains = <&pwrc PWRC_T7_SDIO_A_ID>;
|
|
|
|
keep-power-in-suspend;
|
|
|
|
mmc-pwrseq = <&sdio_pwrseq>;
|
|
|
|
vmmc-supply = <&vddao_3v3>;
|
|
vqmmc-supply = <&vddao_1v8>;
|
|
|
|
brcmf: wifi@1 {
|
|
reg = <1>;
|
|
compatible = "brcm,bcm43752-fmac", "brcm,bcm4329-fmac";
|
|
};
|
|
};
|
|
|
|
/* SD card */
|
|
&sd_emmc_b {
|
|
status = "okay";
|
|
pinctrl-0 = <&sdcard_pins>;
|
|
pinctrl-1 = <&sdcard_clk_gate_pins>;
|
|
pinctrl-names = "default", "clk-gate";
|
|
|
|
bus-width = <4>;
|
|
cap-sd-highspeed;
|
|
sd-uhs-sdr12;
|
|
sd-uhs-sdr25;
|
|
sd-uhs-sdr50;
|
|
sd-uhs-sdr104;
|
|
max-frequency = <200000000>;
|
|
disable-wp;
|
|
no-sdio;
|
|
no-mmc;
|
|
|
|
power-domains = <&pwrc PWRC_T7_SDIO_B_ID>;
|
|
|
|
cd-gpios = <&gpio GPIOC_6 GPIO_ACTIVE_LOW>;
|
|
vmmc-supply = <&sd_3v3>;
|
|
vqmmc-supply = <&vddio_c>;
|
|
};
|
|
|
|
/* eMMC */
|
|
&sd_emmc_c {
|
|
status = "okay";
|
|
pinctrl-0 = <&emmc_ctrl_pins>, <&emmc_data_8b_pins>, <&emmc_ds_pins>;
|
|
pinctrl-1 = <&emmc_clk_gate_pins>;
|
|
pinctrl-names = "default", "clk-gate";
|
|
|
|
bus-width = <8>;
|
|
cap-mmc-highspeed;
|
|
mmc-ddr-1_8v;
|
|
mmc-hs200-1_8v;
|
|
max-frequency = <200000000>;
|
|
disable-wp;
|
|
non-removable;
|
|
no-sdio;
|
|
no-sd;
|
|
|
|
power-domains = <&pwrc PWRC_T7_EMMC_ID>;
|
|
|
|
vmmc-supply = <&vddio_3v3>;
|
|
vqmmc-supply = <&vddio_1v8>;
|
|
};
|
|
|
|
&uart_a {
|
|
status = "okay";
|
|
clocks = <&xtal>, <&xtal>, <&xtal>;
|
|
clock-names = "xtal", "pclk", "baud";
|
|
};
|