2019-03-11 09:58:38

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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

[1] https://patchwork.kernel.org/cover/10843095/

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 | 97 +++++++++++++++++++
.../boot/dts/amlogic/meson-g12a-u200.dts | 97 +++++++++++++++++++
.../boot/dts/amlogic/meson-g12a-x96-max.dts | 88 +++++++++++++++++
3 files changed, 282 insertions(+)

--
2.20.1



2019-03-11 09:57:08

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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]>
---
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-11 09:57:10

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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.

Signed-off-by: Guillaume La Roque <[email protected]>
Signed-off-by: Neil Armstrong <[email protected]>
---
.../boot/dts/amlogic/meson-g12a-x96-max.dts | 65 +++++++++++++++++++
1 file changed, 65 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..21e5de48613e 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -21,6 +21,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;
+ };
+
+ 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;
+ };
+
+ 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-11 09:57:15

by Neil Armstrong

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

From: Jerome Brunet <[email protected]>

Add system regulators for the S905D2 U200 reference design.

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..17696f356ff2 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -14,13 +14,92 @@
aliases {
serial0 = &uart_AO;
};
+
chosen {
stdout-path = "serial0:115200n8";
};
+
memory@0 {
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-11 09:57:23

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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]>
---
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-11 09:57:27

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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 | 9 +++++++++
1 file changed, 9 insertions(+)

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


2019-03-11 09:57:36

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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]>
---
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 21e5de48613e..61606601fb4f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -88,6 +88,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-11 09:57:41

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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 | 55 +++++++++++++++++++
1 file changed, 55 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..2b11b5893958 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -15,10 +15,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 +57,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-11 09:58:13

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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]>
---
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
index 17696f356ff2..cc043e075521 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
@@ -108,3 +108,19 @@
pinctrl-names = "default";
};

+&usb {
+ status = "okay";
+ vbus-supply = <&usb_pwr_en>;
+};
+
+&usb2_phy0 {
+ phy-supply = <&vcc_5v>;
+};
+
+&usb2_phy1 {
+ phy-supply = <&vcc_5v>;
+};
+
+&dwc2 {
+ status = "okay";
+};
--
2.20.1


2019-03-11 09:58:16

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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 | 9 +++++++++
1 file changed, 9 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 61606601fb4f..625e240a9c09 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
@@ -105,3 +105,12 @@
pinctrl-0 = <&uart_ao_a_pins>;
pinctrl-names = "default";
};
+
+&usb {
+ status = "okay";
+ dr_mode = "host";
+};
+
+&dwc2 {
+ status = "okay";
+};
--
2.20.1


2019-03-11 09:58:31

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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]>
---
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-11 09:59:35

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH 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 | 31 +++++++++++++++++++
1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 2b11b5893958..3d230545122e 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/input/input.h>
+#include <dt-bindings/gpio/meson-g12a-gpio.h>

