* [PATCH] Add MagicBox M16S support
@ 2022-07-12 14:24 Zhang Ning
2022-07-18 8:02 ` Neil Armstrong
0 siblings, 1 reply; 7+ messages in thread
From: Zhang Ning @ 2022-07-12 14:24 UTC (permalink / raw)
To: narmstrong, robh+dt, linux-amlogic, devicetree; +Cc: Zhang Ning
MagicBox M16S or MagicBox 3Pro is popular Tv box in China.
it's gxm_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>
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../dts/amlogic/meson-gxm-magicbox-m16s.dts | 20 +++++++++++++++++++
2 files changed, 21 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
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..be543d65a529
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
@@ -0,0 +1,20 @@
+// 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>
+#include <dt-bindings/leds/common.h>
+
+/ {
+ compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm";
+ model = "MagicBox M16S";
+};
+ðmac {
+ phy-mode = "rmii";
+ phy-handle = <&internal_phy>;
+};
--
2.35.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Add MagicBox M16S support
2022-07-12 14:24 [PATCH] Add MagicBox M16S support Zhang Ning
@ 2022-07-18 8:02 ` Neil Armstrong
0 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2022-07-18 8:02 UTC (permalink / raw)
To: Zhang Ning, robh+dt, linux-amlogic, devicetree
Hi,
On 12/07/2022 16:24, Zhang Ning wrote:
> MagicBox M16S or MagicBox 3Pro is popular Tv box in China.
>
> it's gxm_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>
> ---
> arch/arm64/boot/dts/amlogic/Makefile | 1 +
> .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 20 +++++++++++++++++++
> 2 files changed, 21 insertions(+)
> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
>
> 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..be543d65a529
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
> @@ -0,0 +1,20 @@
> +// 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>
> +#include <dt-bindings/leds/common.h>
> +
> +/ {
> + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm";
> + model = "MagicBox M16S";
> +};
The compatible should be documented in the DT bindings in:
Documentation/devicetree/bindings/arm/amlogic.yaml
> +ðmac {
> + phy-mode = "rmii";
> + phy-handle = <&internal_phy>;
> +};
Is the sd_emmc_a change incompatible with the M16S ?
Neil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add MagicBox M16S support
@ 2022-07-18 8:02 ` Neil Armstrong
0 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2022-07-18 8:02 UTC (permalink / raw)
To: Zhang Ning, robh+dt, linux-amlogic, devicetree
Hi,
On 12/07/2022 16:24, Zhang Ning wrote:
> MagicBox M16S or MagicBox 3Pro is popular Tv box in China.
>
> it's gxm_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>
> ---
> arch/arm64/boot/dts/amlogic/Makefile | 1 +
> .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 20 +++++++++++++++++++
> 2 files changed, 21 insertions(+)
> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
>
> 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..be543d65a529
> --- /dev/null
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
> @@ -0,0 +1,20 @@
> +// 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>
> +#include <dt-bindings/leds/common.h>
> +
> +/ {
> + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm";
> + model = "MagicBox M16S";
> +};
The compatible should be documented in the DT bindings in:
Documentation/devicetree/bindings/arm/amlogic.yaml
> +ðmac {
> + phy-mode = "rmii";
> + phy-handle = <&internal_phy>;
> +};
Is the sd_emmc_a change incompatible with the M16S ?
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add MagicBox M16S support
2022-07-18 8:02 ` Neil Armstrong
(?)
@ 2022-07-21 14:37 ` Zhang Ning
2022-07-21 17:55 ` Neil Armstrong
-1 siblings, 1 reply; 7+ messages in thread
From: Zhang Ning @ 2022-07-21 14:37 UTC (permalink / raw)
To: Neil Armstrong; +Cc: robh+dt, linux-amlogic, devicetree
On Mon, Jul 18, 2022 at 10:02:32AM +0200, Neil Armstrong wrote:
Thank you for review.
> Hi,
>
> On 12/07/2022 16:24, Zhang Ning wrote:
> > MagicBox M16S or MagicBox 3Pro is popular Tv box in China.
> >
> > it's gxm_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>
> > ---
> > arch/arm64/boot/dts/amlogic/Makefile | 1 +
> > .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 20 +++++++++++++++++++
> > 2 files changed, 21 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
> >
> > 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..be543d65a529
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
> > @@ -0,0 +1,20 @@
> > +// 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>
> > +#include <dt-bindings/leds/common.h>
> > +
> > +/ {
> > + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm";
> > + model = "MagicBox M16S";
> > +};
>
> The compatible should be documented in the DT bindings in:
> Documentation/devicetree/bindings/arm/amlogic.yaml
I will update this part next version.
>
> > +ðmac {
> > + phy-mode = "rmii";
> > + phy-handle = <&internal_phy>;
> > +};
>
> Is the sd_emmc_a change incompatible with the M16S ?
sd_emmc_a is used as SDIO for wifi/bt. and wifi/bt works with this dtb.
I checked mrvl-sd8997 DT bindings, missing a lot of properties need
by mrvl-sd8997.
I don't have schematics to fill these properties, need more time to
check vendor OS or try each GPIO.
>
> Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add MagicBox M16S support
2022-07-21 14:37 ` Zhang Ning
@ 2022-07-21 17:55 ` Neil Armstrong
0 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2022-07-21 17:55 UTC (permalink / raw)
To: Zhang Ning; +Cc: robh+dt, linux-amlogic, devicetree
On 21/07/2022 16:37, Zhang Ning wrote:
> On Mon, Jul 18, 2022 at 10:02:32AM +0200, Neil Armstrong wrote:
>
> Thank you for review.
>> Hi,
>>
>> On 12/07/2022 16:24, Zhang Ning wrote:
>>> MagicBox M16S or MagicBox 3Pro is popular Tv box in China.
>>>
>>> it's gxm_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>
>>> ---
>>> arch/arm64/boot/dts/amlogic/Makefile | 1 +
>>> .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 20 +++++++++++++++++++
>>> 2 files changed, 21 insertions(+)
>>> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
>>>
>>> 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..be543d65a529
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
>>> @@ -0,0 +1,20 @@
>>> +// 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>
>>> +#include <dt-bindings/leds/common.h>
>>> +
>>> +/ {
>>> + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm";
>>> + model = "MagicBox M16S";
>>> +};
>>
>> The compatible should be documented in the DT bindings in:
>> Documentation/devicetree/bindings/arm/amlogic.yaml
>
> I will update this part next version.
>>
>>> +ðmac {
>>> + phy-mode = "rmii";
>>> + phy-handle = <&internal_phy>;
>>> +};
>>
>> Is the sd_emmc_a change incompatible with the M16S ?
>
> sd_emmc_a is used as SDIO for wifi/bt. and wifi/bt works with this dtb.
> I checked mrvl-sd8997 DT bindings, missing a lot of properties need
> by mrvl-sd8997.
>
> I don't have schematics to fill these properties, need more time to
> check vendor OS or try each GPIO.
Ok fine no problem, you can push it later when you figure out the properties.
>>
>> Neil
Neil
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add MagicBox M16S support
@ 2022-07-21 17:55 ` Neil Armstrong
0 siblings, 0 replies; 7+ messages in thread
From: Neil Armstrong @ 2022-07-21 17:55 UTC (permalink / raw)
To: Zhang Ning; +Cc: robh+dt, linux-amlogic, devicetree
On 21/07/2022 16:37, Zhang Ning wrote:
> On Mon, Jul 18, 2022 at 10:02:32AM +0200, Neil Armstrong wrote:
>
> Thank you for review.
>> Hi,
>>
>> On 12/07/2022 16:24, Zhang Ning wrote:
>>> MagicBox M16S or MagicBox 3Pro is popular Tv box in China.
>>>
>>> it's gxm_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>
>>> ---
>>> arch/arm64/boot/dts/amlogic/Makefile | 1 +
>>> .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 20 +++++++++++++++++++
>>> 2 files changed, 21 insertions(+)
>>> create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
>>>
>>> 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..be543d65a529
>>> --- /dev/null
>>> +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
>>> @@ -0,0 +1,20 @@
>>> +// 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>
>>> +#include <dt-bindings/leds/common.h>
>>> +
>>> +/ {
>>> + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm";
>>> + model = "MagicBox M16S";
>>> +};
>>
>> The compatible should be documented in the DT bindings in:
>> Documentation/devicetree/bindings/arm/amlogic.yaml
>
> I will update this part next version.
>>
>>> +ðmac {
>>> + phy-mode = "rmii";
>>> + phy-handle = <&internal_phy>;
>>> +};
>>
>> Is the sd_emmc_a change incompatible with the M16S ?
>
> sd_emmc_a is used as SDIO for wifi/bt. and wifi/bt works with this dtb.
> I checked mrvl-sd8997 DT bindings, missing a lot of properties need
> by mrvl-sd8997.
>
> I don't have schematics to fill these properties, need more time to
> check vendor OS or try each GPIO.
Ok fine no problem, you can push it later when you figure out the properties.
>>
>> Neil
Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add MagicBox M16S support
2022-07-21 17:55 ` Neil Armstrong
(?)
@ 2022-07-22 7:10 ` Zhang Ning
-1 siblings, 0 replies; 7+ messages in thread
From: Zhang Ning @ 2022-07-22 7:10 UTC (permalink / raw)
To: Neil Armstrong; +Cc: robh+dt, linux-amlogic, devicetree
Hi Neil
I got these info from vendor OS:
<6>[ 0.538173] c0 1 (swapper/0) aml_wifi wifi.33: [wifi_dev_probe] no power_on_pin2
<6>[ 0.538183] c0 1 (swapper/0) aml_wifi wifi.33: [wifi_dev_probe] interrupt_pin=241
<6>[ 0.538190] c0 1 (swapper/0) aml_wifi wifi.33: [wifi_dev_probe] irq_num=100, irq_trigger_type=1
<6>[ 0.538198] c0 1 (swapper/0) aml_wifi wifi.33: [wifi_dev_probe] power_on_pin=206
<6>[ 0.538204] c0 1 (swapper/0) aml_wifi wifi.33: [wifi_dev_probe] clock_32k_pin=0
<6>[ 0.538211] c0 1 (swapper/0) aml_wifi wifi.33: [wifi_dev_probe] host_sleep_wifi=0
<6>[ 0.538218] c0 1 (swapper/0) aml_wifi wifi.33: [wifi_dev_probe] shutdown_wifi = 0
<6>[ 0.538513] c1 1 (swapper/0) aml_wifi wifi.33: [wifi_setup_dt] wifi_setup_dt
<6>[ 0.538559] c1 1 (swapper/0) aml_wifi wifi.33: [wifi_setup_dt] interrupt_pin(241)
<6>[ 0.538575] c1 1 (swapper/0) aml_wifi wifi.33: [wifi_setup_dt] delay 1000us
<6>[ 0.539585] c1 1 (swapper/0) aml_wifi wifi.33: [wifi_setup_dt] power_on_pin(206)
<6>[ 0.539592] c1 1 (swapper/0) aml_wifi wifi.33: [wifi_setup_dt] power_level=0
GPIOs 145-154, platform/c1109880.pinmux, ao-bank:
gpio-147 (gpio_key ) in hi
GPIOs 155-255, platform/c1109880.pinmux, banks:
gpio-172 (sda ) in hi GPIOH_1
gpio-173 (scl ) in hi GPIOH_2
gpio-176 (mute_gpio ) out hi GPIOH_5 dio2133
gpio-190 (amlsd ) out hi BOOT_9 emmc_pwrseq
gpio-203 (amlsd ) in hi CARD_6 sd_emmc_b cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
gpio-206 (sdio_wifi ) out hi GPIODV_2 sdio_pwrseq
gpio-241 (sdio_wifi ) in lo GPIOX_7 interrupt-parent = <&pio>; interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
gpio-251 (bt_rfkill ) in lo GPIOX_17 shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
The right 2 columns are my comments.
it's easy to add gpio-keys (maybe reset hole) and i2c-gpio (I need more info about devices
under this bus).
I think GPIODV_2 is for sdio_pwrseq.
current dtb has a issue: wifi lost after reboot, below is the error.
mmc/core/sdio.c: pr_err("%s: error %d whilst initialising SDIO card\n",
after I change sdio_pwrseq gpio to GPIODV_2, no such error.
Now it requires me to finish wifi&bt device tree items to make wifi/bt
work. But I don't know how.
could I only submit what I can do right now (include gpio-keys and
i2c-gpio if has subdevice)?
On Thu, Jul 21, 2022 at 07:55:03PM +0200, Neil Armstrong wrote:
> On 21/07/2022 16:37, Zhang Ning wrote:
> > On Mon, Jul 18, 2022 at 10:02:32AM +0200, Neil Armstrong wrote:
> >
> > Thank you for review.
> > > Hi,
> > >
> > > On 12/07/2022 16:24, Zhang Ning wrote:
> > > > MagicBox M16S or MagicBox 3Pro is popular Tv box in China.
> > > >
> > > > it's gxm_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>
> > > > ---
> > > > arch/arm64/boot/dts/amlogic/Makefile | 1 +
> > > > .../dts/amlogic/meson-gxm-magicbox-m16s.dts | 20 +++++++++++++++++++
> > > > 2 files changed, 21 insertions(+)
> > > > create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
> > > >
> > > > 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..be543d65a529
> > > > --- /dev/null
> > > > +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-magicbox-m16s.dts
> > > > @@ -0,0 +1,20 @@
> > > > +// 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>
> > > > +#include <dt-bindings/leds/common.h>
> > > > +
> > > > +/ {
> > > > + compatible = "magicbox,m16s", "amlogic,s912", "amlogic,meson-gxm";
> > > > + model = "MagicBox M16S";
> > > > +};
> > >
> > > The compatible should be documented in the DT bindings in:
> > > Documentation/devicetree/bindings/arm/amlogic.yaml
> >
> > I will update this part next version.
> > >
> > > > +ðmac {
> > > > + phy-mode = "rmii";
> > > > + phy-handle = <&internal_phy>;
> > > > +};
> > >
> > > Is the sd_emmc_a change incompatible with the M16S ?
> >
> > sd_emmc_a is used as SDIO for wifi/bt. and wifi/bt works with this dtb.
> > I checked mrvl-sd8997 DT bindings, missing a lot of properties need
> > by mrvl-sd8997.
> >
> > I don't have schematics to fill these properties, need more time to
> > check vendor OS or try each GPIO.
>
> Ok fine no problem, you can push it later when you figure out the properties.
>
> > >
> > > Neil
>
> Neil
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-07-22 7:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-12 14:24 [PATCH] Add MagicBox M16S support Zhang Ning
2022-07-18 8:02 ` Neil Armstrong
2022-07-18 8:02 ` Neil Armstrong
2022-07-21 14:37 ` Zhang Ning
2022-07-21 17:55 ` Neil Armstrong
2022-07-21 17:55 ` Neil Armstrong
2022-07-22 7:10 ` Zhang Ning
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.