1326e5751SDongjin Kim// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2326e5751SDongjin Kim/*
3326e5751SDongjin Kim * Copyright (c) 2020 Dongjin Kim <tobetter@gmail.com>
4326e5751SDongjin Kim */
5326e5751SDongjin Kim
6326e5751SDongjin Kim/dts-v1/;
7326e5751SDongjin Kim
8*88d537bcSChristian Hewitt#include "meson-sm1-odroid.dtsi"
9326e5751SDongjin Kim
10326e5751SDongjin Kim/ {
11326e5751SDongjin Kim	compatible = "hardkernel,odroid-c4", "amlogic,sm1";
12326e5751SDongjin Kim	model = "Hardkernel ODROID-C4";
13326e5751SDongjin Kim
14326e5751SDongjin Kim	leds {
15326e5751SDongjin Kim		compatible = "gpio-leds";
16326e5751SDongjin Kim
17326e5751SDongjin Kim		led-blue {
18326e5751SDongjin Kim			color = <LED_COLOR_ID_BLUE>;
19326e5751SDongjin Kim			function = LED_FUNCTION_STATUS;
20326e5751SDongjin Kim			gpios = <&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
21326e5751SDongjin Kim			linux,default-trigger = "heartbeat";
22326e5751SDongjin Kim			panic-indicator;
23326e5751SDongjin Kim		};
24326e5751SDongjin Kim	};
25326e5751SDongjin Kim
26326e5751SDongjin Kim	hub_5v: regulator-hub_5v {
27326e5751SDongjin Kim		compatible = "regulator-fixed";
28326e5751SDongjin Kim		regulator-name = "HUB_5V";
29326e5751SDongjin Kim		regulator-min-microvolt = <5000000>;
30326e5751SDongjin Kim		regulator-max-microvolt = <5000000>;
31326e5751SDongjin Kim		vin-supply = <&vcc_5v>;
32326e5751SDongjin Kim
33326e5751SDongjin Kim		/* Connected to the Hub CHIPENABLE, LOW sets low power state */
34326e5751SDongjin Kim		gpio = <&gpio GPIOH_4 GPIO_ACTIVE_HIGH>;
35326e5751SDongjin Kim		enable-active-high;
36326e5751SDongjin Kim	};
37326e5751SDongjin Kim
38725da67cSChristian Hewitt	sound {
39933b80edSChristian Hewitt		model = "ODROID-C4";
40725da67cSChristian Hewitt	};
41725da67cSChristian Hewitt};
42725da67cSChristian Hewitt
43326e5751SDongjin Kim&gpio {
44326e5751SDongjin Kim	/*
45326e5751SDongjin Kim	 * WARNING: The USB Hub on the Odroid-C4 needs a reset signal
46326e5751SDongjin Kim	 * to be turned high in order to be detected by the USB Controller
47326e5751SDongjin Kim	 * This signal should be handled by a USB specific power sequence
48326e5751SDongjin Kim	 * in order to reset the Hub when USB bus is powered down.
49326e5751SDongjin Kim	 */
50326e5751SDongjin Kim	usb-hub {
51326e5751SDongjin Kim		gpio-hog;
52326e5751SDongjin Kim		gpios = <GPIOH_4 GPIO_ACTIVE_HIGH>;
53326e5751SDongjin Kim		output-high;
54326e5751SDongjin Kim		line-name = "usb-hub-reset";
55326e5751SDongjin Kim	};
56326e5751SDongjin Kim};
57326e5751SDongjin Kim
58326e5751SDongjin Kim&ir {
59326e5751SDongjin Kim	linux,rc-map-name = "rc-odroid";
60326e5751SDongjin Kim};
61326e5751SDongjin Kim
62326e5751SDongjin Kim&usb2_phy1 {
63326e5751SDongjin Kim	/* Enable the hub which is connected to this port */
64326e5751SDongjin Kim	phy-supply = <&hub_5v>;
65326e5751SDongjin Kim};
66