Message ID | 20220115093557.30498-1-alexander.stein@mailbox.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] arm64: dts: meson-axg: add missing reset-names property | expand |
On Sat 15 Jan 2022 at 10:35, Alexander Stein <alexander.stein@mailbox.org> wrote: > Bindings amlogic,axg-fifo.txt mandates that reset-names is a required > property. Add it. Binginds *mandates* ?? the bindings you are adding mandates that, not the previous doc, nor the driver. Modifying drivers and DT to accomodate made-up bindings requirement is disturbing. The bindings should not require that because the driver does not, as it stands. The driver requires the arb reset to be provided, not the name. Please fix the bindings. > > Signed-off-by: Alexander Stein <alexander.stein@mailbox.org> > --- > This is essentially a preparation for YAML conversion to fix the > warnings. > > arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > index 3f5254eeb47b..b14175e2f1d6 100644 > --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi > @@ -1333,6 +1333,7 @@ toddr_a: audio-controller@100 { > interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>; > clocks = <&clkc_audio AUD_CLKID_TODDR_A>; > resets = <&arb AXG_ARB_TODDR_A>; > + reset-names = "arb"; > amlogic,fifo-depth = <512>; > status = "disabled"; > }; > @@ -1345,6 +1346,7 @@ toddr_b: audio-controller@140 { > interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>; > clocks = <&clkc_audio AUD_CLKID_TODDR_B>; > resets = <&arb AXG_ARB_TODDR_B>; > + reset-names = "arb"; > amlogic,fifo-depth = <256>; > status = "disabled"; > }; > @@ -1357,6 +1359,7 @@ toddr_c: audio-controller@180 { > interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>; > clocks = <&clkc_audio AUD_CLKID_TODDR_C>; > resets = <&arb AXG_ARB_TODDR_C>; > + reset-names = "arb"; > amlogic,fifo-depth = <256>; > status = "disabled"; > }; > @@ -1369,6 +1372,7 @@ frddr_a: audio-controller@1c0 { > interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>; > clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; > resets = <&arb AXG_ARB_FRDDR_A>; > + reset-names = "arb"; > amlogic,fifo-depth = <512>; > status = "disabled"; > }; > @@ -1381,6 +1385,7 @@ frddr_b: audio-controller@200 { > interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>; > clocks = <&clkc_audio AUD_CLKID_FRDDR_B>; > resets = <&arb AXG_ARB_FRDDR_B>; > + reset-names = "arb"; > amlogic,fifo-depth = <256>; > status = "disabled"; > }; > @@ -1393,6 +1398,7 @@ frddr_c: audio-controller@240 { > interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>; > clocks = <&clkc_audio AUD_CLKID_FRDDR_C>; > resets = <&arb AXG_ARB_FRDDR_C>; > + reset-names = "arb"; > amlogic,fifo-depth = <256>; > status = "disabled"; > };
Am Samstag, 15. Januar 2022, 16:04:10 CET schrieb Jerome Brunet: > > On Sat 15 Jan 2022 at 10:35, Alexander Stein <alexander.stein@mailbox.org> wrote: > > > Bindings amlogic,axg-fifo.txt mandates that reset-names is a required > > property. Add it. > > Binginds *mandates* ?? the bindings you are adding mandates that, not the > previous doc, nor the driver. Well, under required properties 'reset-names' is listed as well as 'arb' is required, only 'rst' is optional. So when creating the .yaml accordingly this leads to warnings this patch is about to fix. > Modifying drivers and DT to accomodate made-up bindings requirement is > disturbing. > > The bindings should not require that because the driver does not, as it > stands. The driver requires the arb reset to be provided, not the name. > Please fix the bindings. Nothing is made up. When creating the .yaml file I took the .txt documentation for granted. How should I know the bindings documentation is apparently wrong? When using your older bindings conversion [1] I'm fine with dropping this one. Best regards, Alexander [1] https://patchwork.kernel.org/project/linux-amlogic/list/? series=246453&state=%2A&archive=both
On Sun 16 Jan 2022 at 10:49, Alexander Stein <alexander.stein@mailbox.org> wrote: > Am Samstag, 15. Januar 2022, 16:04:10 CET schrieb Jerome Brunet: >> >> On Sat 15 Jan 2022 at 10:35, Alexander Stein <alexander.stein@mailbox.org> > wrote: >> >> > Bindings amlogic,axg-fifo.txt mandates that reset-names is a required >> > property. Add it. >> >> Binginds *mandates* ?? the bindings you are adding mandates that, not the >> previous doc, nor the driver. > > Well, under required properties 'reset-names' is listed as well as 'arb' is > required, only 'rst' is optional. I think there is a misunderstanding then. The arb reset is required, the "reset-names" is not - as long as there is single reset. > So when creating the .yaml accordingly this leads to warnings this patch is > about to fix. > >> Modifying drivers and DT to accomodate made-up bindings requirement is >> disturbing. >> >> The bindings should not require that because the driver does not, as it >> stands. The driver requires the arb reset to be provided, not the name. >> Please fix the bindings. > > Nothing is made up. When creating the .yaml file I took the .txt documentation > for granted. How should I know the bindings documentation is apparently wrong? > > When using your older bindings conversion [1] I'm fine with dropping this one. > > Best regards, > Alexander > > [1] https://patchwork.kernel.org/project/linux-amlogic/list/? > series=246453&state=%2A&archive=both
Hi, On 16/01/2022 18:30, Jerome Brunet wrote: > > On Sun 16 Jan 2022 at 10:49, Alexander Stein <alexander.stein@mailbox.org> wrote: > >> Am Samstag, 15. Januar 2022, 16:04:10 CET schrieb Jerome Brunet: >>> >>> On Sat 15 Jan 2022 at 10:35, Alexander Stein <alexander.stein@mailbox.org> >> wrote: >>> >>>> Bindings amlogic,axg-fifo.txt mandates that reset-names is a required >>>> property. Add it. >>> >>> Binginds *mandates* ?? the bindings you are adding mandates that, not the >>> previous doc, nor the driver. >> >> Well, under required properties 'reset-names' is listed as well as 'arb' is >> required, only 'rst' is optional. > > I think there is a misunderstanding then. > The arb reset is required, the "reset-names" is not - as long as there > is single reset. To be fair, it's not explicit in the .txt bindings at all: -- reset-names: should contain the following: - * "arb" : memory ARB line (required) - * "rst" : dedicated device reset line (optional) Anyway, this should be solved, it's pretty common to have reset-names mandatory even for a single reset if a second one is optional. > >> So when creating the .yaml accordingly this leads to warnings this patch is >> about to fix. >> >>> Modifying drivers and DT to accomodate made-up bindings requirement is >>> disturbing. >>> >>> The bindings should not require that because the driver does not, as it >>> stands. The driver requires the arb reset to be provided, not the name. >>> Please fix the bindings. >> >> Nothing is made up. When creating the .yaml file I took the .txt documentation >> for granted. How should I know the bindings documentation is apparently wrong? >> >> When using your older bindings conversion [1] I'm fine with dropping this one. >> >> Best regards, >> Alexander >> >> [1] https://patchwork.kernel.org/project/linux-amlogic/list/? >> series=246453&state=%2A&archive=both >
On Mon 17 Jan 2022 at 10:49, Neil Armstrong <narmstrong@baylibre.com> wrote: > Hi, > > On 16/01/2022 18:30, Jerome Brunet wrote: >> >> On Sun 16 Jan 2022 at 10:49, Alexander Stein <alexander.stein@mailbox.org> wrote: >> >>> Am Samstag, 15. Januar 2022, 16:04:10 CET schrieb Jerome Brunet: >>>> >>>> On Sat 15 Jan 2022 at 10:35, Alexander Stein <alexander.stein@mailbox.org> >>> wrote: >>>> >>>>> Bindings amlogic,axg-fifo.txt mandates that reset-names is a required >>>>> property. Add it. >>>> >>>> Binginds *mandates* ?? the bindings you are adding mandates that, not the >>>> previous doc, nor the driver. >>> >>> Well, under required properties 'reset-names' is listed as well as 'arb' is >>> required, only 'rst' is optional. >> >> I think there is a misunderstanding then. >> The arb reset is required, the "reset-names" is not - as long as there >> is single reset. > > To be fair, it's not explicit in the .txt bindings at all: > - resets: list of reset phandle, one for each entry reset-names. > -- reset-names: should contain the following: > - * "arb" : memory ARB line (required) > - * "rst" : dedicated device reset line (optional) That was fairly usual way to describe clocks and reset with txt files but I agree it could have been interpreted the other way around > > Anyway, this should be solved, it's pretty common to have reset-names mandatory even > for a single reset if a second one is optional. Binding should not decribe what's common but how the binding is supposed to be used. Fact is the usage was defined by the first and only user which is linux driver. This driver does not care if the arb name is present or not. Mandating something which is unused makes no sense. If we want to be precise, then it just cares it is the first reset is the arb one (and yes, this constraint is not described either). The reason for that is simple, there was no 'rst' line on first version of the IP, and it was 'fairly usual' to not have 'reset-names' when there is a single reset. If you think the 'arb' name should be made mandatory, that's fine by me but one should be able to rely on the name so the driver should be updated to use it. > >> >>> So when creating the .yaml accordingly this leads to warnings this patch is >>> about to fix. >>> >>>> Modifying drivers and DT to accomodate made-up bindings requirement is >>>> disturbing. >>>> >>>> The bindings should not require that because the driver does not, as it >>>> stands. The driver requires the arb reset to be provided, not the name. >>>> Please fix the bindings. >>> >>> Nothing is made up. When creating the .yaml file I took the .txt documentation >>> for granted. How should I know the bindings documentation is apparently wrong? >>> >>> When using your older bindings conversion [1] I'm fine with dropping this one. >>> >>> Best regards, >>> Alexander >>> >>> [1] https://patchwork.kernel.org/project/linux-amlogic/list/? >>> series=246453&state=%2A&archive=both >>
diff --git a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi index 3f5254eeb47b..b14175e2f1d6 100644 --- a/arch/arm64/boot/dts/amlogic/meson-axg.dtsi +++ b/arch/arm64/boot/dts/amlogic/meson-axg.dtsi @@ -1333,6 +1333,7 @@ toddr_a: audio-controller@100 { interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>; clocks = <&clkc_audio AUD_CLKID_TODDR_A>; resets = <&arb AXG_ARB_TODDR_A>; + reset-names = "arb"; amlogic,fifo-depth = <512>; status = "disabled"; }; @@ -1345,6 +1346,7 @@ toddr_b: audio-controller@140 { interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>; clocks = <&clkc_audio AUD_CLKID_TODDR_B>; resets = <&arb AXG_ARB_TODDR_B>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; }; @@ -1357,6 +1359,7 @@ toddr_c: audio-controller@180 { interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>; clocks = <&clkc_audio AUD_CLKID_TODDR_C>; resets = <&arb AXG_ARB_TODDR_C>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; }; @@ -1369,6 +1372,7 @@ frddr_a: audio-controller@1c0 { interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>; clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; resets = <&arb AXG_ARB_FRDDR_A>; + reset-names = "arb"; amlogic,fifo-depth = <512>; status = "disabled"; }; @@ -1381,6 +1385,7 @@ frddr_b: audio-controller@200 { interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>; clocks = <&clkc_audio AUD_CLKID_FRDDR_B>; resets = <&arb AXG_ARB_FRDDR_B>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; }; @@ -1393,6 +1398,7 @@ frddr_c: audio-controller@240 { interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>; clocks = <&clkc_audio AUD_CLKID_FRDDR_C>; resets = <&arb AXG_ARB_FRDDR_C>; + reset-names = "arb"; amlogic,fifo-depth = <256>; status = "disabled"; };
Bindings amlogic,axg-fifo.txt mandates that reset-names is a required property. Add it. Signed-off-by: Alexander Stein <alexander.stein@mailbox.org> --- This is essentially a preparation for YAML conversion to fix the warnings. arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 6 ++++++ 1 file changed, 6 insertions(+)