From 05d7ca03d46e69bbad8fb3ad59070fe0a732bd93 Mon Sep 17 00:00:00 2001 From: ARCW <34829404+ARC-MX@users.noreply.github.com> Date: Mon, 12 Aug 2024 23:16:11 +0800 Subject: [PATCH] Fixed tinker-edgr-r board GPU bug, drivers:regulator:fan53555:add new device chip id (#6998) --- .../add-fan53555-rev-0x12.patch | 24 ---------- ...drivers-regulator-fan53555-bug-fixed.patch | 44 +++++++++++++++++++ .../dt/rk3399pro-tinker-edge-r.dts | 14 ++++-- ...drivers-regulator-fan53555-bug-fixed.patch | 44 +++++++++++++++++++ .../dt/rk3399pro-tinker-edge-r.dts | 14 ++++-- 5 files changed, 108 insertions(+), 32 deletions(-) delete mode 100644 patch/kernel/archive/rockchip64-6.6/add-fan53555-rev-0x12.patch create mode 100644 patch/kernel/archive/rockchip64-6.6/drivers-regulator-fan53555-bug-fixed.patch create mode 100644 patch/kernel/archive/rockchip64-6.9/drivers-regulator-fan53555-bug-fixed.patch diff --git a/patch/kernel/archive/rockchip64-6.6/add-fan53555-rev-0x12.patch b/patch/kernel/archive/rockchip64-6.6/add-fan53555-rev-0x12.patch deleted file mode 100644 index bf1a43b39..000000000 --- a/patch/kernel/archive/rockchip64-6.6/add-fan53555-rev-0x12.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c -index 48f312167..40d8607a3 100644 ---- a/drivers/regulator/fan53555.c -+++ b/drivers/regulator/fan53555.c -@@ -113,6 +113,7 @@ enum { - enum { - FAN53555_CHIP_REV_00 = 0x3, - FAN53555_CHIP_REV_13 = 0xf, -+ FAN53555_CHIP_REV_23 = 0xc, - }; - - enum { -@@ -301,6 +302,11 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di) - di->vsel_min = 800000; - di->vsel_step = 10000; - break; -+ case FAN53555_CHIP_REV_23: -+ dev_info(di->dev, "setup fairchild REV_23 vsel\n"); -+ di->vsel_min = 600000; -+ di->vsel_step = 12500; -+ break; - default: - dev_err(di->dev, - "Chip ID %d with rev %d not supported!\n", diff --git a/patch/kernel/archive/rockchip64-6.6/drivers-regulator-fan53555-bug-fixed.patch b/patch/kernel/archive/rockchip64-6.6/drivers-regulator-fan53555-bug-fixed.patch new file mode 100644 index 000000000..1f8803d04 --- /dev/null +++ b/patch/kernel/archive/rockchip64-6.6/drivers-regulator-fan53555-bug-fixed.patch @@ -0,0 +1,44 @@ +From b95c594a0969e469ef627c3e1724566dc5aa3016 Mon Sep 17 00:00:00 2001 +From: ARC-MX +Date: Thu, 25 Jul 2024 17:44:54 +0800 +Subject: [PATCH] drivers:regulator:fan53555:add new device chip id + +drivers:regulator:fan53555 + +When I use fan53555, I see an error: + + FAN53555-regulator 0-0060: Chip ID 0 with rev 12 not supported! + +So I fixed this bug + +Signed-off-by: ARC-MX +--- + drivers/regulator/fan53555.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c +index 17c9bf204..c8a2e9405 100644 +--- a/drivers/regulator/fan53555.c ++++ b/drivers/regulator/fan53555.c +@@ -113,6 +113,7 @@ enum { + enum { + FAN53555_CHIP_REV_00 = 0x3, + FAN53555_CHIP_REV_13 = 0xf, ++ FAN53555_CHIP_REV_23 = 0xc, + }; + + enum { +@@ -301,6 +302,10 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di) + di->vsel_min = 800000; + di->vsel_step = 10000; + break; ++ case FAN53555_CHIP_REV_23: ++ di->vsel_min = 600000; ++ di->vsel_step = 12500; ++ break; + default: + dev_err(di->dev, + "Chip ID %d with rev %d not supported!\n", +-- +2.25.1 + diff --git a/patch/kernel/archive/rockchip64-6.6/dt/rk3399pro-tinker-edge-r.dts b/patch/kernel/archive/rockchip64-6.6/dt/rk3399pro-tinker-edge-r.dts index 165b1f524..9972fe306 100644 --- a/patch/kernel/archive/rockchip64-6.6/dt/rk3399pro-tinker-edge-r.dts +++ b/patch/kernel/archive/rockchip64-6.6/dt/rk3399pro-tinker-edge-r.dts @@ -323,8 +323,8 @@ &vopb { status = "okay"; - assigned-clocks = <&cru DCLK_VOP0_DIV>; - assigned-clock-parents = <&cru PLL_VPLL>; + // assigned-clocks = <&cru DCLK_VOP0_DIV>; + // assigned-clock-parents = <&cru PLL_VPLL>; }; &vopb_mmu { @@ -333,8 +333,8 @@ &vopl { status = "okay"; - assigned-clocks = <&cru DCLK_VOP1_DIV>; - assigned-clock-parents = <&cru PLL_CPLL>; + // assigned-clocks = <&cru DCLK_VOP1_DIV>; + // assigned-clock-parents = <&cru PLL_CPLL>; }; &vopl_mmu { @@ -769,6 +769,12 @@ }; &pcie0 { + pinctrl-0 = <&pcie_clkreqnb_cpm>; + bus-scan-delay-ms = <0>; + pinctrl-names = "default"; + vpcie0v9-supply = <&vcca0v9_s3>; /* VCC_0V9_S0 */ + vpcie1v8-supply = <&vcc1v8_s0>; /* VCC_1V8_S0 */ + vpcie3v3-supply = <&vccio_3v3>; status = "okay"; }; diff --git a/patch/kernel/archive/rockchip64-6.9/drivers-regulator-fan53555-bug-fixed.patch b/patch/kernel/archive/rockchip64-6.9/drivers-regulator-fan53555-bug-fixed.patch new file mode 100644 index 000000000..1f8803d04 --- /dev/null +++ b/patch/kernel/archive/rockchip64-6.9/drivers-regulator-fan53555-bug-fixed.patch @@ -0,0 +1,44 @@ +From b95c594a0969e469ef627c3e1724566dc5aa3016 Mon Sep 17 00:00:00 2001 +From: ARC-MX +Date: Thu, 25 Jul 2024 17:44:54 +0800 +Subject: [PATCH] drivers:regulator:fan53555:add new device chip id + +drivers:regulator:fan53555 + +When I use fan53555, I see an error: + + FAN53555-regulator 0-0060: Chip ID 0 with rev 12 not supported! + +So I fixed this bug + +Signed-off-by: ARC-MX +--- + drivers/regulator/fan53555.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c +index 17c9bf204..c8a2e9405 100644 +--- a/drivers/regulator/fan53555.c ++++ b/drivers/regulator/fan53555.c +@@ -113,6 +113,7 @@ enum { + enum { + FAN53555_CHIP_REV_00 = 0x3, + FAN53555_CHIP_REV_13 = 0xf, ++ FAN53555_CHIP_REV_23 = 0xc, + }; + + enum { +@@ -301,6 +302,10 @@ static int fan53555_voltages_setup_fairchild(struct fan53555_device_info *di) + di->vsel_min = 800000; + di->vsel_step = 10000; + break; ++ case FAN53555_CHIP_REV_23: ++ di->vsel_min = 600000; ++ di->vsel_step = 12500; ++ break; + default: + dev_err(di->dev, + "Chip ID %d with rev %d not supported!\n", +-- +2.25.1 + diff --git a/patch/kernel/archive/rockchip64-6.9/dt/rk3399pro-tinker-edge-r.dts b/patch/kernel/archive/rockchip64-6.9/dt/rk3399pro-tinker-edge-r.dts index 165b1f524..9972fe306 100644 --- a/patch/kernel/archive/rockchip64-6.9/dt/rk3399pro-tinker-edge-r.dts +++ b/patch/kernel/archive/rockchip64-6.9/dt/rk3399pro-tinker-edge-r.dts @@ -323,8 +323,8 @@ &vopb { status = "okay"; - assigned-clocks = <&cru DCLK_VOP0_DIV>; - assigned-clock-parents = <&cru PLL_VPLL>; + // assigned-clocks = <&cru DCLK_VOP0_DIV>; + // assigned-clock-parents = <&cru PLL_VPLL>; }; &vopb_mmu { @@ -333,8 +333,8 @@ &vopl { status = "okay"; - assigned-clocks = <&cru DCLK_VOP1_DIV>; - assigned-clock-parents = <&cru PLL_CPLL>; + // assigned-clocks = <&cru DCLK_VOP1_DIV>; + // assigned-clock-parents = <&cru PLL_CPLL>; }; &vopl_mmu { @@ -769,6 +769,12 @@ }; &pcie0 { + pinctrl-0 = <&pcie_clkreqnb_cpm>; + bus-scan-delay-ms = <0>; + pinctrl-names = "default"; + vpcie0v9-supply = <&vcca0v9_s3>; /* VCC_0V9_S0 */ + vpcie1v8-supply = <&vcc1v8_s0>; /* VCC_1V8_S0 */ + vpcie3v3-supply = <&vccio_3v3>; status = "okay"; };