/ {
compatible = "seirobotics,sei510", "amlogic,g12a";
@@ -15,6 +17,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";
@@ -85,7 +100,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-15 21:43:32

by Martin Blumenstingl

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

On Mon, Mar 11, 2019 at 10:56 AM Neil Armstrong <[email protected]> wrote:
>
> Add pinctrl on the always-enabled debug UART AO.
>
> Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2019-03-15 21:43:53

by Martin Blumenstingl

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

On Mon, Mar 11, 2019 at 10:56 AM Neil Armstrong <[email protected]> wrote:
>
> Add pinctrl on the always-enabled debug UART AO.
>
> Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2019-03-15 21:44:37

by Martin Blumenstingl

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

On Mon, Mar 11, 2019 at 10:57 AM Neil Armstrong <[email protected]> wrote:
>
> Add pinctrl on the always-enabled debug UART AO.
>
> Signed-off-by: Neil Armstrong <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2019-03-15 21:51:00

by Martin Blumenstingl

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

Hi Neil,

On Mon, Mar 11, 2019 at 10:57 AM Neil Armstrong <[email protected]> wrote:
>
> Enable the Bluetooth Module on the X96 Max Set-Top-Box.
>
> Signed-off-by: Neil Armstrong <[email protected]>
I didn't have time to test this yet but it looks sane to me, so:
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 21e5de48613e..61606601fb4f 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> @@ -88,6 +88,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>;
you could add:
host-wakeup-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
(at least according to the output of /sys/kernel/debug/gpio and the
.dtb on my X96 Max)


Regards
Martin

2019-03-15 21:53:56

by Martin Blumenstingl

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

Hi Neil,

On Mon, Mar 11, 2019 at 10:58 AM Neil Armstrong <[email protected]> wrote:
[...]
> +&dwc2 {
> + status = "okay";
> +};
your patch description states that this enables the "USB host ports"
but dwc2 is only used for peripheral mode (meaning: dr_mode =
"peripheral" or dr_mode = "otg").
do we still need to enable dwc2 in a host-only configuration?


Regards
Martin

2019-03-15 21:55:37

by Martin Blumenstingl

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

On Mon, Mar 11, 2019 at 10:58 AM Neil Armstrong <[email protected]> wrote:
>
> Enable the USB2 OTG and USB3 Host ports on the S905D2 Reference Design.
>
> Signed-off-by: Neil Armstrong <[email protected]>
I have no details on the U200 board (whether it has a micro USB OTG
port, etc.) but this looks sane so:
Acked-by: Martin Blumenstingl <[email protected]>

2019-03-15 22:02:30

by Martin Blumenstingl

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

Hi Neil,

On Mon, Mar 11, 2019 at 10:57 AM Neil Armstrong <[email protected]> wrote:
>
> From: Jerome Brunet <[email protected]>
>
> Add system regulators for the S905D2 U200 reference design.
I find the hint in the meson-g12a-sei510 regulators patch very good:
Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU(PWM controlled)
* VDDQ1_5

VDD_EE and VDD_CPU are *probably* going to be very similar across all
boards (Meson8b uses two slightly different PWM regulators on all
boards supported by mainline, but the basic concept is always the
same)
I'm not sure if VDDQ1_5 is specific to the SEI510 board though.

> 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..17696f356ff2 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
> @@ -14,13 +14,92 @@
> aliases {
> serial0 = &uart_AO;
> };
> +
> chosen {
> stdout-path = "serial0:115200n8";
> };
> +
> memory@0 {
> device_type = "memory";
> reg = <0x0 0x0 0x0 0x40000000>;
> };
there are two unrelated whitespace changes above.
please clean them up if you have to re-send this for whatever reason


Regards
Martin

2019-03-15 22:09:17

by Martin Blumenstingl

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

Hi Neil and Guillaume,

On Mon, Mar 11, 2019 at 11:04 AM Neil Armstrong <[email protected]> wrote:
>
> From: Guillaume La Roque <[email protected]>
>
> Add system regulators for the X96 Max Set-Top-Box.
the hint from the "meson-g12a-sei510: add regulators" patch would be
great here as well:
Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU(PWM controlled)
* VDDQ1_5

I'm not sure whether this board also has VDDQ1_5 though, but VDD_EE
and VDD_CPU should be very similar (or even identical)

>
> Signed-off-by: Guillaume La Roque <[email protected]>
> Signed-off-by: Neil Armstrong <[email protected]>
> ---
> .../boot/dts/amlogic/meson-g12a-x96-max.dts | 65 +++++++++++++++++++
> 1 file changed, 65 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..21e5de48613e 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
> @@ -21,6 +21,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;
> + };
> +
> + main_12v: regulator-main_12v {
> + compatible = "regulator-fixed";
> + regulator-name = "12V";
> + regulator-min-microvolt = <12000000>;
> + regulator-max-microvolt = <12000000>;
> + regulator-always-on;
> + };
mine has a 5V DC in. can you please check this on your board?


Regards
Martin

2019-03-16 14:41:47

by Neil Armstrong

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

HI,

Le 15/03/2019 23:01, Martin Blumenstingl a écrit :
> Hi Neil,
>
> On Mon, Mar 11, 2019 at 10:57 AM Neil Armstrong <[email protected]> wrote:
>>
>> From: Jerome Brunet <[email protected]>
>>
>> Add system regulators for the S905D2 U200 reference design.
> I find the hint in the meson-g12a-sei510 regulators patch very good:
> Still missing
> * VDD_EE (0.8V - PWM controlled)
> * VDD_CPU(PWM controlled)
> * VDDQ1_5

I will add the same comment here

>
> VDD_EE and VDD_CPU are *probably* going to be very similar across all
> boards (Meson8b uses two slightly different PWM regulators on all
> boards supported by mainline, but the basic concept is always the
> same)

Not necessarily, it can change, it used to change across GXBB boards, but
seems to be more coherent across GXL/GXM/G12A ref designs and derivative
boards, but it can still change if the HW designer decides to be creative !

> I'm not sure if VDDQ1_5 is specific to the SEI510 board though.

I think VDDQ1_5 is specific to SEI510, will check on the schematics

>
>> 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..17696f356ff2 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts
>> @@ -14,13 +14,92 @@
>> aliases {
>> serial0 = &uart_AO;
>> };
>> +
>> chosen {
>> stdout-path = "serial0:115200n8";
>> };
>> +
>> memory@0 {
>> device_type = "memory";
>> reg = <0x0 0x0 0x0 0x40000000>;
>> };
> there are two unrelated whitespace changes above.
> please clean them up if you have to re-send this for whatever reason

Yep, will cleanup

>
>
> Regards
> Martin
>

2019-03-16 14:42:52

by Neil Armstrong

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



Le 15/03/2019 23:05, Martin Blumenstingl a écrit :
> Hi Neil and Guillaume,
>
> On Mon, Mar 11, 2019 at 11:04 AM Neil Armstrong <[email protected]> wrote:
>>
>> From: Guillaume La Roque <[email protected]>
>>
>> Add system regulators for the X96 Max Set-Top-Box.
> the hint from the "meson-g12a-sei510: add regulators" patch would be
> great here as well:
> Still missing
> * VDD_EE (0.8V - PWM controlled)
> * VDD_CPU(PWM controlled)
> * VDDQ1_5

Will add the comment

>
> I'm not sure whether this board also has VDDQ1_5 though, but VDD_EE
> and VDD_CPU should be very similar (or even identical)

It's bases on a ref design, we can assume it's the same yes

>
>>
>> Signed-off-by: Guillaume La Roque <[email protected]>
>> Signed-off-by: Neil Armstrong <[email protected]>
>> ---
>> .../boot/dts/amlogic/meson-g12a-x96-max.dts | 65 +++++++++++++++++++
>> 1 file changed, 65 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..21e5de48613e 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> @@ -21,6 +21,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;
>> + };
>> +
>> + main_12v: regulator-main_12v {
>> + compatible = "regulator-fixed";
>> + regulator-name = "12V";
>> + regulator-min-microvolt = <12000000>;
>> + regulator-max-microvolt = <12000000>;
>> + regulator-always-on;
>> + };
> mine has a 5V DC in. can you please check this on your board?
>
>
> Regards
> Martin
>

2019-03-16 14:43:02

by Neil Armstrong

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



Le 15/03/2019 23:05, Martin Blumenstingl a écrit :
> Hi Neil and Guillaume,
>
> On Mon, Mar 11, 2019 at 11:04 AM Neil Armstrong <[email protected]> wrote:
>>
>> From: Guillaume La Roque <[email protected]>
>>
>> Add system regulators for the X96 Max Set-Top-Box.
> the hint from the "meson-g12a-sei510: add regulators" patch would be
> great here as well:
> Still missing
> * VDD_EE (0.8V - PWM controlled)
> * VDD_CPU(PWM controlled)
> * VDDQ1_5
>
> I'm not sure whether this board also has VDDQ1_5 though, but VDD_EE
> and VDD_CPU should be very similar (or even identical)
>
>>
>> Signed-off-by: Guillaume La Roque <[email protected]>
>> Signed-off-by: Neil Armstrong <[email protected]>
>> ---
>> .../boot/dts/amlogic/meson-g12a-x96-max.dts | 65 +++++++++++++++++++
>> 1 file changed, 65 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..21e5de48613e 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> @@ -21,6 +21,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;
>> + };
>> +
>> + main_12v: regulator-main_12v {
>> + compatible = "regulator-fixed";
>> + regulator-name = "12V";
>> + regulator-min-microvolt = <12000000>;
>> + regulator-max-microvolt = <12000000>;
>> + regulator-always-on;
>> + };
> mine has a 5V DC in. can you please check this on your board?

