linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals
@ 2019-03-18 10:04 Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 01/11] arm64: dts: meson-g12a-u200: add uart_AO pinctrl Neil Armstrong
                   ` (11 more replies)
  0 siblings, 12 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman; +Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel

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

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/20190318095851.4062-1-narmstrong@baylibre.com

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

Jerome Brunet (2):
  arm64: dts: meson-g12a-u200: add regulators
  arm64: dts: meson-g12a-sei510: add regulators

Neil Armstrong (8):
  arm64: dts: meson-g12a-u200: add uart_AO pinctrl
  arm64: dts: meson-g12a-sei510: add uart_AO pinctrl
  arm64: dts: meson-g12a-x96-max: add uart_AO pinctrl
  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    | 94 +++++++++++++++++++
 .../boot/dts/amlogic/meson-g12a-u200.dts      | 93 ++++++++++++++++++
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 86 +++++++++++++++++
 3 files changed, 273 insertions(+)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v2 01/11] arm64: dts: meson-g12a-u200: add uart_AO pinctrl
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 02/11] arm64: dts: meson-g12a-sei510: " Neil Armstrong
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel,
	Martin Blumenstingl

Add pinctrl on the always-enabled debug UART AO.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index c44dbdddf2cf..f2afd0bf3e28 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -25,5 +25,7 @@
 
 &uart_AO {
 	status = "okay";
+	pinctrl-0 = <&uart_ao_a_pins>;
+	pinctrl-names = "default";
 };
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 02/11] arm64: dts: meson-g12a-sei510: add uart_AO pinctrl
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 01/11] arm64: dts: meson-g12a-u200: add uart_AO pinctrl Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 03/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel,
	Martin Blumenstingl

Add pinctrl on the always-enabled debug UART AO.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 6a7c3241862a..63c515fe4996 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -35,4 +35,6 @@
 
 &uart_AO {
 	status = "okay";
+	pinctrl-0 = <&uart_ao_a_pins>;
+	pinctrl-names = "default";
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 03/11] arm64: dts: meson-g12a-x96-max: add uart_AO pinctrl
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 01/11] arm64: dts: meson-g12a-u200: add uart_AO pinctrl Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 02/11] arm64: dts: meson-g12a-sei510: " Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators Neil Armstrong
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel,
	Martin Blumenstingl

Add pinctrl on the always-enabled debug UART AO.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index c62d3d5706ff..0edbd00b358f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -25,4 +25,6 @@
 
 &uart_AO {
 	status = "okay";
+	pinctrl-0 = <&uart_ao_a_pins>;
+	pinctrl-names = "default";
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (2 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 03/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 20:07   ` Martin Blumenstingl
  2019-04-09 10:18   ` Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: " Neil Armstrong
                   ` (7 subsequent siblings)
  11 siblings, 2 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Jerome Brunet, linux-amlogic, linux-arm-kernel, linux-kernel,
	Neil Armstrong

From: Jerome Brunet <jbrunet@baylibre.com>

Add system regulators for the S905D U200 reference design.

Add some regulators. Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU (PWM controlled)

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-u200.dts      | 79 +++++++++++++++++++
 1 file changed, 79 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index f2afd0bf3e28..c69328d16333 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -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 = "amlogic,u200", "amlogic,g12a";
@@ -21,6 +23,83 @@
 		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;
