blob: 43eb7d149e3647b1590f5c11f29676813591bbd8 [file] [log] [blame]
Tom Rini4549e782018-05-06 18:27:01 -04001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
Neil Armstrong48622152017-10-12 15:50:30 +02002/*
3 * Copyright (c) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
4 * Based on meson-gx-p23x-q20x.dtsi:
5 * - Copyright (c) 2016 Endless Computers, Inc.
6 * Author: Carlo Caione <carlo@endlessm.com>
7 * - Copyright (c) 2016 BayLibre, SAS.
8 * Author: Neil Armstrong <narmstrong@baylibre.com>
Neil Armstrong48622152017-10-12 15:50:30 +02009 */
10
11/* Common DTSI for devices which are based on the P212 reference board. */
12
13#include "meson-gxl-s905x.dtsi"
14
15/ {
16 aliases {
17 serial0 = &uart_AO;
18 serial1 = &uart_A;
Neil Armstrong5b3da7f2018-06-05 10:10:44 +020019 ethernet0 = &ethmac;
Neil Armstrong48622152017-10-12 15:50:30 +020020 };
21
22 chosen {
23 stdout-path = "serial0:115200n8";
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x0 0x0 0x80000000>;
29 };
30
Neil Armstrong7d750c32018-04-11 17:40:40 +020031 hdmi_5v: regulator-hdmi-5v {
32 compatible = "regulator-fixed";
33
34 regulator-name = "HDMI_5V";
35 regulator-min-microvolt = <5000000>;
36 regulator-max-microvolt = <5000000>;
37
38 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
39 enable-active-high;
40 regulator-always-on;
41 };
42
Neil Armstrong48622152017-10-12 15:50:30 +020043 vddio_boot: regulator-vddio_boot {
44 compatible = "regulator-fixed";
45 regulator-name = "VDDIO_BOOT";
46 regulator-min-microvolt = <1800000>;
47 regulator-max-microvolt = <1800000>;
48 };
49
50 vddao_3v3: regulator-vddao_3v3 {
51 compatible = "regulator-fixed";
52 regulator-name = "VDDAO_3V3";
53 regulator-min-microvolt = <3300000>;
54 regulator-max-microvolt = <3300000>;
55 };
56
57 vddio_ao18: regulator-vddio_ao18 {
58 compatible = "regulator-fixed";
59 regulator-name = "VDDIO_AO18";
60 regulator-min-microvolt = <1800000>;
61 regulator-max-microvolt = <1800000>;
62 };
63
64 vcc_3v3: regulator-vcc_3v3 {
65 compatible = "regulator-fixed";
66 regulator-name = "VCC_3V3";
67 regulator-min-microvolt = <3300000>;
68 regulator-max-microvolt = <3300000>;
69 };
70
71 emmc_pwrseq: emmc-pwrseq {
72 compatible = "mmc-pwrseq-emmc";
73 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
74 };
75
76 wifi32k: wifi32k {
77 compatible = "pwm-clock";
78 #clock-cells = <0>;
79 clock-frequency = <32768>;
80 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
81 };
82
83 sdio_pwrseq: sdio-pwrseq {
84 compatible = "mmc-pwrseq-simple";
85 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
86 clocks = <&wifi32k>;
87 clock-names = "ext_clock";
88 };
89};
90
91&ethmac {
92 status = "okay";
93};
94
95&ir {
96 status = "okay";
97 pinctrl-0 = <&remote_input_ao_pins>;
98 pinctrl-names = "default";
99};
100
101&saradc {
102 status = "okay";
103 vref-supply = <&vddio_ao18>;
104};
105
106/* Wireless SDIO Module */
107&sd_emmc_a {
108 status = "okay";
109 pinctrl-0 = <&sdio_pins>;
Neil Armstrong7d750c32018-04-11 17:40:40 +0200110 pinctrl-1 = <&sdio_clk_gate_pins>;
111 pinctrl-names = "default", "clk-gate";
Neil Armstrong48622152017-10-12 15:50:30 +0200112 #address-cells = <1>;
113 #size-cells = <0>;
114
115 bus-width = <4>;
116 cap-sd-highspeed;
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100117 max-frequency = <50000000>;
Neil Armstrong48622152017-10-12 15:50:30 +0200118
119 non-removable;
120 disable-wp;
121
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100122 /* WiFi firmware requires power to be kept while in suspend */
123 keep-power-in-suspend;
124
Neil Armstrong48622152017-10-12 15:50:30 +0200125 mmc-pwrseq = <&sdio_pwrseq>;
126
127 vmmc-supply = <&vddao_3v3>;
128 vqmmc-supply = <&vddio_boot>;
129};
130
131/* SD card */
132&sd_emmc_b {
133 status = "okay";
134 pinctrl-0 = <&sdcard_pins>;
Neil Armstrong7d750c32018-04-11 17:40:40 +0200135 pinctrl-1 = <&sdcard_clk_gate_pins>;
136 pinctrl-names = "default", "clk-gate";
Neil Armstrong48622152017-10-12 15:50:30 +0200137
138 bus-width = <4>;
139 cap-sd-highspeed;
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100140 max-frequency = <50000000>;
Neil Armstrong48622152017-10-12 15:50:30 +0200141 disable-wp;
142
Jerome Brunetdd5f2352020-03-05 12:12:38 +0100143 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
Neil Armstrong48622152017-10-12 15:50:30 +0200144
145 vmmc-supply = <&vddao_3v3>;
146 vqmmc-supply = <&vddio_boot>;
147};
148
149/* eMMC */
150&sd_emmc_c {
151 status = "okay";
Neil Armstrong7d750c32018-04-11 17:40:40 +0200152 pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
153 pinctrl-1 = <&emmc_clk_gate_pins>;
154 pinctrl-names = "default", "clk-gate";
Neil Armstrong48622152017-10-12 15:50:30 +0200155
156 bus-width = <8>;
Neil Armstrong48622152017-10-12 15:50:30 +0200157 cap-mmc-highspeed;
158 max-frequency = <200000000>;
159 non-removable;
160 disable-wp;
161 mmc-ddr-1_8v;
162 mmc-hs200-1_8v;
163
164 mmc-pwrseq = <&emmc_pwrseq>;
165 vmmc-supply = <&vcc_3v3>;
166 vqmmc-supply = <&vddio_boot>;
167};
168
169&pwm_ef {
170 status = "okay";
171 pinctrl-0 = <&pwm_e_pins>;
172 pinctrl-names = "default";
173 clocks = <&clkc CLKID_FCLK_DIV4>;
174 clock-names = "clkin0";
175};
176
177/* This is connected to the Bluetooth module: */
178&uart_A {
179 status = "okay";
180 pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
181 pinctrl-names = "default";
182 uart-has-rtscts;
183};
184
185&uart_AO {
186 status = "okay";
187 pinctrl-0 = <&uart_ao_a_pins>;
188 pinctrl-names = "default";
189};
Neil Armstrong5b3da7f2018-06-05 10:10:44 +0200190
191&usb0 {
192 status = "okay";
193};
Loic Devulder77dd0922018-07-10 10:01:07 +0200194
195&usb2_phy0 {
Loic Devulder8973d812018-11-27 17:41:18 +0100196 /*
197 * HDMI_5V is also used as supply for the USB VBUS.
198 */
199 phy-supply = <&hdmi_5v>;
Loic Devulder77dd0922018-07-10 10:01:07 +0200200};