arm64: dts: sti6130d3x0: Apply dopinder/wade's stock DTS changes
authordeadman96385 <seanhoyt963@gmail.com>
Thu, 1 Jul 2021 22:48:53 +0000 (15:48 -0700)
committerNolen Johnson <johnsonnolen@gmail.com>
Wed, 22 Dec 2021 02:21:18 +0000 (21:21 -0500)
* Dummy-Charger/Battery added to main DTB instead of DTBO.
* IR Remote disabled in main DTS, enabled in Wade DTBO.

Co-authored-by: Stricted <info@stricted.net>
Co-authored-by: Sean McCreary <mccreary@mcwest.org>
Change-Id: I9ae1d2a56596e5f3c3ed4d3d08fda6b8b45efe8b

arch/arm64/boot/dts/amlogic/g12a_s905x2_u212_sti6130d3x0.dts
arch/arm64/boot/dts/amlogic/mesong12a-bifrost_sti6130d3x0.dtsi
arch/arm64/boot/dts/amlogic/mesong12a_sti6130d3x0.dtsi
arch/arm64/boot/dts/amlogic/partition_mbox_dynamic_sti6130d3x0.dtsi

index 57c7d0f674e099e2fcffbae667fdee44291c25e6..f47ef719c9e61b3282b48b56dc5a1b950264a943 100644 (file)
@@ -17,8 +17,8 @@
 
 /dts-v1/;
 
-#include "mesong12a.dtsi"
-#include "partition_mbox_normal_dynamic.dtsi"
+#include "mesong12a_sti6130d3x0.dtsi"
+#include "partition_mbox_dynamic_sti6130d3x0.dtsi"
 
 / {
        model = "Amlogic";
@@ -56,9 +56,9 @@
                ramoops@0x07400000 {
                        compatible = "ramoops";
                        reg = <0x0 0x07400000 0x0 0x00100000>;
-                       record-size = <0x20000>;
-                       console-size = <0x40000>;
-                       ftrace-size = <0x80000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x40000>;
                        pmsg-size = <0x20000>;
                };
 
                /*di CMA pool */
                di_cma_reserved:linux,di_cma {
                        compatible = "shared-dma-pool";
-                       status = "disable";
                        reusable;
                        /* buffer_size = 3621952(yuv422 8bit)
                         *  | 4736064(yuv422 10bit)
                         * 10x4074560=40M(0x28) support 10bit
                         */
                        //size = <0x0 0x0B000000>;
-                       size = <0x0 0x0>;
+                       size = <0x0 0xb000000>;
                        alignment = <0x0 0x400000>;
                };
                /*  POST PROCESS MANAGER */
                        reusable;
                        /* ion_codec_mm max can alloc size 80M*/
                        //size = <0x0 0x16400000>;
-                       size = <0x0 0x1b000000>;/*ary*/
+                       size = <0x0 0x16400000>;/*ary*/
                        alignment = <0x0 0x400000>;
                        linux,contiguous-region;
                };
                };
        };
 
-       cma_shrinker {
-               compatible = "amlogic, cma-shrinker";
-               status = "okay";
-               adj  = <0 100 200 250 900 950>;
-               free = <8192 12288 16384 24576 28672 32768>;
-       };
-
        amlogic_battery:dummy-battery {
                compatible = "amlogic, dummy-battery";
-               status = "disabled";
+               status = "okay";
        };
 
        amlogic_charger:dummy-charger {
                compatible = "amlogic, dummy-charger";
-               status = "disabled";
+               status = "okay";
        };
 
        gpioleds {
                };
        };
 
