diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index abc96a72d..64688b23e 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -35,6 +35,7 @@ dtb-y += t7c_a311d2_an400-hdmitx-only-4g.dtb dtb-y += t7c_a311d2_an400_8g.dtb dtb-y += t5m_pxp.dtb dtb-y += t5m_t963d4_ay301_2g.dtb +dtb-y += t5m_t963d4_ay301_2.5g.dtb dtb-y += t5m_t963d4_ay301_3g.dtb dtb-y += t5m_t963d4_ay309_2g.dtb dtb-y += t5m_t963d4_ay309_3g.dtb diff --git a/arch/arm64/boot/dts/amlogic/t5m_t963d4_ay301_2.5g.dts b/arch/arm64/boot/dts/amlogic/t5m_t963d4_ay301_2.5g.dts new file mode 100644 index 000000000..64accb071 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/t5m_t963d4_ay301_2.5g.dts @@ -0,0 +1,1903 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 Amlogic, Inc. All rights reserved. + */ + +/dts-v1/; + +#include "mesont5m.dtsi" +#include "mesont5m_drm.dtsi" +#include "firmware_ab.dtsi" +#include "mesont5m_ay301-panel.dtsi" + +/ { + amlogic-dt-id = "t5m_t963d4_ay301-2.5g"; + compatible = "t5m_t963d4_ay301-2.5g"; + interrupt-parent = <&gic>; + #address-cells = <2>; + #size-cells = <2>; + + aliases { + serial0 = &uart_B; + serial1 = &uart_A; + serial2 = &uart_C; + tsensor0 = &cpu_tsensor; + tsensor1 = &top_tsensor; + spi0 = &spifc; + spi1 = &spicc0; + spi2 = &spicc1; + spi3 = &spicc2; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; + i2c3 = &i2c3; + i2c4 = &i2c4; + }; + + memory@00000000 { + device_type = "memory"; + linux,usable-memory = <0x0 0x000000 0x0 0xa0000000>; + }; + + reserved-memory { + #address-cells = <2>; + #size-cells = <2>; + ranges; + + /* global autoconfigured region for contiguous allocations */ + ramdump_bl33z@00000000 { + reg = <0x0 0x0 0x0 0x1800000>; /* 0 ~ 24M */ + status = "disabled"; + }; + + ramoops@0x07400000 { + compatible = "ramoops"; + reg = <0x0 0x07400000 0x0 0x00100000>; + record-size = <0x20000>; + console-size = <0x40000>; + ftrace-size = <0x80000>; + pmsg-size = <0x20000>; + }; + + dmc_reserved:linux,dmc_monitor { + compatible = "amlogic,dmc_monitor-reserved"; + reg = <0x0 0x0 0x0 0x80000>; + }; + + debug_reserved:linux,iotrace { + compatible = "amlogic, iotrace"; + reg = <0x0 0x04f00000 0x0 0x00100000>; + io-size = <0x1b000>; + sched-size = <0x2000>; + irq-size = <0x1000>; + smc-size = <0x1000>; + misc-size = <0x1000>; + }; + + secmon_reserved:linux,secmon { + compatible = "shared-dma-pool"; + no-map; + reg = <0x0 0x05000000 0x0 0x3400000>; + }; + + logo_reserved:linux,meson-fb { + compatible = "amlogic, meson-fb"; + size = <0x0 0x800000>; + alignment = <0x0 0x400000>; + reg = <0x0 0x3f800000 0x0 0x800000>; + }; + + lcd_tcon_reserved:linux,lcd_tcon { + compatible = "amlogic, lcd_tcon"; + reg = <0x0 0x3e000000 0x0 0x00a02840>; + no-map; + }; + + lcd_cma_reserved:linux,lcd-cma { + compatible = "shared-dma-pool"; + reusable; + /* 512k for lcd dma data */ + size = <0x0 0x00080000>; + reg = <0x0 0x3ea80000 0x0 0x00080000>; + }; + + ion_cma_reserved:linux,ion-dev { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x0>; + alignment = <0x0 0x400000>; + }; + /* secure ion for gpu, advice size is 80M */ + ion_secure_reserved:linux,ion-secure { + compatible = "amlogic, ion-secure-mem"; + no-map; + size = <0x0 0x0000000>; + alignment = <0x0 0x400000>; + }; + ion_fb_reserved:linux,ion-fb { + compatible = "shared-dma-pool"; + reusable; + /* 1920x1080x4x3 round up 4M align */ + size = <0x0 0x0>; + alignment = <0x0 0x400000>; + }; + dmaheap_cma_reserved:heap-gfx { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x0>; + alignment = <0x0 0x400000>; + alloc-ranges = <0x0 0x00000000 0x0 0x23000000>; + }; + dmaheap_fb_reserved:heap-fb { + compatible = "shared-dma-pool"; + reusable; + /* 1080p TV androidT size 36M */ + size = <0x0 0x2400000>; + alignment = <0x0 0x400000>; + alloc-ranges = <0x0 0x00000000 0x0 0x23000000>; + }; + + /* vdin0 CMA pool */ + /*vdin0_cma_reserved:linux,vdin0_cma {*/ + /* compatible = "shared-dma-pool";*/ + /* reusable;*/ + /* up to 1920x1080 yuv422 8bit and 5 buffers + * 1920x1080x2x5 = 20 M + */ + /* size = <0x0 0x01400000>;*/ + /* alignment = <0x0 0x400000>;*/ + /*};*/ + /* vdin1 CMA pool */ + vdin1_cma_reserved:linux,vdin1_cma { + compatible = "shared-dma-pool"; + reusable; + /* up to 1920x1080 yuv422 8bit and 5 buffers + * 1920x1080x2x5 = 20 M + */ + size = <0x0 0x01400000>; + alignment = <0x0 0x400000>; + alloc-ranges = <0x0 0x00000000 0x0 0x23000000>; + }; + + codec_mm_cma:linux,codec_mm_cma { + compatible = "shared-dma-pool"; + reusable; + /* ion_codec_mm max can alloc size 80M*/ + size = <0x0 0x1b000000>; + alignment = <0x0 0x400000>; + alloc-ranges = <0x0 0x23000000 0x0 0x1b000000>; + linux,contiguous-region; + }; + + /*di CMA pool */ + di_cma_reserved:linux,di_cma { + compatible = "shared-dma-pool"; + reusable; + /* buffer_size = 3621952(yuv422 8bit) + * | 4736064(yuv422 10bit) + * | 4074560(yuv422 10bit full pack mode) + * 10x3621952=34.6M(0x23) support 8bit + * 10x4736064=45.2M(0x2e) support 12bit + * 10x4074560=40M(0x28) support 10bit + */ + size = <0x0 0x000000>; + //size = <0x0 0x0>; + alignment = <0x0 0x400000>; + alloc-ranges = <0x0 0x0 0x0 0x23000000>; + }; + /* codec shared reserved */ + codec_mm_reserved:linux,codec_mm_reserved { + compatible = "amlogic, codec-mm-reserved"; + size = <0x0 0x100000>; + alignment = <0x0 0x100000>; + //no-map; + }; + + secure_vdec_reserved:linux,secure_vdec_reserved { + compatible = "amlogic, secure-vdec-reserved"; + no-map; + size = <0x0 0x1000000>; + alignment = <0x0 0x100000>; + alloc-ranges = <0x0 0x00000000 0x0 0x23000000>; + }; + + frc_cma_reserved:linux,frc_cma { + compatible = "shared-dma-pool"; + reusable; + /* frc:size need 4M alignment + * 1080P 16 buffer:88Mhz (0x5800000) + * 4k 16 buffer:348Mhz (0x15c00000) + * 400Mhz (0x19000000) + * 384Mhz (0x18000000) + * 368Mhz (0x17000000) + */ + size = <0x0 0xac00000>; + alignment = <0x0 0x400000>; + linux,contiguous-region; + /*alloc-ranges = <0x0 0x0 0x0 0x3f800000>;*/ + }; + + /* POST PROCESS MANAGER */ + ppmgr_reserved:linux,ppmgr { + compatible = "amlogic, ppmgr_memory"; + size = <0x0 0x100000>; + alignment = <0x0 0x100000>; + linux,contiguous-region; + }; + + picdec_cma_reserved:linux,picdec { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x100000>; + alignment = <0x0 0x100000>; + linux,contiguous-region; + }; + + /*ldc_mem_reserved:linux,ldc_mem { + * compatible = "shared-dma-pool"; + * reusable; + * size = <0x0 0x400000>; + * alignment = <0x0 0x400000>; + * alloc-ranges = <0x0 0x0 0x0 0x40000000>; + *}; + */ + + /* global autoconfigured region for contiguous allocations */ + linux,cma { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x800000>; + alignment = <0x0 0x400000>; + alloc-ranges = <0x0 0x0 0x0 0x23000000>; + linux,cma-default; + }; + + fixed_area_one:linux,area_one { + compatible = "shared-dma-pool"; + reusable; + size = <0x0 0x00000000>; + alignment = <0x0 0x400000>; + alloc-ranges = <0x0 0x40000000 0x0 0x80000000>; + }; + }; + fixed_area_gpu { + compatible = "amlogic, fixed_area_cma"; + status = "disabled"; + memory-region = <&fixed_area_one>; + pool_size = <0x0 0x400000>; + }; + + vdd4_2v5_reg: fixedregulator@vdd4_2v5 { + compatible = "regulator-fixed"; + vin-supply = <&vddao3v3_reg>; + regulator-name = "DDR4_2.5V"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-boot-on; + regulator-always-on; + }; + + vddio3v3_reg: fixedregulator@vddio3v3 { + vin-supply = <&vddao3v3_reg>; + compatible = "regulator-fixed"; + regulator-name = "VDDIO_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + pinctrl-names = "default"; + gpio = <&gpio GPIOD_10 GPIO_ACTIVE_HIGH>; + startup-delay-us = <70000>; + enable-active-high; + regulator-boot-on; + regulator-always-on; + }; + + vddio1v8_reg: fixedregulator@vddio1v8 { + vin-supply = <&vddao3v3_reg>; + compatible = "regulator-fixed"; + regulator-name = "VDDAO_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + vddio_m_reg: fixedregulator@vddio_m { + vin-supply = <&vddio3v3_reg>; + compatible = "regulator-fixed"; + regulator-name = "VDDIO_M"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + afe1v8_reg: fixedregulator@afe1v8 { + vin-supply = <&vddao3v3_reg>; + compatible = "regulator-fixed"; + regulator-name = "AFE_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + afe3v3_reg: fixedregulator@afe3v3 { + vin-supply = <&vddao3v3_reg>; + compatible = "regulator-fixed"; + regulator-name = "AFE_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + pinctrl-names = "default"; + gpio = <&gpio GPIOD_4 GPIO_ACTIVE_HIGH>; + startup-delay-us = <70000>; + enable-active-high; + regulator-boot-on; + regulator-always-on; + }; + + enet1v8_reg: fixedregulator@enet1v8 { + vin-supply = <&afe3v3_reg>; + compatible = "regulator-fixed"; + regulator-name = "ENET1_1.8V"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + dmic3v3_reg: fixedregulator@dmic3v3 { + vin-supply = <&vddao3v3_reg>; + compatible = "regulator-fixed"; + regulator-name = "DMIC_3.3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + }; + + codec_mm { + compatible = "amlogic, codec, mm"; + memory-region = <&codec_mm_cma &codec_mm_reserved &secure_vdec_reserved>; + dev_name = "codec_mm"; + status = "okay"; + }; + + ionvideo { + compatible = "amlogic, ionvideo"; + dev_name = "ionvideo"; + status = "okay"; + }; + + picdec { + compatible = "amlogic, picdec"; + memory-region = <&picdec_cma_reserved>; + dev_name = "picdec"; + status = "okay"; + }; + ppmgr { + compatible = "amlogic, ppmgr"; + memory-region = <&ppmgr_reserved>; + status = "okay"; + }; + vdetect { + compatible = "amlogic, vdetect"; + dev_name = "vdetect"; + status = "okay"; + }; + + video_queue { + compatible = "amlogic, video_queue"; + dev_name = "videoqueue"; + status = "okay"; + }; + amlvideo2_0 { + compatible = "amlogic, amlvideo2"; + dev_name = "amlvideo2"; + status = "okay"; + amlvideo2_id = <0>; + cma_mode = <1>; + }; + + amlvideo2_1 { + compatible = "amlogic, amlvideo2"; + dev_name = "amlvideo2"; + status = "okay"; + amlvideo2_id = <1>; + cma_mode = <1>; + }; + + tvafe_avin_detect { + compatible = "amlogic, t5m_tvafe_avin_detect"; + status = "okay"; + device_mask = <1>;/*bit0:ch1;bit1:ch2*/ + reg = <0x0 0xfe00a000 0x0 0x400>; /* cvbs irq base */ + interrupts = <0 173 1>, + <0 172 1>; + }; + + tvafe { + compatible = "amlogic, tvafe-t5m"; + /*memory-region = <&tvafe_cma_reserved>;*/ + status = "okay"; + flag_cma = <1>;/*1:share with codec_mm;0:cma alone*/ + cma_size = <5>;/*MByte*/ + reg = <0x0 0xfe072000 0x0 0x2000/*tvafe reg base*/ + 0x0 0xfe008000 0x0 0x2000>; /*ana reg base*/ + reserve-iomap = "true"; + tvafe_id = <0>; + //pinctrl-names = "default"; + /*!!particular sequence, no more and no less!!!*/ + tvafe_pin_mux = < + 3 /* TVAFE_CVBS_IN2, CVBS_IN0 = 0 */ + 1 /* TVAFE_CVBS_IN0, CVBS_IN1 */ + 2 /* TVAFE_CVBS_IN1, CVBS_IN2 */ + 4 /* TVAFE_CVBS_IN3, CVBS_IN3 */ + >; + clocks = <&clkc CLKID_CDAC_CLK>; + clock-names = "vdac_clk_gate"; + cutwindow_val_h = <0 0 0 0 8>; /* level 0~4 */ + cutwindow_val_v = <4 8 14 16 24>; /* level 0~4 */ + }; + + vbi { + compatible = "amlogic, vbi"; + status = "okay"; + interrupts = <0 210 1>; + }; + + multi-di { + //status = "okay"; + /*************************************************** + * memory: default is 4 + * 0:use reserved; + * 1:use cma; + * 2:use cma as reserved + * 4:use codec mem + ***************************************************/ + flag_cma = <4>;// + //memory-region = <&di_cma_reserved>; + /*************************************************** + * clock-range: + * default: <334 667> + ***************************************************/ + //clock-range = <334 667>; + /*************************************************** + * en_4k: t5w support 4k + ***************************************************/ + en_4k = <1>; + keep_dec_vf = <2>; + po_fmt = <6>; + /*************************************************** + * post_nub: default is 11 (T7/T3/SC2/S4 new path) + * local 7*4075520 = 28 + * post 11*5222400 = 56 //?? + ***************************************************/ + post_nub = <11>; + /*************************************************** + * 0:not support + * bit 0: for 4k + * bit 1: for 1080p + ***************************************************/ + alloc_sct = <1>; + /*************************************************** + * hf: default is 0 (T7/T3/SC2/S4 new path) + * 0:not enable; + * 1: enable + ***************************************************/ + hf = <0>; + afbce_loss_en = <1>; + /*************************************************** + * loss mode for di out (T5w) + * 0:not set loss mode for di out; + * 1:1:check the loss flag in vf and set for di + ***************************************************/ + };/* end of multi-di */ + + /* for external keypad */ + adc_keypad { + compatible = "amlogic, adc_keypad"; + status = "okay"; + key_name = "power","vol-","vol+","enter","menu","source","exit"; + key_num = <7>; + io-channels = <&saradc SARADC_CH1>,<&saradc SARADC_CH2>; + io-channel-names = "key-chan-1", "key-chan-2"; + key_chan = ; + key_code = <116 114 115 28 139 466 174>; + key_val = <0 143 266 389 507 143 266>; //val=voltage/1800mV*1023 + key_tolerance = <40 40 40 40 40 40 40>; + mboxes = <&mbox_fifo T5M_REE2AO_KEYPAD>; + }; + + unifykey { + compatible = "amlogic,unifykey"; + status = "okay"; + + unifykey-num = <24>; + unifykey-index-0 = <&keysn_0>; + unifykey-index-1 = <&keysn_1>; + unifykey-index-2 = <&keysn_2>; + unifykey-index-3 = <&keysn_3>; + unifykey-index-4 = <&keysn_4>; + unifykey-index-5 = <&keysn_5>; + unifykey-index-6 = <&keysn_6>; + unifykey-index-7 = <&keysn_7>; + unifykey-index-8 = <&keysn_8>; + unifykey-index-9 = <&keysn_9>; + unifykey-index-10= <&keysn_10>; + unifykey-index-11 = <&keysn_11>; + unifykey-index-12 = <&keysn_12>; + unifykey-index-13 = <&keysn_13>; + unifykey-index-14 = <&keysn_14>; + unifykey-index-15 = <&keysn_15>; + unifykey-index-16 = <&keysn_16>; + unifykey-index-17 = <&keysn_17>; + unifykey-index-18 = <&keysn_18>; + unifykey-index-19 = <&keysn_19>; + unifykey-index-20 = <&keysn_20>; + unifykey-index-21 = <&keysn_21>; + unifykey-index-22 = <&keysn_22>; + unifykey-index-23 = <&keysn_23>; + unifykey-index-24 = <&keysn_24>; + + keysn_0: key_0{ + key-name = "usid"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_1:key_1{ + key-name = "mac"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_2:key_2{ + key-name = "hdcp"; + key-device = "secure"; + key-type = "sha1"; + key-permit = "read","write","del"; + }; + keysn_3:key_3{ + key-name = "secure_boot_set"; + key-device = "efuse"; + key-permit = "write"; + }; + keysn_4:key_4{ + key-name = "mac_bt"; + key-device = "normal"; + key-permit = "read","write","del"; + key-type = "mac"; + }; + keysn_5:key_5{ + key-name = "mac_wifi"; + key-device = "normal"; + key-permit = "read","write","del"; + key-type = "mac"; + }; + keysn_6:key_6{ + key-name = "hdcp2_tx"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_7:key_7{ + key-name = "hdcp2_rx"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_8:key_8{ + key-name = "widevinekeybox"; + key-device = "secure"; + key-type = "sha1"; + key-permit = "read","write","del"; + }; + keysn_9:key_9{ + key-name = "deviceid"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_10:key_10{ + key-name = "hdcp22_fw_private"; + key-device = "secure"; + key-permit = "read","write","del"; + }; + keysn_11:key_11{ + key-name = "hdcp22_rx_private"; + key-device = "secure"; + key-permit = "read","write","del"; + }; + keysn_12:key_12{ + key-name = "hdcp22_rx_fw"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_13:key_13{ + key-name = "hdcp14_rx"; + key-device = "normal"; + key-type = "sha1"; + key-permit = "read","write","del"; + }; + keysn_14:key_14{ + key-name = "prpubkeybox";// PlayReady + key-device = "secure"; + key-permit = "read","write","del"; + }; + keysn_15:key_15{ + key-name = "prprivkeybox";// PlayReady + key-device = "secure"; + key-permit = "read","write","del"; + }; + keysn_16:key_16{ + key-name = "lcd"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_17:key_17{ + key-name = "lcd_extern"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_18:key_18{ + key-name = "backlight"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_19:key_19{ + key-name = "lcd_tcon"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_20:key_20{ + key-name = "attestationkeybox";// attestation key + key-device = "secure"; + key-permit = "read","write","del"; + }; + keysn_21:key_21{ + key-name = "lcd_tcon_spi"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_22:key_22{ + key-name = "attestationdevidbox";// attest dev id box + key-device = "secure"; + key-permit = "read","write","del"; + }; + keysn_23:key_23{ + key-name = "oemkey"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + keysn_24:key_24{ + key-name = "ldim_dev"; + key-device = "normal"; + key-permit = "read","write","del"; + }; + }; /* End unifykey */ + + hdmirx { + compatible = "amlogic, hdmirx_t5m"; + #address-cells=<1>; + #size-cells=<1>; + /*memory-region = <&hdmirx_emp_cma_reserved>;*/ + status = "okay"; + pinctrl-names = "hdmirx_pins"; + pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux + &hdmirx_c_mux &hdmirx_d_mux>; + repeat = <0>; + /*power-domains = <&pwrdm PDIP_T5M_VPU_HDMI>;*/ + interrupts = <0 57 IRQ_TYPE_LEVEL_HIGH>; + clocks =<&clkc CLKID_HDMIRX_CFG>, + <&clkc CLKID_HDMIRX_ACR>, + <&clkc CLKID_HDMIRX_METER>, + <&clkc CLKID_HDMIRX_2M>, + <&clkc CLKID_HDMIRX_5M>, + <&clkc CLKID_HDMIRX_HDCP>, + <&xtal>, + <&clkc CLKID_FCLK_DIV4>, + <&clkc CLKID_FCLK_DIV5>; + clock-names = "hdmirx_cfg_clk", + "cts_hdmirx_acr_ref_clk", + "cts_hdmirx_meter_clk", + "cts_hdmirx_2m_clk", + "cts_hdmirx_5m_clk", + "cts_hdmirx_hdcp2x_eclk", + "xtal", + "fclk_div4", + "fclk_div5"; + power-domains = <&pwrdm 2>; + hdmirx_id = <0>; + en_4k_2_2k = <0>; + hpd_low_cec_off = <1>; + arc_port = <1>; + vrr_range_dynamic_update_en = <1>; + /* bit4: enable feature, bit3~0: port number */ + disable_port = <0x0>; + /* MAP_ADDR_MODULE_CBUS */ + /* MAP_ADDR_MODULE_HIU */ + /* MAP_ADDR_MODULE_HDMIRX_CAPB3 */ + /* MAP_ADDR_MODULE_SEC_AHB */ + /* MAP_ADDR_MODULE_SEC_AHB2 */ + /* MAP_ADDR_MODULE_APB4 */ + /* MAP_ADDR_MODULE_TOP */ + /* MAP_ADDR_MODULE_CLK_CTRL */ + /* MAP_ADDR_MODULE_ANA_CTRL */ + reg = < 0x0 0x0 0x0 0x0 + 0x0 0xff63C000 0x0 0x2000 + 0x0 0xffe0d000 0x0 0x2000 + 0x0 0x0 0x0 0x0 + 0x0 0x0 0x0 0x0 + 0x0 0x0 0x0 0x0 + 0x0 0xfe398000 0x0 0x18000 + 0x0 0xfe000000 0x0 0x1fff + 0x0 0xfe008000 0x280 0x334>; + }; + + /* Audio Related start */ + auge_sound { + compatible = "amlogic, auge-sound-card"; + aml-audio-card,name = "AML-AUGESOUND"; + + avout_mute-gpios = <&gpio GPIOH_27 GPIO_ACTIVE_HIGH>; + + /* headphone insert det */ + aml-audio-card,hp-det-gpio = <&analog_gpio CDAC_IOUT GPIO_ACTIVE_LOW>; + + interrupts = ; + interrupt-names = "audio_exception64"; + + aml-audio-card,dai-link@0 { + format = "i2s"; + mclk-fs = <256>; + //continuous-clock; + //bitclock-inversion; + //frame-inversion; + /* master mode */ + bitclock-master = <&tdma>; + frame-master = <&tdma>; + /* slave mode */ + /* + * bitclock-master = <&tdmacodec>; + * frame-master = <&tdmacodec>; + */ + /* suffix-name, sync with android audio hal used for */ + suffix-name = "alsaPORT-pcm"; + tdmacpu: cpu { + sound-dai = <&tdma>; + dai-tdm-slot-tx-mask = + <1 1>; + dai-tdm-slot-rx-mask = + <1 1>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + system-clock-frequency = <12288000>; + }; + tdmacodec: codec { + sound-dai = <&dummy_codec>; + }; + }; + + aml-audio-card,dai-link@1 { + format = "i2s"; + mclk-fs = <256>; + continuous-clock; + //bitclock-inversion; + //frame-inversion; + /* master mode */ + bitclock-master = <&tdmb>; + frame-master = <&tdmb>; + /* slave mode */ + //bitclock-master = <&tdmbcodec>; + //frame-master = <&tdmbcodec>; + /* suffix-name, sync with android audio hal used for */ + suffix-name = "alsaPORT-i2s-i2s4hdmirx"; + cpu { + sound-dai = <&tdmb>; + dai-tdm-slot-tx-mask = <1 1>; + dai-tdm-slot-rx-mask = <1 1>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + system-clock-frequency = <12288000>; + }; + tdmbcodec: codec { + prefix-names = "AMP"; + sound-dai = <&ad82128 &acodec>; + }; + }; + + aml-audio-card,dai-link@2 { + format = "i2s"; + mclk-fs = <256>; + //continuous-clock; + //bitclock-inversion; + //frame-inversion; + /* master mode */ + bitclock-master = <&tdmc>; + frame-master = <&tdmc>; + /* slave mode */ + //bitclock-master = <&tdmccodec>; + //frame-master = <&tdmccodec>; + /* suffix-name, sync with android audio hal used for */ + suffix-name = "alsaPORT-i2s4parser"; + cpu { + sound-dai = <&tdmc>; + dai-tdm-slot-tx-mask = <1 1>; + dai-tdm-slot-rx-mask = <1 1>; + dai-tdm-slot-num = <2>; + dai-tdm-slot-width = <32>; + system-clock-frequency = <12288000>; + }; + tdmccodec: codec { + sound-dai = <&dummy_codec>; + }; + }; + + aml-audio-card,dai-link@3 { + mclk-fs = <64>; + /* suffix-name, sync with android audio hal used for */ + suffix-name = "alsaPORT-pdm-builtinmic"; + cpu { + sound-dai = <&pdm>; + }; + codec { + sound-dai = <&dummy_codec>; + }; + }; + + aml-audio-card,dai-link@4 { + mclk-fs = <128>; + continuous-clock; + /* suffix-name, sync with android audio hal used for */ + suffix-name = "alsaPORT-spdif"; + cpu { + sound-dai = <&spdifa>; + system-clock-frequency = <6144000>; + }; + codec { + sound-dai = <&dummy_codec>; + }; + }; + + aml-audio-card,dai-link@5 { + mclk-fs = <128>; + continuous-clock; + suffix-name = "alsaPORT-spdifb"; + cpu { + sound-dai = <&spdifb>; + system-clock-frequency = <6144000>; + }; + codec { + sound-dai = <&dummy_codec>; + }; + }; + + aml-audio-card,dai-link@6 { + mclk-fs = <256>; + suffix-name = "alsaPORT-tv"; + cpu { + sound-dai = <&extn>; + system-clock-frequency = <12288000>; + }; + codec { + sound-dai = <&dummy_codec>; + }; + }; + + aml-audio-card,dai-link@7 { + mclk-fs = <256>; + continuous-clock; + suffix-name = "alsaPORT-loopback"; + cpu { + sound-dai = <&loopbacka>; + system-clock-frequency = <12288000>; + }; + codec { + sound-dai = <&dummy_codec>; + }; + }; + aml-audio-card,dai-link@8 { + mclk-fs = <256>; + suffix-name = "alsaPORT-earc"; + cpu { + sound-dai = <&earc>; + system-clock-frequency = <12288000>; + }; + codec { + sound-dai = <&dummy_codec>; + }; + }; + }; + /* Audio Related end */ + + aml_frc { + compatible = "amlogic, t5m_frc"; + dev_name = "aml_frc"; + status = "okay"; + frc_en = <1>;/*1:enable ;0:disable*/ + frc_hw_pos = <0>;/*0:before postblend; 1:after postblend*/ + interrupts = ; + interrupt-names = "irq_frc_in", "irq_frc_out", "irq_axi_crash", "irq_frc_rdma"; + memory-region = <&frc_cma_reserved>; + clocks = <&clkc CLKID_FRC>, <&clkc CLKID_ME>; + clock-names = "clk_frc", "clk_me"; + power-domains = <&pwrdm PDID_T5M_FRC_TOP>; + power-domain-names = "frc-top"; + reg = <0x0 0xFF850000 0x0 0x30000 /*frc reg*/ + 0x0 0xFE000000 0x0 0x300 + 0x0 0xFF000000 0x0 0x10000>; /*frc clk reg*/ + reg-names = "frc_reg","frc_clk_reg","vpu_reg"; + }; + + atv-demod { + compatible = "amlogic, atv-demod"; + status = "okay"; + btsc_sap_mode = <1>; + interrupts = <0 94 1>; + pinctrl-names="atvdemod_agc_pins"; + pinctrl-0=<&atvdemod_agc_pins>; + reg = <0x0 0xfe0be000 0x0 0x2000 // demod reg + 0x0 0xfe000000 0x0 0x2000 // hiu reg + 0x0 0x0 0x0 0x0 // periphs reg + 0x0 0xfe0bc000 0x0 0x2000>; // adec reg + common_agc = <1>; + }; + + aml_dtv_demod { + compatible = "amlogic, ddemod-t5m"; + dev_name = "aml_dtv_demod"; + status = "okay"; + diseqc_name = "sgm_41286"; + pinctrl-names="if_agc_pins", "diseqc_out", "rf_agc_pins"; + pinctrl-0=<&dtvdemod_if_agc_pins>; + pinctrl-1=<&diseqc_out>; + pinctrl-2=<&dtvdemod_rf_agc_pins>; + //pinctrl-3=<&diseqc_in>; + lnb_en-gpios = <&gpio GPIOZ_2 GPIO_ACTIVE_HIGH>; + lnb_sel-gpios = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>; + interrupts = ; + interrupt-names = "demod_isr"; + power-domains = <&pwrdm PDID_T5M_DEMOD>; + clocks = <&clkc CLKID_DEMOD_32K>; + clock-names = "demod_32k"; + reg = <0x0 0xfe360000 0x0 0x10000 //dtv demod base + 0x0 0xfe000000 0x0 0x2000 //hiu reg base + 0x0 0xff800000 0x0 0x1000 //io_aobus_base + 0x0 0xfe002000 0x0 0x2000>; //reset + + spectrum = <1>; + cma_mem_size = <16>; // MB + }; + + dvb-extern { + compatible = "amlogic, dvb-extern"; + dev_name = "dvb-extern"; + status = "okay"; + + fe_num = <1>; + fe0_demod = "internal"; + + tuner_num = <2>; // tuner number, multi tuner support + tuner0_name = "r842_tuner"; + tuner0_i2c_adap = <&i2c0>; + tuner0_i2c_addr = <0xF6>; // 8 bits + tuner0_xtal = <1>; // 0: 16MHz, 1: 24MHz + tuner0_xtal_mode = <0>; // NO_SHARE_XTAL(0), SLAVE_XTAL_SHARE(3) + tuner0_xtal_cap = <38>; + + tuner1_name = "rt710_tuner"; + tuner1_i2c_adap = <&i2c0>; + tuner1_i2c_addr = <0xF4>; // 8 bits + tuner1_xtal = <0>; // 0: 16MHz, 1: 24MHz + tuner1_xtal_mode = <0>; // NO_SHARE_XTAL(0), SLAVE_XTAL_SHARE(3) + tuner1_xtal_cap = <30>; + }; + + dvb-demux { + compatible = "amlogic sc2, dvb-demux"; /* same as sc2 */ + dev_name = "dvb-demux"; + status = "okay"; + + reg = <0x0 0xfe000000 0x0 0x480000>; + + dmxdev_num = <0x11>; + + tsn_from = "demod"; + + /*single demod setting */ + ts1_sid = <0x21>; + ts1 = "parallel"; + ts1_control = <0x0>; + ts1_invert = <0>; + + ts2_sid = <0x22>; + ts2 = "parallel"; + ts2_control = <0x0>; + ts2_invert = <0>; + pinctrl-names = "p_ts1"; + pinctrl-0 = <&dvb_p_ts1_pins>; + }; + + dvbci { + compatible = "amlogic, dvbci"; + dev_name = "dvbci"; + status = "okay"; + + io_type = <4>; /* 0=iobus,1=spi,2=cimax,3=spi-t312 4:T5D,ci bus*/ + addr_ts_mode_multiplex = <0>; /*AY301 not multi ts and addr,default 1*/ + le_enable_level = <0>; /*LE pin enable level*/ + /*gpio pin define*/ + pinctrl-names= "ci_ts_pins", "ci_addr_pins"; + pinctrl-0=<&dvb_ci_bus_pins_all &ci_ts_pins &ci_ts_clk_pins>; + pinctrl-1=<&dvb_ci_bus_pins &ci_addr_pins &ci_gpio_pins>; + reg = <0x0 0xFE080000 0x0 0x1FFF>; + /*irq define, t5m not use these irq*/ + //interrupts = <0 186 1 + // 0 187 1>; + //interrupt-names = "irq_cmp", + // "irq_timeout"; + dvbci_io { + /*gpio define GPIOM_27 GPIOM_28 GPIOM_30*/ + cd_pin1 = <&gpio GPIOM_27 GPIO_ACTIVE_HIGH>; + pwr_pin = <&gpio GPIOM_28 GPIO_ACTIVE_HIGH>; + le_pin = <&gpio GPIOM_29 GPIO_ACTIVE_HIGH>; + }; + }; +}; /* end of / */ + +&fb { + status = "disabled"; + display_size_default = <1920 1080 1920 2160 32>; + mem_size = <0x00800000 0x1980000 0x100000 0x100000>; + display_device_cnt = <2>; + logo_addr = "0x3f800000"; + mem_alloc = <0>; + pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ +}; + +&drm_vpu { + status = "okay"; + logo_addr = "0x3f800000"; + + connectors_dev: port@1 { + drm_to_lcd0: endpoint@2 { + reg = <2>; + remote-endpoint = <&lcd0_to_drm>; + }; + }; +}; + +&lcd { + ports { + port { + #address-cells = <1>; + #size-cells = <0>; + lcd0_to_drm: endpoint@0 { + reg = <0>; + remote-endpoint = <&drm_to_lcd0>; + }; + }; + }; +}; + +/*audio soc*/ +&audiobus { + tdma:tdm@0 { + compatible = "amlogic, t7-snd-tdma"; + #sound-dai-cells = <0>; + + dai-tdm-lane-slot-mask-in = <1 0>; + dai-tdm-lane-slot-mask-out = <1 1>; + dai-tdm-clk-sel = <0>; + + clocks = <&clkaudio CLKID_AUDIO_MCLK_A + &clkc CLKID_HIFI_PLL + &clkc CLKID_HIFI1_PLL>; + clock-names = "mclk", "clk_srcpll", "clk_src_cd"; + src-clk-freq = <491520000>; + suspend-clk-off = <1>; + status = "okay"; + }; + + tdmb:tdm@1 { + compatible = "amlogic, t7-snd-tdmb"; + #sound-dai-cells = <0>; + + dai-tdm-lane-slot-mask-in = <1 1 1 1>; + dai-tdm-lane-slot-mask-out = <1 1 1 1>; + dai-tdm-clk-sel = <1>; + + clocks = <&clkaudio CLKID_AUDIO_MCLK_B + &clkc CLKID_HIFI_PLL + &clkc CLKID_HIFI1_PLL>; + clock-names = "mclk", "clk_srcpll", "clk_src_cd"; + pinctrl-names = "tdm_pins","tdmout_a_gpio"; + pinctrl-0 = + <&tdm_b_pins + &tdm_d0_pins + &tdm_clk_pins>; + pinctrl-1 = <&tdmout_a_gpio>; + /* + * 0: tdmout_a; + * 1: tdmout_b; + * 2: tdmout_c; + * 3: spdifout; + * 4: spdifout_b; + */ + samesource_sel = <3>; + /* In for ACODEC_ADC */ + /* tdmin-src-name = "acodec_adc"; */ + tdmin-src-name = "hdmirx"; + /*enable default mclk(12.288M), before extern codec start*/ + start_clk_enable = <1>; + + /*tdm clk tuning enable*/ + clk_tuning_enable = <1>; + + /* enable control gain */ + ctrl_gain = <1>; + src-clk-freq = <491520000>; + + /* pcpd_monitor*/ + pcpd_monitor_src = <&pcpd_monitor_a>; + + suspend-clk-off = <1>; + status = "okay"; + + /* !!!For --TV platform-- ONLY */ + Channel_Mask { + /*i2s has 4 pins, 8channel, mux output*/ + Spdif_samesource_Channel_Mask = "i2s_2/3"; + }; + }; + + tdmc:tdm@2 { + compatible = "amlogic, t7-snd-tdmc"; + #sound-dai-cells = <0>; + + dai-tdm-lane-slot-mask-in = <1 1 1 1>; + dai-tdm-lane-slot-mask-out = <1 0 0 0>; + dai-tdm-clk-sel = <2>; + + clocks = <&clkaudio CLKID_AUDIO_MCLK_C + &clkc CLKID_HIFI_PLL + &clkc CLKID_HIFI1_PLL>; + clock-names = "mclk", "clk_srcpll", "clk_src_cd"; + tdmin-src-name = "hdmirx"; + src-clk-freq = <491520000>; + suspend-clk-off = <1>; + status = "okay"; + }; + + pdm:pdm { + compatible = "amlogic, tm2-revb-snd-pdm"; + #sound-dai-cells = <0>; + + clocks = <&clkaudio CLKID_AUDIO_GATE_PDM + &clkc CLKID_FCLK_DIV3 + &clkc CLKID_HIFI_PLL + &clkc CLKID_HIFI1_PLL + &xtal + &clkaudio CLKID_AUDIO_PDMIN0 + &clkaudio CLKID_AUDIO_PDMIN1>; + clock-names = "gate", + "sysclk_srcpll", + "dclk_srcpll", + "clk_src_cd", + "xtal", + "pdm_dclk", + "pdm_sysclk"; + + pinctrl-names = "pdm_pins"; + pinctrl-0 = <&pdmin>; + + train_sample_count = <10>; + + /* mode 0~4, defalut:1 */ + filter_mode = <1>; + src-clk-freq = <491520000>; + + status = "okay"; + }; + + spdifa:spdif@0 { + compatible = "amlogic, tm2-revb-snd-spdif-a"; + #sound-dai-cells = <0>; + + clocks = <&clkc CLKID_HIFI_PLL + &clkc CLKID_HIFI1_PLL + &clkc CLKID_FCLK_DIV4 + &clkaudio CLKID_AUDIO_GATE_SPDIFIN + &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_A + &clkaudio CLKID_AUDIO_SPDIFIN + &clkaudio CLKID_AUDIO_SPDIFOUT_A>; + clock-names = "sysclk", "clk_src_cd", "fixed_clk", "gate_spdifin", + "gate_spdifout", "clk_spdifin", "clk_spdifout"; + + interrupts = + ; + interrupt-names = "irq_spdifin"; + + pinctrl-names = "spdif_pins", + "spdif_pins_mute"; + pinctrl-0 = <&spdif_out_a_z19_pins + &spdifin_m29_pins>; + pinctrl-1 = <&spdifout_z19_mute>; + + /* + * 0: tdmout_a; + * 1: tdmout_b; + * 2: tdmout_c; + * 3: spdifout; + * 4: spdifout_b; + * 5: earc; + */ + + samesource_sel = <5>; + spdif_soft_mute = <1>; + + /*spdif clk tuning enable*/ + clk_tuning_enable = <1>; + src-clk-freq = <491520000>; + suspend-clk-off = <1>; + status = "okay"; + }; + + spdifb:spdif@1 { + compatible = "amlogic, tm2-revb-snd-spdif-b"; + #sound-dai-cells = <0>; + + clocks = <&clkc CLKID_HIFI_PLL /*CLKID_HIFI_PLL*/ + &clkc CLKID_HIFI1_PLL + &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B + &clkaudio CLKID_AUDIO_SPDIFOUT_B>; + clock-names = "sysclk", "clk_src_cd", + "gate_spdifout", "clk_spdifout"; + src-clk-freq = <491520000>; + suspend-clk-off = <1>; + status = "okay"; + }; + + extn:extn { + compatible = "amlogic, t7-snd-extn"; + #sound-dai-cells = <0>; + + interrupts = + ; + interrupt-names = "irq_frhdmirx"; + + status = "okay"; + }; + + aed:effect { + compatible = "amlogic, snd-effect-v4"; + #sound-dai-cells = <0>; + + clocks = <&clkaudio CLKID_AUDIO_GATE_EQDRC + &clkc CLKID_FCLK_DIV5 + &clkaudio CLKID_AUDIO_EQDRC>; + clock-names = "gate", "srcpll", "eqdrc"; + + /* + * 0:tdmout_a + * 1:tdmout_b + * 2:tdmout_c + * 3:spdifout + * 4:spdifout_b + */ + eqdrc_module = <1>; + /* max 0xf, each bit for one lane, usually one lane */ + lane_mask = <0x1>; + /* max 0xff, each bit for one channel */ + channel_mask = <0xff>; + + status = "okay"; + }; + + asrca: resample@0 { + compatible = "amlogic, t5-resample-a"; + clocks = <&clkc CLKID_HIFI_PLL + &clkc CLKID_HIFI1_PLL + &clkaudio CLKID_AUDIO_MCLK_B + &clkaudio CLKID_AUDIO_RESAMPLE_A>; + clock-names = "resample_pll", "clk_src_cd", "resample_src", "resample_clk"; + + /*same with toddr_src + * TDMIN_A, 0 + * TDMIN_B, 1 + * TDMIN_C, 2 + * SPDIFIN, 3 + * PDMIN, 4 + * FRATV, 5 + * TDMIN_LB, 6 + * LOOPBACK_A, 7 + * FRHDMIRX, 8 + * LOOPBACK_B, 9 + * SPDIFIN_LB, 10 + * EARC_RX, 11 + */ + + src-clk-freq = <491520000>; + resample_module = <8>; + suspend-clk-off = <1>; + status = "okay"; + }; + + asrcb: resample@1 { + compatible = "amlogic, t5-resample-b"; + clocks = <&clkc CLKID_HIFI_PLL + &clkc CLKID_HIFI1_PLL + &clkaudio CLKID_AUDIO_MCLK_F + &clkaudio CLKID_AUDIO_RESAMPLE_B>; + clock-names = "resample_pll", "clk_src_cd", "resample_src", "resample_clk"; + src-clk-freq = <491520000>; + + /*this resample is only used for loopback_A.*/ + suspend-clk-off = <1>; + status = "okay"; + }; + + vad:vad { + compatible = "amlogic, snd-vad"; + #sound-dai-cells = <0>; + + clocks = <&clkaudio CLKID_AUDIO_GATE_TOVAD + &clkc CLKID_FCLK_DIV5 + &clkaudio CLKID_AUDIO_VAD>; + clock-names = "gate", "pll", "clk"; + + interrupts = ; + interrupt-names = "irq_wakeup", "irq_frame_sync"; + + /* + * Data src sel: + * 0: tdmin_a; + * 1: tdmin_b; + * 2: tdmin_c; + * 3: spdifin; + * 4: pdmin; + * 5: loopback_b; + * 6: tdmin_lb; + * 7: loopback_a; + */ + src = <4>; + + /* + * deal with hot word in user space or kernel space + * 0: in user space + * 1: in kernel space + */ + level = <1>; + + mic-src = <&pdm>; + wakeup_sample_rate = <16000>; + + status = "okay"; + }; + + loopbacka:loopback@0 { + compatible = "amlogic, t5-loopbacka"; + #sound-dai-cells = <0>; + + clocks = <&clkaudio CLKID_AUDIO_GATE_PDM + &clkc CLKID_FCLK_DIV3 + &clkc CLKID_HIFI_PLL + &clkaudio CLKID_AUDIO_PDMIN0 + &clkaudio CLKID_AUDIO_PDMIN1 + &clkc CLKID_HIFI_PLL + &clkaudio CLKID_AUDIO_MCLK_A>; + clock-names = "pdm_gate", + "pdm_sysclk_srcpll", + "pdm_dclk_srcpll", + "pdm_dclk", + "pdm_sysclk", + "tdminlb_mpll", + "tdminlb_mclk"; + + /* datain src + * 0: tdmin_a; + * 1: tdmin_b; + * 2: tdmin_c; + * 3: spdifin; + * 4: pdmin; + */ + datain_src = <4>; + datain_chnum = <4>; + datain_chmask = <0xf>; + /* config which data pin for loopback */ + datain-lane-mask-in = <1 1 0 0>; + + /* calc mclk for datalb */ + mclk-fs = <256>; + + /* tdmin_lb src + * 0: tdmoutA + * 1: tdmoutB + * 2: tdmoutC + * 3: PAD_TDMINA_DIN*, refer to core pinmux + * 4: PAD_TDMINB_DIN*, refer to core pinmux + * 5: PAD_TDMINC_DIN*, refer to core pinmux + * 6: PAD_TDMINA_D*, oe, refer to core pinmux + * 7: PAD_TDMINB_D*, oe, refer to core pinmux + */ + /* if tdmin_lb >= 3, use external loopback */ + datalb_src = <1>; + datalb_chnum = <2>; + datalb_chmask = <0x3>; + /* config which data pin as loopback */ + datalb-lane-mask-in = <1 0 0 0>; + src-clk-freq = <491520000>; + /* define loopack with pdm mic. */ + mic-src = <&pdm>; + suspend-clk-off = <1>; + status = "okay"; + }; + + loopbackb:loopback@1 { + compatible = "amlogic, t5-loopbackb"; + #sound-dai-cells = <0>; + + clocks = <&clkaudio CLKID_AUDIO_GATE_PDM + &clkc CLKID_FCLK_DIV3 + &clkc CLKID_HIFI_PLL + &clkaudio CLKID_AUDIO_PDMIN0 + &clkaudio CLKID_AUDIO_PDMIN1 + &clkc CLKID_HIFI_PLL + &clkaudio CLKID_AUDIO_MCLK_A>; + clock-names = "pdm_gate", + "pdm_sysclk_srcpll", + "pdm_dclk_srcpll", + "pdm_dclk", + "pdm_sysclk", + "tdminlb_mpll", + "tdminlb_mclk"; + + /* calc mclk for datain_lb */ + mclk-fs = <256>; + + /* datain src + * 0: tdmin_a; + * 1: tdmin_b; + * 2: tdmin_c; + * 3: spdifin; + * 4: pdmin; + */ + datain_src = <4>; + datain_chnum = <4>; + datain_chmask = <0xf>; + /* config which data pin for loopback */ + datain-lane-mask-in = <1 0 1 0>; + + /* tdmin_lb src + * 0: tdmoutA + * 1: tdmoutB + * 2: tdmoutC + * 3: PAD_TDMINA_DIN*, refer to core pinmux + * 4: PAD_TDMINB_DIN*, refer to core pinmux + * 5: PAD_TDMINC_DIN*, refer to core pinmux + * 6: PAD_TDMINA_D*, oe, refer to core pinmux + * 7: PAD_TDMINB_D*, oe, refer to core pinmux + */ + /* if tdmin_lb >= 3, use external loopback */ + datalb_src = <1>; + datalb_chnum = <2>; + datalb_chmask = <0x3>; + /* config which data pin as loopback */ + datalb-lane-mask-in = <1 0 0 0>; + suspend-clk-off = <1>; + status = "disabled"; + }; +}; /* end of audiobus */ + +&earc { + suspend-clk-off = <1>; + status = "okay"; +}; + +&audio_data { + status = "okay"; +}; + +&uart_B { + status = "okay"; +}; + +/*if you want to use vdin just modify status to "ok"*/ +&vdin0 { + /*memory-region = <&vdin0_cma_reserved>;*/ + status = "okay"; + /*MByte, if 10bit disable: 64M(YUV422), + *if 10bit enable: 64*1.5 = 96M(YUV422) + *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M + *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M + *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M + *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M + * onebuffer: + * worst case:(4096*2160*3 + 2M(afbce issue)) = 27.5M + * dw:960x540x3 = 1.5M + * total size:(27.5+1.5)x buffernumber + */ + cma_size = <330>; + frame_buff_num = <10>; +}; + +&vdin1 { + memory-region = <&vdin1_cma_reserved>; + status = "okay"; +}; + +/* SDIO */ +//&sd_emmc_a { +// status = "disabled"; +// pinctrl-0 = <&sdio_pins>; +// pinctrl-1 = <&sdio_clk_gate_pins>; +// pinctrl-names = "default", "clk-gate"; +// #address-cells = <1>; +// #size-cells = <0>; +// +// bus-width = <4>; +// cap-sd-highspeed; +// sd-uhs-sdr50; +// sd_uhs-sdr104; +// max-frequency = <200000000>; +// +// non-removable; +// disable-wp; +// +// //vmmc-supply = <&vddao_3v3>; +// //vqmmc-supply = <&vddio_ao1v8>; +// +// brcmf: wifi@1 { +// reg = <1>; +// compatible = "brcm,bcm4329-fmac"; +// }; +//}; + +/* SD card */ +&sd_emmc_b { + status = "disabled"; + pinctrl-0 = <&sd_all_pins>; + pinctrl-1 = <&sd_1bit_pins>; + pinctrl-2 = <&sd_clk_gate_pins>; + pinctrl-names = "sd_default", + "sd_1bit_pins", + "clk-gate"; + bus-width = <4>; + cap-sd-highspeed; +// sd-uhs-sdr12; +// sd-uhs-sdr25; +// sd-uhs-sdr50; +// sd_uhs-sdr104; + max-frequency = <200000000>; + + //non-removable; + disable-wp; +// amlogic,dram-access-quirk; + + cd-gpios = <&gpio GPIOC_10 GPIO_ACTIVE_HIGH>; + //dat1-gpios = <&gpio GPIOC_1 GPIO_ACTIVE_HIGH>; + //vmmc-supply = <&vddao_3v3>; + //vqmmc-supply = <&emmc_1v8>; +}; + +&sd_emmc_c { + status = "okay"; + pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>; + pinctrl-1 = <&emmc_clk_gate_pins>; + pinctrl-names = "default", "clk-gate"; + + bus-width = <8>; + cap-mmc-highspeed; + //mmc-ddr-1_8v; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + max-frequency = <200000000>; + non-removable; + disable-wp; +// amlogic,dram-access-quirk; + +// mmc-pwrseq = <&emmc_pwrseq>; +// vmmc-supply = <&vddao_3v3>; +// vqmmc-supply = <&vddao_1v8>; +}; + +&periphs_pinctrl { + /*backlight*/ + bl_pwm_vs_on_pins:bl_pwm_vs_on_pin { + mux { + groups = "pwm_vs_h12"; + function = "pwm_vs"; + }; + }; + bl_pwm_off_pins:bl_pwm_off_pin { + mux { + groups = "GPIOH_12"; + function = "gpio_periphs"; + output-low; + }; + }; + ST6451D06_3_pins: ST6451D06_3_pin { + mux { + groups = "tcon_1","tcon_2","tcon_3", + "tcon_4","tcon_5","tcon_6", + "tcon_8","tcon_lock"; + function = "tcon"; + }; + }; + ST6451D06_3_off_pins: ST6451D06_3_off_pin { + mux { + groups = "GPIOH_1","GPIOH_2","GPIOH_3", + "GPIOH_4","GPIOH_5","GPIOH_6", + "GPIOH_8", "GPIOH_0"; + function = "gpio_periphs"; + input-enable; + }; + }; + ST5461D18_2_pins: ST5461D18_2_pin { + mux { + groups = "tcon_1","tcon_2","tcon_3", + "tcon_4","tcon_5","tcon_6", + "tcon_8","tcon_lock"; + function = "tcon"; + }; + }; + ST5461D18_2_off_pins: ST5461D18_2_off_pin { + mux { + groups = "GPIOH_1","GPIOH_2","GPIOH_3", + "GPIOH_4","GPIOH_5","GPIOH_6", + "GPIOH_8","GPIOH_0"; + function = "gpio_periphs"; + input-enable; + }; + }; +}; + +&i2c2 { + status = "okay"; + clock-frequency = <100000>; + pinctrl-names="default"; + pinctrl-0=<&i2c2_pins2>; + + lcd_extern_i2c0: lcd_extern_i2c@29 { + compatible = "lcd_ext, i2c"; + dev_name = "i2c_HV650LS"; + reg = <0x29>; + status = "okay"; + }; + + lcd_extern_i2c1: lcd_extern_i2c@33 { + compatible = "lcd_ext, i2c"; + dev_name = "i2c_CS602"; + reg = <0x33>; + status = "okay"; + }; + + lcd_extern_i2c2: lcd_extern_i2c@20 { + compatible = "lcd_ext, i2c"; + dev_name = "i2c_CS901"; + reg = <0x20>; + status = "okay"; + }; +}; + +&crg30_otg { + status = "okay"; + controller-type = <1>; + //gpio-vbus-power = "GPIOM_8"; + //gpios = <&gpio GPIOM_8 GPIO_ACTIVE_HIGH>; +}; + +ðmac { + status = "okay"; + phy-handle = <&internal_ephy>; + phy-mode = "rmii"; +}; + +&crg20 { + compatible = "amlogic, crg-host-drd"; + status = "okay"; +}; + +&crg21 { + compatible = "amlogic, crg-host-drd"; + status = "okay"; +}; + +&crg30_drd { + compatible = "amlogic, crg-drd"; + status = "okay"; +}; + +&usb2_m31_0_phy { + status = "okay"; +}; + +&usb3_m31_0_phy { + status = "okay"; + portnum = <1>; +}; + +&crg_phy_20 { + status = "okay"; + portnum = <1>; +}; + +&crg3_phy_20 { + status = "okay"; + portnum = <0>; +}; + +&crg_phy_21 { + status = "okay"; + portnum = <1>; +}; + +&crg3_phy_21 { + status = "okay"; + portnum = <0>; +}; + +&crg_udc_3 { + status = "okay"; + controller-type = <4>; +}; + +&spicc0 { //for TCON + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&spicc0_pins_h>; + cs-gpios = <&gpio GPIOH_8 GPIO_ACTIVE_HIGH>; + latency = <4>; +}; + +&spicc1 { //for UWB/LocalDimm + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&spicc1_pins &spicc1_cs_pins>; + //cs-gpios = <&gpio GPIOH_22 GPIO_ACTIVE_HIGH>; + cs2clk-us = <2>; + clk2cs-us = <12>; +}; + +&spicc2 { + status = "disabled"; + pinctrl-names = "default"; + pinctrl-0 = <&spicc2_pins_c>; + cs-gpios = <&gpio GPIOC_3 GPIO_ACTIVE_HIGH>; +}; + +&periphs_pinctrl { + pdmin: pdmin { + mux { /* GPIOH_19, GPIOH_18 */ + groups = "pdm_dclk_h19", + "pdm_din0_h18", + "pdm_din1_h14"; + function = "pdm"; + }; + }; + tdm_b_pins: tdm_b_pin { + mux { /* GPIOH_16, GPIOH_15, GPIOH_17 */ + groups = "tdm_sclk1_h", + "tdm_fs1_h15", + "tdm_d0_h"; + function = "tdm"; + }; + }; + + tdmout_a_gpio: tdmout_a_gpio { + mux { /* GPIOH_15, GPIOH_16, GPIOH_17 */ + groups ="GPIOH_15", + "GPIOH_16", + "GPIOH_17"; + function = "gpio_periphs"; + output-low; + }; + }; +}; + +&pinctrl_audio { + tdm_d0_pins: tdm_d0_pin { + mux { + groups = "tdm_d0"; + function = "tdmoutb_lane0"; + }; + }; + tdm_clk_pins: tdm_clk_pin { + mux { + groups = "tdm_sclk0", "tdm_lrclk0"; + function = "tdm_clk_outb"; + }; + }; +}; + +&ir { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&remote_pins>; +}; + +&dcon_led { + status = "okay"; + led_number = <13>; + pinctrl-names = "default"; + pinctrl-0 = <&dcon_led_pins1>; +}; + +&i2c0 { + status = "okay"; + clock-frequency = <300000>; + pinctrl-names="default"; + pinctrl-0=<&i2c0_pins1>; +}; + +&i2c1 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins1>; + clock-frequency = <100000>; + ad82128: ad82128@34 { + compatible = "ESMT,ad82128"; + #sound-dai-cells = <0>; + reset_pin = <&gpio GPIOD_9 GPIO_ACTIVE_HIGH>; + reg = <0x34>; + status = "okay"; + }; +}; + +&saradc { + status = "okay"; +}; + +&vdac { + cdac_disable = <1>; +}; + +&amlvecm { + status = "okay"; + gamma_en = <1>;/*1:enable ;0:disable*/ + wb_en = <1>;/*1:enable ;0:disable*/ + cm_en = <1>;/*1:enable ;0:disable*/ + wb_sel = <0>;/*1:mtx ;0:gainoff*/ + vlock_en = <1>;/*1:enable;0:disable*/ + vlock_mode = <0x8>; + /*vlock work mode: + *bit0:auto ENC + *bit1:auto PLL + *bit2:manual PLL + *bit3:manual ENC + *bit4:manual soft ENC + *bit5:manual MIX PLL ENC + */ + vlock_pll_m_limit = <1>; + vlock_line_limit = <2>; + interrupts = <0 207 1>; + interrupt-names = "lc_curve"; +}; + +&pwm_cd { + status = "okay"; +}; + +&pwm_ef { + pinctrl-0 = <&pwm_f_pins1>; + pinctrl-names = "default"; + status = "disabled"; +}; + +&uart_A { + status = "disabled"; + uart-has-rtscts; +}; + +&aml_wifi{ + status = "okay"; + power_on-gpios = <&gpio GPIOD_11 GPIO_ACTIVE_HIGH>; + disable-wifi-32k; +}; + +&aml_bt { + status = "okay"; + bt_en-gpios = <&gpio GPIOD_11 GPIO_ACTIVE_HIGH>; + hostwake-gpios = <&gpio GPIOD_13 GPIO_ACTIVE_HIGH>; + power_down_disable = <1>; +};