Message ID | 20200718052258.2890-2-christianshewitt@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] dt-bindings: arm: amlogic: add support for the Beelink GS-King-X | expand |
On 18/07/2020 07:22, Christian Hewitt wrote: > The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference > board with an S922X-H chip. > > - 4GB LPDDR4 RAM > - 64GB eMMC storage > - 10/100/1000 Base-T Ethernet > - AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) > - HDMI 2.1 video > - S/PDIF optical output > - 2x ESS9018 audio DACs > - 4x Ricor RT6862 audio amps > - Analogue headphone output > - 1x USB 2.0 OTG port > - 3x USB 3.0 ports > - IR receiver > - 1x micro SD card slot (internal) > - USB SATA controller with 2x 3.5" drive bays > - 1x Power on/off button > > Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> > --- > arch/arm64/boot/dts/amlogic/Makefile | 1 + > .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 170 ++++++++++++++++++ > 2 files changed, 171 insertions(+) > create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > > diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile > index 5cac4d1d487d..99a6e8e0b644 100644 > --- a/arch/arm64/boot/dts/amlogic/Makefile > +++ b/arch/arm64/boot/dts/amlogic/Makefile > @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb > +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > new file mode 100644 > index 000000000000..60b681d6cfe3 > --- /dev/null > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > @@ -0,0 +1,170 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2019 BayLibre, SAS > + * Author: Neil Armstrong <narmstrong@baylibre.com> > + * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com> > + */ > + > +/dts-v1/; > + > +#include "meson-g12b-w400.dtsi" > +#include <dt-bindings/leds/common.h> > +#include <dt-bindings/sound/meson-g12a-tohdmitx.h> > + > +/ { > + compatible = "azw,gsking-x", "amlogic,g12b"; > + model = "Beelink GS-King X"; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <100>; > + > + power-button { > + label = "power"; > + linux,code = <KEY_POWER>; > + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; > + }; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + blue { > + color = <LED_COLOR_ID_BLUE>; > + function = LED_FUNCTION_STATUS; > + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; > + default-state = "on"; > + }; > + }; > + > + spdif_dit: audio-codec-1 { > + #sound-dai-cells = <0>; > + compatible = "linux,spdif-dit"; > + status = "okay"; > + sound-name-prefix = "DIT"; > + }; > + > + sound { > + compatible = "amlogic,axg-sound-card"; > + model = "G12B-GSKING-X"; > + 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", > + "SPDIFOUT IN 0", "FRDDR_A OUT 3", > + "SPDIFOUT IN 1", "FRDDR_B OUT 3", > + "SPDIFOUT IN 2", "FRDDR_C OUT 3"; > + > + assigned-clocks = <&clkc CLKID_MPLL2>, > + <&clkc CLKID_MPLL0>, > + <&clkc CLKID_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>; Maybe it should be moved to tdmif_a like the vim3 > + dai-format = "i2s"; > + dai-tdm-slot-tx-mask-0 = <1 1>; > + dai-tdm-slot-tx-mask-1 = <1 1>; > + dai-tdm-slot-tx-mask-2 = <1 1>; > + dai-tdm-slot-tx-mask-3 = <1 1>; > + mclk-fs = <256>; > + > + codec { > + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; > + }; > + }; > + > + /* spdif hdmi or toslink interface */ > + dai-link-4 { > + sound-dai = <&spdifout>; > + > + codec-0 { > + sound-dai = <&spdif_dit>; > + }; > + > + codec-1 { > + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; > + }; > + }; > + > + /* spdif hdmi interface */ > + dai-link-5 { > + sound-dai = <&spdifout_b>; > + > + codec { > + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; > + }; > + }; I think you can drop this one for now > + > + /* hdmi glue */ > + dai-link-6 { > + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; > + > + codec { > + sound-dai = <&hdmi_tx>; > + }; > + }; > + }; > +}; > + > +&arb { > + status = "okay"; > +}; > + > +&clkc_audio { > + status = "okay"; > +}; > + > +&frddr_a { > + status = "okay"; > +}; > + > +&frddr_b { > + status = "okay"; > +}; > + > +&frddr_c { > + status = "okay"; > +}; > + > +&spdifout { > + pinctrl-0 = <&spdif_out_h_pins>; > + pinctrl-names = "default"; > + status = "okay"; > +}; > + > +&spdifout_b { > + status = "okay"; > +}; > + > +&tdmif_b { > + status = "okay"; > +}; > + > +&tdmout_b { > + status = "okay"; > +}; > + > +&tohdmitx { > + status = "okay"; > +}; > Neil
On Sat 18 Jul 2020 at 07:22, Christian Hewitt <christianshewitt@gmail.com> wrote: > The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference > board with an S922X-H chip. > > - 4GB LPDDR4 RAM > - 64GB eMMC storage > - 10/100/1000 Base-T Ethernet > - AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) > - HDMI 2.1 video > - S/PDIF optical output > - 2x ESS9018 audio DACs > - 4x Ricor RT6862 audio amps > - Analogue headphone output > - 1x USB 2.0 OTG port > - 3x USB 3.0 ports > - IR receiver > - 1x micro SD card slot (internal) > - USB SATA controller with 2x 3.5" drive bays > - 1x Power on/off button > > Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> > --- > arch/arm64/boot/dts/amlogic/Makefile | 1 + > .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 170 ++++++++++++++++++ > 2 files changed, 171 insertions(+) > create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > > diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile > index 5cac4d1d487d..99a6e8e0b644 100644 > --- a/arch/arm64/boot/dts/amlogic/Makefile > +++ b/arch/arm64/boot/dts/amlogic/Makefile > @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb > +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb > dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb > diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > new file mode 100644 > index 000000000000..60b681d6cfe3 > --- /dev/null > +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts > @@ -0,0 +1,170 @@ > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) > +/* > + * Copyright (c) 2019 BayLibre, SAS > + * Author: Neil Armstrong <narmstrong@baylibre.com> > + * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com> > + */ > + > +/dts-v1/; > + > +#include "meson-g12b-w400.dtsi" > +#include <dt-bindings/leds/common.h> > +#include <dt-bindings/sound/meson-g12a-tohdmitx.h> > + > +/ { > + compatible = "azw,gsking-x", "amlogic,g12b"; > + model = "Beelink GS-King X"; > + > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; > + poll-interval = <100>; > + > + power-button { > + label = "power"; > + linux,code = <KEY_POWER>; > + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; > + }; > + }; > + > + leds { > + compatible = "gpio-leds"; > + > + blue { > + color = <LED_COLOR_ID_BLUE>; > + function = LED_FUNCTION_STATUS; > + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; > + default-state = "on"; > + }; > + }; > + > + spdif_dit: audio-codec-1 { > + #sound-dai-cells = <0>; > + compatible = "linux,spdif-dit"; > + status = "okay"; > + sound-name-prefix = "DIT"; > + }; > + > + sound { > + compatible = "amlogic,axg-sound-card"; > + model = "G12B-GSKING-X"; > + 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", > + "SPDIFOUT IN 0", "FRDDR_A OUT 3", > + "SPDIFOUT IN 1", "FRDDR_B OUT 3", > + "SPDIFOUT IN 2", "FRDDR_C OUT 3"; > + > + assigned-clocks = <&clkc CLKID_MPLL2>, > + <&clkc CLKID_MPLL0>, > + <&clkc CLKID_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 = <1 1>; > + dai-tdm-slot-tx-mask-1 = <1 1>; > + dai-tdm-slot-tx-mask-2 = <1 1>; > + dai-tdm-slot-tx-mask-3 = <1 1>; > + mclk-fs = <256>; > + > + codec { > + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; > + }; > + }; > + > + /* spdif hdmi or toslink interface */ > + dai-link-4 { > + sound-dai = <&spdifout>; > + > + codec-0 { > + sound-dai = <&spdif_dit>; > + }; > + > + codec-1 { > + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; > + }; > + }; > + > + /* spdif hdmi interface */ > + dai-link-5 { > + sound-dai = <&spdifout_b>; > + > + codec { > + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; > + }; > + }; This can't have been tested, it is not not supported by the HDMI controller. Also spdifout B is not even connected to a FIFO interface, there is not route to it Please drop the HDMI-SPDIF related stuff, include spdifout_b > + > + /* hdmi glue */ > + dai-link-6 { > + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; > + > + codec { > + sound-dai = <&hdmi_tx>; > + }; > + }; > + }; > +}; > + > +&arb { > + status = "okay"; > +}; > + > +&clkc_audio { > + status = "okay"; > +}; > + > +&frddr_a { > + status = "okay"; > +}; > + > +&frddr_b { > + status = "okay"; > +}; > + > +&frddr_c { > + status = "okay"; > +}; > + > +&spdifout { > + pinctrl-0 = <&spdif_out_h_pins>; > + pinctrl-names = "default"; > + status = "okay"; > +}; > + > +&spdifout_b { > + status = "okay"; > +}; > + > +&tdmif_b { > + status = "okay"; > +}; > + > +&tdmout_b { > + status = "okay"; > +}; > + > +&tohdmitx { > + status = "okay"; > +};
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 5cac4d1d487d..99a6e8e0b644 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -3,6 +3,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-axg-s400.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-sei510.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-u200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12a-x96-max.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gsking-x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts new file mode 100644 index 000000000000..60b681d6cfe3 --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts @@ -0,0 +1,170 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2019 BayLibre, SAS + * Author: Neil Armstrong <narmstrong@baylibre.com> + * Copyright (c) 2019 Christian Hewitt <christianshewitt@gmail.com> + */ + +/dts-v1/; + +#include "meson-g12b-w400.dtsi" +#include <dt-bindings/leds/common.h> +#include <dt-bindings/sound/meson-g12a-tohdmitx.h> + +/ { + compatible = "azw,gsking-x", "amlogic,g12b"; + model = "Beelink GS-King X"; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + power-button { + label = "power"; + linux,code = <KEY_POWER>; + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + blue { + color = <LED_COLOR_ID_BLUE>; + function = LED_FUNCTION_STATUS; + gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + }; + + spdif_dit: audio-codec-1 { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + status = "okay"; + sound-name-prefix = "DIT"; + }; + + sound { + compatible = "amlogic,axg-sound-card"; + model = "G12B-GSKING-X"; + 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", + "SPDIFOUT IN 0", "FRDDR_A OUT 3", + "SPDIFOUT IN 1", "FRDDR_B OUT 3", + "SPDIFOUT IN 2", "FRDDR_C OUT 3"; + + assigned-clocks = <&clkc CLKID_MPLL2>, + <&clkc CLKID_MPLL0>, + <&clkc CLKID_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 = <1 1>; + dai-tdm-slot-tx-mask-1 = <1 1>; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + mclk-fs = <256>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>; + }; + }; + + /* spdif hdmi or toslink interface */ + dai-link-4 { + sound-dai = <&spdifout>; + + codec-0 { + sound-dai = <&spdif_dit>; + }; + + codec-1 { + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_A>; + }; + }; + + /* spdif hdmi interface */ + dai-link-5 { + sound-dai = <&spdifout_b>; + + codec { + sound-dai = <&tohdmitx TOHDMITX_SPDIF_IN_B>; + }; + }; + + /* hdmi glue */ + dai-link-6 { + sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>; + + codec { + sound-dai = <&hdmi_tx>; + }; + }; + }; +}; + +&arb { + status = "okay"; +}; + +&clkc_audio { + status = "okay"; +}; + +&frddr_a { + status = "okay"; +}; + +&frddr_b { + status = "okay"; +}; + +&frddr_c { + status = "okay"; +}; + +&spdifout { + pinctrl-0 = <&spdif_out_h_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&spdifout_b { + status = "okay"; +}; + +&tdmif_b { + status = "okay"; +}; + +&tdmout_b { + status = "okay"; +}; + +&tohdmitx { + status = "okay"; +};
The Shenzen AZW (Beelink) GS-King-X is based on the Amlogic W400 reference board with an S922X-H chip. - 4GB LPDDR4 RAM - 64GB eMMC storage - 10/100/1000 Base-T Ethernet - AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) - HDMI 2.1 video - S/PDIF optical output - 2x ESS9018 audio DACs - 4x Ricor RT6862 audio amps - Analogue headphone output - 1x USB 2.0 OTG port - 3x USB 3.0 ports - IR receiver - 1x micro SD card slot (internal) - USB SATA controller with 2x 3.5" drive bays - 1x Power on/off button Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> --- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../boot/dts/amlogic/meson-g12b-gsking-x.dts | 170 ++++++++++++++++++ 2 files changed, 171 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-gsking-x.dts