From 69ed55dec4b2116a19e4cca4393cbc014fce5fb2 Mon Sep 17 00:00:00 2001 From: huangcm <1263938474@qq.com> Date: Mon, 24 Feb 2025 03:43:18 +0000 Subject: [PATCH] fix(pmu): usb supply always usb adapter mode --- longan/device/config/chips/a133/configs/c3/board.dts | 153 +++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 119 insertions(+), 34 deletions(-) diff --git a/longan/device/config/chips/a133/configs/c3/board.dts b/longan/device/config/chips/a133/configs/c3/board.dts index 55a6d3f..2fa9efb 100755 --- a/longan/device/config/chips/a133/configs/c3/board.dts +++ b/longan/device/config/chips/a133/configs/c3/board.dts @@ -6,7 +6,7 @@ /dts-v1/; #include "sun50iw10p1.dtsi" - +#include "dt-bindings/input/linux-event-codes.h" /{ model = "sun50iw10"; @@ -104,7 +104,7 @@ allwinner,pins = "PH12", "PH13"; allwinner,pname = "twi3_scl", "twi3_sda"; allwinner,function = "twi3"; - allwinner,muxsel = <2>; + allwinner,muxsel = <3>; allwinner,drive = <1>; allwinner,pull = <1>; }; @@ -190,9 +190,11 @@ }; */ spi0_pins_a: spi0@0 { - allwinner,pins = "PC2", "PC4", "PC12", "PC15", "PC16"; - allwinner,pname = "spi0_mosi", "spi0_miso", - "spi0_sclk", "spi0_wp", "spi0_hold"; + // 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>; @@ -209,7 +211,8 @@ }; spi0_pins_c: spi0@2 { - allwinner,pins = "PC2", "PC3", "PC4", "PC7", "PC12", "PC15", "PC16"; + // 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>; @@ -298,7 +301,7 @@ ctp_revert_x_flag = <0x1>; ctp_revert_y_flag = <0x1>; ctp_exchange_x_y_flag = <0x0>; - ctp_int_port = <&pio PE 3 3 0xffffffff 0xffffffff 0>; + 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>; @@ -320,29 +323,38 @@ pinctrl-1 = <&spi0_pins_c>; spi0_cs_number = <1>; spi0_cs_bitmap = <1>; - spi_slave_mode = <0>; + 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"; + status = "disabled"; }; */ pwm2: pwm2@0300a000 { pinctrl-names = "active", "sleep"; pinctrl-0 = <&pwm2_pin_a>; pinctrl-1 = <&pwm2_pin_b>; - status = "okay"; + status = "okay"; }; twi1: twi@0x05002400{ @@ -370,10 +382,13 @@ pinctrl-1 = <&twi3_pins_b>; status = "okay"; // RTC - pcf8563@51 { - compatible = "haoyu,hym8563"; - reg = <0x51>; - status = "okay"; + pcf8563@51 { + compatible = "haoyu,hym8563"; + reg = <0x51>; + interrupt-parent = <&pio>; + interrupts = <PB 8 IRQ_TYPE_LEVEL_LOW>; + status = "okay"; + wakeup-source; }; }; @@ -525,6 +540,7 @@ regulator-ramp-delay = <250>; regulator-enable-ramp-delay = <1000>; regulator-boot-on; + regulator-always-on; }; reg_dcdc2: dcdc2 { regulator-name = "axp803-dcdc2"; @@ -985,6 +1001,7 @@ }; sndcodec:sound@0 { + noheadphonemic = <1>; status = "okay"; }; @@ -997,7 +1014,7 @@ }; dmic:dmic-controller@0x05095000{ - status = "okay"; + status = "disabled"; }; snddmic:sound@2{ @@ -1217,11 +1234,12 @@ */ keyboard { compatible = "allwinner,keyboard_1350mv"; - status = "disable"; - key_cnt = <3>; - key0 = <475 0x7372>; - key1 = <646 0x73>; - key2 = <900 0x72>; + status = "okay"; + key_cnt = <1>; + key0 = <590 KEY_RESERVED>; + //key0 = <475 0x7372>; + //key1 = <646 0x73>; + //key2 = <897 0x72>; }; wlan: wlan@0 { @@ -1244,7 +1262,7 @@ clocks = <&clk_losc_out>, <&clk_dcxo_out>; bt_power = "axp803-dldo1"; bt_io_regulator; - bt_rst_n = <&r_pio PL 3 1 0xffffffff 0xffffffff 0>; + bt_rst_n = <&r_pio PH 11 1 0xffffffff 0xffffffff 0>; status = "okay"; }; @@ -1333,21 +1351,64 @@ }; leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - status = "okay"; + compatible = "gpio-leds"; + pinctrl-names = "default"; + status = "okay"; - sysled { - label = "sysled"; - gpios = <&r_pio PL 11 1 0 1 1>; - linux,default_trigger = "heartbeat"; - }; + 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"; - }; + 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"; + }; + }; }; @@ -1355,6 +1416,30 @@ 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