ODROID-HC4: arch/arm64: Introduce new board 'ODROID-HC4'

Change-Id: Id020eb76109f1a7a3cabf50489cf1a0d5447b010
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
Dongjin Kim
2019-08-29 17:41:30 +09:00
committed by Chris
parent 9497a147c8
commit 54de9c6044
6 changed files with 6113 additions and 0 deletions

View File

@@ -8,6 +8,8 @@ dtb-y += g12b_a311d_w400_buildroot.dtb
endif
dtb-$(CONFIG_ARCH_MESON64_ODROIDC4) += meson64_odroidc4.dtb
dtb-$(CONFIG_ARCH_MESON64_ODROIDC4) += meson64_odroidc4_android.dtb
dtb-$(CONFIG_ARCH_MESON64_ODROIDC4) += meson64_odroidhc4.dtb
dtb-$(CONFIG_ARCH_MESON64_ODROIDC4) += meson64_odroidhc4_android.dtb
dtb-$(CONFIG_ARCH_MESON64_ODROIDN2) += meson64_odroidn2.dtb
dtb-$(CONFIG_ARCH_MESON64_ODROIDN2) += meson64_odroidn2_android.dtb

View File

@@ -0,0 +1,101 @@
/*
* arch/arm64/boot/dts/amlogic/meson64_odroidhc4.dts
*
* Copyright (C) 2020 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 <include/dt-bindings/thermal/thermal.h>
#include "meson64_odroidc4.dts"
/ {
model = "Hardkernel ODROID-HC4";
fan0: pwm-fan {
compatible = "pwm-fan";
status = "okay";
#cooling-cells = <2>;
cooling-min-state = <0>;
cooling-max-state = <3>;
cooling-levels = <0 128 180 240>;
pwms = <&pwm_cd MESON_PWM_1 40000 0>;
};
};
&pcie_A {
reset-gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&sd_emmc_c {
status = "disabled";
};
&i2c2 {
pcf8563: rtc@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
};
};
&pwm_cd {
status = "okay";
};
&soc_thermal {
trips {
pcontrol: trip-point@1 {
temperature = <80000>;
hysteresis = <5000>;
type = "passive";
};
phot: trip-point@2 {
temperature = <90000>;
hysteresis = <5000>;
type = "hot";
};
fan_low: trip-point@4 {
temperature = <65000>;
hysteresis = <5000>;
type = "active";
};
fan_mid: trip-point@5 {
temperature = <75000>;
hysteresis = <5000>;
type = "active";
};
fan_high: trip-point@6 {
temperature = <90000>;
hysteresis = <5000>;
type = "active";
};
};
cooling-maps {
fan_cooling_map0 {
trip = <&fan_low>;
cooling-device = <&fan0 THERMAL_NO_LIMIT 1>;
contribution = <1024>;
};
fan_cooling_map1 {
trip = <&fan_mid>;
cooling-device = <&fan0 THERMAL_NO_LIMIT 2>;
contribution = <1024>;
};
fan_cooling_map2 {
trip = <&fan_high>;
cooling-device = <&fan0 3 THERMAL_NO_LIMIT>;
contribution = <1024>;
};
};
};

View File

@@ -0,0 +1,115 @@
/*
* arch/arm64/boot/dts/amlogic/meson64_odroidhc4_android.dts
*
* Copyright (C) 2020 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_odroidhc4.dts"
/{
firmware {
android {
compatible = "android,firmware";
fstab {
compatible = "android,fstab";
system {
compatible = "android,system";
dev = "/dev/block/system";
type = "ext4";
mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
fsmgr_flags = "wait";
};
vendor {
compatible = "android,vendor";
dev = "/dev/block/vendor";
type = "ext4";
mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
fsmgr_flags = "wait";
};
odm {
compatible = "android,odm";
dev = "/dev/block/odm";
type = "vfat";
mnt_flags = "rw";
fsmgr_flags = "wait";
};
product {
compatible = "android,product";
dev = "/dev/block/product";
type = "ext4";
mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
fsmgr_flags = "wait";
};
};
};
};
odroid_sysfs {
compatible = "odroid-sysfs";
status = "okay";
};
gpio_keys_polled {
status = "disabled";
compatible =
"gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <100>;
autorepeat;
button@1 {
label = "GPIO Key F7";
linux,code = <65>;
gpios = <&gpio GPIOX_3 1>;
};
button@2 {
label = "GPIO Key F8";
linux,code = <66>;
gpios = <&gpio GPIOX_4 1>;
};
button@3 {
label = "GPIO Key F9";
linux,code = <67>;
gpios = <&gpio GPIOX_7 1>;
};
button@4 {
label = "GPIO Key F10";
linux,code = <68>;
gpios = <&gpio GPIOX_8 1>;
};
};
};
&custom_maps {
mapnum = <1>;
map0 = <&map_0>;
map_0: map_0 {
mapname = "hardkernel-remote";
customcode = <0x4db2>;
release_delay = <80>;
size = <12>;
keymap = <REMOTE_KEY(0x88,113)
REMOTE_KEY(0xdc,116)
REMOTE_KEY(0xc5,139)
REMOTE_KEY(0x9a,158)
REMOTE_KEY(0xca,103)
REMOTE_KEY(0x99,105)
REMOTE_KEY(0xc1,106)
REMOTE_KEY(0xd2,108)
REMOTE_KEY(0x80,104)
REMOTE_KEY(0x81,109)
REMOTE_KEY(0x82,102)
REMOTE_KEY(0xce,97)>;
};
};

File diff suppressed because it is too large Load Diff

View 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
}

View 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