
Hi Jun,
On Fri, Jan 05, 2018 at 04:51:11PM +0800, Jun Nie wrote:
+/dts-v1/; +#include "sun8i-h3.dtsi" +#include "sunxi-common-regulators.dtsi"
+#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h>
Where is that DT coming from?
Usually, we'll just merge a DT merged in Linux.
The DT come from Linux but modified with removing necessary nodes.
It seems weird, the pinctrl-names in your LED GPIOs nodes are unneeded. We shouldn't have merged that.
+&usb_otg {
dr_mode = "otg";
status = "okay";
+};
+&usbphy {
usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
/* USB OTG VBUS is directly connected to 5V without any regulators */
Then it cannot really do OTG, but rather only peripheral (or host, if the power is provided by the board).
Right, and working mode in u-boot is decided in compile time, CONFIG_USB_MUSB_HOST.
Yes, but then your dr_mode in your DT is wrong.
status = "okay";
+}; diff --git a/configs/bananapi_zero_defconfig b/configs/bananapi_zero_defconfig new file mode 100644 index 0000000..9c78b21 --- /dev/null +++ b/configs/bananapi_zero_defconfig @@ -0,0 +1,17 @@ +CONFIG_ARM=y +CONFIG_ARCH_SUNXI=y +CONFIG_MACH_SUN8I_H3=y +CONFIG_DRAM_CLK=408 +CONFIG_DRAM_ZQ=3881979 +CONFIG_DRAM_ODT_EN=y +CONFIG_DEFAULT_DEVICE_TREE="sun8i-h2-plus-bananapi-m2-zero" +# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set +CONFIG_SPL=y +# CONFIG_CMD_FLASH is not set +# CONFIG_CMD_FPGA is not set +CONFIG_CMD_USB_MASS_STORAGE=y
This shouldn't be enabled in the defconfig.
Thanks for pointing out! Is there any guidance, where DTS should come from, what defconfig shall include, ...? I am new to u-boot :-)
As a general basis, and that's more the policy we try to have for sunxi since we have so many boards, we try to have as less things as possible in the defconfig and have a consistent set of commands enabled by default. Therefore, you should have only the board specific stuff in there (so RAM parameters, SoC, device tree to use, etc.)
The rest should come from Kconfig itself.
Maxime