[PATCH 1/2] clk: sunxi: add THS clk/reset

2023-02-13 Thread qianfanguijin
From: qianfan Zhao Add clock/reset definitions for THS peripherals. Signed-off-by: qianfan Zhao --- drivers/clk/sunxi/clk_h3.c | 5 + drivers/clk/sunxi/clk_h6.c | 4 drivers/clk/sunxi/clk_r40.c | 5 + 3 files changed, 14 insertions(+) diff --git a/drivers/clk/sunxi/clk_h3.c

[PATCH 2/2] drivers: thermal: Introduce sun8i_thermal

2023-02-13 Thread qianfanguijin
From: qianfan Zhao Portting sun8i_thermal.c from linux-5.15 drivers and drop interrupt features. Next is an example from allwinner T3: => temperature get thermal-sensor@1c24c00 thermal-sensor@1c24c00: 39437 C => thermal-sensor@1c24c00: 39776 C => thermal-sensor@1c24c00: 39437 C Signed-off-by:

[PATCH] drivers: usb: fastboot: Fix full-speed usb descriptor

2022-08-21 Thread qianfanguijin
From: qianfan Zhao The host will report such error message if the fastboot device work in full-speed mode: "Duplicate descriptor for config 1 interface 0 altsetting 0, skipping" Fastboot device ack both full and high speed interface descriptors when work in full-speed mode, that's will cause

[PATCH] drivers: mmc: Reset watchdog when accessing mmc device

2022-07-13 Thread qianfanguijin
From: qianfan Zhao watchdog will reset when 'mmc read' or 'ext4load' a large file from mmc device. Reset watchdog when accessing mmc device. Signed-off-by: qianfan Zhao --- drivers/mmc/mmc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index

[PATCH v1] common: image-android: Add signature verification feature

2022-07-07 Thread qianfanguijin
From: qianfan Zhao Not all Android tools use the id field for signing the image with sha1, so make this feature as optional and disabled default. Signed-off-by: qianfan Zhao --- common/Kconfig.boot| 14 +++ common/image-android.c | 55 +- 2

[PATCH] common: image-android: Add signature verification feature

2022-07-07 Thread qianfanguijin
From: qianfan Zhao Not all Android tools use the id field for signing the image with sha1, so make this feature as optional and disabled default. Signed-off-by: qianfan Zhao --- common/Kconfig.boot| 14 +++ common/image-android.c | 55 +- 2

[PATCH v1] drivers: spi: sunxi: Fix spi speed settting

2022-06-09 Thread qianfanguijin
From: qianfan Zhao dm_spi_claim_bus run spi_set_speed_mode first and then ops->claim_bus, but spi clock is enabled when sun4i_spi_claim_bus, that will make sun4i_spi_set_speed doesn't work. Fix it. Signed-off-by: qianfan Zhao --- drivers/spi/spi-sunxi.c | 78

[PATCH v2] sunxi: psci: Fix sunxi_power_switch on sun8i-r40 platform

2022-05-13 Thread qianfanguijin
From: qianfan Zhao linux system will die if we offline one of the cpu on R40 based board: eg: echo 0 > /sys/devices/system/cpu/cpu3/online Fixed sunxi_power_switch based on allwinner lichee 3.10 kernel driver. Signed-off-by: qianfan Zhao --- v2 changes: Fix the commit message, the source code

[PATCH v1] sunxi: psci: Fix sunxi_power_switch on sun8i-r40 platform

2022-05-13 Thread qianfanguijin
From: qianfan Zhao linux system will dead if we offline one of the cpu on R40 based board: eg: echo 0 > /sys/devices/system/cpu/cpu3/online Fixed sunxi_power_switch based on allwinner lichee 3.10 kernel driver. Signed-off-by: qianfan Zhao --- arch/arm/cpu/armv7/sunxi/psci.c | 24

[PATCH v1] splash: splash_storage_read_raw: Add mmc support

2022-04-25 Thread qianfanguijin
From: qianfan Zhao Add splash_mmc_read_raw for loading splash from mmc's raw partition. Signed-off-by: qianfan Zhao --- common/splash_source.c | 90 ++ 1 file changed, 90 insertions(+) diff --git a/common/splash_source.c b/common/splash_source.c index

