/* * arch/arm64/boot/dts/amlogic/kvim3_linux.dts * * Copyright (C) 2019 Wesion, 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 "mesong12b.dtsi" #include "partition_linux.dtsi" #include "khadas-ts050-panel.dtsi" / { model = "Khadas VIM3"; amlogic-dt-id = "g12b_kvim3"; compatible = "amlogic, g12b"; interrupt-parent = <&gic>; #address-cells = <2>; #size-cells = <2>; chosen { }; aliases { serial0 = &uart_AO; serial1 = &uart_A; serial2 = &uart_B; serial3 = &uart_C; serial4 = &uart_AO_B; i2c0 = &i2c0; i2c1 = &i2c1; i2c2 = &i2c2; i2c3 = &i2c3; i2c4 = &i2c_AO; tsensor0 = &p_tsensor; tsensor1 = &d_tsensor; spi1 = &spicc1; }; // memory@00000000 { // device_type = "memory"; // linux,usable-memory = <0x0 0x0 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>; clear-map; }; 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>; }; galcore_reserved:linux,galcore { compatible = "shared-dma-pool"; reusable; size = <0x0 0x1000000>; alignment = <0x0 0x400000>; linux,contiguous-region; }; isp_cma_reserved:linux,isp_cma { compatible = "shared-dma-pool"; reusable; status = "okay"; size = <0x0 0x1f000000>; alignment = <0x0 0x400000>; }; adapt_cma_reserved:linux,adapt_cma { compatible = "shared-dma-pool"; reusable; status = "okay"; size = <0x0 0x03000000>; alignment = <0x0 0x400000>; }; gdc_cma_reserved:linux,gdc_cma { compatible = "shared-dma-pool"; reusable; status = "okay"; size = <0x0 0x04000000>; alignment = <0x0 0x400000>; }; }; galcore { status = "okay"; memory-region = <&galcore_reserved>; }; gpioleds { compatible = "gpio-leds"; status = "okay"; sys_led { label="sys_led"; gpios=<&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>; default-state ="on"; retain-state-suspended; linux,default-trigger="default-on"; }; red_led { label = "red_led"; gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>; default-state ="off"; linux,default-trigger="none"; }; }; cvbsout { compatible = "amlogic, cvbsout-g12b"; dev_name = "cvbsout"; status = "disabled"; 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"; /* performance: reg_address, reg_value */ /* g12b */ 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 */ }; bt-dev{ compatible = "amlogic, bt-dev"; dev_name = "bt-dev"; status = "okay"; power_down_disable = <1>; 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"; }; ppmgr { compatible = "amlogic, ppmgr"; memory-region = <&ppmgr_reserved>; dev_name = "ppmgr"; status = "okay"; }; gpiomem { compatible = "amlogic, gpiomem"; reg = <0x0 0xff634000 0x0 0x1000>; dev_name = "gpiomem"; status = "okay"; }; gpiomem_ao { compatible = "amlogic, gpiomem"; reg = <0x0 0xff800000 0x0 0x1000>; dev_name = "gpiomem-ao"; status = "okay"; }; picdec { compatible = "amlogic, picdec"; memory-region = <&picdec_cma_reserved>; dev_name = "picdec"; 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"; }; amlvideo2_0 { compatible = "amlogic, amlvideo2"; dev_name = "amlvideo2"; status = "okay"; amlvideo2_id = <0>; cma_mode = <1>; }; amlvideo2_1 { compatible = "amlogic, amlvideo2"; dev_name = "amlvideo2"; status = "okay"; amlvideo2_id = <1>; cma_mode = <1>; }; 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_7 GPIO_ACTIVE_HIGH>; /* GPIOAO_7 */ 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 28>; key_val = <143 266 389>; //val=voltage/1800mV*1023 key_tolerance = <40 40 40>; }; unifykey{ compatible = "amlogic, unifykey"; status = "ok"; unifykey-num = <16>; 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>; 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 = "netflix_mgkid"; key-device = "secure"; key-permit = "read","write","del"; }; keysn_15:key_15{ key-name = "eth_exphy_para"; key-device = "normal"; key-permit = "read","write","del"; }; };//End unifykey efuse: efuse{ compatible = "amlogic, efuse"; read_cmd = <0x82000030>; write_cmd = <0x82000031>; get_max_cmd = <0x82000033>; key = <&efusekey>; status = "okay"; }; efusekey:efusekey{ keynum = <1>; key0 = <&key_0>; key_0:key_0{ keyname = "mac"; offset = <0>; size = <12>; }; };//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*/ interrupts = <0 56 1>; interrupt-names = "vsync2"; }; amdolby_vision { compatible = "amlogic, dolby_vision_g12a"; 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"; }; spdif_codec:spdif_dummy{ #sound-dai-cells = <0>; compatible = "linux,spdif-dit"; 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 */ tdmout_index = <1>; status = "okay"; }; audio_effect:eqdrc{ /*eq_enable = <1>;*/ /*drc_enable = <1>;*/ /* * 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>; }; aml_sound:auge_sound { compatible = "amlogic, g12a-sound-card"; aml-audio-card,name = "AML-AUGESOUND"; //aml-audio-card,aux-devs = <&amlogic_codec>; /*for audio effect ,eqdrc */ aml-audio-card,effect = <&audio_effect>; aml-audio-card,dai-link@1 { mclk-fs = <128>; /* suffix-name, sync with android audio hal * what's the dai link used for */ suffix-name = "alsaPORT-spdif-b"; cpu { sound-dai = <&aml_spdif_b>; system-clock-frequency = <6144000>; }; codec { sound-dai = <&spdif_codec>; }; }; aml-audio-card,dai-link@2 { format = "dsp_a"; mclk-fs = <512>; //continuous-clock; //bitclock-inversion; //frame-inversion; //bitclock-master = <&tdmacodec>; //frame-master = <&tdmacodec>; /* suffix-name, sync with android audio hal * what's the dai link used for */ suffix-name = "alsaPORT-pcm"; tdmacpu: cpu { sound-dai = <&aml_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@3 { format = "i2s"; mclk-fs = <256>; //continuous-clock; //bitclock-inversion; //frame-inversion; bitclock-master = <&aml_tdmc>; frame-master = <&aml_tdmc>; /* suffix-name, sync with android audio hal * what's the dai link used for */ //suffix-name = "alsaPORT-tdm"; cpu { sound-dai = <&aml_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>; }; codec { sound-dai = <&dummy_codec &dummy_codec>; }; }; aml-audio-card,dai-link@4 { mclk-fs = <128>; /* suffix-name, sync with android audio hal * what's the dai link used for */ suffix-name = "alsaPORT-spdif"; cpu { sound-dai = <&aml_spdif>; system-clock-frequency = <6144000>; }; codec { sound-dai = <&spdif_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 = "okay"; }; /* Audio Related end */ cpu_opp_table0: cpu_opp_table0 { compatible = "operating-points-v2"; opp-shared; opp00 { opp-hz = /bits/ 64 <500000000>; opp-microvolt = <730000>; }; opp01 { opp-hz = /bits/ 64 <667000000>; opp-microvolt = <730000>; }; opp02 { opp-hz = /bits/ 64 <1000000000>; opp-microvolt = <760000>; }; opp03 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <780000>; }; opp04 { opp-hz = /bits/ 64 <1398000000>; opp-microvolt = <810000>; }; opp05 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <860000>; }; opp06 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <900000>; }; opp07 { opp-hz = /bits/ 64 <1704000000>; opp-microvolt = <960000>; }; opp08 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <1020000>; }; opp09 { opp-hz = /bits/ 64 <1908000000>; opp-microvolt = <1030000>; }; opp10 { opp-hz = /bits/ 64 <2016000000>; opp-microvolt = <1040000>; }; opp11 { opp-hz = /bits/ 64 <2100000000>; opp-microvolt = <1040000>; }; opp12 { opp-hz = /bits/ 64 <2208000000>; opp-microvolt = <1040000>; }; }; cpu_opp_table1: cpu_opp_table1 { compatible = "operating-points-v2"; opp-shared; opp00 { opp-hz = /bits/ 64 <500000000>; opp-microvolt = <730000>; }; opp01 { opp-hz = /bits/ 64 <667000000>; opp-microvolt = <730000>; }; opp02 { opp-hz = /bits/ 64 <1000000000>; opp-microvolt = <730000>; }; opp03 { opp-hz = /bits/ 64 <1200000000>; opp-microvolt = <750000>; }; opp04 { opp-hz = /bits/ 64 <1398000000>; opp-microvolt = <770000>; }; opp05 { opp-hz = /bits/ 64 <1512000000>; opp-microvolt = <770000>; }; opp06 { opp-hz = /bits/ 64 <1608000000>; opp-microvolt = <780000>; }; opp07 { opp-hz = /bits/ 64 <1704000000>; opp-microvolt = <790000>; }; opp08 { opp-hz = /bits/ 64 <1800000000>; opp-microvolt = <830000>; }; opp09 { opp-hz = /bits/ 64 <1908000000>; opp-microvolt = <860000>; }; opp10 { opp-hz = /bits/ 64 <2016000000>; opp-microvolt = <910000>; }; opp11 { opp-hz = /bits/ 64 <2100000000>; opp-microvolt = <960000>; }; opp12 { opp-hz = /bits/ 64 <2208000000>; opp-microvolt = <1030000>; }; opp13 { opp-hz = /bits/ 64 <2304000000>; opp-microvolt = <1030000>; }; opp14 { opp-hz = /bits/ 64 <2400000000>; opp-microvolt = <1040000>; }; }; cpufreq-meson { compatible = "amlogic, cpufreq-meson"; status = "okay"; }; onewire:onewire { compatible = "w1-gpio"; gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>; status = "disabled"; }; sensor: sensor { compatible = "soc, sensor"; status = "disabled"; sensor-name = "os08a10"; /*imx290;os08a10;imx227*/ pinctrl-names="default"; pinctrl-0=<&gen_clk_ee_ao>; clocks = <&clkc CLKID_GEN_CLK>; clock-names = "gen_clk"; reset = <&gpio_expander 3 GPIO_ACTIVE_HIGH>; ir_cut_gpio = <&gpio_expander 2 GPIO_ACTIVE_HIGH>; }; iq: iq { compatible = "soc, iq"; status = "disabled"; sensor-name = "os08a10"; /*imx290;os08a10;imx227*/ }; }; /* end of / */ &isp { status = "disabled"; memory-region = <&isp_cma_reserved>; }; &adapter { status = "disabled"; memory-region = <&adapt_cma_reserved>; }; &gdc { status = "okay"; memory-region = <&gdc_cma_reserved>; }; &meson_fb { status = "okay"; display_size_default = <1920 1080 1920 2160 32>; mem_size = <0x00800000 0x4b80000 0x100000 0x100000 0x800000>; logo_addr = "0x7f800000"; mem_alloc = <1>; pxp_mode = <0>; /** 0:normal mode 1:pxp mode */ 4k2k_fb = <1>; }; &pwm_ab { status = "okay"; }; &pwm_ef { status = "okay"; }; &pwm_AO_cd { status = "okay"; }; &i2c3 { status = "disabled"; pinctrl-names="default"; pinctrl-0=<&i2c3_master_pins2>; clock-frequency = <100000>; /* default 100k */ ft5336@38 { compatible = "edt,edt-ft5336", "ft5x06"; reg = <0x38>; interrupt_pin = <&gpio GPIOA_5 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_HIGH>; status = "okay"; }; gt9xx@5d { compatible = "goodix,gt9xx"; status = "okay"; reg = <0x5d>; reset-gpio = <&gpio_expander 6 GPIO_ACTIVE_HIGH>; tp-size = <89>; rotation = <1>; goodix,cfg-group0 = [ 41 80 07 B0 04 0A 3D 00 01 08 28 05 64 50 03 05 00 00 00 00 23 13 00 17 19 1C 13 90 30 AA 17 15 31 0D 00 00 01 9B 03 24 00 00 00 00 00 00 00 00 00 00 00 0F 23 94 D5 02 07 00 00 04 A3 10 00 8C 13 00 7B 16 00 69 1B 00 5B 20 00 5B 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 04 05 06 07 08 09 0C 0D 0E 0F 10 11 14 15 16 17 18 19 FF FF FF FF FF FF FF FF FF FF 00 02 04 06 07 08 0A 0C 0D 0E 0F 10 11 12 13 14 19 1B 1C 1E 1F 20 21 22 23 24 25 26 27 28 29 2A FF FF FF FF FF FF FF FF FF FF 6F 01]; }; bq25703:bq25703@6b { compatible = "bq25703"; reg = <0x6b>; irq-gpio = <&gpio GPIOZ_15 IRQ_TYPE_LEVEL_LOW>; ti,charge-current = <1500000>; ti,max-charge-voltage = <8500000>; ti,max-input-voltage = <20000000>; ti,max-input-current = <6000000>; ti,input-current-sdp = <500000>; ti,input-current-dcp = <2000000>; ti,input-current-cdp = <2000000>; ti,input-current-dc = <2000000>; ti,minimum-sys-voltage = <7400000>; ti,otg-voltage = <5000000>; ti,otg-current = <500000>; ti,input-current = <500000>; pd-charge-only = <0>; status = "disabled"; }; cw201x:cw201x@62 { compatible = "cw201x"; reg = <0x62>; bat_config_info = <0x15 0x7F 0x6E 0x66 0x65 0x5C 0x5B 0x59 0x58 0x57 0x57 0x54 0x53 0x51 0x4B 0x48 0x40 0x33 0x2A 0x26 0x23 0x25 0x2A 0x34 0x45 0x4F 0x0C 0xCD 0x44 0x68 0x67 0x68 0x6E 0x6F 0x6C 0x68 0x3A 0x10 0x8A 0x01 0x01 0x54 0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92 0x96 0x82 0xFF 0xFF 0xCB 0x2F 0x7D 0x64 0xA5 0xB5 0x13 0x58 0x09>; monitor_sec = <5>; virtual_power = <0>; divider_res1 = <200>; divider_res2 = <200>; status = "disabled"; }; }; &i2c_AO { status = "okay"; pinctrl-names="default"; pinctrl-0=<&ao_i2c_master_pins1>; clock-frequency = <400000>; /* default 100k */ gpio_expander: gpio-controller@20 { compatible = "ti,tca6408"; reg = <0x20>; gpio-controller; #gpio-cells = <2>; status = "okay"; }; hym8563: hym8563@51 { compatible = "haoyu,hym8563"; reg = <0x51>; #clock-cells = <0>; }; khadas-mcu { compatible = "khadas-mcu"; reg = <0x18>; fan,trig_temp_level0 = <50>; fan,trig_temp_level1 = <60>; fan,trig_temp_level2 = <70>; hwver = "VIM3.V11"; /* Will be updated in uboot. */ }; khadas-kxtj3 { compatible = "kxtj3"; reg = <0x0E>; type = <2>; layout = <2>; irq_enable = <0>; poll_delay_ms = <30>; irq-gpio = <&gpio_ao GPIOAO_9 IRQ_TYPE_EDGE_RISING>; status = "okay"; }; es8316: es8316@10 { compatible = "everest,es8316"; #sound-dai-cells = <0>; reg = <0x10>; status = "disabled"; // spk-con-gpio = <&gpio GPIOH_5 0>; // spk-mute-gpio = <&gpio GPIOA_12 0>; }; }; &audiobus { aml_tdma: tdma { compatible = "amlogic, g12a-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>; }; aml_tdmb: tdmb { compatible = "amlogic, g12a-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_CTRL>; 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>; status = "disabled"; }; aml_tdmc: tdmc { compatible = "amlogic, g12a-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 = <1>; /* 0: mclk_0; 1: mclk_1 */ }; tdmlb: tdm@3 { compatible = "amlogic, g12a-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; *0: TDMOUTA *1: TDMOUTB *2: TDMOUTC *3: PAD_TDMINA *4: PAD_TDMINB *5: PAD_TDMINC */ lb-src-sel = <1>; status = "disabled"; }; aml_spdif: spdif { compatible = "amlogic, g12a-snd-spdif-a"; #sound-dai-cells = <0>; clocks = <&clkc CLKID_MPLL0 &clkc CLKID_FCLK_DIV4 &clkaudio CLKID_AUDIO_SPDIFIN &clkaudio CLKID_AUDIO_SPDIFOUT &clkaudio CLKID_AUDIO_SPDIFIN_CTRL &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>; clock-names = "sysclk", "fixed_clk", "gate_spdifin", "gate_spdifout", "clk_spdifin", "clk_spdifout"; interrupts = ; interrupt-names = "irq_spdifin"; pinctrl-names = "spdif_pins", "spdif_pins_mute"; pinctrl-0 = <&spdifout>; pinctrl-1 = <&spdifout_a_mute>; status = "okay"; }; aml_spdif_b: spdif_b { compatible = "amlogic, g12a-snd-spdif-b"; #sound-dai-cells = <0>; clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/ &clkaudio CLKID_AUDIO_SPDIFOUTB &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>; clock-names = "sysclk", "gate_spdifout", "clk_spdifout"; status = "okay"; }; aml_pdm: pdm { compatible = "amlogic, g12a-snd-pdm"; #sound-dai-cells = <0>; clocks = <&clkaudio CLKID_AUDIO_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>; filter_mode = <1>; /* mode 0~4, defalut:1 */ status = "disable"; }; loopback:loopback@0 { compatible = "amlogic, g12a-loopback"; #sound-dai-cells = <0>; clocks = <&clkaudio CLKID_AUDIO_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 0 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 = "disabled"; }; audioresample: resample { compatible = "amlogic, g12a-resample"; clocks = <&clkc CLKID_MPLL3 &clkaudio CLKID_AUDIO_MCLK_F &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>; 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"; }; aml_pwrdet: pwrdet { compatible = "amlogic, g12a-power-detect"; interrupts = ; interrupt-names = "pwrdet_irq"; /* pwrdet source sel * 7: loopback; * 6: tdmin_lb; * 5: reserved; * 4: pdmin; * 3: spdifin; * 2: tdmin_c; * 1: tdmin_b; * 0: tdmin_a; */ pwrdet_src = <4>; hi_th = <0x70000>; lo_th = <0x16000>; 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"; 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"; }; }; clk12_24_z_pins:clk12_24_z_pins { mux { groups = "clk12_24_z"; function = "clk12_24_ee"; drive-strength = <3>; }; }; 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"; }; }; pdmin: pdmin { mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/ groups = "pdm_din0_a", /*"pdm_din1_a",*/ /*"pdm_din2_a",*/ /*"pdm_din3_a",*/ "pdm_dclk_a"; function = "pdm"; }; }; }; /* end of pinctrl_periphs */ &pinctrl_aobus { spdifout: spdifout { mux { /* gpiao_10 */ groups = "spdif_out_ao"; function = "spdif_out_ao"; }; }; spdifout_a_mute: spdifout_a_mute { mux { /* gpiao_10 */ groups = "GPIOAO_10"; function = "gpio_aobus"; }; }; bl_pwm_off_pins:bl_pwm_off_pin { mux { pins = "GPIOAO_6"; function = "gpio_aobus"; output-low; }; }; gen_clk_ee_ao: gen_clk_ee_ao { mux { groups="gen_clk_ee_ao"; function="gen_clk_ee_ao"; drive-strength = <3>; }; }; }; /* end of pinctrl_aobus */ &irblaster { status = "disabled"; }; &audio_data { 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_A"; 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>; }; }; &dwc3 { status = "okay"; }; &usb2_phy_v2 { status = "okay"; portnum = <2>; gpio-vbus-power = "GPIOA_6"; gpios = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>; }; &usb3_phy_v2 { status = "okay"; portnum = <1>; otg = <1>; }; &dwc2_a { status = "okay"; /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/ controller-type = <3>; }; ðmac { status = "okay"; pinctrl-names = "external_eth_pins"; pinctrl-0 = <&external_eth_pins>; mc_val = <0x1629>; cali_val = <0x60000>; rx_delay = <1>; auto_cali_idx = <0>; internal_phy=<0>; }; &uart_A { status = "okay"; }; &pcie_A { reset-gpio = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>; wake-gpio = <&gpio GPIOA_7 GPIO_ACTIVE_HIGH>; status = "disabled"; }; &saradc { status = "okay"; }; &spicc1 { status = "disabled"; pinctrl-names = "default"; pinctrl-0 = <&spicc1_pins>; cs-gpios = <&gpio GPIOH_6 0>; spidev@1 { status = "okay"; compatible = "linux,spidev"; /* spi default max clock 100Mhz */ spi-max-frequency = <100000000>; reg = <1>; }; }; &remote { status = "okay"; }; &lcd { lcd_cpu-gpios = <&gpio_expander 0 GPIO_ACTIVE_HIGH &gpio_expander 1 GPIO_ACTIVE_HIGH>; lcd_cpu_gpio_names = "GPIO_EXPANDER_0","GPIO_EXPANDER_1"; }; &wdt { reset_watchdog_method = <0>; /* 0:sysfs,1:kernel */ status = "disabled"; };