From 124d3b550ba829159f09ac2c8a3af6dfef6f0626 Mon Sep 17 00:00:00 2001 From: ThomasKaiser Date: Sun, 29 May 2016 15:16:43 +0200 Subject: [PATCH] Armbian adoptions (led, thermal/throttling) for Orange Pi Plus 2E fex --- config/fex/orangepiplus2e.fex | 335 +++++++++++++++++++--------------- 1 file changed, 187 insertions(+), 148 deletions(-) diff --git a/config/fex/orangepiplus2e.fex b/config/fex/orangepiplus2e.fex index 44282efab2..5faf2b3067 100644 --- a/config/fex/orangepiplus2e.fex +++ b/config/fex/orangepiplus2e.fex @@ -1,18 +1,17 @@ [product] version = "100" -machine = "dolphin-p1" +machine = "orangepi-plus-2e" +;bases partially on https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/h3/xunlong_orange_pi_plus_2e.fex [platform] debug_mode = 1 eraseflag = 1 -next_work = 3 secure_without_OS = 1 secure_bit = 0 [target] boot_clock = 1008 -storage_type = 2 -burn_key = 0 +storage_type = -1 [key_detect_en] keyen_flag = 0 @@ -25,7 +24,7 @@ fel_key_min = 2 logical_start = 40960 sprite_work_delay = 500 sprite_err_delay = 200 -sprite_gpio0 = port:PA15<1> +sprite_gpio0 = port:PL10<1> next_work = 3 [box_start_os] @@ -39,7 +38,7 @@ led_state = 0 [boot_init_gpio] used = 1 -gpio0 = port:PA15<1><1> +gpio0 = port:PL10<1><1> gpio1 = port:PG11<1><1> [recovery_para] @@ -47,19 +46,6 @@ used = 1 mode = 2 recovery_key = port:PL04<0> -[hardware_version] -hid_used = 0 -hid_count = 3 -hid_bit_0 = port:PD00<0><1> -hid_bit_1 = port:PD01<0><1> -hid_bit_2 = port:PD02<0><1> - -[hardware_code_table] -table_count = 3 -table_1 = "1:aliyun_v10" -table_2 = "7:sys_config" -table_3 = "0:sys_000" - [pm_para] standby_mode = 1 @@ -155,6 +141,7 @@ dram_selfresh_en = 1 dram_freq = 36 wakeup_src0 = wakeup_src_wl = port:PG10<4><0> +wakeup_src_bt = port:PL03<6><0> [twi0] twi_used = 1 @@ -162,7 +149,7 @@ twi_scl = port:PA11<2> twi_sda = port:PA12<2> [twi1] -twi_used = 0 +twi_used = 1 twi_scl = port:PA18<3> twi_sda = port:PA19<3> @@ -179,28 +166,34 @@ uart_tx = port:PA04<2><1> uart_rx = port:PA05<2><1> [uart1] -uart_used = 1 +uart_used = 0 uart_port = 1 -uart_type = 2 +uart_type = 4 uart_tx = port:PG06<2><1> uart_rx = port:PG07<2><1> +uart_rts = port:PG08<2><1> +uart_cts = port:PG09<2><1> [uart2] -uart_used = 1 +uart_used = 0 uart_port = 2 -uart_type = 2 +uart_type = 4 uart_tx = port:PA00<2><1> uart_rx = port:PA01<2><1> +uart_rts = port:PA02<2><1> +uart_cts = port:PA03<2><1> [uart3] -uart_used = 1 +uart_used = 0 uart_port = 3 -uart_type = 2 +uart_type = 4 uart_tx = port:PA13<3><1> uart_rx = port:PA14<3><1> +uart_rts = port:PA15<3><1> +uart_cts = port:PA16<3><1> [spi0] -spi_used = 0 +spi_used = 1 spi_cs_bitmap = 1 spi_mosi = port:PC00<3> spi_miso = port:PC01<3> @@ -219,103 +212,105 @@ spi_miso = port:PA16<2> spi_dev_num = 1 [spi_board0] -modalias = "m25p32" +modalias = "spidev" max_speed_hz = 33000000 bus_num = 0 chip_select = 0 mode = 0 +full_duplex = 1 +manual_cs = 0 [gpio_para] gpio_used = 1 -gpio_num = 24 -gpio_pin_1 = port:PL10<1><1> -gpio_pin_2 = port:PA15<1><0> -gpio_pin_3 = port:PA12<1><0> -gpio_pin_4 = port:PA11<1><0> -gpio_pin_5 = port:PA06<1><0> -gpio_pin_9 = port:PD14<1><0> -gpio_pin_11 = port:PA03<1><0> -gpio_pin_12 = port:PC04<1><0> -gpio_pin_13 = port:PC07<1><0> -gpio_pin_14 = port:PC00<1><0> -gpio_pin_15 = port:PC01<1><0> -gpio_pin_16 = port:PA02<1><0> -gpio_pin_17 = port:PC02<1><0> -gpio_pin_18 = port:PC03<1><0> -gpio_pin_19 = port:PA21<1><0> -gpio_pin_20 = port:PA19<1><0> -gpio_pin_21 = port:PA18<1><0> -gpio_pin_22 = port:PA07<1><0> -gpio_pin_23 = port:PA08<1><0> -gpio_pin_24 = port:PG08<1><0> -gpio_pin_25 = port:PA09<1><0> -gpio_pin_26 = port:PA10<1><0> -gpio_pin_27 = port:PG09<1><0> -gpio_pin_28 = port:PA20<1><0> +gpio_num = 19 +gpio_pin_1 = port:PA06<1><0> +gpio_pin_2 = port:PA13<1><0> +gpio_pin_3 = port:PA14<1><0> +gpio_pin_4 = port:PA01<1><0> +gpio_pin_5 = port:PD14<1><0> +gpio_pin_6 = port:PA00<1><0> +gpio_pin_7 = port:PA03<1><0> +gpio_pin_8 = port:PC04<1><0> +gpio_pin_9 = port:PC07<1><0> +gpio_pin_10 = port:PA02<1><0> +gpio_pin_11 = port:PA21<1><0> +gpio_pin_12 = port:PA07<1><0> +gpio_pin_13 = port:PA08<1><0> +gpio_pin_14 = port:PG08<1><0> +gpio_pin_15 = port:PA09<1><0> +gpio_pin_16 = port:PA10<1><0> +gpio_pin_17 = port:PG09<1><0> +gpio_pin_18 = port:PG06<1><0> +gpio_pin_19 = port:PG07<1><0> -[led_assign] -normal_led = "gpio_pin_2" -standby_led = "gpio_pin_1" +;[led_assign] +;normal_led = "gpio_pin_2" +;standby_led = "gpio_pin_1" + +[leds_para] +leds_used = 1 +green_led = port:PL10<1><1> +green_led_active_low = 0 +red_led = port:PA15<1><0> +red_led_active_low = 0 [ths_para] ths_used = 1 -ths_trip1_count = 7 -ths_trip1_0 = 80 -ths_trip1_1 = 85 -ths_trip1_2 = 90 -ths_trip1_3 = 95 -ths_trip1_4 = 100 -ths_trip1_5 = 105 -ths_trip1_6 = 115 -ths_trip1_4 = 0 -ths_trip1_5 = 0 +ths_trip1_count = 6 +ths_trip1_0 = 70 +ths_trip1_1 = 80 +ths_trip1_2 = 85 +ths_trip1_3 = 90 +ths_trip1_4 = 95 +ths_trip1_5 = 100 ths_trip1_6 = 0 ths_trip1_7 = 0 ths_trip1_0_min = 0 -ths_trip1_0_max = 0 +ths_trip1_0_max = 1 ths_trip1_1_min = 1 -ths_trip1_1_max = 1 -ths_trip1_2_min = 1 -ths_trip1_2_max = 1 -ths_trip1_3_min = 2 -ths_trip1_3_max = 2 -ths_trip1_4_min = 2 -ths_trip1_4_max = 2 -ths_trip1_5_min = 3 -ths_trip1_5_max = 4 -ths_trip1_6_min = 4 -ths_trip1_6_max = 4 +ths_trip1_1_max = 2 +ths_trip1_2_min = 2 +ths_trip1_2_max = 3 +ths_trip1_3_min = 3 +ths_trip1_3_max = 4 +ths_trip1_4_min = 4 +ths_trip1_4_max = 5 +ths_trip1_5_min = 5 +ths_trip1_5_max = 5 +ths_trip1_6_min = 0 +ths_trip1_6_max = 0 ths_trip2_count = 1 -ths_trip2_0 = 115 +ths_trip2_0 = 105 [cooler_table] -cooler_count = 5 -cooler0 = "1200000 4 4294967295 0" -cooler1 = "1200000 3 4294967295 0" -cooler2 = "1200000 2 4294967295 0" -cooler3 = "1200000 1 4294967295 0" -cooler4 = "504000 1 4294967295 0" +cooler_count = 6 +cooler0 = "1296000 4 4294967295 0" +cooler1 = "1200000 4 4294967295 0" +cooler2 = "1008000 4 4294967295 0" +cooler3 = "816000 4 4294967295 0" +cooler4 = "648000 4 4294967295 0" +cooler5 = "480000 1 4294967295 0" [nand0_para] nand_support_2ch = 0 nand0_used = 0 -nand0_we = port:PC00<2><0><1> -nand0_ale = port:PC01<2><0><1> -nand0_cle = port:PC02<2><0><1> -nand0_ce1 = port:PC03<2><1><1> -nand0_ce0 = port:PC04<2><1><1> -nand0_nre = port:PC05<2><0><1> -nand0_rb0 = port:PC06<2><1><1> -nand0_rb1 = port:PC07<2><1><1> -nand0_d0 = port:PC08<2><0><1> -nand0_d1 = port:PC09<2><0><1> -nand0_d2 = port:PC10<2><0><1> -nand0_d3 = port:PC11<2><0><1> -nand0_d4 = port:PC12<2><0><1> -nand0_d5 = port:PC13<2><0><1> -nand0_d6 = port:PC14<2><0><1> -nand0_d7 = port:PC15<2><0><1> -nand0_ndqs = port:PC16<2><0><1> +nand0_we = port:PC00<2> +nand0_ale = port:PC01<2> +nand0_cle = port:PC02<2> +nand0_ce1 = port:PC03<2> +nand0_ce0 = port:PC04<2> +nand0_nre = port:PC05<2> +nand0_rb0 = port:PC06<2> +nand0_rb1 = port:PC07<2> +nand0_d0 = port:PC08<2> +nand0_d1 = port:PC09<2> +nand0_d2 = port:PC10<2> +nand0_d3 = port:PC11<2> +nand0_d4 = port:PC12<2> +nand0_d5 = port:PC13<2> +nand0_d6 = port:PC14<2> +nand0_d7 = port:PC15<2> +nand0_ndqs = port:PC16<2> [boot_disp] advert_disp = 0 @@ -332,12 +327,12 @@ hdmi_mode_check = 1 disp_init_enable = 1 disp_mode = 0 screen0_output_type = 3 -screen0_output_mode = 4 +screen0_output_mode = 5 screen1_output_type = 3 -screen1_output_mode = 4 +screen1_output_mode = 5 fb0_format = 0 -fb0_width = 1280 -fb0_height = 720 +fb0_width = 0 +fb0_height = 0 fb1_format = 0 fb1_width = 0 fb1_height = 0 @@ -354,29 +349,32 @@ tv_dac_src0 = 0 [pwm0_para] pwm_used = 0 pwm_positive = port:PA05<3><0> -: If set gamc_phy to use = 1 +; If set gamc_phy to use = 2 [gmac0] -gmac_used = 1 -gmac_rxd3 = port:PD00<2><3> -gmac_rxd2 = port:PD01<2><3> -gmac_rxd1 = port:PD02<2><3> -gmac_rxd0 = port:PD03<2><3> -gmac_rxclk = port:PD04<2><3> -gmac_rxdv = port:PD05<2><3> -gmac_txd3 = port:PD07<2><3> -gmac_txd2 = port:PD08<2><3> -gmac_txd1 = port:PD09<2><3> -gmac_txd0 = port:PD10<2><3> -gmac_txclk = port:PD12<2><3> -gmac_txen = port:PD13<2><3> -gmac_col = port:PD15<2><3> -gmac_mdc = port:PD16<2><3> -gmac_mdio = port:PD17<2><3> -gmac_power1 = +gmac_used = 1 +gmac_rxd3 = port:PD00<2><3> +gmac_rxd2 = port:PD01<2><3> +gmac_rxd1 = port:PD02<2><3> +gmac_rxd0 = port:PD03<2><3> +gmac_rxclk = port:PD04<2><3> +gmac_rxdv = port:PD05<2><3> +;gmac_rxerr = port:PD06<2><3> +gmac_txd3 = port:PD07<2><3> +gmac_txd2 = port:PD08<2><3> +gmac_txd1 = port:PD09<2><3> +gmac_txd0 = port:PD10<2><3> +;gmac_crs = port:PD11<2><3> +gmac_txclk = port:PD12<2><3> +gmac_txen = port:PD13<2><3> +;gmac_txerr = port:PD14<2><3> +gmac_col = port:PD15<2><3> +gmac_mdc = port:PD16<2><3> +gmac_mdio = port:PD17<2><3> +gmac_power1 = [gmac_phy_power] -gmac_phy_power_en = port:PD06<1><0> +gmac_phy_power_en = port:PD06<1><0> [csi0] vip_used = 1 @@ -463,7 +461,7 @@ di_used = 1 [mmc0_para] sdc_used = 1 -sdc_detmode = 1 +sdc_detmode = 3 sdc_buswidth = 4 sdc_clk = port:PF02<2><1><2> sdc_cmd = port:PF03<2><1><2> @@ -533,8 +531,8 @@ smc_sda = port:PA08<2> [usbc0] usb_used = 1 -usb_port_type = 1 -usb_detect_type = 1 +usb_port_type = 2 +usb_detect_type = 0 usb_id_gpio = port:PG12<0><1> usb_det_vbus_gpio = port:PG12<0><1> usb_drv_vbus_gpio = port:PL02<1><0><0> @@ -597,7 +595,7 @@ serial_unique = 0 [module_para] module_num = 7 module_power0 = "vcc-wifi-33" -module_power0_vol = 0 +module_power0_vol = module_power1 = module_power1_vol = module_power2 = @@ -729,31 +727,53 @@ ir_addr_code13 = 56610 ir_used = 1 ir_tx = port:PH07<2> +;---------------------------------------------------------------------------------- +; dvfs voltage-frequency table configuration +; +; pmuic_type:0:none, 1:gpio, 2:i2c +; pmu_gpio0: gpio config. +; pmu_levelx: 0~9999: voltage(mV), 10000~90000:gpio0 state. voltage form high to low. +; +; extremity_freq(Hz): cpu extremity frequency when run benckmark or demo apk +; 1536MHz@1500mV with radiator, 1296MHz@1340mV without radiator +; max_freq: cpu maximum frequency, based on Hz, can not be more than 1200MHz +; min_freq: cpu minimum frequency, based on Hz, can not be less than 60MHz +; +; LV_count: count of LV_freq/LV_volt, must be < 16 +; +; LV1: core vdd is 1.50v if cpu frequency is (1296Mhz, 1536Mhz] +; LV2: core vdd is 1.34v if cpu frequency is (1200Mhz, 1296Mhz] +; LV3: core vdd is 1.32v if cpu frequency is (1008Mhz, 1200Mhz] +; LV4: core vdd is 1.20v if cpu frequency is (816Mhz, 1008Mhz] +; LV5: core vdd is 1.10v if cpu frequency is (648Mhz, 816Mhz] +; LV6: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] +; LV7: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] +; LV8: core vdd is 1.04v if cpu frequency is (0Mhz, 648Mhz] +; +;---------------------------------------------------------------------------------- [dvfs_table] pmuic_type = 2 pmu_gpio0 = port:PL06<1><1><2><1> pmu_level0 = 11300 pmu_level1 = 1100 -max_freq = 1200000000 +extremity_freq = 1296000000 +max_freq = 1296000000 min_freq = 480000000 -boot_freq = 1008000000 -LV_count = 8 -LV1_freq = 1200000000 -LV1_volt = 1300 -LV2_freq = 1008000000 -LV2_volt = 1200 -LV3_freq = 0 -LV3_volt = 1100 -LV4_freq = 0 -LV4_volt = 1100 -LV5_freq = 0 -LV5_volt = 1100 -LV6_freq = 0 -LV6_volt = 1100 -LV7_freq = 0 -LV7_volt = 1100 -LV8_freq = 0 -LV8_volt = 1100 +LV_count = 7 +LV1_freq = 1296000000 +LV1_volt = 1320 +LV2_freq = 1200000000 +LV2_volt = 1240 +LV3_freq = 1104000000 +LV3_volt = 1180 +LV4_freq = 1008000000 +LV4_volt = 1140 +LV5_freq = 960000000 +LV5_volt = 1080 +LV6_freq = 816000000 +LV6_volt = 1020 +LV7_freq = 480000000 +LV7_volt = 980 [gpu_dvfs_table] G_LV_count = 3 @@ -843,3 +863,22 @@ din_gpio = port:PD00<1><1> clk_gpio = port:PD01<1><1> stb_gpio = port:PD02<1><1> +;---------------------------------------------------------------------------------- +;mali parameters +;---------------------------------------------------------------------------------- +[mali_para] +mali_used = 1 +mali_clkdiv = 1 +mali_extreme_freq = 600 +mali_extreme_vol = 1400 + +;---------------------------------------------------------------------------------- +;1wire parameters (default - PA20) +;---------------------------------------------------------------------------------- +[w1_para] +w1_used = 1 +gpio = 20 + +[corekeeper] +corekeeper_enabled = 1 +