From be45768b193281917003531c55e9ebda9d2c2f99 Mon Sep 17 00:00:00 2001 From: lin <lin@kickpi.com> Date: Mon, 06 Jan 2025 01:56:15 +0000 Subject: [PATCH] feat(build): add build lunch k5c and k5 support --- longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts | 1469 ++++++++++++++++++++++++++++ .gitignore | 1 longan/build/pack | 23 longan/build/mkcmd.sh | 6 longan/device/config/chips/a133/configs/c3/kickpi-k5.dts | 1445 ++++++++++++++++++++++++++++ longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5.mk | 1 build.sh | 113 + longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5c.mk | 1 8 files changed, 3,012 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index b7b1716..1b1dffa 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ longan/out/ android/device/softwinner/ceres-c3/fstab.sun50iw10p1.noverify +longan/device/.BoardConfig.mk diff --git a/build.sh b/build.sh index b703a2c..da73628 100755 --- a/build.sh +++ b/build.sh @@ -1,46 +1,83 @@ #!/bin/bash -if [ x"$1" == "xuboot" ] || [ x"$1" == "xu" ] || [ x"$1" == "x" ] ;then - echo "Start build uboot" - cd longan/brandy/brandy-2.0 && ./build.sh -p sun50iw10p1 && cd - - if [ $? -eq 0 ]; then - echo "Build uboot ok!" - else - echo "Build uboot failed!" - exit 1 - fi -fi +BOARD_CONFIG_DIR=longan/device/config/chips/ +BOARD_CONFIG_FILE=longan/device/.BoardConfig.mk -if [ x"$1" == "xkernel" ] || [ x"$1" == "xk" ] || [ x"$1" == "x" ] ;then - echo "Start build kernel" - cd longan && ./build.sh autoconfig -o android -i a133 -b c3 && ./build.sh && cd - - if [ $? -eq 0 ]; then - echo "Build kernel ok!" - else - echo "Build kernel failed!" - exit 1 - fi -fi +function build_lunch() +{ + TARGET_BOARD_PATH_ARRAY=( $(find $BOARD_CONFIG_DIR -name "BoardConfig-a133*.mk" ) ) + TARGET_BOARD_ARRAY=( $(find $BOARD_CONFIG_DIR -name "BoardConfig-a133*.mk" | sed 's#.*/##' | sort) ) + echo "======you are building a133 android======" + echo "${TARGET_BOARD_ARRAY[@]}" |xargs -n 1 | sed "=" | sed "N;s/\n/. /" -# android envsetup -cd android -. ./build/envsetup.sh -lunch ceres_c3-userdebug -extract-bsp -cd - + while true; do + read -p "which board would you like (1-${#TARGET_BOARD_ARRAY[@]}): " INDEX + if [[ "$INDEX" =~ ^[0-9]+$ ]] && ((INDEX >= 1 && INDEX <= ${#TARGET_BOARD_ARRAY[@]})); then + INDEX=$(($INDEX - 1)) + BUILD_TARGET_BOARD="${TARGET_BOARD_PATH_ARRAY[$INDEX]}" -if [ x"$1" == "xandroid" ] || [ x"$1" == "xa" ] || [ x"$1" == "x" ] ;then - echo "Start build Android" - cd android - make installclean - make BUILD_NUMBER=ido-a133 -j32 - cd - -fi + break + else + echo "Invalid input. Please enter a number between 1 and ${#TARGET_BOARD_ARRAY[@]}." + fi + done -# pack image -echo "Start pack image" -cd android -pack -cd - + cp -f $BUILD_TARGET_BOARD $BOARD_CONFIG_FILE + echo -e "build target board configuration: $BUILD_TARGET_BOARD\n" + #select partition table + source $BOARD_CONFIG_FILE + echo "you board is ${DTS_NAME}" + source $BOARD_CONFIG_FILE + longan/build/mkcommon.sh autoconfig -i a133 -o android -b c3 +} + +if [ "x$1" == "xlunch" ];then + build_lunch && exit 0 +else + source $BOARD_CONFIG_FILE + if [ x"$1" == "xuboot" ] || [ x"$1" == "xu" ] || [ x"$1" == "x" ] ;then + echo "Start build uboot" + cd longan/brandy/brandy-2.0 && ./build.sh -p sun50iw10p1 && cd - + if [ $? -eq 0 ]; then + echo "Build uboot ok!" + else + echo "Build uboot failed!" + exit 1 + fi + fi + + if [ x"$1" == "xkernel" ] || [ x"$1" == "xk" ] || [ x"$1" == "x" ] ;then + echo "Start build kernel" + cd longan && ./build.sh autoconfig -o android -i a133 -b c3 && ./build.sh && cd - + if [ $? -eq 0 ]; then + echo "Build kernel ok!" + else + echo "Build kernel failed!" + exit 1 + fi + fi + + # android envsetup + cd android + . ./build/envsetup.sh + lunch ceres_c3-userdebug + extract-bsp + cd - + + if [ x"$1" == "xandroid" ] || [ x"$1" == "xa" ] || [ x"$1" == "x" ] ;then + echo "Start build Android" + cd android + make installclean + make BUILD_NUMBER=ido-a133 -j32 + cd - + fi + + # pack image + echo "Start pack image" + cd android + pack + cd - + +fi \ No newline at end of file diff --git a/longan/build/mkcmd.sh b/longan/build/mkcmd.sh index bd62b3cd2..7316a9c 100755 --- a/longan/build/mkcmd.sh +++ b/longan/build/mkcmd.sh @@ -1113,7 +1113,11 @@ { # mark kernel .config belong to which platform local config_mark="${KERNEL_BUILD_OUT_DIR}/.config.mark" - local board_dts="$LICHEE_BOARD_CONFIG_DIR/board.dts" + if [ -n ${DTS_NAME} ]; then + local board_dts="$LICHEE_BOARD_CONFIG_DIR/${DTS_NAME}.dts" + else + local board_dts="$LICHEE_BOARD_CONFIG_DIR/board.dts" + fi # In linux-5.4 (and later), fex file is no longer supported. # Which means, sys_config.fex is no longer used. diff --git a/longan/build/pack b/longan/build/pack index 9dc00bf..63e21cc 100755 --- a/longan/build/pack +++ b/longan/build/pack @@ -995,15 +995,22 @@ fi dragon image.cfg sys_partition.fex - if [ $? -eq 0 ]; then - if [ -e ${IMG_NAME} ]; then - mv ${IMG_NAME} $LICHEE_OUT_DIR/${IMG_NAME} - echo '----------image is at----------' - echo -e '\033[0;31;1m' - echo ${LICHEE_OUT_DIR}/${IMG_NAME} - echo -e '\033[0m' + if [ $? -eq 0 ]; then + if [ -e ${IMG_NAME} ]; then + echo '----------image is at----------' + if [ -n ${DTS_NAME} ]; then + mv ${IMG_NAME} $LICHEE_OUT_DIR/${DTS_NAME}_${IMG_NAME} + echo -e '\033[0;31;1m' + echo $LICHEE_OUT_DIR/${DTS_NAME}_${IMG_NAME} + echo -e '\033[0m' + else + mv ${IMG_NAME} $LICHEE_OUT_DIR/${IMG_NAME} + echo -e '\033[0;31;1m' + echo ${LICHEE_OUT_DIR}/*${IMG_NAME} + echo -e '\033[0m' + fi + fi fi - fi cd .. if [ "x${PACK_PROGRAMMER}" = "xprogrammer" ]; then diff --git a/longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5.mk b/longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5.mk new file mode 100644 index 0000000..0a4d4bc --- /dev/null +++ b/longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5.mk @@ -0,0 +1 @@ +export DTS_NAME=kickpi-k5 \ No newline at end of file diff --git a/longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5c.mk b/longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5c.mk new file mode 100644 index 0000000..19fa628 --- /dev/null +++ b/longan/device/config/chips/a133/configs/c3/BoardConfig-a133-kickpi-k5c.mk @@ -0,0 +1 @@ +export DTS_NAME=kickpi-k5c \ No newline at end of file diff --git a/longan/device/config/chips/a133/configs/c3/kickpi-k5.dts b/longan/device/config/chips/a133/configs/c3/kickpi-k5.dts new file mode 100755 index 0000000..2fa9efb --- /dev/null +++ b/longan/device/config/chips/a133/configs/c3/kickpi-k5.dts @@ -0,0 +1,1445 @@ +/* + * Allwinner Technology CO., Ltd. sun50iw10p1 soc board. + * + * soc board support. + */ + +/dts-v1/; +#include "sun50iw10p1.dtsi" +#include "dt-bindings/input/linux-event-codes.h" + +/{ + model = "sun50iw10"; + compatible = "allwinner,a133", "arm,sun50iw10p1"; + + aliases { + pmu0 = &pmu0; + standby_param = &standby_param; + }; + + reg_usb1_vbus: usb1-vbus { + compatible = "regulator-fixed"; + gpio = <&r_pio PL 8 1 2 0 1>; + regulator-name = "usb1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-enable-ramp-delay = <1000>; + enable-active-high; + }; + + soc: soc@03000000 { + + r_pio: pinctrl@07022000 { + + s_twi0_pins_a: s_twi0@0 { + allwinner,pins = "PL0", "PL1"; + allwinner,pname = "s_twi0_scl", "s_twi0_sda"; + allwinner,function = "s_twi0"; + allwinner,muxsel = <2>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + s_twi0_pins_b: s_twi0@1 { + allwinner,pins = "PL0", "PL1"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + }; + pio: pinctrl@0300b000 { + twi0_pins_a: twi0@0 { + allwinner,pins = "PD22", "PD23"; + allwinner,pname = "twi0_scl", "twi0_sda"; + allwinner,function = "twi0"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi0_pins_b: twi0@1 { + allwinner,pins = "PD22", "PD23"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi1_pins_a: twi1@0 { + allwinner,pins = "PB4", "PB5"; + allwinner,pname = "twi1_scl", "twi1_sda"; + allwinner,function = "twi1"; + allwinner,muxsel = <2>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi1_pins_b: twi1@1 { + allwinner,pins = "PB4", "PB5"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi2_pins_a: twi2@0 { + allwinner,pins = "PE1", "PE2"; + allwinner,pname = "twi2_scl", "twi2_sda"; + allwinner,function = "twi2"; + allwinner,muxsel = <2>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi2_pins_b: twi2@1 { + allwinner,pins = "PE1", "PE2"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi3_pins_a: twi3@0 { + allwinner,pins = "PH12", "PH13"; + allwinner,pname = "twi3_scl", "twi3_sda"; + allwinner,function = "twi3"; + allwinner,muxsel = <3>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + twi3_pins_b: twi3@1 { + allwinner,pins = "PH12", "PH13"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; +/* + pwm0_pin_a: pwm0@0 { + //allwinner,pins = "PD23"; + allwinner,function = "pwm0"; + allwinner,muxsel = <0x02>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm0_pin_b: pwm0@1 { + //allwinner,pins = "PD23"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm1_pin_a: pwm1@0 { + //allwinner,pins = "PD22"; + allwinner,function = "pwm1"; + allwinner,muxsel = <0x02>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm1_pin_b: pwm1@1 { + //allwinner,pins = "PD22"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; +*/ + pwm2_pin_a: pwm2@0 { + allwinner,pins = "PD20"; + allwinner,function = "pwm2"; + allwinner,muxsel = <0x03>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm2_pin_b: pwm2@1 { + allwinner,pins = "PD20"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; +/* + pwm3_pin_a: pwm3@0 { + allwinner,pins = "PD21"; + allwinner,function = "pwm3"; + allwinner,muxsel = <0x03>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm3_pin_b: pwm3@1 { + allwinner,pins = "PD21"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; +*/ + spi0_pins_a: spi0@0 { + // allwinner,pins = "PC2", "PC4", "PC12", "PC15", "PC16"; + allwinner,pins = "PC2", "PC4", "PC12"; + // allwinner,pname = "spi0_mosi", "spi0_miso", + // "spi0_sclk", "spi0_wp", "spi0_hold"; + allwinner,pname = "spi0_mosi", "spi0_miso", "spi0_sclk"; + allwinner,function = "spi0"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + spi0_pins_b: spi0@1 { + allwinner,pins = "PC3", "PC7"; + allwinner,pname = "spi0_cs0", "spi0_cs1"; + allwinner,function = "spi0"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; /* only CS should be pulled up */ + }; + + spi0_pins_c: spi0@2 { + // allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12", "PC15", "PC16"; + allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; +/* + spi1_pins_a: spi1@0 { + allwinner,pins = "PD11", "PD12", "PD13"; + allwinner,pname = "spi1_sclk", "spi1_mosi", + "spi1_miso"; + allwinner,function = "spi1"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + spi1_pins_b: spi1@1 { + allwinner,pins = "PD10"; + allwinner,pname = "spi1_cs0"; + allwinner,function = "spi1"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; // only CS should be pulled up + }; + + spi1_pins_c: spi1@2 { + allwinner,pins = "PD10", "PD11", "PD12", "PD13"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + uart3_pins_a: uart3@0 { + allwinner,pins = "PD14", "PD15"; + allwinner,pname = "uart3_tx", "uart3_rx"; + allwinner,function = "uart3"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + uart3_pins_b: uart3@1 { + allwinner,pins = "PD14", "PD15"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + uart4_pins_a: uart4@0 { + allwinner,pins = "PD18", "PD19"; + allwinner,pname = "uart4_tx", "uart4_rx"; + allwinner,function = "uart4"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + uart4_pins_b: uart4@1 { + allwinner,pins = "PD18", "PD19"; + allwinner,pins = "PD18", "PD19"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; +*/ + }; + + twi0: twi@0x05002000{ + clock-frequency = <400000>; + pinctrl-0 = <&twi0_pins_a>; + pinctrl-1 = <&twi0_pins_b>; + status = "okay"; + ctp { + compatible = "gt9xx_ts"; + ctp_used = <1>; + device_type = "ctp"; + status = "okay"; + ctp_twi_id = <0x0>; + ctp_name = "gt9xx"; + reg = <0x5D>; + ctp_screen_max_x = <1024>; + ctp_screen_max_y = <600>; + ctp_revert_x_flag = <0x1>; + ctp_revert_y_flag = <0x1>; + ctp_exchange_x_y_flag = <0x0>; + ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>; + ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>; + ctp_power_ldo = <3300>; + ctp_power_ldo_vol = <3300>; + ctp_power = <3300>; + }; + }; + + spi0: spi@05010000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "allwinner,sun50i-spi"; + device_type = "spi0"; + reg = <0x0 0x05010000 0x0 0x1000>; + interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk_pll_periph0>, <&clk_spi0>; + clock-frequency = <100000000>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi0_pins_a &spi0_pins_b>; + pinctrl-1 = <&spi0_pins_c>; + spi0_cs_number = <1>; + spi0_cs_bitmap = <1>; + spi_slave_mode = <0>; + //status = "okay"; + status = "disabled"; + /* + spi_uart { + compatible = "wkmic,wk2124spi"; + reg = <0>; + spi-max-frequency = <10000000>; + //irq_gpio = <&pio PH 11 6 0xffffffff 0xffffffff 0>; + }; + */ + + dh2228@2 { + compatible = "rohm,dh2228fv"; + reg = <0>; + spi-max-frequency = <100000>; + }; + + }; +/* + pwm3: pwm3@0300a000 { + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&pwm3_pin_a>; + pinctrl-1 = <&pwm3_pin_b>; + status = "disabled"; + }; +*/ + pwm2: pwm2@0300a000 { + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&pwm2_pin_a>; + pinctrl-1 = <&pwm2_pin_b>; + status = "okay"; + }; + + twi1: twi@0x05002400{ + clock-frequency = <200000>; + pinctrl-0 = <&twi1_pins_a>; + pinctrl-1 = <&twi1_pins_b>; + status = "okay"; + // EXTEND GPIO + }; + + twi2: twi@0x05002800{ + clock-frequency = <200000>; + pinctrl-0 = <&twi2_pins_a>; + pinctrl-1 = <&twi2_pins_b>; + twi-supply = <®_dldo2>; + status = "okay"; + // CAMERA1 + + // CAMERA2 + }; + + twi3: twi@0x05002c00{ + clock-frequency = <200000>; + pinctrl-0 = <&twi3_pins_a>; + pinctrl-1 = <&twi3_pins_b>; + status = "okay"; + // RTC + pcf8563@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + interrupt-parent = <&pio>; + interrupts = <PB 8 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + wakeup-source; + }; + }; + + twi6: s_twi@0x07081400{ + clock-frequency = <200000>; + pinctrl-0 = <&s_twi0_pins_a>; + pinctrl-1 = <&s_twi0_pins_b>; + twi_drv_used = <1>; + status = "okay"; + no_suspend = <1>; + + pmu0: pmu@34 { + compatible = "x-powers,axp803"; + reg = <0x34>; + status = "okay"; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&nmi_intc>; + x-powers,drive-vbus-en; + pmu_reset = <0>; + pmu_irq_wakeup = <1>; + pmu_hot_shutdown = <1>; + + wakeup-source; + + ac_power_supply: ac-power-supply { + compatible = "x-powers,axp803-ac-power-supply"; + status = "okay"; + + pmu_ac_vol = <4600>; + pmu_ac_cur = <3000>; + + wakeup_ac_in; + wakeup_ac_out; + }; + + usb_power_supply: usb_power_supply { + compatible = "x-powers,axp803-usb-power-supply"; + status = "okay"; + + pmu_usbpc_vol = <4600>; + pmu_usbpc_cur = <3000>; + pmu_usbad_vol = <4600>; + pmu_usbad_cur = <2500>; + + wakeup_usb_in; + wakeup_usb_out; + }; + + battery_power_supply: battery-power-supply { + compatible = "x-powers,axp803-battery-power-supply"; + status = "disabled"; + + pmu_chg_ic_temp = <0>; + pmu_battery_rdc= <93>; + pmu_battery_cap = <5067>; + pmu_runtime_chgcur = <1000>; + pmu_suspend_chgcur = <2000>; + pmu_shutdown_chgcur = <2000>; + pmu_init_chgvol = <4200>; + pmu_battery_warning_level1 = <15>; + pmu_battery_warning_level2 = <0>; + pmu_chgled_func = <0>; + pmu_chgled_type = <0>; + ocv_coulumb_100 = <1>; + pmu_bat_para1 = <0>; + pmu_bat_para2 = <0>; + pmu_bat_para3 = <0>; + pmu_bat_para4 = <0>; + pmu_bat_para5 = <6>; + pmu_bat_para6 = <8>; + pmu_bat_para7 = <9>; + pmu_bat_para8 = <10>; + pmu_bat_para9 = <11>; + pmu_bat_para10 = <12>; + pmu_bat_para11 = <13>; + pmu_bat_para12 = <15>; + pmu_bat_para13 = <18>; + pmu_bat_para14 = <23>; + pmu_bat_para15 = <29>; + pmu_bat_para16 = <44>; + pmu_bat_para17 = <50>; + pmu_bat_para18 = <58>; + pmu_bat_para19 = <65>; + pmu_bat_para20 = <70>; + pmu_bat_para21 = <75>; + pmu_bat_para22 = <80>; + pmu_bat_para23 = <83>; + pmu_bat_para24 = <84>; + pmu_bat_para25 = <86>; + pmu_bat_para26 = <90>; + pmu_bat_para27 = <94>; + pmu_bat_para28 = <97>; + pmu_bat_para29 = <99>; + pmu_bat_para30 = <100>; + pmu_bat_para31 = <100>; + pmu_bat_para32 = <100>; + + pmu_bat_temp_enable = <0>; + pmu_bat_charge_ltf = <1105>; + pmu_bat_charge_htf = <121>; + pmu_bat_shutdown_ltf = <1381>; + pmu_bat_shutdown_htf = <89>; + pmu_bat_temp_para1 = <2814>; + pmu_bat_temp_para2 = <2202>; + pmu_bat_temp_para3 = <1737>; + pmu_bat_temp_para4 = <1381>; + pmu_bat_temp_para5 = <1105>; + pmu_bat_temp_para6 = <890>; + pmu_bat_temp_para7 = <722>; + pmu_bat_temp_para8 = <484>; + pmu_bat_temp_para9 = <332>; + pmu_bat_temp_para10 = <233>; + pmu_bat_temp_para11 = <196>; + pmu_bat_temp_para12 = <166>; + pmu_bat_temp_para13 = <141>; + pmu_bat_temp_para14 = <121>; + pmu_bat_temp_para15 = <89>; + pmu_bat_temp_para16 = <66>; + + wakeup_bat_out; + /* wakeup_bat_in; */ + /* wakeup_bat_charging; */ + /* wakeup_bat_charge_over; */ + /* wakeup_low_warning1; */ + /* wakeup_low_warning2; */ + /* wakeup_bat_untemp_work; */ + /* wakeup_bat_ovtemp_work; */ + /* wakeup_bat_untemp_chg; */ + /* wakeup_bat_ovtemp_chg; */ + }; + + powerkey0: powerkey@0 { + status = "okay"; + compatible = "x-powers,axp2101-pek"; + pmu_powkey_off_time = <6000>; + pmu_powkey_off_func = <0>; + pmu_powkey_off_en = <1>; + pmu_powkey_long_time = <1500>; + pmu_powkey_on_time = <512>; + wakeup_rising; + wakeup_falling; + }; + + regulator0: regulators@0 { + reg_dcdc1: dcdc1 { + regulator-name = "axp803-dcdc1"; + regulator-min-microvolt = <1600000>; + regulator-max-microvolt = <3400000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc2: dcdc2 { + regulator-name = "axp803-dcdc2"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc3: dcdc3 { + regulator-name = "axp803-dcdc3"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc4: dcdc4 { + regulator-name = "axp803-dcdc4"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc5: dcdc5 { + regulator-name = "axp803-dcdc5"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1840000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + }; + reg_dcdc6: dcdc6 { + regulator-name = "axp803-dcdc6"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1520000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + }; + reg_dcdc7: dcdc7 { + regulator-name = "axp803-dcdc7"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1520000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + }; + reg_rtcldo: rtcldo { + /* RTC_LDO is a fixed, always-on regulator */ + regulator-name = "axp803-rtcldo"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + reg_aldo1: aldo1 { + regulator-name = "axp803-aldo1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_aldo2: aldo2 { + regulator-name = "axp803-aldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + }; + reg_aldo3: aldo3 { + regulator-name = "axp803-aldo3"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + }; + reg_dldo1: dldo1 { + regulator-name = "axp803-dldo1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + }; + reg_dldo2: dldo2 { + regulator-name = "axp803-dldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <4200000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + // kickpi + }; + reg_dldo3: dldo3 { + regulator-name = "axp803-dldo3"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_dldo4: dldo4 { + regulator-name = "axp803-dldo4"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_eldo1: eldo1 { + regulator-name = "axp803-eldo1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_eldo2: eldo2 { + regulator-name = "axp803-eldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_eldo3: eldo3 { + regulator-name = "axp803-eldo3"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + // kickpi + }; + reg_fldo1: fldo1 { + regulator-name = "axp803-fldo1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1450000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + }; + reg_fldo2: fldo2 { + regulator-name = "axp803-fldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1450000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_ldoio0: ldoio0 { + regulator-name = "axp803-ldoio0"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_ldoio1: ldoio1 { + regulator-name = "axp803-ldoio1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_dc1sw: dc1sw { + regulator-name = "axp803-dc1sw"; + regulator-enable-ramp-delay = <1000>; + }; + reg_drivevbus: drivevbus { + regulator-name = "axp803-drivevbus"; + regulator-enable-ramp-delay = <1000>; + }; + }; + + virtual-dcdc1 { + compatible = "xpower-vregulator,dcdc1"; + dcdc1-supply = <®_dcdc1>; + }; + virtual-dcdc2 { + compatible = "xpower-vregulator,dcdc2"; + dcdc2-supply = <®_dcdc2>; + }; + virtual-dcdc3 { + compatible = "xpower-vregulator,dcdc3"; + dcdc3-supply = <®_dcdc3>; + }; + virtual-dcdc4 { + compatible = "xpower-vregulator,dcdc4"; + dcdc4-supply = <®_dcdc4>; + }; + virtual-dcdc5 { + compatible = "xpower-vregulator,dcdc5"; + dcdc5-supply = <®_dcdc5>; + }; + virtual-dcdc6 { + compatible = "xpower-vregulator,dcdc6"; + dcdc6-supply = <®_dcdc6>; + }; + virtual-dcdc7 { + compatible = "xpower-vregulator,dcdc7"; + dcdc7-supply = <®_dcdc7>; + }; + virtual-rtcldo { + compatible = "xpower-vregulator,rtcldo"; + rtcldo-supply = <®_rtcldo>; + }; + virtual-aldo1 { + compatible = "xpower-vregulator,aldo1"; + aldo1-supply = <®_aldo1>; + }; + virtual-aldo2 { + compatible = "xpower-vregulator,aldo2"; + aldo2-supply = <®_aldo2>; + }; + virtual-aldo3 { + compatible = "xpower-vregulator,aldo3"; + aldo3-supply = <®_aldo3>; + }; + virtual-dldo1 { + compatible = "xpower-vregulator,dldo1"; + dldo1-supply = <®_dldo1>; + }; + virtual-dldo2 { + compatible = "xpower-vregulator,dldo2"; + dldo2-supply = <®_dldo2>; + }; + virtual-dldo3 { + compatible = "xpower-vregulator,dldo3"; + dldo3-supply = <®_dldo3>; + }; + virtual-dldo4 { + compatible = "xpower-vregulator,dldo4"; + dldo4-supply = <®_dldo4>; + }; + virtual-eldo1 { + compatible = "xpower-vregulator,eldo1"; + eldo1-supply = <®_eldo1>; + }; + virtual-eldo2 { + compatible = "xpower-vregulator,eldo2"; + eldo2-supply = <®_eldo2>; + }; + virtual-eldo3 { + compatible = "xpower-vregulator,eldo3"; + eldo3-supply = <®_eldo3>; + }; + virtual-fldo1 { + compatible = "xpower-vregulator,fldo1"; + fldo1-supply = <®_fldo1>; + }; + virtual-fldo2 { + compatible = "xpower-vregulator,fldo2"; + fldo2-supply = <®_fldo2>; + }; + virtual-ldoio0 { + compatible = "xpower-vregulator,ldoio0"; + ldoio0-supply = <®_ldoio0>; + }; + virtual-ldoio1 { + compatible = "xpower-vregulator,ldoio1"; + ldoio1-supply = <®_ldoio1>; + }; + virtual-dc1sw { + compatible = "xpower-vregulator,dc1sw"; + dc1sw-supply = <®_dc1sw>; + }; + virtual-drivevbus { + compatible = "xpower-vregulator,drivevbus"; + drivevbus-supply = <®_drivevbus>; + }; + + axp_gpio0: axp_gpio@0 { + gpio-controller; + #size-cells = <0>; + #gpio-cells = <6>; + status = "disabled"; + }; + }; + }; + + standby_param: standby_param { + vdd-cpu = <0x00000006>; + vdd-sys = <0x00000008>; + vcc-pll = <0x00000100>; + + osc24m-on = <0x1>; + }; +/* + pwm0: pwm0@0300a000 { + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&pwm0_pin_a>; + pinctrl-1 = <&pwm0_pin_b>; + }; + + spi1: spi@05011000 { + pinctrl-0 = <&spi1_pins_a &spi1_pins_b>; + pinctrl-1 = <&spi1_pins_c>; + spi_slave_mode = <0>; + status = "disabled"; + }; + + spi2: spi@05012000 { + pinctrl-0 = <&spi2_pins_a &spi2_pins_b>; + pinctrl-1 = <&spi2_pins_c>; + spi_slave_mode = <0>; + status = "disabled"; + }; +*/ + gpadc:gpadc{ + channel_num = <1>; + channel_select = <0x01>; + channel_data_select = <0>; + channel_compare_select = <0x01>; + channel_cld_select = <0x01>; + channel_chd_select = <0>; + channel0_compare_lowdata = <1700000>; + channel0_compare_higdata = <1200000>; + status = "disabled"; + }; + + sdc2: sdmmc@04022000 { + non-removable; + bus-width = <8>; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sdio; + no-sd; + ctl-spec-caps = <0x308>; + cap-mmc-highspeed; + sunxi-power-save-mode; + sunxi-dis-signal-vol-sw; + max-frequency = <100000000>; + vmmc-supply = <®_dcdc1>; + /*emmc io vol 3.3v*/ + /*vqmmc-supply = <®_aldo1>;*/ + /*emmc io vol 1.8v*/ + vqmmc-supply = <®_eldo1>; + status = "disabled"; + }; + + sdc0: sdmmc@04020000 { + bus-width = <4>; + /*non-removable;*/ + /*broken-cd;*/ + /*cd-inverted*/ + /*data3-detect;*/ + cd-used-24M; + cd-gpios = <&pio PF 6 6 1 3 0xffffffff>; + cap-sd-highspeed; + sd-uhs-sdr50; + sd-uhs-ddr50; + sd-uhs-sdr104; + no-sdio; + no-mmc; + sunxi-power-save-mode; + /*sunxi-dis-signal-vol-sw;*/ + max-frequency = <150000000>; + ctl-spec-caps = <0x8>; + vmmc-supply = <®_dcdc1>; + vqmmc33sw-supply = <®_dcdc1>; + vdmmc33sw-supply = <®_dcdc1>; + vqmmc18sw-supply = <®_eldo1>; + vdmmc18sw-supply = <®_eldo1>; + status = "okay"; + }; + +/* + *usb_port_type: usb mode. 0-device, 1-host, 2-otg. + *usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect. + *usb_id_gpio: gpio for id detect. + *usb_det_vbus_gpio: gpio for id detect. gpio or "axp_ctrl"; + *usb_wakeup_suspend:0-SUPER_STANDBY, 1-USB_STANDBY. + */ + usbc0:usbc0@0 { + device_type = "usbc0"; + usb_port_type = <0x0>; + usb_detect_type = <0x1>; + usb_id_gpio = <&r_pio PL 9 0 0 0xffffffff 0xffffffff>; + usb_det_vbus_gpio = "axp_ctrl"; + usb_regulator_io = "nocare"; + det_vbus_supply = <&usb_power_supply>; + usb_wakeup_suspend = <1>; + usb_serial_unique = <0>; + usb_serial_number = "20080411"; + rndis_wceis = <1>; + status = "okay"; + }; + + udc:udc-controller@0x05100000 { + det_vbus_supply = <&usb_power_supply>; + }; + + ehci0:ehci0-controller@0x05101000 { + drvvbus-supply = <®_drivevbus>; + }; + + ohci0:ohci0-controller@0x05101400 { + drvvbus-supply = <®_drivevbus>; + }; + + usbc1:usbc1@0 { + device_type = "usbc1"; + usb_regulator_io = "nocare"; + usb_wakeup_suspend = <0>; + status = "okay"; + }; + + ehci1:ehci1-controller@0x05200000 { + drvvbus-supply = <®_usb1_vbus>; + }; + + ohci1:ohci1-controller@0x05200400 { + drvvbus-supply = <®_usb1_vbus>; + }; + + sdc1: sdmmc@04021000 { + bus-width = <4>; + no-mmc; + no-sd; + cap-sd-highspeed; + /*sd-uhs-sdr12*/ + /*sd-uhs-sdr25*/ + sd-uhs-sdr50; + sd-uhs-ddr50; + sd-uhs-sdr104; + // kickpi + //sunxi-power-save-mode; + /*sunxi-dis-signal-vol-sw;*/ + sdio-used-1v8; + cap-sdio-irq; + keep-power-in-suspend; + ignore-pm-notify; + max-frequency = <50000000>; + ctl-spec-caps = <0x8>; + status = "okay"; + + }; + + /* gpio-spk will output 0x00 when playing audio */ + /* Audio Driver Modules */ + codec:codec@0x05096000 { + /* MIC and headphone gain setting */ + mic1gain = <0x1F>; + mic2gain = <0x1F>; + /* ADC/DAC DRC/HPF func enabled */ + /* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */ + adcdrc_cfg = <0x2>; + adchpf_cfg = <0x1>; + dacdrc_cfg = <0x2>; + dachpf_cfg = <0x0>; + /* Volume about */ + digital_vol = <0x00>; + lineout_vol = <0x1a>; + headphonegain = <0x00>; + /* Pa enabled about */ + pa_level = <0x00>; + pa_msleep_time = <0x78>; + //gpio-spk = <&pio PB 7 1 1 1 1>; + /* regulator about */ + avcc-supply = <®_aldo1>; + cpvin-supply = <®_eldo1>; + status = "okay"; + }; + + sndcodec:sound@0 { + noheadphonemic = <1>; + status = "okay"; + }; + + spdif:spdif-controller@0x05094000{ + status = "okay"; + }; + + sndspdif:sound@1{ + status = "okay"; + }; + + dmic:dmic-controller@0x05095000{ + status = "disabled"; + }; + + snddmic:sound@2{ + status = "disabled"; + }; + + daudio0:daudio@0x05090000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "okay"; + }; + + snddaudio0:sound@3 { +/* sunxi,snddaudio-codec = "ac108.1-003b"; + sunxi,snddaudio-codec-dai = "ac108-pcm0";*/ + +/* sunxi,snddaudio-codec = "ac107.1-0036"; + sunxi,snddaudio-codec-dai = "ac107-pcm0"; */ + status = "okay"; + }; + + daudio1:daudio@0x05091000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "disabled"; + }; + + snddaudio1:sound@4 { + status = "disabled"; + }; + + daudio2:daudio@0x05092000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "disabled"; + }; + + snddaudio2:sound@5 { + status = "disabled"; + }; + + daudio3:daudio@0x05093000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "disabled"; + }; + + snddaudio3:sound@6 { + status = "disabled"; + }; + + vind0:vind@0 { + vind0_clk = <336000000>; + vind0_isp = <300000000>; + status = "disabled"; + + actuator0:actuator@0 { + device_type = "actuator0"; + actuator0_name = "ad5820_act"; + actuator0_slave = <0x18>; + actuator0_af_pwdn = <>; + actuator0_afvdd = "afvcc-csi"; + actuator0_afvdd_vol = <2800000>; + status = "disabled"; + }; + flash0:flash@0 { + device_type = "flash0"; + flash0_type = <2>; + flash0_en = <&r_pio PL 11 1 0 1 0>; + flash0_mode = <>; + flash0_flvdd = ""; + flash0_flvdd_vol = <>; + device_id = <0>; + status = "disabled"; + }; + sensor0:sensor@0 { + device_type = "sensor0"; + sensor1_mname = "ov8858_r2a_4lane"; + sensor0_twi_cci_id = <2>; + sensor0_twi_addr = <0x6c>; + //sensor0_twi_addr = <0x20>; + + sensor0_mclk_id = <0>; + sensor0_pos = "rear"; + sensor0_isp_used = <1>; + sensor0_fmt = <1>; + sensor0_stby_mode = <0>; + sensor0_vflip = <0>; + sensor0_hflip = <0>; + sensor0_iovdd-supply = <®_dldo2>; + sensor0_iovdd_vol = <1800000>; + sensor0_avdd-supply = <®_dldo3>; + sensor0_avdd_vol = <2800000>; + sensor0_dvdd-supply = <®_eldo2>; + sensor0_dvdd_vol = <1200000>; + sensor0_power_en = <>; + sensor0_reset = <&pio PE 6 1 0 1 0>; + sensor0_pwdn = <&pio PE 7 1 0 1 0>; + status = "okay"; + }; + sensor1:sensor@1 { + device_type = "sensor1"; + sensor1_mname = "ov5648_mipi"; + sensor1_twi_cci_id = <3>; + sensor1_twi_addr = <0x6c>; + sensor1_mclk_id = <1>; + sensor1_pos = "front"; + sensor1_isp_used = <1>; + sensor1_fmt = <1>; + sensor1_stby_mode = <0>; + sensor1_vflip = <0>; + sensor1_hflip = <0>; + sensor1_iovdd-supply = <®_dldo2>; + sensor1_iovdd_vol = <1800000>; + sensor1_avdd-supply = <®_dldo3>; + sensor1_avdd_vol = <2800000>; + sensor1_dvdd-supply = <®_eldo2>; + sensor1_dvdd_vol = <1500000>; + sensor1_power_en = <>; + sensor1_reset = <&pio PE 8 1 0 1 0>; + sensor1_pwdn = <&pio PE 9 1 0 1 0>; + status = "okay"; + }; + + vinc0:vinc@0 { + vinc0_csi_sel = <0>; + vinc0_mipi_sel = <0>; + vinc0_isp_sel = <0>; + vinc0_isp_tx_ch = <0>; + vinc0_tdm_rx_sel = <0xff>; + vinc0_rear_sensor_sel = <0>; + vinc0_front_sensor_sel = <1>; + vinc0_sensor_list = <0>; + status = "okay"; + }; + vinc1:vinc@1 { + vinc1_csi_sel = <0>; + vinc1_mipi_sel = <0>; + vinc1_isp_sel = <0>; + vinc1_isp_tx_ch = <0>; + vinc1_tdm_rx_sel = <0xff>; + vinc1_rear_sensor_sel = <0>; + vinc1_front_sensor_sel = <1>; + vinc1_sensor_list = <0>; + status = "okay"; + }; + vinc2:vinc@2 { + vinc2_csi_sel = <1>; + vinc2_mipi_sel = <1>; + vinc2_isp_sel = <0>; + vinc2_isp_tx_ch = <0>; + vinc2_tdm_rx_sel = <0xff>; + vinc2_rear_sensor_sel = <0>; + vinc2_front_sensor_sel = <1>; + vinc2_sensor_list = <0>; + status = "okay"; + }; + vinc3:vinc@3 { + vinc3_csi_sel = <1>; + vinc3_mipi_sel = <1>; + vinc3_isp_sel = <0>; + vinc3_isp_tx_ch = <0>; + vinc3_tdm_rx_sel = <0xff>; + vinc3_rear_sensor_sel = <0>; + vinc3_front_sensor_sel = <1>; + vinc3_sensor_list = <0>; + status = "okay"; + }; + }; + +/* + hall_para { + hall_name = "MH248"; + status = "disabled"; + hall_int_port = <&r_pio PL 9 6 1 0xffffffff 0xffffffff>; + }; +*/ + keyboard { + compatible = "allwinner,keyboard_1350mv"; + status = "okay"; + key_cnt = <1>; + key0 = <590 KEY_RESERVED>; + //key0 = <475 0x7372>; + //key1 = <646 0x73>; + //key2 = <897 0x72>; + }; + + wlan: wlan@0 { + compatible = "allwinner,sunxi-wlan"; + clocks; + pinctrl-0; + pinctrl-names; + wlan_busnum = <0x1>; + wlan_power = "axp803-dldo1"; + wlan_io_regulator; + wlan_regon = <&pio PG 10 1 0xffffffff 0xffffffff 1>; + wlan_hostwake = <&pio PG 13 6 0xffffffff 0xffffffff 0>; + //chip_en; + //power_en = <&pio PG 10 1 0xffffffff 0xffffffff 0>; + status = "okay"; + }; + + bt: bt@0 { + compatible = "allwinner,sunxi-bt"; + clocks = <&clk_losc_out>, <&clk_dcxo_out>; + bt_power = "axp803-dldo1"; + bt_io_regulator; + bt_rst_n = <&r_pio PH 11 1 0xffffffff 0xffffffff 0>; + status = "okay"; + }; + + btlpm: btlpm@0 { + compatible = "allwinner,sunxi-btlpm"; + uart_index = <0x1>; + bt_wake = <&pio PG 12 1 0xffffffff 0xffffffff 1>; + bt_hostwake = <&pio PG 11 6 0xffffffff 0xffffffff 1>; + status = "okay"; + }; + +/* + wlan: wlan@0 { + compatible = "allwinner,sunxi-wlan"; + clocks = <&clk_losc_out>, <&clk_dcxo_out>; + pinctrl-0; + pinctrl-names; + wlan_busnum = <0x1>; + wlan_power = "axp803-dldo1"; + wlan_io_regulator; + wlan_regon = <&pio PG 10 1 0xffffffff 0xffffffff 0>; + wlan_hostwake = <&pio PG 13 6 0xffffffff 0xffffffff 0>; + chip_en; + power_en; + status = "okay"; + }; + + bt: bt@0 { + compatible = "allwinner,sunxi-bt"; + clocks = <&clk_losc_out>, <&clk_dcxo_out>; + bt_power = "axp803-dldo1"; + //bt_power = "axp803-dldo1"; + bt_io_regulator; + //bt_rst_n = <&r_pio PL 2 1 0xffffffff 0xffffffff 0>; + status = "okay"; + }; + + btlpm: btlpm@0 { + compatible = "allwinner,sunxi-btlpm"; + uart_index = <0x1>; + bt_wake = <&pio PG 11 1 0xffffffff 0xffffffff 1>; + bt_hostwake = <&pio PG 12 6 0xffffffff 0xffffffff 1>; + status = "okay"; + }; +*/ + addr_mgt: addr_mgt@0 { + compatible = "allwinner,sunxi-addr_mgt"; + type_addr_wifi = <0x0>; + type_addr_bt = <0x0>; + type_addr_eth = <0x0>; + status = "okay"; + }; + uart0: uart@05000000 { + uart-supply = <®_dcdc1>; + }; + + uart1: uart@05000400 { + status = "okay"; + }; + + uart2: uart@05000800 { + status = "okay"; + }; + + uart3: uart@05000c00 { + status = "okay"; + }; + + uart4: uart@05001000 { + status = "okay"; + }; + }; + gpu: gpu@0x01800000 { + gpu_idle = <1>;/*ic version ctrl*/ + dvfs_status = <1>; + pll_rate = <504000>; + independent_power = <0>; + operating-points = < + /* KHz uV */ + 504000 950000 + 472500 950000 + 441000 950000 + 252000 950000 + >; + gpu-supply = <®_dcdc4>; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + status = "okay"; + + sysled { + label = "sysled"; + gpios = <&r_pio PL 10 1 0 1 1>; + linux,default_trigger = "heartbeat"; + }; + + spk_en { + label = "spk_en"; + gpios = <&pio PB 7 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + fan_en { + label = "fan_en"; + gpios = <&r_pio PL 7 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PH8 { + label = "PH8"; + gpios = <&pio PH 8 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC2 { + label = "PC2"; + gpios = <&pio PC 2 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC3 { + label = "PC3"; + gpios = <&pio PC 3 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC4 { + label = "PC4"; + gpios = <&pio PC 4 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC7 { + label = "PC7"; + gpios = <&pio PC 7 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC12 { + label = "PC12"; + gpios = <&pio PC 12 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + }; +}; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + +&s_cir0 { + status = "okay"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&s_cir0_pins_a>; + pinctrl-1 = <&s_cir0_pins_a>; + + s_cir0_used = <1>; + ir_power_key_code0 = <0x4d>; + ir_addr_code0 = <0x4040>; + ir_power_key_code1 = <0x51>; + ir_addr_code1 = <0x7f80>; + ir_power_key_code2 = <0x1c>; + ir_addr_code2 = <0xdf00>; + wakeup-source; +}; + + +&gmac0 { + /delete-property/ phy-rst; + rx-delay = <7>; +}; + + +//#include "lcd-lvds-21-1920-1080.dtsi" +#include "lcd-lvds-7-1024-600.dtsi" +//#include "lcd-mipi-10-800-1280.dtsi" diff --git a/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts b/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts new file mode 100755 index 0000000..7fae9eb --- /dev/null +++ b/longan/device/config/chips/a133/configs/c3/kickpi-k5c.dts @@ -0,0 +1,1469 @@ +/* + * Allwinner Technology CO., Ltd. sun50iw10p1 soc board. + * + * soc board support. + */ + +/dts-v1/; +#include "sun50iw10p1.dtsi" +#include "dt-bindings/input/linux-event-codes.h" + +/{ + model = "sun50iw10"; + compatible = "allwinner,a133", "arm,sun50iw10p1"; + + aliases { + pmu0 = &pmu0; + standby_param = &standby_param; + }; + + reg_usb1_vbus: usb1-vbus { + compatible = "regulator-fixed"; + gpio = <&r_pio PL 8 1 2 0 1>; + regulator-name = "usb1-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + regulator-enable-ramp-delay = <1000>; + enable-active-high; + }; + + soc: soc@03000000 { + + r_pio: pinctrl@07022000 { + + s_twi0_pins_a: s_twi0@0 { + allwinner,pins = "PL0", "PL1"; + allwinner,pname = "s_twi0_scl", "s_twi0_sda"; + allwinner,function = "s_twi0"; + allwinner,muxsel = <2>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + s_twi0_pins_b: s_twi0@1 { + allwinner,pins = "PL0", "PL1"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + }; + pio: pinctrl@0300b000 { + twi0_pins_a: twi0@0 { + allwinner,pins = "PD22", "PD23"; + allwinner,pname = "twi0_scl", "twi0_sda"; + allwinner,function = "twi0"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi0_pins_b: twi0@1 { + allwinner,pins = "PD22", "PD23"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi1_pins_a: twi1@0 { + allwinner,pins = "PB4", "PB5"; + allwinner,pname = "twi1_scl", "twi1_sda"; + allwinner,function = "twi1"; + allwinner,muxsel = <2>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi1_pins_b: twi1@1 { + allwinner,pins = "PB4", "PB5"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi2_pins_a: twi2@0 { + allwinner,pins = "PE1", "PE2"; + allwinner,pname = "twi2_scl", "twi2_sda"; + allwinner,function = "twi2"; + allwinner,muxsel = <2>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi2_pins_b: twi2@1 { + allwinner,pins = "PE1", "PE2"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + twi3_pins_a: twi3@0 { + allwinner,pins = "PH12", "PH13"; + allwinner,pname = "twi3_scl", "twi3_sda"; + allwinner,function = "twi3"; + allwinner,muxsel = <3>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + twi3_pins_b: twi3@1 { + allwinner,pins = "PH12", "PH13"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; +/* + pwm0_pin_a: pwm0@0 { + //allwinner,pins = "PD23"; + allwinner,function = "pwm0"; + allwinner,muxsel = <0x02>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm0_pin_b: pwm0@1 { + //allwinner,pins = "PD23"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm1_pin_a: pwm1@0 { + //allwinner,pins = "PD22"; + allwinner,function = "pwm1"; + allwinner,muxsel = <0x02>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm1_pin_b: pwm1@1 { + //allwinner,pins = "PD22"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; +*/ + pwm2_pin_a: pwm2@0 { + allwinner,pins = "PD20"; + allwinner,function = "pwm2"; + allwinner,muxsel = <0x03>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm2_pin_b: pwm2@1 { + allwinner,pins = "PD20"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; +/* + pwm3_pin_a: pwm3@0 { + allwinner,pins = "PD21"; + allwinner,function = "pwm3"; + allwinner,muxsel = <0x03>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; + + pwm3_pin_b: pwm3@1 { + allwinner,pins = "PD21"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <0x07>; + allwinner,drive = <0x2>; + allwinner,pull = <0>; + allwinner,data = <0xffffffff>; + }; +*/ + spi0_pins_a: spi0@0 { + // allwinner,pins = "PC2", "PC4", "PC12", "PC15", "PC16"; + allwinner,pins = "PC2", "PC4", "PC12"; + // allwinner,pname = "spi0_mosi", "spi0_miso", + // "spi0_sclk", "spi0_wp", "spi0_hold"; + allwinner,pname = "spi0_mosi", "spi0_miso", "spi0_sclk"; + allwinner,function = "spi0"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + spi0_pins_b: spi0@1 { + allwinner,pins = "PC3", "PC7"; + allwinner,pname = "spi0_cs0", "spi0_cs1"; + allwinner,function = "spi0"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; /* only CS should be pulled up */ + }; + + spi0_pins_c: spi0@2 { + // allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12", "PC15", "PC16"; + allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; +/* + spi1_pins_a: spi1@0 { + allwinner,pins = "PD11", "PD12", "PD13"; + allwinner,pname = "spi1_sclk", "spi1_mosi", + "spi1_miso"; + allwinner,function = "spi1"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + spi1_pins_b: spi1@1 { + allwinner,pins = "PD10"; + allwinner,pname = "spi1_cs0"; + allwinner,function = "spi1"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; // only CS should be pulled up + }; + + spi1_pins_c: spi1@2 { + allwinner,pins = "PD10", "PD11", "PD12", "PD13"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + uart3_pins_a: uart3@0 { + allwinner,pins = "PD14", "PD15"; + allwinner,pname = "uart3_tx", "uart3_rx"; + allwinner,function = "uart3"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + uart3_pins_b: uart3@1 { + allwinner,pins = "PD14", "PD15"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; + + uart4_pins_a: uart4@0 { + allwinner,pins = "PD18", "PD19"; + allwinner,pname = "uart4_tx", "uart4_rx"; + allwinner,function = "uart4"; + allwinner,muxsel = <4>; + allwinner,drive = <1>; + allwinner,pull = <1>; + }; + + uart4_pins_b: uart4@1 { + allwinner,pins = "PD18", "PD19"; + allwinner,pins = "PD18", "PD19"; + allwinner,function = "io_disabled"; + allwinner,muxsel = <7>; + allwinner,drive = <1>; + allwinner,pull = <0>; + }; +*/ + }; + + twi0: twi@0x05002000{ + clock-frequency = <400000>; + pinctrl-0 = <&twi0_pins_a>; + pinctrl-1 = <&twi0_pins_b>; + status = "okay"; + ctp { + compatible = "gt9xx_ts"; + ctp_used = <1>; + device_type = "ctp"; + status = "okay"; + ctp_twi_id = <0x0>; + ctp_name = "gt9xx"; + reg = <0x5D>; + ctp_screen_max_x = <1024>; + ctp_screen_max_y = <600>; + ctp_revert_x_flag = <0x1>; + ctp_revert_y_flag = <0x1>; + ctp_exchange_x_y_flag = <0x0>; + ctp_int_port = <&pio PE 3 6 0xffffffff 0xffffffff 0>; + ctp_wakeup = <&pio PE 4 1 0xffffffff 0xffffffff 1>; + ctp_power_ldo = <3300>; + ctp_power_ldo_vol = <3300>; + ctp_power = <3300>; + }; + }; + + spi0: spi@05010000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "allwinner,sun50i-spi"; + device_type = "spi0"; + reg = <0x0 0x05010000 0x0 0x1000>; + interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clk_pll_periph0>, <&clk_spi0>; + clock-frequency = <100000000>; + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&spi0_pins_a &spi0_pins_b>; + pinctrl-1 = <&spi0_pins_c>; + spi0_cs_number = <1>; + spi0_cs_bitmap = <1>; + spi_slave_mode = <0>; + //status = "okay"; + status = "disabled"; + /* + spi_uart { + compatible = "wkmic,wk2124spi"; + reg = <0>; + spi-max-frequency = <10000000>; + //irq_gpio = <&pio PH 11 6 0xffffffff 0xffffffff 0>; + }; + */ + + dh2228@2 { + compatible = "rohm,dh2228fv"; + reg = <0>; + spi-max-frequency = <100000>; + }; + + }; +/* + pwm3: pwm3@0300a000 { + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&pwm3_pin_a>; + pinctrl-1 = <&pwm3_pin_b>; + status = "disabled"; + }; +*/ + pwm2: pwm2@0300a000 { + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&pwm2_pin_a>; + pinctrl-1 = <&pwm2_pin_b>; + status = "okay"; + }; + + twi1: twi@0x05002400{ + clock-frequency = <200000>; + pinctrl-0 = <&twi1_pins_a>; + pinctrl-1 = <&twi1_pins_b>; + status = "okay"; + // EXTEND GPIO + }; + + twi2: twi@0x05002800{ + clock-frequency = <200000>; + pinctrl-0 = <&twi2_pins_a>; + pinctrl-1 = <&twi2_pins_b>; + twi-supply = <®_dldo2>; + status = "okay"; + // CAMERA1 + + // CAMERA2 + }; + + twi3: twi@0x05002c00{ + clock-frequency = <200000>; + pinctrl-0 = <&twi3_pins_a>; + pinctrl-1 = <&twi3_pins_b>; + status = "okay"; + // RTC + pcf8563@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + interrupt-parent = <&pio>; + interrupts = <PB 8 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + wakeup-source; + }; + }; + + twi6: s_twi@0x07081400{ + clock-frequency = <200000>; + pinctrl-0 = <&s_twi0_pins_a>; + pinctrl-1 = <&s_twi0_pins_b>; + twi_drv_used = <1>; + status = "okay"; + no_suspend = <1>; + + pmu0: pmu@34 { + compatible = "x-powers,axp803"; + reg = <0x34>; + status = "okay"; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-parent = <&nmi_intc>; + x-powers,drive-vbus-en; + pmu_reset = <0>; + pmu_irq_wakeup = <1>; + pmu_hot_shutdown = <1>; + + wakeup-source; + + ac_power_supply: ac-power-supply { + compatible = "x-powers,axp803-ac-power-supply"; + status = "okay"; + + pmu_ac_vol = <4600>; + pmu_ac_cur = <3000>; + + wakeup_ac_in; + wakeup_ac_out; + }; + + usb_power_supply: usb_power_supply { + compatible = "x-powers,axp803-usb-power-supply"; + status = "disabled"; + + pmu_usbpc_vol = <4600>; + pmu_usbpc_cur = <3000>; + pmu_usbad_vol = <4600>; + pmu_usbad_cur = <2500>; + + wakeup_usb_in; + wakeup_usb_out; + }; + + battery_power_supply: battery-power-supply { + compatible = "x-powers,axp803-battery-power-supply"; + status = "okay"; + + pmu_chg_ic_temp = <0>; + pmu_battery_rdc= <93>; + pmu_battery_cap = <5067>; + pmu_runtime_chgcur = <1000>; + pmu_suspend_chgcur = <2000>; + pmu_shutdown_chgcur = <2000>; + pmu_init_chgvol = <4200>; + pmu_battery_warning_level1 = <15>; + pmu_battery_warning_level2 = <0>; + pmu_chgled_func = <0>; + pmu_chgled_type = <0>; + ocv_coulumb_100 = <1>; + pmu_bat_para1 = <0>; + pmu_bat_para2 = <0>; + pmu_bat_para3 = <0>; + pmu_bat_para4 = <0>; + pmu_bat_para5 = <6>; + pmu_bat_para6 = <8>; + pmu_bat_para7 = <9>; + pmu_bat_para8 = <10>; + pmu_bat_para9 = <11>; + pmu_bat_para10 = <12>; + pmu_bat_para11 = <13>; + pmu_bat_para12 = <15>; + pmu_bat_para13 = <18>; + pmu_bat_para14 = <23>; + pmu_bat_para15 = <29>; + pmu_bat_para16 = <44>; + pmu_bat_para17 = <50>; + pmu_bat_para18 = <58>; + pmu_bat_para19 = <65>; + pmu_bat_para20 = <70>; + pmu_bat_para21 = <75>; + pmu_bat_para22 = <80>; + pmu_bat_para23 = <83>; + pmu_bat_para24 = <84>; + pmu_bat_para25 = <86>; + pmu_bat_para26 = <90>; + pmu_bat_para27 = <94>; + pmu_bat_para28 = <97>; + pmu_bat_para29 = <99>; + pmu_bat_para30 = <100>; + pmu_bat_para31 = <100>; + pmu_bat_para32 = <100>; + + pmu_bat_temp_enable = <0>; + pmu_bat_charge_ltf = <1105>; + pmu_bat_charge_htf = <121>; + pmu_bat_shutdown_ltf = <1381>; + pmu_bat_shutdown_htf = <89>; + pmu_bat_temp_para1 = <2814>; + pmu_bat_temp_para2 = <2202>; + pmu_bat_temp_para3 = <1737>; + pmu_bat_temp_para4 = <1381>; + pmu_bat_temp_para5 = <1105>; + pmu_bat_temp_para6 = <890>; + pmu_bat_temp_para7 = <722>; + pmu_bat_temp_para8 = <484>; + pmu_bat_temp_para9 = <332>; + pmu_bat_temp_para10 = <233>; + pmu_bat_temp_para11 = <196>; + pmu_bat_temp_para12 = <166>; + pmu_bat_temp_para13 = <141>; + pmu_bat_temp_para14 = <121>; + pmu_bat_temp_para15 = <89>; + pmu_bat_temp_para16 = <66>; + + wakeup_bat_out; + /* wakeup_bat_in; */ + /* wakeup_bat_charging; */ + /* wakeup_bat_charge_over; */ + /* wakeup_low_warning1; */ + /* wakeup_low_warning2; */ + /* wakeup_bat_untemp_work; */ + /* wakeup_bat_ovtemp_work; */ + /* wakeup_bat_untemp_chg; */ + /* wakeup_bat_ovtemp_chg; */ + }; + + powerkey0: powerkey@0 { + status = "okay"; + compatible = "x-powers,axp2101-pek"; + pmu_powkey_off_time = <6000>; + pmu_powkey_off_func = <0>; + pmu_powkey_off_en = <1>; + pmu_powkey_long_time = <1500>; + pmu_powkey_on_time = <512>; + wakeup_rising; + wakeup_falling; + }; + + regulator0: regulators@0 { + reg_dcdc1: dcdc1 { + regulator-name = "axp803-dcdc1"; + regulator-min-microvolt = <1600000>; + regulator-max-microvolt = <3400000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc2: dcdc2 { + regulator-name = "axp803-dcdc2"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc3: dcdc3 { + regulator-name = "axp803-dcdc3"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc4: dcdc4 { + regulator-name = "axp803-dcdc4"; + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1300000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_dcdc5: dcdc5 { + regulator-name = "axp803-dcdc5"; + regulator-min-microvolt = <800000>; + regulator-max-microvolt = <1840000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + }; + reg_dcdc6: dcdc6 { + regulator-name = "axp803-dcdc6"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1520000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + }; + reg_dcdc7: dcdc7 { + regulator-name = "axp803-dcdc7"; + regulator-min-microvolt = <600000>; + regulator-max-microvolt = <1520000>; + regulator-ramp-delay = <250>; + regulator-enable-ramp-delay = <1000>; + }; + reg_rtcldo: rtcldo { + /* RTC_LDO is a fixed, always-on regulator */ + regulator-name = "axp803-rtcldo"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + regulator-always-on; + }; + reg_aldo1: aldo1 { + regulator-name = "axp803-aldo1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_aldo2: aldo2 { + regulator-name = "axp803-aldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + }; + reg_aldo3: aldo3 { + regulator-name = "axp803-aldo3"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + }; + reg_dldo1: dldo1 { + regulator-name = "axp803-dldo1"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + }; + reg_dldo2: dldo2 { + regulator-name = "axp803-dldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <4200000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + // kickpi + }; + reg_dldo3: dldo3 { + regulator-name = "axp803-dldo3"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_dldo4: dldo4 { + regulator-name = "axp803-dldo4"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_eldo1: eldo1 { + regulator-name = "axp803-eldo1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_eldo2: eldo2 { + regulator-name = "axp803-eldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_eldo3: eldo3 { + regulator-name = "axp803-eldo3"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1900000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; + // kickpi + }; + reg_fldo1: fldo1 { + regulator-name = "axp803-fldo1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1450000>; + regulator-enable-ramp-delay = <1000>; + regulator-always-on; + }; + reg_fldo2: fldo2 { + regulator-name = "axp803-fldo2"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <1450000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_ldoio0: ldoio0 { + regulator-name = "axp803-ldoio0"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + regulator-boot-on; + regulator-always-on; + }; + reg_ldoio1: ldoio1 { + regulator-name = "axp803-ldoio1"; + regulator-min-microvolt = <700000>; + regulator-max-microvolt = <3300000>; + regulator-enable-ramp-delay = <1000>; + }; + reg_dc1sw: dc1sw { + regulator-name = "axp803-dc1sw"; + regulator-enable-ramp-delay = <1000>; + }; + reg_drivevbus: drivevbus { + regulator-name = "axp803-drivevbus"; + regulator-enable-ramp-delay = <1000>; + }; + }; + + virtual-dcdc1 { + compatible = "xpower-vregulator,dcdc1"; + dcdc1-supply = <®_dcdc1>; + }; + virtual-dcdc2 { + compatible = "xpower-vregulator,dcdc2"; + dcdc2-supply = <®_dcdc2>; + }; + virtual-dcdc3 { + compatible = "xpower-vregulator,dcdc3"; + dcdc3-supply = <®_dcdc3>; + }; + virtual-dcdc4 { + compatible = "xpower-vregulator,dcdc4"; + dcdc4-supply = <®_dcdc4>; + }; + virtual-dcdc5 { + compatible = "xpower-vregulator,dcdc5"; + dcdc5-supply = <®_dcdc5>; + }; + virtual-dcdc6 { + compatible = "xpower-vregulator,dcdc6"; + dcdc6-supply = <®_dcdc6>; + }; + virtual-dcdc7 { + compatible = "xpower-vregulator,dcdc7"; + dcdc7-supply = <®_dcdc7>; + }; + virtual-rtcldo { + compatible = "xpower-vregulator,rtcldo"; + rtcldo-supply = <®_rtcldo>; + }; + virtual-aldo1 { + compatible = "xpower-vregulator,aldo1"; + aldo1-supply = <®_aldo1>; + }; + virtual-aldo2 { + compatible = "xpower-vregulator,aldo2"; + aldo2-supply = <®_aldo2>; + }; + virtual-aldo3 { + compatible = "xpower-vregulator,aldo3"; + aldo3-supply = <®_aldo3>; + }; + virtual-dldo1 { + compatible = "xpower-vregulator,dldo1"; + dldo1-supply = <®_dldo1>; + }; + virtual-dldo2 { + compatible = "xpower-vregulator,dldo2"; + dldo2-supply = <®_dldo2>; + }; + virtual-dldo3 { + compatible = "xpower-vregulator,dldo3"; + dldo3-supply = <®_dldo3>; + }; + virtual-dldo4 { + compatible = "xpower-vregulator,dldo4"; + dldo4-supply = <®_dldo4>; + }; + virtual-eldo1 { + compatible = "xpower-vregulator,eldo1"; + eldo1-supply = <®_eldo1>; + }; + virtual-eldo2 { + compatible = "xpower-vregulator,eldo2"; + eldo2-supply = <®_eldo2>; + }; + virtual-eldo3 { + compatible = "xpower-vregulator,eldo3"; + eldo3-supply = <®_eldo3>; + }; + virtual-fldo1 { + compatible = "xpower-vregulator,fldo1"; + fldo1-supply = <®_fldo1>; + }; + virtual-fldo2 { + compatible = "xpower-vregulator,fldo2"; + fldo2-supply = <®_fldo2>; + }; + virtual-ldoio0 { + compatible = "xpower-vregulator,ldoio0"; + ldoio0-supply = <®_ldoio0>; + }; + virtual-ldoio1 { + compatible = "xpower-vregulator,ldoio1"; + ldoio1-supply = <®_ldoio1>; + }; + virtual-dc1sw { + compatible = "xpower-vregulator,dc1sw"; + dc1sw-supply = <®_dc1sw>; + }; + virtual-drivevbus { + compatible = "xpower-vregulator,drivevbus"; + drivevbus-supply = <®_drivevbus>; + }; + + axp_gpio0: axp_gpio@0 { + gpio-controller; + #size-cells = <0>; + #gpio-cells = <6>; + status = "disabled"; + }; + }; + }; + + standby_param: standby_param { + vdd-cpu = <0x00000006>; + vdd-sys = <0x00000008>; + vcc-pll = <0x00000100>; + + osc24m-on = <0x1>; + }; +/* + pwm0: pwm0@0300a000 { + pinctrl-names = "active", "sleep"; + pinctrl-0 = <&pwm0_pin_a>; + pinctrl-1 = <&pwm0_pin_b>; + }; + + spi1: spi@05011000 { + pinctrl-0 = <&spi1_pins_a &spi1_pins_b>; + pinctrl-1 = <&spi1_pins_c>; + spi_slave_mode = <0>; + status = "disabled"; + }; + + spi2: spi@05012000 { + pinctrl-0 = <&spi2_pins_a &spi2_pins_b>; + pinctrl-1 = <&spi2_pins_c>; + spi_slave_mode = <0>; + status = "disabled"; + }; +*/ + gpadc:gpadc{ + channel_num = <1>; + channel_select = <0x01>; + channel_data_select = <0>; + channel_compare_select = <0x01>; + channel_cld_select = <0x01>; + channel_chd_select = <0>; + channel0_compare_lowdata = <1700000>; + channel0_compare_higdata = <1200000>; + status = "disabled"; + }; + + sdc2: sdmmc@04022000 { + non-removable; + bus-width = <8>; + mmc-ddr-1_8v; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + no-sdio; + no-sd; + ctl-spec-caps = <0x308>; + cap-mmc-highspeed; + sunxi-power-save-mode; + sunxi-dis-signal-vol-sw; + max-frequency = <100000000>; + vmmc-supply = <®_dcdc1>; + /*emmc io vol 3.3v*/ + /*vqmmc-supply = <®_aldo1>;*/ + /*emmc io vol 1.8v*/ + vqmmc-supply = <®_eldo1>; + status = "disabled"; + }; + + sdc0: sdmmc@04020000 { + bus-width = <4>; + /*non-removable;*/ + /*broken-cd;*/ + /*cd-inverted*/ + /*data3-detect;*/ + cd-used-24M; + cd-gpios = <&pio PF 6 6 1 3 0xffffffff>; + cap-sd-highspeed; + sd-uhs-sdr50; + sd-uhs-ddr50; + sd-uhs-sdr104; + no-sdio; + no-mmc; + sunxi-power-save-mode; + /*sunxi-dis-signal-vol-sw;*/ + max-frequency = <150000000>; + ctl-spec-caps = <0x8>; + vmmc-supply = <®_dcdc1>; + vqmmc33sw-supply = <®_dcdc1>; + vdmmc33sw-supply = <®_dcdc1>; + vqmmc18sw-supply = <®_eldo1>; + vdmmc18sw-supply = <®_eldo1>; + status = "okay"; + }; + +/* + *usb_port_type: usb mode. 0-device, 1-host, 2-otg. + *usb_detect_type: usb hotplug detect mode. 0-none, 1-vbus/id detect, 2-id/dpdm detect. + *usb_id_gpio: gpio for id detect. + *usb_det_vbus_gpio: gpio for id detect. gpio or "axp_ctrl"; + *usb_wakeup_suspend:0-SUPER_STANDBY, 1-USB_STANDBY. + */ + usbc0:usbc0@0 { + device_type = "usbc0"; + usb_port_type = <0x0>; + usb_detect_type = <0x1>; + usb_id_gpio = <&r_pio PL 9 0 0 0xffffffff 0xffffffff>; + usb_det_vbus_gpio = "axp_ctrl"; + usb_regulator_io = "nocare"; + det_vbus_supply = <&usb_power_supply>; + usb_wakeup_suspend = <1>; + usb_serial_unique = <0>; + usb_serial_number = "20080411"; + rndis_wceis = <1>; + status = "okay"; + }; + + udc:udc-controller@0x05100000 { + det_vbus_supply = <&usb_power_supply>; + }; + + ehci0:ehci0-controller@0x05101000 { + drvvbus-supply = <®_drivevbus>; + }; + + ohci0:ohci0-controller@0x05101400 { + drvvbus-supply = <®_drivevbus>; + }; + + usbc1:usbc1@0 { + device_type = "usbc1"; + usb_regulator_io = "nocare"; + usb_wakeup_suspend = <0>; + status = "okay"; + }; + + ehci1:ehci1-controller@0x05200000 { + drvvbus-supply = <®_usb1_vbus>; + }; + + ohci1:ohci1-controller@0x05200400 { + drvvbus-supply = <®_usb1_vbus>; + }; + + sdc1: sdmmc@04021000 { + bus-width = <4>; + no-mmc; + no-sd; + cap-sd-highspeed; + /*sd-uhs-sdr12*/ + /*sd-uhs-sdr25*/ + sd-uhs-sdr50; + sd-uhs-ddr50; + sd-uhs-sdr104; + // kickpi + //sunxi-power-save-mode; + /*sunxi-dis-signal-vol-sw;*/ + sdio-used-1v8; + cap-sdio-irq; + keep-power-in-suspend; + ignore-pm-notify; + max-frequency = <50000000>; + ctl-spec-caps = <0x8>; + status = "okay"; + + }; + + /* gpio-spk will output 0x00 when playing audio */ + /* Audio Driver Modules */ + codec:codec@0x05096000 { + /* MIC and headphone gain setting */ + mic1gain = <0x1F>; + mic2gain = <0x1F>; + /* ADC/DAC DRC/HPF func enabled */ + /* 0x1:DAP_HP_EN; 0x2:DAP_SPK_EN; 0x3:DAP_HPSPK_EN */ + adcdrc_cfg = <0x2>; + adchpf_cfg = <0x1>; + dacdrc_cfg = <0x2>; + dachpf_cfg = <0x0>; + /* Volume about */ + digital_vol = <0x00>; + lineout_vol = <0x1a>; + headphonegain = <0x00>; + /* Pa enabled about */ + pa_level = <0x00>; + pa_msleep_time = <0x78>; + //gpio-spk = <&pio PB 7 1 1 1 1>; + /* regulator about */ + avcc-supply = <®_aldo1>; + cpvin-supply = <®_eldo1>; + status = "okay"; + }; + + sndcodec:sound@0 { + noheadphonemic = <1>; + status = "okay"; + }; + + spdif:spdif-controller@0x05094000{ + status = "okay"; + }; + + sndspdif:sound@1{ + status = "okay"; + }; + + dmic:dmic-controller@0x05095000{ + status = "disabled"; + }; + + snddmic:sound@2{ + status = "disabled"; + }; + + daudio0:daudio@0x05090000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "okay"; + }; + + snddaudio0:sound@3 { +/* sunxi,snddaudio-codec = "ac108.1-003b"; + sunxi,snddaudio-codec-dai = "ac108-pcm0";*/ + +/* sunxi,snddaudio-codec = "ac107.1-0036"; + sunxi,snddaudio-codec-dai = "ac107-pcm0"; */ + status = "okay"; + }; + + daudio1:daudio@0x05091000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "disabled"; + }; + + snddaudio1:sound@4 { + status = "disabled"; + }; + + daudio2:daudio@0x05092000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "disabled"; + }; + + snddaudio2:sound@5 { + status = "disabled"; + }; + + daudio3:daudio@0x05093000 { + mclk_div = <0x01>; + frametype = <0x00>; + tdm_config = <0x01>; + sign_extend = <0x00>; + tx_data_mode = <0x00>; + rx_data_mode = <0x00>; + msb_lsb_first = <0x00>; + pcm_lrck_period = <0x80>; + audio_format = <0x01>; + daudio_master = <0x04>; + signal_inversion = <0x01>; + slot_width_select = <0x20>; + status = "disabled"; + }; + + snddaudio3:sound@6 { + status = "disabled"; + }; + + vind0:vind@0 { + vind0_clk = <336000000>; + vind0_isp = <300000000>; + status = "disabled"; + + actuator0:actuator@0 { + device_type = "actuator0"; + actuator0_name = "ad5820_act"; + actuator0_slave = <0x18>; + actuator0_af_pwdn = <>; + actuator0_afvdd = "afvcc-csi"; + actuator0_afvdd_vol = <2800000>; + status = "disabled"; + }; + flash0:flash@0 { + device_type = "flash0"; + flash0_type = <2>; + flash0_en = <&r_pio PL 11 1 0 1 0>; + flash0_mode = <>; + flash0_flvdd = ""; + flash0_flvdd_vol = <>; + device_id = <0>; + status = "disabled"; + }; + sensor0:sensor@0 { + device_type = "sensor0"; + sensor1_mname = "ov8858_r2a_4lane"; + sensor0_twi_cci_id = <2>; + sensor0_twi_addr = <0x6c>; + //sensor0_twi_addr = <0x20>; + + sensor0_mclk_id = <0>; + sensor0_pos = "rear"; + sensor0_isp_used = <1>; + sensor0_fmt = <1>; + sensor0_stby_mode = <0>; + sensor0_vflip = <0>; + sensor0_hflip = <0>; + sensor0_iovdd-supply = <®_dldo2>; + sensor0_iovdd_vol = <1800000>; + sensor0_avdd-supply = <®_dldo3>; + sensor0_avdd_vol = <2800000>; + sensor0_dvdd-supply = <®_eldo2>; + sensor0_dvdd_vol = <1200000>; + sensor0_power_en = <>; + sensor0_reset = <&pio PE 6 1 0 1 0>; + sensor0_pwdn = <&pio PE 7 1 0 1 0>; + status = "okay"; + }; + sensor1:sensor@1 { + device_type = "sensor1"; + sensor1_mname = "ov5648_mipi"; + sensor1_twi_cci_id = <3>; + sensor1_twi_addr = <0x6c>; + sensor1_mclk_id = <1>; + sensor1_pos = "front"; + sensor1_isp_used = <1>; + sensor1_fmt = <1>; + sensor1_stby_mode = <0>; + sensor1_vflip = <0>; + sensor1_hflip = <0>; + sensor1_iovdd-supply = <®_dldo2>; + sensor1_iovdd_vol = <1800000>; + sensor1_avdd-supply = <®_dldo3>; + sensor1_avdd_vol = <2800000>; + sensor1_dvdd-supply = <®_eldo2>; + sensor1_dvdd_vol = <1500000>; + sensor1_power_en = <>; + sensor1_reset = <&pio PE 8 1 0 1 0>; + sensor1_pwdn = <&pio PE 9 1 0 1 0>; + status = "okay"; + }; + + vinc0:vinc@0 { + vinc0_csi_sel = <0>; + vinc0_mipi_sel = <0>; + vinc0_isp_sel = <0>; + vinc0_isp_tx_ch = <0>; + vinc0_tdm_rx_sel = <0xff>; + vinc0_rear_sensor_sel = <0>; + vinc0_front_sensor_sel = <1>; + vinc0_sensor_list = <0>; + status = "okay"; + }; + vinc1:vinc@1 { + vinc1_csi_sel = <0>; + vinc1_mipi_sel = <0>; + vinc1_isp_sel = <0>; + vinc1_isp_tx_ch = <0>; + vinc1_tdm_rx_sel = <0xff>; + vinc1_rear_sensor_sel = <0>; + vinc1_front_sensor_sel = <1>; + vinc1_sensor_list = <0>; + status = "okay"; + }; + vinc2:vinc@2 { + vinc2_csi_sel = <1>; + vinc2_mipi_sel = <1>; + vinc2_isp_sel = <0>; + vinc2_isp_tx_ch = <0>; + vinc2_tdm_rx_sel = <0xff>; + vinc2_rear_sensor_sel = <0>; + vinc2_front_sensor_sel = <1>; + vinc2_sensor_list = <0>; + status = "okay"; + }; + vinc3:vinc@3 { + vinc3_csi_sel = <1>; + vinc3_mipi_sel = <1>; + vinc3_isp_sel = <0>; + vinc3_isp_tx_ch = <0>; + vinc3_tdm_rx_sel = <0xff>; + vinc3_rear_sensor_sel = <0>; + vinc3_front_sensor_sel = <1>; + vinc3_sensor_list = <0>; + status = "okay"; + }; + }; + +/* + hall_para { + hall_name = "MH248"; + status = "disabled"; + hall_int_port = <&r_pio PL 9 6 1 0xffffffff 0xffffffff>; + }; +*/ + keyboard { + compatible = "allwinner,keyboard_1350mv"; + status = "okay"; + key_cnt = <1>; + key0 = <590 KEY_RESERVED>; + //key0 = <475 0x7372>; + //key1 = <646 0x73>; + //key2 = <897 0x72>; + }; + + wlan: wlan@0 { + compatible = "allwinner,sunxi-wlan"; + clocks; + pinctrl-0; + pinctrl-names; + wlan_busnum = <0x1>; + wlan_power = "axp803-dldo1"; + wlan_io_regulator; + wlan_regon = <&pio PG 10 1 0xffffffff 0xffffffff 1>; + wlan_hostwake = <&pio PG 13 6 0xffffffff 0xffffffff 0>; + //chip_en; + //power_en = <&pio PG 10 1 0xffffffff 0xffffffff 0>; + status = "okay"; + }; + + bt: bt@0 { + compatible = "allwinner,sunxi-bt"; + clocks = <&clk_losc_out>, <&clk_dcxo_out>; + bt_power = "axp803-dldo1"; + bt_io_regulator; + bt_rst_n = <&r_pio PH 11 1 0xffffffff 0xffffffff 0>; + status = "okay"; + }; + + btlpm: btlpm@0 { + compatible = "allwinner,sunxi-btlpm"; + uart_index = <0x1>; + bt_wake = <&pio PG 12 1 0xffffffff 0xffffffff 1>; + bt_hostwake = <&pio PG 11 6 0xffffffff 0xffffffff 1>; + status = "okay"; + }; + +/* + wlan: wlan@0 { + compatible = "allwinner,sunxi-wlan"; + clocks = <&clk_losc_out>, <&clk_dcxo_out>; + pinctrl-0; + pinctrl-names; + wlan_busnum = <0x1>; + wlan_power = "axp803-dldo1"; + wlan_io_regulator; + wlan_regon = <&pio PG 10 1 0xffffffff 0xffffffff 0>; + wlan_hostwake = <&pio PG 13 6 0xffffffff 0xffffffff 0>; + chip_en; + power_en; + status = "okay"; + }; + + bt: bt@0 { + compatible = "allwinner,sunxi-bt"; + clocks = <&clk_losc_out>, <&clk_dcxo_out>; + bt_power = "axp803-dldo1"; + //bt_power = "axp803-dldo1"; + bt_io_regulator; + //bt_rst_n = <&r_pio PL 2 1 0xffffffff 0xffffffff 0>; + status = "okay"; + }; + + btlpm: btlpm@0 { + compatible = "allwinner,sunxi-btlpm"; + uart_index = <0x1>; + bt_wake = <&pio PG 11 1 0xffffffff 0xffffffff 1>; + bt_hostwake = <&pio PG 12 6 0xffffffff 0xffffffff 1>; + status = "okay"; + }; +*/ + addr_mgt: addr_mgt@0 { + compatible = "allwinner,sunxi-addr_mgt"; + type_addr_wifi = <0x0>; + type_addr_bt = <0x0>; + type_addr_eth = <0x0>; + status = "okay"; + }; + uart0: uart@05000000 { + uart-supply = <®_dcdc1>; + }; + + uart1: uart@05000400 { + status = "okay"; + }; + + uart2: uart@05000800 { + status = "okay"; + }; + + uart3: uart@05000c00 { + status = "okay"; + }; + + uart4: uart@05001000 { + status = "okay"; + }; + }; + gpu: gpu@0x01800000 { + gpu_idle = <1>;/*ic version ctrl*/ + dvfs_status = <1>; + pll_rate = <504000>; + independent_power = <0>; + operating-points = < + /* KHz uV */ + 504000 950000 + 472500 950000 + 441000 950000 + 252000 950000 + >; + gpu-supply = <®_dcdc4>; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + status = "okay"; + + sysled { + label = "sysled"; + gpios = <&r_pio PL 10 1 0 1 1>; + linux,default_trigger = "heartbeat"; + }; + + spk_en { + label = "spk_en"; + gpios = <&pio PB 7 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + fan_en { + label = "fan_en"; + gpios = <&r_pio PL 7 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PH8 { + label = "PH8"; + gpios = <&pio PH 8 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC2 { + label = "PC2"; + gpios = <&pio PC 2 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC3 { + label = "PC3"; + gpios = <&pio PC 3 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC4 { + label = "PC4"; + gpios = <&pio PC 4 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC7 { + label = "PC7"; + gpios = <&pio PC 7 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PC12 { + label = "PC12"; + gpios = <&pio PC 12 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PL2 { + label = "PL2"; + gpios = <&r_pio PL 2 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PL3 { + label = "PL3"; + gpios = <&r_pio PL 3 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PL4 { + label = "PL4"; + gpios = <&r_pio PL 4 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + PL5 { + label = "PL5"; + gpios = <&r_pio PL 5 1 0 1 0>; + linux,default_trigger = "default-on"; + }; + + }; +}; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; + +&s_cir0 { + status = "okay"; + + pinctrl-names = "default", "sleep"; + pinctrl-0 = <&s_cir0_pins_a>; + pinctrl-1 = <&s_cir0_pins_a>; + + s_cir0_used = <1>; + ir_power_key_code0 = <0x4d>; + ir_addr_code0 = <0x4040>; + ir_power_key_code1 = <0x51>; + ir_addr_code1 = <0x7f80>; + ir_power_key_code2 = <0x1c>; + ir_addr_code2 = <0xdf00>; + wakeup-source; +}; + + +&gmac0 { + /delete-property/ phy-rst; + rx-delay = <7>; +}; + + +//#include "lcd-lvds-21-1920-1080.dtsi" +#include "lcd-lvds-7-1024-600.dtsi" +//#include "lcd-mipi-10-800-1280.dtsi" -- Gitblit v1.6.2