blob: bb9ff07d450bf113c89ec56fdfc0c616126fda55 [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-a1-a113l.dtsi"
/ {
aliases {
serial0 = &uart_b;
serial1 = &uart_a;
spi0 = &spifc;
spi1 = &spicc0;
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
i2c3 = &i2c3;
};
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_9 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";
};
leds {
compatible = "pwm-leds";
status = "okay";
red {
label = "led_red";
pwms = <&pwm_cd MESON_PWM_0 10000000 0>;
max-brightness=<255>;
default-brightness=<255>;
};
green {
label = "led_green";
pwms = <&pwm_ab MESON_PWM_1 10000000 0>;
max-brightness=<255>;
default-brightness=<255>;
};
blue {
label = "led_blue";
pwms = <&pwm_ab MESON_PWM_0 10000000 0>;
max-brightness=<255>;
default-brightness=<255>;
};
};
};
&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;
card_type = <3>;
mmc-pwrseq = <&sdio_pwrseq>;
vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>;
};
/* SD card */
&sd_emmc_b {
status = "disabled";
/*pinctrl-0 = <&sd_all_pins>;*/
/*pinctrl-names = "default";*/
bus-width = <4>;
cap-sd-highspeed;
max-frequency = <100000000>;
disable-wp;
card_type = <5>;
/* cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>; */
/* cd-inverted; */
vmmc-supply = <&vddao_3v3>;
vqmmc-supply = <&vddio_boot>;
};
/* eMMC */
&sd_emmc_c {
status = "disabled";
/* 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; */
card_type = <1>;
core-phase0 = <3>;
tx-phase0 = <0>;
core-phase1 = <3>;
tx-phase1 = <0>;
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 = <1>;
};
&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;
};
&spifc {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spifc_pins>;
max-frequency = <24000000>;
max-cs = <2>;
/* 512M */
clocks = <&clkc CLKID_FCLK_DIV3>,
<&clkc CLKID_SPIFC_MUX>,
<&clkc CLKID_SPIFC_DIV>,
<&clkc CLKID_SPIFC_GATE>,
<&clkc CLKID_SPIFC_XTAL_GATE>;
clock-names = "fclk_source", "spifc_mux", "spifc_div", "spifc_gate", "spifc_xtal_gate";
};
&spicc0 {
status = "disabled";
pinctrl-names = "default";
pinctrl-0 = <&spicc0_pins_a>;
cs-gpios = <&gpio GPIOA_8 0>;
};
&pwm_ab {
status = "okay";
/* set mux pwm_a_pins4 pwm_b_pins2 for led */
pinctrl-names="default";
pinctrl-0=<&pwm_a_pins4 &pwm_b_pins2>;
};
&pwm_cd {
status = "okay";
/* set mux pwm_c_pins3 for led */
pinctrl-names="default";
pinctrl-0=<&pwm_c_pins3>;
};