* [PATCH 1/2] arm: dts: Transpeed 8K618-T: Add Transpeed 8K618-T board support
@ 2024-01-17 16:37 Nick Alilovic
2024-01-17 16:37 ` [PATCH 2/2] configs: " Nick Alilovic
2024-01-17 21:52 ` [PATCH 1/2] arm: dts: " Andre Przywara
0 siblings, 2 replies; 4+ messages in thread
From: Nick Alilovic @ 2024-01-17 16:37 UTC (permalink / raw)
To: u-boot; +Cc: andre.przywara, jagan, linux-sunxi, Nick Alilovic
This is the DT I used from the Linux kernel. Made changes to the Makefile to build the new DTB.
Signed-off-by: Nick Alilovic <nickalilovic@gmail.com>
---
arch/arm/dts/Makefile | 1 +
.../arm/dts/sun50i-h618-transpeed-8k618-t.dts | 161 ++++++++++++++++++
2 files changed, 162 insertions(+)
create mode 100644 arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index d456a524b3..cacd21558a 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -836,6 +836,7 @@ dtb-$(CONFIG_MACH_SUN50I_H6) += \
dtb-$(CONFIG_MACH_SUN50I_H616) += \
sun50i-h616-orangepi-zero2.dtb \
sun50i-h618-orangepi-zero3.dtb \
+ sun50i-h618-transpeed-8k618-t.dtb \
sun50i-h616-x96-mate.dtb
dtb-$(CONFIG_MACH_SUN50I) += \
sun50i-a64-amarula-relic.dtb \
diff --git a/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts b/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts
new file mode 100644
index 0000000000..8ea1fd41ae
--- /dev/null
+++ b/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts
@@ -0,0 +1,161 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (C) 2023 Arm Ltd.
+ */
+
+/dts-v1/;
+
+#include "sun50i-h616.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+ model = "Transpeed 8K618-T";
+ compatible = "transpeed,8k618-t", "allwinner,sun50i-h618";
+
+ 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;
+ };
+
+ reg_vcc3v3: vcc3v3 {
+ /* discrete 3.3V regulator */
+ compatible = "regulator-fixed";
+ regulator-name = "vcc-3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&ir {
+ status = "okay";
+};
+
+&mmc0 {
+ vmmc-supply = <®_dldo1>;
+ cd-gpios = <&pio 8 16 GPIO_ACTIVE_LOW>; /* PI16 */
+ bus-width = <4>;
+ status = "okay";
+};
+
+&mmc2 {
+ vmmc-supply = <®_dldo1>;
+ vqmmc-supply = <®_aldo1>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ mmc-ddr-1_8v;
+ mmc-hs200-1_8v;
+ status = "okay";
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp313: pmic@36 {
+ compatible = "x-powers,axp313a";
+ reg = <0x36>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+
+ vin1-supply = <®_vcc5v>;
+ vin2-supply = <®_vcc5v>;
+ vin3-supply = <®_vcc5v>;
+
+ regulators {
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-1v8-pll";
+ };
+
+ reg_dldo1: dldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-3v3-io-mmc";
+ };
+
+ 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 = <1360000>;
+ regulator-max-microvolt = <1360000>;
+ regulator-name = "vdd-dram";
+ };
+ };
+ };
+};
+
+&pio {
+ vcc-pc-supply = <®_aldo1>;
+ vcc-pg-supply = <®_dldo1>;
+ vcc-ph-supply = <®_dldo1>;
+ vcc-pi-supply = <®_dldo1>;
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+ uart-has-rtscts;
+ status = "okay";
+};
+
+&usbotg {
+ dr_mode = "host"; /* USB A type receptable */
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH 2/2] configs: Transpeed 8K618-T: Add Transpeed 8K618-T board support
2024-01-17 16:37 [PATCH 1/2] arm: dts: Transpeed 8K618-T: Add Transpeed 8K618-T board support Nick Alilovic
@ 2024-01-17 16:37 ` Nick Alilovic
2024-01-17 21:46 ` Andre Przywara
2024-01-17 21:52 ` [PATCH 1/2] arm: dts: " Andre Przywara
1 sibling, 1 reply; 4+ messages in thread
From: Nick Alilovic @ 2024-01-17 16:37 UTC (permalink / raw)
To: u-boot; +Cc: andre.przywara, jagan, linux-sunxi, Nick Alilovic
This is a Chinese TV box based on Allwinner H618 SoC.
The DRAM parameters were derived from the values found in a firmware update.
This patch will add transpeed-8k618-t_defconfig to the configs directory.
Signed-off-by: Nick Alilovic <nickalilovic@gmail.com>
---
configs/transpeed-8k618-t_defconfig | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 configs/transpeed-8k618-t_defconfig
diff --git a/configs/transpeed-8k618-t_defconfig b/configs/transpeed-8k618-t_defconfig
new file mode 100644
index 0000000000..7090577199
--- /dev/null
+++ b/configs/transpeed-8k618-t_defconfig
@@ -0,0 +1,25 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h618-transpeed-8k618-t"
+CONFIG_SPL=y
+CONFIG_DRAM_SUN50I_H616_DX_ODT=0x03030303
+CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
+CONFIG_DRAM_SUN50I_H616_CA_DRI=0x1f12
+CONFIG_DRAM_SUN50I_H616_TPR0=0xc0001002
+CONFIG_DRAM_SUN50I_H616_TPR10=0x2f1107
+CONFIG_DRAM_SUN50I_H616_TPR11=0xddddcccc
+CONFIG_DRAM_SUN50I_H616_TPR12=0xeddc7665
+CONFIG_MACH_SUN50I_H616=y
+CONFIG_SUNXI_DRAM_H616_DDR3_1333=y
+CONFIG_DRAM_CLK=648
+CONFIG_R_I2C_ENABLE=y
+CONFIG_SPL_I2C=y
+CONFIG_SPL_SYS_I2C_LEGACY=y
+CONFIG_SYS_I2C_MVTWSI=y
+CONFIG_SYS_I2C_SLAVE=0x7f
+CONFIG_SYS_I2C_SPEED=400000
+CONFIG_SUPPORT_EMMC_BOOT=y
+CONFIG_AXP313_POWER=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_AXP_DCDC3_VOLT=1360
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] configs: Transpeed 8K618-T: Add Transpeed 8K618-T board support
2024-01-17 16:37 ` [PATCH 2/2] configs: " Nick Alilovic
@ 2024-01-17 21:46 ` Andre Przywara
0 siblings, 0 replies; 4+ messages in thread
From: Andre Przywara @ 2024-01-17 21:46 UTC (permalink / raw)
To: Nick Alilovic; +Cc: u-boot, jagan, linux-sunxi
On Wed, 17 Jan 2024 11:37:56 -0500
Nick Alilovic <nickalilovic@gmail.com> wrote:
Hi Nick,
thanks for sending this!
> This is a Chinese TV box based on Allwinner H618 SoC.
>
> The DRAM parameters were derived from the values found in a firmware update.
>
> This patch will add transpeed-8k618-t_defconfig to the configs directory.
This last sentence is a bit out of place, the typical tone in a commit
message is to "direct the repository to make a change", so you use an
imperative. But it's more directed to the human reader of course, so
you don't need to replicate details like the exact filename, that are
spelt out three lines below here. So just a simple:
Add the defconfig file.
would suffice.
>
> Signed-off-by: Nick Alilovic <nickalilovic@gmail.com>
> ---
> configs/transpeed-8k618-t_defconfig | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
> create mode 100644 configs/transpeed-8k618-t_defconfig
>
> diff --git a/configs/transpeed-8k618-t_defconfig b/configs/transpeed-8k618-t_defconfig
> new file mode 100644
> index 0000000000..7090577199
> --- /dev/null
> +++ b/configs/transpeed-8k618-t_defconfig
> @@ -0,0 +1,25 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_SUNXI=y
> +CONFIG_DEFAULT_DEVICE_TREE="sun50i-h618-transpeed-8k618-t"
> +CONFIG_SPL=y
> +CONFIG_DRAM_SUN50I_H616_DX_ODT=0x03030303
> +CONFIG_DRAM_SUN50I_H616_DX_DRI=0x0e0e0e0e
> +CONFIG_DRAM_SUN50I_H616_CA_DRI=0x1f12
> +CONFIG_DRAM_SUN50I_H616_TPR0=0xc0001002
> +CONFIG_DRAM_SUN50I_H616_TPR10=0x2f1107
> +CONFIG_DRAM_SUN50I_H616_TPR11=0xddddcccc
> +CONFIG_DRAM_SUN50I_H616_TPR12=0xeddc7665
> +CONFIG_MACH_SUN50I_H616=y
> +CONFIG_SUNXI_DRAM_H616_DDR3_1333=y
> +CONFIG_DRAM_CLK=648
> +CONFIG_R_I2C_ENABLE=y
> +CONFIG_SPL_I2C=y
> +CONFIG_SPL_SYS_I2C_LEGACY=y
> +CONFIG_SYS_I2C_MVTWSI=y
> +CONFIG_SYS_I2C_SLAVE=0x7f
> +CONFIG_SYS_I2C_SPEED=400000
> +CONFIG_SUPPORT_EMMC_BOOT=y
You correctly mention this, but miss the required MMC controller number:
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
> +CONFIG_AXP313_POWER=y
> +CONFIG_USB_EHCI_HCD=y
> +CONFIG_USB_OHCI_HCD=y
> +CONFIG_AXP_DCDC3_VOLT=1360
This line belongs a few lines up. There is some non-obvious order of
those lines, which you can obtain by running "make savedefconfig" after
"make transpeed-8k618-t_defconfig". This will create a "defconfig"
file, which contains the minimal defconfig, in the right order. This
will be done routinely on all files in the configs/ directory
eventually, but it's good measure to get this right from the beginning,
to reduce churn.
You are also missing:
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
which is somewhat mandatory on all Allwinner boards.
I don't actually remember why exactly, but we have this for almost
every sunxi board.
Thanks,
Andre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] arm: dts: Transpeed 8K618-T: Add Transpeed 8K618-T board support
2024-01-17 16:37 [PATCH 1/2] arm: dts: Transpeed 8K618-T: Add Transpeed 8K618-T board support Nick Alilovic
2024-01-17 16:37 ` [PATCH 2/2] configs: " Nick Alilovic
@ 2024-01-17 21:52 ` Andre Przywara
1 sibling, 0 replies; 4+ messages in thread
From: Andre Przywara @ 2024-01-17 21:52 UTC (permalink / raw)
To: Nick Alilovic; +Cc: u-boot, jagan, linux-sunxi
On Wed, 17 Jan 2024 11:37:55 -0500
Nick Alilovic <nickalilovic@gmail.com> wrote:
Hi Nick,
> This is the DT I used from the Linux kernel. Made changes to the Makefile to build the new DTB.
thanks, I will copy in this file along with other changes during the
upcoming DT sync, with all the sunxi DT bits queued for Linux v6.8 -
after the merge window closes. Weather permitting ;-) this should be
early next week.
Cheers,
Andre
> Signed-off-by: Nick Alilovic <nickalilovic@gmail.com>
> ---
> arch/arm/dts/Makefile | 1 +
> .../arm/dts/sun50i-h618-transpeed-8k618-t.dts | 161 ++++++++++++++++++
> 2 files changed, 162 insertions(+)
> create mode 100644 arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts
>
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index d456a524b3..cacd21558a 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -836,6 +836,7 @@ dtb-$(CONFIG_MACH_SUN50I_H6) += \
> dtb-$(CONFIG_MACH_SUN50I_H616) += \
> sun50i-h616-orangepi-zero2.dtb \
> sun50i-h618-orangepi-zero3.dtb \
> + sun50i-h618-transpeed-8k618-t.dtb \
> sun50i-h616-x96-mate.dtb
> dtb-$(CONFIG_MACH_SUN50I) += \
> sun50i-a64-amarula-relic.dtb \
> diff --git a/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts b/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts
> new file mode 100644
> index 0000000000..8ea1fd41ae
> --- /dev/null
> +++ b/arch/arm/dts/sun50i-h618-transpeed-8k618-t.dts
> @@ -0,0 +1,161 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright (C) 2023 Arm Ltd.
> + */
> +
> +/dts-v1/;
> +
> +#include "sun50i-h616.dtsi"
> +
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +/ {
> + model = "Transpeed 8K618-T";
> + compatible = "transpeed,8k618-t", "allwinner,sun50i-h618";
> +
> + 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;
> + };
> +
> + reg_vcc3v3: vcc3v3 {
> + /* discrete 3.3V regulator */
> + compatible = "regulator-fixed";
> + regulator-name = "vcc-3v3";
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-always-on;
> + };
> +};
> +
> +&ehci0 {
> + status = "okay";
> +};
> +
> +&ehci1 {
> + status = "okay";
> +};
> +
> +&ir {
> + status = "okay";
> +};
> +
> +&mmc0 {
> + vmmc-supply = <®_dldo1>;
> + cd-gpios = <&pio 8 16 GPIO_ACTIVE_LOW>; /* PI16 */
> + bus-width = <4>;
> + status = "okay";
> +};
> +
> +&mmc2 {
> + vmmc-supply = <®_dldo1>;
> + vqmmc-supply = <®_aldo1>;
> + bus-width = <8>;
> + non-removable;
> + cap-mmc-hw-reset;
> + mmc-ddr-1_8v;
> + mmc-hs200-1_8v;
> + status = "okay";
> +};
> +
> +&ohci0 {
> + status = "okay";
> +};
> +
> +&ohci1 {
> + status = "okay";
> +};
> +
> +&r_i2c {
> + status = "okay";
> +
> + axp313: pmic@36 {
> + compatible = "x-powers,axp313a";
> + reg = <0x36>;
> + #interrupt-cells = <1>;
> + interrupt-controller;
> +
> + vin1-supply = <®_vcc5v>;
> + vin2-supply = <®_vcc5v>;
> + vin3-supply = <®_vcc5v>;
> +
> + regulators {
> + reg_aldo1: aldo1 {
> + regulator-always-on;
> + regulator-min-microvolt = <1800000>;
> + regulator-max-microvolt = <1800000>;
> + regulator-name = "vcc-1v8-pll";
> + };
> +
> + reg_dldo1: dldo1 {
> + regulator-always-on;
> + regulator-min-microvolt = <3300000>;
> + regulator-max-microvolt = <3300000>;
> + regulator-name = "vcc-3v3-io-mmc";
> + };
> +
> + 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 = <1360000>;
> + regulator-max-microvolt = <1360000>;
> + regulator-name = "vdd-dram";
> + };
> + };
> + };
> +};
> +
> +&pio {
> + vcc-pc-supply = <®_aldo1>;
> + vcc-pg-supply = <®_dldo1>;
> + vcc-ph-supply = <®_dldo1>;
> + vcc-pi-supply = <®_dldo1>;
> +};
> +
> +&uart0 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart0_ph_pins>;
> + status = "okay";
> +};
> +
> +&uart1 {
> + pinctrl-names = "default";
> + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
> + uart-has-rtscts;
> + status = "okay";
> +};
> +
> +&usbotg {
> + dr_mode = "host"; /* USB A type receptable */
> + status = "okay";
> +};
> +
> +&usbphy {
> + status = "okay";
> +};
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-17 21:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 16:37 [PATCH 1/2] arm: dts: Transpeed 8K618-T: Add Transpeed 8K618-T board support Nick Alilovic
2024-01-17 16:37 ` [PATCH 2/2] configs: " Nick Alilovic
2024-01-17 21:46 ` Andre Przywara
2024-01-17 21:52 ` [PATCH 1/2] arm: dts: " Andre Przywara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox