diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts deleted file mode 100644 index 14763877d24b..000000000000 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts +++ /dev/null @@ -1,1669 +0,0 @@ -/* - * arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "partition_mbox_normal.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac200_2g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <1>; - #size-cells = <1>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x000000 0x80000000>; - }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - /* global autoconfigured region for contiguous allocations */ - ramoops@0x07400000 { - compatible = "ramoops"; - reg = <0x07400000 0x00100000>; - record-size = <0x8000>; - console-size = <0x8000>; - ftrace-size = <0x20000>; - }; - - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x400000>; - alignment = <0x400000>; - alloc-ranges = <0x05000000 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x05300000 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x800000>; - alignment = <0x400000>; - alloc-ranges = <0x30000000 0x50000000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x8000000>; - alignment = <0x400000>; - alloc-ranges = <0x30000000 0x50000000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x2800000>; - //no-map; - //}; - /*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 = <0x02800000>; - alignment = <0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0x13400000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x30000000 0x50000000>; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0>; - alignment = <0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x2000000>; - alignment = <0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <0>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "okay"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0xffe02000 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "ov5640"; - front_back = <0>; - camera-i2c-bus = <&i2c2>; - camvdd-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_HIGH>; - gpio_pwdn-gpios = <&gpio GPIOZ_6 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "okay"; - csi_id = <0>; - reg = <0xff650000 0x00000100>, - <0xffe0c000 0x00000100>, - <0xffe0d000 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <1>; - key_name = "power"; - key_code = <116>; - key-gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "okay"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <0>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0xFF632000 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1>; - dai-tdm-slot-rx-mask = - <1>; - dai-tdm-slot-num = <2>; - dai-tdm-slot-width = <16>; - system-clock-frequency = <256000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - system-clock-frequency = <12288000>; - }; - codec { - sound-dai = <&dummy_codec>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0xff634800 0x50>, - <0xff800268 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0xff634c00 0x50>, - <0xff800230 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "okay"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x7f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins2>; - clock-frequency = <400000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio GPIOA_5 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1>; - dai-tdm-lane-slot-mask-out = <1 0>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - //dai-tdm-lane-slot-mask-in = <0 0 0 0 0 0 0 0>; - //dai-tdm-lane-slot-mask-out = <1 1 1 1 1 1 1 1>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkaudio CLKID_AUDIO_MCLK_PAD0 - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "mclk_pad", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>; - - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout &spdifin>; - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample-a"; - clocks = <&clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_MCLK_A - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - - resample_module = <3>; - - status = "okay"; - }; - - asrcb: resample@1 { - compatible = "amlogic, sm1-resample-b"; - - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_B>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - - /*this resample is only used for loopback_A.*/ - - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0"; - function = "tdma_out"; - }; - }; - - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din1"; - function = "tdma_in"; - }; - }; - - tdmb_mclk: tdmb_mclk { - mux { - groups = "mclk0_a"; - function = "mclk0"; - drive-strength = <2>; - }; - }; - - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3, GPIOA_4, */ - /* GPIOA_5, GPIOA_6, GPIOA_7, GPIOA_8, */ - /* GPIOA_9, GPIOA_0*/ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - //"tdmb_dout1", - //"tdmb_dout2", - //"tdmb_dout3_a", - //"tdmb_dout4_a", - //"tdmb_dout5_a", - //"tdmb_dout6_a", - //"tdmb_dout7_a0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/ - groups = "tdmc_sclk_a", - "tdmc_fs_a", - "tdmc_dout0_a" - /*, "tdmc_dout2", - * "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - spdifin: spdifin { - mux {/* GPIOH_5 */ - groups = "spdif_in_h"; - function = "spdif_in"; - }; - }; - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - /*"pdm_din1_a",*/ - "pdm_din2_a", - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - bl_pwm_off_pins:bl_pwm_off_pin { - mux { - pins = "GPIOH_5"; - function = "gpio_periphs"; - output-high; - }; - }; - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <1>; - gpio-vbus-power = "GPIOH_6"; - gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <3>; -}; -ðmac { - status = "okay"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23"; - caps2 = "MMC_CAP2_HS200"; - /* "MMC_CAP2_HS400";*/ - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&sd_emmc_b { - status = "okay"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200_drm_buildroot.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200_drm_buildroot.dts deleted file mode 100644 index 686146145a67..000000000000 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac200_drm_buildroot.dts +++ /dev/null @@ -1,1942 +0,0 @@ -/* - * arch/arm/boot/dts/amlogic/sm1_s905d3_ac200_buildroot.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "mesonsm1_drm.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac200_2g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <1>; - #size-cells = <1>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x000000 0x80000000>; - }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - /* global autoconfigured region for contiguous allocations */ - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x400000>; - alignment = <0x400000>; - alloc-ranges = <0x05000000 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x05300000 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x800000>; - alignment = <0x400000>; - alloc-ranges = <0x30000000 0x50000000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x8000000>; - alignment = <0x400000>; - alloc-ranges = <0x30000000 0x50000000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x2800000>; - //no-map; - //}; - /*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 = <0x02800000>; - alignment = <0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0x13400000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x30000000 0x50000000>; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0>; - alignment = <0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x2000000>; - alignment = <0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <0>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - partitions: partitions{ - parts = <14>; - part-0 = <&logo>; - part-1 = <&recovery>; - part-2 = <&misc>; - part-3 = <&dto>; - part-4 = <&cri_data>; - part-5 = <¶m>; - part-6 = <&boot>; - part-7 = <&rsv>; - part-8 = <&tee>; - part-9 = <&vendor>; - part-10 = <&odm>; - part-11 = <&system>; - part-12 = <&cache>; - part-13 = <&data>; - - logo:logo{ - pname = "logo"; - size = <0x0 0x800000>; - mask = <1>; - }; - recovery:recovery{ - pname = "recovery"; - size = <0x0 0x1800000>; - mask = <1>; - }; - misc:misc{ - pname = "misc"; - size = <0x0 0x800000>; - mask = <1>; - }; - dto:dto{ - pname = "dto"; - size = <0x0 0x800000>; - mask = <1>; - }; - cri_data:cri_data{ - pname = "cri_data"; - size = <0x0 0x800000>; - mask = <2>; - }; - rsv:rsv{ - pname = "rsv"; - size = <0x0 0x1000000>; - mask = <1>; - }; - param:param{ - pname = "param"; - size = <0x0 0x1000000>; - mask = <2>; - }; - boot:boot{ - pname = "boot"; - size = <0x0 0x1000000>; - mask = <1>; - }; - tee:tee{ - pname = "tee"; - size = <0x0 0x2000000>; - mask = <1>; - }; - vendor:vendor{ - pname = "vendor"; - size = <0x0 0x10000000>; - mask = <1>; - }; - odm:odm{ - pname = "odm"; - size = <0x0 0x10000000>; - mask = <1>; - }; - system:system{ - pname = "system"; - size = <0x0 0x80000000>; - mask = <1>; - }; - cache:cache{ - pname = "cache"; - size = <0x0 0x46000000>; - mask = <2>; - }; - data:data{ - pname = "data"; - size = <0xffffffff 0xffffffff>; - mask = <4>; - }; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "okay"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0xffe02000 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "ov5640"; - front_back = <0>; - camera-i2c-bus = <&i2c2>; - camvdd-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_HIGH>; - gpio_pwdn-gpios = <&gpio GPIOZ_6 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "okay"; - csi_id = <0>; - reg = <0xff650000 0x00000100>, - <0xffe0c000 0x00000100>, - <0xffe0d000 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <1>; - key_name = "power"; - key_code = <116>; - key-gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "okay"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <0>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0xFF632000 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-rx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-num = <8>; - dai-tdm-slot-width = <32>; - system-clock-frequency = <24576000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - 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>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0xff634800 0x50>, - <0xff800268 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0xff634c00 0x50>, - <0xff800230 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "disabled"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x7f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&drm_vpu { - status = "okay"; - logo_addr = "0x7f800000"; - osd_ver = /bits/ 8 ; -}; - -&drm_amhdmitx { - status = "okay"; - hdcp = "disabled"; -}; - -&drm_lcd { - status = "okay"; -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins2>; - clock-frequency = <400000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio GPIOA_5 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1>; - dai-tdm-oe-lane-slot-mask-out = <1 0>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - //dai-tdm-lane-slot-mask-in = <0 0 0 0 0 0 0 0>; - //dai-tdm-lane-slot-mask-out = <1 1 1 1 1 1 1 1>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>; - - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - tdmlb:tdm@3 { - compatible = "amlogic, sm1-snd-tdmlb"; - #sound-dai-cells = <0>; - - dai-tdm-lane-lb-slot-mask-in = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1>; - clock-names = "mclk", "clk_srcpll"; - - /* - * select tdmin_lb src; - * AXG - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA - * 4: PAD_TDMINB - * 5: PAD_TDMINC - * - * G12A/G12B - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D*, oe pin - * 7: PAD_TDMINB_D*, oe pin - * - * TL1/SM1 - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D* - * 7: PAD_TDMINB_D* - * 8: PAD_TDMINC_D* - * 9: HDMIRX_I2S - * 10: ACODEC_ADC - */ - lb-src-sel = <1>; - - status = "disabled"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout &spdifin>; - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample"; - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - resample_module = <4>; - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; - - loopbacka:loopback@0 { - compatible = "amlogic, sm1-loopbacka"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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 = <6>; - datain_chmask = <0x3f>; - /* config which data pin for loopback */ - datain-lane-mask-in = <1 1 1 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>; - - status = "okay"; - }; - - loopbackb:loopback@1 { - compatible = "amlogic, sm1-loopbackb"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "disabled"; - }; - aed:effect { - compatible = "amlogic, snd-effect-v3"; - #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 = <0x3>; - status = "okay"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0"; - function = "tdma_out"; - }; - }; - - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din1"; - function = "tdma_in"; - }; - }; - - tdmb_mclk: tdmb_mclk { - mux { - groups = "mclk0_a"; - function = "mclk0"; - drive-strength = <2>; - }; - }; - - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3, GPIOA_4, */ - /* GPIOA_5, GPIOA_6, GPIOA_7, GPIOA_8, */ - /* GPIOA_9, GPIOA_0*/ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - //"tdmb_dout1", - //"tdmb_dout2", - //"tdmb_dout3_a", - //"tdmb_dout4_a", - //"tdmb_dout5_a", - //"tdmb_dout6_a", - //"tdmb_dout7_a0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/ - groups = "tdmc_sclk_a", - "tdmc_fs_a", - "tdmc_dout0_a" - /*, "tdmc_dout2", - * "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - spdifin: spdifin { - mux {/* GPIOH_5 */ - groups = "spdif_in_h"; - function = "spdif_in"; - }; - }; - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - /*"pdm_din1_a",*/ - "pdm_din2_a", - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - bl_pwm_off_pins:bl_pwm_off_pin { - mux { - pins = "GPIOH_5"; - function = "gpio_periphs"; - output-high; - }; - }; - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <1>; - gpio-vbus-power = "GPIOH_6"; - gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <3>; -}; -ðmac { - status = "okay"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23", - "MMC_CAP_DRIVER_TYPE_D"; - caps2 = "MMC_CAP2_HS200"; - /*MMC_CAP2_HS400"*/ - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&sd_emmc_b { - status = "okay"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202.dts deleted file mode 100644 index e6749f9ea523..000000000000 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202.dts +++ /dev/null @@ -1,1965 +0,0 @@ -/* - * arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "partition_mbox_normal.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac202_2g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <1>; - #size-cells = <1>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - spi0 = &spicc_a; - spi1 = &spicc1; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x000000 0x80000000>; - }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - /* global autoconfigured region for contiguous allocations */ - ramoops@0x07400000 { - compatible = "ramoops"; - reg = <0x07400000 0x00100000>; - record-size = <0x8000>; - console-size = <0x8000>; - ftrace-size = <0x40000>; - }; - - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x400000>; - alignment = <0x400000>; - alloc-ranges = <0x05000000 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x05300000 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x800000>; - alignment = <0x400000>; - alloc-ranges = <0x7f800000 0x800000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x8000000>; - alignment = <0x400000>; - alloc-ranges = <0x30000000 0x50000000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x2800000>; - //no-map; - //}; - /*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 = <0x02800000>; - alignment = <0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0x13400000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x30000000 0x50000000>; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0>; - alignment = <0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x2000000>; - alignment = <0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <2>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "okay"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0xffe02000 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "gc2145_mipi"; - front_back = <0>; - camera-i2c-bus = <&i2c0>; - gpio_pwdn-gpios = <&gpio GPIOZ_2 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "okay"; - csi_id = <0>; - reg = <0xff650000 0x00000100>, - <0xffe0c000 0x00000100>, - <0xffe0d000 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <4>; - key_name = "power", "vol-", "vol+", "mic_mute"; - key_code = <116 114 115 65>; - key-gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH - &gpio GPIOC_3 GPIO_ACTIVE_HIGH - &gpio GPIOC_0 GPIO_ACTIVE_HIGH - &gpio GPIOA_0 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "disabled"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <1>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0xFF632000 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-rx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-num = <8>; - dai-tdm-slot-width = <32>; - system-clock-frequency = <24576000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@3 { - mclk-fs = <64>; - /* suffix-name, sync with android audio hal - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - 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>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0xff634800 0x50>, - <0xff800268 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0xff634c00 0x50>, - <0xff800230 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "okay"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x7f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins1>; - clock-frequency = <100000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - hyn@1A { - compatible = "hyn,cst226"; - status = "okay"; - reg = <0x1a>; - reset-gpio = <&gpio GPIOA_5 0x00>; - irq-gpio = <&gpio GPIOA_6 0x00>; - }; - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio_ao GPIOAO_9 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 1>; - dai-tdm-oe-lane-slot-mask-out = <1 1>; - dai-format = "dsp_a"; - dai-tdm-slot-tx-mask = <1>; - dai-tdm-slot-rx-mask = <1>; - dai-tdm-slot-num = <2>; - dai-tdm-slot-width = <16>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - //dai-tdm-lane-slot-mask-in = <0 0 0 0 0 0 0 0>; - //dai-tdm-lane-slot-mask-out = <1 1 1 1 1 1 1 1>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkaudio CLKID_AUDIO_MCLK_PAD0 - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "mclk_pad", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - /*pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;*/ - pinctrl-0 = < &tdmout_b &tdmin_b>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - tdmlb:tdm@3 { - compatible = "amlogic, sm1-snd-tdmlb"; - #sound-dai-cells = <0>; - - dai-tdm-lane-lb-slot-mask-in = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1>; - clock-names = "mclk", "clk_srcpll"; - - /* - * select tdmin_lb src; - * AXG - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA - * 4: PAD_TDMINB - * 5: PAD_TDMINC - * - * G12A/G12B - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D*, oe pin - * 7: PAD_TDMINB_D*, oe pin - * - * TL1/SM1 - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D* - * 7: PAD_TDMINB_D* - * 8: PAD_TDMINC_D* - * 9: HDMIRX_I2S - * 10: ACODEC_ADC - */ - lb-src-sel = <1>; - - status = "disabled"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout>;/* bob remove &spdifin*/ - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample"; - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - resample_module = <4>; - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; - - loopbacka:loopback@0 { - compatible = "amlogic, sm1-loopbacka"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "okay"; - }; - - loopbackb:loopback@1 { - compatible = "amlogic, sm1-loopbackb"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "disabled"; - }; - aed:effect { - compatible = "amlogic, snd-effect-v3"; - #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 = <0x3>; - status = "disabled"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0", - "tdma_dout1"; - function = "tdma_out"; - }; - }; - - tdmout_a_gpio: tdmout_a_gpio { - mux { /* GPIOZ_1, GPIOZ_2, GPIOZ_3 */ - groups = "GPIOZ_1", - "GPIOZ_2", - "GPIOZ_3"; - function = "gpio_periphs"; - output-low; - }; - }; - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din0", - "tdma_din1"; - function = "tdma_in"; - }; - }; - - //tdmb_mclk: tdmb_mclk { - // mux { - // groups = "mclk0_a"; - // function = "mclk0"; - // drive-strength = <2>; - // }; - //}; - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3, GPIOA_4, */ - /* GPIOA_5, GPIOA_6, GPIOA_7, GPIOA_8, */ - /* GPIOA_9, GPIOA_0*/ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - //"tdmb_dout1", - //"tdmb_dout2", - //"tdmb_dout3_a", - //"tdmb_dout4_a", - //"tdmb_dout5_a", - //"tdmb_dout6_a", - //"tdmb_dout7_a0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/ - groups = "tdmc_sclk_a", - "tdmc_fs_a", - "tdmc_dout0_a" - /*, "tdmc_dout2", - * "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - /* GPIOH_5 */ - /* bob remove spdifin - *spdifin: spdifin { - * mux {/* GPIOH_5 - * groups = "spdif_in_h"; - * function = "spdif_in"; - * }; - *}; - */ - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - "pdm_din1_a", - /*"pdm_din2_a",*/ - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - /* - *bl_pwm_off_pins:bl_pwm_off_pin { - * mux { - * pins = "GPIOH_5"; - * function = "gpio_periphs"; - * output-high; - * }; - *}; - */ - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <0>; - /*gpio-vbus-power = "GPIOH_6";*/ - /*gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;*/ -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <1>; -}; -ðmac { - status = "disabled"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23", - "MMC_CAP_DRIVER_TYPE_D"; - caps2 = "MMC_CAP2_HS200"; - /*MMC_CAP2_HS400"*/ - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&sd_emmc_b { - status = "disabled"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&remote{ - status = "disable"; -}; - -ðmac { - status = "okay"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <3>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <0>; - otg = <0>; -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <1>; -}; - -&spicc0 { - status = "disabled"; - pinctrl-names = "default"; - pinctrl-0 = <&spicc0_pins_h>; - cs-gpios = <&gpio GPIOH_20 0>; -}; - -&spicc_a { - status = "okay"; - pinctrl-names= "default"; - pinctrl-0=<&spicc0_pins_h>; - cs-gpios = <&gpio GPIOH_20 GPIO_ACTIVE_HIGH>; - spi-nor@0 { - compatible = "jedec,spi-nor"; - status = "okay"; - frequency = <40000000>; - }; -}; - -&meson_fb { - status = "okay"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x800000>; - logo_addr = "0x7f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - -&lcd { - clk_path = <1>; -}; - -&gpu{ - tbl = <&dvfs285_cfg - &dvfs400_cfg - &dvfs500_cfg - &dvfs666_cfg - &dvfs800_cfg - &dvfs800_cfg>; -}; diff --git a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts b/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts deleted file mode 100644 index 1683e0347538..000000000000 --- a/arch/arm/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts +++ /dev/null @@ -1,1884 +0,0 @@ -/* - * arch/arm/boot/dts/amlogic/sm1_s905d3_ac200.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "partition_mbox_normal.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac202_1g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <1>; - #size-cells = <1>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x000000 0x40000000>; - }; - - reserved-memory { - #address-cells = <1>; - #size-cells = <1>; - ranges; - /* global autoconfigured region for contiguous allocations */ - ramoops@0x07400000 { - compatible = "ramoops"; - reg = <0x07400000 0x00100000>; - record-size = <0x8000>; - console-size = <0x8000>; - ftrace-size = <0x40000>; - }; - - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x400000>; - alignment = <0x400000>; - alloc-ranges = <0x05000000 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x05300000 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x800000>; - alignment = <0x400000>; - alloc-ranges = <0x3f800000 0x800000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x3000000>; - alignment = <0x400000>; - alloc-ranges = <0x0 0x30000000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x2800000>; - //no-map; - //}; - /*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 = <0x02800000>; - alignment = <0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0xd000000>; - alignment = <0x400000>; - linux,contiguous-region; - alloc-ranges = <0x30000000 0x10000000>; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0>; - alignment = <0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x04000000>; - alignment = <0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x2000000>; - alignment = <0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <2>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "okay"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0xffe02000 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "gc2145_mipi"; - front_back = <0>; - camera-i2c-bus = <&i2c0>; - gpio_pwdn-gpios = <&gpio GPIOZ_2 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "okay"; - csi_id = <0>; - reg = <0xff650000 0x00000100>, - <0xffe0c000 0x00000100>, - <0xffe0d000 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <4>; - key_name = "power", "vol-", "vol+", "mic_mute"; - key_code = <116 114 115 65>; - key-gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH - &gpio GPIOC_3 GPIO_ACTIVE_HIGH - &gpio GPIOC_0 GPIO_ACTIVE_HIGH - &gpio GPIOA_0 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "disabled"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <1>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0xFF632000 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-rx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-num = <8>; - dai-tdm-slot-width = <32>; - system-clock-frequency = <24576000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@3 { - mclk-fs = <64>; - /* suffix-name, sync with android audio hal - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - 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>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0xff634800 0x50>, - <0xff800268 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0xff634c00 0x50>, - <0xff800230 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "okay"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x3f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins1>; - clock-frequency = <100000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - hyn@1A { - compatible = "hyn,cst226"; - status = "okay"; - reg = <0x1a>; - reset-gpio = <&gpio GPIOA_5 0x00>; - irq-gpio = <&gpio GPIOA_6 0x00>; - }; - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio_ao GPIOAO_9 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 1>; - dai-tdm-oe-lane-slot-mask-out = <1 1>; - dai-format = "dsp_a"; - dai-tdm-slot-tx-mask = <1>; - dai-tdm-slot-rx-mask = <1>; - dai-tdm-slot-num = <2>; - dai-tdm-slot-width = <16>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - //dai-tdm-lane-slot-mask-in = <0 0 0 0 0 0 0 0>; - //dai-tdm-lane-slot-mask-out = <1 1 1 1 1 1 1 1>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkaudio CLKID_AUDIO_MCLK_PAD0 - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "mclk_pad", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - /*pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;*/ - pinctrl-0 = < &tdmout_b &tdmin_b>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - tdmlb:tdm@3 { - compatible = "amlogic, sm1-snd-tdmlb"; - #sound-dai-cells = <0>; - - dai-tdm-lane-lb-slot-mask-in = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1>; - clock-names = "mclk", "clk_srcpll"; - - /* - * select tdmin_lb src; - * AXG - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA - * 4: PAD_TDMINB - * 5: PAD_TDMINC - * - * G12A/G12B - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D*, oe pin - * 7: PAD_TDMINB_D*, oe pin - * - * TL1/SM1 - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D* - * 7: PAD_TDMINB_D* - * 8: PAD_TDMINC_D* - * 9: HDMIRX_I2S - * 10: ACODEC_ADC - */ - lb-src-sel = <1>; - - status = "disabled"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout>;/* bob remove &spdifin*/ - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample"; - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - resample_module = <4>; - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; - - loopbacka:loopback@0 { - compatible = "amlogic, sm1-loopbacka"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "okay"; - }; - - loopbackb:loopback@1 { - compatible = "amlogic, sm1-loopbackb"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "disabled"; - }; - aed:effect { - compatible = "amlogic, snd-effect-v3"; - #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 = <0x3>; - status = "disabled"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0", - "tdma_dout1"; - function = "tdma_out"; - }; - }; - - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din0", - "tdma_din1"; - function = "tdma_in"; - }; - }; - - //tdmb_mclk: tdmb_mclk { - // mux { - // groups = "mclk0_a"; - // function = "mclk0"; - // drive-strength = <2>; - // }; - //}; - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3, GPIOA_4, */ - /* GPIOA_5, GPIOA_6, GPIOA_7, GPIOA_8, */ - /* GPIOA_9, GPIOA_0*/ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - //"tdmb_dout1", - //"tdmb_dout2", - //"tdmb_dout3_a", - //"tdmb_dout4_a", - //"tdmb_dout5_a", - //"tdmb_dout6_a", - //"tdmb_dout7_a0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/ - groups = "tdmc_sclk_a", - "tdmc_fs_a", - "tdmc_dout0_a" - /*, "tdmc_dout2", - * "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - /*GPIOH_5 */ - /*bob remove spdifin - *spdifin: spdifin { - * mux {/* GPIOH_5 - * groups = "spdif_in_h"; - * function = "spdif_in"; - * }; - *}; - */ - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - "pdm_din1_a", - /*"pdm_din2_a",*/ - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - /* - *bl_pwm_off_pins:bl_pwm_off_pin { - * mux { - * pins = "GPIOH_5"; - * function = "gpio_periphs"; - * output-high; - * }; - *}; - */ - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <0>; - /*gpio-vbus-power = "GPIOH_6";*/ - /*gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;*/ -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <1>; -}; -ðmac { - status = "disabled"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23", - "MMC_CAP_DRIVER_TYPE_D"; - caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400"; - f_min = <400000>; - f_max = <166666666>; - }; -}; - -&sd_emmc_b { - status = "disabled"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&remote{ - status = "disable"; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - -&lcd { - clk_path = <1>; -}; - -&gpu{ - tbl = <&dvfs285_cfg - &dvfs400_cfg - &dvfs500_cfg - &dvfs666_cfg - &dvfs800_cfg - &dvfs800_cfg>; -}; diff --git a/arch/arm/boot/dts/amlogic/tl1_pxp.dts b/arch/arm/boot/dts/amlogic/tl1_pxp.dts index 759b93ca7317..6848781d7b81 100644 --- a/arch/arm/boot/dts/amlogic/tl1_pxp.dts +++ b/arch/arm/boot/dts/amlogic/tl1_pxp.dts @@ -401,7 +401,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <0>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x10>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts b/arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts index ffc67773e6df..88ed6342a9e3 100644 --- a/arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts +++ b/arch/arm/boot/dts/amlogic/tl1_t962x2_skt.dts @@ -627,7 +627,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <0>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x10>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts index 8683607d53d5..b005648a9b60 100644 --- a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts +++ b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts @@ -879,7 +879,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts index 234727dbc580..a198578ff136 100644 --- a/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts +++ b/arch/arm/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts @@ -874,7 +874,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tm2_pxp.dts b/arch/arm/boot/dts/amlogic/tm2_pxp.dts index 0b45f9274b7e..5ed1b18950a6 100644 --- a/arch/arm/boot/dts/amlogic/tm2_pxp.dts +++ b/arch/arm/boot/dts/amlogic/tm2_pxp.dts @@ -559,7 +559,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <0>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x10>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts index f62fc2051e2f..5dee6b97994e 100644 --- a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts +++ b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts @@ -814,7 +814,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts index dd64d7e6e953..dda75bb945f2 100644 --- a/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts +++ b/arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts @@ -786,7 +786,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts b/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts index 70ca06353f6b..a81e99efd4ec 100644 --- a/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts +++ b/arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts @@ -815,7 +815,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm/boot/dts/amlogic/tm2_t962x3_ab309.dts b/arch/arm/boot/dts/amlogic/tm2_t962x3_ab309.dts index 9b5230b802d3..1ca752df83cf 100644 --- a/arch/arm/boot/dts/amlogic/tm2_t962x3_ab309.dts +++ b/arch/arm/boot/dts/amlogic/tm2_t962x3_ab309.dts @@ -787,7 +787,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts deleted file mode 100644 index 0e91bd5851d3..000000000000 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts +++ /dev/null @@ -1,1659 +0,0 @@ -/* - * arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "partition_mbox_normal.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac200_2g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x0 0x000000 0x0 0x80000000>; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - /* global autoconfigured region for contiguous allocations */ - ramoops@0x07400000 { - compatible = "ramoops"; - reg = <0x0 0x07400000 0x0 0x00100000>; - record-size = <0x8000>; - console-size = <0x8000>; - ftrace-size = <0x20000>; - }; - - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x400000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x05000000 0x0 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x0 0x05300000 0x0 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x800000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x7f800000 0x0 0x800000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x8000000>; - alignment = <0x0 0x400000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x0 0x2800000>; - //no-map; - //}; - /*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 0x02800000>; - alignment = <0x0 0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0 0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0x0 0x13400000>; - alignment = <0x0 0x400000>; - linux,contiguous-region; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0 0x0>; - alignment = <0x0 0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x2000000>; - alignment = <0x0 0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <0>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "disabled"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0x0 0xffe02000 0x0 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "ov5640"; - front_back = <0>; - camera-i2c-bus = <&i2c2>; - camvdd-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_HIGH>; - gpio_pwdn-gpios = <&gpio GPIOZ_6 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "disabled"; - csi_id = <0>; - reg = <0x0 0xff650000 0x0 0x00000100>, - <0x0 0xffe0c000 0x0 0x00000100>, - <0x0 0xffe0d000 0x0 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <1>; - key_name = "power"; - key_code = <116>; - key-gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "okay"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <0>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - - interrupts = <0 56 1>; - interrupt-names = "vsync2"; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0x0 0xFF632000 0x0 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1>; - dai-tdm-slot-rx-mask = - <1>; - dai-tdm-slot-num = <2>; - dai-tdm-slot-width = <16>; - system-clock-frequency = <256000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - system-clock-frequency = <12288000>; - }; - codec { - sound-dai = <&dummy_codec>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0x0 0xff634800 0x0 0x50>, - <0x0 0xff800268 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0x0 0xff634c00 0x0 0x50>, - <0x0 0xff800230 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "okay"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x7f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins2>; - clock-frequency = <400000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio GPIOA_5 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1>; - dai-tdm-lane-slot-mask-out = <1 0>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkaudio CLKID_AUDIO_MCLK_PAD0 - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "mclk_pad", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>; - - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout /* &spdifin */>; - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample-a"; - clocks = <&clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_MCLK_A - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - - resample_module = <3>; - - status = "okay"; - }; - - asrcb: resample@1 { - compatible = "amlogic, sm1-resample-b"; - - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_B>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - - /*this resample is only used for loopback_A.*/ - - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0"; - function = "tdma_out"; - }; - }; - - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din1"; - function = "tdma_in"; - }; - }; - - tdmb_mclk: tdmb_mclk { - mux { - groups = "mclk0_a"; - function = "mclk0"; - drive-strength = <2>; - }; - }; - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13 */ - groups = "tdmc_sclk_a", - "tdmc_fs_a" - /*, "tdmc_dout0_a" - *, "tdmc_dout2" - *, "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - spdifin: spdifin { - mux {/* GPIOH_5 */ - groups = "spdif_in_h"; - function = "spdif_in"; - }; - }; - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - "pdm_din1_a", - "pdm_din2_a", - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - bl_pwm_off_pins:bl_pwm_off_pin { - mux { - pins = "GPIOH_5"; - function = "gpio_periphs"; - output-high; - }; - }; - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <1>; - gpio-vbus-power = "GPIOH_6"; - gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <3>; -}; -ðmac { - status = "okay"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23"; - /*caps2 = "MMC_CAP2_HS200";*/ - /* "MMC_CAP2_HS400";*/ - f_min = <400000>; - f_max = <50000000>; - }; -}; - -&sd_emmc_b { - status = "okay"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200_drm_buildroot.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200_drm_buildroot.dts deleted file mode 100644 index 4558dd3b9326..000000000000 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200_drm_buildroot.dts +++ /dev/null @@ -1,1929 +0,0 @@ -/* - * arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200_drm_buildroot.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "mesonsm1_drm.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac200_2g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x0 0x000000 0x0 0x80000000>; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - /* global autoconfigured region for contiguous allocations */ - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x400000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x05000000 0x0 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x0 0x05300000 0x0 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x800000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x7f800000 0x0 0x800000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x8000000>; - alignment = <0x0 0x400000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x0 0x2800000>; - //no-map; - //}; - /*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 0x02800000>; - alignment = <0x0 0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0 0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0x0 0x13400000>; - alignment = <0x0 0x400000>; - linux,contiguous-region; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0 0x0>; - alignment = <0x0 0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x2000000>; - alignment = <0x0 0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <0>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - partitions: partitions{ - parts = <14>; - part-0 = <&logo>; - part-1 = <&recovery>; - part-2 = <&misc>; - part-3 = <&dto>; - part-4 = <&cri_data>; - part-5 = <¶m>; - part-6 = <&boot>; - part-7 = <&rsv>; - part-8 = <&tee>; - part-9 = <&vendor>; - part-10 = <&odm>; - part-11 = <&system>; - part-12 = <&cache>; - part-13 = <&data>; - - logo:logo{ - pname = "logo"; - size = <0x0 0x800000>; - mask = <1>; - }; - recovery:recovery{ - pname = "recovery"; - size = <0x0 0x1800000>; - mask = <1>; - }; - misc:misc{ - pname = "misc"; - size = <0x0 0x800000>; - mask = <1>; - }; - dto:dto{ - pname = "dto"; - size = <0x0 0x800000>; - mask = <1>; - }; - cri_data:cri_data{ - pname = "cri_data"; - size = <0x0 0x800000>; - mask = <2>; - }; - rsv:rsv{ - pname = "rsv"; - size = <0x0 0x1000000>; - mask = <1>; - }; - param:param{ - pname = "param"; - size = <0x0 0x1000000>; - mask = <2>; - }; - boot:boot{ - pname = "boot"; - size = <0x0 0x1000000>; - mask = <1>; - }; - tee:tee{ - pname = "tee"; - size = <0x0 0x2000000>; - mask = <1>; - }; - vendor:vendor{ - pname = "vendor"; - size = <0x0 0x10000000>; - mask = <1>; - }; - odm:odm{ - pname = "odm"; - size = <0x0 0x10000000>; - mask = <1>; - }; - system:system{ - pname = "system"; - size = <0x0 0x80000000>; - mask = <1>; - }; - cache:cache{ - pname = "cache"; - size = <0x0 0x46000000>; - mask = <2>; - }; - data:data{ - pname = "data"; - size = <0xffffffff 0xffffffff>; - mask = <4>; - }; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "disabled"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0x0 0xffe02000 0x0 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "ov5640"; - front_back = <0>; - camera-i2c-bus = <&i2c2>; - camvdd-gpios = <&gpio GPIOZ_5 GPIO_ACTIVE_HIGH>; - gpio_pwdn-gpios = <&gpio GPIOZ_6 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "disabled"; - csi_id = <0>; - reg = <0x0 0xff650000 0x0 0x00000100>, - <0x0 0xffe0c000 0x0 0x00000100>, - <0x0 0xffe0d000 0x0 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <1>; - key_name = "power"; - key_code = <116>; - key-gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "okay"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <0>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0x0 0xFF632000 0x0 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-rx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-num = <8>; - dai-tdm-slot-width = <32>; - system-clock-frequency = <24576000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - 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>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0x0 0xff634800 0x0 0x50>, - <0x0 0xff800268 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0x0 0xff634c00 0x0 0x50>, - <0x0 0xff800230 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "disabled"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x7f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&drm_vpu { - status = "okay"; - logo_addr = "0x7f800000"; - osd_ver = /bits/ 8 ; -}; - -&drm_amhdmitx { - status = "okay"; - hdcp = "disabled"; -}; - -&drm_lcd { - status = "okay"; -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins2>; - clock-frequency = <400000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio GPIOA_5 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1>; - dai-tdm-oe-lane-slot-mask-out = <1 0>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>; - - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - tdmlb:tdm@3 { - compatible = "amlogic, sm1-snd-tdmlb"; - #sound-dai-cells = <0>; - - dai-tdm-lane-lb-slot-mask-in = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1>; - clock-names = "mclk", "clk_srcpll"; - - /* - * select tdmin_lb src; - * AXG - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA - * 4: PAD_TDMINB - * 5: PAD_TDMINC - * - * G12A/G12B - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D*, oe pin - * 7: PAD_TDMINB_D*, oe pin - * - * TL1/SM1 - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D* - * 7: PAD_TDMINB_D* - * 8: PAD_TDMINC_D* - * 9: HDMIRX_I2S - * 10: ACODEC_ADC - */ - lb-src-sel = <1>; - - status = "disabled"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout /* &spdifin */>; - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample"; - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - resample_module = <4>; - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; - - loopbacka:loopback@0 { - compatible = "amlogic, sm1-loopbacka"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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 = <6>; - datain_chmask = <0x3f>; - /* config which data pin for loopback */ - datain-lane-mask-in = <1 1 1 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>; - - status = "okay"; - }; - - loopbackb:loopback@1 { - compatible = "amlogic, sm1-loopbackb"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "disabled"; - }; - aed:effect { - compatible = "amlogic, snd-effect-v3"; - #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 = <0x3>; - status = "okay"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0"; - function = "tdma_out"; - }; - }; - - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din1"; - function = "tdma_in"; - }; - }; - - tdmb_mclk: tdmb_mclk { - mux { - groups = "mclk0_a"; - function = "mclk0"; - drive-strength = <2>; - }; - }; - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13 */ - groups = "tdmc_sclk_a", - "tdmc_fs_a" - /*, "tdmc_dout0_a" - *, "tdmc_dout2" - *, "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - spdifin: spdifin { - mux {/* GPIOH_5 */ - groups = "spdif_in_h"; - function = "spdif_in"; - }; - }; - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - "pdm_din1_a", - "pdm_din2_a", - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - bl_pwm_off_pins:bl_pwm_off_pin { - mux { - pins = "GPIOH_5"; - function = "gpio_periphs"; - output-high; - }; - }; - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <1>; - gpio-vbus-power = "GPIOH_6"; - gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <3>; -}; -ðmac { - status = "okay"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23", - "MMC_CAP_DRIVER_TYPE_D"; - caps2 = "MMC_CAP2_HS200"; - /*MMC_CAP2_HS400"*/ - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&sd_emmc_b { - status = "okay"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202.dts deleted file mode 100644 index cbf4c38caa80..000000000000 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202.dts +++ /dev/null @@ -1,1891 +0,0 @@ -/* - * arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "partition_mbox_normal.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac202_2g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x0 0x000000 0x0 0x80000000>; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - /* global autoconfigured region for contiguous allocations */ - ramoops@0x07400000 { - compatible = "ramoops"; - reg = <0x0 0x07400000 0x0 0x00100000>; - record-size = <0x8000>; - console-size = <0x8000>; - ftrace-size = <0x40000>; - }; - - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x400000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x05000000 0x0 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x0 0x05300000 0x0 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x800000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x7f800000 0x0 0x800000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x8000000>; - alignment = <0x0 0x400000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x0 0x2800000>; - //no-map; - //}; - /*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 0x02800000>; - alignment = <0x0 0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0 0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0x0 0x13400000>; - alignment = <0x0 0x400000>; - linux,contiguous-region; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0 0x0>; - alignment = <0x0 0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x2000000>; - alignment = <0x0 0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <2>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "disabled"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0x0 0xffe02000 0x0 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "gc2145_mipi"; - front_back = <0>; - camera-i2c-bus = <&i2c0>; - gpio_pwdn-gpios = <&gpio GPIOZ_2 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "disabled"; - csi_id = <0>; - reg = <0x0 0xff650000 0x0 0x00000100>, - <0x0 0xffe0c000 0x0 0x00000100>, - <0x0 0xffe0d000 0x0 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <4>; - key_name = "power", "vol-", "vol+", "mic_mute"; - key_code = <116 114 115 65>; - key-gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH - &gpio GPIOC_3 GPIO_ACTIVE_HIGH - &gpio GPIOC_0 GPIO_ACTIVE_HIGH - &gpio GPIOA_0 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "disabled"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <1>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0x0 0xFF632000 0x0 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-rx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-num = <8>; - dai-tdm-slot-width = <32>; - system-clock-frequency = <24576000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@3 { - mclk-fs = <64>; - /* suffix-name, sync with android audio hal - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - 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>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0x0 0xff634800 0x0 0x50>, - <0x0 0xff800268 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0x0 0xff634c00 0x0 0x50>, - <0x0 0xff800230 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "okay"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x7f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins1>; - clock-frequency = <100000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - hyn@1A { - compatible = "hyn,cst226"; - status = "okay"; - reg = <0x1a>; - reset-gpio = <&gpio GPIOA_5 0x00>; - irq-gpio = <&gpio GPIOA_6 0x00>; - }; - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio_ao GPIOAO_9 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 1>; - dai-tdm-oe-lane-slot-mask-out = <1 1>; - dai-format = "dsp_a"; - dai-tdm-slot-tx-mask = <1>; - dai-tdm-slot-rx-mask = <1>; - dai-tdm-slot-num = <2>; - dai-tdm-slot-width = <16>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - //dai-tdm-lane-slot-mask-in = <0 0 0 0 0 0 0 0>; - //dai-tdm-lane-slot-mask-out = <1 1 1 1 1 1 1 1>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkaudio CLKID_AUDIO_MCLK_PAD0 - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "mclk_pad", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - /*pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;*/ - pinctrl-0 = < &tdmout_b &tdmin_b>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - tdmlb:tdm@3 { - compatible = "amlogic, sm1-snd-tdmlb"; - #sound-dai-cells = <0>; - - dai-tdm-lane-lb-slot-mask-in = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1>; - clock-names = "mclk", "clk_srcpll"; - - /* - * select tdmin_lb src; - * AXG - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA - * 4: PAD_TDMINB - * 5: PAD_TDMINC - * - * G12A/G12B - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D*, oe pin - * 7: PAD_TDMINB_D*, oe pin - * - * TL1/SM1 - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D* - * 7: PAD_TDMINB_D* - * 8: PAD_TDMINC_D* - * 9: HDMIRX_I2S - * 10: ACODEC_ADC - */ - lb-src-sel = <1>; - - status = "disabled"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout>;/* bob remove &spdifin*/ - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample"; - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - resample_module = <4>; - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; - - loopbacka:loopback@0 { - compatible = "amlogic, sm1-loopbacka"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "okay"; - }; - - loopbackb:loopback@1 { - compatible = "amlogic, sm1-loopbackb"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "disabled"; - }; - aed:effect { - compatible = "amlogic, snd-effect-v3"; - #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 = <0x3>; - status = "disabled"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0", - "tdma_dout1"; - function = "tdma_out"; - }; - }; - - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din0", - "tdma_din1"; - function = "tdma_in"; - }; - }; - - //tdmb_mclk: tdmb_mclk { - // mux { - // groups = "mclk0_a"; - // function = "mclk0"; - // drive-strength = <2>; - // }; - //}; - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3, GPIOA_4, */ - /* GPIOA_5, GPIOA_6, GPIOA_7, GPIOA_8, */ - /* GPIOA_9, GPIOA_0*/ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - //"tdmb_dout1", - //"tdmb_dout2", - //"tdmb_dout3_a", - //"tdmb_dout4_a", - //"tdmb_dout5_a", - //"tdmb_dout6_a", - //"tdmb_dout7_a0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/ - groups = "tdmc_sclk_a", - "tdmc_fs_a", - "tdmc_dout0_a" - /*, "tdmc_dout2", - * "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - /*GPIOH_5 */ - /*bob remove spdifin - *spdifin: spdifin { - * mux {/* GPIOH_5 - * groups = "spdif_in_h"; - * function = "spdif_in"; - * }; - *}; - */ - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - "pdm_din1_a", - /*"pdm_din2_a",*/ - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - /* - *bl_pwm_off_pins:bl_pwm_off_pin { - * mux { - * pins = "GPIOH_5"; - * function = "gpio_periphs"; - * output-high; - * }; - *}; - */ - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <0>; - /*gpio-vbus-power = "GPIOH_6";*/ - /*gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;*/ -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <1>; -}; -ðmac { - status = "disabled"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23", - "MMC_CAP_DRIVER_TYPE_D"; - caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400"; - f_min = <400000>; - f_max = <166666666>; - }; -}; - -&sd_emmc_b { - status = "disabled"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&remote{ - status = "disable"; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - -&lcd { - clk_path = <1>; -}; - -&gpu{ - tbl = <&dvfs285_cfg - &dvfs400_cfg - &dvfs500_cfg - &dvfs666_cfg - &dvfs800_cfg - &dvfs800_cfg>; -}; diff --git a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts b/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts deleted file mode 100644 index 1a08aac1df00..000000000000 --- a/arch/arm64/boot/dts/amlogic/sm1_s905d3_ac202_1g.dts +++ /dev/null @@ -1,1914 +0,0 @@ -/* - * arch/arm64/boot/dts/amlogic/sm1_s905d3_ac200.dts - * - * Copyright (C) 2017 Amlogic, Inc. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ - -/dts-v1/; - -#include "mesonsm1.dtsi" -#include "partition_mbox_normal.dtsi" -#include "mesonsm1_skt-panel.dtsi" - -/ { - model = "Amlogic"; - amlogic-dt-id = "sm1_ac202_1g"; - compatible = "amlogic, g12a"; - interrupt-parent = <&gic>; - #address-cells = <2>; - #size-cells = <2>; - - aliases { - serial0 = &uart_AO; - serial1 = &uart_A; - serial2 = &uart_B; - serial3 = &uart_C; - serial4 = &uart_AO_B; - tsensor0 = &p_tsensor; - tsensor1 = &d_tsensor; - i2c0 = &i2c0; - i2c1 = &i2c1; - i2c2 = &i2c2; - i2c3 = &i2c3; - i2c4 = &i2c_AO; - }; - - memory@00000000 { - device_type = "memory"; - linux,usable-memory = <0x0 0x000000 0x0 0x40000000>; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - /* global autoconfigured region for contiguous allocations */ - ramoops@0x07400000 { - compatible = "ramoops"; - reg = <0x0 0x07400000 0x0 0x00100000>; - record-size = <0x8000>; - console-size = <0x8000>; - ftrace-size = <0x40000>; - }; - - secmon_reserved:linux,secmon { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x400000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x05000000 0x0 0x400000>; - }; - secos_reserved:linux,secos { - status = "disable"; - compatible = "amlogic, aml_secos_memory"; - reg = <0x0 0x05300000 0x0 0x2000000>; - no-map; - }; - logo_reserved:linux,meson-fb { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x800000>; - alignment = <0x0 0x400000>; - alloc-ranges = <0x0 0x3f800000 0x0 0x800000>; - }; - ion_cma_reserved:linux,ion-dev { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x3000000>; - alignment = <0x0 0x400000>; - }; - //di_reserved:linux,di { - //compatible = "amlogic, di-mem"; - /* buffer_size = 3621952(yuv422 8bit) */ - /* 4179008(yuv422 10bit full pack mode) */ - /** 10x3621952=34.6M(0x23) support 8bit **/ - /** 10x4736064=45.2M(0x2e) support 12bit **/ - /** 10x4179008=40M(0x28) support 10bit **/ - //size = <0x0 0x2800000>; - //no-map; - //}; - /*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 0x02800000>; - alignment = <0x0 0x400000>; - }; - /* POST PROCESS MANAGER */ - ppmgr_reserved:linux,ppmgr { - compatible = "shared-dma-pool"; - size = <0x0 0x0>; - }; - - codec_mm_cma:linux,codec_mm_cma { - compatible = "shared-dma-pool"; - reusable; - /* ion_codec_mm max can alloc size 80M*/ - size = <0x0 0xd000000>; - alignment = <0x0 0x400000>; - linux,contiguous-region; - }; - /* codec shared reserved */ - codec_mm_reserved:linux,codec_mm_reserved { - compatible = "amlogic, codec-mm-reserved"; - size = <0x0 0x0>; - alignment = <0x0 0x100000>; - //no-map; - }; - /* vdin0 CMA pool */ - vdin0_cma_reserved:linux,vdin0_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16+4 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - /* vdin1 CMA pool */ - vdin1_cma_reserved:linux,vdin1_cma { - compatible = "shared-dma-pool"; - reusable; - /* 1920x1080x2x4 =16 M */ - size = <0x0 0x04000000>; - alignment = <0x0 0x400000>; - }; - vm0_cma_reserved:linux,vm0_cma { - compatible = "shared-dma-pool"; - reusable; - size = <0x0 0x2000000>; - alignment = <0x0 0x400000>; - }; - }; - - galcore { - status = "okay"; - }; - gpioleds { - compatible = "gpio-leds"; - status = "okay"; - - sys_led { - label="sys_led"; - gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; - default-state ="on"; - }; - }; - - cvbsout { - compatible = "amlogic, cvbsout-sm1"; - dev_name = "cvbsout"; - status = "okay"; - clocks = <&clkc CLKID_VCLK2_ENCI - &clkc CLKID_VCLK2_VENCI0 - &clkc CLKID_VCLK2_VENCI1 - &clkc CLKID_DAC_CLK>; - clock-names = "venci_top_gate", - "venci_0_gate", - "venci_1_gate", - "vdac_clk_gate"; - /* clk path */ - /* 0:vid_pll vid2_clk */ - /* 1:gp0_pll vid2_clk */ - /* 2:vid_pll vid1_clk */ - /* 3:gp0_pll vid1_clk */ - clk_path = <2>; - - /* performance: reg_address, reg_value */ - /* sm1 */ - performance = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x8080 - 0x1b05 0xfd - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - performance_sarft = <0x1bf0 0x9 - 0x1b56 0x333 - 0x1b12 0x0 - 0x1b05 0x9 - 0x1c59 0xfc48 - 0xffff 0x0>; /* ending flag */ - performance_revB_telecom = <0x1bf0 0x9 - 0x1b56 0x546 - 0x1b12 0x8080 - 0x1b05 0x9 - 0x1c59 0xf850 - 0xffff 0x0>; /* ending flag */ - }; - - bt-dev{ - compatible = "amlogic, bt-dev"; - dev_name = "bt-dev"; - status = "okay"; - gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; - gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>; - }; - - wifi{ - compatible = "amlogic, aml_wifi"; - dev_name = "aml_wifi"; - status = "okay"; - interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - irq_trigger_type = "GPIO_IRQ_LOW"; - power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>; - dhd_static_buf; //if use bcm wifi, config dhd_static_buf - pinctrl-names = "default"; - pinctrl-0 = <&pwm_e_pins>; - pwm_config = <&wifi_pwm_conf>; - }; - - wifi_pwm_conf:wifi_pwm_conf{ - pwm_channel1_conf { - pwms = <&pwm_ef MESON_PWM_0 30541 0>; - duty-cycle = <15270>; - times = <10>; - }; - pwm_channel2_conf { - pwms = <&pwm_ef MESON_PWM_2 30500 0>; - duty-cycle = <15250>; - times = <12>; - }; - }; - - codec_mm { - compatible = "amlogic, codec, mm"; - memory-region = <&codec_mm_cma &codec_mm_reserved>; - dev_name = "codec_mm"; - status = "okay"; - }; - - picdec_cma_reserved:linux,picdec { - compatible = "shared-dma-pool"; - reusable; - size = <0x0>; - alignment = <0x0>; - linux,contiguous-region; - }; - - picdec { - compatible = "amlogic, picdec"; - memory-region = <&picdec_cma_reserved>; - dev_name = "picdec"; - status = "okay"; - }; - - ppmgr { - compatible = "amlogic, ppmgr"; - memory-region = <&ppmgr_reserved>; - dev_name = "ppmgr"; - status = "okay"; - }; - - deinterlace { - compatible = "amlogic, deinterlace"; - status = "okay"; - /* 0:use reserved; 1:use cma; 2:use cma as reserved */ - flag_cma = <1>; - //memory-region = <&di_reserved>; - memory-region = <&di_cma_reserved>; - interrupts = <0 46 1 - 0 40 1>; - interrupt-names = "pre_irq", "post_irq"; - clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>, - <&clkc CLKID_VPU_CLKB_COMP>; - clock-names = "vpu_clkb_tmp_composite", - "vpu_clkb_composite"; - clock-range = <334 667>; - /* buffer-size = <3621952>;(yuv422 8bit) */ - buffer-size = <4074560>;/*yuv422 fullpack*/ - /* reserve-iomap = "true"; */ - /* if enable nr10bit, set nr10bit-support to 1 */ - post-wr-support = <1>; - nr10bit-support = <1>; - nrds-enable = <1>; - pps-enable = <1>; - }; - ionvideo { - compatible = "amlogic, ionvideo"; - dev_name = "ionvideo"; - status = "okay"; - }; - vm0 { - compatible = "amlogic, vm"; - memory-region = <&vm0_cma_reserved>; - dev_name = "vm0"; - status = "disabled"; - vm_id = <0>; - }; - - amvdec_656in { - /*bt656 gpio conflict with i2c0*/ - compatible = "amlogic, amvdec_656in"; - dev_name = "amvdec_656in"; - status = "disabled"; - reg = <0x0 0xffe02000 0x0 0x7c>; - clocks = <&clkc CLKID_BT656_COMP>, - <&clkc CLKID_BT656>; - clock-names = "cts_bt656_clk1", - "clk_gate_bt656"; - /* bt656in1, bt656in2 */ - bt656in1 { - bt656_id = <1>; - status = "disabled"; - }; - }; - - aml_cams { - compatible = "amlogic, cams_prober"; - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&gen_clk_ee_z>; - clocks = <&clkc CLKID_GEN_CLK>; - clock-names = "g12a_24m"; - cam_0{ - cam_name = "gc2145_mipi"; - front_back = <0>; - camera-i2c-bus = <&i2c0>; - gpio_pwdn-gpios = <&gpio GPIOZ_2 GPIO_ACTIVE_HIGH>; - gpio_rst-gpios = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>; - mirror_flip = <1>; - vertical_flip = <1>; - spread_spectrum = <0>; - bt_path = "csi"; - interface = "mipi"; - clk_channel = "a"; - bt_path_count = <1>; - status = "okay"; - }; - }; - - amvdec_csi { - compatible = "amlogic, amvdec_csi"; - status = "disabled"; - csi_id = <0>; - reg = <0x0 0xff650000 0x0 0x00000100>, - <0x0 0xffe0c000 0x0 0x00000100>, - <0x0 0xffe0d000 0x0 0x00000100>; - reg-names = "csi_phy", "csi_host", "csi_adapt"; - clocks = <&clkc CLKID_CSI_ADAPT_CLK_COMP>, - <&clkc CLKID_MIPI_CSI_PHY_CLK_COMP>; - clock-names = "cts_csi_adapt_clk_composite", - "cts_csi_phy_clk_composite"; - interrupts = <0 1 0>; - interrupt-names = "csi_phy"; - }; - - gpio_keypad{ - compatible = "amlogic, gpio_keypad"; - status = "okay"; - scan_period = <20>; - key_num = <4>; - key_name = "power", "vol-", "vol+", "mic_mute"; - key_code = <116 114 115 65>; - key-gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH - &gpio GPIOC_3 GPIO_ACTIVE_HIGH - &gpio GPIOC_0 GPIO_ACTIVE_HIGH - &gpio GPIOA_0 GPIO_ACTIVE_HIGH>; - detect_mode = <0>;/*0:polling mode, 1:irq mode*/ - }; - - adc_keypad { - compatible = "amlogic, adc_keypad"; - status = "disabled"; - key_name = "vol-", "vol+", "enter"; - key_num = <3>; - io-channels = <&saradc SARADC_CH2>; - io-channel-names = "key-chan-2"; - key_chan = ; - key_code = <114 115 97>; - key_val = <143 266 389>; //val=voltage/1800mV*1023 - key_tolerance = <40 40 40>; - }; - - unifykey{ - compatible = "amlogic, unifykey"; - status = "ok"; - unifykey-num = <17>; - 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>; - - 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-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 = "PlayReadykeybox25"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_12:key_12{ - key-name = "prpubkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_13:key_13{ - key-name = "prprivkeybox";// PlayReady - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_14:key_14{ - key-name = "attestationkeybox";// attestation key - key-device = "secure"; - key-permit = "read","write","del"; - }; - keysn_15:key_15{ - key-name = "region_code"; - key-device = "normal"; - key-permit = "read","write","del"; - }; - keysn_16:key_16{ - key-name = "netflix_mgkid"; - key-device = "secure"; - key-permit = "read","write","del"; - }; - };//End unifykey - - efusekey:efusekey{ - keynum = <4>; - key0 = <&key_0>; - key1 = <&key_1>; - key2 = <&key_2>; - key3 = <&key_3>; - key_0:key_0{ - keyname = "mac"; - offset = <0>; - size = <6>; - }; - key_1:key_1{ - keyname = "mac_bt"; - offset = <6>; - size = <6>; - }; - key_2:key_2{ - keyname = "mac_wifi"; - offset = <12>; - size = <6>; - }; - key_3:key_3{ - keyname = "usid"; - offset = <18>; - size = <16>; - }; - };//End efusekey - - amlvecm { - compatible = "amlogic, vecm"; - dev_name = "aml_vecm"; - status = "okay"; - gamma_en = <1>;/*1:enabel ;0:disable*/ - wb_en = <0>;/*1:enabel ;0:disable*/ - cm_en = <0>;/*1:enabel ;0:disable*/ - /*0: 709/601 1: bt2020*/ - tx_op_color_primary = <0>; - }; - - amdolby_vision { - compatible = "amlogic, dolby_vision_sm1"; - dev_name = "aml_amdolby_vision_driver"; - status = "okay"; - tv_mode = <0>;/*1:enabel ;0:disable*/ - }; - - /* Audio Related start */ - pdm_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, pdm_dummy_codec"; - status = "okay"; - }; - dummy_codec:dummy{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_dummy_codec"; - status = "okay"; - }; - amlogic_codec:t9015{ - #sound-dai-cells = <0>; - compatible = "amlogic, aml_codec_T9015"; - reg = <0x0 0xFF632000 0x0 0x2000>; - is_auge_used = <1>; /* meson or auge chipset used */ - tocodec_inout = <1>; - tdmout_index = <1>; - ch0_sel = <0>; - ch1_sel = <1>; - - status = "okay"; - }; - - auge_sound { - compatible = "amlogic, g12a-sound-card"; - aml-audio-card,name = "AML-AUGESOUND"; - - /*avout mute gpio*/ - avout_mute-gpios = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>; - - aml-audio-card,dai-link@0 { - format = "dsp_a"; - mclk-fs = <512>; - //continuous-clock; - //bitclock-inversion; - //frame-inversion; - /* master mode */ - bitclock-master = <&tdma>; - frame-master = <&tdma>; - /* slave mode */ - /* - * bitclock-master = <&tdmacodec>; - * frame-master = <&tdmacodec>; - */ - suffix-name = "alsaPORT-pcm"; - tdmacpu: cpu { - sound-dai = <&tdma>; - dai-tdm-slot-tx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-rx-mask = - <1 1 1 1 1 1 1 1>; - dai-tdm-slot-num = <8>; - dai-tdm-slot-width = <32>; - system-clock-frequency = <24576000>; - }; - tdmacodec: codec { - sound-dai = <&dummy_codec &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@1 { - format = "i2s";// "dsp_a"; - 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 - * what's the dai link used for - */ - suffix-name = "alsaPORT-i2s"; - 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-tx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-rx-mask = - * <1 1 1 1 1 1 1 1>; - * dai-tdm-slot-num = <8>; - */ - dai-tdm-slot-width = <32>; - system-clock-frequency = <12288000>; - }; - tdmbcodec: codec { - sound-dai = <&dummy_codec &dummy_codec - &amlogic_codec &ad82584f_62>; - }; - }; - - 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-tdm"; - 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 &dummy_codec>; - }; - }; - - aml-audio-card,dai-link@3 { - mclk-fs = <64>; - /* suffix-name, sync with android audio hal - * what's the dai link used for - */ - suffix-name = "alsaPORT-pdm"; - cpu { - sound-dai = <&pdm>; - }; - codec { - sound-dai = <&pdm_codec>; - }; - }; - - aml-audio-card,dai-link@4 { - mclk-fs = <128>; - /* 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, sync with android audio hal - * what's the dai link used for - */ - 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-earc"; - cpu { - sound-dai = <&earc>; - 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>; - }; - }; - }; - audiolocker: locker { - compatible = "amlogic, audiolocker"; - clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT - &clkaudio CLKID_AUDIO_LOCKER_IN - &clkaudio CLKID_AUDIO_MCLK_D - &clkaudio CLKID_AUDIO_MCLK_E - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL2>; - clock-names = "lock_out", "lock_in", "out_src", - "in_src", "out_calc", "in_ref"; - interrupts = ; - interrupt-names = "irq"; - frequency = <49000000>; /* pll */ - dividor = <49>; /* locker's parent */ - status = "disabled"; - }; - /* Audio Related end */ - dvb { - compatible = "amlogic, dvb"; - dev_name = "dvb"; - status = "okay"; -// fe0_mode = "internal"; -// fe0_tuner = <&tuner>; - /*"parallel","serial","disable"*/ -// ts2 = "parallel"; -// ts2_control = <0>; -// ts2_invert = <0>; - interrupts = <0 23 1 - 0 5 1 - 0 53 1 - 0 19 1 - 0 25 1 - 0 18 1 - 0 24 1>; - interrupt-names = "demux0_irq", - "demux1_irq", - "demux2_irq", - "dvr0_irq", - "dvr1_irq", - "dvrfill0_fill", - "dvrfill1_flush"; - clocks = <&clkc CLKID_DEMUX - &clkc CLKID_AHB_ARB0 - &clkc CLKID_DOS_PARSER>; - clock-names = "demux", "ahbarb0", "uparsertop"; - }; - tuner: tuner { - compatible = "amlogic, tuner"; - status = "okay"; - tuner_name = "mxl661_tuner"; - tuner_i2c_adap = <&i2c1>; - tuner_i2c_addr = <0x60>; - tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */ - tuner_xtal_mode = <0>; - /* NO_SHARE_XTAL(0) - * SLAVE_XTAL_SHARE(1) - */ - tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */ - }; - - - p_tsensor: p_tsensor@ff634800 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-pthermal"; - status = "okay"; - reg = <0x0 0xff634800 0x0 0x50>, - <0x0 0xff800268 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 35 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - d_tsensor: d_tsensor@ff634c00 { - compatible = "amlogic, r1p1-tsensor"; - device_name = "meson-dthermal"; - status = "okay"; - reg = <0x0 0xff634c00 0x0 0x50>, - <0x0 0xff800230 0x0 0x4>; - cal_type = <0x1>; - cal_a = <324>; - cal_b = <424>; - cal_c = <3159>; - cal_d = <9411>; - rtemp = <115000>; - interrupts = <0 36 0>; - clocks = <&clkc CLKID_TS_COMP>; /* CLKID_TS_COMP>;*/ - clock-names = "ts_comp"; - #thermal-sensor-cells = <1>; - }; - - meson_cooldev: meson-cooldev@0 { - status = "okay"; - compatible = "amlogic, meson-cooldev"; - device_name = "mcooldev"; - cooling_devices { - cpufreq_cool_cluster0 { - min_state = <1000000>; - dyn_coeff = <125>; - cluster_id = <0>; - node_name = "cpufreq_cool0"; - device_type = "cpufreq"; - }; - cpucore_cool_cluster0 { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "cpucore_cool0"; - device_type = "cpucore"; - }; - gpufreq_cool { - min_state = <400>; - dyn_coeff = <215>; - gpu_pp = <2>; - cluster_id = <0>; - node_name = "gpufreq_cool0"; - device_type = "gpufreq"; - }; - gpucore_cool { - min_state = <1>; - dyn_coeff = <0>; - cluster_id = <0>; - node_name = "gpucore_cool0"; - device_type = "gpucore"; - }; - }; - cpufreq_cool0:cpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - cpucore_cool0:cpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpufreq_cool0:gpufreq_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - gpucore_cool0:gpucore_cool0 { - #cooling-cells = <2>; /* min followed by max */ - }; - }; - /*meson cooling devices end*/ - - thermal-zones { - soc_thermal: soc_thermal { - polling-delay = <1000>; - polling-delay-passive = <100>; - sustainable-power = <1410>; - thermal-sensors = <&p_tsensor 0>; - trips { - pswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - pcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - phot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - pcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - cooling-maps { - cpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpufreq_cool0 0 4>; - contribution = <1024>; - }; - cpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&cpucore_cool0 0 3>; - contribution = <1024>; - }; - gpufreq_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpufreq_cool0 0 4>; - contribution = <1024>; - }; - gpucore_cooling_map { - trip = <&pcontrol>; - cooling-device = <&gpucore_cool0 0 2>; - contribution = <1024>; - }; - }; - }; - ddr_thermal: ddr_thermal { - polling-delay = <2000>; - polling-delay-passive = <1000>; - sustainable-power = <1410>; - thermal-sensors = <&d_tsensor 1>; - trips { - dswitch_on: trip-point@0 { - temperature = <60000>; - hysteresis = <5000>; - type = "passive"; - }; - dcontrol: trip-point@1 { - temperature = <75000>; - hysteresis = <5000>; - type = "passive"; - }; - dhot: trip-point@2 { - temperature = <85000>; - hysteresis = <5000>; - type = "hot"; - }; - dcritical: trip-point@3 { - temperature = <110000>; - hysteresis = <1000>; - type = "critical"; - }; - }; - - }; - }; - /*thermal zone end*/ - - cpu_opp_table0: cpu_opp_table0 { - compatible = "operating-points-v2"; - opp-shared; - - opp00 { - opp-hz = /bits/ 64 <100000000>; - opp-microvolt = <730000>; - }; - opp01 { - opp-hz = /bits/ 64 <250000000>; - opp-microvolt = <730000>; - }; - opp02 { - opp-hz = /bits/ 64 <500000000>; - opp-microvolt = <730000>; - }; - opp03 { - opp-hz = /bits/ 64 <667000000>; - opp-microvolt = <750000>; - }; - opp04 { - opp-hz = /bits/ 64 <1000000000>; - opp-microvolt = <770000>; - }; - opp05 { - opp-hz = /bits/ 64 <1200000000>; - opp-microvolt = <780000>; - }; - opp06 { - opp-hz = /bits/ 64 <1404000000>; - opp-microvolt = <790000>; - }; - opp07 { - opp-hz = /bits/ 64 <1500000000>; - opp-microvolt = <800000>; - }; - opp08 { - opp-hz = /bits/ 64 <1608000000>; - opp-microvolt = <810000>; - }; - opp09 { - opp-hz = /bits/ 64 <1704000000>; - opp-microvolt = <850000>; - }; - opp10 { - opp-hz = /bits/ 64 <1800000000>; - opp-microvolt = <900000>; - }; - opp11 { - opp-hz = /bits/ 64 <1908000000>; - opp-microvolt = <950000>; - }; - }; - - cpufreq-meson { - compatible = "amlogic, cpufreq-meson"; - pinctrl-names = "default"; - pinctrl-0 = <&pwm_ao_d_pins3>; - status = "okay"; - }; - -}; /* end of / */ - -&meson_fb { - status = "okay"; - display_size_default = <1920 1080 1920 2160 32>; - mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>; - logo_addr = "0x3f800000"; - mem_alloc = <0>; - pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ -}; - -&pwm_AO_cd { - status = "okay"; -}; - -&i2c0 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c0_master_pins1>; - clock-frequency = <100000>; - - gt9xx@5d { - compatible = "goodix,gt9xx"; - status = "disabled"; - reg = <0x5d>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - }; - - ftxx@38 { - compatible = "focaltech,fts"; - status = "disabled"; - reg = <0x38>; - reset-gpio = <&gpio GPIOZ_9 0x00>; - irq-gpio = <&gpio GPIOZ_3 0x00>; - x_max = <600>; - y_max = <1024>; - max-touch-number = <10>; - }; -}; - -&i2c2 { - status = "disabled"; - pinctrl-names="default"; - pinctrl-0=<&i2c2_master_pins3>; - clock-frequency = <100000>; -}; - -&i2c3 { - status = "okay"; - pinctrl-names="default"; - pinctrl-0=<&i2c3_master_pins2>; - clock-frequency = <100000>; /* default 100k */ - - hyn@1A { - compatible = "hyn,cst226"; - status = "okay"; - reg = <0x1a>; - reset-gpio = <&gpio GPIOA_5 0x00>; - irq-gpio = <&gpio GPIOA_6 0x00>; - }; - - /* for ref board */ - ad82584f_62: ad82584f_62@62 { - compatible = "ESMT, ad82584f"; - #sound-dai-cells = <0>; - reg = <0x31>; - status = "okay"; - reset_pin = <&gpio_ao GPIOAO_9 0>; - no_mclk; - }; - - bl_extern_i2c { - compatible = "bl_extern, i2c"; - dev_name = "lp8556"; - reg = <0x2c>; - status = "disabled"; - }; -}; - -&audiobus { - tdma: tdm@0 { - compatible = "amlogic, sm1-snd-tdma"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 1>; - dai-tdm-oe-lane-slot-mask-out = <1 1>; - dai-format = "dsp_a"; - dai-tdm-slot-tx-mask = <1>; - dai-tdm-slot-rx-mask = <1>; - dai-tdm-slot-num = <2>; - dai-tdm-slot-width = <16>; - dai-tdm-clk-sel = <0>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_A - &clkc CLKID_MPLL0>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmout_a &tdmin_a>; - - status = "okay"; - }; - - tdmb: tdm@1 { - compatible = "amlogic, sm1-snd-tdmb"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <0 1 0 0>; - dai-tdm-lane-slot-mask-out = <1 0 0 0>; - //dai-tdm-lane-slot-mask-in = <0 0 0 0 0 0 0 0>; - //dai-tdm-lane-slot-mask-out = <1 1 1 1 1 1 1 1>; - dai-tdm-clk-sel = <1>; - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkaudio CLKID_AUDIO_MCLK_PAD0 - &clkc CLKID_MPLL1 - &clkc CLKID_MPLL0 - &clkaudio CLKID_AUDIO_SPDIFOUT_A>; - clock-names = "mclk", "mclk_pad", "clk_srcpll", - "samesource_srcpll", "samesource_clk"; - pinctrl-names = "tdm_pins"; - /*pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;*/ - pinctrl-0 = < &tdmout_b &tdmin_b>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - /* - * 0: tdmout_a; - * 1: tdmout_b; - * 2: tdmout_c; - * 3: spdifout; - * 4: spdifout_b; - */ - samesource_sel = <3>; - - /*enable default mclk(12.288M), before extern codec start*/ - start_clk_enable = <1>; - - /*tdm clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - - tdmc: tdm@2 { - compatible = "amlogic, sm1-snd-tdmc"; - #sound-dai-cells = <0>; - dai-tdm-lane-slot-mask-in = <1 0 0 0>; - #dai-tdm-lane-slot-mask-out = <1 0 1 1>; - #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>; - #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>; - dai-tdm-clk-sel = <2>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_C - &clkc CLKID_MPLL2>; - clock-names = "mclk", "clk_srcpll"; - pinctrl-names = "tdm_pins"; - pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>; - mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */ - - status = "okay"; - }; - - tdmlb:tdm@3 { - compatible = "amlogic, sm1-snd-tdmlb"; - #sound-dai-cells = <0>; - - dai-tdm-lane-lb-slot-mask-in = <1 0 0 0>; - dai-tdm-clk-sel = <1>; - - clocks = <&clkaudio CLKID_AUDIO_MCLK_B - &clkc CLKID_MPLL1>; - clock-names = "mclk", "clk_srcpll"; - - /* - * select tdmin_lb src; - * AXG - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA - * 4: PAD_TDMINB - * 5: PAD_TDMINC - * - * G12A/G12B - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D*, oe pin - * 7: PAD_TDMINB_D*, oe pin - * - * TL1/SM1 - * 0: TDMOUTA - * 1: TDMOUTB - * 2: TDMOUTC - * 3: PAD_TDMINA_DIN* - * 4: PAD_TDMINB_DIN* - * 5: PAD_TDMINC_DIN* - * 6: PAD_TDMINA_D* - * 7: PAD_TDMINB_D* - * 8: PAD_TDMINC_D* - * 9: HDMIRX_I2S - * 10: ACODEC_ADC - */ - lb-src-sel = <1>; - - status = "disabled"; - }; - - spdifa: spdif@0 { - compatible = "amlogic, sm1-snd-spdif-a"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 - &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", "fixed_clk", "gate_spdifin", - "gate_spdifout", "clk_spdifin", "clk_spdifout"; - interrupts = - ; - - interrupt-names = "irq_spdifin"; - pinctrl-names = "spdif_pins"; - pinctrl-0 = <&spdifout>;/* bob remove &spdifin*/ - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - /*spdif clk tuning enable*/ - clk_tuning_enable = <1>; - - status = "okay"; - }; - spdifb: spdif@1 { - compatible = "amlogic, sm1-snd-spdif-b"; - #sound-dai-cells = <0>; - clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ - &clkaudio CLKID_AUDIO_GATE_SPDIFOUT_B - &clkaudio CLKID_AUDIO_SPDIFOUT_B>; - clock-names = "sysclk", - "gate_spdifout", "clk_spdifout"; - - status = "okay"; - }; - pdm: pdm { - compatible = "amlogic, sm1-snd-pdm"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1>; - clock-names = "gate", - "sysclk_srcpll", - "dclk_srcpll", - "pdm_dclk", - "pdm_sysclk"; - - pinctrl-names = "pdm_pins"; - pinctrl-0 = <&pdmin>; - - /* mode 0~4, defalut:1 */ - filter_mode = <1>; - - status = "okay"; - }; - - earc:earc { - compatible = "amlogic, sm1-snd-earc"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_EARCRX - &clkaudio CLKID_EARCRX_CMDC - &clkaudio CLKID_EARCRX_DMAC - &clkc CLKID_FCLK_DIV5 - &clkc CLKID_FCLK_DIV3 - >; - clock-names = "rx_gate", - "rx_cmdc", - "rx_dmac", - "rx_cmdc_srcpll", - "rx_dmac_srcpll"; - - interrupts = < - GIC_SPI 88 IRQ_TYPE_EDGE_RISING - GIC_SPI 87 IRQ_TYPE_EDGE_RISING - >; - interrupt-names = "rx_cmdc", "rx_dmac"; - - status = "okay"; - }; - - asrca: resample@0 { - compatible = "amlogic, sm1-resample"; - clocks = <&clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_MCLK_F - &clkaudio CLKID_AUDIO_RESAMPLE_A>; - clock-names = "resample_pll", "resample_src", "resample_clk"; - /*same with toddr_src - * TDMIN_A, 0 - * TDMIN_B, 1 - * TDMIN_C, 2 - * SPDIFIN, 3 - * PDMIN, 4 - * NONE, - * TDMIN_LB, 6 - * LOOPBACK, 7 - */ - resample_module = <4>; - status = "disabled"; - }; - - 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>; - - status = "okay"; - }; - - loopbacka:loopback@0 { - compatible = "amlogic, sm1-loopbacka"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "okay"; - }; - - loopbackb:loopback@1 { - compatible = "amlogic, sm1-loopbackb"; - #sound-dai-cells = <0>; - - clocks = <&clkaudio CLKID_AUDIO_GATE_PDM - &clkc CLKID_FCLK_DIV3 - &clkc CLKID_MPLL3 - &clkaudio CLKID_AUDIO_PDMIN0 - &clkaudio CLKID_AUDIO_PDMIN1 - &clkc CLKID_MPLL0 - &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>; - - status = "disabled"; - }; - aed:effect { - compatible = "amlogic, snd-effect-v3"; - #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 = <0x3>; - status = "disabled"; - }; -}; /* end of audiobus */ - -&pinctrl_periphs { - tdmout_a: tdmout_a { - mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */ - groups = "tdma_sclk", - "tdma_fs", - "tdma_dout0", - "tdma_dout1"; - function = "tdma_out"; - }; - }; - - tdmin_a: tdmin_a { - mux { /* GPIOX_8 */ - groups = "tdma_din0", - "tdma_din1"; - function = "tdma_in"; - }; - }; - - //tdmb_mclk: tdmb_mclk { - // mux { - // groups = "mclk0_a"; - // function = "mclk0"; - // drive-strength = <2>; - // }; - //}; - tdmout_b: tdmout_b { - mux { /* GPIOA_1, GPIOA_2, GPIOA_3, GPIOA_4, */ - /* GPIOA_5, GPIOA_6, GPIOA_7, GPIOA_8, */ - /* GPIOA_9, GPIOA_0*/ - groups = "tdmb_sclk", - "tdmb_fs", - "tdmb_dout0"; - //"tdmb_dout1", - //"tdmb_dout2", - //"tdmb_dout3_a", - //"tdmb_dout4_a", - //"tdmb_dout5_a", - //"tdmb_dout6_a", - //"tdmb_dout7_a0"; - function = "tdmb_out"; - drive-strength = <2>; - }; - }; - - tdmin_b:tdmin_b { - mux { /* GPIOA_4 */ - groups = "tdmb_din1" - /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/; - function = "tdmb_in"; - drive-strength = <2>; - }; - }; - - tdmc_mclk: tdmc_mclk { - mux { /* GPIOA_11 */ - groups = "mclk1_a"; - function = "mclk1"; - }; - }; - - tdmout_c:tdmout_c { - mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/ - groups = "tdmc_sclk_a", - "tdmc_fs_a", - "tdmc_dout0_a" - /*, "tdmc_dout2", - * "tdmc_dout3" - */; - function = "tdmc_out"; - }; - }; - - tdmin_c:tdmin_c { - mux { /* GPIOA_10 */ - groups = "tdmc_din0_a"; - function = "tdmc_in"; - }; - }; - - /*GPIOH_5 */ - /*bob remove spdifin - *spdifin: spdifin { - * mux {/* GPIOH_5 - * groups = "spdif_in_h"; - * function = "spdif_in"; - * }; - *}; - */ - - pdmin: pdmin { - mux { /* GPIOA_5, GPIOA_6, GPIOA_8, GPIOA_9, GPIOA_7 */ - groups = "pdm_din0_a", - "pdm_din1_a", - /*"pdm_din2_a",*/ - /*"pdm_din3_a",*/ - "pdm_dclk_a"; - function = "pdm"; - }; - }; - - /* - *bl_pwm_off_pins:bl_pwm_off_pin { - * mux { - * pins = "GPIOH_5"; - * function = "gpio_periphs"; - * output-high; - * }; - *}; - */ - - clk12_24_z_pins:clk12_24_z_pins { - mux { - groups = "clk12_24_z"; - function = "clk12_24_ee"; - drive-strength = <3>; - }; - }; - - gen_clk_ee_z: gen_clk_ee_z { - mux { - groups="gen_clk_ee_z"; - function="gen_clk_ee"; - drive-strength = <3>; - }; - }; - - cam_dvp_pins:cam_dvp_pins { - mux { - groups = "bt656_a_vs", "bt656_a_hs", "bt656_a_clk", - "bt656_a_din0", "bt656_a_din1", "bt656_a_din2", - "bt656_a_din3", "bt656_a_din4", "bt656_a_din5", - "bt656_a_din6", "bt656_a_din7"; - function = "bt656"; - }; - }; - - -}; /* end of pinctrl_periphs */ - -&pinctrl_aobus { - spdifout: spdifout { - mux { /* GPIOAO_10 */ - groups = "spdif_out_ao"; - function = "spdif_out_ao"; - }; - }; -}; /* end of pinctrl_aobus */ - -&audio_data { - status = "okay"; -}; - -/* Audio Related End */ - -&pwm_ef { - status = "okay"; -}; - -&dwc3 { - status = "okay"; -}; - -&usb2_phy_v2 { - status = "okay"; - portnum = <2>; -}; - -&usb3_phy_v2 { - status = "okay"; - portnum = <1>; - otg = <0>; - /*gpio-vbus-power = "GPIOH_6";*/ - /*gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;*/ -}; - -&dwc2_a { - status = "okay"; - /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ - controller-type = <1>; -}; -ðmac { - status = "disabled"; - pinctrl-names = "internal_eth_pins"; - pinctrl-0 = <&internal_eth_pins>; - mc_val = <0x4be04>; - - internal_phy=<1>; -}; - -&uart_A { - status = "okay"; -}; - -/*if you want to use vdin just modify status to "ok"*/ -&vdin0 { - memory-region = <&vdin0_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - *bit4:support yuv422 10bit full pack mode (from txl new add) - */ - tv_bit_mode = <0x15>; -}; -&vdin1 { - memory-region = <&vdin1_cma_reserved>; - status = "okay"; - /*vdin write mem color depth support: - *bit0:support 8bit - *bit1:support 9bit - *bit2:support 10bit - *bit3:support 12bit - */ - tv_bit_mode = <1>; -}; - - -&sd_emmc_c { - status = "okay"; - emmc { - caps = "MMC_CAP_8_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - /* "MMC_CAP_1_8V_DDR", */ - "MMC_CAP_HW_RESET", - "MMC_CAP_ERASE", - "MMC_CAP_CMD23", - "MMC_CAP_DRIVER_TYPE_D"; - caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400"; - f_min = <400000>; - f_max = <166666666>; - }; -}; - -&sd_emmc_b { - status = "disabled"; - sd { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED"; - f_min = <400000>; - f_max = <50000000>; - }; -}; - - -&sd_emmc_a { - status = "okay"; - sdio { - caps = "MMC_CAP_4_BIT_DATA", - "MMC_CAP_MMC_HIGHSPEED", - "MMC_CAP_SD_HIGHSPEED", - "MMC_CAP_NONREMOVABLE", - "MMC_CAP_UHS_SDR12", - "MMC_CAP_UHS_SDR25", - "MMC_CAP_UHS_SDR50", - "MMC_CAP_UHS_SDR104", - "MMC_PM_KEEP_POWER", - "MMC_CAP_SDIO_IRQ"; - f_min = <400000>; - f_max = <200000000>; - }; -}; - -&nand { - status = "disabled"; - plat-names = "bootloader","nandnormal"; - plat-num = <2>; - plat-part-0 = <&bootloader>; - plat-part-1 = <&nandnormal>; - bootloader: bootloader{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <1>; - part_num = <0>; - rb_detect = <1>; - }; - nandnormal: nandnormal{ - enable_pad ="ce0"; - busy_pad = "rb0"; - timming_mode = "mode5"; - bch_mode = "bch8_1k"; - plane_mode = "twoplane"; - t_rea = <20>; - t_rhoh = <15>; - chip_num = <2>; - part_num = <3>; - partition = <&nand_partitions>; - rb_detect = <1>; - }; - nand_partitions:nand_partition{ - /* - * if bl_mode is 1, tpl size was generate by - * fip_copies * fip_size which - * will not skip bad when calculating - * the partition size; - * - * if bl_mode is 0, - * tpl partition must be comment out. - */ - tpl{ - offset=<0x0 0x0>; - size=<0x0 0x0>; - }; - logo{ - offset=<0x0 0x0>; - size=<0x0 0x200000>; - }; - recovery{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - boot{ - offset=<0x0 0x0>; - size=<0x0 0x1000000>; - }; - system{ - offset=<0x0 0x0>; - size=<0x0 0x4000000>; - }; - data{ - offset=<0xffffffff 0xffffffff>; - size=<0x0 0x0>; - }; - }; -}; - -&remote{ - status = "disable"; -}; - -&pcie_A { - reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>; - status = "disable"; -}; - -&meson_cooldev { - status = "okay"; -}; - -&defendkey { - status = "okay"; -}; - -&lcd { - clk_path = <1>; -}; - -&gpu{ - tbl = <&dvfs285_cfg - &dvfs400_cfg - &dvfs500_cfg - &dvfs666_cfg - &dvfs800_cfg - &dvfs800_cfg>; -}; -&i2c1 { - status = "okay"; - clock-frequency = <300000>; - pinctrl-names="default"; - pinctrl-0=<&i2c1_h_pins>; - - lcd_extern_i2c0: lcd_extern_i2c@0 { - compatible = "lcd_ext, i2c"; - dev_name = "i2c_T5800Q"; - reg = <0x1c>; - status = "okay"; - }; - - lcd_extern_i2c1: lcd_extern_i2c@1 { - compatible = "lcd_ext, i2c"; - dev_name = "i2c_ANX6862"; - reg = <0x20>; - status = "okay"; - }; - - lcd_extern_i2c2: lcd_extern_i2c@2 { - compatible = "lcd_ext, i2c"; - dev_name = "i2c_ANX7911"; - reg = <0x74>; - status = "okay"; - }; -}; - diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts index 26ce6c3dc5ee..ece74782e8ba 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_t309.dts @@ -995,7 +995,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts index cc2f87987d69..d479d5249715 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_1g_drm.dts @@ -875,7 +875,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts index c44811516345..e917b6f771fd 100644 --- a/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts +++ b/arch/arm64/boot/dts/amlogic/tl1_t962x2_x301_2g_drm.dts @@ -869,7 +869,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm64/boot/dts/amlogic/tm2_pxp.dts b/arch/arm64/boot/dts/amlogic/tm2_pxp.dts index becf67dbe002..bf67f134175f 100644 --- a/arch/arm64/boot/dts/amlogic/tm2_pxp.dts +++ b/arch/arm64/boot/dts/amlogic/tm2_pxp.dts @@ -559,7 +559,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <0>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x10>; interrupts = <0 41 1>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts index 13218f53dea3..712079e44a2d 100644 --- a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts +++ b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts @@ -809,7 +809,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts index 3b89d3b569dc..615de555ea26 100644 --- a/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts +++ b/arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts @@ -785,7 +785,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab309.dts b/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab309.dts index b83aff59c406..e3ce42c4e1e8 100644 --- a/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab309.dts +++ b/arch/arm64/boot/dts/amlogic/tm2_t962x3_ab309.dts @@ -786,7 +786,10 @@ pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_c_mux>; repeat = <0>; - term_lvl = <1>; + /* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ + term_lvl = <0x11>; interrupts = <0 41 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clkc CLKID_HDMIRX_MODET_COMP>, <&clkc CLKID_HDMIRX_CFG_COMP>, diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c index effb5ff11046..2df69056496c 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.c @@ -2454,7 +2454,8 @@ static int hdmirx_probe(struct platform_device *pdev) rx_emp_resource_allocate(&(pdev->dev)); aml_phy_get_trim_val(); hdmirx_hw_probe(); - term_cal_en = (!is_ft_trim_done()); + if ((rx.chip_id >= CHIP_ID_TL1) && phy_tdr_en) + term_cal_en = (!is_ft_trim_done()); hdmirx_init_params(); hdmirx_switch_pinmux(&(pdev->dev)); #ifdef CONFIG_AMLOGIC_LEGACY_EARLY_SUSPEND diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c index c6387fa1b95d..b08150f2198e 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c @@ -109,7 +109,11 @@ int scdc_force_en = 1; bool hdcp_hpd_ctrl_en; int eq_dbg_lvl; u32 phy_trim_val; +/* bit 4: tdr enable bit + * bit [3:0]: tdr level control + */ int phy_term_lel; +bool phy_tdr_en; /*------------------------variable define end------------------------------*/ @@ -3675,13 +3679,20 @@ void aml_phy_init_1(void) bool is_ft_trim_done(void) { - return phy_trim_val & 0x1; + int ret = phy_trim_val & 0x1; + + rx_pr("ft trim=%d\n", ret); + return ret; } void aml_phy_get_trim_val(void) { u32 data32; + if (rx.chip_id < CHIP_ID_TL1) + return; + phy_tdr_en = (phy_term_lel >> 4) & 0x1; + phy_term_lel = phy_term_lel & 0xf; phy_trim_val = rd_reg_hhi(HHI_HDMIRX_PHY_MISC_CNTL1); data32 = (phy_trim_val >> 12) & 0x3ff; data32 = (~((~data32) << phy_term_lel) | (1 << phy_term_lel)); @@ -3716,14 +3727,12 @@ void aml_phy_init(void) udelay(2); data32 = phy_misci[idx][1]; - if (idx < phy_frq_band_5) { + if ((idx < phy_frq_band_5) && phy_tdr_en) { if (term_cal_en) { data32 = (((data32 & (~(0x3ff << 12))) | (term_cal_val << 12)) | (1 << 22)); - rx_pr("man term mode\n"); } else { data32 = phy_trim_val; - rx_pr("ft trim mode\n"); } } wr_reg_hhi(HHI_HDMIRX_PHY_MISC_CNTL1, data32); diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h index f77b6c0e00ce..bb88062cd45f 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.h @@ -1124,6 +1124,7 @@ extern int scdc_force_en; extern bool hdcp_hpd_ctrl_en; extern int eq_dbg_lvl; extern int phy_term_lel; +extern bool phy_tdr_en; extern void rx_get_best_eq_setting(void); extern void wr_reg_hhi(unsigned int offset, unsigned int val); diff --git a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c index aecd009b4cc5..4209de69f0f0 100644 --- a/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c +++ b/drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c @@ -2931,6 +2931,7 @@ int hdmirx_debug(const char *buf, int size) rx_pr("Hdmirx version0: %s\n", RX_VER0); rx_pr("Hdmirx version1: %s\n", RX_VER1); rx_pr("Hdmirx version2: %s\n", RX_VER2); + rx_pr("Hdmirx version2: %s\n", "ver.2019/11/18"); rx_pr("------------------\n"); } else if (strncmp(input[0], "port0", 5) == 0) { hdmirx_open_port(TVIN_PORT_HDMI0);