From e6b8805e0e3aa62c11df7a83fb5f0d1e9d31d1a4 Mon Sep 17 00:00:00 2001 From: Jianqun Xu Date: Mon, 31 Jul 2023 10:47:05 +0800 Subject: [PATCH 1/7] arm64: dts: rockchip: rk3588-vehicle-adsp-audio-s66: set i2s3 master This patch set the i2s3 to be master mode, while the bt must to be slave mode. The mclk rate is 24.576MHz from mclkin pin. The setting for bt: NBS: Slave LRCK 8k BCLK 512kHz I2S clk inverted WBS: Slave LRCK 16k BCLK 1024kHz I2S clk inverted Change-Id: I866ea471a2db5e39623cebeb4110ea2a639fbeba Signed-off-by: Jianqun Xu --- .../boot/dts/rockchip/rk3588-vehicle-adsp-audio-s66.dtsi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-vehicle-adsp-audio-s66.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-vehicle-adsp-audio-s66.dtsi index 18d41026b68b..5f281ea294ff 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-vehicle-adsp-audio-s66.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-vehicle-adsp-audio-s66.dtsi @@ -37,9 +37,7 @@ sound1 { compatible = "simple-audio-card"; simple-audio-card,name = "rockchip,bt"; - simple-audio-card,format = "dsp_a"; - simple-audio-card,bitclock-inversion = <1>; - simple-audio-card,mclk-fs = <256>; + simple-audio-card,format = "i2s"; simple-audio-card,cpu { sound-dai = <&i2s3_2ch>; }; @@ -78,7 +76,7 @@ }; &mclkin_i2s3 { - clock-frequency = <12288000>; + clock-frequency = <24576000>; }; &spi3 { From e58d97c2cf0032366657077c3b19609ee95fef6a Mon Sep 17 00:00:00 2001 From: Jianwei Fan Date: Tue, 8 Aug 2023 11:01:34 +0000 Subject: [PATCH 2/7] video: rockchip: vehicle: fix support RK356X Change-Id: Ifbd619c5cab7e9506b09e7fa4efb90990d301584 Signed-off-by: Jianwei Fan --- drivers/video/rockchip/vehicle/vehicle_cif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/rockchip/vehicle/vehicle_cif.c b/drivers/video/rockchip/vehicle/vehicle_cif.c index 8a4142070a5b..8e83a60279b4 100644 --- a/drivers/video/rockchip/vehicle/vehicle_cif.c +++ b/drivers/video/rockchip/vehicle/vehicle_cif.c @@ -5223,6 +5223,7 @@ int vehicle_cif_init(struct vehicle_cif *cif) if (inf_id == RKCIF_MIPI_LVDS) { /* 5. set csi2-mipi-dphy reg */ if (cif->dphy_hw->chip_id == CHIP_ID_RK3588 || + cif->dphy_hw->chip_id == CHIP_ID_RK3568 || cif->dphy_hw->chip_id == CHIP_ID_RK3562) cif->dphy_hw->csi2_dphy_base = cif->csi2_dphy_base; From 0b2afcfc6d7a6c982501e1f949824ed92f6cc8a9 Mon Sep 17 00:00:00 2001 From: Steven Liu Date: Thu, 17 Aug 2023 15:16:47 +0800 Subject: [PATCH 3/7] arm64: dts: rockchip: rk3562-evb1-lp4x-v10-linux-amp: Add memory node for ap amp use 0x00400000~0x01000000 for ap amp core Signed-off-by: Steven Liu Change-Id: If4dd9e18537a9904de55125d0871b533fb340701 --- .../boot/dts/rockchip/rk3562-evb1-lp4x-v10-linux-amp.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3562-evb1-lp4x-v10-linux-amp.dts b/arch/arm64/boot/dts/rockchip/rk3562-evb1-lp4x-v10-linux-amp.dts index 0dd16a1d8c7b..a449f6a7edc9 100644 --- a/arch/arm64/boot/dts/rockchip/rk3562-evb1-lp4x-v10-linux-amp.dts +++ b/arch/arm64/boot/dts/rockchip/rk3562-evb1-lp4x-v10-linux-amp.dts @@ -8,3 +8,11 @@ #include "rk3562-linux.dtsi" #include "rk3562-rk817.dtsi" #include "rk3562-amp.dtsi" + +/ { + memory { + device_type = "memory"; + reg = <0x0 0x01000000 0x0 0x07400000>, + <0x0 0x0a200000 0x0 0xf1e00000>; + }; +}; From 53d54c4a712ef440580c8a6b3802c6cd06ddf6d2 Mon Sep 17 00:00:00 2001 From: Yifeng Zhao Date: Wed, 16 Aug 2023 09:46:33 +0800 Subject: [PATCH 4/7] mmc: dw_mmc-rockchip: fix tuning return incorrect value in certain situations When V2 tuning returns an error, it is necessary to reset the ret to 0, otherwise the incorrect value will be returned. log: [ 4.935664] mmc0: tuning execution failed: -5 Fixes: 795e052cc861 ("mmc: dw_mmc-rockchip: add v2 tuning support") Signed-off-by: Yifeng Zhao Change-Id: I54a77e02255d88114191e8abc434856b34768715 --- drivers/mmc/host/dw_mmc-rockchip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c index 69970381d0e7..a88e8f1af052 100644 --- a/drivers/mmc/host/dw_mmc-rockchip.c +++ b/drivers/mmc/host/dw_mmc-rockchip.c @@ -174,7 +174,7 @@ static int dw_mci_v2_execute_tuning(struct dw_mci_slot *slot, u32 opcode) } if (i == ARRAY_SIZE(degrees)) { - dev_warn(host->dev, "All phases bad!"); + dev_warn(host->dev, "V2 All phases bad!"); return -EIO; } @@ -208,8 +208,7 @@ static int dw_mci_rk3288_execute_tuning(struct dw_mci_slot *slot, u32 opcode) } if (priv->use_v2_tuning) { - ret = dw_mci_v2_execute_tuning(slot, opcode); - if (!ret) + if (!dw_mci_v2_execute_tuning(slot, opcode)) return 0; /* Otherwise we continue using fine tuning */ } From 5bd2065957bce01bef6b7e2e4b8beab09624169c Mon Sep 17 00:00:00 2001 From: Wu Liangqing Date: Mon, 21 Aug 2023 07:54:23 +0000 Subject: [PATCH 5/7] arm64: dts: rockchip: rk3562-rk817: set vcc_3v3 regulator on in suspend Change-Id: Ica0866c34353a0e6c624aca3becfc49c8e304b59 Signed-off-by: Wu Liangqing --- arch/arm64/boot/dts/rockchip/rk3562-rk817.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3562-rk817.dtsi b/arch/arm64/boot/dts/rockchip/rk3562-rk817.dtsi index 3b8bd2d74e10..8bfd2466c232 100644 --- a/arch/arm64/boot/dts/rockchip/rk3562-rk817.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3562-rk817.dtsi @@ -114,7 +114,8 @@ regulator-initial-mode = <0x2>; regulator-name = "vcc_3v3"; regulator-state-mem { - regulator-off-in-suspend; + regulator-on-in-suspend; + regulator-suspend-microvolt = <3300000>; }; }; From 85504aa4a32b9d6dc49f728bab243e389ce31ed8 Mon Sep 17 00:00:00 2001 From: Cai Wenzhong Date: Mon, 21 Aug 2023 11:35:52 +0800 Subject: [PATCH 6/7] arm64: dts: rockchip: rk3588-vehicle-evb-maxim-max96712: adjust some node name Signed-off-by: Cai Wenzhong Change-Id: I9e0896ee4cf1e07f8a8b7a415d9c0fdde3e13435 --- .../rk3588-vehicle-evb-maxim-max96712.dtsi | 43 +++++++++++-------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96712.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96712.dtsi index 4daa67699c94..db774ff1a03f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96712.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96712.dtsi @@ -5,11 +5,11 @@ */ / { - max96712_osc: oscillator { + max96712_dphy3_osc0: max96712-dphy3-oscillator@0 { compatible = "fixed-clock"; #clock-cells = <1>; - clock-frequency = <25000000>; - clock-output-names = "max96712-osc"; + clock-frequency = <25000000>; + clock-output-names = "max96712-dphy3-osc0"; }; }; @@ -28,9 +28,9 @@ #address-cells = <1>; #size-cells = <0>; - mipi_dphy1_in_max96712: endpoint@1 { + mipi_dphy3_in_max96712: endpoint@1 { reg = <1>; - remote-endpoint = <&max96712_out>; + remote-endpoint = <&max96712_dphy3_out>; data-lanes = <1 2 3 4>; }; }; @@ -39,7 +39,7 @@ #address-cells = <1>; #size-cells = <0>; - csidphy1_out: endpoint@0 { + csidphy3_out: endpoint@0 { reg = <0>; remote-endpoint = <&mipi4_csi2_input>; }; @@ -50,19 +50,20 @@ &i2c6 { status = "okay"; pinctrl-names = "default"; - pinctrl-0 = <&i2c6m3_xfer>, <&max96712_errb>, <&max96712_int>; + pinctrl-0 = <&i2c6m3_xfer>; - max96712: max96712@29 { - compatible = "max96712"; + max96712_dphy3: max96712@29 { + compatible = "maxim,max96712"; status = "okay"; reg = <0x29>; clock-names = "xvclk"; - clocks = <&max96712_osc 0>; + clocks = <&max96712_dphy3_osc0 0>; + pinctrl-names = "default"; + pinctrl-0 = <&max96712_dphy3_power>, <&max96712_dphy3_errb>, <&max96712_dphy3_lock>; power-domains = <&power RK3588_PD_VI>; rockchip,grf = <&sys_grf>; power-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; pocen-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>; - //reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; lock-gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_HIGH>; auto-init-deskew-mask = <0x03>; frame-sync-period = <0>; @@ -72,8 +73,8 @@ rockchip,camera-module-lens-name = "max96712"; port { - max96712_out: endpoint { - remote-endpoint = <&mipi_dphy1_in_max96712>; + max96712_dphy3_out: endpoint { + remote-endpoint = <&mipi_dphy3_in_max96712>; data-lanes = <1 2 3 4>; }; }; @@ -94,7 +95,7 @@ mipi4_csi2_input: endpoint@1 { reg = <1>; - remote-endpoint = <&csidphy1_out>; + remote-endpoint = <&csidphy3_out>; }; }; @@ -105,7 +106,7 @@ mipi4_csi2_output: endpoint@0 { reg = <0>; - remote-endpoint = <&cif_mipi2_in>; + remote-endpoint = <&cif_mipi4_in>; }; }; }; @@ -129,7 +130,7 @@ rockchip,cif-monitor = <3 2 1 1000 5>; port { - cif_mipi2_in: endpoint { + cif_mipi4_in: endpoint { remote-endpoint = <&mipi4_csi2_output>; }; }; @@ -145,12 +146,16 @@ }; &pinctrl { - max96712 { - max96712_errb: max96712-errb { + max96712-dphy3 { + max96712_dphy3_power: max96712-dphy3-power { + rockchip,pins = <4 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + max96712_dphy3_errb: max96712-dphy3-errb { rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>; }; - max96712_int: max96712-int { + max96712_dphy3_lock: max96712-dphy3-lock { rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; }; }; From 383b245ce2449c78580a067ed3a9872314f3a780 Mon Sep 17 00:00:00 2001 From: Cai Wenzhong Date: Mon, 21 Aug 2023 11:38:29 +0800 Subject: [PATCH 7/7] arm64: dts: rockchip: rk3588-vehicle-evb-maxim-max96722: adjust some node name Signed-off-by: Cai Wenzhong Change-Id: I28052218fad9fa0db840d032b630b9270b599b19 --- .../rk3588-vehicle-evb-maxim-max96722.dtsi | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96722.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96722.dtsi index a17fb2a1eded..3b655bb8a3fc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96722.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3588-vehicle-evb-maxim-max96722.dtsi @@ -5,11 +5,11 @@ */ / { - max96722_osc: max96722-oscillator { + max96722_dphy0_osc0: max96722-dphy0-oscillator@0 { compatible = "fixed-clock"; #clock-cells = <1>; clock-frequency = <25000000>; - clock-output-names = "max96722-osc"; + clock-output-names = "max96722-dphy0-osc0"; }; }; @@ -30,7 +30,7 @@ mipi_dphy0_in_max96722: endpoint@1 { reg = <1>; - remote-endpoint = <&max96722_out>; + remote-endpoint = <&max96722_dphy0_out>; data-lanes = <1 2 3 4>; }; }; @@ -50,14 +50,16 @@ &i2c7 { status = "okay"; pinctrl-names = "default"; - pinctrl-0 = <&i2c7m3_xfer>, <&max96722_errb>, <&max96722_lock>; + pinctrl-0 = <&i2c7m3_xfer>; - max96722: max96722@29 { - compatible = "max96722"; + max96722_dphy0: max96722@29 { + compatible = "maxim,max96722"; status = "okay"; reg = <0x29>; clock-names = "xvclk"; - clocks = <&max96722_osc 0>; + clocks = <&max96722_dphy0_osc0 0>; + pinctrl-names = "default"; + pinctrl-0 = <&max96722_dphy0_power>, <&max96722_dphy0_errb>, <&max96722_dphy0_lock>; power-domains = <&power RK3588_PD_VI>; rockchip,grf = <&sys_grf>; power-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>; @@ -72,7 +74,7 @@ rockchip,camera-module-lens-name = "max96722"; port { - max96722_out: endpoint { + max96722_dphy0_out: endpoint { remote-endpoint = <&mipi_dphy0_in_max96722>; data-lanes = <1 2 3 4>; }; @@ -145,12 +147,16 @@ }; &pinctrl { - max96722 { - max96722_errb: max96722-errb { + max96722-dphy0 { + max96722_dphy0_power: max96722-dphy0-power { + rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + + max96722_dphy0_errb: max96722-dphy0-errb { rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>; }; - max96722_lock: max96722-lock { + max96722_dphy0_lock: max96722-dphy0-lock { rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>; }; };