0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * Device Tree Source for Kamstrup OMNIA Flex Concentrator.
0004 *
0005 * Copyright (C) 2020 Kamstrup A/S
0006 * Author: Bruno Thomsen <bruno.thomsen@gmail.com>
0007 */
0008
0009 /dts-v1/;
0010
0011 #include "imx7d-tqma7.dtsi"
0012
0013 /* One I2C device on TQMa7 SoM is not mounted */
0014 /delete-node/ &ds1339;
0015
0016 / {
0017 model = "Kamstrup OMNIA Flex Concentrator";
0018 compatible = "kam,imx7d-flex-concentrator", "fsl,imx7d";
0019
0020 memory@80000000 {
0021 device_type = "memory";
0022 /* 1024 MB - TQMa7D board configuration */
0023 reg = <0x80000000 0x40000000>;
0024 };
0025
0026 reg_usb_otg2_vbus: regulator-usb-otg2-vbus {
0027 compatible = "regulator-fixed";
0028 regulator-name = "VBUS_USBOTG2";
0029 regulator-min-microvolt = <5000000>;
0030 regulator-max-microvolt = <5000000>;
0031 gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
0032 enable-active-high;
0033 };
0034
0035 reg_vref_1v8: regulator-vref-1v8 {
0036 compatible = "regulator-fixed";
0037 regulator-name = "VCC1V8_REF";
0038 regulator-min-microvolt = <1800000>;
0039 regulator-max-microvolt = <1800000>;
0040 regulator-always-on;
0041 vin-supply = <&sw2_reg>;
0042 };
0043
0044 /*
0045 * Human Machine Interface consists of 4 dual red/green LEDs.
0046 * hmi-a:green is controlled directly by the switch-mode power supply.
0047 * hmi-a:red is not used.
0048 */
0049 gpio-leds {
0050 compatible = "gpio-leds";
0051 pinctrl-names = "default";
0052 pinctrl-0 = <&pinctrl_leds>;
0053
0054 led-0 {
0055 label = "hmi-b:red:heartbeat-degraded";
0056 gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>;
0057 };
0058
0059 led-1 {
0060 label = "hmi-b:green:heartbeat-running";
0061 gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>;
0062 linux,default-trigger = "heartbeat";
0063 };
0064
0065 led-2 {
0066 label = "hmi-c:red:mesh-error";
0067 gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>;
0068 };
0069
0070 led-3 {
0071 label = "hmi-c:green:mesh-activity";
0072 gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
0073 };
0074
0075 led-4 {
0076 label = "hmi-d:red:omnia-error";
0077 gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>;
0078 };
0079
0080 led-5 {
0081 label = "hmi-d:green:omnia-activity";
0082 gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
0083 };
0084 };
0085
0086 /*
0087 * Errata e10574 board restart workaround.
0088 */
0089 gpio-restart {
0090 pinctrl-names = "default";
0091 pinctrl-0 = <&pinctrl_restart>;
0092 compatible = "gpio-restart";
0093 gpios = <&gpio7 12 GPIO_ACTIVE_LOW>;
0094 priority = <200>;
0095 };
0096 };
0097
0098 /*
0099 * Analog signals
0100 * ADC1_IN0: SMPS - 5V output monitor (voltage divider: 1/0.2806)
0101 */
0102 &adc1 {
0103 vref-supply = <®_vref_1v8>;
0104 status = "okay";
0105 };
0106
0107 &ecspi2 {
0108 pinctrl-names = "default";
0109 pinctrl-0 = <&pinctrl_ecspi2>;
0110 num-chipselects = <1>;
0111 cs-gpios = <&gpio4 23 GPIO_ACTIVE_LOW>;
0112 status = "okay";
0113
0114 pcf2127: rtc@0 {
0115 compatible = "nxp,pcf2127";
0116 reg = <0>;
0117 spi-max-frequency = <2000000>;
0118 reset-source;
0119 };
0120 };
0121
0122 &ecspi4 {
0123 pinctrl-names = "default";
0124 pinctrl-0 = <&pinctrl_ecspi4>;
0125 num-chipselects = <1>;
0126 cs-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>;
0127 status = "okay";
0128
0129 /*
0130 * ST chip maximum SPI clock frequency is 33 MHz.
0131 *
0132 * TCG specification - Section 6.4.1 Clocking:
0133 * TPM shall support a SPI clock frequency range of 10-24 MHz.
0134 */
0135 st33htph: tpm-tis@0 {
0136 compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi";
0137 reg = <0>;
0138 spi-max-frequency = <24000000>;
0139 };
0140 };
0141
0142 &fec1 {
0143 pinctrl-names = "default";
0144 pinctrl-0 = <&pinctrl_enet1>;
0145 phy-mode = "rmii";
0146 phy-handle = <ðphy>;
0147 status = "okay";
0148
0149 /*
0150 * MDIO bus reset is used to generate PHY device reset before
0151 * Ethernet PHY type ID auto-detection. Otherwise this communication
0152 * fails as device does not answer when recommended reset circuit
0153 * is used.
0154 */
0155 mdio {
0156 #address-cells = <1>;
0157 #size-cells = <0>;
0158
0159 reset-delay-us = <100000>;
0160 reset-post-delay-us = <500000>;
0161 reset-gpios = <&gpio7 15 GPIO_ACTIVE_LOW>;
0162
0163 /* Microchip/Micrel KSZ8081RNB */
0164 ethphy: ethernet-phy@1 {
0165 compatible = "ethernet-phy-ieee802.3-c22";
0166 interrupt-parent = <&gpio1>;
0167 interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
0168 reg = <1>;
0169 };
0170 };
0171 };
0172
0173 /*
0174 * Detection signals for internal USB modules.
0175 * Used for robust USB plug and play handling such as USB downstream port
0176 * power-cycle and USB hub reset in case of misbehaving or crashed modules.
0177 *
0178 * SMPS - AC input monitor based on zero crossing.
0179 * Used for last gasp notification.
0180 */
0181 &gpio3 {
0182 gpio-line-names = "", "", "", "", "", "", "", "",
0183 "", "", "", "", "smps-ac-monitor", "", "usb-hub-reset", "",
0184 "", "", "", "", "", "", "", "",
0185 "", "module-b-detection", "", "module-a-detection", "", "", "", "";
0186 };
0187
0188 /*
0189 * Tamper IRQ trigger timestamp reading.
0190 * Used for sealed cover opened/closed notification.
0191 */
0192 &gpio5 {
0193 gpio-line-names = "", "", "", "", "", "", "", "",
0194 "", "", "", "", "rtc-tamper-irq", "", "", "",
0195 "", "", "", "", "", "", "", "",
0196 "", "", "", "", "", "", "", "";
0197 };
0198
0199 &iomuxc {
0200 pinctrl-names = "default";
0201 pinctrl-0 = <&pinctrl_misc>;
0202
0203 pinctrl_ecspi2: ecspi2grp {
0204 fsl,pins = <
0205 MX7D_PAD_ECSPI2_MISO__ECSPI2_MISO 0x7c /* X2-15 */
0206 MX7D_PAD_ECSPI2_MOSI__ECSPI2_MOSI 0x74 /* X2-18 */
0207 MX7D_PAD_ECSPI2_SCLK__ECSPI2_SCLK 0x74 /* X2-13 */
0208 MX7D_PAD_ECSPI2_SS0__GPIO4_IO23 0x74 /* X2-20 */
0209 /* RTC - Tamper IRQ */
0210 MX7D_PAD_SD2_CLK__GPIO5_IO12 0x3c /* X1-92 */
0211 >;
0212 };
0213
0214 pinctrl_ecspi4: ecspi4grp {
0215 fsl,pins = <
0216 MX7D_PAD_LCD_CLK__ECSPI4_MISO 0x7c /* X2-72 */
0217 MX7D_PAD_LCD_ENABLE__ECSPI4_MOSI 0x74 /* X2-68 */
0218 MX7D_PAD_LCD_HSYNC__ECSPI4_SCLK 0x74 /* X2-76 */
0219 MX7D_PAD_LCD_VSYNC__GPIO3_IO3 0x74 /* X2-78 */
0220 >;
0221 };
0222
0223 pinctrl_enet1: enet1grp {
0224 fsl,pins = <
0225 MX7D_PAD_GPIO1_IO10__ENET1_MDIO 0x03 /* X2-48 */
0226 MX7D_PAD_GPIO1_IO11__ENET1_MDC 0x03 /* X2-46 */
0227 MX7D_PAD_ENET1_RGMII_TD0__ENET1_RGMII_TD0 0x71 /* X2-53 */
0228 MX7D_PAD_ENET1_RGMII_TD1__ENET1_RGMII_TD1 0x71 /* X2-55 */
0229 MX7D_PAD_ENET1_RGMII_TX_CTL__ENET1_RGMII_TX_CTL 0x71 /* X2-61 */
0230 MX7D_PAD_ENET1_RGMII_RD0__ENET1_RGMII_RD0 0x79 /* X2-56 */
0231 MX7D_PAD_ENET1_RGMII_RD1__ENET1_RGMII_RD1 0x79 /* X2-58 */
0232 MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL 0x79 /* X2-64 */
0233 MX7D_PAD_ENET1_RGMII_RXC__ENET1_RX_ER 0x73 /* X2-52 */
0234 /* PHY reset: SRE_FAST, DSE_X1 */
0235 MX7D_PAD_ENET1_COL__GPIO7_IO15 0x00 /* X1-96 */
0236 /* Clock from PHY to MAC: 100kPU */
0237 MX7D_PAD_GPIO1_IO12__CCM_ENET_REF_CLK1 0x70 /* X3-4 */
0238 /* PHY interrupt: 100kPU, HYS */
0239 MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x78 /* X1-80 */
0240 >;
0241 };
0242
0243 pinctrl_leds: ledsgrp {
0244 fsl,pins = <
0245 MX7D_PAD_LCD_DATA01__GPIO3_IO6 0x14 /* X2-82 */
0246 MX7D_PAD_EPDC_BDR0__GPIO2_IO28 0x14 /* X1-82 */
0247 MX7D_PAD_EPDC_BDR1__GPIO2_IO29 0x14 /* X1-84 */
0248 MX7D_PAD_EPDC_PWR_COM__GPIO2_IO30 0x14 /* X1-86 */
0249 MX7D_PAD_EPDC_PWR_STAT__GPIO2_IO31 0x14 /* X1-88 */
0250 MX7D_PAD_UART2_TX_DATA__GPIO4_IO3 0x14 /* X1-90 */
0251 >;
0252 };
0253
0254 pinctrl_misc: miscgrp {
0255 fsl,pins = <
0256 /* Module A detection (low = present) */
0257 MX7D_PAD_LCD_DATA22__GPIO3_IO27 0x7c /* X2-105 */
0258 /* Module B detection (low = present) */
0259 MX7D_PAD_LCD_DATA20__GPIO3_IO25 0x7c /* X2-103 */
0260 /* SMPS - AC input monitor (high = failure) */
0261 MX7D_PAD_LCD_DATA07__GPIO3_IO12 0x7c /* X2-88 */
0262 /* USB - Hub reset */
0263 MX7D_PAD_LCD_DATA09__GPIO3_IO14 0x74 /* X2-92 */
0264 >;
0265 };
0266
0267 pinctrl_restart: restartgrp {
0268 fsl,pins = <
0269 MX7D_PAD_ENET1_TX_CLK__GPIO7_IO12 0x74 /* X1-94 */
0270 >;
0271 };
0272
0273 pinctrl_uart4: uart4grp {
0274 fsl,pins = <
0275 MX7D_PAD_SAI2_TX_SYNC__UART4_DCE_RX 0x7e /* X3-14 */
0276 MX7D_PAD_SAI2_TX_BCLK__UART4_DCE_TX 0x76 /* X3-16 */
0277 >;
0278 };
0279 };
0280
0281 &iomuxc_lpsr {
0282 pinctrl_usbotg2: usbotg2grp {
0283 fsl,pins = <
0284 MX7D_PAD_LPSR_GPIO1_IO06__USB_OTG2_OC 0x5c /* X3-11 */
0285 MX7D_PAD_LPSR_GPIO1_IO07__GPIO1_IO7 0x59 /* X3-9 */
0286 >;
0287 };
0288
0289 };
0290
0291 &uart4 {
0292 pinctrl-names = "default";
0293 pinctrl-0 = <&pinctrl_uart4>;
0294 assigned-clocks = <&clks IMX7D_UART4_ROOT_SRC>;
0295 assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>;
0296 };
0297
0298 &usbotg2 {
0299 pinctrl-names = "default";
0300 pinctrl-0 = <&pinctrl_usbotg2>;
0301 vbus-supply = <®_usb_otg2_vbus>;
0302 srp-disable;
0303 hnp-disable;
0304 adp-disable;
0305 over-current-active-low;
0306 dr_mode = "host";
0307 status = "okay";
0308 };
0309
0310 /*
0311 * External watchdog feature provided by pcf2127.
0312 */
0313 &wdog1 {
0314 status = "disabled";
0315 };