Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2016 Andreas Färber
0004  * Copyright (c) 2016 BayLibre, Inc.
0005  * Author: Kevin Hilman <khilman@kernel.org>
0006  */
0007 
0008 #include "meson-gxbb.dtsi"
0009 #include <dt-bindings/gpio/gpio.h>
0010 #include <dt-bindings/leds/common.h>
0011 
0012 / {
0013         aliases {
0014                 serial0 = &uart_AO;
0015                 ethernet0 = &ethmac;
0016         };
0017 
0018         chosen {
0019                 stdout-path = "serial0:115200n8";
0020         };
0021 
0022         memory@0 {
0023                 device_type = "memory";
0024                 reg = <0x0 0x0 0x0 0x40000000>;
0025         };
0026 
0027         leds {
0028                 compatible = "gpio-leds";
0029 
0030                 led-power {
0031                         /* red in suspend or power-off */
0032                         color = <LED_COLOR_ID_BLUE>;
0033                         function = LED_FUNCTION_POWER;
0034                         gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
0035                         default-state = "on";
0036                         panic-indicator;
0037                 };
0038         };
0039 
0040         usb_pwr: regulator-usb-pwrs {
0041                 compatible = "regulator-fixed";
0042 
0043                 regulator-name = "USB_PWR";
0044 
0045                 regulator-min-microvolt = <5000000>;
0046                 regulator-max-microvolt = <5000000>;
0047 
0048                 gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
0049                 enable-active-high;
0050         };
0051 
0052         vddio_boot: regulator-vddio_boot {
0053                 compatible = "regulator-fixed";
0054                 regulator-name = "VDDIO_BOOT";
0055                 regulator-min-microvolt = <1800000>;
0056                 regulator-max-microvolt = <1800000>;
0057         };
0058 
0059         vddao_3v3: regulator-vddao_3v3 {
0060                 compatible = "regulator-fixed";
0061                 regulator-name = "VDDAO_3V3";
0062                 regulator-min-microvolt = <3300000>;
0063                 regulator-max-microvolt = <3300000>;
0064         };
0065 
0066         vddio_ao18: regulator-vddio_ao18 {
0067                 compatible = "regulator-fixed";
0068                 regulator-name = "VDDIO_AO18";
0069                 regulator-min-microvolt = <1800000>;
0070                 regulator-max-microvolt = <1800000>;
0071                 regulator-always-on;
0072         };
0073 
0074         vcc_3v3: regulator-vcc_3v3 {
0075                 compatible = "regulator-fixed";
0076                 regulator-name = "VCC_3V3";
0077                 regulator-min-microvolt = <3300000>;
0078                 regulator-max-microvolt = <3300000>;
0079         };
0080 
0081         emmc_pwrseq: emmc-pwrseq {
0082                 compatible = "mmc-pwrseq-emmc";
0083                 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
0084         };
0085 
0086         wifi32k: wifi32k {
0087                 compatible = "pwm-clock";
0088                 #clock-cells = <0>;
0089                 clock-frequency = <32768>;
0090                 pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
0091         };
0092 
0093         sdio_pwrseq: sdio-pwrseq {
0094                 compatible = "mmc-pwrseq-simple";
0095                 reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
0096                 clocks = <&wifi32k>;
0097                 clock-names = "ext_clock";
0098         };
0099 
0100         cvbs-connector {
0101                 compatible = "composite-video-connector";
0102 
0103                 port {
0104                         cvbs_connector_in: endpoint {
0105                                 remote-endpoint = <&cvbs_vdac_out>;
0106                         };
0107                 };
0108         };
0109 
0110         hdmi-connector {
0111                 compatible = "hdmi-connector";
0112                 type = "a";
0113 
0114                 port {
0115                         hdmi_connector_in: endpoint {
0116                                 remote-endpoint = <&hdmi_tx_tmds_out>;
0117                         };
0118                 };
0119         };
0120 };
0121 
0122 &cec_AO {
0123         status = "okay";
0124         pinctrl-0 = <&ao_cec_pins>;
0125         pinctrl-names = "default";
0126         hdmi-phandle = <&hdmi_tx>;
0127 };
0128 
0129 &cvbs_vdac_port {
0130         cvbs_vdac_out: endpoint {
0131                 remote-endpoint = <&cvbs_connector_in>;
0132         };
0133 };
0134 
0135 &ethmac {
0136         status = "okay";
0137         pinctrl-0 = <&eth_rgmii_pins>;
0138         pinctrl-names = "default";
0139 
0140         phy-handle = <&eth_phy0>;
0141         phy-mode = "rgmii";
0142 
0143         amlogic,tx-delay-ns = <2>;
0144 
0145         mdio {
0146                 compatible = "snps,dwmac-mdio";
0147                 #address-cells = <1>;
0148                 #size-cells = <0>;
0149 
0150                 eth_phy0: ethernet-phy@0 {
0151                         /* Realtek RTL8211F (0x001cc916) */
0152                         reg = <0>;
0153 
0154                         reset-assert-us = <10000>;
0155                         reset-deassert-us = <80000>;
0156                         reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
0157 
0158                         interrupt-parent = <&gpio_intc>;
0159                         /* MAC_INTR on GPIOZ_15 */
0160                         interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
0161                 };
0162         };
0163 };
0164 
0165 &hdmi_tx {
0166         status = "okay";
0167         pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
0168         pinctrl-names = "default";
0169         hdmi-supply = <&vddio_ao18>;
0170 };
0171 
0172 &hdmi_tx_tmds_port {
0173         hdmi_tx_tmds_out: endpoint {
0174                 remote-endpoint = <&hdmi_connector_in>;
0175         };
0176 };
0177 
0178 &ir {
0179         status = "okay";
0180         pinctrl-0 = <&remote_input_ao_pins>;
0181         pinctrl-names = "default";
0182 };
0183 
0184 &pwm_ef {
0185         status = "okay";
0186         pinctrl-0 = <&pwm_e_pins>;
0187         pinctrl-names = "default";
0188         clocks = <&clkc CLKID_FCLK_DIV4>;
0189         clock-names = "clkin0";
0190 };
0191 
0192 &saradc {
0193         status = "okay";
0194         vref-supply = <&vddio_ao18>;
0195 };
0196 
0197 /* Wireless SDIO Module */
0198 &sd_emmc_a {
0199         status = "okay";
0200         pinctrl-0 = <&sdio_pins>;
0201         pinctrl-1 = <&sdio_clk_gate_pins>;
0202         pinctrl-names = "default", "clk-gate";
0203         #address-cells = <1>;
0204         #size-cells = <0>;
0205 
0206         bus-width = <4>;
0207         cap-sd-highspeed;
0208         max-frequency = <50000000>;
0209 
0210         non-removable;
0211         disable-wp;
0212 
0213         /* WiFi firmware requires power to be kept while in suspend */
0214         keep-power-in-suspend;
0215 
0216         mmc-pwrseq = <&sdio_pwrseq>;
0217 
0218         vmmc-supply = <&vddao_3v3>;
0219         vqmmc-supply = <&vddio_boot>;
0220 
0221         brcmf: wifi@1 {
0222                 reg = <1>;
0223                 compatible = "brcm,bcm4329-fmac";
0224         };
0225 };
0226 
0227 /* SD card */
0228 &sd_emmc_b {
0229         status = "okay";
0230         pinctrl-0 = <&sdcard_pins>;
0231         pinctrl-1 = <&sdcard_clk_gate_pins>;
0232         pinctrl-names = "default", "clk-gate";
0233 
0234         bus-width = <4>;
0235         cap-sd-highspeed;
0236         max-frequency = <50000000>;
0237         disable-wp;
0238 
0239         cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
0240 
0241         vmmc-supply = <&vddao_3v3>;
0242         vqmmc-supply = <&vcc_3v3>;
0243 };
0244 
0245 /* eMMC */
0246 &sd_emmc_c {
0247         status = "okay";
0248         pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
0249         pinctrl-1 = <&emmc_clk_gate_pins>;
0250         pinctrl-names = "default", "clk-gate";
0251 
0252         bus-width = <8>;
0253         cap-mmc-highspeed;
0254         max-frequency = <200000000>;
0255         non-removable;
0256         disable-wp;
0257         mmc-ddr-1_8v;
0258         mmc-hs200-1_8v;
0259 
0260         mmc-pwrseq = <&emmc_pwrseq>;
0261         vmmc-supply = <&vcc_3v3>;
0262         vqmmc-supply = <&vddio_boot>;
0263 };
0264 
0265 /* This is connected to the Bluetooth module: */
0266 &uart_A {
0267         status = "okay";
0268         pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
0269         pinctrl-names = "default";
0270         uart-has-rtscts;
0271 
0272         bluetooth {
0273                 compatible = "brcm,bcm43438-bt";
0274                 shutdown-gpios = <&gpio GPIOX_20 GPIO_ACTIVE_HIGH>;
0275         };
0276 };
0277 
0278 /* This UART is brought out to the DB9 connector */
0279 &uart_AO {
0280         status = "okay";
0281         pinctrl-0 = <&uart_ao_a_pins>;
0282         pinctrl-names = "default";
0283 };
0284 
0285 &usb0_phy {
0286         status = "okay";
0287         phy-supply = <&usb_pwr>;
0288 };
0289 
0290 &usb0 {
0291         status = "okay";
0292 };