sun8i-h2-plus-bananapi-p2-zero.dts revision 1.1.2.2 1 1.1.2.2 christos /* $NetBSD: sun8i-h2-plus-bananapi-p2-zero.dts,v 1.1.2.2 2019/06/10 22:05:53 christos Exp $ */
2 1.1.2.2 christos
3 1.1.2.2 christos /*-
4 1.1.2.2 christos * Copyright (c) 2019 Jason R. Thorpe
5 1.1.2.2 christos * All rights reserved.
6 1.1.2.2 christos *
7 1.1.2.2 christos * Redistribution and use in source and binary forms, with or without
8 1.1.2.2 christos * modification, are permitted provided that the following conditions
9 1.1.2.2 christos * are met:
10 1.1.2.2 christos * 1. Redistributions of source code must retain the above copyright
11 1.1.2.2 christos * notice, this list of conditions and the following disclaimer.
12 1.1.2.2 christos * 2. Redistributions in binary form must reproduce the above copyright
13 1.1.2.2 christos * notice, this list of conditions and the following disclaimer in the
14 1.1.2.2 christos * documentation and/or other materials provided with the distribution.
15 1.1.2.2 christos *
16 1.1.2.2 christos * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 1.1.2.2 christos * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 1.1.2.2 christos * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 1.1.2.2 christos * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 1.1.2.2 christos * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 1.1.2.2 christos * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 1.1.2.2 christos * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 1.1.2.2 christos * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 1.1.2.2 christos * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 1.1.2.2 christos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 1.1.2.2 christos * SUCH DAMAGE.
27 1.1.2.2 christos */
28 1.1.2.2 christos
29 1.1.2.2 christos /*
30 1.1.2.2 christos * Device tree for Banana Pi BPI-P2 Zero. The P2 Zero is essentially an
31 1.1.2.2 christos * M2 Zero with the following additions:
32 1.1.2.2 christos *
33 1.1.2.2 christos * - On-board Ethernet (with PoE capability available as an
34 1.1.2.2 christos * optional module).
35 1.1.2.2 christos * - On-board eMMC module.
36 1.1.2.2 christos */
37 1.1.2.2 christos
38 1.1.2.2 christos #include "../../../external/gpl2/dts/dist/arch/arm/boot/dts/sun8i-h2-plus-bananapi-m2-zero.dts"
39 1.1.2.2 christos
40 1.1.2.2 christos / {
41 1.1.2.2 christos model = "Banana Pi BPI-P2-Zero";
42 1.1.2.2 christos compatible = "sinovoip,bpi-p2-zero", "allwinner,sun8i-h2-plus";
43 1.1.2.2 christos
44 1.1.2.2 christos aliases {
45 1.1.2.2 christos /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
46 1.1.2.2 christos ethernet0 = &emac;
47 1.1.2.2 christos };
48 1.1.2.2 christos
49 1.1.2.2 christos leds {
50 1.1.2.2 christos pwr_led {
51 1.1.2.2 christos label = "bananapi-p2-zero:red:pwr";
52 1.1.2.2 christos };
53 1.1.2.2 christos };
54 1.1.2.2 christos };
55 1.1.2.2 christos
56 1.1.2.2 christos &emac {
57 1.1.2.2 christos phy-handle = <&int_mii_phy>;
58 1.1.2.2 christos phy-mode = "mii";
59 1.1.2.2 christos allwinner,leds-active-low;
60 1.1.2.2 christos status = "okay";
61 1.1.2.2 christos };
62 1.1.2.2 christos
63 1.1.2.2 christos &mmc0 {
64 1.1.2.2 christos /*
65 1.1.2.2 christos * There seems to be a discrepancy between how the card-detect
66 1.1.2.2 christos * signal is wired up between the P2 Zero and the M2 Zero, on
67 1.1.2.2 christos * which the P2 Zero is based.
68 1.1.2.2 christos *
69 1.1.2.2 christos * The M2 Zero device tree file claims that early samples of
70 1.1.2.2 christos * the M2 Zero were wired active-low, but that the production
71 1.1.2.2 christos * of the board is wired active-high; as such, the M2 Zero
72 1.1.2.2 christos * device tree uses an active-high signal for card-detect.
73 1.1.2.2 christos *
74 1.1.2.2 christos * However, the P2 Zero has been observed in the wild to have
75 1.1.2.2 christos * an active-low card-detect signal. I don't know if this is
76 1.1.2.2 christos * an early-vs-late situation like the M2 Zero, but for now we
77 1.1.2.2 christos * will configure the card-detect signal to active-low to match
78 1.1.2.2 christos * known samples of the board that exist in the wild.
79 1.1.2.2 christos */
80 1.1.2.2 christos cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
81 1.1.2.2 christos };
82 1.1.2.2 christos
83 1.1.2.2 christos &mmc2 {
84 1.1.2.2 christos pinctrl-names = "default";
85 1.1.2.2 christos pinctrl-0 = <&mmc2_8bit_pins>;
86 1.1.2.2 christos bus-width = <8>;
87 1.1.2.2 christos non-removable;
88 1.1.2.2 christos status = "okay";
89 1.1.2.2 christos };
90