diff mbox series

[01/18] dt-bindings: vendor-prefixes: add AAPL prefix

Message ID 20210204203951.52105-2-marcan@marcan.st (mailing list archive)
State Changes Requested
Headers show
Series Apple M1 SoC platform bring-up | expand

Commit Message

Hector Martin Feb. 4, 2021, 8:39 p.m. UTC
Amusingly, this wasn't yet documented, even though this vendor prefix
has been used since time immemorial on PPC.

Signed-off-by: Hector Martin <marcan@marcan.st>
---
 Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
 1 file changed, 2 insertions(+)

Comments

Krzysztof Kozlowski Feb. 8, 2021, 10:27 a.m. UTC | #1
On Fri, Feb 05, 2021 at 05:39:34AM +0900, Hector Martin wrote:
> Amusingly, this wasn't yet documented, even though this vendor prefix
> has been used since time immemorial on PPC.
> 
> Signed-off-by: Hector Martin <marcan@marcan.st>
> ---
>  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> index 041ae90b0d8f..d7950c723472 100644
> --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> @@ -25,6 +25,8 @@ patternProperties:
>    # Keep list in alphabetical order.
>    "^70mai,.*":
>      description: 70mai Co., Ltd.
> +  "^AAPL,.*":

All prefixes are lower case... see ABB below (not mentioning that the
company name is not APPLE), so just "apple".

> +    description: Apple Inc.
>    "^abb,.*":
>      description: ABB

Best regards,
Krzysztof
Rob Herring Feb. 8, 2021, 5:32 p.m. UTC | #2
On Mon, Feb 08, 2021 at 11:27:30AM +0100, Krzysztof Kozlowski wrote:
> On Fri, Feb 05, 2021 at 05:39:34AM +0900, Hector Martin wrote:
> > Amusingly, this wasn't yet documented, even though this vendor prefix
> > has been used since time immemorial on PPC.
> > 
> > Signed-off-by: Hector Martin <marcan@marcan.st>
> > ---
> >  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> > index 041ae90b0d8f..d7950c723472 100644
> > --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> > +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> > @@ -25,6 +25,8 @@ patternProperties:
> >    # Keep list in alphabetical order.
> >    "^70mai,.*":
> >      description: 70mai Co., Ltd.
> > +  "^AAPL,.*":
> 
> All prefixes are lower case... see ABB below (not mentioning that the
> company name is not APPLE), so just "apple".

Grep the kernel tree for 'AAPL,'. It comes from the the ticker symbol 
which early on was the preferred form, but we've tended to move away 
from that. The DT Apple ships (which is *very* different) uses both 
forms.

So keep what exists already or have old AAPL and new apple?

Rob
Krzysztof Kozlowski Feb. 8, 2021, 6:12 p.m. UTC | #3
On Mon, Feb 08, 2021 at 11:32:15AM -0600, Rob Herring wrote:
> On Mon, Feb 08, 2021 at 11:27:30AM +0100, Krzysztof Kozlowski wrote:
> > On Fri, Feb 05, 2021 at 05:39:34AM +0900, Hector Martin wrote:
> > > Amusingly, this wasn't yet documented, even though this vendor prefix
> > > has been used since time immemorial on PPC.
> > > 
> > > Signed-off-by: Hector Martin <marcan@marcan.st>
> > > ---
> > >  Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> > > index 041ae90b0d8f..d7950c723472 100644
> > > --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
> > > +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
> > > @@ -25,6 +25,8 @@ patternProperties:
> > >    # Keep list in alphabetical order.
> > >    "^70mai,.*":
> > >      description: 70mai Co., Ltd.
> > > +  "^AAPL,.*":
> > 
> > All prefixes are lower case... see ABB below (not mentioning that the
> > company name is not APPLE), so just "apple".
> 
> Grep the kernel tree for 'AAPL,'.

I know it's the ticker, but the point was - we don't use tickers here
for none of other platforms.

Mentioned grep brings only one result:
arch/powerpc/platforms/powermac/pic.c:   * cases where the APPL,interrupts property is completely

so hardly an argument for backwards consistency, within the kernel.

On the other hand, some DTs for iPhones mention "apple", not APPL:
https://www.theiphonewiki.com/wiki/D211AP/Device_Tree
https://www.theiphonewiki.com/wiki/D331AP/Device_Tree
https://gist.github.com/bazad/1faef1a6fe396b820a43170b43e38be1

Although I am not sure how reliable are the sources.

> It comes from the the ticker symbol 
> which early on was the preferred form, but we've tended to move away 
> from that. The DT Apple ships (which is *very* different) uses both 
> forms.
> 
> So keep what exists already or have old AAPL and new apple?

Hectore mention old PowerPC Apple sources were using the APPL, but it
seems they did not end up here. What would be the point to stick to the
old prefix if we cannot find it?

Maybe they exists in other systems? I could not find such in latest
FreeBSD, but there were not many DTSes inside.

Best regards,
Krzysztof
Arnd Bergmann Feb. 8, 2021, 7:59 p.m. UTC | #4
On Mon, Feb 8, 2021 at 7:12 PM Krzysztof Kozlowski <krzk@kernel.org> wrote:
 On Mon, Feb 08, 2021 at 11:32:15AM -0600, Rob Herring wrote:
> > On Mon, Feb 08, 2021 at 11:27:30AM +0100, Krzysztof Kozlowski wrote:
> so hardly an argument for backwards consistency, within the kernel.
>
> On the other hand, some DTs for iPhones mention "apple", not APPL:
> https://www.theiphonewiki.com/wiki/D211AP/Device_Tree
> https://www.theiphonewiki.com/wiki/D331AP/Device_Tree
> https://gist.github.com/bazad/1faef1a6fe396b820a43170b43e38be1
>
> Although I am not sure how reliable are the sources.

For reference, these are the examples I see in the device tree dump for the
mac mini:

      AAPL,unit-string = "00000000";
      AAPL,slot-name = "Slot- 1";
      device_type = "AAPL,display-crossbar";
      device_type = "AAPL,atc-dpxbar";
      device_type = "AAPL,atc-dpphy";
      device_type = "AAPL,atc-dpin";

In addition, every node has a AAPL,phandle property (corresponding to
linux,phandle), and some have a AAPL,unit-string.

As in the iphones, only the cpu nodes do use "apple,".

       Arnd
Hector Martin Feb. 8, 2021, 11:17 p.m. UTC | #5
On 09/02/2021 03.12, Krzysztof Kozlowski wrote:
> Mentioned grep brings only one result:
> arch/powerpc/platforms/powermac/pic.c:   * cases where the APPL,interrupts property is completely

You want to grep for 'AAPL', not 'APPL' :-)
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 041ae90b0d8f..d7950c723472 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -25,6 +25,8 @@  patternProperties:
   # Keep list in alphabetical order.
   "^70mai,.*":
     description: 70mai Co., Ltd.
+  "^AAPL,.*":
+    description: Apple Inc.
   "^abb,.*":
     description: ABB
   "^abilis,.*":