Advertisement
Guest User

mt7623n-bananapi-bpi-r2.dts

a guest
Nov 10th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 19.72 KB | None | 0 0
  1. /*
  2.  * Copyright 2017 Sean Wang <sean.wang@mediatek.com>
  3.  *
  4.  * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  5.  */
  6.  
  7. /dts-v1/;
  8. #include <dt-bindings/input/input.h>
  9. #include "mt7623.dtsi"
  10. #include "mt6323.dtsi"
  11.  
  12. / {
  13.     model = "Bananapi BPI-R2";
  14.     compatible = "bananapi,bpi-r2", "mediatek,mt7623";
  15.  
  16.     aliases {
  17.         serial2 = &uart2;
  18.         ethernet0 = &gmac0;
  19.         ethernet1 = &gmac1;
  20.     };
  21.  
  22.     chosen {
  23.         stdout-path = "serial2:115200n8";
  24.     };
  25.  
  26.     memory {
  27.         device_type = "memory";
  28.         reg = <0 0x80000000 0 0x80000000>;
  29.     };
  30.  
  31.     cpus {
  32.         cpu@0 {
  33.             proc-supply = <&mt6323_vproc_reg>;
  34.         };
  35.  
  36.         cpu@1 {
  37.             proc-supply = <&mt6323_vproc_reg>;
  38.         };
  39.  
  40.         cpu@2 {
  41.             proc-supply = <&mt6323_vproc_reg>;
  42.         };
  43.  
  44.         cpu@3 {
  45.             proc-supply = <&mt6323_vproc_reg>;
  46.         };
  47.     };
  48.  
  49.     reg_3p3v: regulator-3p3v {
  50.         compatible = "regulator-fixed";
  51.         regulator-name = "fixed-3.3V";
  52.         regulator-min-microvolt = <3300000>;
  53.         regulator-max-microvolt = <3300000>;
  54.         regulator-boot-on;
  55.         regulator-always-on;
  56.     };
  57.  
  58.     reg_5v: regulator-5v {
  59.         compatible = "regulator-fixed";
  60.         regulator-name = "fixed-5V";
  61.         regulator-min-microvolt = <5000000>;
  62.         regulator-max-microvolt = <5000000>;
  63.         regulator-boot-on;
  64.         regulator-always-on;
  65.     };
  66.  
  67.     gpio_keys {
  68.         compatible = "gpio-keys";
  69.         pinctrl-names = "default";
  70.         pinctrl-0 = <&key_pins_a>;
  71.  
  72.         factory {
  73.             label = "factory";
  74.             linux,code = <BTN_0>;
  75.             gpios = <&pio 256 GPIO_ACTIVE_LOW>;
  76.         };
  77.  
  78.         wps {
  79.             label = "wps";
  80.             linux,code = <KEY_WPS_BUTTON>;
  81.             gpios = <&pio 257 GPIO_ACTIVE_HIGH>;
  82.         };
  83.     };
  84.  
  85.     reserved-memory {
  86.         #address-cells = <2>;
  87.         #size-cells = <2>;
  88.         ranges;
  89.         consys-reserve-memory {
  90.             compatible = "mediatek,consys-reserve-memory";
  91.             no-map;
  92.             size = <0 0x100000>;
  93.             alignment = <0 0x100000>;
  94.         };
  95.     };
  96.  
  97.     leds {
  98.         compatible = "gpio-leds";
  99.         pinctrl-names = "default";
  100.         pinctrl-0 = <&led_pins_a>;
  101.  
  102.         blue {
  103.             label = "bpi-r2:pio:blue";
  104.             gpios = <&pio 241 GPIO_ACTIVE_HIGH>;
  105.             default-state = "off";
  106.         };
  107.  
  108.         green {
  109.             label = "bpi-r2:pio:green";
  110.             gpios = <&pio 240 GPIO_ACTIVE_HIGH>;
  111.             default-state = "off";
  112.         };
  113.  
  114.         red {
  115.             label = "bpi-r2:pio:red";
  116.             gpios = <&pio 239 GPIO_ACTIVE_HIGH>;
  117.             default-state = "off";
  118.         };
  119.     };
  120.     vdd_fixed_vgpu_reg: fixedregulator@0 {
  121.         compatible = "regulator-fixed";
  122.         regulator-name = "vdd_fixed_vgpu";
  123.         regulator-min-microvolt = <1150000>;
  124.         regulator-max-microvolt = <1150000>;
  125.     };
  126.  
  127.     mt7530: switch@0 {
  128.         compatible = "mediatek,mt7530";
  129.     };
  130. };
  131.  
  132. &cir {
  133.     pinctrl-names = "default";
  134.     pinctrl-0 = <&cir_pins_a>;
  135.     status = "okay";
  136. };
  137.  
  138. &crypto {
  139.     status = "okay";
  140. };
  141.  
  142. &eth {
  143.     status = "okay";
  144.  
  145.     gmac0: mac@0 {
  146.         compatible = "mediatek,eth-mac";
  147.         reg = <0>;
  148.         phy-mode = "trgmii";
  149.  
  150.         fixed-link {
  151.             speed = <1000>;
  152.             full-duplex;
  153.             pause;
  154.         };
  155.     };
  156.  
  157.     gmac1: mac@1 {
  158.         compatible = "mediatek,eth-mac";
  159.         reg = <1>;
  160.         phy-mode = "trgmii";
  161.  
  162.         fixed-link {
  163.             speed = <1000>;
  164.             full-duplex;
  165.             pause;
  166.         };
  167.     };
  168.  
  169.     mdio: mdio-bus {
  170.         #address-cells = <1>;
  171.         #size-cells = <0>;
  172.     };
  173. };
  174.         &mt7530 {
  175.             compatible = "mediatek,mt7530";
  176.             #address-cells = <1>;
  177.             #size-cells = <0>;
  178.             //reg = <0>;
  179.             pinctrl-names = "default";
  180.             reset-gpios = <&pio 33 0>;
  181.             core-supply = <&mt6323_vpa_reg>;
  182.             io-supply = <&mt6323_vemc3v3_reg>;
  183.  
  184.             dsa,mii-bus = <&mdio>;
  185.  
  186.             ports {
  187.                 #address-cells = <1>;
  188.                 #size-cells = <0>;
  189.                 reg = <0>;
  190.  
  191.                 port@0 {
  192.                     reg = <0>;
  193.                     label = "wan";
  194.                     cpu = <&cpu_port1>;
  195.                 };
  196.  
  197.                 port@1 {
  198.                     reg = <1>;
  199.                     label = "lan0";
  200.                     cpu = <&cpu_port0>;
  201.                 };
  202.  
  203.                 port@2 {
  204.                     reg = <2>;
  205.                     label = "lan1";
  206.                     cpu = <&cpu_port0>;
  207.                 };
  208.  
  209.                 port@3 {
  210.                     reg = <3>;
  211.                     label = "lan2";
  212.                     cpu = <&cpu_port0>;
  213.                 };
  214.  
  215.                 port@4 {
  216.                     reg = <4>;
  217.                     label = "lan3";
  218.                     cpu = <&cpu_port0>;
  219.                 };
  220.  
  221.                 cpu_port1: port@5 {
  222.                     reg = <5>;
  223.                     label = "cpu";
  224.                     ethernet = <&gmac1>;
  225.                     phy-mode = "trgmii";
  226.  
  227.                     fixed-link {
  228.                         speed = <1000>;
  229.                         full-duplex;
  230.                     };
  231.                 };
  232.  
  233.                 cpu_port0: port@6 {
  234.                     reg = <6>;
  235.                     label = "cpu";
  236.                     ethernet = <&gmac0>;
  237.                     phy-mode = "trgmii";
  238.  
  239.                     fixed-link {
  240.                         speed = <1000>;
  241.                         full-duplex;
  242.                     };
  243.                 };
  244.             };
  245.         };
  246.  
  247. &i2c0 {
  248.     pinctrl-names = "default";
  249.     pinctrl-0 = <&i2c0_pins_a>;
  250.     status = "okay";
  251. };
  252.  
  253. &i2c1 {
  254.     pinctrl-names = "default";
  255.     pinctrl-0 = <&i2c1_pins_a>;
  256.     status = "okay";
  257. };
  258.  
  259. &mmc0 {
  260.     pinctrl-names = "default", "state_uhs";
  261.     pinctrl-0 = <&mmc0_pins_default>;
  262.     pinctrl-1 = <&mmc0_pins_uhs>;
  263.     status = "okay";
  264.     bus-width = <8>;
  265.     max-frequency = <50000000>;
  266.     cap-mmc-highspeed;
  267.     vmmc-supply = <&mt6323_vemc3v3_reg>;
  268.     vqmmc-supply = <&mt6323_vio18_reg>;
  269.     non-removable;
  270. };
  271.  
  272. &mmc1 {
  273.     pinctrl-names = "default", "state_uhs";
  274.     pinctrl-0 = <&mmc1_pins_default>;
  275.     pinctrl-1 = <&mmc1_pins_uhs>;
  276.     status = "okay";
  277.     bus-width = <4>;
  278.     max-frequency = <50000000>;
  279.     cap-sd-highspeed;
  280.     cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
  281.     vmmc-supply = <&mt6323_vmch_reg>;
  282.     vqmmc-supply = <&mt6323_vio18_reg>;
  283. };
  284.  
  285. &pcie {
  286.     pinctrl-names = "default";
  287.     pinctrl-0 = <&pcie_default>;
  288.     status = "okay";
  289.  
  290.     pcie@0,0 {
  291.         status = "okay";
  292.     };
  293.  
  294.     pcie@1,0 {
  295.         status = "okay";
  296.     };
  297. };
  298.  
  299. &pcie0_phy {
  300.     status = "okay";
  301. };
  302.  
  303. &pcie1_phy {
  304.     status = "okay";
  305. };
  306.  
  307. &pio {
  308.     cir_pins_a:cir@0 {
  309.         pins_cir {
  310.             pinmux = <MT7623_PIN_46_IR_FUNC_IR>;
  311.             bias-disable;
  312.         };
  313.     };
  314.  
  315.     i2c0_pins_a: i2c@0 {
  316.         pins_i2c0 {
  317.             pinmux = <MT7623_PIN_75_SDA0_FUNC_SDA0>,
  318.                  <MT7623_PIN_76_SCL0_FUNC_SCL0>;
  319.             bias-disable;
  320.         };
  321.     };
  322.  
  323.     i2c1_pins_a: i2c@1 {
  324.         pin_i2c1 {
  325.             pinmux = <MT7623_PIN_57_SDA1_FUNC_SDA1>,
  326.                  <MT7623_PIN_58_SCL1_FUNC_SCL1>;
  327.             bias-disable;
  328.         };
  329.     };
  330.  
  331.     i2s0_pins_a: i2s@0 {
  332.         pin_i2s0 {
  333.             pinmux = <MT7623_PIN_49_I2S0_DATA_FUNC_I2S0_DATA>,
  334.                  <MT7623_PIN_72_I2S0_DATA_IN_FUNC_I2S0_DATA_IN>,
  335.                  <MT7623_PIN_73_I2S0_LRCK_FUNC_I2S0_LRCK>,
  336.                  <MT7623_PIN_74_I2S0_BCK_FUNC_I2S0_BCK>,
  337.                  <MT7623_PIN_126_I2S0_MCLK_FUNC_I2S0_MCLK>;
  338.             drive-strength = <MTK_DRIVE_12mA>;
  339.             bias-pull-down;
  340.         };
  341.     };
  342.  
  343.     i2s1_pins_a: i2s@1 {
  344.         pin_i2s1 {
  345.             pinmux = <MT7623_PIN_33_I2S1_DATA_FUNC_I2S1_DATA>,
  346.                  <MT7623_PIN_34_I2S1_DATA_IN_FUNC_I2S1_DATA_IN>,
  347.                  <MT7623_PIN_35_I2S1_BCK_FUNC_I2S1_BCK>,
  348.                  <MT7623_PIN_36_I2S1_LRCK_FUNC_I2S1_LRCK>,
  349.                  <MT7623_PIN_37_I2S1_MCLK_FUNC_I2S1_MCLK>;
  350.             drive-strength = <MTK_DRIVE_12mA>;
  351.             bias-pull-down;
  352.         };
  353.     };
  354.  
  355.     key_pins_a: keys@0 {
  356.         pins_keys {
  357.             pinmux = <MT7623_PIN_256_GPIO256_FUNC_GPIO256>,
  358.                  <MT7623_PIN_257_GPIO257_FUNC_GPIO257> ;
  359.             input-enable;
  360.         };
  361.     };
  362.  
  363.     led_pins_a: leds@0 {
  364.         pins_leds {
  365.             pinmux = <MT7623_PIN_239_EXT_SDIO0_FUNC_GPIO239>,
  366.                  <MT7623_PIN_240_EXT_XCS_FUNC_GPIO240>,
  367.                  <MT7623_PIN_241_EXT_SCK_FUNC_GPIO241>;
  368.         };
  369.     };
  370.  
  371.     mmc0_pins_default: mmc0default {
  372.         pins_cmd_dat {
  373.             pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
  374.                  <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
  375.                  <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
  376.                  <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
  377.                  <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
  378.                  <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
  379.                  <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
  380.                  <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
  381.                  <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
  382.             input-enable;
  383.             bias-pull-up;
  384.         };
  385.  
  386.         pins_clk {
  387.             pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
  388.             bias-pull-down;
  389.         };
  390.  
  391.         pins_rst {
  392.             pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
  393.             bias-pull-up;
  394.         };
  395.     };
  396.  
  397.     mmc0_pins_uhs: mmc0 {
  398.         pins_cmd_dat {
  399.             pinmux = <MT7623_PIN_111_MSDC0_DAT7_FUNC_MSDC0_DAT7>,
  400.                  <MT7623_PIN_112_MSDC0_DAT6_FUNC_MSDC0_DAT6>,
  401.                  <MT7623_PIN_113_MSDC0_DAT5_FUNC_MSDC0_DAT5>,
  402.                  <MT7623_PIN_114_MSDC0_DAT4_FUNC_MSDC0_DAT4>,
  403.                  <MT7623_PIN_118_MSDC0_DAT3_FUNC_MSDC0_DAT3>,
  404.                  <MT7623_PIN_119_MSDC0_DAT2_FUNC_MSDC0_DAT2>,
  405.                  <MT7623_PIN_120_MSDC0_DAT1_FUNC_MSDC0_DAT1>,
  406.                  <MT7623_PIN_121_MSDC0_DAT0_FUNC_MSDC0_DAT0>,
  407.                  <MT7623_PIN_116_MSDC0_CMD_FUNC_MSDC0_CMD>;
  408.             input-enable;
  409.             drive-strength = <MTK_DRIVE_2mA>;
  410.             bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
  411.         };
  412.  
  413.         pins_clk {
  414.             pinmux = <MT7623_PIN_117_MSDC0_CLK_FUNC_MSDC0_CLK>;
  415.             drive-strength = <MTK_DRIVE_2mA>;
  416.             bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
  417.         };
  418.  
  419.         pins_rst {
  420.             pinmux = <MT7623_PIN_115_MSDC0_RSTB_FUNC_MSDC0_RSTB>;
  421.             bias-pull-up;
  422.         };
  423.     };
  424.  
  425.     mmc1_pins_default: mmc1default {
  426.         pins_cmd_dat {
  427.             pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
  428.                  <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
  429.                  <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
  430.                  <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
  431.                  <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
  432.             input-enable;
  433.             drive-strength = <MTK_DRIVE_4mA>;
  434.             bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
  435.         };
  436.  
  437.         pins_clk {
  438.             pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
  439.             bias-pull-down;
  440.             drive-strength = <MTK_DRIVE_4mA>;
  441.         };
  442.  
  443.         pins_wp {
  444.             pinmux = <MT7623_PIN_29_EINT7_FUNC_MSDC1_WP>;
  445.             input-enable;
  446.             bias-pull-up;
  447.         };
  448.  
  449.         pins_insert {
  450.             pinmux = <MT7623_PIN_261_MSDC1_INS_FUNC_GPIO261>;
  451.             bias-pull-up;
  452.         };
  453.     };
  454.  
  455.     mmc1_pins_uhs: mmc1 {
  456.         pins_cmd_dat {
  457.             pinmux = <MT7623_PIN_107_MSDC1_DAT0_FUNC_MSDC1_DAT0>,
  458.                  <MT7623_PIN_108_MSDC1_DAT1_FUNC_MSDC1_DAT1>,
  459.                  <MT7623_PIN_109_MSDC1_DAT2_FUNC_MSDC1_DAT2>,
  460.                  <MT7623_PIN_110_MSDC1_DAT3_FUNC_MSDC1_DAT3>,
  461.                  <MT7623_PIN_105_MSDC1_CMD_FUNC_MSDC1_CMD>;
  462.             input-enable;
  463.             drive-strength = <MTK_DRIVE_4mA>;
  464.             bias-pull-up = <MTK_PUPD_SET_R1R0_10>;
  465.         };
  466.  
  467.         pins_clk {
  468.             pinmux = <MT7623_PIN_106_MSDC1_CLK_FUNC_MSDC1_CLK>;
  469.             drive-strength = <MTK_DRIVE_4mA>;
  470.             bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
  471.         };
  472.     };
  473.  
  474.     pcie_default: pcie_pin_default {
  475.         pins_cmd_dat {
  476.             pinmux = <MT7623_PIN_208_AUD_EXT_CK1_FUNC_PCIE0_PERST_N>,
  477.                  <MT7623_PIN_209_AUD_EXT_CK2_FUNC_PCIE1_PERST_N>;
  478.             bias-disable;
  479.         };
  480.     };
  481.     pwm_pins_a: pwm@0 {
  482.         pins_pwm {
  483.             pinmux = <MT7623_PIN_203_PWM0_FUNC_PWM0>,
  484.                  <MT7623_PIN_204_PWM1_FUNC_PWM1>,
  485.                  <MT7623_PIN_205_PWM2_FUNC_PWM2>,
  486.                  <MT7623_PIN_206_PWM3_FUNC_PWM3>,
  487.                  <MT7623_PIN_207_PWM4_FUNC_PWM4>;
  488.         };
  489.     };
  490.  
  491.     spi0_pins_a: spi@0 {
  492.         pins_spi {
  493.             pinmux = <MT7623_PIN_53_SPI0_CSN_FUNC_SPI0_CS>,
  494.                 <MT7623_PIN_54_SPI0_CK_FUNC_SPI0_CK>,
  495.                 <MT7623_PIN_55_SPI0_MI_FUNC_SPI0_MI>,
  496.                 <MT7623_PIN_56_SPI0_MO_FUNC_SPI0_MO>;
  497.             bias-disable;
  498.         };
  499.     };
  500.  
  501.     uart0_pins_a: uart@0 {
  502.         pins_dat {
  503.             pinmux = <MT7623_PIN_79_URXD0_FUNC_URXD0>,
  504.                  <MT7623_PIN_80_UTXD0_FUNC_UTXD0>;
  505.         };
  506.     };
  507.  
  508.     uart1_pins_a: uart@1 {
  509.         pins_dat {
  510.             pinmux = <MT7623_PIN_81_URXD1_FUNC_URXD1>,
  511.                  <MT7623_PIN_82_UTXD1_FUNC_UTXD1>;
  512.         };
  513.     };
  514.     uart3_pins_a: uart@3 {
  515.         pins_dat {
  516.             pinmux = <MT7623_PIN_243_UCTS2_FUNC_URXD3>,
  517.                  <MT7623_PIN_242_URTS2_FUNC_UTXD3>;
  518.         };
  519.     };
  520.    
  521.     consys_pins_default: consys_pins_default {
  522.         adie {
  523.             pinmux = <MT7623_PIN_60_WB_RSTB_FUNC_WB_RSTB>,
  524.                 <MT7623_PIN_61_GPIO61_FUNC_TEST_FD>,
  525.                 <MT7623_PIN_62_GPIO62_FUNC_TEST_FC>,
  526.                 <MT7623_PIN_63_WB_SCLK_FUNC_WB_SCLK>,
  527.                 <MT7623_PIN_64_WB_SDATA_FUNC_WB_SDATA>,
  528.                 <MT7623_PIN_65_WB_SEN_FUNC_WB_SEN>,
  529.                 <MT7623_PIN_66_WB_CRTL0_FUNC_WB_CRTL0>,
  530.                 <MT7623_PIN_67_WB_CRTL1_FUNC_WB_CRTL1>,
  531.                 <MT7623_PIN_68_WB_CRTL2_FUNC_WB_CRTL2>,
  532.                 <MT7623_PIN_69_WB_CRTL3_FUNC_WB_CRTL3>,
  533.                 <MT7623_PIN_70_WB_CRTL4_FUNC_WB_CRTL4>,
  534.                 <MT7623_PIN_71_WB_CRTL5_FUNC_WB_CRTL5>;
  535.             bias-disable;
  536.         };
  537.     };
  538. };
  539.  
  540. &pwm {
  541.     pinctrl-names = "default";
  542.     pinctrl-0 = <&pwm_pins_a>;
  543.     status = "okay";
  544. };
  545.  
  546. &pwrap {
  547.     mt6323 {
  548.         mt6323led: led {
  549.             compatible = "mediatek,mt6323-led";
  550.             #address-cells = <1>;
  551.             #size-cells = <0>;
  552.  
  553.             led@0 {
  554.                 reg = <0>;
  555.                 label = "bpi-r2:isink:green";
  556.                 default-state = "off";
  557.             };
  558.  
  559.             led@1 {
  560.                 reg = <1>;
  561.                 label = "bpi-r2:isink:red";
  562.                 default-state = "off";
  563.             };
  564.  
  565.             led@2 {
  566.                 reg = <2>;
  567.                 label = "bpi-r2:isink:blue";
  568.                 default-state = "off";
  569.             };
  570.         };
  571.  
  572.         mt6323regulator: mt6323regulator{
  573.             compatible = "mediatek,mt6323-regulator";
  574.  
  575.             mt6323_vproc_reg: buck_vproc{
  576.                 regulator-name = "vproc";
  577.                 regulator-min-microvolt = < 700000>;
  578.                 regulator-max-microvolt = <1350000>;
  579.                 regulator-ramp-delay = <12500>;
  580.                 regulator-always-on;
  581.                 regulator-boot-on;
  582.             };
  583.  
  584.             mt6323_vsys_reg: buck_vsys{
  585.                 regulator-name = "vsys";
  586.                 regulator-min-microvolt = <1400000>;
  587.                 regulator-max-microvolt = <2987500>;
  588.                 regulator-ramp-delay = <25000>;
  589.                 regulator-always-on;
  590.                 regulator-boot-on;
  591.             };
  592.  
  593.             mt6323_vpa_reg: buck_vpa{
  594.                 regulator-name = "vpa";
  595.                 regulator-min-microvolt = < 500000>;
  596.                 regulator-max-microvolt = <3650000>;
  597.             };
  598.  
  599.             mt6323_vtcxo_reg: ldo_vtcxo{
  600.                 regulator-name = "vtcxo";
  601.                 regulator-min-microvolt = <2800000>;
  602.                 regulator-max-microvolt = <2800000>;
  603.                 regulator-enable-ramp-delay = <90>;
  604.                 regulator-always-on;
  605.                 regulator-boot-on;
  606.             };
  607.  
  608.             mt6323_vcn28_reg: ldo_vcn28{
  609.                 regulator-name = "vcn28";
  610.                 regulator-min-microvolt = <2800000>;
  611.                 regulator-max-microvolt = <2800000>;
  612.                 regulator-enable-ramp-delay = <185>;
  613.             };
  614.  
  615.             mt6323_vcn33_bt_reg: ldo_vcn33_bt{
  616.                 regulator-name = "vcn33_bt";
  617.                 regulator-min-microvolt = <3300000>;
  618.                 regulator-max-microvolt = <3600000>;
  619.                 regulator-enable-ramp-delay = <185>;
  620.             };
  621.  
  622.             mt6323_vcn33_wifi_reg: ldo_vcn33_wifi{
  623.                 regulator-name = "vcn33_wifi";
  624.                 regulator-min-microvolt = <3300000>;
  625.                 regulator-max-microvolt = <3600000>;
  626.                 regulator-enable-ramp-delay = <185>;
  627.             };
  628.  
  629.             mt6323_va_reg: ldo_va{
  630.                 regulator-name = "va";
  631.                 regulator-min-microvolt = <2800000>;
  632.                 regulator-max-microvolt = <2800000>;
  633.                 regulator-enable-ramp-delay = <216>;
  634.                 regulator-always-on;
  635.                 regulator-boot-on;
  636.             };
  637.  
  638.             mt6323_vcama_reg: ldo_vcama{
  639.                 regulator-name = "vcama";
  640.                 regulator-min-microvolt = <1500000>;
  641.                 regulator-max-microvolt = <2800000>;
  642.                 regulator-enable-ramp-delay = <216>;
  643.             };
  644.  
  645.             mt6323_vio28_reg: ldo_vio28{
  646.                 regulator-name = "vio28";
  647.                 regulator-min-microvolt = <2800000>;
  648.                 regulator-max-microvolt = <2800000>;
  649.                 regulator-enable-ramp-delay = <216>;
  650.                 regulator-always-on;
  651.                 regulator-boot-on;
  652.             };
  653.  
  654.             mt6323_vusb_reg: ldo_vusb{
  655.                 regulator-name = "vusb";
  656.                 regulator-min-microvolt = <3300000>;
  657.                 regulator-max-microvolt = <3300000>;
  658.                 regulator-enable-ramp-delay = <216>;
  659.                 regulator-boot-on;
  660.             };
  661.  
  662.             mt6323_vmc_reg: ldo_vmc{
  663.                 regulator-name = "vmc";
  664.                 regulator-min-microvolt = <1800000>;
  665.                 regulator-max-microvolt = <3300000>;
  666.                 regulator-enable-ramp-delay = <36>;
  667.                 regulator-boot-on;
  668.             };
  669.  
  670.             mt6323_vmch_reg: ldo_vmch{
  671.                 regulator-name = "vmch";
  672.                 regulator-min-microvolt = <3000000>;
  673.                 regulator-max-microvolt = <3300000>;
  674.                 regulator-enable-ramp-delay = <36>;
  675.                 regulator-boot-on;
  676.             };
  677.  
  678.             mt6323_vemc3v3_reg: ldo_vemc3v3{
  679.                 regulator-name = "vemc3v3";
  680.                 regulator-min-microvolt = <3000000>;
  681.                 regulator-max-microvolt = <3300000>;
  682.                 regulator-enable-ramp-delay = <36>;
  683.                 regulator-boot-on;
  684.             };
  685.  
  686.             mt6323_vgp1_reg: ldo_vgp1{
  687.                 regulator-name = "vgp1";
  688.                 regulator-min-microvolt = <1200000>;
  689.                 regulator-max-microvolt = <3300000>;
  690.                 regulator-enable-ramp-delay = <216>;
  691.             };
  692.  
  693.             mt6323_vgp2_reg: ldo_vgp2{
  694.                 regulator-name = "vgp2";
  695.                 regulator-min-microvolt = <1200000>;
  696.                 regulator-max-microvolt = <3000000>;
  697.                 regulator-enable-ramp-delay = <216>;
  698.             };
  699.  
  700.             mt6323_vgp3_reg: ldo_vgp3{
  701.                 regulator-name = "vgp3";
  702.                 regulator-min-microvolt = <1200000>;
  703.                 regulator-max-microvolt = <1800000>;
  704.                 regulator-enable-ramp-delay = <216>;
  705.             };
  706.  
  707.             mt6323_vcn18_reg: ldo_vcn18{
  708.                 regulator-name = "vcn18";
  709.                 regulator-min-microvolt = <1800000>;
  710.                 regulator-max-microvolt = <1800000>;
  711.                 regulator-enable-ramp-delay = <216>;
  712.             };
  713.  
  714.             mt6323_vsim1_reg: ldo_vsim1{
  715.                 regulator-name = "vsim1";
  716.                 regulator-min-microvolt = <1800000>;
  717.                 regulator-max-microvolt = <3000000>;
  718.                 regulator-enable-ramp-delay = <216>;
  719.             };
  720.  
  721.             mt6323_vsim2_reg: ldo_vsim2{
  722.                 regulator-name = "vsim2";
  723.                 regulator-min-microvolt = <1800000>;
  724.                 regulator-max-microvolt = <3000000>;
  725.                 regulator-enable-ramp-delay = <216>;
  726.             };
  727.  
  728.             mt6323_vrtc_reg: ldo_vrtc{
  729.                 regulator-name = "vrtc";
  730.                 regulator-min-microvolt = <2800000>;
  731.                 regulator-max-microvolt = <2800000>;
  732.                 regulator-always-on;
  733.                 regulator-boot-on;
  734.             };
  735.  
  736.             mt6323_vcamaf_reg: ldo_vcamaf{
  737.                 regulator-name = "vcamaf";
  738.                 regulator-min-microvolt = <1200000>;
  739.                 regulator-max-microvolt = <3300000>;
  740.                 regulator-enable-ramp-delay = <216>;
  741.             };
  742.  
  743.             mt6323_vibr_reg: ldo_vibr{
  744.                 regulator-name = "vibr";
  745.                 regulator-min-microvolt = <1200000>;
  746.                 regulator-max-microvolt = <3300000>;
  747.                 regulator-enable-ramp-delay = <36>;
  748.             };
  749.  
  750.             mt6323_vrf18_reg: ldo_vrf18{
  751.                 regulator-name = "vrf18";
  752.                 regulator-min-microvolt = <1825000>;
  753.                 regulator-max-microvolt = <1825000>;
  754.                 regulator-enable-ramp-delay = <187>;
  755.             };
  756.  
  757.             mt6323_vm_reg: ldo_vm{
  758.                 regulator-name = "vm";
  759.                 regulator-min-microvolt = <1200000>;
  760.                 regulator-max-microvolt = <1800000>;
  761.                 regulator-enable-ramp-delay = <216>;
  762.                 regulator-always-on;
  763.                 regulator-boot-on;
  764.             };
  765.  
  766.             mt6323_vio18_reg: ldo_vio18{
  767.                 regulator-name = "vio18";
  768.                 regulator-min-microvolt = <1800000>;
  769.                 regulator-max-microvolt = <1800000>;
  770.                 regulator-enable-ramp-delay = <216>;
  771.                 regulator-always-on;
  772.                 regulator-boot-on;
  773.             };
  774.  
  775.             mt6323_vcamd_reg: ldo_vcamd{
  776.                 regulator-name = "vcamd";
  777.                 regulator-min-microvolt = <1200000>;
  778.                 regulator-max-microvolt = <1800000>;
  779.                 regulator-enable-ramp-delay = <216>;
  780.             };
  781.  
  782.             mt6323_vcamio_reg: ldo_vcamio{
  783.                 regulator-name = "vcamio";
  784.                 regulator-min-microvolt = <1800000>;
  785.                 regulator-max-microvolt = <1800000>;
  786.                 regulator-enable-ramp-delay = <216>;
  787.             };
  788.         };
  789.  
  790.                 mt6323keys: mt6323keys {
  791.                         compatible = "mediatek,mt6323-keys";
  792.                         mediatek,long-press-mode = <1>;
  793.                         power-off-time-sec = <0>;
  794.  
  795.                         power {
  796.                                 linux,keycodes = <116>;
  797.                                 wakeup-source;
  798.                         };
  799.  
  800.                         home {
  801.                                 linux,keycodes = <114>;
  802.                         };
  803.                 };
  804.  
  805.                 codec: mt6397codec {
  806.                         compatible = "mediatek,mt6397-codec";
  807.                 };
  808.  
  809.                 power-controller {
  810.                         compatible = "mediatek,mt6323-pwrc";
  811.                 };
  812.  
  813.                 rtc {
  814.                         compatible = "mediatek,mt6323-rtc";
  815.                 };
  816.     };
  817. };
  818.  
  819. &consys {      
  820.     mediatek,pwrap-regmap = <&pwrap>;
  821.     pinctrl-names = "default";
  822.     pinctrl-0 = <&consys_pins_default>;
  823.     vcn18-supply = <&mt6323_vcn18_reg>;
  824.     vcn28-supply = <&mt6323_vcn28_reg>;
  825.     vcn33_bt-supply = <&mt6323_vcn33_bt_reg>;
  826.     vcn33_wifi-supply = <&mt6323_vcn33_wifi_reg>;
  827.     status = "okay";
  828. };
  829.  
  830. &spi0 {
  831.     pinctrl-names = "default";
  832.     pinctrl-0 = <&spi0_pins_a>;
  833.     status = "okay";
  834.     spidev: spidev@0 {
  835.         compatible = "rohm,dh2228fv";
  836.         spi-max-frequency = <1000000>;
  837.         reg = <0>;
  838.     };
  839. };
  840.  
  841. &uart0 {
  842.     pinctrl-names = "default";
  843.     pinctrl-0 = <&uart0_pins_a>;
  844.     status = "disabled";
  845. };
  846.  
  847. &uart1 {
  848.     pinctrl-names = "default";
  849.     pinctrl-0 = <&uart1_pins_a>;
  850.     status = "disabled";
  851. };
  852.  
  853. &uart2 {
  854.     status = "okay";
  855. };
  856.  
  857. &uart3 {
  858.     pinctrl-names = "default";
  859.     pinctrl-0 = <&uart3_pins_a>;
  860.     status = "okay";
  861. };
  862.  
  863. &usb1 {
  864.     vusb33-supply = <&reg_3p3v>;
  865.     vbus-supply = <&reg_5v>;
  866.     status = "okay";
  867. };
  868.  
  869. &usb2 {
  870.     vusb33-supply = <&reg_3p3v>;
  871.     vbus-supply = <&reg_5v>;
  872.     status = "okay";
  873. };
  874.  
  875. &u3phy1 {
  876.     status = "okay";
  877. };
  878.  
  879. &u3phy2 {
  880.     status = "okay";
  881. };
  882.  
  883. &watchdog {
  884.     status = "okay";
  885. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement