Skip to contentSkip to conversation

arm64: dts: g12a: Add boards peripherals

PATCH Applied Neil Armstrong 3 participants 10 messages Mar 25, 2019 – Apr 16, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover arm64: dts: g12a: Add boards peripherals

Following [1], add regulators, bluetooth and ADC keys on :
- meson-g12a-x96-max
- meson-g12a-u200
- meson-g12a-sei510

Dependencies :
- Patch 1, 2: None
- Patch 3: SAR ADC node at [2]
- Patches 4, 5, & 6: USB nodes at [3]

Changes since v2:
- Dropped already applied patches
- Collected martin's reviewed-bys
- Fixed x96 5v regulator polarity

Changes since v1:
- Collected martin's reviewed-bys
- Added missing regulators in commit logs
- fixed x96 dc_in regulator
- fixed includes overall
- removed dwc2 enable floowing disabled remove in [1]

[1] https://lkml.kernel.org/r/[email protected]
[2] https://lkml.kernel.org/r/[email protected]
[3] https://lkml.kernel.org/r/[email protected]

Guillaume La Roque (1):
arm64: dts: meson-g12a-x96-max: add regulators

Neil Armstrong (5):
arm64: dts: meson-g12a-x96-max: Enable BT Module
arm64: dts: meson-g12a-sei510: Add ADC Key and BT support
arm64: dts: meson-g12a-sei510: Enable USB
arm64: dts: meson-g12a-u200: Enable USB
arm64: dts: meson-g12a-x96-max: Enable USB

 .../boot/dts/amlogic/meson-g12a-sei510.dts    | 35 ++++++++
 .../boot/dts/amlogic/meson-g12a-u200.dts      | 12 +++
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 84 +++++++++++++++++++
 3 files changed, 131 insertions(+)
Signature · 1 line
2.21.0
#1 lore raw

PATCH v3 1/6 arm64: dts: meson-g12a-x96-max: add regulators

From: Guillaume La Roque <[email protected]>

Add system regulators for the X96 Max Set-Top-Box.

Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU (PWM controlled)

---
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +67 -0
index 0edbd00b358f..0ba28491e2b0 100644
@@ -6,6 +6,8 @@
 /dts-v1/;
 
 #include "meson-g12a.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>
 
 / {
 	compatible = "amediatech,x96-max", "amlogic,u200", "amlogic,g12a";
@@ -21,6 +23,71 @@
 		device_type = "memory";
 		reg = <0x0 0x0 0x0 0x40000000>;
 	};
+
+	flash_1v8: regulator-flash_1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "FLASH_1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vcc_3v3>;
+		regulator-always-on;
+	};
+
+	dc_in: regulator-dc_in {
+		compatible = "regulator-fixed";
+		regulator-name = "DC_IN";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+
+	vcc_1v8: regulator-vcc_1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vcc_3v3>;
+		regulator-always-on;
+	};
+
+	vcc_3v3: regulator-vcc_3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vddao_3v3>;
+		regulator-always-on;
+		/* FIXME: actually controlled by VDDCPU_B_EN */
+	};
+
+	vcc_5v: regulator-vcc_5v {
+		compatible = "regulator-fixed";
+		regulator-name = "VCC_5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&dc_in>;
+
+		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
+		enable-active-low;
+	};
+
+	vddao_1v8: regulator-vddao_1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "VDDAO_1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vddao_3v3>;
+		regulator-always-on;
+	};
+
+	vddao_3v3: regulator-vddao_3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "VDDAO_3V3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&dc_in>;
+		regulator-always-on;
+	};
 };
 
 &uart_AO {
Signature · 1 line
2.21.0
reviewer Reviewed-by on v3 1/6
#2 lore raw

Re: [PATCH v3 1/6] arm64: dts: meson-g12a-x96-max: add regulators

Quoted 11 lines · Neil Armstrong

From: Guillaume La Roque <[email protected]>

Add system regulators for the X96 Max Set-Top-Box.

Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU (PWM controlled)

#3 lore raw

PATCH v3 2/6 arm64: dts: meson-g12a-x96-max: Enable BT Module

In reply to Neil Armstrong

Enable the Bluetooth Module on the X96 Max Set-Top-Box.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +12 -0
index 0ba28491e2b0..0a6919523ba9 100644
@@ -90,6 +90,18 @@
 	};
 };
 
