Message ID | 20240923225719.2999821-2-chris.packham@alliedtelesis.co.nz (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | mips: realtek: Add reboot support | expand |
On Tue, Sep 24, 2024 at 10:57:17AM +1200, Chris Packham wrote: > Add device tree schema for the Realtek switch. Currently the only > supported feature is the syscon-reboot which is needed to be able to > reboot the board. > > Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> > --- Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof
On 24/09/2024 10:39, Krzysztof Kozlowski wrote: > On Tue, Sep 24, 2024 at 10:57:17AM +1200, Chris Packham wrote: >> Add device tree schema for the Realtek switch. Currently the only >> supported feature is the syscon-reboot which is needed to be able to >> reboot the board. >> >> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> >> --- > > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> > Unreviewed - it is incomplete! No, we said multiple times, you must send complete binding. Sending pieces for review does not give us full picture and hides parts of the controversial decisions. If you want to go this way, next time you will get NAK when adding i2c@0-7 to parent binding. Best regards, Krzysztof
Hi Krzysztof, On 24/09/24 20:51, Krzysztof Kozlowski wrote: > On 24/09/2024 10:39, Krzysztof Kozlowski wrote: >> On Tue, Sep 24, 2024 at 10:57:17AM +1200, Chris Packham wrote: >>> Add device tree schema for the Realtek switch. Currently the only >>> supported feature is the syscon-reboot which is needed to be able to >>> reboot the board. >>> >>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> >>> --- >> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> >> > Unreviewed - it is incomplete! > > No, we said multiple times, you must send complete binding. Sending > pieces for review does not give us full picture and hides parts of the > controversial decisions. If you want to go this way, next time you will > get NAK when adding i2c@0-7 to parent binding. > Fair enough. I did already get myself tied in knots trying to juggle two dependent series. I thought I was making things easier to review by sending them in smaller chunks but obviously I'm holding things back that are relevant for context. So just to be clear, one binding in mfd that covers the reboot and i2c for the 4 variants? That's about as much as I can actually test driver wise. I could add the mdio and switch ports but I'm not at a point where I could really test them properly. I know the binding doesn't necessarily need code to be able to describe the hardware but it does run the risk that I might miss something in the binding that I need when I do get to the driver code. I also did want to say thanks for your patience. It may not seem like it but I really do appreciate your feedback and I do try to take it all on board. > Best regards, > Krzysztof >
On 24/09/2024 22:56, Chris Packham wrote: > Hi Krzysztof, > > On 24/09/24 20:51, Krzysztof Kozlowski wrote: >> On 24/09/2024 10:39, Krzysztof Kozlowski wrote: >>> On Tue, Sep 24, 2024 at 10:57:17AM +1200, Chris Packham wrote: >>>> Add device tree schema for the Realtek switch. Currently the only >>>> supported feature is the syscon-reboot which is needed to be able to >>>> reboot the board. >>>> >>>> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> >>>> --- >>> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> >>> >> Unreviewed - it is incomplete! >> >> No, we said multiple times, you must send complete binding. Sending >> pieces for review does not give us full picture and hides parts of the >> controversial decisions. If you want to go this way, next time you will >> get NAK when adding i2c@0-7 to parent binding. >> > Fair enough. > > I did already get myself tied in knots trying to juggle two dependent > series. I thought I was making things easier to review by sending them > in smaller chunks but obviously I'm holding things back that are > relevant for context. Pieces of chunks works fine for drivers, but bindings is an exception here: if possible, we want to see entire hardware description. > > So just to be clear, one binding in mfd that covers the reboot and i2c > for the 4 variants? That's about as much as I can actually test driver wise. This can be multiple binding files, multiple patches (organized in bisectable way)... Not sure about what you ask here. > > I could add the mdio and switch ports but I'm not at a point where I > could really test them properly. I know the binding doesn't necessarily > need code to be able to describe the hardware but it does run the risk > that I might miss something in the binding that I need when I do get to > the driver code. OK, MDIO/switch ports can be skipped. Skip anything which you do not know how it looks or works yet. But in the case of MFD and I2C, you already had everything available. > > I also did want to say thanks for your patience. It may not seem like it > but I really do appreciate your feedback and I do try to take it all on > board. No worries, you are doing a great job, I appreciate it. I probably sound harsher than intended. Best regards, Krzysztof
diff --git a/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml new file mode 100644 index 000000000000..2d20dd07a7e9 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/realtek,rtl9302c-switch.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Realtek Switch with Internal CPU + +maintainers: + - Chris Packham <chris.packham@alliedtelesis.co.nz> + +description: + The RTL9302 is an Ethernet switch with an integrated CPU. A number of + different peripherals are accessed through a common register block, + represented here as a syscon node. + +properties: + compatible: + items: + - enum: + - realtek,rtl9302c-switch + - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + + reboot: + $ref: /schemas/power/reset/syscon-reboot.yaml# + +required: + - compatible + - reg + - reboot + +additionalProperties: false + +examples: + - | + ethernet-switch@1b000000 { + compatible = "realtek,rtl9302c-switch", "syscon", "simple-mfd"; + reg = <0x1b000000 0x10000>; + + reboot { + compatible = "syscon-reboot"; + offset = <0x0c>; + value = <0x01>; + }; + }; +
Add device tree schema for the Realtek switch. Currently the only supported feature is the syscon-reboot which is needed to be able to reboot the board. Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> --- Notes: Changes in v3: - fix schema id to match filename Changes in v2: - use filename that matches the compatible - put maintainers after title - remove unnecessary label in example - Rework description to focus on what is implemented rather than what may be implemented in the future. .../bindings/mfd/realtek,rtl9302c-switch.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/realtek,rtl9302c-switch.yaml