diff --git a/app/Kconfig b/app/Kconfig index 4758cd8..8042670 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -19,11 +19,15 @@ config CONTROL_FREQUENCY config HS_MOSFET_FAIL_SAFE_PROTECTION bool default y + depends on $(dt_node_bool_prop,/pcb,ls-fuse) help - If enabled, the DC/DC control function will will detect if the high-side MOSFET has failed + If enabled, the DC/DC control function will detect if the high-side MOSFET has failed short and trip the fuse by switching the low-side MOSFET continuously on. This will prevent accidental overcharging of the battery. + Only available if the board has a fuse at the low-side terminal (ls-fuse property of the + pcb devicetree node). + # # Visible (user-configurable) Kconfig symbols # diff --git a/boards/libresolar/mppt_1210_hus/mppt_1210_hus.dts b/boards/libresolar/mppt_1210_hus/mppt_1210_hus.dts index 67008c5..a12f3f1 100644 --- a/boards/libresolar/mppt_1210_hus/mppt_1210_hus.dts +++ b/boards/libresolar/mppt_1210_hus/mppt_1210_hus.dts @@ -20,6 +20,7 @@ hs-voltage-max = <40>; ls-voltage-max = <16>; dcdc-current-max = <10>; + ls-fuse; }; chosen { diff --git a/boards/libresolar/mppt_2420_hc/mppt_2420_hc.dts b/boards/libresolar/mppt_2420_hc/mppt_2420_hc.dts index 78355ae..92eac8c 100644 --- a/boards/libresolar/mppt_2420_hc/mppt_2420_hc.dts +++ b/boards/libresolar/mppt_2420_hc/mppt_2420_hc.dts @@ -20,6 +20,7 @@ hs-voltage-max = <90>; ls-voltage-max = <32>; dcdc-current-max = <20>; + ls-fuse; }; chosen { diff --git a/boards/libresolar/mppt_2420_hpx/mppt_2420_hpx.dts b/boards/libresolar/mppt_2420_hpx/mppt_2420_hpx.dts index 017a386..011ed62 100644 --- a/boards/libresolar/mppt_2420_hpx/mppt_2420_hpx.dts +++ b/boards/libresolar/mppt_2420_hpx/mppt_2420_hpx.dts @@ -22,6 +22,7 @@ hs-voltage-max = <80>; ls-voltage-max = <32>; dcdc-current-max = <20>; + ls-fuse; }; chosen { diff --git a/boards/libresolar/mppt_2420_lc/mppt_2420_lc.dts b/boards/libresolar/mppt_2420_lc/mppt_2420_lc.dts index 57109ff..d228ede 100644 --- a/boards/libresolar/mppt_2420_lc/mppt_2420_lc.dts +++ b/boards/libresolar/mppt_2420_lc/mppt_2420_lc.dts @@ -22,6 +22,7 @@ hs-voltage-max = <55>; ls-voltage-max = <32>; dcdc-current-max = <20>; + ls-fuse; }; chosen { diff --git a/boards/libresolar/mppt_2420_rc/mppt_2420_rc.dts b/boards/libresolar/mppt_2420_rc/mppt_2420_rc.dts index f014f91..cb5206f 100644 --- a/boards/libresolar/mppt_2420_rc/mppt_2420_rc.dts +++ b/boards/libresolar/mppt_2420_rc/mppt_2420_rc.dts @@ -22,6 +22,7 @@ hs-voltage-max = <80>; ls-voltage-max = <32>; dcdc-current-max = <20>; + ls-fuse; }; chosen { diff --git a/dts/bindings/charge-controller.yaml b/dts/bindings/charge-controller.yaml index 6f09c43..72e0dd4 100644 --- a/dts/bindings/charge-controller.yaml +++ b/dts/bindings/charge-controller.yaml @@ -29,6 +29,14 @@ properties: dcdc-current-max: type: int description: Maximum inductor current in amps (if existing in the charge controller) + ls-fuse: + type: boolean + description: | + Low-side (typically battery) terminal is protected by a fuse + + The fuse can be blown by switching on the low-side MOSFET of the DC/DC converter + continuously, which shorts the low-side terminal through the inductor. This is used to + prevent overcharging of the battery in case of a shorted high-side MOSFET. internal-tref-max: type: int default: 50