mbox series

[v1,0/5] Add Toradex Verdin AM62

Message ID 20230524143631.42471-1-francesco@dolcini.it
Headers show
Series Add Toradex Verdin AM62 | expand

Message

Francesco Dolcini May 24, 2023, 2:36 p.m. UTC
From: Francesco Dolcini <francesco.dolcini@toradex.com>

This series adds support for the Toradex Verdin AM62 SoM which can be used on
different carrier boards (Verdin Development Board, Dahlia and Yavia).

The module consists of an TI AM62 family SoC (either AM623 or AM625), a
TPS65219 PMIC, a Gigabit Ethernet PHY, 512MB to 2GB of LPDDR4 RAM, an eMMC, a
TLA2024 ADC, an I2C EEPROM, an RX8130 RTC, and optional Parallel RGB to MIPI
DSI bridge plus an optional Bluetooth/Wi-Fi module.

Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62

Francesco Dolcini (5):
  dt-bindings: arm: ti: add toradex,verdin-am62 et al.
  arm64: defconfig: enable drivers for Verdin AM62
  arm64: dts: ti: add verdin am62
  arm64: dts: ti: add verdin am62 dahlia
  arm64: dts: ti: add verdin am62 yavia

 .../devicetree/bindings/arm/ti/k3.yaml        |   20 +
 arch/arm64/boot/dts/ti/Makefile               |    6 +
 .../boot/dts/ti/k3-am62-verdin-dahlia.dtsi    |  214 +++
 .../arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi |  233 +++
 .../boot/dts/ti/k3-am62-verdin-nonwifi.dtsi   |   16 +
 .../boot/dts/ti/k3-am62-verdin-wifi.dtsi      |   36 +
 .../boot/dts/ti/k3-am62-verdin-yavia.dtsi     |  202 +++
 arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi    | 1400 +++++++++++++++++
 .../dts/ti/k3-am625-verdin-nonwifi-dahlia.dts |   19 +
 .../dts/ti/k3-am625-verdin-nonwifi-dev.dts    |   19 +
 .../dts/ti/k3-am625-verdin-nonwifi-yavia.dts  |   19 +
 .../dts/ti/k3-am625-verdin-wifi-dahlia.dts    |   19 +
 .../boot/dts/ti/k3-am625-verdin-wifi-dev.dts  |   19 +
 .../dts/ti/k3-am625-verdin-wifi-yavia.dts     |   19 +
 arch/arm64/configs/defconfig                  |    3 +
 15 files changed, 2244 insertions(+)
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-dahlia.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-dev.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-nonwifi.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-wifi.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin-yavia.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
 create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dahlia.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-dev.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-nonwifi-yavia.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dahlia.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-dev.dts
 create mode 100644 arch/arm64/boot/dts/ti/k3-am625-verdin-wifi-yavia.dts

Comments