+&uart_A {
+	status = "okay";
+	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
+	pinctrl-names = "default";
+	uart-has-rtscts;
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+	};
+};
+
 &uart_AO {
 	status = "okay";
 	pinctrl-0 = <&uart_ao_a_pins>;
Signature · 7 lines
2.21.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#4 lore raw

PATCH v3 3/6 arm64: dts: meson-g12a-sei510: Add ADC Key and BT support

In reply to Neil Armstrong

Add support for the :
- ADC Touch key
- Bluetooth Module on UART A

---
 .../boot/dts/amlogic/meson-g12a-sei510.dts    | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +30 -0
index 43d57e20294a..ebdad5a192f1 100644
@@ -7,6 +7,7 @@
 
 #include "meson-g12a.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
 
 / {
@@ -17,6 +18,19 @@
 		serial0 = &uart_AO;
 	};
 
+	adc_keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+
+		button-onoff {
+			label = "On/Off";
+			linux,code = <KEY_POWER>;
+			press-threshold-microvolt = <1700000>;
+		};
+	};
+
 	ao_5v: regulator-ao_5v {
 		compatible = "regulator-fixed";
 		regulator-name = "AO_5V";
@@ -87,7 +101,23 @@
 		vin-supply = <&vddao_3v3>;
 		regulator-always-on;
 	};
+};
+
+&saradc {
+	status = "okay";
+	vref-supply = <&vddio_ao1v8>;
+};
+
+&uart_A {
+	status = "okay";
+	pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
+	pinctrl-names = "default";
+	uart-has-rtscts;
 
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+	};
 };
 
 &uart_AO {
Signature · 1 line
2.21.0
#5 lore raw

PATCH v3 4/6 arm64: dts: meson-g12a-sei510: Enable USB

In reply to Neil Armstrong

Enable the USB2 and USB3 Host ports on the SEI520 Set-Top-Box.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +5 -0
index ebdad5a192f1..c350a0165d44 100644
@@ -125,3 +125,8 @@
 	pinctrl-0 = <&uart_ao_a_pins>;
 	pinctrl-names = "default";
 };
+
+&usb {
+	status = "okay";
+	dr_mode = "host";
+};
Signature · 1 line
2.21.0
#6 lore raw

PATCH v3 5/6 arm64: dts: meson-g12a-u200: Enable USB

In reply to Neil Armstrong

Enable the USB2 OTG and USB3 Host ports on the S905D2 Reference Design.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +12 -0
index c69328d16333..2240e365af27 100644
@@ -108,3 +108,15 @@
 	pinctrl-names = "default";
 };
 
+&usb {
+	status = "okay";
+	vbus-supply = <&usb_pwr_en>;
+};
+
+&usb2_phy0 {
+	phy-supply = <&vcc_5v>;
+};
+
+&usb2_phy1 {
+	phy-supply = <&vcc_5v>;
+};
Signature · 1 line
2.21.0
#7 lore raw

PATCH v3 6/6 arm64: dts: meson-g12a-x96-max: Enable USB

In reply to Neil Armstrong

Enable the USB2 and USB3 Host ports on the X96 Max Set-Top-Box.

---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +5 -0
index 0a6919523ba9..b5b88262c06a 100644
@@ -107,3 +107,8 @@
 	pinctrl-0 = <&uart_ao_a_pins>;
 	pinctrl-names = "default";
 };
+
+&usb {
+	status = "okay";
+	dr_mode = "host";
+};
Signature · 1 line
2.21.0
maintainer Applied
#8 lore raw
In reply to Neil Armstrong
Quoted 7 lines · Neil Armstrong

Following [1], add regulators, bluetooth and ADC keys on :
- meson-g12a-x96-max
- meson-g12a-u200
- meson-g12a-sei510

Dependencies :
- Patch 1, 2: None

Queued for v5.2 (branch v5.2/dt64)

Quoted 2 lines

- Patch 3: SAR ADC node at [2]
- Patches 4, 5, & 6: USB nodes at [3]

Looks like I can queue these as soon as there's a stable clock headers branch I can use.

Kevin

maintainer
#9 lore raw
Quoted 10 lines · Kevin Hilman
Quoted 7 lines · Neil Armstrong

Following [1], add regulators, bluetooth and ADC keys on :
- meson-g12a-x96-max
- meson-g12a-u200
- meson-g12a-sei510

Dependencies :
- Patch 1, 2: None

Quoted 7 lines

Queued for v5.2 (branch v5.2/dt64)

Quoted 2 lines

- Patch 3: SAR ADC node at [2]
- Patches 4, 5, & 6: USB nodes at [3]

Looks like I can queue these as soon as there's a stable clock headers branch I can use.

Queued for v5.2,

Thanks,

Kevin