Message ID | 20220812075603.59375-2-samuel@sholland.org |
---|---|
State | Changes Requested |
Headers | show |
Series | phy: allwinner: phy-sun6i-mipi-dphy: Add the A100 DPHY | expand |
On 12/08/2022 10:55, Samuel Holland wrote: > The sun6i DPHY can generate several interrupts, mostly for reporting > error conditions, but also for detecting BTA and UPLS sequences. > Document this capability in order to accurately describe the hardware. > > The DPHY has no interrupt number provided in the vendor documentation > because its interrupt line is shared with the DSI controller. > > Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") I don't understand what is being fixed in that commit. That commit did not have interrupts in D-PHY, so what was broken by it? The Fixes tag annotates the commit which introduced a bug. Best regards, Krzysztof
Hi Samuel, On Fri 12 Aug 22, 02:55, Samuel Holland wrote: > The sun6i DPHY can generate several interrupts, mostly for reporting > error conditions, but also for detecting BTA and UPLS sequences. > Document this capability in order to accurately describe the hardware. > > The DPHY has no interrupt number provided in the vendor documentation > because its interrupt line is shared with the DSI controller. Interesting! I do see DPHY_INT_EN*/PD* in the Allwinner BSP's drivers/media/video/sunxi-vfe/mipi_csi/dphy/dphy_reg_i.h Maybe it would be useful to import the fields in the driver so that the next person who'll try to debug DSI can use them directly? You might also want to submit a patch as [PATCH NOT FOR MERGE] that adds an interrupt routine and some useful debugging. Do you think this is also available without a DSI controller? I could just give it a try on V3/A83t here and find out :) Cheers, Paul > Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > > .../bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml > index 22636c9fdab8..cf49bd99b3e2 100644 > --- a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml > +++ b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml > @@ -24,6 +24,9 @@ properties: > reg: > maxItems: 1 > > + interrupts: > + maxItems: 1 > + > clocks: > items: > - description: Bus Clock > @@ -53,6 +56,7 @@ required: > - "#phy-cells" > - compatible > - reg > + - interrupts > - clocks > - clock-names > - resets > -- > 2.35.1 >
On Fri, 12 Aug 2022 02:55:56 -0500, Samuel Holland wrote: > The sun6i DPHY can generate several interrupts, mostly for reporting > error conditions, but also for detecting BTA and UPLS sequences. > Document this capability in order to accurately describe the hardware. > > The DPHY has no interrupt number provided in the vendor documentation > because its interrupt line is shared with the DSI controller. > > Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") > Signed-off-by: Samuel Holland <samuel@sholland.org> > --- > > .../bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 4 ++++ > 1 file changed, 4 insertions(+) > 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: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.example.dtb: d-phy@1ca1000: 'oneOf' conditional failed, one must be fixed: 'interrupts' is a required property 'interrupts-extended' is a required property From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/ This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. 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.
On 8/12/22 5:45 AM, Krzysztof Kozlowski wrote: > On 12/08/2022 10:55, Samuel Holland wrote: >> The sun6i DPHY can generate several interrupts, mostly for reporting >> error conditions, but also for detecting BTA and UPLS sequences. >> Document this capability in order to accurately describe the hardware. >> >> The DPHY has no interrupt number provided in the vendor documentation >> because its interrupt line is shared with the DSI controller. >> >> Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") > > I don't understand what is being fixed in that commit. That commit did > not have interrupts in D-PHY, so what was broken by it? > > The Fixes tag annotates the commit which introduced a bug. The binding had a bug because it did not accurately describe the hardware. If you don't think this warrants a Fixes tag, I can remove it. Or are you suggesting that the Fixes tag should instead reference the commit adding the original .txt binding? Regards, Samuel
Hi Paul, On 8/12/22 7:22 AM, Paul Kocialkowski wrote: > On Fri 12 Aug 22, 02:55, Samuel Holland wrote: >> The sun6i DPHY can generate several interrupts, mostly for reporting >> error conditions, but also for detecting BTA and UPLS sequences. >> Document this capability in order to accurately describe the hardware. >> >> The DPHY has no interrupt number provided in the vendor documentation >> because its interrupt line is shared with the DSI controller. > > Interesting! I do see DPHY_INT_EN*/PD* in the Allwinner BSP's > drivers/media/video/sunxi-vfe/mipi_csi/dphy/dphy_reg_i.h You can also find some bit of documentation in the T7 User Manual. > Maybe it would be useful to import the fields in the driver so that the > next person who'll try to debug DSI can use them directly? > > You might also want to submit a patch as [PATCH NOT FOR MERGE] that > adds an interrupt routine and some useful debugging. I think this would be more interesting to someone who knew more about MIPI CSI/DSI and understood what those errors meant. :) I'm mostly concerned with bringing up the D1 SoC at the moment. > Do you think this is also available without a DSI controller? > I could just give it a try on V3/A83t here and find out :) I would assume so. It could possibly be shared with the MIPI CSI interrupt (SPI 90) or keep its position at SPI 89. Regards, Samuel >> Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") >> Signed-off-by: Samuel Holland <samuel@sholland.org> >> --- >> >> .../bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml >> index 22636c9fdab8..cf49bd99b3e2 100644 >> --- a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml >> +++ b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml >> @@ -24,6 +24,9 @@ properties: >> reg: >> maxItems: 1 >> >> + interrupts: >> + maxItems: 1 >> + >> clocks: >> items: >> - description: Bus Clock >> @@ -53,6 +56,7 @@ required: >> - "#phy-cells" >> - compatible >> - reg >> + - interrupts >> - clocks >> - clock-names >> - resets >> -- >> 2.35.1 >> >
On 13/08/2022 01:19, Samuel Holland wrote: > On 8/12/22 5:45 AM, Krzysztof Kozlowski wrote: >> On 12/08/2022 10:55, Samuel Holland wrote: >>> The sun6i DPHY can generate several interrupts, mostly for reporting >>> error conditions, but also for detecting BTA and UPLS sequences. >>> Document this capability in order to accurately describe the hardware. >>> >>> The DPHY has no interrupt number provided in the vendor documentation >>> because its interrupt line is shared with the DSI controller. >>> >>> Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") >> >> I don't understand what is being fixed in that commit. That commit did >> not have interrupts in D-PHY, so what was broken by it? >> >> The Fixes tag annotates the commit which introduced a bug. > > The binding had a bug because it did not accurately describe the hardware. If > you don't think this warrants a Fixes tag, I can remove it. Or are you > suggesting that the Fixes tag should instead reference the commit adding the > original .txt binding? Yes, the latter. If original binding were not complete (although just "incompleteness" is not really a bug, unless it is something serious/obvious etc), then TXT commit should be the fixed one. The backports of course will not go that deep, but Fixes tag is used also for statistics which kernel release actually brought the bug. Therefore adjusting Fixes just for sake of backporting is not good - messes up with statistics. Best regards, Krzysztof
Hi Samuel, On Fri 12 Aug 22, 17:19, Samuel Holland wrote: > On 8/12/22 5:45 AM, Krzysztof Kozlowski wrote: > > On 12/08/2022 10:55, Samuel Holland wrote: > >> The sun6i DPHY can generate several interrupts, mostly for reporting > >> error conditions, but also for detecting BTA and UPLS sequences. > >> Document this capability in order to accurately describe the hardware. > >> > >> The DPHY has no interrupt number provided in the vendor documentation > >> because its interrupt line is shared with the DSI controller. > >> > >> Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") > > > > I don't understand what is being fixed in that commit. That commit did > > not have interrupts in D-PHY, so what was broken by it? > > > > The Fixes tag annotates the commit which introduced a bug. > > The binding had a bug because it did not accurately describe the hardware. [...] Coming back to this series, I don't really get the point of introducing the interrupt in the bindings and the device-tree sources if the interrupt is not required for normal operation. I would just drop it. I recall I was in the same situation for the MIPI CSI-2 controllers, which also have a dedicated interrupt but only useful for debugging/error reporting. I was asked not to introduce it back then, so I suppose the same should apply. What do you think? Cheers, Paul
Hi, On Mon 26 Sep 22, 11:28, Paul Kocialkowski wrote: > Hi Samuel, > > On Fri 12 Aug 22, 17:19, Samuel Holland wrote: > > On 8/12/22 5:45 AM, Krzysztof Kozlowski wrote: > > > On 12/08/2022 10:55, Samuel Holland wrote: > > >> The sun6i DPHY can generate several interrupts, mostly for reporting > > >> error conditions, but also for detecting BTA and UPLS sequences. > > >> Document this capability in order to accurately describe the hardware. > > >> > > >> The DPHY has no interrupt number provided in the vendor documentation > > >> because its interrupt line is shared with the DSI controller. > > >> > > >> Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") > > > > > > I don't understand what is being fixed in that commit. That commit did > > > not have interrupts in D-PHY, so what was broken by it? > > > > > > The Fixes tag annotates the commit which introduced a bug. > > > > The binding had a bug because it did not accurately describe the hardware. > > [...] > > Coming back to this series, I don't really get the point of introducing the > interrupt in the bindings and the device-tree sources if the interrupt is not > required for normal operation. I would just drop it. > > I recall I was in the same situation for the MIPI CSI-2 controllers, which also > have a dedicated interrupt but only useful for debugging/error reporting. > I was asked not to introduce it back then, so I suppose the same should apply. Coming back to this, my memories were wrong and the interrupt was in fact added to the binding and the dt description. Nevermind my previous comment, I guess it does make sense to have it in the dt hardware description even if the driver does not use it. Sorry for the noise, Paul
Hi Paul, On 8/12/22 17:44, Samuel Holland wrote: > On 8/12/22 7:22 AM, Paul Kocialkowski wrote: >> On Fri 12 Aug 22, 02:55, Samuel Holland wrote: >>> The sun6i DPHY can generate several interrupts, mostly for reporting >>> error conditions, but also for detecting BTA and UPLS sequences. >>> Document this capability in order to accurately describe the hardware. >>> >>> The DPHY has no interrupt number provided in the vendor documentation >>> because its interrupt line is shared with the DSI controller. >> >> Interesting! I do see DPHY_INT_EN*/PD* in the Allwinner BSP's >> drivers/media/video/sunxi-vfe/mipi_csi/dphy/dphy_reg_i.h > > You can also find some bit of documentation in the T7 User Manual. > >> Maybe it would be useful to import the fields in the driver so that the >> next person who'll try to debug DSI can use them directly? >> >> You might also want to submit a patch as [PATCH NOT FOR MERGE] that >> adds an interrupt routine and some useful debugging. > > I think this would be more interesting to someone who knew more about MIPI > CSI/DSI and understood what those errors meant. :) > > I'm mostly concerned with bringing up the D1 SoC at the moment. I added a trivial IRQ handler that dumps the status registers, just to verify the interrupt number, and I got several interrupts during DSI panel setup (so during DCS commands), mostly with DPHY_INT_PD0_REG = 0x03000000, signaling some sort of contention detection. >> Do you think this is also available without a DSI controller? >> I could just give it a try on V3/A83t here and find out :) > > I would assume so. It could possibly be shared with the MIPI CSI interrupt (SPI > 90) or keep its position at SPI 89. Did you get a chance to try this? I am about to send v2 of this series. I wonder if I should keep the interrupts property as required, since I don't know if the interrupt is actually hooked up on SoCs with CSI only. Regards, Samuel >>> Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") >>> Signed-off-by: Samuel Holland <samuel@sholland.org> >>> --- >>> >>> .../bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml >>> index 22636c9fdab8..cf49bd99b3e2 100644 >>> --- a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml >>> +++ b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml >>> @@ -24,6 +24,9 @@ properties: >>> reg: >>> maxItems: 1 >>> >>> + interrupts: >>> + maxItems: 1 >>> + >>> clocks: >>> items: >>> - description: Bus Clock >>> @@ -53,6 +56,7 @@ required: >>> - "#phy-cells" >>> - compatible >>> - reg >>> + - interrupts >>> - clocks >>> - clock-names >>> - resets >>> -- >>> 2.35.1 >>> >> > >
diff --git a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml index 22636c9fdab8..cf49bd99b3e2 100644 --- a/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml +++ b/Documentation/devicetree/bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml @@ -24,6 +24,9 @@ properties: reg: maxItems: 1 + interrupts: + maxItems: 1 + clocks: items: - description: Bus Clock @@ -53,6 +56,7 @@ required: - "#phy-cells" - compatible - reg + - interrupts - clocks - clock-names - resets
The sun6i DPHY can generate several interrupts, mostly for reporting error conditions, but also for detecting BTA and UPLS sequences. Document this capability in order to accurately describe the hardware. The DPHY has no interrupt number provided in the vendor documentation because its interrupt line is shared with the DSI controller. Fixes: c25b84c00826 ("dt-bindings: display: Convert Allwinner DSI to a schema") Signed-off-by: Samuel Holland <samuel@sholland.org> --- .../bindings/phy/allwinner,sun6i-a31-mipi-dphy.yaml | 4 ++++ 1 file changed, 4 insertions(+)