Francesco Dolcini May 30, 2023, 4:36 p.m. UTC | #1
On Tue, May 30, 2023 at 07:10:44AM -0500, Nishanth Menon wrote:
> On 16:36-20230524, Francesco Dolcini wrote:
> > +/* Verdin I2C_2_DSI */
> > +&main_i2c2 {
> > +	status = "okay";
> 
> Here and few other dtsis:
> you should set status along with pinmux.
This is already done in the SoM dtsi, same applies to the other comment
you have on this pinmux topic.

To rephrase what's hopefully is already written in the commit
message/series description, or at least it was in my intention.

The system is modular, with multiple SoM variant and multiple carrier
boards. Standard interfaces are defined at the family level, e.g.
already in the SoM, in the carrier board DT file peripherals are just
enabled, the pinmux is already defined in the common som.dtsi [1][2][3]
files and the carrier board just use those unless there is some kind of
non-standard deviation.

This prevents duplication and simplify writing device tree file for board
that use standard Verdin family interfaces. This should be visible
looking at this series in which 3 different boards (Dev, Yavia and
Dahlia) are added.

All of that is clearly defined in our datasheets and publicly available
documentation.

Francesco

[1] arch/arm64/boot/dts/ti/k3-am62-verdin.dtsi
[2] arch/arm64/boot/dts/ti/k3-am62-verdin-nonwifi.dtsi
[3] arch/arm64/boot/dts/ti/k3-am62-verdin-wifi.dtsi
Francesco Dolcini May 30, 2023, 4:58 p.m. UTC | #2
On Tue, May 30, 2023 at 07:12:31AM -0500, Nishanth Menon wrote:
> On 16:36-20230524, Francesco Dolcini wrote:
> > From: Francesco Dolcini <francesco.dolcini@toradex.com>
> > 
> > Add toradex,verdin-am62 for Toradex Verdin AM62 SoM, its
> > nonwifi and wifi variants and the carrier boards (Dahlia,
> > Verdin Development Board and Yavia) they may be mated in.
> > 
> > Link: https://developer.toradex.com/hardware/verdin-som-family/modules/verdin-am62/
> > Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
> > Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
> > ---
> >  .../devicetree/bindings/arm/ti/k3.yaml        | 20 +++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> > index e1183f90bb06..e3aee191d403 100644
> > --- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
> > +++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
> > @@ -33,6 +33,26 @@ properties:
> >                - ti,am62-lp-sk
> >            - const: ti,am625
> >  
> > +      - description: K3 AM62x SoC Toradex Verdin Modules and Carrier Boards
> > +        items:
> > +          - enum:
> > +              - toradex,verdin-am62-nonwifi-dahlia # Verdin AM62 Module on Dahlia
> > +              - toradex,verdin-am62-nonwifi-dev    # Verdin AM62 Module on Verdin Development Board
> > +              - toradex,verdin-am62-nonwifi-yavia  # Verdin AM62 Module on Yavia
> 
> Does'nt one of these indicate the rest?

Strictly speaking it does.

However it's convenient to have a tuple with more generic compatible
afterward.

I tried to explain some of the reasoning for that on this email [1].

More in general this tuple of compatible is matching how the actual system
is layered (SoC -> base SoM -> SoM variant -> carrier board) that is
also reflected on the dtsi include hierarchy.

FWIW, this is the standard approach you can see on fsl.yaml, where such
kind of modular system are pretty much standard.

[1] https://lore.kernel.org/all/ZG5jYV%2FNfGJvYkma@francesco-nb.int.toradex.com/

Francesco
Krzysztof Kozlowski May 31, 2023, 8:29 a.m. UTC | #3
On 24/05/2023 19:48, Andrew Davis wrote:
> On 5/24/23 9:36 AM, Francesco Dolcini wrote:
>> From: Francesco Dolcini <francesco.dolcini@toradex.com>
>>
>> Add toradex,verdin-am62 for Toradex Verdin AM62 SoM, its
>> nonwifi and wifi variants and the carrier boards (Dahlia,
>> Verdin Development Board and Yavia) they may be mated in.
>>
>> Link: https://developer.toradex.com/hardware/verdin-som-family/modules/verdin-am62/
>> Link: https://www.toradex.com/computer-on-modules/verdin-arm-family/ti-am62
>> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
>> ---
>>   .../devicetree/bindings/arm/ti/k3.yaml        | 20 +++++++++++++++++++
>>   1 file changed, 20 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/arm/ti/k3.yaml b/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> index e1183f90bb06..e3aee191d403 100644
>> --- a/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> +++ b/Documentation/devicetree/bindings/arm/ti/k3.yaml
>> @@ -33,6 +33,26 @@ properties:
>>                 - ti,am62-lp-sk
>>             - const: ti,am625
>>   
>> +      - description: K3 AM62x SoC Toradex Verdin Modules and Carrier Boards
>> +        items:
>> +          - enum:
>> +              - toradex,verdin-am62-nonwifi-dahlia # Verdin AM62 Module on Dahlia
>> +              - toradex,verdin-am62-nonwifi-dev    # Verdin AM62 Module on Verdin Development Board
>> +              - toradex,verdin-am62-nonwifi-yavia  # Verdin AM62 Module on Yavia
>> +          - const: toradex,verdin-am62-nonwifi     # Verdin AM62 Module without Wi-Fi / BT
> 
> Does this add anything? Not sure we need to split compatibles based on this, things
> like wifi vs nowifi can be described in DT, same for different memory size models, etc..
> 
> In fact I'm not sure we get much value at all out of top level whole-SoC compatible
> strings. Maybe we did when there was matching in kernel to do device specific fixups,
> but that isn't really used much in ARM64.

If I understand correctly, this is different SoM, so different hardware.
 It is fine to have different board compatibles, because you will have
two different DTS.

Best regards,
Krzysztof