From f1a9ea890645badf98795bb94e16679f674a358d Mon Sep 17 00:00:00 2001 From: Zheng zhiqi Date: Sat, 14 Sep 2024 10:50:44 +0800 Subject: [PATCH 1/3] arm64: dts: rockchip: rk3576-vehicle-evb-v20: open spi dev Open spi0:0 dev for audio, control adsp Change-Id: Ib7c3e3de33b0567b15a43899c43ed637b54aabca Signed-off-by: Zheng zhiqi --- .../boot/dts/rockchip/rk3576-vehicle-evb-v20.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3576-vehicle-evb-v20.dtsi b/arch/arm64/boot/dts/rockchip/rk3576-vehicle-evb-v20.dtsi index 1498ead15044..0e2edddf2a97 100644 --- a/arch/arm64/boot/dts/rockchip/rk3576-vehicle-evb-v20.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3576-vehicle-evb-v20.dtsi @@ -79,6 +79,7 @@ }; vcc3v3_lcd_n: vcc3v3-lcd0-n { + status = "disabled"; compatible = "regulator-fixed"; regulator-name = "vcc3v3_lcd0_n"; regulator-boot-on; @@ -401,14 +402,13 @@ status = "okay"; }; -&spi1 { +&spi0 { status = "okay"; - max-freq = <50000000>; /* spi internal clk, don't modify */ - pinctrl-names = "default", "high_speed"; - pinctrl-0 = <&spi1m1_csn0 &spi1m1_pins>; - spi_dev@0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi0m0_csn0 &spi0m0_pins>; + spi-dev@0 { compatible = "rockchip,spidev"; - reg = <0>; + reg = <0x0>; spi-max-frequency = <50000000>; spi-lsb-first; }; From f4fdb8d83f08921d557c1ef36778deb344c381ac Mon Sep 17 00:00:00 2001 From: Frank Wang Date: Tue, 9 Apr 2024 11:09:37 +0800 Subject: [PATCH 2/3] usb: typec: tcpci: husb311: fix tx failure Since the hardware bug of HUSB311, its TX fifo become abnormal when plug in a PD charger after plug out the cable from the PC. As a workaround, we do ResetTransmitBuffer after each TX packet is finished to prepare for the next. Signed-off-by: Frank Wang Change-Id: Ieebd090879a45ee2b5a1720e3debf860712e162c --- drivers/usb/typec/tcpm/tcpci_husb311.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/typec/tcpm/tcpci_husb311.c b/drivers/usb/typec/tcpm/tcpci_husb311.c index 175d5f3e2a1d..6eaba84a5b69 100644 --- a/drivers/usb/typec/tcpm/tcpci_husb311.c +++ b/drivers/usb/typec/tcpm/tcpci_husb311.c @@ -207,6 +207,10 @@ static irqreturn_t husb311_irq(int irq, void *dev_id) } } + /* TCPCI Spec. Table 4-27 ResetTransmitBuffer */ + if (status & (TCPC_ALERT_TX_SUCCESS | TCPC_ALERT_TX_DISCARDED | TCPC_ALERT_TX_FAILED)) + husb311_write8(chip, TCPC_COMMAND, 0xdd); + return tcpci_irq(chip->tcpci); } From 63d2f83cdc8ada38440d3ac7e2088e499b76a3aa Mon Sep 17 00:00:00 2001 From: Yifeng Zhao Date: Sat, 22 Jun 2024 10:07:29 +0800 Subject: [PATCH 3/3] soc: rockchip: sdmmc_vendor_storage: fix the issue of inaccurate calculation of free size When the amount of data written increases, more space is allocated, but when the amount of data written decreases, the allocated space is reclaimed without updating the value of free_size. Signed-off-by: Yifeng Zhao Change-Id: Iecf2af482c1e8af35b9fa3227bcbb597d75f770d --- drivers/soc/rockchip/sdmmc_vendor_storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/rockchip/sdmmc_vendor_storage.c b/drivers/soc/rockchip/sdmmc_vendor_storage.c index ea1d9410b8eb..5c14c484cd6a 100644 --- a/drivers/soc/rockchip/sdmmc_vendor_storage.c +++ b/drivers/soc/rockchip/sdmmc_vendor_storage.c @@ -85,6 +85,7 @@ static int emmc_vendor_storage_init(void) EMMC_VENDOR_PART_SIZE * max_index, EMMC_VENDOR_PART_SIZE, 0)) goto error_exit; + g_vendor->free_size = sizeof(g_vendor->data) - g_vendor->free_offset; } else { memset((void *)g_vendor, 0, sizeof(*g_vendor)); g_vendor->version = 1; @@ -160,8 +161,7 @@ static int emmc_vendor_write(u32 id, void *pbuf, u32 size) item->size = size; memcpy(&p_data[item->offset], pbuf, size); g_vendor->free_offset = offset + align_size; - g_vendor->free_size -= (align_size - - alloc_size); + g_vendor->free_size = sizeof(g_vendor->data) - g_vendor->free_offset; } else { memcpy(&p_data[item->offset], pbuf,