mbox series

[RFC,0/9] arm64: dts: meson: add support for aac2xx devices

Message ID 20211130060523.19161-1-christianshewitt@gmail.com (mailing list archive)
Headers show
Series arm64: dts: meson: add support for aac2xx devices | expand

Message

Christian Hewitt Nov. 30, 2021, 6:05 a.m. UTC
This series adds support for several popular Amlogic S905X3 (SM1) Android
Set-Top Box devices. Like most Android box devices, they ship in variants
with multiple RAM, eMMC, WiFi and BT configurations. RAM and eMMC are not
something we need to consider to get a working boot, but we do need to get
the correct connectivity spec. Broadly speaking we see boxes with Higher
and Lower spec connectivity; High spec is Gigabit Ethernet and Faster dual
antennna WiFi, and Lower spec is Megabit Ethernet and a single antenna. In
some low-end boxes BT is ommitted.

The main reason for the RFC tag is to solicit feedback on the choice of
the -100 and -1000 suffixes which are used to distinguish between devices
with 10/100 Mbit (Internal PHY) or 10/100/1000 Gbit (External PHY) NIC
configurations; which is important to get correct else the box will have
no connectivity. I'm not a big fan of the suffixes, but earlier versions
where I used -int/-ext and -mbit/-gbit resulted in users having no idea
what the difference was. I'd like to informally establish a convention for
this naming before doing similar things with some S905X2 devices.

NB: At the current time the Realtek 8822CS and MT7668 WiFi/BT chips we
have seen on 'AIR' devices are not supported in the kernel so these are
deliberately ommitted. The H96-Max uses a conventional Broadcom module
so has more complete support. I'm also still exploring / learning about
alsa userspace configuration so for now the boxes have simple HDMI audio
support; wiring up the Headphone socket will be done at a later date.

Christian Hewitt (9):
  arm64: dts: meson: add common SM1 ac2xx dtsi
  dt-bindings: arm: amlogic: add X96-AIR bindings
  arm64: dts: meson: add initial device-trees for X96-AIR
  dt-bindings: vendor-prefixes: add cyx prefix
  dt-bindings: arm: amlogic: add A95XF3-AIR bindings
  arm64: dts: meson: add initial device-trees for A95XF3-AIR
  dt-bindings: vendor-prefixes: add haochuangyi prefix
  dt-bindings: arm: amlogic: add H96-Max bindings
  arm64: dts: meson: add initial device-tree for H96-Max

 .../devicetree/bindings/arm/amlogic.yaml      |   5 +
 .../devicetree/bindings/vendor-prefixes.yaml  |   4 +
 arch/arm64/boot/dts/amlogic/Makefile          |   5 +
 .../dts/amlogic/meson-sm1-a95xf3-air-100.dts  | 108 +++++++
 .../dts/amlogic/meson-sm1-a95xf3-air-1000.dts | 129 ++++++++
 .../boot/dts/amlogic/meson-sm1-ac2xx.dtsi     | 300 ++++++++++++++++++
 .../boot/dts/amlogic/meson-sm1-h96-max.dts    | 145 +++++++++
 .../dts/amlogic/meson-sm1-x96-air-100.dts     | 112 +++++++
 .../dts/amlogic/meson-sm1-x96-air-1000.dts    | 133 ++++++++
 9 files changed, 941 insertions(+)
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-100.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-1000.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts
 create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts

Comments

Neil Armstrong Nov. 30, 2021, 10:40 a.m. UTC | #1
Hi,

On 30/11/2021 07:05, Christian Hewitt wrote:
> This series adds support for several popular Amlogic S905X3 (SM1) Android
> Set-Top Box devices. Like most Android box devices, they ship in variants
> with multiple RAM, eMMC, WiFi and BT configurations. RAM and eMMC are not
> something we need to consider to get a working boot, but we do need to get
> the correct connectivity spec. Broadly speaking we see boxes with Higher
> and Lower spec connectivity; High spec is Gigabit Ethernet and Faster dual
> antennna WiFi, and Lower spec is Megabit Ethernet and a single antenna. In
> some low-end boxes BT is ommitted.
> 
> The main reason for the RFC tag is to solicit feedback on the choice of
> the -100 and -1000 suffixes which are used to distinguish between devices
> with 10/100 Mbit (Internal PHY) or 10/100/1000 Gbit (External PHY) NIC
> configurations; which is important to get correct else the box will have
> no connectivity. I'm not a big fan of the suffixes, but earlier versions
> where I used -int/-ext and -mbit/-gbit resulted in users having no idea
> what the difference was. I'd like to informally establish a convention for
> this naming before doing similar things with some S905X2 devices.

I have no opinion for -100/-1000, -int/-ext, -mbit/-gbit or <nothing>/-gigabit or whatever.

