2024-03-11 17:48:15

by Kamil Kasperski

[permalink] [raw]
Subject: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

T95 is a most commonly known for being a box with a pre-installed malware.
It uses Allwinner H616 and comes with eMMC and DDR3 memory.
This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.

Kamil Kasperski (3):
dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
dt-bindings: arm: sunxi: add t95 compatible string to list of known
boards
dts: arm64: sunxi: add initial support for T95 AXP313 tv box

.../devicetree/bindings/arm/sunxi.yaml | 5 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
arch/arm64/boot/dts/allwinner/Makefile | 1 +
.../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
4 files changed, 146 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts

--
2.34.1



2024-03-11 17:48:22

by Kamil Kasperski

[permalink] [raw]
Subject: [PATCH 1/3] dt-bindings: vendor-prefixes: sunxi: add T95 string

T95 is a commonly known as series of cheap chinese TV Boxes with unknown brand.
Since their Android OS is built from Google Pixel 2 sources, all footprints metadata contain Google strings.
Let's assume the vendor of these boxes is t95.

Signed-off-by: Kamil Kasperski <[email protected]>
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index dfb834a9279f..b9b6a72545a5 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1381,6 +1381,8 @@ patternProperties:
"^synopsys,.*":
description: Synopsys, Inc. (deprecated, use snps)
deprecated: true
+ "^t95,.*":
+ description: T95
"^tbs,.*":
description: TBS Technologies
"^tbs-biometrics,.*":
--
2.34.1


2024-03-11 17:48:47

by Kamil Kasperski

[permalink] [raw]
Subject: [PATCH 2/3] dt-bindings: arm: sunxi: add t95 compatible string to list of known boards

T95 is a series of cheap TV boxes with unknown vendor.
Add compatible string for this board/SoC to the list of known boards.

Signed-off-by: Kamil Kasperski <[email protected]>
---
Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/sunxi.yaml b/Documentation/devicetree/bindings/arm/sunxi.yaml
index 09d835db6db5..1a2cef741d05 100644
--- a/Documentation/devicetree/bindings/arm/sunxi.yaml
+++ b/Documentation/devicetree/bindings/arm/sunxi.yaml
@@ -860,6 +860,11 @@ properties:
- const: allwinner,sl631
- const: allwinner,sun8i-v3

+ - description: T95 5G (AXP313) TV Box
+ items:
+ - const: t95,t95-axp313
+ - const: allwinner,sun50i-h616
+
- description: Tanix TX6
items:
- const: oranth,tanix-tx6
--
2.34.1


2024-03-11 17:49:00

by Kamil Kasperski

[permalink] [raw]
Subject: [PATCH 3/3] dts: arm64: sunxi: add initial dts for T95 AXP313 tv box

T95 is a most commonly known for being a box with a pre-installed malware.
It uses Allwinner H616 and comes with eMMC and DDR3 memory.

Those TV boxes usually come with common hardware:
- Allwinner H616 SoC
- 2/4 GB DDR3 SDRAM (Hynix H5TQ2G43BFR)
- 16/32/64 GB eMMC
- microSD slot
- AXP305 or AXP313 PMIC depending on board revision
- 3.5mm A/V output
- HDMI port
- 2x USB 2.0 ports
- 100M ETH using Internal PHY
- 7-segment display
- DC 5V barrel jack port

The board contains holes hor UART header wired to &uart0.
From the DRAM specification its operation voltage is 1.5V.

