/* * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/ * * Copyright (C) 2017 TQ Systems (ported AM57xx IDK to TQMa57xx) * * Author: Stefan Lange * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ /dts-v1/; #include "tqma572x.dtsi" #include #include #include / { model = "TQ TQMa5728 MBa57xx"; compatible = "tq,tqma5728-mba57xx", "tq,tqma5728", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7"; aliases { display0 = &hdmi0; display1 = &lcd; ethernet2 = &pruss2_emac0; ethernet3 = &pruss2_emac1; }; chosen { stdout-path = &uart3; }; buttons: user_buttons { compatible = "gpio-keys"; }; vcc_5v: fixedregulator-vcc_5v { compatible = "regulator-fixed"; regulator-name = "VCC5V"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; regulator-always-on; regulator-boot-on; }; vcc_3v3: fixedregulator-vcc_3v3 { compatible = "regulator-fixed"; regulator-name = "VCC3V3"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; regulator-boot-on; }; /* miniPCIe */ vcc_1v5: fixedregulator-vcc_1v5 { /* TPS62090RGT */ compatible = "regulator-fixed"; regulator-name = "VCC1V5"; vin-supply = <&vcc_5v>; regulator-min-microvolt = <1500000>; regulator-max-microvolt = <1500000>; gpio = <&expander2 1 GPIO_ACTIVE_HIGH>; enable-active-high; regulator-boot-on; }; /* USB hub */ vcc_1v1: fixedregulator-vcc_1v1 { /* TPS62090RGT */ compatible = "regulator-fixed"; regulator-name = "VCC1V1"; vin-supply = <&vcc_5v>; regulator-min-microvolt = <1100000>; regulator-max-microvolt = <1100000>; gpio = <&expander2 2 GPIO_ACTIVE_HIGH>; enable-active-high; regulator-boot-on; }; vcc_3v3_display: fixedregulator-vcc_3v3_display { /* TPS62090RGT */ compatible = "regulator-fixed"; regulator-name = "VCC3V3_DISPLAY"; vin-supply = <&vcc_5v>; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&expander1 14 GPIO_ACTIVE_HIGH>; enable-active-high; regulator-boot-on; }; leds-iio { status = "okay"; compatible = "gpio-leds"; led-out0 { label = "out0"; gpios = <&expander2 3 GPIO_ACTIVE_HIGH>; default-state = "off"; }; led-out1 { label = "out1"; gpios = <&expander2 4 GPIO_ACTIVE_HIGH>; default-state = "off"; }; }; hdmi0: connector@0 { compatible = "hdmi-connector"; label = "hdmi"; type = "a"; port { hdmi_connector_in: endpoint { remote-endpoint = <&tpd12s015_out>; }; }; }; /* HDMI companion chip */ tpd12s015: encoder@0 { compatible = "ti,tpd12s016", "ti,tpd12s015"; gpios = <0>, /* optional CT_CP_HPD */ <0>, /* optional LS_OE */ <&gpio7 12 GPIO_ACTIVE_HIGH>; /* HPD */ pinctrl-names = "ddc"; pinctrl-0 = <&hdmi_i2c_pins_ddc>; ddc-i2c-bus = <&i2c2>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; tpd12s015_in: endpoint@0 { remote-endpoint = <&hdmi_out>; }; }; port@1 { reg = <1>; tpd12s015_out: endpoint@0 { remote-endpoint = <&hdmi_connector_in>; }; }; }; }; /* Dual-MAC Ethernet application node on PRU-ICSS2 */ pruss2_eth { compatible = "ti,am57-prueth"; pruss = <&pruss2>; sram = <&ocmcram1>; interrupt-parent = <&pruss2_intc>; pruss2_emac0: ethernet-mii0 { phy-handle = <&pruss2_eth0_phy>; phy-mode = "mii"; interrupts = <20>, <22>; interrupt-names = "rx", "tx"; /* Filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; }; pruss2_emac1: ethernet-mii1 { phy-handle = <&pruss2_eth1_phy>; phy-mode = "mii"; interrupts = <21>, <23>; interrupt-names = "rx", "tx"; /* Filled in by bootloader */ local-mac-address = [00 00 00 00 00 00]; }; }; /* ET0700G0DH6 + ETM0700G0DH6 + ETM0700G0BDH6 + S070WV106H-CT44 */ lcd: display { compatible = "panel-dpi"; bits-per-pixel = <32>; /* 32: RGB888/666 mode */ /* change it to 18 for new hw rev. */ bus-width = <24>; label = "lcd"; backlight = <&lcd_bl>; /* lcd power enable LCD_PWR_EN */ enable-gpios = <&expander1 12 GPIO_ACTIVE_HIGH>; panel-timing { clock-frequency = <33260000>; hactive = <800>; vactive = <480>; hback-porch = <216>; hfront-porch = <40>; vback-porch = <35>; vfront-porch = <10>; hsync-len = <128>; vsync-len = <2>; hsync-active = <0>; vsync-active = <0>; de-active = <1>; pixelclk-active = <0>; }; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; lcd_in: endpoint { remote-endpoint = <&dpi_out>; data-lines = <24>; }; }; port@1 { reg = <1>; lcd_out: endpoint { /* * lanes and remote-endpoint defined per * panel. */ }; }; }; }; /* TODO: template from am57xx-evm-common.dtsi * check with actual TQ display */ lcd_bl: backlight { compatible = "pwm-backlight"; pwms = <&ehrpwm1 0 50000 0>; /* Anything lower than 241 is no longer visible */ brightness-levels = <0 243 245 247 249 251 252 253 255>; default-brightness-level = <8>; pinctrl-names = "default"; pinctrl-0 = <&backlight_pins_default>; enable-gpios = <&expander1 13 GPIO_ACTIVE_HIGH>; power-supply = <&vcc_5v>; }; buzzer { compatible = "gpio-beeper"; gpios = <&gpio6 19 GPIO_ACTIVE_HIGH>; }; }; &dra7_pmx_core { dcan1_pins_default: dcan1_pins_default { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x37d0, PIN_OUTPUT_PULLUP | MUX_MODE0) /* dcan1_tx */ DRA7XX_CORE_IOPAD(0x37d4, PIN_INPUT_PULLUP | MUX_MODE0) /* dcan1_rx */ >; }; dcan1_pins_sleep: dcan1_pins_sleep { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x37d0, MUX_MODE15 | PULL_UP) /* dcan1_tx.off */ DRA7XX_CORE_IOPAD(0x37d4, MUX_MODE15 | PULL_UP) /* dcan1_rx.off */ >; }; dcan2_pins_default: dcan2_pins_default { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x3688, PIN_OUTPUT_PULLUP | MUX_MODE2) /* dcan2_tx */ DRA7XX_CORE_IOPAD(0x368C, PIN_INPUT_PULLUP | MUX_MODE2) /* dcan2_rx */ >; }; dcan2_pins_sleep: dcan2_pins_sleep { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x3688, MUX_MODE15 | PULL_UP) /* dcan2_tx.off */ DRA7XX_CORE_IOPAD(0x368C, MUX_MODE15 | PULL_UP) /* dcan2_rx.off */ >; }; backlight_pins_default: backlight_pins_default { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x3774, PIN_INPUT_PULLDOWN | MUX_MODE10) /* gpio6_10.ehrpwm2A */ >; }; hdmi_i2c_pins_ddc: pinmux_hdmi_i2c_pins_ddc { pinctrl-single,pins = < DRA7XX_CORE_IOPAD(0x3808, PIN_INPUT | MUX_MODE1) /* i2c2_sda.hdmi1_ddc_scl */ DRA7XX_CORE_IOPAD(0x380c, PIN_INPUT | MUX_MODE1) /* i2c2_scl.hdmi1_ddc_sda */ >; }; }; &i2c4 { status = "okay"; clock-frequency = <400000>; /* Input/Output GPIO Port Expander 16 bit */ expander1: pca9555@20 { compatible = "nxp,pca9555"; reg = <0x20>; interrupt-parent = <&gpio2>; interrupts = <2 IRQ_TYPE_EDGE_FALLING>; interrupt-controller; interrupt-cells = <2>; gpio-controller; #gpio-cells = <2>; vcc-supply = <&vcc_3v3>; status = "okay"; }; /* Output GPIO Port Expander 8 bit */ expander2: pca9554@21 { compatible = "nxp,pca9554"; reg = <0x21>; #gpio-cells = <2>; gpio-controller; vcc-supply = <&vcc_3v3>; status = "okay"; }; /* USB Hub USB4604i * I2C not connected; R375, R276 not placed */ /* touch controller */ analog_touch: stmpe811@41 { compatible = "st,stmpe811"; reg = <0x41>; /* touch interrupt TOUCH_INT#, GPIO Port Expander 1 0_4 */ interrupts = <4 IRQ_TYPE_EDGE_FALLING>; interrupt-parent = <&expander1>; interrupt-controller; status = "okay"; stmpe_touchscreen { compatible = "st,stmpe-ts"; st,adc-freq = <1>; /* 3.25 MHz ADC clock speed */ st,ave-ctrl = <3>; /* 8 sample average control */ st,fraction-z = <7>; /* 7 length fractional part in z */ /* * 50 mA typical 80 mA max touchscreen drivers * current limit value */ st,i-drive = <1>; st,mod-12b = <1>; /* 12-bit ADC */ st,ref-sel = <0>; /* internal ADC reference */ st,sample-time = <4>; /* ADC converstion time: 80 clocks */ st,settling = <3>; /* 1 ms panel driver settling time */ st,touch-det-delay = <5>; /* 5 ms touch detect interrupt delay */ }; }; /* audio codec */ /* TODO: dummy, audio not implemented yet */ codec: tlv320aic32x4@18 { compatible = "ti,tlv320aic32x4"; reg = <0x18>; }; }; /* Debug UART */ &uart3 { status = "okay"; interrupts-extended = <&crossbar_mpu GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH &dra7_pmx_core 0x3c0>; }; /* RS485 */ &uart10 { status = "okay"; interrupts-extended = <&crossbar_mpu GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH &dra7_pmx_core 0x170>; }; &buttons { #address-cells = <1>; #size-cells = <0>; button0 { label = "button_1"; gpios = <&expander1 1 GPIO_ACTIVE_LOW>; wakeup-source; }; button1 { label = "button_2"; gpios = <&expander1 2 GPIO_ACTIVE_LOW>; wakeup-source; }; buttons2 { label = "button_3"; gpios = <&expander1 3 GPIO_ACTIVE_LOW>; wakeup-source; }; }; &mac { status = "okay"; dual_emac; }; &cpsw_emac0 { phy_id = <&davinci_mdio>, <2>; phy-mode = "rgmii-id"; dual_emac_res_vlan = <1>; }; &cpsw_emac1 { phy_id = <&davinci_mdio>, <3>; phy-mode = "rgmii-id"; dual_emac_res_vlan = <2>; }; &davinci_mdio { dp83867_0: ethernet-phy@2 { reg = <2>; ti,rx-internal-delay = ; ti,tx-internal-delay = ; ti,fifo-depth = ; ti,min-output-impedance; }; dp83867_1: ethernet-phy@3 { reg = <3>; ti,rx-internal-delay = ; ti,tx-internal-delay = ; ti,fifo-depth = ; ti,min-output-impedance; }; }; &usb2_phy1 { /* Reference usb hub supply here. * Otherwise if usb hub supply is referenced nowhere it is * disabled by the kernel. */ phy-supply = <&vcc_1v1>; }; &usb1 { dr_mode = "host"; }; &usb2 { dr_mode = "peripheral"; }; /* sd card */ &mmc1 { status = "okay"; vmmc-supply = <&vdd_3v3>; vmmc_aux-supply = <&ldo1_reg>; bus-width = <4>; cd-gpios = <&gpio6 27 0>; /* gpio 219 */ wp-gpios = <&gpio6 28 0>; /* gpio 220 */ pinctrl-names = "default", "hs"; pinctrl-0 = <&mmc1_pins_default>; pinctrl-1 = <&mmc1_pins_hs>; }; /* SDIO */ &mmc4 { status = "okay"; bus-width = <4>; pinctrl-names = "default"; pinctrl-0 = <&mmc4_pins_default>; }; &dcan1 { status = "okay"; pinctrl-names = "default", "sleep", "active"; pinctrl-0 = <&dcan1_pins_sleep>; pinctrl-1 = <&dcan1_pins_sleep>; pinctrl-2 = <&dcan1_pins_default>; }; &dcan2 { status = "okay"; pinctrl-names = "default", "sleep", "active"; pinctrl-0 = <&dcan2_pins_sleep>; pinctrl-1 = <&dcan2_pins_sleep>; pinctrl-2 = <&dcan2_pins_default>; }; &hdmi { status = "okay"; vdda-supply = <&ldo4_reg>; port { hdmi_out: endpoint { remote-endpoint = <&tpd12s015_in>; }; }; }; /* display subsystem */ &dss { status = "okay"; vdda_video-supply = <&ldoln_reg>; ports { #address-cells = <1>; #size-cells = <0>; port@0 { reg = <0>; dpi_out: endpoint { remote-endpoint = <&lcd_in>; data-lines = <24>; }; }; }; }; &ehrpwm1 { status = "okay"; }; &mailbox3 { status = "okay"; mbox_pru1_0: mbox_pru1_0 { status = "okay"; }; mbox_pru1_1: mbox_pru1_1 { status = "okay"; }; }; &mailbox4 { status = "okay"; mbox_pru2_0: mbox_pru2_0 { status = "okay"; }; mbox_pru2_1: mbox_pru2_1 { status = "okay"; }; }; &pruss_soc_bus1 { status = "okay"; pruss1: pruss@4b200000 { status = "okay"; pru1_0: pru@4b234000 { interrupt-parent = <&pruss1_intc>; interrupts = <16>, <17>; interrupt-names = "vring", "kick"; status = "okay"; }; pru1_1: pru@4b238000 { interrupt-parent = <&pruss1_intc>; interrupts = <18>, <19>; interrupt-names = "vring", "kick"; status = "okay"; }; }; }; &pruss_soc_bus2 { status = "okay"; pruss2: pruss@4b280000 { status = "okay"; pru2_0: pru@4b2b4000 { interrupt-parent = <&pruss2_intc>; interrupts = <16>, <17>; interrupt-names = "vring", "kick"; status = "okay"; }; pru2_1: pru@4b2b8000 { interrupt-parent = <&pruss2_intc>; interrupts = <18>, <19>; interrupt-names = "vring", "kick"; status = "okay"; }; }; }; &pruss2_mdio { status = "okay"; pruss2_eth0_phy: ethernet-phy@0 { reg = <0>; }; pruss2_eth1_phy: ethernet-phy@1 { reg = <1>; }; }; &omap_dwc3_2 { extcon = <&extcon_usb2>; }; &extcon_usb2 { id-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>; /* vbus-gpio: pad USB2_DRVVBUS, mode 0 */ }; /* PCIe lane 0 PCIe x4 connector */ &pcie1_rc { status = "okay"; }; /* PCIe lane 1 mPCIe connector */ &pcie2_rc { status = "okay"; /* PCIe reset R532 not placed */ }; &pcie2_phy { status = "okay"; }; &sata { status = "okay"; };