Skip to contentSkip to conversation

arm64: dts: mt8173-elm: fix supported values for regulator-allowed-modes of da9211

PATCH Applied Dafna Hirschfeld 3 participants 3 messages Sep 3, 2020 – Sep 9, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: mt8173-elm: fix supported values for regulator-allowed-modes of da9211

According to the datasheet the allowed modes for the da9211 regulator are sync and auto mode. This should be changed in the devicetree. This also fix an error message
'BUCKA: invalid regulator-allowed-modes element 0' since value 0 is invalid.

Fixes 689b937beddeb ("arm64: dts: mediatek: add mt8173 elm and hana board")
---
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +3 -1
index 1fe5dac24ba1..1a51879d5c6f 100644
@@ -5,6 +5,7 @@
 
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/regulator/dlg,da9211-regulator.h>
 #include <dt-bindings/gpio/gpio.h>
 #include "mt8173.dtsi"
 
@@ -293,7 +294,8 @@
 				regulator-max-microamp  = <4400000>;
 				regulator-ramp-delay = <10000>;
 				regulator-always-on;
-				regulator-allowed-modes = <0 1>;
+				regulator-allowed-modes = <DA9211_BUCK_MODE_SYNC
+							   DA9211_BUCK_MODE_AUTO>;
 			};
 
 			da9211_vgpu_reg: BUCKB {
Signature · 7 lines
2.17.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Tested-by on v1 1/1
#1 lore raw

Hi Dafna,

Thank you to work on this.

Quoted 8 lines · Dafna Hirschfeld

According to the datasheet the allowed modes for the da9211 regulator are sync and auto mode. This should be changed in the devicetree. This also fix an error message
'BUCKA: invalid regulator-allowed-modes element 0' since value 0 is invalid.

Fixes 689b937beddeb ("arm64: dts: mediatek: add mt8173 elm and hana board")

Double checked the regulator supported modes and I can confirm that this patch gets rid of the error message, so:

Quoted 27 lines
---
 arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +3 -1
index 1fe5dac24ba1..1a51879d5c6f 100644
@@ -5,6 +5,7 @@
 
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/regulator/dlg,da9211-regulator.h>
 #include <dt-bindings/gpio/gpio.h>
 #include "mt8173.dtsi"
 
@@ -293,7 +294,8 @@
 				regulator-max-microamp  = <4400000>;
 				regulator-ramp-delay = <10000>;
 				regulator-always-on;
-				regulator-allowed-modes = <0 1>;
+				regulator-allowed-modes = <DA9211_BUCK_MODE_SYNC
+							   DA9211_BUCK_MODE_AUTO>;
 			};
 
 			da9211_vgpu_reg: BUCKB {
maintainer Applied
#2 lore raw
Quoted 11 lines · Enric Balletbo i Serra

Hi Dafna,

Thank you to work on this.

Quoted 6 lines · Dafna Hirschfeld

According to the datasheet the allowed modes for the da9211 regulator are sync and auto mode. This should be changed in the devicetree. This also fix an error message
'BUCKA: invalid regulator-allowed-modes element 0' since value 0 is invalid.

Quoted 8 lines
Quoted 2 lines
Fixes 689b937beddeb ("arm64: dts: mediatek: add mt8173 elm and hana board")

Double checked the regulator supported modes and I can confirm that this patch gets rid of the error message, so:

Applied to v5.9-next/dts64

Thanks!

Quoted 27 lines
Quoted 27 lines
---
  arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +3 -1
index 1fe5dac24ba1..1a51879d5c6f 100644
@@ -5,6 +5,7 @@
 
  #include <dt-bindings/input/input.h>
  #include <dt-bindings/input/linux-event-codes.h>
+#include <dt-bindings/regulator/dlg,da9211-regulator.h>
  #include <dt-bindings/gpio/gpio.h>
  #include "mt8173.dtsi"
 
@@ -293,7 +294,8 @@
  				regulator-max-microamp  = <4400000>;
  				regulator-ramp-delay = <10000>;
  				regulator-always-on;
-				regulator-allowed-modes = <0 1>;
+				regulator-allowed-modes = <DA9211_BUCK_MODE_SYNC
+							   DA9211_BUCK_MODE_AUTO>;
  			};
 
  			da9211_vgpu_reg: BUCKB {