I'll wait for further comments from other reviewers here !

Neil

> 
> NB: At the current time the Realtek 8822CS and MT7668 WiFi/BT chips we
> have seen on 'AIR' devices are not supported in the kernel so these are
> deliberately ommitted. The H96-Max uses a conventional Broadcom module
> so has more complete support. I'm also still exploring / learning about
> alsa userspace configuration so for now the boxes have simple HDMI audio
> support; wiring up the Headphone socket will be done at a later date.
> 
> Christian Hewitt (9):
>   arm64: dts: meson: add common SM1 ac2xx dtsi
>   dt-bindings: arm: amlogic: add X96-AIR bindings
>   arm64: dts: meson: add initial device-trees for X96-AIR
>   dt-bindings: vendor-prefixes: add cyx prefix
>   dt-bindings: arm: amlogic: add A95XF3-AIR bindings
>   arm64: dts: meson: add initial device-trees for A95XF3-AIR
>   dt-bindings: vendor-prefixes: add haochuangyi prefix
>   dt-bindings: arm: amlogic: add H96-Max bindings
>   arm64: dts: meson: add initial device-tree for H96-Max
> 
>  .../devicetree/bindings/arm/amlogic.yaml      |   5 +
>  .../devicetree/bindings/vendor-prefixes.yaml  |   4 +
>  arch/arm64/boot/dts/amlogic/Makefile          |   5 +
>  .../dts/amlogic/meson-sm1-a95xf3-air-100.dts  | 108 +++++++
>  .../dts/amlogic/meson-sm1-a95xf3-air-1000.dts | 129 ++++++++
>  .../boot/dts/amlogic/meson-sm1-ac2xx.dtsi     | 300 ++++++++++++++++++
>  .../boot/dts/amlogic/meson-sm1-h96-max.dts    | 145 +++++++++
>  .../dts/amlogic/meson-sm1-x96-air-100.dts     | 112 +++++++
>  .../dts/amlogic/meson-sm1-x96-air-1000.dts    | 133 ++++++++
>  9 files changed, 941 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-100.dts
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-a95xf3-air-1000.dts
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-h96-max.dts
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-100.dts
>  create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-x96-air-1000.dts
>
Kevin Hilman Dec. 6, 2021, 6:06 p.m. UTC | #2
Christian Hewitt <christianshewitt@gmail.com> writes:

> This series adds support for several popular Amlogic S905X3 (SM1) Android
> Set-Top Box devices. Like most Android box devices, they ship in variants
> with multiple RAM, eMMC, WiFi and BT configurations. RAM and eMMC are not
> something we need to consider to get a working boot, but we do need to get
> the correct connectivity spec.

The reason we don't need to care about RAM differences is because u-boot
takes care of that, and updates the DT nodes accordingly.

In general, I'm not a fan of leaving these decisions up to u-boot,
but...  as an option...

I'm pondering if we should do the same for the connectivity settings?  A
properly configured u-boot already knows if it's an internal/external
PHY, Mbit vs Gbit etc. so in a similar way could enable/disable the
right nodes.

We could have a single DTS for each of these board families which
has some reasonable defaults, then u-boot would enable/disable nodes
accordingly.

Kevin
Neil Armstrong Dec. 8, 2021, 8:20 a.m. UTC | #3
On 06/12/2021 19:06, Kevin Hilman wrote:
> Christian Hewitt <christianshewitt@gmail.com> writes:
> 
>> This series adds support for several popular Amlogic S905X3 (SM1) Android
>> Set-Top Box devices. Like most Android box devices, they ship in variants
>> with multiple RAM, eMMC, WiFi and BT configurations. RAM and eMMC are not
>> something we need to consider to get a working boot, but we do need to get
>> the correct connectivity spec.
> 
> The reason we don't need to care about RAM differences is because u-boot
> takes care of that, and updates the DT nodes accordingly.
> 
> In general, I'm not a fan of leaving these decisions up to u-boot,
> but...  as an option...

For now we always set "safe" values for RAM in DT so it could work
even if not the entire memory is configured.

Since there is no way to detect this from Linux on ARM64, we have no choice
but hoping U-boot sets the right value...

> 
> I'm pondering if we should do the same for the connectivity settings?  A
> properly configured u-boot already knows if it's an internal/external
> PHY, Mbit vs Gbit etc. so in a similar way could enable/disable the
> right nodes.
> 
> We could have a single DTS for each of these board families which
> has some reasonable defaults, then u-boot would enable/disable nodes
> accordingly.

Yes it's technically possible, but it puts a larger dependency on the bootloader.

Having a lower RAM value is not idea but the system will work, having the wrong
PHY setup simply doesn't work.

Neil

> 
> Kevin
> 
>