[PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux

Konrad Dybcio posted 4 patches 2 years, 10 months ago
[PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux
Posted by Konrad Dybcio 2 years, 10 months ago
The OnSemi NB7VPQ904M Type-C DP altmode redriver provides SBU signals
that can be used in with the gpio-sbu-mux driver. Document it.

Note that the -mux suffix is there to indicate that the gpio-sbu-mux
driver interacts with the mux part of this otherwise quite sophisticated
chip, leaving the "onnn,nb7vpq904m" compatible free for when a proper
driver taking care of all of the chip's capabilities is introduced.

Ref: https://www.onsemi.com/products/signal-conditioning-control/redrivers/nb7vpq904m

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
 Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
index bf4b1d016e1f..a7206009b691 100644
--- a/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
+++ b/Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
@@ -20,6 +20,7 @@ properties:
     items:
       - enum:
           - onnn,fsusb43l10x
+          - onnn,nb7vpq904m-mux
           - pericom,pi3usb102
       - const: gpio-sbu-mux
 

-- 
2.40.0
Re: [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux
Posted by Rob Herring 2 years, 10 months ago
On Tue, Mar 21, 2023 at 11:12:28PM +0100, Konrad Dybcio wrote:
> The OnSemi NB7VPQ904M Type-C DP altmode redriver provides SBU signals
> that can be used in with the gpio-sbu-mux driver. Document it.
> 
> Note that the -mux suffix is there to indicate that the gpio-sbu-mux
> driver interacts with the mux part of this otherwise quite sophisticated
> chip, leaving the "onnn,nb7vpq904m" compatible free for when a proper
> driver taking care of all of the chip's capabilities is introduced.

You should define a proper and complete binding. If you want to bind the 
gpio-sbu-mux driver to it now until you have a proper driver then that's 
fine. When you have such a driver, then you drop the compatible from the 
gpio-sbu-mux driver.

Note that having the fallback "gpio-sbu-mux" is somewhat problematic 
because the kernel has no mechanism to ensure you bind the most specific 
driver. For that to happen, it would have to support (automatically) 
unbinding one driver and binding to the more specific driver since one 
driver could be built-in and the other a module.

Rob
Re: [PATCH 1/4] dt-bindings: usb: gpio-sbu-mux: Add OnSemi NB7VPQ904M mux
Posted by Konrad Dybcio 2 years, 10 months ago

On 30.03.2023 17:31, Rob Herring wrote:
> On Tue, Mar 21, 2023 at 11:12:28PM +0100, Konrad Dybcio wrote:
>> The OnSemi NB7VPQ904M Type-C DP altmode redriver provides SBU signals
>> that can be used in with the gpio-sbu-mux driver. Document it.
>>
>> Note that the -mux suffix is there to indicate that the gpio-sbu-mux
>> driver interacts with the mux part of this otherwise quite sophisticated
>> chip, leaving the "onnn,nb7vpq904m" compatible free for when a proper
>> driver taking care of all of the chip's capabilities is introduced.
> 
> You should define a proper and complete binding. If you want to bind the 
> gpio-sbu-mux driver to it now until you have a proper driver then that's 
> fine. When you have such a driver, then you drop the compatible from the 
> gpio-sbu-mux driver.
Okay, that makes perfect sense and is good to know. Perhaps even worth
documenting somewhere.

I think I'll delay resending this and get an "actual" driver going.

Konrad
> 
> Note that having the fallback "gpio-sbu-mux" is somewhat problematic 
> because the kernel has no mechanism to ensure you bind the most specific 
> driver. For that to happen, it would have to support (automatically) 
> unbinding one driver and binding to the more specific driver since one 
> driver could be built-in and the other a module.
> 
> Rob