Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f40d437f authored by Carlo Caione's avatar Carlo Caione Committed by Kevin Hilman
Browse files

ARM64: dts: amlogic: Enable pin controller on GXBB-based platforms



Update DTS and DTSI files to enable the pin controller. We also now
support the blinking blue LED on the Odroid-C2.

Signed-off-by: default avatarCarlo Caione <carlo@endlessm.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
parent 551a626c
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
/dts-v1/;

#include "meson-gxbb.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
	compatible = "hardkernel,odroid-c2", "amlogic,meson-gxbb";
@@ -62,8 +63,20 @@
		device_type = "memory";
		reg = <0x0 0x0 0x0 0x80000000>;
	};

	leds {
		compatible = "gpio-leds";
		blue {
			label = "c2:blue:alive";
			gpios = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_LOW>;
			linux,default-trigger = "heartbeat";
			default-state = "off";
		};
	};
};

&uart_AO {
	status = "okay";
	pinctrl-0 = <&uart_ao_a_pins>;
	pinctrl-names = "default";
};
+2 −0
Original line number Diff line number Diff line
@@ -62,4 +62,6 @@
/* This UART is brought out to the DB9 connector */
&uart_AO {
	status = "okay";
	pinctrl-0 = <&uart_ao_a_pins>;
	pinctrl-names = "default";
};
+3 −0
Original line number Diff line number Diff line
@@ -56,4 +56,7 @@

&uart_AO {
	status = "okay";
	pinctrl-0 = <&uart_ao_a_pins>;
	pinctrl-names = "default";

};
+41 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/gpio/meson-gxbb-gpio.h>

/ {
	compatible = "amlogic,meson-gxbb";
@@ -158,6 +159,29 @@
			#size-cells = <2>;
			ranges = <0x0 0x0 0x0 0xc8100000 0x0 0x100000>;

			pinctrl_aobus: pinctrl@14 {
				compatible = "amlogic,meson-gxbb-aobus-pinctrl";
				#address-cells = <2>;
				#size-cells = <2>;
				ranges;

				gpio_ao: bank@14 {
					reg = <0x0 0x00014 0x0 0x8>,
					      <0x0 0x0002c 0x0 0x4>,
					      <0x0 0x00024 0x0 0x8>;
					reg-names = "mux", "pull", "gpio";
					gpio-controller;
					#gpio-cells = <2>;
				};

				uart_ao_a_pins: uart_ao_a {
					mux {
						groups = "uart_tx_ao_a", "uart_rx_ao_a";
						function = "uart_ao";
					};
				};
			};

			uart_AO: serial@4c0 {
				compatible = "amlogic,meson-uart";
				reg = <0x0 0x004c0 0x0 0x14>;
@@ -173,6 +197,23 @@
			#address-cells = <2>;
			#size-cells = <2>;
			ranges = <0x0 0x0 0x0 0xc8834000 0x0 0x2000>;

			pinctrl_periphs: pinctrl@4b0 {
				compatible = "amlogic,meson-gxbb-periphs-pinctrl";
				#address-cells = <2>;
				#size-cells = <2>;
				ranges;

				gpio: bank@4b0 {
					reg = <0x0 0x004b0 0x0 0x28>,
					      <0x0 0x004e8 0x0 0x14>,
					      <0x0 0x00120 0x0 0x14>,
					      <0x0 0x00430 0x0 0x40>;
					reg-names = "mux", "pull", "pull-enable", "gpio";
					gpio-controller;
					#gpio-cells = <2>;
				};
			};
		};

		hiubus: hiubus@c883c000 {