The SIE Cronos Platform Controller CPLD is a multi-purpose platform
controller that provides both a watchdog timer and an LED controller. As
both functions are provided by the same CPLD, a multi-function device is
exposed as the parent of both functions.
Add a DT binding for this device.
Signed-off-by: Shawn Anastasio <[email protected]>
---
.../bindings/mfd/sie,cronos-cpld.yaml | 67 +++++++++++++++++++
1 file changed, 67 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mfd/sie,cronos-cpld.yaml
diff --git a/Documentation/devicetree/bindings/mfd/sie,cronos-cpld.yaml b/Documentation/devicetree/bindings/mfd/sie,cronos-cpld.yaml
new file mode 100644
index 000000000000..3b59cdd46243
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/sie,cronos-cpld.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+# Copyright 2023 Raptor Engineering, LLC
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/sie,cronos-cpld.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: SIE Cronos Platform Controller CPLD multi-function device
+
+maintainers:
+ - Timothy Pearson <[email protected]>
+
+description: |
+ The SIE Cronos Platform Controller CPLD is a multi-purpose platform controller
+ that provides both a watchdog timer and an LED controller. As both functions
+ are provided by the same CPLD, a multi-function device is exposed as the
+ parent of both functions.
+
+properties:
+ compatible:
+ const: sie,cronos-cpld
+
+ reg:
+ maxItems: 1
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 1
+
+ leds:
+ type: object
+ description: Cronos Platform Status LEDs
+
+ properties:
+ compatible:
+ const: sie,cronos-leds
+
+ watchdog:
+ type: object
+ description: Cronos Platform Watchdog Timer
+
+ properties:
+ compatible:
+ const: sie,cronos-watchdog
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ cpld: cpld@3f {
+ compatible = "sie,cronos-cpld";
+ reg = <0x3f>;
+
+ watchdog {
+ compatible = "sie,cronos-watchdog";
+ };
+
+ leds {
+ compatible = "sie,cronos-leds";
+ };
+ };
--
2.30.2
On Mon, 02 Oct 2023 17:32:21 -0500, Shawn Anastasio wrote:
> The SIE Cronos Platform Controller CPLD is a multi-purpose platform
> controller that provides both a watchdog timer and an LED controller. As
> both functions are provided by the same CPLD, a multi-function device is
> exposed as the parent of both functions.
>
> Add a DT binding for this device.
>
> Signed-off-by: Shawn Anastasio <[email protected]>
> ---
> .../bindings/mfd/sie,cronos-cpld.yaml | 67 +++++++++++++++++++
> 1 file changed, 67 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/mfd/sie,cronos-cpld.yaml
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/mfd/sie,cronos-cpld.example.dts:20.11-24: Warning (reg_format): /example-0/cpld@3f:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)
Documentation/devicetree/bindings/mfd/sie,cronos-cpld.example.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/mfd/sie,cronos-cpld.example.dtb: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/mfd/sie,cronos-cpld.example.dtb: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/mfd/sie,cronos-cpld.example.dtb: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/mfd/sie,cronos-cpld.example.dtb: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/8b014f8b302f8b41c45c4f6fb114cf18e84a76fa.1696285339.git.sanastasio@raptorengineering.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
On 03/10/2023 00:32, Shawn Anastasio wrote:
> The SIE Cronos Platform Controller CPLD is a multi-purpose platform
What is SIE? Vendor prefix says sony.
What is Cronos?
> controller that provides both a watchdog timer and an LED controller. As
> both functions are provided by the same CPLD, a multi-function device is
> exposed as the parent of both functions.
A nit, subject: drop second/last, redundant "DT binding". The
"dt-bindings" prefix is already stating that these are bindings.
>
> Add a DT binding for this device.
>
> Signed-off-by: Shawn Anastasio <[email protected]>
Except that this was clearly no tested...
> ---
...
> +properties:
> + compatible:
> + const: sie,cronos-cpld
> +
> + reg:
> + maxItems: 1
> +
> + '#address-cells':
> + const: 1
Why do you need it?
> +
> + '#size-cells':
> + const: 1
Also looks unneeded.
> +
> + leds:
> + type: object
> + description: Cronos Platform Status LEDs
Missing additionalProperties:false... but anyway this is just empty. No
resources? Drop the node.
> +
> + properties:
> + compatible:
> + const: sie,cronos-leds
> +
> + watchdog:
> + type: object
> + description: Cronos Platform Watchdog Timer
> +
> + properties:
> + compatible:
> + const: sie,cronos-watchdog
No resources? Drop the node.
Best regards,
Krzysztof
On 10/3/23 4:22 AM, Krzysztof Kozlowski wrote:
> On 03/10/2023 00:32, Shawn Anastasio wrote:
>> The SIE Cronos Platform Controller CPLD is a multi-purpose platform
>
> What is SIE? Vendor prefix says sony.
>
(Repeated from my response to your reply to patch 1)
Sony Interactive Entertainment is a separate corporate entity and it's
the one that created the hardware to which this driver pertains.
> What is Cronos?
>
Sorry, I'll amend the description to clarify this. Cronos is an x86
server platform developed and deployed by SIE.
>
>> controller that provides both a watchdog timer and an LED controller. As
>> both functions are provided by the same CPLD, a multi-function device is
>> exposed as the parent of both functions.
>
> A nit, subject: drop second/last, redundant "DT binding". The
> "dt-bindings" prefix is already stating that these are bindings.
>
Will do.
>>
>> Add a DT binding for this device.
>>
>> Signed-off-by: Shawn Anastasio <[email protected]>
>
> Except that this was clearly no tested...
>
My apologies, it seems I didn't have all of the required dependencies
installed locally to enable dt binding validation. Will fix.
>> ---
>
> ...
>
>> +properties:
>> + compatible:
>> + const: sie,cronos-cpld
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + '#address-cells':
>> + const: 1
>
> Why do you need it?
>
>> +
>> + '#size-cells':
>> + const: 1
>
> Also looks unneeded.
>
These were inherited from an existing dt binding in the tree that I used
as a reference. I'll drop them both at your request.
>> +
>> + leds:
>> + type: object
>> + description: Cronos Platform Status LEDs
>
> Missing additionalProperties:false... but anyway this is just empty. No
> resources? Drop the node.
>
Having nodes for the leds and the watchdog allows the two independent
functions to be enabled/disabled in the device tree by adding/removing
the relevant object. Would it be more idiomatic to instead introduce
properties to the parent sie,cronos-cpld object to toggle these
functions?
>> +
>> + properties:
>> + compatible:
>> + const: sie,cronos-leds
>> +
>> + watchdog:
>> + type: object
>> + description: Cronos Platform Watchdog Timer
>> +
>> + properties:
>> + compatible:
>> + const: sie,cronos-watchdog
>
> No resources? Drop the node.
>
Same question as above.
> Best regards,
> Krzysztof
Thanks,
Shawn
On 09/10/2023 23:04, Shawn Anastasio wrote:
>>> +
>>> + leds:
>>> + type: object
>>> + description: Cronos Platform Status LEDs
>>
>> Missing additionalProperties:false... but anyway this is just empty. No
>> resources? Drop the node.
>>
>
> Having nodes for the leds and the watchdog allows the two independent
> functions to be enabled/disabled in the device tree by adding/removing
> the relevant object. Would it be more idiomatic to instead introduce
> properties to the parent sie,cronos-cpld object to toggle these
> functions?
And why DT should be used to enable/disable them? Or are you suggesting
you have different devices under the same compatible?
Best regards,
Krzysztof