[PATCH 0/2] Add support for pine H64 model B board

The following patches add support for the pine H64 model B board. The hardware differences to the pine H64 model A are minimal and not relevant for u-boot. The differences in the device-tree are relevant in linux though and the u-boot preset for the 'fdtfile' variable is infered from CONFIG_DEFAULT_DEVICE_TREE, thus using the model A's u-boot on a model B board works, but selects the wrong device tree when booting linux.
An alternative approach would be to implement logic like used by e.g. the rockchip based boards to use the separate CONFIG_DEFAULT_FDT_FILE option to preset the 'fdtfile' variable and thus select the device-tree to use when booting linux. I prefer the 'copy dts file from linux kernel src' approach as implemented in these patches.
If necessary I'd also be willing to be the maintainer for this board. But since I'm (not yet) paying attention to u-boot development progress I'd prefer if this would be maintained together with the pine H64 model A board.
CC Icenowy Zheng as the pine H64 model A maintianer.
Daniel Wagenknecht (2): sunxi: dts: add device-tree for pine H64 model B sunxi: configs: add defconfig for pine H64 model B
arch/arm/dts/Makefile | 1 + arch/arm/dts/sun50i-h6-pine-h64-model-b.dts | 51 +++++++++++++++++++++ configs/pine_h64-model-b_defconfig | 21 +++++++++ 3 files changed, 73 insertions(+) create mode 100644 arch/arm/dts/sun50i-h6-pine-h64-model-b.dts create mode 100644 configs/pine_h64-model-b_defconfig

Add the device-tree for pine H64 model B from 5.15 mainline linux.
The differences between the pine H64 boards model A and model B are irrelevant inside u-boot, but the device-tree name is relevant as default for selecting the correct device-tree when booting linux.
Signed-off-by: Daniel Wagenknecht dwagenk@mailbox.org --- arch/arm/dts/Makefile | 1 + arch/arm/dts/sun50i-h6-pine-h64-model-b.dts | 51 +++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 arch/arm/dts/sun50i-h6-pine-h64-model-b.dts
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 7f622fedbd..a9618d80ca 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -658,6 +658,7 @@ dtb-$(CONFIG_MACH_SUN50I_H6) += \ sun50i-h6-orangepi-lite2.dtb \ sun50i-h6-orangepi-one-plus.dtb \ sun50i-h6-pine-h64.dtb \ + sun50i-h6-pine-h64-model-b.dtb \ sun50i-h6-tanix-tx6.dtb dtb-$(CONFIG_MACH_SUN50I_H616) += \ sun50i-h616-orangepi-zero2.dtb diff --git a/arch/arm/dts/sun50i-h6-pine-h64-model-b.dts b/arch/arm/dts/sun50i-h6-pine-h64-model-b.dts new file mode 100644 index 0000000000..686f58e770 --- /dev/null +++ b/arch/arm/dts/sun50i-h6-pine-h64-model-b.dts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: (GPL-2.0+ or MIT) +/* + * Copyright (C) 2019 Corentin LABBE clabbe@baylibre.com + */ + +#include "sun50i-h6-pine-h64.dts" + +/ { + model = "Pine H64 model B"; + compatible = "pine64,pine-h64-model-b", "allwinner,sun50i-h6"; + + /delete-node/ reg_gmac_3v3; + + wifi_pwrseq: wifi_pwrseq { + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */ + post-power-on-delay-ms = <200>; + }; +}; + +&hdmi_connector { + /delete-property/ ddc-en-gpios; +}; + +&emac { + phy-supply = <®_aldo2>; +}; + +&mmc1 { + vmmc-supply = <®_cldo3>; + vqmmc-supply = <®_aldo1>; + mmc-pwrseq = <&wifi_pwrseq>; + bus-width = <4>; + non-removable; + status = "okay"; +}; + +&uart1 { + pinctrl-names = "default"; + pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; + uart-has-rtscts; + status = "okay"; + + bluetooth { + compatible = "realtek,rtl8723bs-bt"; + device-wake-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */ + host-wake-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */ + enable-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */ + max-speed = <1500000>; + }; +};

It almost identical to the defconfig for pine H64 model A with only the CONFIG_DEFUALT_DEVICE_TREE adapted.
The differences between the boards model A and model B are irrelevant inside u-boot, but the device-tree name is relevant as default for selecting the correct device-tree when booting linux.
Signed-off-by: Daniel Wagenknecht dwagenk@mailbox.org --- configs/pine_h64-model-b_defconfig | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 configs/pine_h64-model-b_defconfig
diff --git a/configs/pine_h64-model-b_defconfig b/configs/pine_h64-model-b_defconfig new file mode 100644 index 0000000000..4645ceaa54 --- /dev/null +++ b/configs/pine_h64-model-b_defconfig @@ -0,0 +1,21 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-pine-h64-model-b" +CONFIG_SPL=y +CONFIG_MACH_SUN50I_H6=y +CONFIG_SUNXI_DRAM_H6_LPDDR3=y +CONFIG_MACPWR="PC16" +CONFIG_MMC0_CD_PIN="PF6" +CONFIG_MMC_SUNXI_SLOT_EXTRA=2 +CONFIG_USB3_VBUS_PIN="PL5" +CONFIG_SPL_SPI_SUNXI=y +# CONFIG_PSCI_RESET is not set +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SUN8I_EMAC=y +CONFIG_PHY_SUN50I_USB3=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_DWC3=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_GADGET is not set
participants (1)
-
Daniel Wagenknecht