2019-03-18 10:08:49

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals

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/[email protected]

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



2019-03-18 10:06:11

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 06/11] 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)

Signed-off-by: Guillaume La Roque <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
.../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


2019-03-18 10:06:20

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: Enable USB

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

Signed-off-by: Neil Armstrong <[email protected]>
---
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


2019-03-18 10:06:50

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 10/11] arm64: dts: meson-g12a-u200: Enable USB

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

Signed-off-by: Neil Armstrong <[email protected]>
Acked-by: Martin Blumenstingl <[email protected]>
---
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


2019-03-18 10:06:55

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: add regulators

From: Jerome Brunet <[email protected]>

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

Signed-off-by: Jerome Brunet <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
.../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


2019-03-18 10:07:09

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support

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

Signed-off-by: Neil Armstrong <[email protected]>
---
.../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


2019-03-18 10:07:12

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB

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

Signed-off-by: Neil Armstrong <[email protected]>
---
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


2019-03-18 10:07:25

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators

From: Jerome Brunet <[email protected]>

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 <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
.../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


2019-03-18 10:07:42

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 02/11] arm64: dts: meson-g12a-sei510: add uart_AO pinctrl

Add pinctrl on the always-enabled debug UART AO.

Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
---
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


2019-03-18 10:07:59

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 07/11] arm64: dts: meson-g12a-x96-max: Enable BT Module

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

Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
---
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


2019-03-18 10:08:33

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 03/11] arm64: dts: meson-g12a-x96-max: add uart_AO pinctrl

Add pinctrl on the always-enabled debug UART AO.

Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
---
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


2019-03-18 10:08:49

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v2 01/11] arm64: dts: meson-g12a-u200: add uart_AO pinctrl

Add pinctrl on the always-enabled debug UART AO.

Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
---
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


2019-03-18 20:08:47

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: add regulators

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

2019-03-18 20:10:07

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators

On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <[email protected]> wrote:
>
> From: Jerome Brunet <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
I have no details about this board but the changes look sane, so:
Acked-by: Martin Blumenstingl <[email protected]>

2019-03-18 20:14:43

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators

Hi Neil,

On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <[email protected]> wrote:
>
> 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)
>
> Signed-off-by: Guillaume La Roque <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> .../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

2019-03-18 20:16:08

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: Enable USB

On Mon, Mar 18, 2019 at 11:07 AM Neil Armstrong <[email protected]> wrote:
>
> Enable the USB2 and USB3 Host ports on the X96 Max Set-Top-Box.
>
> Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2019-03-18 20:16:27

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB

On Mon, Mar 18, 2019 at 11:07 AM Neil Armstrong <[email protected]> wrote:
>
> Enable the USB2 and USB3 Host ports on the SEI520 Set-Top-Box.
>
> Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2019-03-18 20:19:17

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support

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

> ---
> .../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

2019-03-19 08:30:12

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators

On 18/03/2019 21:13, Martin Blumenstingl wrote:
> Hi Neil,
>
> On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <[email protected]> wrote:
>>
>> 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)
>>
>> Signed-off-by: Guillaume La Roque <[email protected]>
>> Signed-off-by: Neil Armstrong <[email protected]>
>> ---
>> .../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
>


2019-03-19 20:14:25

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators

Hi Neil,

On Tue, Mar 19, 2019 at 9:29 AM Neil Armstrong <[email protected]> wrote:
>
> On 18/03/2019 21:13, Martin Blumenstingl wrote:
> > Hi Neil,
> >
> > On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <[email protected]> wrote:
> >>
> >> 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)
> >>
> >> Signed-off-by: Guillaume La Roque <[email protected]>
> >> Signed-off-by: Neil Armstrong <[email protected]>
> >> ---
> >> .../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

2019-03-19 20:31:34

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators

On 19/03/2019 21:13, Martin Blumenstingl wrote:
> Hi Neil,
>
> On Tue, Mar 19, 2019 at 9:29 AM Neil Armstrong <[email protected]> wrote:
>>
>> On 18/03/2019 21:13, Martin Blumenstingl wrote:
>>> Hi Neil,
>>>
>>> On Mon, Mar 18, 2019 at 11:06 AM Neil Armstrong <[email protected]> wrote:
>>>>
>>>> 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)
>>>>
>>>> Signed-off-by: Guillaume La Roque <[email protected]>
>>>> Signed-off-by: Neil Armstrong <[email protected]>
>>>> ---
>>>> .../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
>


2019-03-23 00:15:17

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v2 00/11] arm64: dts: g12a: Add boards peripherals

Neil Armstrong <[email protected]> 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

2019-04-09 10:20:56

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators

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 <[email protected]>
>
> 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 <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> .../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 {
>

2019-04-16 00:50:05

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators

Neil Armstrong <[email protected]> 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