Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>.
0004  * Based on meson-gx-p23x-q20x.dtsi:
0005  * - Copyright (c) 2016 Endless Computers, Inc.
0006  *   Author: Carlo Caione <carlo@endlessm.com>
0007  * - Copyright (c) 2016 BayLibre, SAS.
0008  *   Author: Neil Armstrong <narmstrong@baylibre.com>
0009  */
0010 
0011 /* Common DTSI for devices which are based on the P212 reference board. */
0012 
0013 #include "meson-gxl-s905x.dtsi"
0014 
0015 / {
0016         aliases {
0017                 serial0 = &uart_AO;
0018                 ethernet0 = &ethmac;
0019         };
0020 
0021         chosen {
0022                 stdout-path = "serial0:115200n8";
0023         };
0024 
0025         memory@0 {
0026                 device_type = "memory";
0027                 reg = <0x0 0x0 0x0 0x80000000>;
0028         };
0029 
0030         hdmi_5v: regulator-hdmi-5v {
0031                 compatible = "regulator-fixed";
0032 
0033                 regulator-name = "HDMI_5V";
0034                 regulator-min-microvolt = <5000000>;
0035                 regulator-max-microvolt = <5000000>;
0036 
0037                 gpio = <&gpio GPIOH_3 GPIO_ACTIVE_HIGH>;
0038                 enable-active-high;
0039                 regulator-always-on;
0040         };
0041 
0042         vddio_boot: regulator-vddio_boot {
0043                 compatible = "regulator-fixed";
0044                 regulator-name = "VDDIO_BOOT";
0045                 regulator-min-microvolt = <1800000>;
0046                 regulator-max-microvolt = <1800000>;
0047         };
0048 
0049         vddao_3v3: regulator-vddao_3v3 {
0050                 compatible = "regulator-fixed";
0051                 regulator-name = "VDDAO_3V3";
0052                 regulator-min-microvolt = <3300000>;
0053                 regulator-max-microvolt = <3300000>;
0054         };
0055 
0056         vddio_ao18: regulator-vddio_ao18 {
0057                 compatible = "regulator-fixed";
0058                 regulator-name = "VDDIO_AO18";
0059                 regulator-min-microvolt = <1800000>;
0060                 regulator-max-microvolt = <1800000>;
0061         };
0062 
0063         vcc_3v3: regulator-vcc_3v3 {
0064                 compatible = "regulator-fixed";
0065                 regulator-name = "VCC_3V3";
0066                 regulator-min-microvolt = <3300000>;
0067                 regulator-max-microvolt = <3300000>;
0068         };
0069 
0070         emmc_pwrseq: emmc-pwrseq {
0071                 compatible = "mmc-pwrseq-emmc";
0072                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0073         };
0074 
0075         wifi32k: wifi32k {
0076                 compatible = "pwm-clock";
0077                 #clock-cells = <0>;
0078                 clock-frequency = <32768>;
0079                 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
0080         };
0081 
0082         sdio_pwrseq: sdio-pwrseq {
0083                 compatible = "mmc-pwrseq-simple";
0084                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
0085                 clocks = <&wifi32k>;
0086                 clock-names = "ext_clock";
0087         };
0088 };
0089 
0090 &ethmac {
0091         status = "okay";
0092 };
0093 
0094 &ir {
0095         status = "okay";
0096         pinctrl-0 = <&remote_input_ao_pins>;
0097         pinctrl-names = "default";
0098 };
0099 
0100 &saradc {
0101         status = "okay";
0102         vref-supply = <&vddio_ao18>;
0103 };
0104 
0105 /* Wireless SDIO Module */
0106 &sd_emmc_a {
0107         status = "okay";
0108         pinctrl-0 = <&sdio_pins>;
0109         pinctrl-1 = <&sdio_clk_gate_pins>;
0110         pinctrl-names = "default", "clk-gate";
0111         #address-cells = <1>;
0112         #size-cells = <0>;
0113 
0114         bus-width = <4>;
0115         cap-sd-highspeed;
0116         max-frequency = <50000000>;
0117 
0118         non-removable;
0119         disable-wp;
0120 
0121         /* WiFi firmware requires power to be kept while in suspend */
0122         keep-power-in-suspend;
0123 
0124         mmc-pwrseq = <&sdio_pwrseq>;
0125 
0126         vmmc-supply = <&vddao_3v3>;
0127         vqmmc-supply = <&vddio_boot>;
0128 };
0129 
0130 /* SD card */
0131 &sd_emmc_b {
0132         status = "okay";
0133         pinctrl-0 = <&sdcard_pins>;
0134         pinctrl-1 = <&sdcard_clk_gate_pins>;
0135         pinctrl-names = "default", "clk-gate";
0136 
0137         bus-width = <4>;
0138         cap-sd-highspeed;
0139         max-frequency = <50000000>;
0140         disable-wp;
0141 
0142         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
0143 
0144         vmmc-supply = <&vddao_3v3>;
0145         vqmmc-supply = <&vddio_boot>;
0146 };
0147 
0148 /* eMMC */
0149 &sd_emmc_c {
0150         status = "okay";
0151         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
0152         pinctrl-1 = <&emmc_clk_gate_pins>;
0153         pinctrl-names = "default", "clk-gate";
0154 
0155         bus-width = <8>;
0156         cap-mmc-highspeed;
0157         max-frequency = <200000000>;
0158         non-removable;
0159         disable-wp;
0160         mmc-ddr-1_8v;
0161         mmc-hs200-1_8v;
0162 
0163         mmc-pwrseq = <&emmc_pwrseq>;
0164         vmmc-supply = <&vcc_3v3>;
0165         vqmmc-supply = <&vddio_boot>;
0166 };
0167 
0168 &pwm_ef {
0169         status = "okay";
0170         pinctrl-0 = <&pwm_e_pins>;
0171         pinctrl-names = "default";
0172         clocks = <&clkc CLKID_FCLK_DIV4>;
0173         clock-names = "clkin0";
0174 };
0175 
0176 /* This is connected to the Bluetooth module: */
0177 &uart_A {
0178         status = "okay";
0179         pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
0180         pinctrl-names = "default";
0181         uart-has-rtscts;
0182 
0183         bluetooth {
0184                 compatible = "brcm,bcm43438-bt";
0185                 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
0186                 max-speed = <2000000>;
0187                 clocks = <&wifi32k>;
0188                 clock-names = "lpo";
0189         };
0190 };
0191 
0192 &uart_AO {
0193         status = "okay";
0194         pinctrl-0 = <&uart_ao_a_pins>;
0195         pinctrl-names = "default";
0196 };
0197 
0198 &usb {
0199         status = "okay";
0200         dr_mode = "host";
0201 };
0202 
0203 &usb2_phy0 {
0204         /*
0205          * HDMI_5V is also used as supply for the USB VBUS.
0206          */
0207         phy-supply = <&hdmi_5v>;
0208 };