[PATCH v1] drivers: spi: spi-sunxi: Add Kconfig option for sun4i_spi_parse_pins

2022-04-25 Thread qianfanguijin
From: qianfan Zhao spi-sunxi driver will init pins based on "pinctrl-0", but the implementation is very limited. Adding an Kconfig option if you really need this feature, or disable it and config pinmux at board's board_init. Signed-off-by: qianfan Zhao --- drivers/spi/Kconfig | 10

[PATCH v1] sunxi: Make SYS_VENDOR, SYS_BOARD, SYS_CONFIG_NAME configurable

2022-04-20 Thread qianfanguijin
From: qianfan Zhao The board is not configurable if use sunxi soc. Add Kconfig items and make custom board available. Signed-off-by: qianfan Zhao --- arch/arm/mach-sunxi/Kconfig | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-sunxi/Kconfig

[PATCH v2 1/2] net: eth-uclass: Fix eth_halt

2022-04-01 Thread qianfanguijin
From: qianfan Zhao eth_device_priv maybe unaccessable after @stop handler due to eth device is removed in @stop, touch it will trigger data abort. Fix data abort bug when run dhcp or tftp command via usbnet. Signed-off-by: qianfan Zhao --- net/eth-uclass.c | 11 +-- 1 file changed, 9

[PATCH v2 2/2] net: eth-uclass: Fix data abort when tftp get nonexistent file via usb

2022-04-01 Thread qianfanguijin
From: qianfan Zhao tftp_handler do eth_halt when TFTP_ERROR, but eth_halt will remove eth device if it is an usb network. usbeth's private data will be unaccessable when usb_eth_free_pkt, touch it will trigger data abort. Next is the console messages: => tftp xxx ... Loading: * TFTP error:

[PATCH v2 3/3] driver: video: font: Introduce 6x8 bitmap font

2022-03-31 Thread qianfanguijin
From: qianfan Zhao 6x8 bitmap font has better display effect on smaller lcd screen. Signed-off-by: qianfan Zhao --- drivers/video/Kconfig|3 + include/video_font.h |4 +- include/video_font_6x8.h | 2580 ++ 3 files changed, 2586

[PATCH v2 1/3] video: Add VIDEO_FONT_4x6 to Kconfig add fix compile waring

2022-03-31 Thread qianfanguijin
From: qianfan Zhao CONFIG_VIDEO_FONT_4x6 is referenced in include/video_font.h, but doesn't has a Kconfig configuration. Add it. Signed-off-by: qianfan Zhao --- drivers/video/Kconfig| 15 +++ include/video_font_4x6.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-)

[PATCH v2 2/3] cmd: lcdputs: Escape special characters

2022-03-31 Thread qianfanguijin
From: qianfan Zhao Add support \\, \r, \n, \t and \b. eg: => lcdputs "hello\nworld" Signed-off-by: qianfan Zhao --- drivers/video/vidconsole-uclass.c | 34 +-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/video/vidconsole-uclass.c

[PATCH v1 1/2] video: Add VIDEO_FONT_4x6 to Kconfig add fix compile waring

2022-03-31 Thread qianfanguijin
From: qianfan Zhao CONFIG_VIDEO_FONT_4x6 is referenced in include/video_font.h, but doesn't has a Kconfig configuration. Add it. Signed-off-by: qianfan Zhao --- drivers/video/Kconfig| 8 include/video_font_4x6.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git

[PATCH v1 2/2] cmd: lcdputs: Escape special characters

2022-03-31 Thread qianfanguijin
From: qianfan Zhao Add support \\, \r, \n, \t and \b. eg: => lcdputs "hello\nworld" Signed-off-by: qianfan Zhao --- drivers/video/vidconsole-uclass.c | 34 +-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/video/vidconsole-uclass.c

[PATCH v2 2/2] net: eth-uclass: Fix data abort when tftp get nonexistent file via usb

