Add support for poweroff via RK806 PMIC
Subsystems (3)
v3 cover Add support for poweroff via RK806 PMIC
From: Ondrej Jirman <[email protected]>
The PMIC supports powering off by twiddling some bits in a register. Add support for it via pre-existing rockchip,system-power-controller DT property.
The series was tested against Linux 6.6-rc4.
Please take a look.
Thank you,
Ondřej Jirman
v3:
- use system-power-controller
- deprecate rockchip,system-power-controller
v2:
- add a missing driver patch
Ondrej Jirman (4):
dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
dt-bindings: mfd: rk806: Allow system-power-controller property
mfd: rk8xx: Add support for standard system-power-controller property
mfd: rk8xx: Add support for RK806 power off
Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml | 2 ++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ drivers/mfd/rk8xx-core.c | 7 ++++++- 7 files changed, 23 insertions(+), 1 deletion(-)
Signature · 1 line
2.42.0
PATCH v3 1/4 dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
From: Ondrej Jirman <[email protected]>
Deprecate support for this property in favor of standard system-power-controller one.
--- Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ 5 files changed, 15 insertions(+)
Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml +3 -0
@@ -42,9 +42,12 @@ properties: rockchip,system-power-controller: type: boolean + deprecated: true description: Telling whether or not this PMIC is controlling the system power. + system-power-controller: true + wakeup-source: type: boolean description:
Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml +3 -0
@@ -37,9 +37,12 @@ properties: rockchip,system-power-controller: type: boolean + deprecated: true description: Telling whether or not this PMIC is controlling the system power. + system-power-controller: true + wakeup-source: type: boolean description:
Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml +3 -0
@@ -37,9 +37,12 @@ properties: rockchip,system-power-controller: type: boolean + deprecated: true description: Telling whether or not this PMIC is controlling the system power. + system-power-controller: true + wakeup-source: type: boolean description:
Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml +3 -0
@@ -38,9 +38,12 @@ properties: rockchip,system-power-controller: type: boolean + deprecated: true description: Telling whether or not this PMIC is controlling the system power. + system-power-controller: true + wakeup-source: type: boolean description:
Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml +3 -0
@@ -37,9 +37,12 @@ properties: rockchip,system-power-controller: type: boolean + deprecated: true description: Telling whether or not this PMIC is controlling the system power. + system-power-controller: true + wakeup-source: type: boolean description:
Signature · 1 line
2.42.0
Re: [PATCH v3 1/4] dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
Quoted 5 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
Deprecate support for this property in favor of standard system-power-controller one.
Quoted 9 lines
Signed-off-by Ondrej Jirman <[email protected]>--- Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ 5 files changed, 15 insertions(+)
Lee Jones
maintainerRe: [PATCH v3 1/4] dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
In reply to Ondřej JirmanQuoted 5 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
Deprecate support for this property in favor of standard system-power-controller one.
Quoted 8 lines
Signed-off-by Ondrej Jirman <[email protected]>--- Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ 5 files changed, 15 insertions(+)
I don't see anything wrong with it.
It would be nice to have a DT Ack though.
Signature · 1 line
Lee Jones [李琼斯]
Re: [PATCH v3 1/4] dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
Quoted 16 lines · Lee Jones
Quoted 5 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
Deprecate support for this property in favor of standard system-power-controller one.
Quoted 8 lines
Signed-off-by Ondrej Jirman <[email protected]>--- Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ 5 files changed, 15 insertions(+)
Quoted 3 lines
I don't see anything wrong with it.
It would be nice to have a DT Ack though.
Rob gave review on 12th Oct.
Best regards,
Krzysztof
Lee Jones
maintainerRe: [PATCH v3 1/4] dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
Quoted 17 lines · Krzysztof Kozlowski
Quoted 16 lines · Lee Jones
Quoted 13 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
Deprecate support for this property in favor of standard system-power-controller one.
Signed-off-by Ondrej Jirman <[email protected]>--- Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ 5 files changed, 15 insertions(+)
Quoted 5 lines
Quoted 3 lines
I don't see anything wrong with it.
It would be nice to have a DT Ack though.
Rob gave review on 12th Oct.
This new version was submitted on the 10th Oct.
Signature · 1 line
Lee Jones [李琼斯]
Re: [PATCH v3 1/4] dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
Quoted 20 lines · Lee Jones
Quoted 17 lines · Krzysztof Kozlowski
Quoted 16 lines · Lee Jones
Quoted 13 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
Deprecate support for this property in favor of standard system-power-controller one.
Signed-off-by Ondrej Jirman <[email protected]>--- Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ 5 files changed, 15 insertions(+)
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
I don't see anything wrong with it.
It would be nice to have a DT Ack though.
Rob gave review on 12th Oct.
This new version was submitted on the 10th Oct.
https://lore.kernel.org/lkml/[email protected]/
Quoted 2 lines
Signature · 1 line
Lee Jones [李琼斯]
Lee Jones
maintainerRe: [PATCH v3 1/4] dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
Quoted 23 lines · Ondřej Jirman
Quoted 22 lines · Lee Jones
Quoted 19 lines · Krzysztof Kozlowski
Quoted 18 lines · Lee Jones
Quoted 5 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
Deprecate support for this property in favor of standard system-power-controller one.
Quoted 8 lines
Signed-off-by Ondrej Jirman <[email protected]>--- Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ 5 files changed, 15 insertions(+)I don't see anything wrong with it.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
It would be nice to have a DT Ack though.
Rob gave review on 12th Oct.
This new version was submitted on the 10th Oct.
Please collect it up along with any other tags you've received and submit a [RESEND] set. Thanks.
Signature · 1 line
Lee Jones [李琼斯]
PATCH v3 2/4 dt-bindings: mfd: rk806: Allow system-power-controller property
In reply to Ondřej JirmanFrom: Ondrej Jirman <[email protected]>
Declare support for this property.
--- Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml +2 -0
@@ -29,6 +29,8 @@ properties: '#gpio-cells': const: 2 + system-power-controller: true + vcc1-supply: description: The input supply for dcdc-reg1.
Signature · 1 line
2.42.0
Re: [PATCH v3 2/4] dt-bindings: mfd: rk806: Allow system-power-controller property
Quoted 9 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
Declare support for this property.
Signed-off-by Ondrej Jirman <[email protected]>--- Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml | 2 ++ 1 file changed, 2 insertions(+)
PATCH v3 3/4 mfd: rk8xx: Add support for standard system-power-controller property
In reply to Ondřej JirmanFrom: Ondrej Jirman <[email protected]>
DT property rockchip,system-power-controller is now deprecated.
--- drivers/mfd/rk8xx-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/mfd/rk8xx-core.c +2 -1
@@ -685,7 +685,8 @@ int rk8xx_probe(struct device *dev, int variant, unsigned int irq, struct regmapif (ret)return dev_err_probe (dev, ret,"failed to add MFD devices\n" ); -if (device_property_read_bool (dev,"rockchip,system-power-controller" )) { +if (device_property_read_bool (dev,"rockchip,system-power-controller" ) || +device_property_read_bool (dev,"system-power-controller" )) { ret =devm_register_sys_off_handler (dev,SYS_OFF_MODE_POWER_OFF_PREPARE ,SYS_OFF_PRIO_HIGH , &rk808_power_off, rk808);
Signature · 1 line
2.42.0
PATCH v3 4/4 mfd: rk8xx: Add support for RK806 power off
In reply to Ondřej JirmanFrom: Ondrej Jirman <[email protected]>
Use DEV_OFF bit to power off the RK806 PMIC, when system-power-controller is used in DTS.
--- drivers/mfd/rk8xx-core.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mfd/rk8xx-core.c +4 -0
@@ -525,6 +525,10 @@ static int rk808_power_off(struct sys_off_data *data) reg =RK805_DEV_CTRL_REG ; bit =DEV_OFF ;break ; +case RK806_ID : + reg =RK806_SYS_CFG3 ; + bit =DEV_OFF ; +break ;case RK808_ID : reg =RK808_DEVCTRL_REG , bit =DEV_OFF_RST ;
Signature · 1 line
2.42.0
Hi,
Quoted 24 lines · Ondřej Jirman
From: Ondrej Jirman <[email protected]>
The PMIC supports powering off by twiddling some bits in a register. Add support for it via pre-existing rockchip,system-power-controller DT property.
The series was tested against Linux 6.6-rc4.
Please take a look.
Thank you,
Ondřej Jirmanv3:
- use system-power-controller
- deprecate rockchip,system-power-controller
v2:
- add a missing driver patchOndrej Jirman (4):
dt-bindings: mfd: rk8xx: Deprecate rockchip,system-power-controller
dt-bindings: mfd: rk806: Allow system-power-controller property
mfd: rk8xx: Add support for standard system-power-controller property
mfd: rk8xx: Add support for RK806 power off
Quoted 8 lines
Documentation/devicetree/bindings/mfd/rockchip,rk805.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk806.yaml | 2 ++ Documentation/devicetree/bindings/mfd/rockchip,rk808.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk809.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml | 3 +++ Documentation/devicetree/bindings/mfd/rockchip,rk818.yaml | 3 +++ drivers/mfd/rk8xx-core.c | 7 ++++++- 7 files changed, 23 insertions(+), 1 deletion(-)
The series is
Thanks,
-- Sebastian