+       gpio_keypad {
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "bt_pair";
+               key_code = <249>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
        cvbsout {
                compatible = "amlogic, cvbsout-g12a";
                dev_name = "cvbsout";
-               status = "okay";
+               status = "disabled";
                clocks = <&clkc CLKID_VCLK2_ENCI
                        &clkc CLKID_VCLK2_VENCI0
                        &clkc CLKID_VCLK2_VENCI1
        unifykey{
                compatible = "amlogic, unifykey";
                status = "ok";
-               unifykey-num = <19>;
+               unifykey-num = <22>;
                unifykey-index-0 = <&keysn_0>;
                unifykey-index-1 = <&keysn_1>;
                unifykey-index-2 = <&keysn_2>;
                unifykey-index-16= <&keysn_16>;
                unifykey-index-17= <&keysn_17>;
                unifykey-index-18= <&keysn_18>;
+               unifykey-index-19= <&keysn_19>;
+               unifykey-index-20= <&keysn_20>;
+               unifykey-index-21= <&keysn_21>;
+               unifykey-index-22= <&keysn_22>;
 
                keysn_0: key_0{
                        key-name = "usid";
                        key-device = "provision";
                        key-permit = "read","write","del";
                };
+               keysn_19:key_19{
+                       key-name = "wifi_country_abbrev";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_20:key_20{
+                       key-name = "wifi_ccode";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_21:key_21{
+                       key-name = "wifi_regrev";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_22:key_22{
+                       key-name = "wifi_disable_5g_band";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
        };//End unifykey
 
        efusekey:efusekey{
        aml_tdmc: tdmc {
                compatible = "amlogic, g12a-snd-tdmc";
                #sound-dai-cells = <0>;
-               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-lane-slot-mask-in = <0 1 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";
-               /* indicate this tdm is only for HDMI multi-channel */
-               i2s2hdmi = <1>;
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+               mclk_pad = <1>;  /* 0: mclk_0; 1: mclk_1 */
        };
 
        tdmlb: tdm@3 {
 
 &usb3_phy_v2 {
        status = "okay";
-       portnum = <1>;
-       otg = <0>;
+       portnum = <0>;
+       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 = <1>;
+       controller-type = <3>;
 };
 
 &ethmac {
index 33bd2806ccc91c867957425a96d89aa87672e262..b36f2e71d6ceef317e03562b3f347e97af5e370c 100644 (file)
@@ -41,8 +41,7 @@
                        &dvfs400_cfg
                        &dvfs500_cfg
                        &dvfs666_cfg
-                       &dvfs850_cfg
-                       &dvfs850_cfg>;
+                       &dvfs666_cfg>;
 
                dvfs125_cfg:clk125_cfg {
                        clk_freq = <125000000>;
index b37ab8b15f61fcb119d8635e3d82455347c6387a..9744d2b646b1acad90b7887ddde1a9a63a6fdfcc 100644 (file)
@@ -26,7 +26,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/input/meson_rc.h>
 #include <dt-bindings/phy/phy-amlogic-pcie.h>
-#include "mesong12a-bifrost.dtsi"
+#include "mesong12a-bifrost_sti6130d3x0.dtsi"
 
 / {
        cpus:cpus {
                        gpio-controller;
                        #gpio-cells = <2>;
                };
+               
+               jtag_apao_pins:jtag_apao_pin {
+                       mux {
+                                 groups = "jtag_ao_tdi",
+                                 "jtag_ao_tdo",
+                                 "jtag_ao_clk",
+                                 "jtag_ao_tms";
+                       function = "jtag_a";
+                       };
+               };
+               remote_pins:remote_pin {
+                       mux {
+                               groups = "remote_input_ao";
+                               function = "remote_input_ao";
+                       };
+               };
+
+               irblaster_pins:irblaster_pin {
+                       mux {
+                               groups = "remote_out_ao";
+                               function = "remote_out_ao";
+                       };
+               };
        };
 
        pinctrl_periphs: pinctrl@ff634480{
                                pinctrl-names = "default";
                                pinctrl-0 = <&irblaster_pins>;
                                interrupts = <GIC_SPI 198 IRQ_TYPE_EDGE_RISING>;
-                               status = "disabled";
+                               status = "okay";
                        };
                };/* end of aobus */
 
                dev_name = "meson-remote";
                reg = <0x0 0xff808040 0x00 0x44>, /*Multi-format IR controller*/
                        <0x0 0xff808000 0x00 0x20>; /*Legacy IR controller*/
-               status = "okay";
+               status = "disabled";
                protocol = <REMOTE_TYPE_NEC>;
                led_blink = <1>;
                led_blink_frq = <100>;
                map1 = <&map_1>;
                map2 = <&map_2>;
                map_0: map_0{
-                       mapname = "amlogic-remote-1";
-                       customcode = <0xfb04>;
+                       mapname = "askey-remote-1";
+                       customcode = <0x7f00>;
                        release_delay = <80>;
-                       size  = <50>;   /*keymap size*/
-                       keymap = <REMOTE_KEY(0x47, KEY_0)
-                               REMOTE_KEY(0x13, KEY_1)
-                               REMOTE_KEY(0x10, KEY_2)
-                               REMOTE_KEY(0x11, KEY_3)
-                               REMOTE_KEY(0x0F, KEY_4)
-                               REMOTE_KEY(0x0C, KEY_5)
-                               REMOTE_KEY(0x0D, KEY_6)
-                               REMOTE_KEY(0x0B, KEY_7)
-                               REMOTE_KEY(0x08, KEY_8)
-                               REMOTE_KEY(0x09, KEY_9)
-                               REMOTE_KEY(0x5C, KEY_RIGHTCTRL)
-                               REMOTE_KEY(0x51, KEY_F3)
-                               REMOTE_KEY(0x50, KEY_F4)
-                               REMOTE_KEY(0x40, KEY_F5)
-                               REMOTE_KEY(0x4d, KEY_F6)
-                               REMOTE_KEY(0x43, KEY_F7)
-                               REMOTE_KEY(0x17, KEY_F8)
-                               REMOTE_KEY(0x00, KEY_F9)
-                               REMOTE_KEY(0x01, KEY_F10)
-                               REMOTE_KEY(0x16, KEY_F11)
-                               REMOTE_KEY(0x49, KEY_BACKSPACE)
-                               REMOTE_KEY(0x06, KEY_PROPS)
-                               REMOTE_KEY(0x14, KEY_UNDO)
-                               REMOTE_KEY(0x44, KEY_UP)
-                               REMOTE_KEY(0x1D, KEY_DOWN)
-                               REMOTE_KEY(0x1C, KEY_LEFT)
-                               REMOTE_KEY(0x48, KEY_RIGHT)
-                               REMOTE_KEY(0x53, KEY_LEFTMETA)
-                               REMOTE_KEY(0x45, KEY_PAGEUP)
-                               REMOTE_KEY(0x19, KEY_PAGEDOWN)
-                               REMOTE_KEY(0x52, KEY_PAUSE)
-                               REMOTE_KEY(0x05, KEY_HANGEUL)
-                               REMOTE_KEY(0x59, KEY_HANJA)
-                               REMOTE_KEY(0x1b, KEY_SCALE)
-                               REMOTE_KEY(0x04, KEY_KPCOMMA)
-                               REMOTE_KEY(0x1A, KEY_POWER)
-                               REMOTE_KEY(0x0A, KEY_TAB)
-                               REMOTE_KEY(0x0e, KEY_MUTE)
-                               REMOTE_KEY(0x1F, KEY_HOME)
-                               REMOTE_KEY(0x1e, KEY_FRONT)
-                               REMOTE_KEY(0x07, KEY_COPY)
-                               REMOTE_KEY(0x12, KEY_OPEN)
-                               REMOTE_KEY(0x54, KEY_PASTE)
-                               REMOTE_KEY(0x02, KEY_FIND)
-                               REMOTE_KEY(0x4f, KEY_A)
-                               REMOTE_KEY(0x42, KEY_B)
-                               REMOTE_KEY(0x5d, KEY_C)
-                               REMOTE_KEY(0x4c, KEY_D)
-                               REMOTE_KEY(0x58, KEY_CUT)
-                               REMOTE_KEY(0x55, KEY_CALC)>;
+                       size  = <39>;   /*keymap size*/
+                       keymap = <0x13000b 0x1a0002 0x1f0003 0x580004 0x160005 0x1b0006 0x540007 0x120008 0x170009 0x50000a 0x4c009e 0x5f0061 0x30067 0x5e006c 0x20069 0x40006a 0x420066 0x7008b 0x5b0068 0x18006d 0x5d00cf 0x4a0077 0x4b0080 0x800a7 0x51019c 0x520197 0x400d0 0x5300a8 0x1e0074 0x1c009e 0x5a0071 0x7a00fd 0x7c00fa 0x7700fb 0x7b00fc 0x790246 0x840246 0xa0192 0x60193>;
                };
                map_1: map_1{
-                       mapname = "amlogic-remote-2";
-                       customcode = <0xfe01>;
+                       mapname = "askey-remote-2";
+                       customcode = <0x7f>;
                        release_delay = <80>;
-                       size  = <53>;
-                       keymap = <REMOTE_KEY(0x01, KEY_1)
-                               REMOTE_KEY(0x02, KEY_2)
-                               REMOTE_KEY(0x03, KEY_3)
-                               REMOTE_KEY(0x04, KEY_4)
-                               REMOTE_KEY(0x05, KEY_5)
-                               REMOTE_KEY(0x06, KEY_6)
-                               REMOTE_KEY(0x07, KEY_7)
-                               REMOTE_KEY(0x08, KEY_8)
-                               REMOTE_KEY(0x09, KEY_9)
-                               REMOTE_KEY(0x0a, KEY_0)
-                               REMOTE_KEY(0x1F, KEY_FN_F1)
-                               REMOTE_KEY(0x15, KEY_MENU)
-                               REMOTE_KEY(0x16, KEY_TAB)
-                               REMOTE_KEY(0x0c, KEY_CHANNELUP)
-                               REMOTE_KEY(0x0d, KEY_CHANNELDOWN)
-                               REMOTE_KEY(0x0e, KEY_VOLUMEUP)
-                               REMOTE_KEY(0x0f, KEY_VOLUMEDOWN)
-                               REMOTE_KEY(0x11, KEY_HOME)
-                               REMOTE_KEY(0x1c, KEY_RIGHT)
-                               REMOTE_KEY(0x1b, KEY_LEFT)
-                               REMOTE_KEY(0x19, KEY_UP)
-                               REMOTE_KEY(0x1a, KEY_DOWN)
-                               REMOTE_KEY(0x1d, KEY_ENTER)
-                               REMOTE_KEY(0x17, KEY_MUTE)
-                               REMOTE_KEY(0x49, KEY_FINANCE)
-                               REMOTE_KEY(0x43, KEY_BACK)
-                               REMOTE_KEY(0x12, KEY_FN_F4)
-                               REMOTE_KEY(0x14, KEY_FN_F5)
-                               REMOTE_KEY(0x18, KEY_FN_F6)
-                               REMOTE_KEY(0x59, KEY_INFO)
-                               REMOTE_KEY(0x5a, KEY_STOPCD)
-                               REMOTE_KEY(0x10, KEY_POWER)
-                               REMOTE_KEY(0x42, KEY_PREVIOUSSONG)
-                               REMOTE_KEY(0x44, KEY_NEXTSONG)
-                               REMOTE_KEY(0x1e, KEY_REWIND)
-                               REMOTE_KEY(0x4b, KEY_FASTFORWARD)
-                               REMOTE_KEY(0x58, KEY_PLAYPAUSE)
-                               REMOTE_KEY(0x46, KEY_PROPS)
-                               REMOTE_KEY(0x40, KEY_UNDO)
-                               REMOTE_KEY(0x38, KEY_SCROLLLOCK)
-                               REMOTE_KEY(0x57, KEY_FN)
-                               REMOTE_KEY(0x5b, KEY_FN_ESC)
-                               REMOTE_KEY(0x54, KEY_RED)
-                               REMOTE_KEY(0x4c, KEY_GREEN)
-                               REMOTE_KEY(0x4e, KEY_YELLOW)
-                               REMOTE_KEY(0x55, KEY_BLUE)
-                               REMOTE_KEY(0x53, KEY_BLUETOOTH)
-                               REMOTE_KEY(0x52, KEY_WLAN)
-                               REMOTE_KEY(0x39, KEY_CAMERA)
-                               REMOTE_KEY(0x41, KEY_SOUND)
-                               REMOTE_KEY(0x0b, KEY_QUESTION)
-                               REMOTE_KEY(0x00, KEY_CHAT)
-                               REMOTE_KEY(0x13, KEY_SEARCH)>;
+                       size  = <33>;
+                       keymap = <0x13000b 0x1a0002 0x1f0003 0x580004 0x160005 0x1b0006 0x540007 0x120008 0x170009 0x50000a 0x4c000f 0x5f0061 0x30067 0x5e006c 0x20069 0x40006a 0x420066 0x7008b 0x5b0068 0x18006d 0x5d00cf 0x4a0077 0x4b0080 0x800a7 0x51019c 0x520197 0x400d0 0x5300a8 0x1e0074 0x1c009e 0x5a0071 0xa0192 0x60193>;
                };
                map_2: map_2{
                        mapname = "amlogic-remote-3";
                /* Refer to the following URL at:
                 * http://standards.ieee.org/develop/regauth/oui/oui.txt
                 */
-               vendor_id = <0x000000>;
+               vendor_id = <0x88de7c>;
                product_desc = "G12A"; /* Max Chars: 16    */
                cec_osd_string = "AML_MBOX"; /* Max Chars: 14    */
                cec_version = <5>;/*5:1.4;6:2.0*/
                        &clkc CLKID_DEMUX
                        &clkc CLKID_AHB_ARB0
                        &clkc CLKID_DOS
-                       &clkc CLKID_CLK81
                        &clkc CLKID_VDEC_MUX
                        &clkc CLKID_HCODEC_MUX
                        &clkc CLKID_HEVC_MUX
                        "demux",
                        "ahbarb0",
                        "vdec",
-                       "clk_81",
                        "clk_vdec_mux",
                        "clk_hcodec_mux",
                        "clk_hevc_mux",
        };
 
        sd_emmc_c: emmc@ffe07000 {
-               status = "disabled";
+               status = "okay";
                compatible = "amlogic, meson-mmc-g12a";
                reg = <0x0 0xffe07000 0x0 0x800>;
                interrupts = <0 191 1>;
index 498316c6b55bd1e2e8d9fa341ae0f149fcb238cc..250ac0d676f8b682dbb14ec33f82e4a0a932fd59 100644 (file)
                parts = <15>;
                part-0 = <&logo>;
                part-1 = <&recovery>;
-               part-2 = <&misc>;
-               part-3 = <&dtbo>;
-               part-4 = <&cri_data>;
-               part-5 = <&param>;
-               part-6 = <&boot>;
-               part-7 = <&frp>;
-               part-8 = <&rsv>;
-               part-9 = <&metadata>;
-               part-10 = <&vbmeta>;
-               part-11 = <&tee>;
+               part-2 = <&tee>;
+               part-3 = <&factory>;
+               part-4 = <&misc>;
+               part-5 = <&dtbo>;
+               part-6 = <&cri_data>;
+               part-7 = <&param>;
+               part-8 = <&boot>;
+               part-9 = <&rsv>;
+               part-10 = <&metadata>;
+               part-11 = <&vbmeta>;
                part-12 = <&super>;
                part-13 = <&cache>;
                part-14 = <&data>;
 
-               logo:logo{
+               logo:logo {
                        pname = "logo";
                        size = <0x0 0x800000>;
                        mask = <1>;
                };
-               recovery:recovery{
+
+               recovery:recovery {
                        pname = "recovery";
                        size = <0x0 0x1800000>;
                        mask = <1>;
                };
-               misc:misc{
-                       pname = "misc";
+
+               tee:tee {
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+
+               factory:factory {
+                       pname = "factory";
                        size = <0x0 0x800000>;
+                       mask = <11>;
+               };
+
+               misc:misc {
+                       pname = "misc";
+                       size = <0x0 0x200000>;
                        mask = <1>;
                };
-               dtbo:dtbo{
+
+               dtbo:dtbo {
                        pname = "dtbo";
-                       size = <0x0 0x800000>;
+                       size = <0x0 0x200000>;
                        mask = <1>;
                };
-               cri_data:cri_data
-               {
+
+               cri_data:cri_data {
                        pname = "cri_data";
                        size = <0x0 0x800000>;
                        mask = <2>;
                };
-               frp:frp{
-                       pname = "frp";
-                       size = <0x0 0x200000>;
-                       mask = <1>;
-               };
-               rsv:rsv{
+
+               rsv:rsv {
                        pname = "rsv";
-                       size = <0x0 0x600000>;
+                       size = <0x0 0x1000000>;
                        mask = <1>;
                };
-               metadata:metadata{
+
+               metadata:metadata {
                        pname = "metadata";
                        size = <0x0 0x1000000>;
                        mask = <1>;
                };
-               vbmeta:vbmeta{
+
+               vbmeta:vbmeta {
                        pname = "vbmeta";
                        size = <0x0 0x200000>;
                        mask = <1>;
                };
-               param:param{
+
+               param:param {
                        pname = "param";
                        size = <0x0 0x1000000>;
                        mask = <2>;
                };
-               boot:boot
-               {
+
+               boot:boot {
                        pname = "boot";
                        size = <0x0 0x1000000>;
                        mask = <1>;
                };
-               tee:tee{
-                       pname = "tee";
-                       size = <0x0 0x2000000>;
-                       mask = <1>;
-               };
-               super:super
-               {
+
+               super:super {
                        pname = "super";
-                       size = <0x0 0x7C400000>;
+                       size = <0x0 0x64000000>;
                        mask = <1>;
                };
-               cache:cache
-               {
+
+               cache:cache {
                        pname = "cache";
                        size = <0x0 0x32000000>;
                        mask = <2>;
                };
-               data:data
-               {
+
+               data:data {
                        pname = "data";
                        size = <0xffffffff 0xffffffff>;
                        mask = <4>;