0001 /*
0002 * Copyright (C) 2013,2014 Russell King
0003 *
0004 * This file is dual-licensed: you can use it either under the terms
0005 * of the GPL or the X11 license, at your option. Note that this dual
0006 * licensing only applies to this file, and not this project as a
0007 * whole.
0008 *
0009 * a) This file is free software; you can redistribute it and/or
0010 * modify it under the terms of the GNU General Public License
0011 * version 2 as published by the Free Software Foundation.
0012 *
0013 * This file is distributed in the hope that it will be useful,
0014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0016 * GNU General Public License for more details.
0017 *
0018 * Or, alternatively,
0019 *
0020 * b) Permission is hereby granted, free of charge, to any person
0021 * obtaining a copy of this software and associated documentation
0022 * files (the "Software"), to deal in the Software without
0023 * restriction, including without limitation the rights to use,
0024 * copy, modify, merge, publish, distribute, sublicense, and/or
0025 * sell copies of the Software, and to permit persons to whom the
0026 * Software is furnished to do so, subject to the following
0027 * conditions:
0028 *
0029 * The above copyright notice and this permission notice shall be
0030 * included in all copies or substantial portions of the Software.
0031 *
0032 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
0033 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
0034 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
0035 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
0036 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
0037 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0038 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0039 * OTHER DEALINGS IN THE SOFTWARE.
0040 */
0041 #include <dt-bindings/gpio/gpio.h>
0042
0043 / {
0044 nvcc_sd1: regulator-nvcc-sd1 {
0045 compatible = "regulator-fixed";
0046 regulator-always-on;
0047 regulator-name = "nvcc_sd1";
0048 regulator-min-microvolt = <1800000>;
0049 regulator-max-microvolt = <1800000>;
0050 vin-supply = <&vcc_3v3>;
0051 };
0052
0053 clk_ti_wifi: ti-wifi-clock {
0054 /* This is a hack around the kernel - using "fixed clock"
0055 * results in the "pinctrl" properties being ignored, and
0056 * the clock not being output. Instead, use a gated clock
0057 * and the unrouted WL_XTAL_PU gpio.
0058 */
0059 compatible = "gpio-gate-clock";
0060 #clock-cells = <0>;
0061 clock-frequency = <32768>;
0062 pinctrl-names = "default";
0063 pinctrl-0 = <&pinctrl_microsom_ti_clk>;
0064 enable-gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>;
0065 };
0066
0067 pwrseq_ti_wifi: ti-wifi-pwrseq {
0068 compatible = "mmc-pwrseq-simple";
0069 pinctrl-names = "default";
0070 pinctrl-0 = <&pinctrl_microsom_ti_wifi_en>;
0071 reset-gpios = <&gpio5 26 GPIO_ACTIVE_LOW>;
0072 post-power-on-delay-ms = <200>;
0073 clocks = <&clk_ti_wifi>;
0074 clock-names = "ext_clock";
0075 };
0076 };
0077
0078 &iomuxc {
0079 microsom {
0080 pinctrl_microsom_ti_bt: microsom-ti-bt {
0081 fsl,pins = <
0082 /* BT_EN_SOC */
0083 MX6QDL_PAD_CSI0_DAT14__GPIO6_IO00 0x40013070
0084 >;
0085 };
0086
0087 pinctrl_microsom_ti_clk: microsom-ti-clk {
0088 fsl,pins = <
0089 /* EXT_32K */
0090 MX6QDL_PAD_GPIO_8__XTALOSC_REF_CLK_32K 0x1b0b0
0091 /* WL_XTAL_PU (unrouted) */
0092 MX6QDL_PAD_DISP0_DAT11__GPIO5_IO05 0x40013070
0093 >;
0094 };
0095
0096 pinctrl_microsom_ti_wifi_en: microsom-ti-wifi-en {
0097 fsl,pins = <
0098 /* WLAN_EN_SOC */
0099 MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26 0x40013070
0100 >;
0101 };
0102
0103 pinctrl_microsom_ti_wifi_irq: microsom-ti-wifi-irq {
0104 fsl,pins = <
0105 /* WLAN_IRQ */
0106 MX6QDL_PAD_CSI0_DAT18__GPIO6_IO04 0x40013070
0107 >;
0108 };
0109
0110 pinctrl_microsom_uart4: microsom-uart4 {
0111 fsl,pins = <
0112 MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA 0x1b0b1
0113 MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA 0x1b0b1
0114 MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B 0x1b0b1
0115 MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B 0x1b0b1
0116 >;
0117 };
0118
0119 pinctrl_microsom_usdhc1: microsom-usdhc1 {
0120 fsl,pins = <
0121 MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059
0122 MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059
0123 MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059
0124 MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059
0125 MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059
0126 MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059
0127 >;
0128 };
0129 };
0130 };
0131
0132 /* UART4 - Connected to optional TI Wi-Fi/BT/FM */
0133 &uart4 {
0134 pinctrl-names = "default";
0135 pinctrl-0 = <&pinctrl_microsom_uart4>;
0136 uart-has-rtscts;
0137 status = "okay";
0138
0139 bluetooth {
0140 compatible = "ti,wl1837-st";
0141 clocks = <&clk_ti_wifi>;
0142 clock-names = "ext_clock";
0143 enable-gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>;
0144 pinctrl-names = "default";
0145 pinctrl-0 = <&pinctrl_microsom_ti_bt>;
0146 };
0147 };
0148
0149 /* USDHC1 - Connected to optional TI Wi-Fi/BT/FM */
0150 &usdhc1 {
0151 pinctrl-names = "default";
0152 pinctrl-0 = <&pinctrl_microsom_usdhc1>;
0153 bus-width = <4>;
0154 keep-power-in-suspend;
0155 mmc-pwrseq = <&pwrseq_ti_wifi>;
0156 cap-power-off-card;
0157 non-removable;
0158 vmmc-supply = <&vcc_3v3>;
0159 /* vqmmc-supply = <&nvcc_sd1>; - MMC layer doesn't like it! */
0160 status = "okay";
0161 #address-cells = <1>;
0162 #size-cells = <0>;
0163
0164 wlcore@2 {
0165 compatible = "ti,wl1837";
0166 reg = <2>;
0167 interrupts-extended = <&gpio6 4 IRQ_TYPE_LEVEL_HIGH>;
0168 pinctrl-names = "default";
0169 pinctrl-0 = <&pinctrl_microsom_ti_wifi_irq>;
0170 };
0171 };