ODROID-HC4: arch/arm64: Introduce new board 'ODROID-HC4'
authorDongjin Kim <tobetter@gmail.com>
Thu, 29 Aug 2019 08:41:30 +0000 (17:41 +0900)
committerDongjin Kim <tobetter@gmail.com>
Wed, 7 Oct 2020 03:11:08 +0000 (12:11 +0900)
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Change-Id: I8ba3c401aedacfcf1307049fac66ebb13bddfa6d

arch/arm64/boot/dts/amlogic/Makefile
arch/arm64/boot/dts/amlogic/meson64_odroidhc4.dts [new file with mode: 0644]
arch/arm64/kernel/setup.c
include/linux/platform_data/board_odroid.h

index 49d5116..9429578 100644 (file)
@@ -8,6 +8,7 @@ dtb-y += g12b_a311d_w400.dtb
 dtb-y += g12b_a311d_w400_buildroot.dtb
 endif
 dtb-$(CONFIG_ARCH_MESON64_ODROIDC4) += meson64_odroidc4.dtb
+dtb-$(CONFIG_ARCH_MESON64_ODROIDC4) += meson64_odroidhc4.dtb
 dtb-$(CONFIG_ARCH_MESON64_ODROIDN2) += meson64_odroidn2.dtb
 dtb-$(CONFIG_ARCH_MESON64_ODROIDN2) += meson64_odroidn2_plus.dtb
 dtb-$(CONFIG_ARCH_MESON64_ODROIDN2) += meson64_odroidn2_drm.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson64_odroidhc4.dts b/arch/arm64/boot/dts/amlogic/meson64_odroidhc4.dts
new file mode 100644 (file)
index 0000000..3a552c1
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * arch/arm64/boot/dts/amlogic/meson64_odroidhc4.dts
+ *
+ * Copyright (C) 2019 Hardkernel Co., Ltd. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#include "meson64_odroidc4.dts"
+
+/ {
+       model = "Hardkernel ODROID-HC4";
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&sd_emmc_c {
+       status = "disabled";
+};
+
+&dwc2_a {
+       port-type = <1>;
+       port-id-mode = <1>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+       controller-type = <1>;
+};
index eb2659a..3dba7b4 100644 (file)
@@ -236,6 +236,10 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
                system_rev = 0x0500;
                __odroid_model = BOARD_ODROIDC4;
                __odroid_amlogic_usb3 = false;
+       } else if (!strcmp(machine_name, "Hardkernel ODROID-HC4")) {
+               system_rev = 0x0600;
+               __odroid_model = BOARD_ODROIDHC4;
+               __odroid_amlogic_usb3 = false;
        }
 #endif
 }
index 6fca5e2..02e6dce 100644 (file)
@@ -5,6 +5,7 @@
 
 #define BOARD_ODROIDN2                 0x09221000
 #define BOARD_ODROIDC4                 0x09051000
+#define BOARD_ODROIDHC4                        0x09052000
 
 #if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
 
@@ -19,5 +20,6 @@ extern bool odroid_amlogic_usb3(void);
 
 #define board_is_odroidn2()    __board_is_odroid(BOARD_ODROIDN2)
 #define board_is_odroidc4()    __board_is_odroid(BOARD_ODROIDC4)
+#define board_is_odroidhc4()   __board_is_odroid(BOARD_ODROIDHC4)
 
 #endif