sun50i-a64.dtsi revision 1.9 1 /* $NetBSD: sun50i-a64.dtsi,v 1.9 2018/05/11 00:00:04 jmcneill Exp $ */
2
3 /*-
4 * Copyright (c) 2017 Jared McNeill <jmcneill (at) invisible.ca>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 */
28
29 / {
30 chosen {
31 #address-cells = <1>;
32 #size-cells = <1>;
33 ranges;
34
35 framebuffer@0 {
36 compatible = "allwinner,simple-framebuffer",
37 "simple-framebuffer";
38 allwinner,pipeline = "mixer1-lcd1-hdmi";
39 status = "disabled";
40 };
41 };
42
43 sound: sound {
44 compatible = "simple-audio-card";
45 simple-audio-card,name = "SUN50I Audio Card";
46 simple-audio-card,format = "i2s";
47 simple-audio-card,frame-master = <&cpudai>;
48 simple-audio-card,bitclock-master = <&cpudai>;
49 simple-audio-card,mclk-fs = <512>;
50 simple-audio-card,aux-devs = <&codec_analog>;
51 simple-audio-card,routing =
52 "Left DAC", "AIF1 Slot 0 Left",
53 "Right DAC", "AIF1 Slot 0 Right";
54 status = "disabled";
55
56 cpudai: simple-audio-card,cpu {
57 sound-dai = <&dai>;
58 };
59
60 link_codec: simple-audio-card,codec {
61 sound-dai = <&codec>;
62 };
63 };
64
65 soc {
66 pwm: pwm@1c21400 {
67 compatible = "allwinner,sun50i-a64-pwm";
68 reg = <0x01c21400 0x8>;
69 clocks = <&osc24M>;
70 #pwm-cells = <3>;
71 status = "disabled";
72 };
73
74 dai: dai@1c22c00 {
75 #sound-dai-cells = <0>;
76 compatible = "allwinner,sun50i-a64-acodec-i2s";
77 reg = <0x01c22c00 0x200>;
78 interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
79 clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
80 clock-names = "apb", "mod";
81 resets = <&ccu RST_BUS_CODEC>;
82 reset-names = "rst";
83 dmas = <&dma 15>, <&dma 15>;
84 dma-names = "rx", "tx";
85 status = "disabled";
86 };
87
88 codec: codec@1c22e00 {
89 #sound-dai-cells = <0>;
90 compatible = "allwinner,sun50i-a64-codec";
91 reg = <0x01c22e00 0x600>;
92 interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
93 clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
94 clock-names = "bus", "mod";
95 status = "disabled";
96 };
97
98 rtp: rtp@1c25000 {
99 compatible = "allwinner,sun50i-a64-ts";
100 reg = <0x01c25000 0x400>;
101 interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
102 clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
103 clock-names = "ahb", "ths";
104 resets = <&ccu RST_BUS_THS>;
105 #thermal-sensor-cells = <0>;
106 };
107
108 codec_analog: codec-analog@1f015c0 {
109 compatible = "allwinner,sun50i-a64-codec-analog";
110 reg = <0x01f015c0 0x4>;
111 status = "disabled";
112 };
113 };
114 };
115
116 &cpu0 {
117 clocks = <&ccu 1>; /* 1=CLK_PLL_CPUX */
118 };
119
120 &pio {
121 pwm0_pins: pwm0 {
122 pins = "PD22";
123 function = "pwm";
124 };
125 };
126