Indeed it's a bad copy/paste from SEI510

>
>
> Regards
> Martin
>

2019-03-16 14:43:49

by Neil Armstrong

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



Le 15/03/2019 22:48, Martin Blumenstingl a écrit :
> Hi Neil,
>
> On Mon, Mar 11, 2019 at 10:57 AM Neil Armstrong <[email protected]> wrote:
>>
>> Enable the Bluetooth Module on the X96 Max Set-Top-Box.
>>
>> Signed-off-by: Neil Armstrong <[email protected]>
> I didn't have time to test this yet but it looks sane to me, so:
> 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 21e5de48613e..61606601fb4f 100644
>> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts
>> @@ -88,6 +88,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>;
> you could add:
> host-wakeup-gpios = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
> (at least according to the output of /sys/kernel/debug/gpio and the
> .dtb on my X96 Max)

Will add !

>
>
> Regards
> Martin
>

2019-03-16 14:46:56

by Neil Armstrong

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



Le 15/03/2019 22:50, Martin Blumenstingl a écrit :
> Hi Neil,
>
> On Mon, Mar 11, 2019 at 10:58 AM Neil Armstrong <[email protected]> wrote:
> [...]
>> +&dwc2 {
>> + status = "okay";
>> +};
> your patch description states that this enables the "USB host ports"
> but dwc2 is only used for peripheral mode (meaning: dr_mode =
> "peripheral" or dr_mode = "otg").
> do we still need to enable dwc2 in a host-only configuration?

DWC2 is peripheral-only, but we can still manually switch one of the
ports and use it as peripheral with a Type-A to Type-A cable, thus
enabling dwc2.

If the OTG capable PHYs was behind an USB Hub or directly connected to
a device, we could disable dwc2, but for now this port is always tied
to a physical Type-A or micro-USB connector.

Maybe it would be sane to always enable dwc2, and disable it for specific
boards only.

Neil

>
>
> Regards
> Martin
>

2019-03-16 22:08:05

by Martin Blumenstingl

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

Hi Neil,

On Sat, Mar 16, 2019 at 3:46 PM Neil Armstrong <[email protected]> wrote:
>
>
>
> Le 15/03/2019 22:50, Martin Blumenstingl a écrit :
> > Hi Neil,
> >
> > On Mon, Mar 11, 2019 at 10:58 AM Neil Armstrong <[email protected]> wrote:
> > [...]
> >> +&dwc2 {
> >> + status = "okay";
> >> +};
> > your patch description states that this enables the "USB host ports"
> > but dwc2 is only used for peripheral mode (meaning: dr_mode =
> > "peripheral" or dr_mode = "otg").
> > do we still need to enable dwc2 in a host-only configuration?
>
> DWC2 is peripheral-only, but we can still manually switch one of the
> ports and use it as peripheral with a Type-A to Type-A cable, thus
> enabling dwc2.
thank you for the explanation!

> If the OTG capable PHYs was behind an USB Hub or directly connected to
> a device, we could disable dwc2, but for now this port is always tied
> to a physical Type-A or micro-USB connector.
>
> Maybe it would be sane to always enable dwc2, and disable it for specific
> boards only.
In case the port is connected to an USB hub we can add a comment to
the .dts to explain why dwc2 is being disabled. that way we don't need
a comment in each board.dts that it's enabled to support forced mode
switching.
in other words: I like this idea!


Regards
Martin