+	};
+
+	main_12v: regulator-main_12v {
+		compatible = "regulator-fixed";
+		regulator-name = "12V";
+		regulator-min-microvolt = <12000000>;
+		regulator-max-microvolt = <12000000>;
+		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 = <&main_12v>;
+
+		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
+		enable-active-high;
+	};
+
+	usb_pwr_en: regulator-usb_pwr_en {
+		compatible = "regulator-fixed";
+		regulator-name = "USB_PWR_EN";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&vcc_5v>;
+
+		gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
+	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 = <&main_12v>;
+		regulator-always-on;
+	};
+
 };
 
 &uart_AO {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: add regulators
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (3 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 20:06   ` Martin Blumenstingl
  2019-03-18 10:04 ` [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
                   ` (6 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Jerome Brunet, linux-amlogic, linux-arm-kernel, linux-kernel,
	Neil Armstrong

From: Jerome Brunet <jbrunet@baylibre.com>

Add some regulators. Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU(PWM controlled)
* VDDQ1_5

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-sei510.dts    | 57 +++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 63c515fe4996..43d57e20294a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -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 = "seirobotics,sei510", "amlogic,g12a";
@@ -15,10 +17,36 @@
 		serial0 = &uart_AO;
 	};
 
+	ao_5v: regulator-ao_5v {
+		compatible = "regulator-fixed";
+		regulator-name = "AO_5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		vin-supply = <&dc_in>;
+		regulator-always-on;
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
 
+	dc_in: regulator-dc_in {
+		compatible = "regulator-fixed";
+		regulator-name = "DC_IN";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-always-on;
+	};
+
+	emmc_1v8: regulator-emmc_1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "EMMC_1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vddao_3v3>;
+		regulator-always-on;
+	};
+
 	memory@0 {
 		device_type = "memory";
 		reg = <0x0 0x0 0x0 0x40000000>;
@@ -31,6 +59,35 @@
 			no-map;
 		};
 	};
+
+	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;
+	};
+
+	vddao_3v3_t: regultor-vddao_3v3_t {
+		compatible = "regulator-fixed";
+		regulator-name = "VDDAO_3V3_T";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		vin-supply = <&vddao_3v3>;
+		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
+		enable-active-high;
+	};
+
+	vddio_ao1v8: regulator-vddio_ao1v8 {
+		compatible = "regulator-fixed";
+		regulator-name = "VDDIO_AO1V8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		vin-supply = <&vddao_3v3>;
+		regulator-always-on;
+	};
+
 };
 
 &uart_AO {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (4 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: " Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 20:13   ` Martin Blumenstingl
  2019-03-18 10:04 ` [PATCH v2 07/11] arm64: dts: meson-g12a-x96-max: Enable BT Module Neil Armstrong
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Guillaume La Roque, linux-amlogic, linux-arm-kernel,
	linux-kernel, Neil Armstrong

From: Guillaume La Roque <glaroque@baylibre.com>

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

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

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 67 +++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 0edbd00b358f..5c37930b09e2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -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-high;
+	};
+
+	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 {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 07/11] arm64: dts: meson-g12a-x96-max: Enable BT Module
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (5 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support Neil Armstrong
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel,
	Martin Blumenstingl

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

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index 5c37930b09e2..bc152b1863c3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -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>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (6 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 07/11] arm64: dts: meson-g12a-x96-max: Enable BT Module Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 20:17   ` Martin Blumenstingl
  2019-03-18 10:04 ` [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB Neil Armstrong
                   ` (3 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman; +Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel

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

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 .../boot/dts/amlogic/meson-g12a-sei510.dts    | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 43d57e20294a..ebdad5a192f1 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -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 {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (7 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 20:13   ` Martin Blumenstingl
  2019-03-18 10:04 ` [PATCH v2 10/11] arm64: dts: meson-g12a-u200: " Neil Armstrong
                   ` (2 subsequent siblings)
  11 siblings, 1 reply; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman; +Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel

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

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index ebdad5a192f1..c350a0165d44 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -125,3 +125,8 @@
 	pinctrl-0 = <&uart_ao_a_pins>;
 	pinctrl-names = "default";
 };
+
+&usb {
+	status = "okay";
+	dr_mode = "host";
+};
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 10/11] arm64: dts: meson-g12a-u200: Enable USB
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (8 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 10:04 ` [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
  2019-03-23  0:14 ` [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Kevin Hilman
  11 siblings, 0 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman
  Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel,
	Martin Blumenstingl

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

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index c69328d16333..2240e365af27 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -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>;
+};
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: Enable USB
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (9 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 10/11] arm64: dts: meson-g12a-u200: " Neil Armstrong
@ 2019-03-18 10:04 ` Neil Armstrong
  2019-03-18 20:13   ` Martin Blumenstingl
  2019-03-23  0:14 ` [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Kevin Hilman
  11 siblings, 1 reply; 24+ messages in thread
From: Neil Armstrong @ 2019-03-18 10:04 UTC (permalink / raw)
  To: khilman; +Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel

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

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
index bc152b1863c3..b9721bba9255 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -107,3 +107,8 @@
 	pinctrl-0 = <&uart_ao_a_pins>;
 	pinctrl-names = "default";
 };
+
+&usb {
+	status = "okay";
+	dr_mode = "host";
+};
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: add regulators
  2019-03-18 10:04 ` [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: " Neil Armstrong
@ 2019-03-18 20:06   ` Martin Blumenstingl
  0 siblings, 0 replies; 24+ messages in thread
From: Martin Blumenstingl @ 2019-03-18 20:06 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel, Jerome Brunet

On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> From: Jerome Brunet <jbrunet@baylibre.com>
>
> Add some regulators. Still missing
> * VDD_EE (0.8V - PWM controlled)
> * VDD_CPU(PWM controlled)
> * VDDQ1_5
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
I have no details about this board but the changes look sane, so:
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators
  2019-03-18 10:04 ` [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators Neil Armstrong
@ 2019-03-18 20:07   ` Martin Blumenstingl
  2019-04-09 10:18   ` Neil Armstrong
  1 sibling, 0 replies; 24+ messages in thread
From: Martin Blumenstingl @ 2019-03-18 20:07 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel, Jerome Brunet

On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> From: Jerome Brunet <jbrunet@baylibre.com>
>
> Add system regulators for the S905D U200 reference design.
>
> Add some regulators. Still missing
> * VDD_EE (0.8V - PWM controlled)
> * VDD_CPU (PWM controlled)
>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
I have no details about this board but the changes look sane, so:
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
  2019-03-18 10:04 ` [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
@ 2019-03-18 20:13   ` Martin Blumenstingl
  2019-03-19  8:29     ` Neil Armstrong
  0 siblings, 1 reply; 24+ messages in thread
From: Martin Blumenstingl @ 2019-03-18 20:13 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: khilman, linux-amlogic, Guillaume La Roque, linux-kernel,
	linux-arm-kernel

Hi Neil,

On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> From: Guillaume La Roque <glaroque@baylibre.com>
>
> Add system regulators for the X96 Max Set-Top-Box.
>
> Still missing
> * VDD_EE (0.8V - PWM controlled)
> * VDD_CPU (PWM controlled)
>
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 67 +++++++++++++++++++
>  1 file changed, 67 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> index 0edbd00b358f..5c37930b09e2 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
[...]
> +       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-high;
is there any way to test whether this GPIO is the right one?
I couldn't find a reference to a GPIOH_8 regulator in
buildroot_openlinux_kernel_4.9_fbdev_20180706


Regards
Martin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: Enable USB
  2019-03-18 10:04 ` [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
@ 2019-03-18 20:13   ` Martin Blumenstingl
  0 siblings, 0 replies; 24+ messages in thread
From: Martin Blumenstingl @ 2019-03-18 20:13 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel

On Mon, Mar 18, 2019 at 11:07 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> Enable the USB2 and USB3 Host ports on the X96 Max Set-Top-Box.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB
  2019-03-18 10:04 ` [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB Neil Armstrong
@ 2019-03-18 20:13   ` Martin Blumenstingl
  0 siblings, 0 replies; 24+ messages in thread
From: Martin Blumenstingl @ 2019-03-18 20:13 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel

On Mon, Mar 18, 2019 at 11:07 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> Enable the USB2 and USB3 Host ports on the SEI520 Set-Top-Box.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support
  2019-03-18 10:04 ` [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support Neil Armstrong
@ 2019-03-18 20:17   ` Martin Blumenstingl
  0 siblings, 0 replies; 24+ messages in thread
From: Martin Blumenstingl @ 2019-03-18 20:17 UTC (permalink / raw)
  To: Neil Armstrong; +Cc: khilman, linux-amlogic, linux-kernel, linux-arm-kernel

On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> Add support for the :
> - ADC Touch key
> - Bluetooth Module on UART A
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
I have no details about this board but the changes look sane, so
(apart from one nit-pick below):
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

> ---
>  .../boot/dts/amlogic/meson-g12a-sei510.dts    | 30 +++++++++++++++++++
>  1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
> index 43d57e20294a..ebdad5a192f1 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
> @@ -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 {
in meson-gxm-khadas-vim2.dts we use "adc-keys". Other Allwinner and
Rockchip board also use "adc-keys" instead of "adc_keys".
I prefer if we go with "adc-keys" (we can clean up the two occurrences
of "adc_keys" in arch/arm64/boot/dts/amlogic later)


Regards
Martin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
  2019-03-18 20:13   ` Martin Blumenstingl
@ 2019-03-19  8:29     ` Neil Armstrong
  2019-03-19 20:13       ` Martin Blumenstingl
  0 siblings, 1 reply; 24+ messages in thread
From: Neil Armstrong @ 2019-03-19  8:29 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: khilman, linux-amlogic, Guillaume La Roque, linux-kernel,
	linux-arm-kernel

On 18/03/2019 21:13, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> From: Guillaume La Roque <glaroque@baylibre.com>
>>
>> Add system regulators for the X96 Max Set-Top-Box.
>>
>> Still missing
>> * VDD_EE (0.8V - PWM controlled)
>> * VDD_CPU (PWM controlled)
>>
>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---
>>  .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 67 +++++++++++++++++++
>>  1 file changed, 67 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> index 0edbd00b358f..5c37930b09e2 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> [...]
>> +       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-high;
> is there any way to test whether this GPIO is the right one?
> I couldn't find a reference to a GPIOH_8 regulator in
> buildroot_openlinux_kernel_4.9_fbdev_20180706

The x96 is based on the U212 reference design, and the GPIOH_8 controls the 5V_EN signal,
but you are right, it's the wrong polarity here, it should be enable-active-low instead.
(FYI The SEI510 does not use this at all, 5V is always enabled)

The schematics describes :
VCC5V_EN (GPIOH_8-Hiz OD): 5V_EN
L: Enable
Hiz: Disable

FYI, the GPIOH_8 is Open-Drain only, this means this pin cannot pull to TTL 1, only to TTL 0
or set as input. We need to add a way to describe this in the pinctrl driver somehow....

I will send a fix on v3

I didn't notice because I power the board using a Type-A to Type-A connector,
and the 5V from the USB port bypasses this regulator...

Neil

> 
> 
> Regards
> Martin
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
  2019-03-19  8:29     ` Neil Armstrong
@ 2019-03-19 20:13       ` Martin Blumenstingl
  2019-03-19 20:30         ` Neil Armstrong
  0 siblings, 1 reply; 24+ messages in thread
From: Martin Blumenstingl @ 2019-03-19 20:13 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: khilman, linux-amlogic, Guillaume La Roque, linux-kernel,
	linux-arm-kernel

Hi Neil,

On Tue, Mar 19, 2019 at 9:29 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> On 18/03/2019 21:13, Martin Blumenstingl wrote:
> > Hi Neil,
> >
> > On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
> >>
> >> From: Guillaume La Roque <glaroque@baylibre.com>
> >>
> >> Add system regulators for the X96 Max Set-Top-Box.
> >>
> >> Still missing
> >> * VDD_EE (0.8V - PWM controlled)
> >> * VDD_CPU (PWM controlled)
> >>
> >> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> >> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> >> ---
> >>  .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 67 +++++++++++++++++++
> >>  1 file changed, 67 insertions(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> >> index 0edbd00b358f..5c37930b09e2 100644
> >> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> >> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> > [...]
> >> +       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-high;
> > is there any way to test whether this GPIO is the right one?
> > I couldn't find a reference to a GPIOH_8 regulator in
> > buildroot_openlinux_kernel_4.9_fbdev_20180706
>
> The x96 is based on the U212 reference design, and the GPIOH_8 controls the 5V_EN signal,
> but you are right, it's the wrong polarity here, it should be enable-active-low instead.
> (FYI The SEI510 does not use this at all, 5V is always enabled)
>
> The schematics describes :
> VCC5V_EN (GPIOH_8-Hiz OD): 5V_EN
> L: Enable
> Hiz: Disable
thank you for this explanation!

> FYI, the GPIOH_8 is Open-Drain only, this means this pin cannot pull to TTL 1, only to TTL 0
> or set as input. We need to add a way to describe this in the pinctrl driver somehow....
as far as I understand the pinctrl driver changes would result in an
error when the GPIO is used with "active high" (making incompatible
drivers or .dts easier to see). is this correct?

> I will send a fix on v3
>
> I didn't notice because I power the board using a Type-A to Type-A connector,
> and the 5V from the USB port bypasses this regulator...
this is good to know.
I'm also powering some of my boards using a Type-A to Type-A
connector. I'll need to remember this and this whether boards are
still booting with the DC plug


Regards
Martin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
  2019-03-19 20:13       ` Martin Blumenstingl
@ 2019-03-19 20:30         ` Neil Armstrong
  0 siblings, 0 replies; 24+ messages in thread
From: Neil Armstrong @ 2019-03-19 20:30 UTC (permalink / raw)
  To: Martin Blumenstingl
  Cc: khilman, linux-amlogic, Guillaume La Roque, linux-kernel,
	linux-arm-kernel

On 19/03/2019 21:13, Martin Blumenstingl wrote:
> Hi Neil,
> 
> On Tue, Mar 19, 2019 at 9:29 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>
>> On 18/03/2019 21:13, Martin Blumenstingl wrote:
>>> Hi Neil,
>>>
>>> On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <narmstrong@baylibre.com> wrote:
>>>>
>>>> From: Guillaume La Roque <glaroque@baylibre.com>
>>>>
>>>> Add system regulators for the X96 Max Set-Top-Box.
>>>>
>>>> Still missing
>>>> * VDD_EE (0.8V - PWM controlled)
>>>> * VDD_CPU (PWM controlled)
>>>>
>>>> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
>>>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>>>> ---
>>>>  .../boot/dts/amlogic/meson-g12a-x96-max.dts   | 67 +++++++++++++++++++
>>>>  1 file changed, 67 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>>>> index 0edbd00b358f..5c37930b09e2 100644
>>>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>>>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>>> [...]
>>>> +       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-high;
>>> is there any way to test whether this GPIO is the right one?
>>> I couldn't find a reference to a GPIOH_8 regulator in
>>> buildroot_openlinux_kernel_4.9_fbdev_20180706
>>
>> The x96 is based on the U212 reference design, and the GPIOH_8 controls the 5V_EN signal,
>> but you are right, it's the wrong polarity here, it should be enable-active-low instead.
>> (FYI The SEI510 does not use this at all, 5V is always enabled)
>>
>> The schematics describes :
>> VCC5V_EN (GPIOH_8-Hiz OD): 5V_EN
>> L: Enable
>> Hiz: Disable
> thank you for this explanation!
> 
>> FYI, the GPIOH_8 is Open-Drain only, this means this pin cannot pull to TTL 1, only to TTL 0
>> or set as input. We need to add a way to describe this in the pinctrl driver somehow....
> as far as I understand the pinctrl driver changes would result in an
> error when the GPIO is used with "active high" (making incompatible
> drivers or .dts easier to see). is this correct?

I don't have a clear view of that, since it's really GPIO related.
I don't know if we can really disable non-opendrain support for a
specific gpio.

We will need to investigate ! Anyway, using GPIO_OPEN_DRAIN in DT
is the correct way to handle these GPIO lines.

Neil

> 
>> I will send a fix on v3
>>
>> I didn't notice because I power the board using a Type-A to Type-A connector,
>> and the 5V from the USB port bypasses this regulator...
> this is good to know.
> I'm also powering some of my boards using a Type-A to Type-A
> connector. I'll need to remember this and this whether boards are
> still booting with the DC plug
> 
> 
> Regards
> Martin
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals
  2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
                   ` (10 preceding siblings ...)
  2019-03-18 10:04 ` [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
@ 2019-03-23  0:14 ` Kevin Hilman
  11 siblings, 0 replies; 24+ messages in thread
From: Kevin Hilman @ 2019-03-23  0:14 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Neil Armstrong, linux-amlogic, linux-arm-kernel, linux-kernel

Neil Armstrong <narmstrong@baylibre.com> writes:

> Following [1], add regulators, bluetooth, UART and ADC keys on :
> - meson-g12a-x96-max
> - meson-g12a-u200
> - meson-g12a-sei510
>
> 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]

I queud patches 1-5/11 for v5.2 (branch: v5.2/dt64).  The others have
some dependencies, or you mentioned you'll do a v3.

Kevin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators
  2019-03-18 10:04 ` [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators Neil Armstrong
  2019-03-18 20:07   ` Martin Blumenstingl
@ 2019-04-09 10:18   ` Neil Armstrong
  2019-04-16  0:49     ` Kevin Hilman
  1 sibling, 1 reply; 24+ messages in thread
From: Neil Armstrong @ 2019-04-09 10:18 UTC (permalink / raw)
  To: khilman; +Cc: Jerome Brunet, linux-amlogic, linux-arm-kernel, linux-kernel

Hi Kevin,

Seems this patch is missing in
https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic.git/log/?h=v5.2/dt64

Thanks,
Neil

On 18/03/2019 11:04, Neil Armstrong wrote:
> From: Jerome Brunet <jbrunet@baylibre.com>
> 
> Add system regulators for the S905D U200 reference design.
> 
> Add some regulators. Still missing
> * VDD_EE (0.8V - PWM controlled)
> * VDD_CPU (PWM controlled)
> 
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
>  .../boot/dts/amlogic/meson-g12a-u200.dts      | 79 +++++++++++++++++++
>  1 file changed, 79 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> index f2afd0bf3e28..c69328d16333 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> @@ -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 = "amlogic,u200", "amlogic,g12a";
> @@ -21,6 +23,83 @@
>  		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;
> +	};
> +
> +	main_12v: regulator-main_12v {
> +		compatible = "regulator-fixed";
> +		regulator-name = "12V";
> +		regulator-min-microvolt = <12000000>;
> +		regulator-max-microvolt = <12000000>;
> +		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 = <&main_12v>;
> +
> +		gpio = <&gpio GPIOH_8 GPIO_OPEN_DRAIN>;
> +		enable-active-high;
> +	};
> +
> +	usb_pwr_en: regulator-usb_pwr_en {
> +		compatible = "regulator-fixed";
> +		regulator-name = "USB_PWR_EN";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		vin-supply = <&vcc_5v>;
> +
> +		gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
> +		enable-active-high;
> +	};
> +
> +	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 = <&main_12v>;
> +		regulator-always-on;
> +	};
> +
>  };
>  
>  &uart_AO {
> 


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators
  2019-04-09 10:18   ` Neil Armstrong
@ 2019-04-16  0:49     ` Kevin Hilman
  0 siblings, 0 replies; 24+ messages in thread
From: Kevin Hilman @ 2019-04-16  0:49 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, linux-amlogic, linux-arm-kernel, linux-kernel

Neil Armstrong <narmstrong@baylibre.com> writes:

> Hi Kevin,
>
> Seems this patch is missing in
> https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic.git/log/?h=v5.2/dt64
>

Yup, I noticed it when applying  the rest of the boards peripherals DT.
I've added it now.

Thanks,

Kevin

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-04-16  0:49 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18 10:04 [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Neil Armstrong
2019-03-18 10:04 ` [PATCH v2 01/11] arm64: dts: meson-g12a-u200: add uart_AO pinctrl Neil Armstrong
2019-03-18 10:04 ` [PATCH v2 02/11] arm64: dts: meson-g12a-sei510: " Neil Armstrong
2019-03-18 10:04 ` [PATCH v2 03/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
2019-03-18 10:04 ` [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators Neil Armstrong
2019-03-18 20:07   ` Martin Blumenstingl
2019-04-09 10:18   ` Neil Armstrong
2019-04-16  0:49     ` Kevin Hilman
2019-03-18 10:04 ` [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: " Neil Armstrong
2019-03-18 20:06   ` Martin Blumenstingl
2019-03-18 10:04 ` [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
2019-03-18 20:13   ` Martin Blumenstingl
2019-03-19  8:29     ` Neil Armstrong
2019-03-19 20:13       ` Martin Blumenstingl
2019-03-19 20:30         ` Neil Armstrong
2019-03-18 10:04 ` [PATCH v2 07/11] arm64: dts: meson-g12a-x96-max: Enable BT Module Neil Armstrong
2019-03-18 10:04 ` [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support Neil Armstrong
2019-03-18 20:17   ` Martin Blumenstingl
2019-03-18 10:04 ` [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB Neil Armstrong
2019-03-18 20:13   ` Martin Blumenstingl
2019-03-18 10:04 ` [PATCH v2 10/11] arm64: dts: meson-g12a-u200: " Neil Armstrong
2019-03-18 10:04 ` [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: " Neil Armstrong
2019-03-18 20:13   ` Martin Blumenstingl
2019-03-23  0:14 ` [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).