Signed-off-by: Kamil Kasperski <[email protected]>
---
arch/arm64/boot/dts/allwinner/Makefile | 1 +
.../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
2 files changed, 139 insertions(+)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index 21149b346a60..183dcdea40ad 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-t95-axp313.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-longanpi-3h.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero2w.dtb
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
new file mode 100644
index 000000000000..830a8815e675
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
@@ -0,0 +1,138 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2024 Kamil Kasperski <[email protected]>
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ model = "T95 5G (AXP313)";
+ compatible = "t95,t95-axp313", "allwinner,sun50i-h616";
+
+ aliases {
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ reg_vcc5v: vcc5v {
+ /* board wide 5V supply directly from the DC input */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-5v";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci2 {
+ status = "okay";
+};
+
+&ir {
+ status = "okay";
+};
+
+&mmc0 {
+ broken-cd;
+ vmmc-supply = <&reg_dldo1>;
+ status = "okay";
+};
+
+&mmc2 {
+ vmmc-supply = <&reg_dldo1>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ohci2 {
+ status = "okay";
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp313: pmic@36 {
+ compatible = "x-powers,axp313a";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ interrupt-parent = <&pio>;
+ interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>; /* PC9 */
+
+ vin1-supply = <&reg_vcc5v>;
+ vin2-supply = <&reg_vcc5v>;
+ vin3-supply = <&reg_vcc5v>;
+
+ regulators {
+ /* Supplies VCC-PLL, so needs to be always on. */
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc1v8";
+ };
+
+ /* Supplies VCC-IO, so needs to be always on. */
+ reg_dldo1: dldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc3v3";
+ };
+
+ reg_dcdc1: dcdc1 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <990000>;
+ regulator-name = "vdd-gpu-sys";
+ };
+
+ reg_dcdc2: dcdc2 {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1100000>;
+ regulator-name = "vdd-cpu";
+ };
+
+ reg_dcdc3: dcdc3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1500000>;
+ regulator-max-microvolt = <1500000>;
+ regulator-name = "vdd-dram";
+ };
+ };
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
+
+&usbotg {
+ dr_mode = "host"; /* USB A type receptable */
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
--
2.34.1


2024-03-12 11:26:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 1/3] dt-bindings: vendor-prefixes: sunxi: add T95 string

On 11/03/2024 18:47, Kamil Kasperski wrote:
> T95 is a commonly known as series of cheap chinese TV Boxes with unknown brand.
> Since their Android OS is built from Google Pixel 2 sources, all footprints metadata contain Google strings.
> Let's assume the vendor of these boxes is t95.
>
> Signed-off-by: Kamil Kasperski <[email protected]>

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline), work on fork of kernel
(don't, instead use mainline) or you ignore some maintainers (really
don't). Just use b4 and everything should be fine, although remember
about `b4 prep --auto-to-cc` if you added new patches to the patchset.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time, thus I will skip this patch entirely till you follow
the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.


Best regards,
Krzysztof


2024-03-12 11:26:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 2/3] dt-bindings: arm: sunxi: add t95 compatible string to list of known boards

On 11/03/2024 18:47, Kamil Kasperski wrote:
> T95 is a series of cheap TV boxes with unknown vendor.
> Add compatible string for this board/SoC to the list of known boards.
>
> Signed-off-by: Kamil Kasperski <[email protected]>
> ---
> Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
> 1 file changed, 5 insertions(+)

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC. It might happen, that command when run on an older
kernel, gives you outdated entries. Therefore please be sure you base
your patches on recent Linux kernel.

Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline), work on fork of kernel
(don't, instead use mainline) or you ignore some maintainers (really
don't). Just use b4 and everything should be fine, although remember
about `b4 prep --auto-to-cc` if you added new patches to the patchset.

You missed at least devicetree list (maybe more), so this won't be
tested by automated tooling. Performing review on untested code might be
a waste of time, thus I will skip this patch entirely till you follow
the process allowing the patch to be tested.

Please kindly resend and include all necessary To/Cc entries.


Best regards,
Krzysztof


2024-03-12 11:27:18

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 3/3] dts: arm64: sunxi: add initial dts for T95 AXP313 tv box

On 11/03/2024 18:47, Kamil Kasperski wrote:
> T95 is a most commonly known for being a box with a pre-installed malware.
> It uses Allwinner H616 and comes with eMMC and DDR3 memory.
>
> Those TV boxes usually come with common hardware:
> - Allwinner H616 SoC
> - 2/4 GB DDR3 SDRAM (Hynix H5TQ2G43BFR)
> - 16/32/64 GB eMMC
> - microSD slot
> - AXP305 or AXP313 PMIC depending on board revision
> - 3.5mm A/V output
> - HDMI port
> - 2x USB 2.0 ports
> - 100M ETH using Internal PHY
> - 7-segment display
> - DC 5V barrel jack port
>
> The board contains holes hor UART header wired to &uart0.
> From the DRAM specification its operation voltage is 1.5V.
>
> Signed-off-by: Kamil Kasperski <[email protected]>

Please use subject prefixes matching the subsystem. You can get them for
example with `git log --oneline -- DIRECTORY_OR_FILE` on the directory
your patch is touching.

> ---
> arch/arm64/boot/dts/allwinner/Makefile | 1 +
> .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
> 2 files changed, 139 insertions(+)
> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
>
> diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
> index 21149b346a60..183dcdea40ad 100644
> --- a/arch/arm64/boot/dts/allwinner/Makefile
> +++ b/arch/arm64/boot/dts/allwinner/Makefile
> @@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
> dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
> +dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-t95-axp313.dtb

't' goes before 'x'.

Keep the order.

Best regards,
Krzysztof


2024-03-13 18:38:28

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

Hi Kamil!

Dne ponedeljek, 11. marec 2024 ob 18:47:47 CET je Kamil Kasperski napisal(a):
> T95 is a most commonly known for being a box with a pre-installed malware.
> It uses Allwinner H616 and comes with eMMC and DDR3 memory.
> This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.

I have this board and it always felt like a clone of X96 Mate, which is
already supported in kernel, except for broken sd card detection. Would it
make sense to unify those two boards and just overwrite or update parts here
that are not the same?

Best regards,
Jernej

>
> Kamil Kasperski (3):
> dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
> dt-bindings: arm: sunxi: add t95 compatible string to list of known
> boards
> dts: arm64: sunxi: add initial support for T95 AXP313 tv box
>
> .../devicetree/bindings/arm/sunxi.yaml | 5 +
> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> arch/arm64/boot/dts/allwinner/Makefile | 1 +
> .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
> 4 files changed, 146 insertions(+)
> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
>
>





2024-03-13 19:27:54

by Andre Przywara

[permalink] [raw]
Subject: Re: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

On Wed, 13 Mar 2024 18:25:14 +0100
Jernej Škrabec <[email protected]> wrote:

> Hi Kamil!
>
> Dne ponedeljek, 11. marec 2024 ob 18:47:47 CET je Kamil Kasperski napisal(a):
> > T95 is a most commonly known for being a box with a pre-installed malware.
> > It uses Allwinner H616 and comes with eMMC and DDR3 memory.
> > This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.
>
> I have this board and it always felt like a clone of X96 Mate, which is
> already supported in kernel, except for broken sd card detection. Would it
> make sense to unify those two boards and just overwrite or update parts here
> that are not the same?

I think the box you have is an older one, with the AXP305? IIUC, this is
about a newer revision with the AXP313. There are quite some differences
between the two PMICs, though it might still make sense to share the DTs,
see the OrangePi Zero[23].

Cheers,
Andre

> > Kamil Kasperski (3):
> > dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
> > dt-bindings: arm: sunxi: add t95 compatible string to list of known
> > boards
> > dts: arm64: sunxi: add initial support for T95 AXP313 tv box
> >
> > .../devicetree/bindings/arm/sunxi.yaml | 5 +
> > .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> > arch/arm64/boot/dts/allwinner/Makefile | 1 +
> > .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
> > 4 files changed, 146 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
> >
> >
>
>
>
>
>


2024-03-13 19:50:40

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

Dne sreda, 13. marec 2024 ob 18:38:08 CET je Andre Przywara napisal(a):
> On Wed, 13 Mar 2024 18:25:14 +0100
> Jernej Škrabec <[email protected]> wrote:
>
> > Hi Kamil!
> >
> > Dne ponedeljek, 11. marec 2024 ob 18:47:47 CET je Kamil Kasperski napisal(a):
> > > T95 is a most commonly known for being a box with a pre-installed malware.
> > > It uses Allwinner H616 and comes with eMMC and DDR3 memory.
> > > This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.
> >
> > I have this board and it always felt like a clone of X96 Mate, which is
> > already supported in kernel, except for broken sd card detection. Would it
> > make sense to unify those two boards and just overwrite or update parts here
> > that are not the same?
>
> I think the box you have is an older one, with the AXP305? IIUC, this is
> about a newer revision with the AXP313. There are quite some differences
> between the two PMICs, though it might still make sense to share the DTs,
> see the OrangePi Zero[23].

Right, mine is with AXP305. It has "T95MAX v4.0" printed on PCB.

Kamil, does your board also have "MAX" mentioned somewhere?

Best regards,
Jernej

>
> Cheers,
> Andre
>
> > > Kamil Kasperski (3):
> > > dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
> > > dt-bindings: arm: sunxi: add t95 compatible string to list of known
> > > boards
> > > dts: arm64: sunxi: add initial support for T95 AXP313 tv box
> > >
> > > .../devicetree/bindings/arm/sunxi.yaml | 5 +
> > > .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> > > arch/arm64/boot/dts/allwinner/Makefile | 1 +
> > > .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
> > > 4 files changed, 146 insertions(+)
> > > create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
> > >
> > >
> >
> >
> >
> >
> >
>
>





2024-03-14 00:20:01

by Kamil Kasperski

[permalink] [raw]
Subject: Re: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

Hi Jernej, Andre!

Thanks for the reply. My board has a name "H616-T95MAX-AXP313A-v3.0".

I believe these boards are two different revisions and the one with
AXP313A is a newer one, besides incorrectly label as v3.0. Sharing
common configuration between boxes is also a good idea but for this
specific configuration I would be cautious. From my experience with this
board the default configuration for X96 Mate is not working at all. I
suspect because of the PMIC and DRAM differences.

Memory installed in X96 Mate is DDR3L and in mine T95 it's DDR3, hynix
H5TQ2G43BFR, that requires 1.5V to operate.

The rest of configuration for both boards, like HDMI, MMC, EPHY and
audio codec seems to be the same across almost all H616-based boxes that
I've researched.


Moreover please let me update the patches and send v2 that aligns with
mainline branch. I've incorrectly assumed to use sunxi fork instead of
master. Sorry!

W dniu 13.03.2024 o 19:00, Jernej Škrabec pisze:
> Dne sreda, 13. marec 2024 ob 18:38:08 CET je Andre Przywara napisal(a):
>> On Wed, 13 Mar 2024 18:25:14 +0100
>> Jernej Škrabec <[email protected]> wrote:
>>
>>> Hi Kamil!
>>>
>>> Dne ponedeljek, 11. marec 2024 ob 18:47:47 CET je Kamil Kasperski napisal(a):
>>>> T95 is a most commonly known for being a box with a pre-installed malware.
>>>> It uses Allwinner H616 and comes with eMMC and DDR3 memory.
>>>> This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.
>>> I have this board and it always felt like a clone of X96 Mate, which is
>>> already supported in kernel, except for broken sd card detection. Would it
>>> make sense to unify those two boards and just overwrite or update parts here
>>> that are not the same?
>> I think the box you have is an older one, with the AXP305? IIUC, this is
>> about a newer revision with the AXP313. There are quite some differences
>> between the two PMICs, though it might still make sense to share the DTs,
>> see the OrangePi Zero[23].
> Right, mine is with AXP305. It has "T95MAX v4.0" printed on PCB.
>
> Kamil, does your board also have "MAX" mentioned somewhere?
>
> Best regards,
> Jernej
>
>> Cheers,
>> Andre
>>
>>>> Kamil Kasperski (3):
>>>> dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
>>>> dt-bindings: arm: sunxi: add t95 compatible string to list of known
>>>> boards
>>>> dts: arm64: sunxi: add initial support for T95 AXP313 tv box
>>>>
>>>> .../devicetree/bindings/arm/sunxi.yaml | 5 +
>>>> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
>>>> arch/arm64/boot/dts/allwinner/Makefile | 1 +
>>>> .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
>>>> 4 files changed, 146 insertions(+)
>>>> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>
>
>

2024-03-14 16:51:02

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

Dne četrtek, 14. marec 2024 ob 01:19:28 CET je Kamil Kasperski napisal(a):
> Hi Jernej, Andre!

Please no top posting as per rules.

>
> Thanks for the reply. My board has a name "H616-T95MAX-AXP313A-v3.0".

Ok, we for sure need to integrate this somehow to compatible string, since
there are at least two incompatible versions.

>
> I believe these boards are two different revisions and the one with
> AXP313A is a newer one, besides incorrectly label as v3.0. Sharing
> common configuration between boxes is also a good idea but for this
> specific configuration I would be cautious. From my experience with this
> board the default configuration for X96 Mate is not working at all. I
> suspect because of the PMIC and DRAM differences.
>
> Memory installed in X96 Mate is DDR3L and in mine T95 it's DDR3, hynix
> H5TQ2G43BFR, that requires 1.5V to operate.

PMIC is important difference, yes, but not DRAM. DDR3L is completely compatible
with DDR3. It just additionally supports lower voltages. Additionally, Linux
doesn't care about DRAM type and all. It's firmware responsibility to properly
initialize it.

Best regards,
Jernej

>
> The rest of configuration for both boards, like HDMI, MMC, EPHY and
> audio codec seems to be the same across almost all H616-based boxes that
> I've researched.
>
>
> Moreover please let me update the patches and send v2 that aligns with
> mainline branch. I've incorrectly assumed to use sunxi fork instead of
> master. Sorry!
>
> W dniu 13.03.2024 o 19:00, Jernej Škrabec pisze:
> > Dne sreda, 13. marec 2024 ob 18:38:08 CET je Andre Przywara napisal(a):
> >> On Wed, 13 Mar 2024 18:25:14 +0100
> >> Jernej Škrabec <[email protected]> wrote:
> >>
> >>> Hi Kamil!
> >>>
> >>> Dne ponedeljek, 11. marec 2024 ob 18:47:47 CET je Kamil Kasperski napisal(a):
> >>>> T95 is a most commonly known for being a box with a pre-installed malware.
> >>>> It uses Allwinner H616 and comes with eMMC and DDR3 memory.
> >>>> This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.
> >>> I have this board and it always felt like a clone of X96 Mate, which is
> >>> already supported in kernel, except for broken sd card detection. Would it
> >>> make sense to unify those two boards and just overwrite or update parts here
> >>> that are not the same?
> >> I think the box you have is an older one, with the AXP305? IIUC, this is
> >> about a newer revision with the AXP313. There are quite some differences
> >> between the two PMICs, though it might still make sense to share the DTs,
> >> see the OrangePi Zero[23].
> > Right, mine is with AXP305. It has "T95MAX v4.0" printed on PCB.
> >
> > Kamil, does your board also have "MAX" mentioned somewhere?
> >
> > Best regards,
> > Jernej
> >
> >> Cheers,
> >> Andre
> >>
> >>>> Kamil Kasperski (3):
> >>>> dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
> >>>> dt-bindings: arm: sunxi: add t95 compatible string to list of known
> >>>> boards
> >>>> dts: arm64: sunxi: add initial support for T95 AXP313 tv box
> >>>>
> >>>> .../devicetree/bindings/arm/sunxi.yaml | 5 +
> >>>> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> >>>> arch/arm64/boot/dts/allwinner/Makefile | 1 +
> >>>> .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
> >>>> 4 files changed, 146 insertions(+)
> >>>> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>
> >
> >
> >
>





2024-03-15 00:57:47

by Kamil Kasperski

[permalink] [raw]
Subject: Re: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

W dniu 14.03.2024 o 17:50, Jernej Škrabec pisze:
> Dne četrtek, 14. marec 2024 ob 01:19:28 CET je Kamil Kasperski napisal(a):
>> Hi Jernej, Andre!
> Please no top posting as per rules.

Sure. I'm not used to this kind of work, so please bear the mistakes I make.

>
>> Thanks for the reply. My board has a name "H616-T95MAX-AXP313A-v3.0".
> Ok, we for sure need to integrate this somehow to compatible string, since
> there are at least two incompatible versions.

It's good idea to introduce dtsi with common configuration for both boxes and add 2 new dts files with compatible string
"t95,t95max-axp313" and "t95,t95max-axp305" with separate PMIC configuration. Similarly as OrangePI Zero got handled.

Not to mention, that it looks like arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts also has very similar configuration to my T95 box. Question is should we mix up the compatible strings for SoC?
I know that H616 and H618 are almost identical SoCs, but if it's not only a matter of documentation it's still better idea to push new dts.

Best Regards,
Kamil

>> I believe these boards are two different revisions and the one with
>> AXP313A is a newer one, besides incorrectly label as v3.0. Sharing
>> common configuration between boxes is also a good idea but for this
>> specific configuration I would be cautious. From my experience with this
>> board the default configuration for X96 Mate is not working at all. I
>> suspect because of the PMIC and DRAM differences.
>>
>> Memory installed in X96 Mate is DDR3L and in mine T95 it's DDR3, hynix
>> H5TQ2G43BFR, that requires 1.5V to operate.
> PMIC is important difference, yes, but not DRAM. DDR3L is completely compatible
> with DDR3. It just additionally supports lower voltages. Additionally, Linux
> doesn't care about DRAM type and all. It's firmware responsibility to properly
> initialize it.
>
> Best regards,
> Jernej
>
>> The rest of configuration for both boards, like HDMI, MMC, EPHY and
>> audio codec seems to be the same across almost all H616-based boxes that
>> I've researched.
>>
>>
>> Moreover please let me update the patches and send v2 that aligns with
>> mainline branch. I've incorrectly assumed to use sunxi fork instead of
>> master. Sorry!
>>
>> W dniu 13.03.2024 o 19:00, Jernej Škrabec pisze:
>>> Dne sreda, 13. marec 2024 ob 18:38:08 CET je Andre Przywara napisal(a):
>>>> On Wed, 13 Mar 2024 18:25:14 +0100
>>>> Jernej Škrabec <[email protected]> wrote:
>>>>
>>>>> Hi Kamil!
>>>>>
>>>>> Dne ponedeljek, 11. marec 2024 ob 18:47:47 CET je Kamil Kasperski napisal(a):
>>>>>> T95 is a most commonly known for being a box with a pre-installed malware.
>>>>>> It uses Allwinner H616 and comes with eMMC and DDR3 memory.
>>>>>> This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.
>>>>> I have this board and it always felt like a clone of X96 Mate, which is
>>>>> already supported in kernel, except for broken sd card detection. Would it
>>>>> make sense to unify those two boards and just overwrite or update parts here
>>>>> that are not the same?
>>>> I think the box you have is an older one, with the AXP305? IIUC, this is
>>>> about a newer revision with the AXP313. There are quite some differences
>>>> between the two PMICs, though it might still make sense to share the DTs,
>>>> see the OrangePi Zero[23].
>>> Right, mine is with AXP305. It has "T95MAX v4.0" printed on PCB.
>>>
>>> Kamil, does your board also have "MAX" mentioned somewhere?
>>>
>>> Best regards,
>>> Jernej
>>>
>>>> Cheers,
>>>> Andre
>>>>
>>>>>> Kamil Kasperski (3):
>>>>>> dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
>>>>>> dt-bindings: arm: sunxi: add t95 compatible string to list of known
>>>>>> boards
>>>>>> dts: arm64: sunxi: add initial support for T95 AXP313 tv box
>>>>>>
>>>>>> .../devicetree/bindings/arm/sunxi.yaml | 5 +
>>>>>> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
>>>>>> arch/arm64/boot/dts/allwinner/Makefile | 1 +
>>>>>> .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
>>>>>> 4 files changed, 146 insertions(+)
>>>>>> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>
>


2024-03-15 18:21:04

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [PATCH 0/3] dts: arm64: sunxi: add initial support for t95 tv box

Dne petek, 15. marec 2024 ob 01:57:21 CET je Kamil Kasperski napisal(a):
> W dniu 14.03.2024 o 17:50, Jernej Škrabec pisze:
> > Dne četrtek, 14. marec 2024 ob 01:19:28 CET je Kamil Kasperski napisal(a):
> >> Hi Jernej, Andre!
> > Please no top posting as per rules.
>
> Sure. I'm not used to this kind of work, so please bear the mistakes I make.

And line length should be 78 character max. Please read Linux netiquette.

>
> >
> >> Thanks for the reply. My board has a name "H616-T95MAX-AXP313A-v3.0".
> > Ok, we for sure need to integrate this somehow to compatible string, since
> > there are at least two incompatible versions.
>
> It's good idea to introduce dtsi with common configuration for both boxes and add 2 new dts files with compatible string
> "t95,t95max-axp313" and "t95,t95max-axp305" with separate PMIC configuration. Similarly as OrangePI Zero got handled.

Correct.

>
> Not to mention, that it looks like arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts also has very similar configuration to my T95 box. Question is should we mix up the compatible strings for SoC?
> I know that H616 and H618 are almost identical SoCs, but if it's not only a matter of documentation it's still better idea to push new dts.

Not sure what do you mean. We can mix and match whatever DTSI we want. However,
board compatible reflect SoC in them. So yes, if it make sense, Transpeed 8k618-t
can share same common DTSI, just board level DTS will have H616 compatible.

Best regards,
Jernej

>
> Best Regards,
> Kamil
>
> >> I believe these boards are two different revisions and the one with
> >> AXP313A is a newer one, besides incorrectly label as v3.0. Sharing
> >> common configuration between boxes is also a good idea but for this
> >> specific configuration I would be cautious. From my experience with this
> >> board the default configuration for X96 Mate is not working at all. I
> >> suspect because of the PMIC and DRAM differences.
> >>
> >> Memory installed in X96 Mate is DDR3L and in mine T95 it's DDR3, hynix
> >> H5TQ2G43BFR, that requires 1.5V to operate.
> > PMIC is important difference, yes, but not DRAM. DDR3L is completely compatible
> > with DDR3. It just additionally supports lower voltages. Additionally, Linux
> > doesn't care about DRAM type and all. It's firmware responsibility to properly
> > initialize it.
> >
> > Best regards,
> > Jernej
> >
> >> The rest of configuration for both boards, like HDMI, MMC, EPHY and
> >> audio codec seems to be the same across almost all H616-based boxes that
> >> I've researched.
> >>
> >>
> >> Moreover please let me update the patches and send v2 that aligns with
> >> mainline branch. I've incorrectly assumed to use sunxi fork instead of
> >> master. Sorry!
> >>
> >> W dniu 13.03.2024 o 19:00, Jernej Škrabec pisze:
> >>> Dne sreda, 13. marec 2024 ob 18:38:08 CET je Andre Przywara napisal(a):
> >>>> On Wed, 13 Mar 2024 18:25:14 +0100
> >>>> Jernej Škrabec <[email protected]> wrote:
> >>>>
> >>>>> Hi Kamil!
> >>>>>
> >>>>> Dne ponedeljek, 11. marec 2024 ob 18:47:47 CET je Kamil Kasperski napisal(a):
> >>>>>> T95 is a most commonly known for being a box with a pre-installed malware.
> >>>>>> It uses Allwinner H616 and comes with eMMC and DDR3 memory.
> >>>>>> This device comes with two versions - one with AXP305 PMIC and another with AXP313 PMIC.
> >>>>> I have this board and it always felt like a clone of X96 Mate, which is
> >>>>> already supported in kernel, except for broken sd card detection. Would it
> >>>>> make sense to unify those two boards and just overwrite or update parts here
> >>>>> that are not the same?
> >>>> I think the box you have is an older one, with the AXP305? IIUC, this is
> >>>> about a newer revision with the AXP313. There are quite some differences
> >>>> between the two PMICs, though it might still make sense to share the DTs,
> >>>> see the OrangePi Zero[23].
> >>> Right, mine is with AXP305. It has "T95MAX v4.0" printed on PCB.
> >>>
> >>> Kamil, does your board also have "MAX" mentioned somewhere?
> >>>
> >>> Best regards,
> >>> Jernej
> >>>
> >>>> Cheers,
> >>>> Andre
> >>>>
> >>>>>> Kamil Kasperski (3):
> >>>>>> dt-bindings: vendor-prefixes: sunxi: add T95 to vendor-prefixes
> >>>>>> dt-bindings: arm: sunxi: add t95 compatible string to list of known
> >>>>>> boards
> >>>>>> dts: arm64: sunxi: add initial support for T95 AXP313 tv box
> >>>>>>
> >>>>>> .../devicetree/bindings/arm/sunxi.yaml | 5 +
> >>>>>> .../devicetree/bindings/vendor-prefixes.yaml | 2 +
> >>>>>> arch/arm64/boot/dts/allwinner/Makefile | 1 +
> >>>>>> .../dts/allwinner/sun50i-h616-t95-axp313.dts | 138 ++++++++++++++++++
> >>>>>> 4 files changed, 146 insertions(+)
> >>>>>> create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-t95-axp313.dts
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >
> >
> >
>
>