2022-03-28 Thread qianfanguijin
From: qianfan Zhao tftp_handler do eth_halt when TFTP_ERROR, but eth_halt will remove eth device if it is an usb network. usbeth's private data will be unaccessable when usb_eth_free_pkt, touch it will trigger data abort. Next is the console messages: => tftp xxx ... Loading: * TFTP error:

[PATCH v2 1/2] net: eth-uclass: Fix eth_halt

2022-03-28 Thread qianfanguijin
From: qianfan Zhao eth_device_priv maybe unaccessable after @stop handler due to eth device is removed in @stop. Setting private data before @stop handler. This also fix data abort bug when run dhcp or tftp command via usbnet. Signed-off-by: qianfan Zhao --- net/eth-uclass.c | 9 +++-- 1

[PATCH v1] net: eth-uclass: Fix eth_halt

2022-03-28 Thread qianfanguijin
From: qianfan Zhao eth_device_priv maybe unaccessable after @stop handler due to eth device is removed in @stop. Setting private data before @stop handler. This also fix data abort bug when run dhcp or tftp command via usbnet. Signed-off-by: qianfan Zhao --- net/eth-uclass.c | 9 +++-- 1

Re: data abort when run 'dhcp'

2022-03-23 Thread qianfanguijin
no malloc messages even if i remove the _DEBUG marco check in assert. maybe it can’t detected by do_check_inuse_chunk(). > 在 2022年3月23日,18:12,Heinrich Schuchardt 写道: > On 3/23/22 11:07, qianfan wrote: >> >> 在 2022/3/23 17:51, Heinrich Schuchardt 写道: >>> On 3/23/22 10:13, qianfan wrote: 在

[PATCH v1] driver: fastboot: Fix getvar_get_part_info when flash nand

2021-12-28 Thread qianfanguijin
From: qianfan Zhao find_dev_and_part return 0 on success, 1 otherwise. So fastboot_nand_get_part_info follow this rule. Signed-off-by: qianfan Zhao --- drivers/fastboot/fb_getvar.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/fastboot/fb_getvar.c

[PATCH v4] lib: sparse: Make CHUNK_TYPE_RAW buffer aligned

2021-11-15 Thread qianfanguijin
From: qianfan Zhao CHUNK_TYPE_RAW buffer is not aligned, and flash sparse images by fastboot will report "Misaligned operation" if DCACHE is enabled. Flashing Sparse Image CACHE: Misaligned operation at range [8428, 84001028] CACHE: Misaligned operation at range [84001034, 84002034] CACHE:

[PATCH] drivers: musb_gadget: Save endpoint desc to usb_ep->desc

2021-11-15 Thread qianfanguijin
From: qianfan Zhao Fix fastboot flash bug. If the downloading file size is equal to the partition size, "fastboot flash" can't work, at least in sunxi platform, because used an uninitalized point: ep->desc. This patch also fixed 'data abort' bug in am335x platform. Reproduce: fastboot flash

[PATCH] lib: sparse: Make CHUNK_TYPE_RAW buffer aligned

2021-11-14 Thread qianfanguijin
From: qianfan Zhao CHUNK_TYPE_RAW buffer is not aligned, and flash sparse images by fastboot will report "Misaligned operation" if DCACHE is enabled. Flashing Sparse Image CACHE: Misaligned operation at range [8428, 84001028] CACHE: Misaligned operation at range [84001034, 84002034] CACHE:

[PATCH] drivers: musb_gadget: Save endpoint desc to usb_ep->desc

2021-11-07 Thread qianfanguijin
From: qianfan Zhao Fix fastboot flash bug. If the downloading file size is equal to the partition size, "fastboot flash" can't work, at least in sunxi platform, because used an uninitalized point: ep->desc. Reproduce: fastboot flash loader1 spl/sunxi-spl.bin. Signed-off-by: qianfan Zhao ---

[v2, PATCH] lib: sparse: Make CHUNK_TYPE_RAW buffer aligned

2021-11-07 Thread qianfanguijin
From: qianfan Zhao CHUNK_TYPE_RAW buffer is not aligned, and flash sparse images by fastboot will report "Misaligned operation" if DCACHE is enabled. Flashing Sparse Image CACHE: Misaligned operation at range [8428, 84001028] CACHE: Misaligned operation at range [84001034, 84002034] CACHE:

