1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Device Tree Source for Kamstrup OMNIA Flex Concentrator. 4f126890aSEmmanuel Vadot * 5f126890aSEmmanuel Vadot * Copyright (C) 2020 Kamstrup A/S 6f126890aSEmmanuel Vadot * Author: Bruno Thomsen <bruno.thomsen@gmail.com> 7f126890aSEmmanuel Vadot */ 8f126890aSEmmanuel Vadot 9f126890aSEmmanuel Vadot/dts-v1/; 10f126890aSEmmanuel Vadot 11f126890aSEmmanuel Vadot#include "imx7d-tqma7.dtsi" 12f126890aSEmmanuel Vadot 13f126890aSEmmanuel Vadot/* One I2C device on TQMa7 SoM is not mounted */ 14f126890aSEmmanuel Vadot/delete-node/ &ds1339; 15f126890aSEmmanuel Vadot 16f126890aSEmmanuel Vadot/ { 17f126890aSEmmanuel Vadot model = "Kamstrup OMNIA Flex Concentrator"; 18f126890aSEmmanuel Vadot compatible = "kam,imx7d-flex-concentrator", "fsl,imx7d"; 19f126890aSEmmanuel Vadot 20f126890aSEmmanuel Vadot memory@80000000 { 21f126890aSEmmanuel Vadot device_type = "memory"; 22f126890aSEmmanuel Vadot /* 1024 MB - TQMa7D board configuration */ 23f126890aSEmmanuel Vadot reg = <0x80000000 0x40000000>; 24f126890aSEmmanuel Vadot }; 25f126890aSEmmanuel Vadot 26f126890aSEmmanuel Vadot reg_usb_otg2_vbus: regulator-usb-otg2-vbus { 27f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 28f126890aSEmmanuel Vadot regulator-name = "VBUS_USBOTG2"; 29f126890aSEmmanuel Vadot regulator-min-microvolt = <5000000>; 30f126890aSEmmanuel Vadot regulator-max-microvolt = <5000000>; 31f126890aSEmmanuel Vadot gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>; 32f126890aSEmmanuel Vadot enable-active-high; 33f126890aSEmmanuel Vadot }; 34f126890aSEmmanuel Vadot 35f126890aSEmmanuel Vadot reg_vref_1v8: regulator-vref-1v8 { 36f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 37f126890aSEmmanuel Vadot regulator-name = "VCC1V8_REF"; 38f126890aSEmmanuel Vadot regulator-min-microvolt = <1800000>; 39f126890aSEmmanuel Vadot regulator-max-microvolt = <1800000>; 40f126890aSEmmanuel Vadot regulator-always-on; 41f126890aSEmmanuel Vadot vin-supply = <&sw2_reg>; 42f126890aSEmmanuel Vadot }; 43f126890aSEmmanuel Vadot 44f126890aSEmmanuel Vadot /* 45f126890aSEmmanuel Vadot * Human Machine Interface consists of 4 dual red/green LEDs. 46f126890aSEmmanuel Vadot * hmi-a:green is controlled directly by the switch-mode power supply. 47f126890aSEmmanuel Vadot * hmi-a:red is not used. 48f126890aSEmmanuel Vadot */ 49f126890aSEmmanuel Vadot gpio-leds { 50f126890aSEmmanuel Vadot compatible = "gpio-leds"; 51f126890aSEmmanuel Vadot pinctrl-names = "default"; 52f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_leds>; 53f126890aSEmmanuel Vadot 54f126890aSEmmanuel Vadot led-0 { 55f126890aSEmmanuel Vadot label = "hmi-b:red:heartbeat-degraded"; 56f126890aSEmmanuel Vadot gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>; 57f126890aSEmmanuel Vadot }; 58f126890aSEmmanuel Vadot 59f126890aSEmmanuel Vadot led-1 { 60f126890aSEmmanuel Vadot label = "hmi-b:green:heartbeat-running"; 61f126890aSEmmanuel Vadot gpios = <&gpio2 28 GPIO_ACTIVE_HIGH>; 62f126890aSEmmanuel Vadot linux,default-trigger = "heartbeat"; 63f126890aSEmmanuel Vadot }; 64f126890aSEmmanuel Vadot 65f126890aSEmmanuel Vadot led-2 { 66f126890aSEmmanuel Vadot label = "hmi-c:red:mesh-error"; 67f126890aSEmmanuel Vadot gpios = <&gpio2 29 GPIO_ACTIVE_HIGH>; 68f126890aSEmmanuel Vadot }; 69f126890aSEmmanuel Vadot 70f126890aSEmmanuel Vadot led-3 { 71f126890aSEmmanuel Vadot label = "hmi-c:green:mesh-activity"; 72f126890aSEmmanuel Vadot gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>; 73f126890aSEmmanuel Vadot }; 74f126890aSEmmanuel Vadot 75f126890aSEmmanuel Vadot led-4 { 76f126890aSEmmanuel Vadot label = "hmi-d:red:omnia-error"; 77f126890aSEmmanuel Vadot gpios = <&gpio2 31 GPIO_ACTIVE_HIGH>; 78f126890aSEmmanuel Vadot }; 79f126890aSEmmanuel Vadot 80f126890aSEmmanuel Vadot led-5 { 81f126890aSEmmanuel Vadot label = "hmi-d:green:omnia-activity"; 82f126890aSEmmanuel Vadot gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>; 83f126890aSEmmanuel Vadot }; 84f126890aSEmmanuel Vadot }; 85f126890aSEmmanuel Vadot 86f126890aSEmmanuel Vadot /* 87f126890aSEmmanuel Vadot * Errata e10574 board restart workaround. 88f126890aSEmmanuel Vadot */ 89f126890aSEmmanuel Vadot gpio-restart { 90f126890aSEmmanuel Vadot pinctrl-names = "default"; 91f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_restart>; 92f126890aSEmmanuel Vadot compatible = "gpio-restart"; 93f126890aSEmmanuel Vadot gpios = <&gpio7 12 GPIO_ACTIVE_LOW>; 94f126890aSEmmanuel Vadot priority = <200>; 95f126890aSEmmanuel Vadot }; 96f126890aSEmmanuel Vadot}; 97f126890aSEmmanuel Vadot 98f126890aSEmmanuel Vadot/* 99f126890aSEmmanuel Vadot * Analog signals 100f126890aSEmmanuel Vadot * ADC1_IN0: SMPS - 5V output monitor (voltage divider: 1/0.2806) 101f126890aSEmmanuel Vadot */ 102f126890aSEmmanuel Vadot&adc1 { 103f126890aSEmmanuel Vadot vref-supply = <®_vref_1v8>; 104f126890aSEmmanuel Vadot status = "okay"; 105f126890aSEmmanuel Vadot}; 106f126890aSEmmanuel Vadot 107f126890aSEmmanuel Vadot&ecspi2 { 108f126890aSEmmanuel Vadot pinctrl-names = "default"; 109f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_ecspi2>; 110f126890aSEmmanuel Vadot cs-gpios = <&gpio4 23 GPIO_ACTIVE_LOW>; 111f126890aSEmmanuel Vadot status = "okay"; 112f126890aSEmmanuel Vadot 113f126890aSEmmanuel Vadot pcf2127: rtc@0 { 114f126890aSEmmanuel Vadot compatible = "nxp,pcf2127"; 115f126890aSEmmanuel Vadot reg = <0>; 116f126890aSEmmanuel Vadot spi-max-frequency = <2000000>; 117f126890aSEmmanuel Vadot reset-source; 118f126890aSEmmanuel Vadot }; 119f126890aSEmmanuel Vadot}; 120f126890aSEmmanuel Vadot 121f126890aSEmmanuel Vadot&ecspi4 { 122f126890aSEmmanuel Vadot pinctrl-names = "default"; 123f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_ecspi4>; 124f126890aSEmmanuel Vadot cs-gpios = <&gpio3 3 GPIO_ACTIVE_LOW>; 125f126890aSEmmanuel Vadot status = "okay"; 126f126890aSEmmanuel Vadot 127f126890aSEmmanuel Vadot /* 128f126890aSEmmanuel Vadot * ST chip maximum SPI clock frequency is 33 MHz. 129f126890aSEmmanuel Vadot * 130f126890aSEmmanuel Vadot * TCG specification - Section 6.4.1 Clocking: 131f126890aSEmmanuel Vadot * TPM shall support a SPI clock frequency range of 10-24 MHz. 132f126890aSEmmanuel Vadot */ 133*8d13bc63SEmmanuel Vadot st33htph: tpm@0 { 134f126890aSEmmanuel Vadot compatible = "st,st33htpm-spi", "tcg,tpm_tis-spi"; 135f126890aSEmmanuel Vadot reg = <0>; 136f126890aSEmmanuel Vadot spi-max-frequency = <24000000>; 137f126890aSEmmanuel Vadot }; 138f126890aSEmmanuel Vadot}; 139f126890aSEmmanuel Vadot 140f126890aSEmmanuel Vadot&fec1 { 141f126890aSEmmanuel Vadot pinctrl-names = "default"; 142f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_enet1>; 143f126890aSEmmanuel Vadot phy-mode = "rmii"; 144f126890aSEmmanuel Vadot phy-handle = <ðphy>; 145f126890aSEmmanuel Vadot status = "okay"; 146f126890aSEmmanuel Vadot 147f126890aSEmmanuel Vadot /* 148f126890aSEmmanuel Vadot * MDIO bus reset is used to generate PHY device reset before 149f126890aSEmmanuel Vadot * Ethernet PHY type ID auto-detection. Otherwise this communication 150f126890aSEmmanuel Vadot * fails as device does not answer when recommended reset circuit 151f126890aSEmmanuel Vadot * is used. 152f126890aSEmmanuel Vadot */ 153f126890aSEmmanuel Vadot mdio { 154f126890aSEmmanuel Vadot #address-cells = <1>; 155f126890aSEmmanuel Vadot #size-cells = <0>; 156f126890aSEmmanuel Vadot 157f126890aSEmmanuel Vadot reset-delay-us = <100000>; 158f126890aSEmmanuel Vadot reset-post-delay-us = <500000>; 159f126890aSEmmanuel Vadot reset-gpios = <&gpio7 15 GPIO_ACTIVE_LOW>; 160f126890aSEmmanuel Vadot 161f126890aSEmmanuel Vadot /* Microchip/Micrel KSZ8081RNB */ 162f126890aSEmmanuel Vadot ethphy: ethernet-phy@1 { 163f126890aSEmmanuel Vadot compatible = "ethernet-phy-ieee802.3-c22"; 164f126890aSEmmanuel Vadot interrupt-parent = <&gpio1>; 165f126890aSEmmanuel Vadot interrupts = <9 IRQ_TYPE_LEVEL_LOW>; 166f126890aSEmmanuel Vadot reg = <1>; 167f126890aSEmmanuel Vadot }; 168f126890aSEmmanuel Vadot }; 169f126890aSEmmanuel Vadot}; 170f126890aSEmmanuel Vadot 171f126890aSEmmanuel Vadot/* 172f126890aSEmmanuel Vadot * Detection signals for internal USB modules. 173f126890aSEmmanuel Vadot * Used for robust USB plug and play handling such as USB downstream port 174f126890aSEmmanuel Vadot * power-cycle and USB hub reset in case of misbehaving or crashed modules. 175f126890aSEmmanuel Vadot * 176f126890aSEmmanuel Vadot * SMPS - AC input monitor based on zero crossing. 177f126890aSEmmanuel Vadot * Used for last gasp notification. 178f126890aSEmmanuel Vadot */ 179f126890aSEmmanuel Vadot&gpio3 { 180f126890aSEmmanuel Vadot gpio-line-names = "", "", "", "", "", "", "", "", 181f126890aSEmmanuel Vadot "", "", "", "", "smps-ac-monitor", "", "usb-hub-reset", "", 182f126890aSEmmanuel Vadot "", "", "", "", "", "", "", "", 183f126890aSEmmanuel Vadot "", "module-b-detection", "", "module-a-detection", "", "", "", ""; 184f126890aSEmmanuel Vadot}; 185f126890aSEmmanuel Vadot 186f126890aSEmmanuel Vadot/* 187f126890aSEmmanuel Vadot * Tamper IRQ trigger timestamp reading. 188f126890aSEmmanuel Vadot * Used for sealed cover opened/closed notification. 189f126890aSEmmanuel Vadot */ 190f126890aSEmmanuel Vadot&gpio5 { 191f126890aSEmmanuel Vadot gpio-line-names = "", "", "", "", "", "", "", "", 192f126890aSEmmanuel Vadot "", "", "", "", "rtc-tamper-irq", "", "", "", 193f126890aSEmmanuel Vadot "", "", "", "", "", "", "", "", 194f126890aSEmmanuel Vadot "", "", "", "", "", "", "", ""; 195f126890aSEmmanuel Vadot}; 196f126890aSEmmanuel Vadot 197f126890aSEmmanuel Vadot&iomuxc { 198f126890aSEmmanuel Vadot pinctrl-names = "default"; 199f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_misc>; 200f126890aSEmmanuel Vadot 201f126890aSEmmanuel Vadot pinctrl_ecspi2: ecspi2grp { 202f126890aSEmmanuel Vadot fsl,pins = < 203f126890aSEmmanuel Vadot MX7D_PAD_ECSPI2_MISO__ECSPI2_MISO 0x7c /* X2-15 */ 204f126890aSEmmanuel Vadot MX7D_PAD_ECSPI2_MOSI__ECSPI2_MOSI 0x74 /* X2-18 */ 205f126890aSEmmanuel Vadot MX7D_PAD_ECSPI2_SCLK__ECSPI2_SCLK 0x74 /* X2-13 */ 206f126890aSEmmanuel Vadot MX7D_PAD_ECSPI2_SS0__GPIO4_IO23 0x74 /* X2-20 */ 207f126890aSEmmanuel Vadot /* RTC - Tamper IRQ */ 208f126890aSEmmanuel Vadot MX7D_PAD_SD2_CLK__GPIO5_IO12 0x3c /* X1-92 */ 209f126890aSEmmanuel Vadot >; 210f126890aSEmmanuel Vadot }; 211f126890aSEmmanuel Vadot 212f126890aSEmmanuel Vadot pinctrl_ecspi4: ecspi4grp { 213f126890aSEmmanuel Vadot fsl,pins = < 214f126890aSEmmanuel Vadot MX7D_PAD_LCD_CLK__ECSPI4_MISO 0x7c /* X2-72 */ 215f126890aSEmmanuel Vadot MX7D_PAD_LCD_ENABLE__ECSPI4_MOSI 0x74 /* X2-68 */ 216f126890aSEmmanuel Vadot MX7D_PAD_LCD_HSYNC__ECSPI4_SCLK 0x74 /* X2-76 */ 217f126890aSEmmanuel Vadot MX7D_PAD_LCD_VSYNC__GPIO3_IO3 0x74 /* X2-78 */ 218f126890aSEmmanuel Vadot >; 219f126890aSEmmanuel Vadot }; 220f126890aSEmmanuel Vadot 221f126890aSEmmanuel Vadot pinctrl_enet1: enet1grp { 222f126890aSEmmanuel Vadot fsl,pins = < 223f126890aSEmmanuel Vadot MX7D_PAD_GPIO1_IO10__ENET1_MDIO 0x03 /* X2-48 */ 224f126890aSEmmanuel Vadot MX7D_PAD_GPIO1_IO11__ENET1_MDC 0x03 /* X2-46 */ 225f126890aSEmmanuel Vadot MX7D_PAD_ENET1_RGMII_TD0__ENET1_RGMII_TD0 0x71 /* X2-53 */ 226f126890aSEmmanuel Vadot MX7D_PAD_ENET1_RGMII_TD1__ENET1_RGMII_TD1 0x71 /* X2-55 */ 227f126890aSEmmanuel Vadot MX7D_PAD_ENET1_RGMII_TX_CTL__ENET1_RGMII_TX_CTL 0x71 /* X2-61 */ 228f126890aSEmmanuel Vadot MX7D_PAD_ENET1_RGMII_RD0__ENET1_RGMII_RD0 0x79 /* X2-56 */ 229f126890aSEmmanuel Vadot MX7D_PAD_ENET1_RGMII_RD1__ENET1_RGMII_RD1 0x79 /* X2-58 */ 230f126890aSEmmanuel Vadot MX7D_PAD_ENET1_RGMII_RX_CTL__ENET1_RGMII_RX_CTL 0x79 /* X2-64 */ 231f126890aSEmmanuel Vadot MX7D_PAD_ENET1_RGMII_RXC__ENET1_RX_ER 0x73 /* X2-52 */ 232f126890aSEmmanuel Vadot /* PHY reset: SRE_FAST, DSE_X1 */ 233f126890aSEmmanuel Vadot MX7D_PAD_ENET1_COL__GPIO7_IO15 0x00 /* X1-96 */ 234f126890aSEmmanuel Vadot /* Clock from PHY to MAC: 100kPU */ 235f126890aSEmmanuel Vadot MX7D_PAD_GPIO1_IO12__CCM_ENET_REF_CLK1 0x70 /* X3-4 */ 236f126890aSEmmanuel Vadot /* PHY interrupt: 100kPU, HYS */ 237f126890aSEmmanuel Vadot MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x78 /* X1-80 */ 238f126890aSEmmanuel Vadot >; 239f126890aSEmmanuel Vadot }; 240f126890aSEmmanuel Vadot 241f126890aSEmmanuel Vadot pinctrl_leds: ledsgrp { 242f126890aSEmmanuel Vadot fsl,pins = < 243f126890aSEmmanuel Vadot MX7D_PAD_LCD_DATA01__GPIO3_IO6 0x14 /* X2-82 */ 244f126890aSEmmanuel Vadot MX7D_PAD_EPDC_BDR0__GPIO2_IO28 0x14 /* X1-82 */ 245f126890aSEmmanuel Vadot MX7D_PAD_EPDC_BDR1__GPIO2_IO29 0x14 /* X1-84 */ 246f126890aSEmmanuel Vadot MX7D_PAD_EPDC_PWR_COM__GPIO2_IO30 0x14 /* X1-86 */ 247f126890aSEmmanuel Vadot MX7D_PAD_EPDC_PWR_STAT__GPIO2_IO31 0x14 /* X1-88 */ 248f126890aSEmmanuel Vadot MX7D_PAD_UART2_TX_DATA__GPIO4_IO3 0x14 /* X1-90 */ 249f126890aSEmmanuel Vadot >; 250f126890aSEmmanuel Vadot }; 251f126890aSEmmanuel Vadot 252f126890aSEmmanuel Vadot pinctrl_misc: miscgrp { 253f126890aSEmmanuel Vadot fsl,pins = < 254f126890aSEmmanuel Vadot /* Module A detection (low = present) */ 255f126890aSEmmanuel Vadot MX7D_PAD_LCD_DATA22__GPIO3_IO27 0x7c /* X2-105 */ 256f126890aSEmmanuel Vadot /* Module B detection (low = present) */ 257f126890aSEmmanuel Vadot MX7D_PAD_LCD_DATA20__GPIO3_IO25 0x7c /* X2-103 */ 258f126890aSEmmanuel Vadot /* SMPS - AC input monitor (high = failure) */ 259f126890aSEmmanuel Vadot MX7D_PAD_LCD_DATA07__GPIO3_IO12 0x7c /* X2-88 */ 260f126890aSEmmanuel Vadot /* USB - Hub reset */ 261f126890aSEmmanuel Vadot MX7D_PAD_LCD_DATA09__GPIO3_IO14 0x74 /* X2-92 */ 262f126890aSEmmanuel Vadot >; 263f126890aSEmmanuel Vadot }; 264f126890aSEmmanuel Vadot 265f126890aSEmmanuel Vadot pinctrl_restart: restartgrp { 266f126890aSEmmanuel Vadot fsl,pins = < 267f126890aSEmmanuel Vadot MX7D_PAD_ENET1_TX_CLK__GPIO7_IO12 0x74 /* X1-94 */ 268f126890aSEmmanuel Vadot >; 269f126890aSEmmanuel Vadot }; 270f126890aSEmmanuel Vadot 271f126890aSEmmanuel Vadot pinctrl_uart4: uart4grp { 272f126890aSEmmanuel Vadot fsl,pins = < 273f126890aSEmmanuel Vadot MX7D_PAD_SAI2_TX_SYNC__UART4_DCE_RX 0x7e /* X3-14 */ 274f126890aSEmmanuel Vadot MX7D_PAD_SAI2_TX_BCLK__UART4_DCE_TX 0x76 /* X3-16 */ 275f126890aSEmmanuel Vadot >; 276f126890aSEmmanuel Vadot }; 277f126890aSEmmanuel Vadot}; 278f126890aSEmmanuel Vadot 279f126890aSEmmanuel Vadot&iomuxc_lpsr { 280f126890aSEmmanuel Vadot pinctrl_usbotg2: usbotg2grp { 281f126890aSEmmanuel Vadot fsl,pins = < 282f126890aSEmmanuel Vadot MX7D_PAD_LPSR_GPIO1_IO06__USB_OTG2_OC 0x5c /* X3-11 */ 283f126890aSEmmanuel Vadot MX7D_PAD_LPSR_GPIO1_IO07__GPIO1_IO7 0x59 /* X3-9 */ 284f126890aSEmmanuel Vadot >; 285f126890aSEmmanuel Vadot }; 286f126890aSEmmanuel Vadot 287f126890aSEmmanuel Vadot}; 288f126890aSEmmanuel Vadot 289f126890aSEmmanuel Vadot&uart4 { 290f126890aSEmmanuel Vadot pinctrl-names = "default"; 291f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_uart4>; 292f126890aSEmmanuel Vadot assigned-clocks = <&clks IMX7D_UART4_ROOT_SRC>; 293f126890aSEmmanuel Vadot assigned-clock-parents = <&clks IMX7D_OSC_24M_CLK>; 294f126890aSEmmanuel Vadot}; 295f126890aSEmmanuel Vadot 296f126890aSEmmanuel Vadot&usbotg2 { 297f126890aSEmmanuel Vadot pinctrl-names = "default"; 298f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_usbotg2>; 299f126890aSEmmanuel Vadot vbus-supply = <®_usb_otg2_vbus>; 300f126890aSEmmanuel Vadot srp-disable; 301f126890aSEmmanuel Vadot hnp-disable; 302f126890aSEmmanuel Vadot adp-disable; 303f126890aSEmmanuel Vadot over-current-active-low; 304f126890aSEmmanuel Vadot dr_mode = "host"; 305f126890aSEmmanuel Vadot status = "okay"; 306f126890aSEmmanuel Vadot}; 307f126890aSEmmanuel Vadot 308f126890aSEmmanuel Vadot/* 309f126890aSEmmanuel Vadot * External watchdog feature provided by pcf2127. 310f126890aSEmmanuel Vadot */ 311f126890aSEmmanuel Vadot&wdog1 { 312f126890aSEmmanuel Vadot status = "disabled"; 313f126890aSEmmanuel Vadot}; 314