From: "André Przywara" <andre.przywara@arm.com>
To: Rob Herring <robh@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Maxime Ripard <mripard@kernel.org>,
Robert Richter <rric@kernel.org>,
soc@kernel.org, Jon Loeliger <jdl@jdl.com>,
Mark Langsdorf <mlangsdo@redhat.com>,
Eric Auger <eric.auger@redhat.com>, Will Deacon <will@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Corey Minyard <minyard@acm.org>,
openipmi-developer@lists.sourceforge.net
Subject: Re: [PATCH v2 11/13] dt-bindings: ipmi: Convert IPMI-SMIC bindings to json-schema
Date: Fri, 28 Feb 2020 00:21:31 +0000 [thread overview]
Message-ID: <270389bf-3a6e-6e89-624f-006cace493ae@arm.com> (raw)
In-Reply-To: <20200227222145.GF26010@bogus>
On 27/02/2020 22:21, Rob Herring wrote:
Hi,
> On Thu, Feb 27, 2020 at 06:22:08PM +0000, Andre Przywara wrote:
>> Convert the generic IPMI controller bindings to DT schema format
>> using json-schema.
>>
>> I removed the formerly mandatory device-type property, since this
>> is deprecated in the DT spec, except for the legacy CPU and memory
>> nodes.
>
> Yes, but it is still used by the ipmi driver to match on, so we should
> keep it.
Oh, indeed, I missed that. Should we:
- Remove the .type field from the driver.
- Mark/comment this as deprecated in the bindings, but
- Keep in it in the DTs.
to limit proliferation of device_type usage?
>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> Cc: Corey Minyard <minyard@acm.org>
>> Cc: openipmi-developer@lists.sourceforge.net
>> ---
>> .../devicetree/bindings/ipmi/ipmi-smic.txt | 25 ---------
>> .../devicetree/bindings/ipmi/ipmi-smic.yaml | 56 +++++++++++++++++++
>> 2 files changed, 56 insertions(+), 25 deletions(-)
>> delete mode 100644 Documentation/devicetree/bindings/ipmi/ipmi-smic.txt
>> create mode 100644 Documentation/devicetree/bindings/ipmi/ipmi-smic.yaml
>>
>> diff --git a/Documentation/devicetree/bindings/ipmi/ipmi-smic.txt b/Documentation/devicetree/bindings/ipmi/ipmi-smic.txt
>> deleted file mode 100644
>> index d5f1a877ed3e..000000000000
>> --- a/Documentation/devicetree/bindings/ipmi/ipmi-smic.txt
>> +++ /dev/null
>> @@ -1,25 +0,0 @@
>> -IPMI device
>> -
>> -Required properties:
>> -- compatible: should be one of ipmi-kcs, ipmi-smic, or ipmi-bt
>> -- device_type: should be ipmi
>> -- reg: Address and length of the register set for the device
>> -
>> -Optional properties:
>> -- interrupts: The interrupt for the device. Without this the interface
>> - is polled.
>> -- reg-size - The size of the register. Defaults to 1
>> -- reg-spacing - The number of bytes between register starts. Defaults to 1
>> -- reg-shift - The amount to shift the registers to the right to get the data
>> - into bit zero.
>> -
>> -Example:
>> -
>> -smic@fff3a000 {
>> - compatible = "ipmi-smic";
>> - device_type = "ipmi";
>> - reg = <0xfff3a000 0x1000>;
>> - interrupts = <0 24 4>;
>> - reg-size = <4>;
>> - reg-spacing = <4>;
>> -};
>> diff --git a/Documentation/devicetree/bindings/ipmi/ipmi-smic.yaml b/Documentation/devicetree/bindings/ipmi/ipmi-smic.yaml
>> new file mode 100644
>> index 000000000000..c859e0e959b9
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/ipmi/ipmi-smic.yaml
>> @@ -0,0 +1,56 @@
>> +# SPDX-License-Identifier: GPL-2.0
>
> Anything I wrote which should be most of the series, you can relicense
> to:
>
> (GPL-2.0-only OR BSD-2-Clause)
Oh, good point. I copied the header from some file I picked.
>
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/ipmi/ipmi-smic.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: IPMI device bindings
>> +
>> +description: IPMI device bindings
>> +
>> +maintainers:
>> + - Corey Minyard <cminyard@mvista.com>
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - ipmi-kcs
>> + - ipmi-smic
>> + - ipmi-bt
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts:
>> + description: Interface is polled if this property is omitted.
>> + maxItems: 1
>> +
>> + reg-size:
>> + description: The access width of the register in bytes. Defaults to 1.
>> + allOf:
>> + - $ref: /schemas/types.yaml#/definitions/uint32
>> + - enum: [1, 2, 4, 8]
>
> Does 8 really work?
The driver supports it, at least on architectures providing readq.
>
>> +
>> + reg-spacing:
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + description: The number of bytes between register starts. Defaults to 1.
>> +
>> + reg-shift:
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + description: |
>> + The amount of bits to shift the register content to the right to get
>> + the data into bit zero.
>
> either 24 or 56 would be the max, right?
True, will limit this to 56.
Thanks!
Andre
>
>> +
>> +required:
>> + - compatible
>> + - reg
>> +
>> +examples:
>> + - |
>> + smic@fff3a000 {
>> + compatible = "ipmi-smic";
>> + reg = <0xfff3a000 0x1000>;
>> + interrupts = <0 24 4>;
>> + reg-size = <4>;
>> + reg-spacing = <4>;
>> + };
>> --
>> 2.17.1
>>
next prev parent reply other threads:[~2020-02-28 0:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 18:21 [PATCH v2 00/13] arm: calxeda: update DTS, bindings and MAINTAINERS Andre Przywara
2020-02-27 18:21 ` [PATCH v2 01/13] arm: dts: calxeda: Basic DT file fixes Andre Przywara
2020-02-27 21:42 ` Rob Herring
2020-02-27 18:21 ` [PATCH v2 02/13] arm: dts: calxeda: Provide UART clock Andre Przywara
2020-02-27 21:43 ` Rob Herring
2020-02-27 18:22 ` [PATCH v2 03/13] arm: dts: calxeda: Fix interrupt grouping Andre Przywara
2020-02-27 21:45 ` Rob Herring
2020-02-27 18:22 ` [PATCH v2 04/13] arm: dts: calxeda: Group port-phys and sgpio-gpio items Andre Przywara
2020-02-27 21:45 ` Rob Herring
2020-02-27 18:22 ` [PATCH v2 05/13] dt-bindings: clock: Convert Calxeda clock bindings to json-schema Andre Przywara
2020-02-27 18:22 ` [PATCH v2 06/13] dt-bindings: sata: Convert Calxeda SATA controller " Andre Przywara
2020-02-27 22:05 ` Rob Herring
2020-02-27 18:22 ` [PATCH v2 07/13] dt-bindings: net: Convert Calxeda Ethernet binding " Andre Przywara
2020-02-27 18:22 ` [PATCH v2 08/13] dt-bindings: phy: Convert Calxeda ComboPHY " Andre Przywara
2020-02-27 18:22 ` [PATCH v2 09/13] dt-bindings: arm: Convert Calxeda L2 cache controller " Andre Przywara
2020-02-27 18:22 ` [PATCH v2 10/13] dt-bindings: memory-controllers: Convert Calxeda DDR " Andre Przywara
2020-02-27 18:22 ` [PATCH v2 11/13] dt-bindings: ipmi: Convert IPMI-SMIC bindings " Andre Przywara
2020-02-27 22:21 ` Rob Herring
2020-02-28 0:21 ` André Przywara [this message]
2020-02-27 18:22 ` [PATCH v2 12/13] dt-bindings: arm: Add Calxeda system registers json-schema binding Andre Przywara
2020-02-27 22:22 ` Rob Herring
2020-02-27 18:22 ` [PATCH v2 13/13] MAINTAINERS: Update Calxeda Highbank maintainership Andre Przywara
2020-02-27 22:35 ` Rob Herring
2020-02-28 0:39 ` Olof Johansson
2020-02-28 11:53 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=270389bf-3a6e-6e89-624f-006cace493ae@arm.com \
--to=andre.przywara@arm.com \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=eric.auger@redhat.com \
--cc=jdl@jdl.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=mlangsdo@redhat.com \
--cc=mripard@kernel.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=robh@kernel.org \
--cc=rric@kernel.org \
--cc=soc@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).