diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-09-20 19:55:40 +0300 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-09-22 23:47:41 +0300 |
commit | 45a4e2ce499421b77be2c26428f0df3beeed3879 (patch) | |
tree | b5a4dbc0dc55c4a81645fcf070758682901e897f /arch/arm64/boot/dts/freescale/imx8qxp-apalis.dtsi | |
parent | 0fad2c15053ec8eb03a447140183f90cb9be0050 (diff) |
arm64: dts: apalis-imx8x: add missed module-level devices
Add an initial support of following devices in toradex_5.4-2.1.x-imx:
- AD7879 touch controller
- ADC
- Audio subsystem and sgtl5000 codec
- Backlight
- DSI->HDMI adapter
- FlexCAN
- GPIO Fan
- GPIO WakeUp
- GPU
- MIPI-CSI
- MIPI-DSI
- On-module EEPROM
- PCAL GPIO expanders
- PCIeB
- USB/USB Hub
- VPU Encoder/Decoder
- etc.
Related-to: ELB-2908
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'arch/arm64/boot/dts/freescale/imx8qxp-apalis.dtsi')
-rw-r--r-- | arch/arm64/boot/dts/freescale/imx8qxp-apalis.dtsi | 520 |
1 files changed, 512 insertions, 8 deletions
diff --git a/arch/arm64/boot/dts/freescale/imx8qxp-apalis.dtsi b/arch/arm64/boot/dts/freescale/imx8qxp-apalis.dtsi index 404c365cb4b6..96c8af5874ee 100644 --- a/arch/arm64/boot/dts/freescale/imx8qxp-apalis.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qxp-apalis.dtsi @@ -12,10 +12,85 @@ compatible = "toradex,apalis-imx8x", "fsl,imx8qxp"; + backlight: backlight { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_bkl_on>; + enable-gpios = <&lsio_gpio3 13 GPIO_ACTIVE_HIGH>; + status = "disabled"; + }; + chosen { stdout-path = &lpuart1; }; + display_lcdif: display@disp1 { + compatible = "fsl,imx-lcdif-mux-display"; + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcdif>; + clocks = <&clk IMX_SC_R_LCD_0 IMX_SC_PM_CLK_BYPASS>, + <&clk IMX_SC_R_LCD_0 IMX_SC_PM_CLK_MISC0>; + clock-names = "bypass_div", "pixel"; + assigned-clocks = <&clk IMX_SC_R_LCD_0 IMX_SC_PM_CLK_MISC0>; + assigned-clock-parents = <&clk IMX_SC_R_LCD_0 IMX_SC_PM_CLK_BYPASS>; + fsl,lcdif-mux-regs = <&lcdif_mux_regs>; + fsl,interface-pix-fmt = "rgb666"; + power-domains = <&pd IMX_SC_R_LCD_0>; + status = "disabled"; + + port@0 { + reg = <0>; + + lcd_display_in: endpoint { + remote-endpoint = <&dpu_disp1_lcdif>; + }; + }; + }; + + gpio-fan { + compatible = "gpio-fan"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio8>; + gpios = <&lsio_gpio3 20 GPIO_ACTIVE_HIGH>; + gpio-fan,speed-map = < 0 0 + 3000 1>; + }; + + /* Apalis WAKE1_MICO */ + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio_keys>; + status = "disabled"; + + wakeup_key: wakeup-key { + label = "Wake-Up"; + gpios = <&lsio_gpio1 26 GPIO_ACTIVE_LOW>; + linux,code = <KEY_WAKEUP>; + debounce-interval = <10>; + wakeup-source; + }; + }; + + imx8x_cm4: imx8x_cm4@0 { + compatible = "fsl,imx8qxp-cm4"; + rsc-da = <0x90000000>; + mbox-names = "tx", "rx", "rxdb"; + mboxes = <&lsio_mu5 0 1 + &lsio_mu5 1 1 + &lsio_mu5 3 1>; + mub-partition = <3>; + memory-region = <&vdev0vring0>, <&vdev0vring1>, <&vdevbuffer>, + <&vdev1vring0>, <&vdev1vring1>; + core-index = <0>; + core-id = <IMX_SC_R_M4_0_PID0>; + status = "okay"; + power-domains = <&pd IMX_SC_R_M4_0_PID0>, + <&pd IMX_SC_R_M4_0_MU_1A>; + }; + reg_module_3v3: regulator-module-3v3 { compatible = "regulator-fixed"; regulator-name = "+V3.3"; @@ -30,7 +105,7 @@ regulator-max-microvolt = <3300000>; }; - reg_vref_1v8: regulator-vref-1v8 { + reg_module_vref_1v8: regulator-vref-1v8 { compatible = "regulator-fixed"; regulator-name = "vref-1v8"; regulator-min-microvolt = <1800000>; @@ -48,13 +123,188 @@ regulator-max-microvolt = <1800000>; startup-delay-us = <100000>; }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* + * 0x8800_0000 ~ 0x8FFF_FFFF is reserved for M4 + * Shouldn't be used at A core and Linux side. + * + */ + m4_reserved: m4@0x88000000 { + no-map; + reg = <0 0x88000000 0 0x8000000>; + }; + + rpmsg_reserved: rpmsg@0x90000000 { + no-map; + reg = <0 0x90200000 0 0x200000>; + }; + + decoder_boot: decoder-boot@84000000 { + reg = <0 0x84000000 0 0x2000000>; + no-map; + }; + + encoder_boot: encoder-boot@86000000 { + reg = <0 0x86000000 0 0x200000>; + no-map; + }; + + decoder_rpc: decoder-rpc@0x92000000 { + reg = <0 0x92000000 0 0x200000>; + no-map; + }; + + encoder_rpc: encoder-rpc@0x92200000 { + reg = <0 0x92200000 0 0x200000>; + no-map; + }; + + encoder_reserved: encoder_reserved@94400000 { + no-map; + reg = <0 0x94400000 0 0x800000>; + }; + + /* global autoconfigured region for contiguous allocations */ + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0 0x3c000000>; + alloc-ranges = <0 0x96000000 0 0x3c000000>; + linux,cma-default; + }; + + vdev0vring0: vdev0vring0@90000000 { + compatible = "shared-dma-pool"; + reg = <0 0x90000000 0 0x8000>; + no-map; + }; + + vdev0vring1: vdev0vring1@90008000 { + compatible = "shared-dma-pool"; + reg = <0 0x90008000 0 0x8000>; + no-map; + }; + + vdev1vring0: vdev1vring0@90010000 { + compatible = "shared-dma-pool"; + reg = <0 0x90010000 0 0x8000>; + no-map; + }; + + vdev1vring1: vdev1vring1@90018000 { + compatible = "shared-dma-pool"; + reg = <0 0x90018000 0 0x8000>; + no-map; + }; + + vdevbuffer: vdevbuffer { + compatible = "shared-dma-pool"; + reg = <0 0x90400000 0 0x100000>; + no-map; + }; + }; + + sound_card: sound-card { + compatible = "simple-audio-card"; + simple-audio-card,bitclock-master = <&dailink_master>; + simple-audio-card,format = "i2s"; + simple-audio-card,frame-master = <&dailink_master>; + simple-audio-card,name = "imx8qxp-sgtl5000"; + + dailink_master: simple-audio-card,codec { + sound-dai = <&sgtl5000_a>; + clocks = <&mclkout0_lpcg 0>; + }; + + simple-audio-card,cpu { + sound-dai = <&sai1>; + }; + }; }; /* Apalis AN1_ADC */ &adc0 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_adc0>; - vref-supply = <®_vref_1v8>; + vref-supply = <®_module_vref_1v8>; +}; + +/* Display Prefetch Resolve, (Tiling) */ +&dc0_dpr1_channel1 { + status = "okay"; +}; + +&dc0_dpr1_channel2 { + status = "okay"; +}; + +&dc0_dpr1_channel3 { + status = "okay"; +}; + +&dc0_dpr2_channel1 { + status = "okay"; +}; + +&dc0_dpr2_channel2 { + status = "okay"; +}; + +&dc0_dpr2_channel3 { + status = "okay"; +}; + +&dc0_pc { + status = "okay"; +}; + +&dc0_prg1 { + status = "okay"; +}; + +&dc0_prg2 { + status = "okay"; +}; + +&dc0_prg3 { + status = "okay"; +}; + +&dc0_prg4 { + status = "okay"; +}; + +&dc0_prg5 { + status = "okay"; +}; + +&dc0_prg6 { + status = "okay"; +}; + +&dc0_prg7 { + status = "okay"; +}; + +&dc0_prg8 { + status = "okay"; +}; + +&dc0_prg9 { + status = "okay"; +}; + +&dpu1 { + status = "okay"; +}; + +&dpu_disp1_lcdif { + remote-endpoint = <&lcd_display_in>; }; /* Apalis Gigabit Ethernet */ @@ -77,17 +327,161 @@ compatible = "ethernet-phy-ieee802.3-c22"; interrupt-parent = <&lsio_gpio1>; interrupts = <12 IRQ_TYPE_LEVEL_LOW>; - reg = <4>; micrel,led-mode = <0>; + reg = <4>; }; }; }; +/* Apalis CAN1 */ +&flexcan2 { + /* define the following property to disable CAN-FD mode */ + /* disable-fd-mode; */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan2>; +}; + +/* Apalis CAN2 */ +&flexcan3 { + /* define the following property to disable CAN-FD mode */ + /* disable-fd-mode; */ + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_flexcan3>; +}; + +&gpu_3d0 { + status = "okay"; +}; + +/* On-module I2C */ +&i2c0 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lpi2c0>; + clock-frequency = <100000>; + status = "okay"; + + /* Touch controller */ + ad7879@2c { + compatible = "adi,ad7879-1"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ad7879_int>; + reg = <0x2c>; + interrupt-parent = <&lsio_gpio3>; + interrupts = <5 IRQ_TYPE_EDGE_FALLING>; + touchscreen-max-pressure = <4096>; + adi,resistance-plate-x = <120>; + adi,first-conversion-delay = /bits/ 8 <3>; + adi,acquisition-time = /bits/ 8 <1>; + adi,median-filter-size = /bits/ 8 <2>; + adi,averaging = /bits/ 8 <1>; + adi,conversion-interval = /bits/ 8 <255>; + }; + + /* On-Module EEPROM */ + eeprom: eeprom@50 { + compatible = "atmel,24c02"; + reg = <0x50>; + pagesize = <16>; + }; + + /* PCAL6416A GPIO Expander */ + pcal6416_1: gpio@20 { + compatible = "nxp,pcal6416"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c_exp1_int>; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&lsio_gpio4>; + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; + vcc-supply = <®_module_3v3>; + ngpios = <16>; + gpio-line-names = "HDMI1_CEC", "SPDIF1_IN", "SPDIF1_OUT", + "UART4_TXD", "UART1_DCD", "UART1_RI", "UART1_DSR", + "UART1_DTR", "PWM1", "Wi-Fi_WKUP_WLAN", + "Wi-Fi_W_DISABLE", "Wi-Fi_WKUP_BT", "Wi-Fi_PDn", + "Wi-Fi_WKUP_HOST", "DSI_SW_SEL", "HDMI1_HPD"; + }; + + /* PCAL6416A GPIO Expander */ + pcal6416_2: gpio@21 { + compatible = "nxp,pcal6416"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c_exp2_int>; + reg = <0x21>; + gpio-controller; + #gpio-cells = <2>; + interrupt-parent = <&lsio_gpio4>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + vcc-supply = <®_module_3v3>; + }; + + sgtl5000_a: sgtl5000@a { + compatible = "fsl,sgtl5000"; + #sound-dai-cells = <0>; + assigned-clocks = <&clk IMX_SC_R_AUDIO_PLL_0 IMX_SC_PM_CLK_PLL>, + <&aud_pll_div0_lpcg 0>, + <&aud_rec0_lpcg 0>, + <&mclkout0_lpcg 0>; + assigned-clock-rates = <786432000>, <49152000>, <12288000>, <12288000>; + clocks = <&mclkout0_lpcg 0>; + clock-names = "mclk"; + reg = <0xa>; + VDDA-supply = <®_module_3v3_avdd>; + VDDIO-supply = <®_module_3v3>; + VDDD-supply = <®_module_vref_1v8>; + }; +}; + +/* Apalis I2C2 (DDC) */ +&i2c0_mipi_lvds1 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_i2c0_mipi_lvds1>; + clock-frequency = <100000>; +}; + +/* Apalis I2C1 */ +&i2c1 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lpi2c1>; + clock-frequency = <100000>; + + /* Atmel maxtouch controller */ + atmel_mxt_ts: atmel_mxt_ts@4a { + compatible = "atmel,maxtouch"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_gpio5>, <&pinctrl_gpio6>; + reg = <0x4a>; + interrupt-parent = <&lsio_gpio3>; + interrupts = <17 IRQ_TYPE_EDGE_FALLING>; /* Apalis GPIO5 */ + reset-gpios = <&lsio_gpio3 18 GPIO_ACTIVE_HIGH>; /* Apalis GPIO6 */ + status = "disabled"; + }; +}; + +/* Apalis I2C3 (CAM) */ +&i2c3 { + #address-cells = <1>; + #size-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lpi2c3>; + clock-frequency = <100000>; +}; + +&imx8_gpu_ss { + status = "okay"; +}; + &iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_dap1_gpios>, <&pinctrl_gpio3>, <&pinctrl_gpio4>, - <&pinctrl_gpio8>, <&pinctrl_mmc1_gpios>, - <&pinctrl_qspi0a_gpios>, <&pinctrl_sata1_act>, + <&pinctrl_mmc1_gpios>, <&pinctrl_qspi0a_gpios>, <&pinctrl_sata1_act>, <&pinctrl_usbo1oc>, <&pinctrl_wifi_sclk>; apalis-imx8qxp { @@ -621,10 +1015,24 @@ }; }; -/* Apalis UART1 */ -&lpuart1 { +/* Apalis SPI1 */ +&lpspi0 { + #address-cells = <1>; + #size-cells = <0>; + fsl,spi-num-chipselects = <1>; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_lpuart1>; + pinctrl-0 = <&pinctrl_lpspi0>; + cs-gpios = <&lsio_gpio1 8 GPIO_ACTIVE_LOW>; +}; + +/* Apalis SPI2 */ +&lpspi2 { + #address-cells = <1>; + #size-cells = <0>; + fsl,spi-num-chipselects = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lpspi2>; + cs-gpios = <&lsio_gpio1 0 GPIO_ACTIVE_LOW>; }; /* Apalis UART2 */ @@ -633,6 +1041,12 @@ pinctrl-0 = <&pinctrl_lpuart0>; }; +/* Apalis UART1 */ +&lpuart1 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lpuart1>; +}; + /* Apalis UART3 */ &lpuart2 { pinctrl-names = "default"; @@ -800,6 +1214,32 @@ "MXM3_61"; }; +&mipi_csi_0 { + #address-cells = <1>; + #size-cells = <0>; + /delete-property/virtual-channel; +}; + +&mipi0_dsi_host { + pwr-delay = <10>; +}; + +&mipi1_dsi_host { + pwr-delay = <10>; +}; + +/* Apalis PCIE1 */ +&pcieb { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_reset_moci>; + bus-range = <0x00 0xff>; + ext_osc = <0>; + fsl,max-link-speed = <2>; + reserved-region = <&rpmsg_reserved>; + reset-gpio = <&lsio_gpio4 1 GPIO_ACTIVE_LOW>; + vpcie-supply = <®_pcie_switch>; +}; + /* Apalis PWM2 */ &pwm_mipi_lvds0 { pinctrl-names = "default"; @@ -821,6 +1261,24 @@ #pwm-cells = <3>; }; +&rpmsg{ + /* + * 64K for one rpmsg instance: + */ + vdev-nums = <2>; + reg = <0x0 0x90000000 0x0 0x20000>; + memory-region = <&vdevbuffer>; + status = "okay"; +}; + +/* On-module I2S */ +&sai1 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_sai1>; + status = "okay"; +}; + &thermal_zones { pmic-thermal0 { polling-delay-passive = <250>; @@ -851,6 +1309,21 @@ }; }; +/* Manage on-module USB WiFi */ +&usb3phynop1 { + status = "okay"; + reset-on-resume; +}; + +/* + * Apalis USB 3.0 Host. Serves USB 3.0 4-port hub on module and + * USB 3.0 ports on-board + */ +&usbotg3 { + dr_mode = "host"; + status = "okay"; +}; + /* On-module eMMC */ &usdhc1 { bus-width = <8>; @@ -874,3 +1347,34 @@ pinctrl-3 = <&pinctrl_usdhc2_sleep>, <&pinctrl_usdhc2_gpio_sleep>; vmmc-supply = <®_module_3v3>; }; + +&vpu_decoder { + boot-region = <&decoder_boot>; + rpc-region = <&decoder_rpc>; + reg-csr = <0x2d040000>; + core_type = <1>; +}; + +&vpu_encoder { + boot-region = <&encoder_boot>; + rpc-region = <&encoder_rpc>; + reserved-region = <&encoder_reserved>; + reg-rpc-system = <0x40000000>; + resolution-max = <1920 1920>; + mbox-names = "enc1_tx0", "enc1_tx1", "enc1_rx"; + mboxes = <&mu1_m0 0 0 + &mu1_m0 0 1 + &mu1_m0 1 0>; + + core0@1020000 { + compatible = "fsl,imx8-mu1-vpu-m0"; + reg = <0x1020000 0x20000>; + reg-csr = <0x1050000 0x10000>; + interrupts = <GIC_SPI 470 IRQ_TYPE_LEVEL_HIGH>; + fsl,vpu_ap_mu_id = <17>; + fw-buf-size = <0x200000>; + rpc-buf-size = <0x80000>; + print-buf-size = <0x80000>; + }; +}; + |