Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /dts-v1/;
- #include "sun7i-a20.dtsi"
- #include "sunxi-common-regulators.dtsi"
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/interrupt-controller/arm-gic.h>
- / {
- model = "Banana Pi BPI-M1-Plus";
- compatible = "sinovoip,bpi-m1-plus", "allwinner,sun7i-a20";
- aliases {
- serial0 = &uart0;
- serial1 = &uart2;
- serial2 = &uart3;
- serial3 = &uart7;
- };
- chosen {
- stdout-path = "serial0:115200n8";
- };
- leds {
- compatible = "gpio-leds";
- pinctrl-names = "default";
- pinctrl-0 = <&led_pins_bananapi>;
- red {
- label = "bananapi:red:usr";
- gpios = <&pio 7 25 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "default-on";
- };
- green {
- label = "bananapi:green:usr";
- gpios = <&pio 7 24 GPIO_ACTIVE_HIGH>;
- linux,default-trigger = "heartbeat";
- };
- };
- reg_gmac_3v3: gmac-3v3 {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&gmac_power_pin_bananapi>;
- regulator-name = "gmac-3v3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- startup-delay-us = <100000>;
- enable-active-high;
- gpio = <&pio 7 23 GPIO_ACTIVE_HIGH>;
- };
- reg_vmmc3: vmmc3 {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&vmmc3_pin_bananapi>;
- regulator-name = "vmmc3";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- regulator-always-on;
- regulator-boot-on;
- enable-active-high;
- gpio = <&pio 7 22 GPIO_ACTIVE_HIGH>;
- };
- pcm5102: pcm510x {
- compatible = "ti,pcm510x";
- pcm510x,format = "i2s";
- #sound-dai-cells = <0>;
- };
- sound_i2s {
- compatible = "simple-audio-card";
- simple-audio-card,format = "i2s";
- simple-audio-card,name = "uda1380 Card";
- simple-audio-card,routing =
- "Headphone Jack", "VOUTLHP",
- "Headphone Jack", "VOUTRHP",
- "Line Out Jack", "VOUTL",
- "Line Out Jack", "VOUTR",
- "VINM", "Mic Jack",
- "VINL", "Line In Jack",
- "VINR", "Line In Jack";
- simple-audio-card,widgets =
- "Headphone", "Headphone Jack",
- "Line", "Line In Jack",
- "Line", "Line Out Jack",
- "Microphone", "Mic Jack";
- //simple-audio-card,mclk-fs = <256>; // as it's not supported in dai codec driver, see asoc_simple_card_hw_params() in sound/soc/generic/simple-card.c
- simple-audio-card,cpu {
- sound-dai = <&i2s0>;
- };
- simple-audio-card,codec {
- sound-dai = <&ext_codec>;
- };
- };
- /*
- sound {
- compatible = "simple-audio-card";
- simple-audio-card,name = "A20-Audio";
- simple-audio-card,dai-link@0 {
- format = "i2s";
- cpu {
- sound-dai = <&i2s0>;
- };
- codec {
- sound-dai = <&pcm5102>;
- };
- };
- simple-audio-card,dai-link@1 {
- cpu {
- sound-dai = <&spdif>;
- };
- codec {
- sound-dai = <&spdif_out>;
- };
- };
- };
- */
- spdif_out: spdif-out {
- compatible = "linux,spdif-dit";
- #sound-dai-cells = <0>;
- };
- };
- &ahci {
- status = "okay";
- };
- &ehci0 {
- status = "okay";
- };
- &ehci1 {
- status = "okay";
- };
- &ohci0 {
- status = "okay";
- };
- &ohci1 {
- status = "okay";
- };
- &gmac {
- pinctrl-names = "default";
- pinctrl-0 = <&gmac_pins_rgmii_a>;
- phy = <&phy1>;
- phy-mode = "rgmii";
- phy-supply = <®_gmac_3v3>;
- status = "okay";
- phy1: ethernet-phy@1 {
- reg = <1>;
- };
- };
- &i2c0 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c0_pins_a>;
- status = "okay";
- axp209: pmic@34 {
- compatible = "x-powers,axp209";
- reg = <0x34>;
- interrupt-parent = <&nmi_intc>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
- interrupt-controller;
- #interrupt-cells = <1>;
- };
- };
- &i2c1 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c1_pins_a>;
- status = "okay";
- /* added for test with I2S waveshare codec board based on UDA1380 */
- ext_codec: uda1380@18 {
- #sound-dai-cells = <0>; /* added for dmesg err: "could not get #sound-dai-cells for " */
- compatible = "nxp,uda1380";
- reg = <0x18>;
- /* reset-gpio = <&pio 7 3 GPIO_ACTIVE_HIGH>; */
- /*
- * commented out so uda1380_probe move forward..
- * otherwise get: asoc-simple-card sound: ASoC: failed to instantiate card -16
- * power-gpio = <&pio 7 11 GPIO_ACTIVE_HIGH>;
- */
- dac-clk = <1>; // SYSCLK=0, WSPLL=1
- };
- };
- &i2c2 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c2_pins_a>;
- status = "okay";
- };
- &ir0 {
- pinctrl-names = "default";
- pinctrl-0 = <&ir0_rx_pins_a>;
- status = "okay";
- };
- &mmc0 {
- pinctrl-names = "default";
- pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_bananapi>;
- vmmc-supply = <®_vcc3v3>;
- bus-width = <4>;
- cd-gpios = <&pio 7 10 GPIO_ACTIVE_HIGH>; /* PH10 */
- cd-inverted;
- status = "okay";
- };
- &mmc3 {
- #address-cells = <1>;
- #size-cells = <0>;
- pinctrl-names = "default";
- pinctrl-0 = <&mmc3_pins_a>;
- vmmc-supply = <®_vmmc3>;
- bus-width = <4>;
- non-removable;
- enable-sdio-wakeup;
- status = "okay";
- brcmf: bcrmf@1 {
- reg = <1>;
- compatible = "brcm,bcm4329-fmac";
- interrupt-parent = <&pio>;
- interrupts = <7 15 IRQ_TYPE_LEVEL_LOW>;
- interrupt-names = "host-wake";
- };
- };
- &mmc3_pins_a {
- /* AP6210 requires pull-up */
- allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
- };
- &pio {
- gmac_power_pin_bananapi: gmac_power_pin@0 {
- allwinner,pins = "PH23";
- allwinner,function = "gpio_out";
- allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- };
- led_pins_bananapi: led_pins@0 {
- allwinner,pins = "PH24", "PG2";
- allwinner,function = "gpio_out";
- allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- };
- mmc0_cd_pin_bananapi: mmc0_cd_pin@0 {
- allwinner,pins = "PH10";
- allwinner,function = "gpio_in";
- allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
- };
- usb1_vbus_pin_bananapi: usb1_vbus_pin@0 {
- allwinner,pins = "PH0";
- allwinner,function = "gpio_out";
- allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- };
- usb2_vbus_pin_bananapi: usb2_vbus_pin@0 {
- allwinner,pins = "PH1";
- allwinner,function = "gpio_out";
- allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- };
- vmmc3_pin_bananapi: vmmc3_pin@0 {
- allwinner,pins = "PH22";
- allwinner,function = "gpio_out";
- allwinner,drive = <SUN4I_PINCTRL_10_MA>;
- allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
- };
- };
- ®_usb1_vbus {
- pinctrl-0 = <&usb1_vbus_pin_bananapi>;
- gpio = <&pio 7 0 GPIO_ACTIVE_HIGH>; /* PH0 */
- status = "okay";
- };
- &i2s0 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2s0_bclk> , <&i2s0_lrclk> , <&i2s0_sdo0>;
- status = "okay";
- };
- &codec {
- status = "okay";
- };
- ®_usb2_vbus {
- pinctrl-0 = <&usb2_vbus_pin_bananapi>;
- gpio = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
- status = "okay";
- };
- &spi0 {
- pinctrl-names = "default";
- pinctrl-0 = <&spi0_pins_a>,
- <&spi0_cs0_pins_a>,
- <&spi0_cs1_pins_a>;
- status = "okay";
- };
- &uart0 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart0_pins_a>;
- status = "okay";
- };
- &uart2 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart2_pins_a>;
- status = "okay";
- };
- &uart3 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart3_pins_b>;
- status = "okay";
- };
- &uart7 {
- pinctrl-names = "default";
- pinctrl-0 = <&uart7_pins_a>;
- status = "okay";
- };
- &usbphy {
- usb1_vbus-supply = <®_usb1_vbus>;
- usb2_vbus-supply = <®_usb2_vbus>;
- status = "okay";
- };
- &spdif {
- compatible = "allwinner,sun4i-a10-spdif";
- reg = <0x01c21000 0x40>;
- interrupts = <13>;
- clocks = <&apb0_gates 1>, <&spdif_clk>;
- clock-names = "apb", "spdif";
- dmas = <&dma 0 2>, <&dma 0 2>;
- dma-names = "rx", "tx";
- status = "okay";
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement