Message ID | tencent_686082BF01D2C0E8027D8CB05DC1C649DA05@qq.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] dts/amlogic: Add MagicBox M16S support | expand |
Hello, great to see this patch! On Sat, Jul 23, 2022 at 5:56 PM Zhang Ning <zhangn1985@qq.com> wrote: > > MagicBox M16S or MagicBox 3Pro is popular Tv box in China. > > it's q201_v1 according u-boot log. > and it's almost same as Q201 reference design. > > add a simple dts to support this Tv box. It would be great if you could add the hardware specs from the cover-letter here. [...] > diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml > index 61a6cabb375b..3eac16a4de68 100644 > --- a/Documentation/devicetree/bindings/arm/amlogic.yaml > +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml > @@ -123,6 +123,7 @@ properties: > - khadas,vim2 > - kingnovel,r-box-pro > - libretech,aml-s912-pc > + - magicbox,m16s > - minix,neo-u9h > - nexbox,a1 > - tronsmart,vega-s96 The change itself is fine (entries are sorted alphabetically). It should go into a separate dt-binding patch though. See commit 3f7dbd336f360a ("dt-bindings: arm: amlogic: add Vero 4K+ bindings") for an example with the correct title and commit message. [...] > + gpio-keys-polled { > + compatible = "gpio-keys-polled"; > + #address-cells = <1>; > + #size-cells = <0>; #address-cells and #size-cells will be dropped in Linux 5.20 in all existing .dts files, see [0] Please do the same. > + button-power { Button/Key node labels are updated in 5.20 as well (see [1], but button-power does match the recommended naming so no change is needed. Thank you and best regards, Martin [0] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?h=v5.20/arm64-dt&id=4956be9944d1fb23107f27bad8a2cca0fa167443 [1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?h=v5.20/arm64-dt&id=4fd9afd894ebe5831dbd737e6ca7b6de14da7fda
thank you for review, I will send next version according your advises. On Sat, Jul 23, 2022 at 10:14:40PM +0200, Martin Blumenstingl wrote: > Hello, > > great to see this patch! > > On Sat, Jul 23, 2022 at 5:56 PM Zhang Ning <zhangn1985@qq.com> wrote: > > > > MagicBox M16S or MagicBox 3Pro is popular Tv box in China. > > > > it's q201_v1 according u-boot log. > > and it's almost same as Q201 reference design. > > > > add a simple dts to support this Tv box. > It would be great if you could add the hardware specs from the > cover-letter here. > > [...] > > diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml > > index 61a6cabb375b..3eac16a4de68 100644 > > --- a/Documentation/devicetree/bindings/arm/amlogic.yaml > > +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml > > @@ -123,6 +123,7 @@ properties: > > - khadas,vim2 > > - kingnovel,r-box-pro > > - libretech,aml-s912-pc > > + - magicbox,m16s > > - minix,neo-u9h > > - nexbox,a1 > > - tronsmart,vega-s96 > The change itself is fine (entries are sorted alphabetically). It > should go into a separate dt-binding patch though. > See commit 3f7dbd336f360a ("dt-bindings: arm: amlogic: add Vero 4K+ > bindings") for an example with the correct title and commit message. > > [...] > > + gpio-keys-polled { > > + compatible = "gpio-keys-polled"; > > + #address-cells = <1>; > > + #size-cells = <0>; > #address-cells and #size-cells will be dropped in Linux 5.20 in all > existing .dts files, see [0] > Please do the same. > > > + button-power { > Button/Key node labels are updated in 5.20 as well (see [1], but > button-power does match the recommended naming so no change is needed. > > > Thank you and best regards, > Martin > > > [0] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?h=v5.20/arm64-dt&id=4956be9944d1fb23107f27bad8a2cca0fa167443 > [1] https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git/commit/?h=v5.20/arm64-dt&id=4fd9afd894ebe5831dbd737e6ca7b6de14da7fda
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml index 61a6cabb375b..3eac16a4de68 100644 --- a/Documentation/devicetree/bindings/arm/amlogic.yaml +++ b/Documentation/devicetree/bindings/arm/amlogic.yaml @@ -123,6 +123,7 @@ properties: - khadas,vim2 - kingnovel,r-box-pro - libretech,aml-s912-pc + - magicbox,m16s - minix,neo-u9h - nexbox,a1 - tronsmart,vega-s96 diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile index 8773211df50e..e0907fb41829 100644 --- a/arch/arm64/boot/dts/amlogic/Makefile +++ b/arch/arm64/boot/dts/amlogic/Makefile @@ -44,6 +44,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-libretech-cc.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxl-s905x-p212.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-khadas-vim2.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-magicbox-m16s.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-mecool-kiii-pro.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-minix-neo-u9h.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts new file mode 100644 index 000000000000..464de73d2f0f --- /dev/null +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2022 Zhang Ning <zhangn1985@qq.com> + */ + +/dts-v1/; + +#include "meson-gxm.dtsi" +#include "meson-gx-p23x-q20x.dtsi" +#include <dt-bindings/input/input.h> + +/ { + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm"; + model = "MagicBox M16S"; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + button-power { + label = "power"; + linux,code = <KEY_POWER>; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + }; + }; +}; +ðmac { + phy-mode = "rmii"; + phy-handle = <&internal_phy>; +}; + +&sdio_pwrseq { + reset-gpios = <&gpio GPIODV_2 GPIO_ACTIVE_LOW>; +};
MagicBox M16S or MagicBox 3Pro is popular Tv box in China. it's q201_v1 according u-boot log. and it's almost same as Q201 reference design. add a simple dts to support this Tv box. Signed-off-by: Zhang Ning <zhangn1985@qq.com> --- .../devicetree/bindings/arm/amlogic.yaml | 1 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 36 +++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts