* [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers
@ 2020-05-26 13:50 Serge Semin
2020-05-26 13:51 ` [PATCH v3 1/2] dt-bindings: power: reset: Unrequire regmap property in syscon-reboot node Serge Semin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Serge Semin @ 2020-05-26 13:50 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Serge Semin, Serge Semin, Alexey Malahov, Maxim Kaurkin,
Pavel Parkhomenko, Ramil Zaripov, Ekaterina Skachko,
Vadim Vlasov, Alexey Kolotnikov, Thomas Bogendoerfer,
Arnd Bergmann, Rob Herring, linux-mips, devicetree, linux-pm,
linux-kernel
This is a small patchset about tuning the syscon infrastructure a bit.
As it's going to be general in the framework of the Baikal-T1 SoC support
integration into the kernel, we suggest to replace the legacy text-based
syscon-reboot-mode dts-bindings file with yaml-based one. Then seeing a
syscon reboot block is normally expected to be a part of a system
controller and based on the discussion
https://lore.kernel.org/linux-pm/20200306130402.1F4F0803079F@mail.baikalelectronics.ru/
we decided to alter the syscon reboot driver so one would also try to fetch
the syscon registers map from a parental DT node. regmap property is left
supported although it's marked as deprecated from now.
This patchset is rebased and tested on the mainline Linux kernel 5.7-rc4:
0e698dfa2822 ("Linux 5.7-rc4")
tag: v5.7-rc4
Changelog v2:
- Add Sebastian' Acked-by tag to patch 1.
- Use a shorter summary describing the bindings modification patches.
- Our corporate email server doesn't change Message-Id anymore, so the patchset
is resubmitted being in the cover-letter-threaded format.
- Discard patch with syscon "-endian" property support. As Rob said It shall be
in the common dt-schema.
- Replace patches of adding a regmap property support to the syscon-reboot-mode
with patches making syscon-reboot a sub-node of a system controller node.
- Mark regmap property as deprecated from now.
Link: https://lore.kernel.org/linux-pm/20200507233846.11548-1-Sergey.Semin@baikalelectronics.ru/
Changelog v3:
- Discard the commit 6acd3ecd88ff ("dt-bindings: power: reset: Convert
syscon-reboot-mode to DT schema") since it has been merged in by Sebatian.
- Add Rob's Reviewed-by tag to the patch "dt-bindings: power: reset: Unrequire
regmap property in syscon-reboot node"
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Maxim Kaurkin <Maxim.Kaurkin@baikalelectronics.ru>
Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
Cc: Ekaterina Skachko <Ekaterina.Skachko@baikalelectronics.ru>
Cc: Vadim Vlasov <V.Vlasov@baikalelectronics.ru>
Cc: Alexey Kolotnikov <Alexey.Kolotnikov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Serge Semin (2):
dt-bindings: power: reset: Unrequire regmap property in syscon-reboot
node
power: reset: syscon-reboot: Add parental syscon support
.../bindings/power/reset/syscon-reboot.yaml | 15 ++++++++++-----
drivers/power/reset/syscon-reboot.c | 7 +++++--
2 files changed, 15 insertions(+), 7 deletions(-)
--
2.26.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v3 1/2] dt-bindings: power: reset: Unrequire regmap property in syscon-reboot node
2020-05-26 13:50 [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Serge Semin
@ 2020-05-26 13:51 ` Serge Semin
2020-05-26 13:51 ` [PATCH v3 2/2] power: reset: syscon-reboot: Add parental syscon support Serge Semin
2020-05-28 7:03 ` [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Sebastian Reichel
2 siblings, 0 replies; 5+ messages in thread
From: Serge Semin @ 2020-05-26 13:51 UTC (permalink / raw)
To: Sebastian Reichel, Rob Herring
Cc: Serge Semin, Serge Semin, Rob Herring, Alexey Malahov,
Thomas Bogendoerfer, Arnd Bergmann, linux-mips, linux-pm,
devicetree, linux-kernel
Since normally syscon-reboot block is supposed to be a part of a system
controller, lets mark the regmap property as deprecated and recommend the
syscon-reboot node to be a sub-node of SYSCON.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Rob Herring <robh@kernel.org>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@vger.kernel.org
---
Changelog v2:
- This is a new patch created as a result of the discussion:
https://lore.kernel.org/linux-pm/20200306130402.1F4F0803079F@mail.baikalelectronics.ru/
---
.../bindings/power/reset/syscon-reboot.yaml | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
index b80772cb9f06..da2509724812 100644
--- a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
+++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
@@ -12,9 +12,12 @@ maintainers:
description: |+
This is a generic reset driver using syscon to map the reset register.
The reset is generally performed with a write to the reset register
- defined by the register map pointed by syscon reference plus the offset
- with the value and mask defined in the reboot node.
- Default will be little endian mode, 32 bit access only.
+ defined by the SYSCON register map base plus the offset with the value and
+ mask defined in the reboot node. Default will be little endian mode, 32 bit
+ access only. The SYSCON registers map is normally retrieved from the
+ parental dt-node. So the SYSCON reboot node should be represented as a
+ sub-node of a "syscon", "simple-mfd" node. Though the regmap property
+ pointing to the system controller node is also supported.
properties:
compatible:
@@ -30,7 +33,10 @@ properties:
regmap:
$ref: /schemas/types.yaml#/definitions/phandle
- description: Phandle to the register map node.
+ deprecated: true
+ description: |
+ Phandle to the register map node. This property is deprecated in favor of
+ the syscon-reboot node been a child of a system controller node.
value:
$ref: /schemas/types.yaml#/definitions/uint32
@@ -38,7 +44,6 @@ properties:
required:
- compatible
- - regmap
- offset
additionalProperties: false
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v3 2/2] power: reset: syscon-reboot: Add parental syscon support
2020-05-26 13:50 [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Serge Semin
2020-05-26 13:51 ` [PATCH v3 1/2] dt-bindings: power: reset: Unrequire regmap property in syscon-reboot node Serge Semin
@ 2020-05-26 13:51 ` Serge Semin
2020-05-28 7:03 ` [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Sebastian Reichel
2 siblings, 0 replies; 5+ messages in thread
From: Serge Semin @ 2020-05-26 13:51 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Serge Semin, Serge Semin, Alexey Malahov, Thomas Bogendoerfer,
Arnd Bergmann, Rob Herring, linux-mips, devicetree, linux-pm,
linux-kernel
Since normally syscon-reboot block is supposed to be a part of a system
controller, lets look for the syscon regmap in a parental DT node if
regmap property isn't specified. DT binding from now considers the regmap
property as deprecated.
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
Changelog v2:
- This is a new patch created as a result of the discussion:
https://lore.kernel.org/linux-pm/20200306130402.1F4F0803079F@mail.baikalelectronics.ru/
Changelog v3:
- Resend
---
drivers/power/reset/syscon-reboot.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/power/reset/syscon-reboot.c b/drivers/power/reset/syscon-reboot.c
index 62fbba0df971..510e363381ca 100644
--- a/drivers/power/reset/syscon-reboot.c
+++ b/drivers/power/reset/syscon-reboot.c
@@ -51,8 +51,11 @@ static int syscon_reboot_probe(struct platform_device *pdev)
return -ENOMEM;
ctx->map = syscon_regmap_lookup_by_phandle(dev->of_node, "regmap");
- if (IS_ERR(ctx->map))
- return PTR_ERR(ctx->map);
+ if (IS_ERR(ctx->map)) {
+ ctx->map = syscon_node_to_regmap(dev->parent->of_node);
+ if (IS_ERR(ctx->map))
+ return PTR_ERR(ctx->map);
+ }
if (of_property_read_u32(pdev->dev.of_node, "offset", &ctx->offset))
return -EINVAL;
--
2.26.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers
2020-05-26 13:50 [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Serge Semin
2020-05-26 13:51 ` [PATCH v3 1/2] dt-bindings: power: reset: Unrequire regmap property in syscon-reboot node Serge Semin
2020-05-26 13:51 ` [PATCH v3 2/2] power: reset: syscon-reboot: Add parental syscon support Serge Semin
@ 2020-05-28 7:03 ` Sebastian Reichel
2020-05-28 8:31 ` Serge Semin
2 siblings, 1 reply; 5+ messages in thread
From: Sebastian Reichel @ 2020-05-28 7:03 UTC (permalink / raw)
To: Serge Semin
Cc: Serge Semin, Alexey Malahov, Maxim Kaurkin, Pavel Parkhomenko,
Ramil Zaripov, Ekaterina Skachko, Vadim Vlasov,
Alexey Kolotnikov, Thomas Bogendoerfer, Arnd Bergmann,
Rob Herring, linux-mips, devicetree, linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 3151 bytes --]
Hi,
On Tue, May 26, 2020 at 04:50:59PM +0300, Serge Semin wrote:
> This is a small patchset about tuning the syscon infrastructure a bit.
> As it's going to be general in the framework of the Baikal-T1 SoC support
> integration into the kernel, we suggest to replace the legacy text-based
> syscon-reboot-mode dts-bindings file with yaml-based one. Then seeing a
> syscon reboot block is normally expected to be a part of a system
> controller and based on the discussion
> https://lore.kernel.org/linux-pm/20200306130402.1F4F0803079F@mail.baikalelectronics.ru/
> we decided to alter the syscon reboot driver so one would also try to fetch
> the syscon registers map from a parental DT node. regmap property is left
> supported although it's marked as deprecated from now.
>
> This patchset is rebased and tested on the mainline Linux kernel 5.7-rc4:
> 0e698dfa2822 ("Linux 5.7-rc4")
> tag: v5.7-rc4
>
> Changelog v2:
> - Add Sebastian' Acked-by tag to patch 1.
> - Use a shorter summary describing the bindings modification patches.
> - Our corporate email server doesn't change Message-Id anymore, so the patchset
> is resubmitted being in the cover-letter-threaded format.
> - Discard patch with syscon "-endian" property support. As Rob said It shall be
> in the common dt-schema.
> - Replace patches of adding a regmap property support to the syscon-reboot-mode
> with patches making syscon-reboot a sub-node of a system controller node.
> - Mark regmap property as deprecated from now.
>
> Link: https://lore.kernel.org/linux-pm/20200507233846.11548-1-Sergey.Semin@baikalelectronics.ru/
> Changelog v3:
> - Discard the commit 6acd3ecd88ff ("dt-bindings: power: reset: Convert
> syscon-reboot-mode to DT schema") since it has been merged in by Sebatian.
> - Add Rob's Reviewed-by tag to the patch "dt-bindings: power: reset: Unrequire
> regmap property in syscon-reboot node"
>
> Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> Cc: Maxim Kaurkin <Maxim.Kaurkin@baikalelectronics.ru>
> Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
> Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
> Cc: Ekaterina Skachko <Ekaterina.Skachko@baikalelectronics.ru>
> Cc: Vadim Vlasov <V.Vlasov@baikalelectronics.ru>
> Cc: Alexey Kolotnikov <Alexey.Kolotnikov@baikalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: linux-mips@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
>
> Serge Semin (2):
> dt-bindings: power: reset: Unrequire regmap property in syscon-reboot
> node
> power: reset: syscon-reboot: Add parental syscon support
>
> .../bindings/power/reset/syscon-reboot.yaml | 15 ++++++++++-----
> drivers/power/reset/syscon-reboot.c | 7 +++++--
> 2 files changed, 15 insertions(+), 7 deletions(-)
Thanks, I queued both patches to power-supply's for-next branch.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers
2020-05-28 7:03 ` [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Sebastian Reichel
@ 2020-05-28 8:31 ` Serge Semin
0 siblings, 0 replies; 5+ messages in thread
From: Serge Semin @ 2020-05-28 8:31 UTC (permalink / raw)
To: Sebastian Reichel
Cc: Serge Semin, Alexey Malahov, Maxim Kaurkin, Pavel Parkhomenko,
Ramil Zaripov, Ekaterina Skachko, Vadim Vlasov,
Alexey Kolotnikov, Thomas Bogendoerfer, Arnd Bergmann,
Rob Herring, linux-mips, devicetree, linux-pm, linux-kernel
On Thu, May 28, 2020 at 09:03:11AM +0200, Sebastian Reichel wrote:
> Hi,
>
> On Tue, May 26, 2020 at 04:50:59PM +0300, Serge Semin wrote:
> > This is a small patchset about tuning the syscon infrastructure a bit.
> > As it's going to be general in the framework of the Baikal-T1 SoC support
> > integration into the kernel, we suggest to replace the legacy text-based
> > syscon-reboot-mode dts-bindings file with yaml-based one. Then seeing a
> > syscon reboot block is normally expected to be a part of a system
> > controller and based on the discussion
> > https://lore.kernel.org/linux-pm/20200306130402.1F4F0803079F@mail.baikalelectronics.ru/
> > we decided to alter the syscon reboot driver so one would also try to fetch
> > the syscon registers map from a parental DT node. regmap property is left
> > supported although it's marked as deprecated from now.
> >
> > This patchset is rebased and tested on the mainline Linux kernel 5.7-rc4:
> > 0e698dfa2822 ("Linux 5.7-rc4")
> > tag: v5.7-rc4
> >
> > Changelog v2:
> > - Add Sebastian' Acked-by tag to patch 1.
> > - Use a shorter summary describing the bindings modification patches.
> > - Our corporate email server doesn't change Message-Id anymore, so the patchset
> > is resubmitted being in the cover-letter-threaded format.
> > - Discard patch with syscon "-endian" property support. As Rob said It shall be
> > in the common dt-schema.
> > - Replace patches of adding a regmap property support to the syscon-reboot-mode
> > with patches making syscon-reboot a sub-node of a system controller node.
> > - Mark regmap property as deprecated from now.
> >
> > Link: https://lore.kernel.org/linux-pm/20200507233846.11548-1-Sergey.Semin@baikalelectronics.ru/
> > Changelog v3:
> > - Discard the commit 6acd3ecd88ff ("dt-bindings: power: reset: Convert
> > syscon-reboot-mode to DT schema") since it has been merged in by Sebatian.
> > - Add Rob's Reviewed-by tag to the patch "dt-bindings: power: reset: Unrequire
> > regmap property in syscon-reboot node"
> >
> > Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> > Cc: Alexey Malahov <Alexey.Malahov@baikalelectronics.ru>
> > Cc: Maxim Kaurkin <Maxim.Kaurkin@baikalelectronics.ru>
> > Cc: Pavel Parkhomenko <Pavel.Parkhomenko@baikalelectronics.ru>
> > Cc: Ramil Zaripov <Ramil.Zaripov@baikalelectronics.ru>
> > Cc: Ekaterina Skachko <Ekaterina.Skachko@baikalelectronics.ru>
> > Cc: Vadim Vlasov <V.Vlasov@baikalelectronics.ru>
> > Cc: Alexey Kolotnikov <Alexey.Kolotnikov@baikalelectronics.ru>
> > Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: linux-mips@vger.kernel.org
> > Cc: devicetree@vger.kernel.org
> > Cc: linux-pm@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> >
> > Serge Semin (2):
> > dt-bindings: power: reset: Unrequire regmap property in syscon-reboot
> > node
> > power: reset: syscon-reboot: Add parental syscon support
> >
> > .../bindings/power/reset/syscon-reboot.yaml | 15 ++++++++++-----
> > drivers/power/reset/syscon-reboot.c | 7 +++++--
> > 2 files changed, 15 insertions(+), 7 deletions(-)
>
> Thanks, I queued both patches to power-supply's for-next branch.
>
> -- Sebastian
Great! Thanks.
-Sergey
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-28 8:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 13:50 [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Serge Semin
2020-05-26 13:51 ` [PATCH v3 1/2] dt-bindings: power: reset: Unrequire regmap property in syscon-reboot node Serge Semin
2020-05-26 13:51 ` [PATCH v3 2/2] power: reset: syscon-reboot: Add parental syscon support Serge Semin
2020-05-28 7:03 ` [PATCH RESEND v3 0/2] syscon: Alter syscon and reboot drivers Sebastian Reichel
2020-05-28 8:31 ` Serge Semin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).