2019-03-25 10:17:24

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v3 0/6] arm64: dts: g12a: Add boards peripherals

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

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

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

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

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

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

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

.../boot/dts/amlogic/meson-g12a-sei510.dts | 35 ++++++++
.../boot/dts/amlogic/meson-g12a-u200.dts | 12 +++
.../boot/dts/amlogic/meson-g12a-x96-max.dts | 84 +++++++++++++++++++
3 files changed, 131 insertions(+)

--
2.21.0



2019-03-25 10:15:53

by Neil Armstrong

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

From: Guillaume La Roque <[email protected]>

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

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

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..0ba28491e2b0 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-low;
+ };
+
+ vddao_1v8: regulator-vddao_1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDAO_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vddao_3v3>;
+ regulator-always-on;
+ };
+
+ vddao_3v3: regulator-vddao_3v3 {
+ compatible = "regulator-fixed";
+ regulator-name = "VDDAO_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&dc_in>;
+ regulator-always-on;
+ };
};

&uart_AO {
--
2.21.0


2019-03-25 10:16:22

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v3 6/6] 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]>
Reviewed-by: Martin Blumenstingl <[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 0a6919523ba9..b5b88262c06a 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.21.0


2019-03-25 10:16:22

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v3 4/6] 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]>
Reviewed-by: Martin Blumenstingl <[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.21.0


2019-03-25 10:16:42

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v3 5/6] 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.21.0


2019-03-25 10:17:12

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v3 3/6] 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]>
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 {
+ 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.21.0


2019-03-25 10:18:06

by Neil Armstrong

[permalink] [raw]
Subject: [PATCH v3 2/6] 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 0ba28491e2b0..0a6919523ba9 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.21.0


2019-03-25 17:24:28

by Martin Blumenstingl

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

On Mon, Mar 25, 2019 at 11:15 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]>
Reviewed-by: Martin Blumenstingl <[email protected]>

2019-03-29 20:53:24

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v3 0/6] arm64: dts: g12a: Add boards peripherals

Neil Armstrong <[email protected]> writes:

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

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

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

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

Kevin

2019-04-16 00:36:53

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH v3 0/6] arm64: dts: g12a: Add boards peripherals

Kevin Hilman <[email protected]> writes:

> Neil Armstrong <[email protected]> writes:
>
>> Following [1], add regulators, bluetooth and ADC keys on :
>> - meson-g12a-x96-max
>> - meson-g12a-u200
>> - meson-g12a-sei510
>>
>> Dependencies :
>> - Patch 1, 2: None
>
> Queued for v5.2 (branch v5.2/dt64)
>
>> - Patch 3: SAR ADC node at [2]
>> - Patches 4, 5, & 6: USB nodes at [3]
>
> Looks like I can queue these as soon as there's a stable clock headers
> branch I can use.

Queued for v5.2,

Thanks,

Kevin