[PATCH] lib: sparse: Make CHUNK_TYPE_RAW buffer aligned

2021-11-04 Thread qianfanguijin
From: qianfan Zhao CHUNK_TYPE_RAW buffer is not aligned, and flash sparse images by fastboot will report "Misaligned operation" if DCACHE is enabled. Flashing Sparse Image CACHE: Misaligned operation at range [8428, 84001028] CACHE: Misaligned operation at range [84001034, 84002034] CACHE:

[PATCH] board: myir_6ulx: Use DCD to init DRAM instead of SPL

2021-10-28 Thread qianfanguijin
From: qianfan Zhao The work of SPL did is init DRAM, which can be replaced with DCD scripts. This is very helpful to start u-boot directly through USB. Signed-off-by: qianfan Zhao --- arch/arm/mach-imx/mx6/Kconfig| 1 + board/myir/mys_6ulx/Kconfig | 3 +

[PATCH] driver: gadget: fastboot: Link endpoint and descriptors

2021-09-16 Thread qianfanguijin
From: qianfan Zhao If the downloading file size is equal to the partition size, "fastboot flash" can't work, at least in sunxi platform, because used an uninitalized point: ep->desc. Reproduce: fastboot flash loader1 spl/sunxi-spl.bin. Fix it. Signed-off-by: qianfan Zhao ---

[PATCH 3/3] sunxi: defconfig: bpi-m2u: Enable usb gadget and ums by default

2021-06-30 Thread qianfanguijin
From: qianfan Zhao Since the usb otg driver support R40 device, we enable usb gadget functions and ums. Signed-off-by: qianfan Zhao --- configs/Bananapi_M2_Ultra_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/Bananapi_M2_Ultra_defconfig

[PATCH 2/3] dts: bpi-m2u: Enable USB_OTG by default

2021-06-30 Thread qianfanguijin
From: qianfan Zhao bpi-m2u has a hardware usb_otg, let's enable it in dts. Signed-off-by: qianfan Zhao --- arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts | 5 + arch/arm/dts/sun8i-r40.dtsi | 14 ++ 2 files changed, 19 insertions(+) diff --git

[PATCH v2 1/3] phy-sun4i-usb: Fix sun8i_r40_cfg

2021-06-30 Thread qianfanguijin
From: qianfan Zhao the r40 has the same configurations with a33, disable enable_pmu_unk1 and phy0_dual_route feature. Signed-off-by: qianfan Zhao --- drivers/phy/allwinner/phy-sun4i-usb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c

[PATCH 1/4] phy-sun4i-usb: Fix sun8i_r40_cfg

2021-06-15 Thread qianfanguijin
From: qianfan Zhao The address of sun8i_r40's phyctrl is 0x01c13404, also fixed enable_pmu and dual_route. Signed-off-by: qianfan Zhao --- drivers/phy/allwinner/phy-sun4i-usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c

[PATCH 3/4] dts: bpi-m2u: Enable USB_OTG by default

2021-06-15 Thread qianfanguijin
From: qianfan Zhao bpi-m2u has a hardware usb_otg, let's enable it in dts. Signed-off-by: qianfan Zhao --- arch/arm/dts/sun8i-r40-bananapi-m2-ultra.dts | 4 arch/arm/dts/sun8i-r40.dtsi | 13 + 2 files changed, 17 insertions(+) diff --git

[PATCH 2/4] sunxi_musb: Add musb configurations of sun8i-r40

2021-06-15 Thread qianfanguijin
From: qianfan Zhao R40 has 8 user-configurable endpoints and 8KB FIFO for EPs. Signed-off-by: qianfan Zhao --- drivers/usb/musb-new/sunxi.c | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/usb/musb-new/sunxi.c

[PATCH 4/4] sunxi: defconfig: bpi-m2u: Enable usb gadget and ums by default

2021-06-15 Thread qianfanguijin
From: qianfan Zhao Since the usb otg driver support R40 device, we enable usb gadget functions and ums. Signed-off-by: qianfan Zhao --- configs/Bananapi_M2_Ultra_defconfig | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/Bananapi_M2_Ultra_defconfig