From: Christian Hewitt <hidden> Date: 2021-11-30 06:05:46
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
--
2.17.1
From: Christian Hewitt <hidden> Date: 2021-11-30 06:05:53
Add a common dtsi for Android STB devices based on the Amlogic S905X3
(AC213/AC214) and S905D3 (AC201/AC202) reference designs. The dtsi is
loosely based on the existing SEI610 device-tree.
Signed-off-by: Christian Hewitt <redacted>
---
.../boot/dts/amlogic/meson-sm1-ac2xx.dtsi | 300 ++++++++++++++++++
1 file changed, 300 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-sm1-ac2xx.dtsi
@@ -0,0 +1,300 @@+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)+/*+*Copyright(c)2019BayLibreSAS.Allrightsreserved.+*Copyright(c)2020ChristianHewitt<christianshewitt@gmail.com>+*+*AC200/AC202=S905D3+*AC213/AC214=S905X3+*+*/++#include"meson-sm1.dtsi"+#include<dt-bindings/gpio/gpio.h>+#include<dt-bindings/gpio/meson-g12a-gpio.h>+#include<dt-bindings/input/input.h>++/{+aliases{+serial0=&uart_AO;+ethernet0=ðmac;+};++chosen{+stdout-path="serial0:115200n8";+};++emmc_pwrseq:emmc-pwrseq{+compatible="mmc-pwrseq-emmc";+reset-gpios=<&gpioBOOT_12GPIO_ACTIVE_LOW>;+};++cvbs-connector{+compatible="composite-video-connector";++port{+cvbs_connector_in:endpoint{+remote-endpoint=<&cvbs_vdac_out>;+};+};+};++hdmi-connector{+compatible="hdmi-connector";+type="a";++port{+hdmi_connector_in:endpoint{+remote-endpoint=<&hdmi_tx_tmds_out>;+};+};+};++memory@0{+device_type="memory";+reg=<0x00x00x00x40000000>;+};++ao_5v:regulator-ao_5v{+compatible="regulator-fixed";+regulator-name="AO_5V";+regulator-min-microvolt=<5000000>;+regulator-max-microvolt=<5000000>;+vin-supply=<&dc_in>;+regulator-always-on;+};++dc_in:regulator-dc_in{+compatible="regulator-fixed";+regulator-name="DC_IN";+regulator-min-microvolt=<5000000>;+regulator-max-microvolt=<5000000>;+regulator-always-on;+};++emmc_1v8:regulator-emmc_1v8{+compatible="regulator-fixed";+regulator-name="EMMC_1V8";+regulator-min-microvolt=<1800000>;+regulator-max-microvolt=<1800000>;+vin-supply=<&vddao_3v3>;+regulator-always-on;+};++vddao_3v3:regulator-vddao_3v3{+compatible="regulator-fixed";+regulator-name="VDDAO_3V3";+regulator-min-microvolt=<3300000>;+regulator-max-microvolt=<3300000>;+vin-supply=<&dc_in>;+regulator-always-on;+};++vddcpu:regulator-vddcpu{+compatible="pwm-regulator";++regulator-name="VDDCPU";+regulator-min-microvolt=<690000>;+regulator-max-microvolt=<1050000>;++vin-supply=<&dc_in>;++pwms=<&pwm_AO_cd115000>;+pwm-dutycycle-range=<1000>;++regulator-boot-on;+regulator-always-on;+};++vddio_ao1v8:regulator-vddio_ao1v8{+compatible="regulator-fixed";+regulator-name="VDDIO_AO1V8";+regulator-min-microvolt=<1800000>;+regulator-max-microvolt=<1800000>;+vin-supply=<&vddao_3v3>;+regulator-always-on;+};++sdio_pwrseq:sdio-pwrseq{+compatible="mmc-pwrseq-simple";+reset-gpios=<&gpioGPIOX_6GPIO_ACTIVE_LOW>;+clocks=<&wifi32k>;+clock-names="ext_clock";+};++wifi32k:wifi32k{+compatible="pwm-clock";+#clock-cells=<0>;+clock-frequency=<32768>;+pwms=<&pwm_ef0305180>;/* PWM_E at 32.768KHz */+};+};++&cec_AO{+pinctrl-0=<&cec_ao_a_h_pins>;+pinctrl-names="default";+status="disabled";+hdmi-phandle=<&hdmi_tx>;+};++&cecb_AO{+pinctrl-0=<&cec_ao_b_h_pins>;+pinctrl-names="default";+status="okay";+hdmi-phandle=<&hdmi_tx>;+};++&cpu0{+cpu-supply=<&vddcpu>;+operating-points-v2=<&cpu_opp_table>;+clocks=<&clkcCLKID_CPU_CLK>;+clock-latency=<50000>;+};++&cpu1{+cpu-supply=<&vddcpu>;+operating-points-v2=<&cpu_opp_table>;+clocks=<&clkcCLKID_CPU1_CLK>;+clock-latency=<50000>;+};++&cpu2{+cpu-supply=<&vddcpu>;+operating-points-v2=<&cpu_opp_table>;+clocks=<&clkcCLKID_CPU2_CLK>;+clock-latency=<50000>;+};++&cpu3{+cpu-supply=<&vddcpu>;+operating-points-v2=<&cpu_opp_table>;+clocks=<&clkcCLKID_CPU3_CLK>;+clock-latency=<50000>;+};++&cvbs_vdac_port{+cvbs_vdac_out:endpoint{+remote-endpoint=<&cvbs_connector_in>;+};+};++&hdmi_tx{+status="okay";+pinctrl-0=<&hdmitx_hpd_pins>,<&hdmitx_ddc_pins>;+pinctrl-names="default";+};++&hdmi_tx_tmds_port{+hdmi_tx_tmds_out:endpoint{+remote-endpoint=<&hdmi_connector_in>;+};+};++&ir{+status="okay";+pinctrl-0=<&remote_input_ao_pins>;+pinctrl-names="default";+};++&pwm_AO_ab{+status="okay";+pinctrl-0=<&pwm_ao_a_pins>;+pinctrl-names="default";+clocks=<&xtal>;+clock-names="clkin0";+};++&pwm_AO_cd{+pinctrl-0=<&pwm_ao_d_e_pins>;+pinctrl-names="default";+clocks=<&xtal>;+clock-names="clkin1";+status="okay";+};++&pwm_ef{+status="okay";+pinctrl-0=<&pwm_e_pins>;+pinctrl-names="default";+clocks=<&xtal>;+clock-names="clkin0";+};++&saradc{+status="okay";+vref-supply=<&vddio_ao1v8>;+};++/* SDIO */+&sd_emmc_a{+status="okay";+pinctrl-0=<&sdio_pins>;+pinctrl-1=<&sdio_clk_gate_pins>;+pinctrl-names="default","clk-gate";+#address-cells=<1>;+#size-cells=<0>;++bus-width=<4>;+cap-sd-highspeed;+sd-uhs-sdr104;+max-frequency=<200000000>;++non-removable;+disable-wp;++/* WiFi firmware requires power to be kept while in suspend */+keep-power-in-suspend;++mmc-pwrseq=<&sdio_pwrseq>;++vmmc-supply=<&vddao_3v3>;+vqmmc-supply=<&vddio_ao1v8>;+};++/* SD Card */+&sd_emmc_b{+status="okay";+pinctrl-0=<&sdcard_c_pins>;+pinctrl-1=<&sdcard_clk_gate_c_pins>;+pinctrl-names="default","clk-gate";++bus-width=<4>;+cap-sd-highspeed;+/* CRC errors are observed at 50MHz */+max-frequency=<35000000>;+disable-wp;++cd-gpios=<&gpioGPIOC_6GPIO_ACTIVE_LOW>;+vmmc-supply=<&vddao_3v3>;+vqmmc-supply=<&vddao_3v3>;+};++/* eMMC */+&sd_emmc_c{+status="okay";+pinctrl-0=<&emmc_ctrl_pins>,<&emmc_data_8b_pins>,<&emmc_ds_pins>;+pinctrl-1=<&emmc_clk_gate_pins>;+pinctrl-names="default","clk-gate";++bus-width=<8>;+cap-mmc-highspeed;+mmc-ddr-1_8v;+mmc-hs200-1_8v;+max-frequency=<200000000>;+non-removable;+disable-wp;++mmc-pwrseq=<&emmc_pwrseq>;+vmmc-supply=<&vddao_3v3>;+vqmmc-supply=<&emmc_1v8>;+};++&uart_AO{+status="okay";+pinctrl-0=<&uart_ao_a_pins>;+pinctrl-names="default";+};++&usb{+status="okay";+dr_mode="otg";+};
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Date: 2021-12-06 21:34:47
On Tue, Nov 30, 2021 at 7:06 AM Christian Hewitt
[off-list ref] wrote:
Add a common dtsi for Android STB devices based on the Amlogic S905X3
(AC213/AC214) and S905D3 (AC201/AC202) reference designs. The dtsi is
loosely based on the existing SEI610 device-tree.
Signed-off-by: Christian Hewitt <redacted>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> #
X96-Air with Gbit/s PHY
From: Christian Hewitt <hidden> Date: 2021-11-30 06:06:01
Add board bindings for the Amediatech X96-AIR STB which ships with
model variants distiguished by Ethernet configuration: models using
internal 10/100 PHY have a -100 suffix, while models using external
Gigabit PHY have a -1000 suffix.
Signed-off-by: Christian Hewitt <redacted>
---
Documentation/devicetree/bindings/arm/amlogic.yaml | 2 ++
1 file changed, 2 insertions(+)
From: Rob Herring <robh@kernel.org> Date: 2021-12-07 21:21:50
On Tue, Nov 30, 2021 at 06:05:16AM +0000, Christian Hewitt wrote:
Add board bindings for the Amediatech X96-AIR STB which ships with
model variants distiguished by Ethernet configuration: models using
internal 10/100 PHY have a -100 suffix, while models using external
Gigabit PHY have a -1000 suffix.
Isn't the phy described in DT? Why do you need to describe this 1
difference at the top level?
From: Christian Hewitt <hidden> Date: 2021-12-08 04:44:47
On 8 Dec 2021, at 1:21 am, Rob Herring [off-list ref] wrote:
On Tue, Nov 30, 2021 at 06:05:16AM +0000, Christian Hewitt wrote:
quoted
Add board bindings for the Amediatech X96-AIR STB which ships with
model variants distiguished by Ethernet configuration: models using
internal 10/100 PHY have a -100 suffix, while models using external
Gigabit PHY have a -1000 suffix.
Isn't the phy described in DT? Why do you need to describe this 1
difference at the top level?
Users who purchase Android STBs as a cheap Linux media device (or are
reimiaging an existing device when they give up on Android) generally
have no idea what a PHY is, so reading a device-tree file to pick the
correct one is beyond them. Most people blindly try all dtb files for
a class of device until they find one that works, so top-level naming
is simply to hint the process and reduce guesswork. It’s not perfect,
but it does appear to reduce the quantity of “Ethernet doesn’t work!”
posts seen in support forums.
Christian
From: Neil Armstrong <hidden> Date: 2021-12-08 08:17:54
On 08/12/2021 05:44, Christian Hewitt wrote:
quoted
On 8 Dec 2021, at 1:21 am, Rob Herring [off-list ref] wrote:
On Tue, Nov 30, 2021 at 06:05:16AM +0000, Christian Hewitt wrote:
quoted
Add board bindings for the Amediatech X96-AIR STB which ships with
model variants distiguished by Ethernet configuration: models using
internal 10/100 PHY have a -100 suffix, while models using external
Gigabit PHY have a -1000 suffix.
Isn't the phy described in DT? Why do you need to describe this 1
difference at the top level?
The difference is between internal VS external PHY, which means
difference in pinmuxing & settings for the MDIO mux selecting the
PHY interface.
The other issue is about the bootloader, the vendor bootloader is not
necessarily capable of detecting the PHY type, and correctly altering
the DT without a complex script.
Having a single DT adds a dependency on the bootloader, which for me isn't
acceptable.
Neil
Users who purchase Android STBs as a cheap Linux media device (or are
reimiaging an existing device when they give up on Android) generally
have no idea what a PHY is, so reading a device-tree file to pick the
correct one is beyond them. Most people blindly try all dtb files for
a class of device until they find one that works, so top-level naming
is simply to hint the process and reduce guesswork. It’s not perfect,
but it does appear to reduce the quantity of “Ethernet doesn’t work!”
posts seen in support forums.
Christian
@@ -0,0 +1,112 @@+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)+/*+*Copyright(c)2019BayLibreSAS.Allrightsreserved.+*Copyright(c)2020ChristianHewitt<christianshewitt@gmail.com>+*/++/dts-v1/;++#include"meson-sm1-ac2xx.dtsi"+#include<dt-bindings/sound/meson-g12a-tohdmitx.h>++/{+compatible="amediatech,x96-air-100","amlogic,sm1";+model="Shenzhen Amediatech Technology Co., Ltd X96 Air";++sound{+compatible="amlogic,axg-sound-card";+model="X96-AIR";+audio-aux-devs=<&tdmout_b>;+audio-routing="TDMOUT_B IN 0","FRDDR_A OUT 1",+"TDMOUT_B IN 1","FRDDR_B OUT 1",+"TDMOUT_B IN 2","FRDDR_C OUT 1",+"TDM_B Playback","TDMOUT_B OUT";++assigned-clocks=<&clkcCLKID_MPLL2>,+<&clkcCLKID_MPLL0>,+<&clkcCLKID_MPLL1>;+assigned-clock-parents=<0>,<0>,<0>;+assigned-clock-rates=<294912000>,+<270950400>,+<393216000>;+status="okay";++dai-link-0{+sound-dai=<&frddr_a>;+};++dai-link-1{+sound-dai=<&frddr_b>;+};++dai-link-2{+sound-dai=<&frddr_c>;+};++/* 8ch hdmi interface */+dai-link-3{+sound-dai=<&tdmif_b>;+dai-format="i2s";+dai-tdm-slot-tx-mask-0=<11>;+dai-tdm-slot-tx-mask-1=<11>;+dai-tdm-slot-tx-mask-2=<11>;+dai-tdm-slot-tx-mask-3=<11>;+mclk-fs=<256>;++codec{+sound-dai=<&tohdmitxTOHDMITX_I2S_IN_B>;+};+};++/* hdmi glue */+dai-link-4{+sound-dai=<&tohdmitxTOHDMITX_I2S_OUT>;++codec{+sound-dai=<&hdmi_tx>;+};+};+};+};++&arb{+status="okay";+};++&clkc_audio{+status="okay";+};++ðmac{+status="okay";+phy-handle=<&internal_ephy>;+phy-mode="rmii";+};++&frddr_a{+status="okay";+};++&frddr_b{+status="okay";+};++&frddr_c{+status="okay";+};++&ir{+linux,rc-map-name="rc-beelink-gs1";+};++&tdmif_b{+status="okay";+};++&tdmout_b{+status="okay";+};++&tohdmitx{+status="okay";+};
From: Piotr Oniszczuk <hidden> Date: 2021-12-07 08:13:47
Wiadomość napisana przez Christian Hewitt [off-list ref] w dniu 30.11.2021, o godz. 07:05:
– 2GB DDR3 + 16GB eMMC + WiFi b/g/n (no BT) + 10/100 Ethernet
Tested-by: Piotr Oniszczuk <redacted> #
X96-Air with 10/100 Eth
From: Christian Hewitt <hidden> Date: 2021-11-30 06:06:11
Add board bindings for the CYX A95XF3-AIR set-top box which ships
with model variants distiguished by Ethernet configuration: models
using internal 10/100 PHY have a -100 suffix, while models using
external Gigabit PHY have a -1000 suffix.
Signed-off-by: Christian Hewitt <redacted>
---
Documentation/devicetree/bindings/arm/amlogic.yaml | 2 ++
1 file changed, 2 insertions(+)
@@ -0,0 +1,108 @@+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)+/*+*Copyright(c)2019BayLibreSAS.Allrightsreserved.+*Copyright(c)2020ChristianHewitt<christianshewitt@gmail.com>+*/++/dts-v1/;++#include"meson-sm1-ac2xx.dtsi"+#include<dt-bindings/sound/meson-g12a-tohdmitx.h>++/{+compatible="cyx,a95xf3-air-100","amlogic,sm1";+model="Shenzhen CYX Industrial Co., Ltd A95XF3-AIR";++sound{+compatible="amlogic,axg-sound-card";+model="A95XF3-AIR";+audio-aux-devs=<&tdmout_b>;+audio-routing="TDMOUT_B IN 0","FRDDR_A OUT 1",+"TDMOUT_B IN 1","FRDDR_B OUT 1",+"TDMOUT_B IN 2","FRDDR_C OUT 1",+"TDM_B Playback","TDMOUT_B OUT";++assigned-clocks=<&clkcCLKID_MPLL2>,+<&clkcCLKID_MPLL0>,+<&clkcCLKID_MPLL1>;+assigned-clock-parents=<0>,<0>,<0>;+assigned-clock-rates=<294912000>,+<270950400>,+<393216000>;+status="okay";++dai-link-0{+sound-dai=<&frddr_a>;+};++dai-link-1{+sound-dai=<&frddr_b>;+};++dai-link-2{+sound-dai=<&frddr_c>;+};++/* 8ch hdmi interface */+dai-link-3{+sound-dai=<&tdmif_b>;+dai-format="i2s";+dai-tdm-slot-tx-mask-0=<11>;+dai-tdm-slot-tx-mask-1=<11>;+dai-tdm-slot-tx-mask-2=<11>;+dai-tdm-slot-tx-mask-3=<11>;+mclk-fs=<256>;++codec{+sound-dai=<&tohdmitxTOHDMITX_I2S_IN_B>;+};+};++/* hdmi glue */+dai-link-4{+sound-dai=<&tohdmitxTOHDMITX_I2S_OUT>;++codec{+sound-dai=<&hdmi_tx>;+};+};+};+};++&arb{+status="okay";+};++&clkc_audio{+status="okay";+};++ðmac{+status="okay";+phy-handle=<&internal_ephy>;+phy-mode="rmii";+};++&frddr_a{+status="okay";+};++&frddr_b{+status="okay";+};++&frddr_c{+status="okay";+};++&tdmif_b{+status="okay";+};++&tdmout_b{+status="okay";+};++&tohdmitx{+status="okay";+};
From: Neil Armstrong <hidden> Date: 2022-01-03 15:21:22
Hi,
On 30/11/2021 07:05, Christian Hewitt wrote:
The CYX A95XF3-AIR is based on Amlogic S905X3 reference board
designs and ships in multiple configurations:
– 4GB DDR3 + 64GB eMMC + WiFi a/b/g/n/ac + BT + Gb Ethernet
– 4GB DDR3 + 32GB eMMC + WiFi a/b/g/n/ac + BT + Gb Ethernet
– 2GB DDR3 + 16GB eMMC + WiFi b/g/n (no BT) + 10/100 Ethernet
...
- HDMI 2.1 video
- S/PDIF optical output
- AV output
- 1x USB 2.0 OTG port
- 1x USB 3.0 port
- IR receiver
- 1x micro SD card slot (internal)
- 1x Reset/Update button (in AV jack)
- 7-segment VFD
- Multicolour case LED 'arc'
The device-tree with -100 suffix supports models with 10/100 Ethernet
and with -1000 suffix supports models with Gigabit Ethernet.
I thought about this, and I think we should have:
- meson-sm1-a95xf3-air.dts for 10/100 version
- meson-sm1-a95xf3-air-gbit.dts for gigabit 10/100/1000 version
With this, I'm ok to apply the serie.
Neil
@@ -0,0 +1,108 @@+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)+/*+*Copyright(c)2019BayLibreSAS.Allrightsreserved.+*Copyright(c)2020ChristianHewitt<christianshewitt@gmail.com>+*/++/dts-v1/;++#include"meson-sm1-ac2xx.dtsi"+#include<dt-bindings/sound/meson-g12a-tohdmitx.h>++/{+compatible="cyx,a95xf3-air-100","amlogic,sm1";+model="Shenzhen CYX Industrial Co., Ltd A95XF3-AIR";++sound{+compatible="amlogic,axg-sound-card";+model="A95XF3-AIR";+audio-aux-devs=<&tdmout_b>;+audio-routing="TDMOUT_B IN 0","FRDDR_A OUT 1",+"TDMOUT_B IN 1","FRDDR_B OUT 1",+"TDMOUT_B IN 2","FRDDR_C OUT 1",+"TDM_B Playback","TDMOUT_B OUT";++assigned-clocks=<&clkcCLKID_MPLL2>,+<&clkcCLKID_MPLL0>,+<&clkcCLKID_MPLL1>;+assigned-clock-parents=<0>,<0>,<0>;+assigned-clock-rates=<294912000>,+<270950400>,+<393216000>;+status="okay";++dai-link-0{+sound-dai=<&frddr_a>;+};++dai-link-1{+sound-dai=<&frddr_b>;+};++dai-link-2{+sound-dai=<&frddr_c>;+};++/* 8ch hdmi interface */+dai-link-3{+sound-dai=<&tdmif_b>;+dai-format="i2s";+dai-tdm-slot-tx-mask-0=<11>;+dai-tdm-slot-tx-mask-1=<11>;+dai-tdm-slot-tx-mask-2=<11>;+dai-tdm-slot-tx-mask-3=<11>;+mclk-fs=<256>;++codec{+sound-dai=<&tohdmitxTOHDMITX_I2S_IN_B>;+};+};++/* hdmi glue */+dai-link-4{+sound-dai=<&tohdmitxTOHDMITX_I2S_OUT>;++codec{+sound-dai=<&hdmi_tx>;+};+};+};+};++&arb{+status="okay";+};++&clkc_audio{+status="okay";+};++ðmac{+status="okay";+phy-handle=<&internal_ephy>;+phy-mode="rmii";+};++&frddr_a{+status="okay";+};++&frddr_b{+status="okay";+};++&frddr_c{+status="okay";+};++&tdmif_b{+status="okay";+};++&tdmout_b{+status="okay";+};++&tohdmitx{+status="okay";+};
From: Christian Hewitt <hidden> Date: 2022-01-03 15:26:57
On 3 Jan 2022, at 7:21 pm, Neil Armstrong [off-list ref] wrote:
Hi,
On 30/11/2021 07:05, Christian Hewitt wrote:
quoted
The CYX A95XF3-AIR is based on Amlogic S905X3 reference board
designs and ships in multiple configurations:
– 4GB DDR3 + 64GB eMMC + WiFi a/b/g/n/ac + BT + Gb Ethernet
– 4GB DDR3 + 32GB eMMC + WiFi a/b/g/n/ac + BT + Gb Ethernet
– 2GB DDR3 + 16GB eMMC + WiFi b/g/n (no BT) + 10/100 Ethernet
...
- HDMI 2.1 video
- S/PDIF optical output
- AV output
- 1x USB 2.0 OTG port
- 1x USB 3.0 port
- IR receiver
- 1x micro SD card slot (internal)
- 1x Reset/Update button (in AV jack)
- 7-segment VFD
- Multicolour case LED 'arc'
The device-tree with -100 suffix supports models with 10/100 Ethernet
and with -1000 suffix supports models with Gigabit Ethernet.
I thought about this, and I think we should have:
- meson-sm1-a95xf3-air.dts for 10/100 version
- meson-sm1-a95xf3-air-gbit.dts for gigabit 10/100/1000 version
With this, I'm ok to apply the serie.
Neil
That’s fine with me, thanks for the review. I’ll rework the patches and
send a v2 series to the list.
Christian
From: Neil Armstrong <hidden> Date: 2021-11-30 10:40:24
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
From: Kevin Hilman <khilman@baylibre.com> Date: 2021-12-06 18:06:07
Christian Hewitt [off-list ref] 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
From: Neil Armstrong <hidden> Date: 2021-12-08 08:20:44
On 06/12/2021 19:06, Kevin Hilman wrote:
Christian Hewitt [off-list ref] writes:
quoted
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