blob: eae6cfeb9a49202a8d58cf4930ef69e196685514 [file] [log] [blame]
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright (c) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
* Based on meson-gx-p23x-q20x.dtsi:
* - Copyright (c) 2016 Endless Computers, Inc.
* Author: Carlo Caione <carlo@endlessm.com>
* - Copyright (c) 2016 BayLibre, SAS.
* Author: Neil Armstrong <narmstrong@baylibre.com>
*/
/* Common DTSI for devices which are based on the P212 reference board. */
#include "meson-g12a-s905d2.dtsi"
/ {
aliases {
serial0 = &uart_AO;
serial1 = &uart_A;
spi0 = &spifc;
spi1 = &spicc0;
spi2 = &spicc1;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
i2c3 = &i2c3;
i2c4 = &i2c_AO;
};
chosen {
stdout-path = "serial0:115200n8";
};
memory@0 {
device_type = "memory";
reg = <0x0 0x0 0x0 0x80000000>;
};
vddio_boot: regulator-vddio_boot {
compatible = "regulator-fixed";
regulator-name = "VDDIO_BOOT";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
vddao_3v3: regulator-vddao_3v3 {
compatible = "regulator-fixed";
regulator-name = "VDDAO_3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
vddio_ao18: regulator-vddio_ao18 {
compatible = "regulator-fixed";
regulator-name = "VDDIO_AO18";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
};
vcc_3v3: regulator-vcc_3v3 {
compatible = "regulator-fixed";
regulator-name = "VCC_3V3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
};
emmc_pwrseq: emmc-pwrseq {
compatible = "mmc-pwrseq-emmc";
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
};
wifi32k: wifi32k {
compatible = "pwm-clock";
#clock-cells = <0>;
clock-frequency = <32768>;
pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
};
sdio_pwrseq: sdio-pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
clocks = <&wifi32k>;
clock-names = "ext_clock";
};
};
&ethmac {
status = "okay";
internal_phy = <1>;
mc_val = <0x4be04>;
/*mc_val = <0x1621>;*/
};
&ir {
status = "disabled";
//pinctrl-0 = <&remote_input_ao_pins>;
//pinctrl-names = "default";
};
&saradc {
status = "okay";
vref-supply = <&vddio_ao18>;
};
/* Wireless SDIO Module */
&sd_emmc_a {
status = "disabled";
//pinctrl-0 = <&sdio_pins>;
//pinctrl-names = "default";
#address-cells = <1>;
#size-cells = <0>;
bus-width = <4>;
cap-sd-highspeed;
max-frequency = <100000000>;
non-removable;
disable-wp;
pinname = "sdio";
mmc-pwrseq = <&sdio_pwrseq>;
vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>;
};
/* SD card */
&sd_emmc_b {
status = "okay";
pinctrl-0 = <&sd_all_pins>;
pinctrl-names = "default";
bus-width = <4>;
cap-sd-highspeed;
max-frequency = <100000000>;
disable-wp;
pinname = "sd";
init_co_phase = <3>;
init_tx_phase = <0>;
sd_hs_co_phase = <2>;
sd_hs_tx_phase = <0>;
sdr104_co_phase = <2>;
sdr104_hs_tx_phase = <0>;
cd-detect = <&gpio GPIOC_6 GPIO_ACTIVE_HIGH>;
/* cd-inverted; */
vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>;
};
/* eMMC */
&sd_emmc_c {
status = "okay";
pinctrl-0 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
pinctrl-names = "default";
bus-width = <8>;
cap-sd-highspeed;
cap-mmc-highspeed;
max-frequency = <200000000>;
non-removable;
disable-wp;
/* mmc-ddr-1_8v; */
mmc-hs200-1_8v;
pinname = "emmc";
init_co_phase = <3>;
init_tx_phase = <0>;
hs_co_phase = <3>;
hs_tx_phase = <0>;
ddr_co_phase = <2>;
ddr_tx_phase = <0>;
hs2_co_phase = <3>;
hs2_tx_phase = <0>;
hw_reset = <&gpio BOOT_12 GPIO_ACTIVE_HIGH>;
mmc-pwrseq = <&emmc_pwrseq>;
vmmc-supply = <&vcc_3v3>;
vqmmc-supply = <&vddio_boot>;
};
/* nand */
&nand {
status = "okay";
pinctrl-names = "default", "nand_all_pins", "nand_cs_only";
pinctrl-0 = <&all_nand_pins>;
pinctrl-1 = <&all_nand_pins>;
pinctrl-2 = <&nand_cs_pins>;
/*
#address-cells = <1>;
#size-cells = <0>;
nand@0 {
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
nand-on-flash-bbt;
nand-ecc-mode = "hw";
nand-ecc-strength = <8>;
nand-ecc-step-size = <1024>;
meson-nand-user-mode = <2>;
meson-nand-ran-mode = <1>;
partition@0 {
label = "boot";
reg = <0x00000000 0x00200000>;
read-only;
};
partition@200000 {
label = "env";
reg = <0x00200000 0x00400000>;
};
partition@600000 {
label = "system";
reg = <0x00600000 0x00a00000>;
};
partition@1000000 {
label = "rootfs";
reg = <0x01000000 0x03000000>;
};
partition@4000000 {
label = "media";
reg = <0x04000000 0x8000000>;
};
};*/
};
&dwc3 {
status = "okay";
dr_mode = "host";
};
&usb2_phy_v2 {
status = "okay";
portnum = <2>;
};
&usb3_phy_v2 {
status = "okay";
portnum = <0>;
gpio-vbus-power = "GPIOH_6";
gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
};
&pwm_ef {
status = "okay";
//pinctrl-0 = <&pwm_e_pins>;
pinctrl-names = "default";
};
/* This is connected to the Bluetooth module: */
&uart_A {
status = "okay";
pinctrl-0 = <&a_uart_pins>;
pinctrl-names = "default";
uart-has-rtscts;
};
&uart_AO {
status = "okay";
pinctrl-0 = <&ao_uart_pins>;
pinctrl-names = "default";
};
&spifc {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spifc_all_pins>;
max-frequency = <80000000>;
max-io = <4>;
cs-gpios = <&gpio BOOT_14 GPIO_ACTIVE_HIGH>;
clocks = <&clkc CLKID_CLK81>;
clock-names = "core";
};
&spicc1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spicc1_pins>;
cs-gpios = <&gpio GPIOH_6 0>;
};