arm64: dts: g12a: Add boards peripherals
Subsystems (2)
v2 cover 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(+)
Signature · 7 lines
2.20.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH v2 1/11 arm64: dts: meson-g12a-u200: add uart_AO pinctrl
Add pinctrl on the always-enabled debug UART AO.
--- arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +2 -0
@@ -25,5 +25,7 @@ &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; };
Signature · 1 line
2.20.1
PATCH v2 2/11 arm64: dts: meson-g12a-sei510: add uart_AO pinctrl
In reply to Neil ArmstrongAdd pinctrl on the always-enabled debug UART AO.
--- arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +2 -0
@@ -35,4 +35,6 @@ &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; };
Signature · 7 lines
2.20.1 _______________________________________________ linux-amlogic mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-amlogic
PATCH v2 3/11 arm64: dts: meson-g12a-x96-max: add uart_AO pinctrl
In reply to Neil ArmstrongAdd pinctrl on the always-enabled debug UART AO.
--- arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +2 -0
@@ -25,4 +25,6 @@ &uart_AO { status = "okay"; + pinctrl-0 = <&uart_ao_a_pins>; + pinctrl-names = "default"; };
Signature · 1 line
2.20.1
PATCH v2 4/11 arm64: dts: meson-g12a-u200: add regulators
In reply to Neil ArmstrongFrom: 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)
--- .../boot/dts/amlogic/meson-g12a-u200.dts | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +79 -0
@@ -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 {
Signature · 1 line
2.20.1
Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators
Quoted 11 lines · Neil Armstrong
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:
Re: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators
In reply to Neil ArmstrongHi 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
Quoted 112 lines · Neil Armstrong
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(+)arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +79
-0@@ -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 {
Kevin Hilman
maintainerRe: [PATCH v2 04/11] arm64: dts: meson-g12a-u200: add regulators
Quoted 5 lines · Neil Armstrong
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
PATCH v2 5/11 arm64: dts: meson-g12a-sei510: add regulators
In reply to Neil ArmstrongFrom: Jerome Brunet <[email protected]>
Add some regulators. Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU(PWM controlled)
* VDDQ1_5
--- .../boot/dts/amlogic/meson-g12a-sei510.dts | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +57 -0
@@ -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 {
Signature · 1 line
2.20.1
Re: [PATCH v2 05/11] arm64: dts: meson-g12a-sei510: add regulators
Quoted 10 lines · Neil Armstrong
From: Jerome Brunet <[email protected]>
Add some regulators. Still missing
*VDD_EE(0.8V - PWM controlled)
*VDD_CPU(PWM controlled)
*VDDQ1_5Signed-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:
PATCH v2 6/11 arm64: dts: meson-g12a-x96-max: add regulators
In reply to Neil ArmstrongFrom: Guillaume La Roque <[email protected]>
Add system regulators for the X96 Max Set-Top-Box.
Still missing
* VDD_EE (0.8V - PWM controlled)
* VDD_CPU (PWM controlled)
--- .../boot/dts/amlogic/meson-g12a-x96-max.dts | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +67 -0
@@ -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 {
Signature · 1 line
2.20.1
Martin Blumenstingl
reviewerRe: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
Hi Neil,
Quoted 19 lines · Neil Armstrong
From: Guillaume La Roque <[email protected]>
Add system regulators for the X96 Max Set-Top-Box.
Still missing
*VDD_EE(0.8V - PWM controlled)
*VDD_CPU(PWM controlled)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(+)arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +0
-0
[...]
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts line 71
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +9
-0+ 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
Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
Quoted 32 lines · Martin Blumenstingl
Hi Neil,
Quoted 19 lines · Neil Armstrong
From: Guillaume La Roque <[email protected]>
Add system regulators for the X96 Max Set-Top-Box.
Still missing
*VDD_EE(0.8V - PWM controlled)
*VDD_CPU(PWM controlled)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(+)arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +0
-0[...]
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts line 71
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +9
-0+ 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;
Quoted 3 lines
is there any way to test whether this GPIO is the right one? I couldn't find a reference to a
GPIOH_8regulator 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
Quoted 5 lines
Regards
Martin
Martin Blumenstingl
reviewerRe: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
Hi Neil,
Quoted 38 lines · Neil Armstrong
Quoted 32 lines · Martin Blumenstingl
Hi Neil,
Quoted 19 lines · Neil Armstrong
From: Guillaume La Roque <[email protected]>
Add system regulators for the X96 Max Set-Top-Box.
Still missing
*VDD_EE(0.8V - PWM controlled)
*VDD_CPU(PWM controlled)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(+)arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +0
-0[...]
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts line 71
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +9
-0+ 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;Quoted 3 lines
is there any way to test whether this GPIO is the right one? I couldn't find a reference to a
GPIOH_8regulator in buildroot_openlinux_kernel_4.9_fbdev_20180706
Quoted 8 lines
The x96 is based on the U212 reference design, and the
GPIOH_8controls 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!
Quoted 2 lines
FYI, the
GPIOH_8is 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?
Quoted 4 lines
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
Re: [PATCH v2 06/11] arm64: dts: meson-g12a-x96-max: add regulators
Quoted 49 lines · Martin Blumenstingl
Hi Neil,
Quoted 38 lines · Neil Armstrong
Quoted 32 lines · Martin Blumenstingl
Hi Neil,
Quoted 19 lines · Neil Armstrong
From: Guillaume La Roque <[email protected]>
Add system regulators for the X96 Max Set-Top-Box.
Still missing
*VDD_EE(0.8V - PWM controlled)
*VDD_CPU(PWM controlled)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(+)arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +0
-0[...]
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts line 71
Quoted 9 lines
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +9
-0+ 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;Quoted 3 lines
is there any way to test whether this GPIO is the right one? I couldn't find a reference to a
GPIOH_8regulator in buildroot_openlinux_kernel_4.9_fbdev_20180706Quoted 8 lines
The x96 is based on the U212 reference design, and the
GPIOH_8controls 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
Quoted 7 lines
thank you for this explanation!
Quoted 2 lines
FYI, the
GPIOH_8is 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
Quoted 14 lines
Quoted 5 lines
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 plugRegards
Martin
PATCH v2 7/11 arm64: dts: meson-g12a-x96-max: Enable BT Module
In reply to Neil ArmstrongEnable the Bluetooth Module on the X96 Max Set-Top-Box.
--- arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +12 -0
@@ -90,6 +90,18 @@ }; }; +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; + + bluetooth { + compatible = "brcm,bcm43438-bt"; + shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; + }; +}; + &uart_AO { status = "okay"; pinctrl-0 = <&uart_ao_a_pins>;
Signature · 1 line
2.20.1
PATCH v2 8/11 arm64: dts: meson-g12a-sei510: Add ADC Key and BT support
In reply to Neil ArmstrongAdd support for the :
- ADC Touch key
- Bluetooth Module on UART A
--- .../boot/dts/amlogic/meson-g12a-sei510.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +30 -0
@@ -7,6 +7,7 @@ #include "meson-g12a.dtsi" #include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> #include <dt-bindings/gpio/meson-g12a-gpio.h> / {
@@ -17,6 +18,19 @@ serial0 = &uart_AO; }; + adc_keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + + button-onoff { + label = "On/Off"; + linux,code = <KEY_POWER>; + press-threshold-microvolt = <1700000>; + }; + }; + ao_5v: regulator-ao_5v { compatible = "regulator-fixed"; regulator-name = "AO_5V";
@@ -87,7 +101,23 @@ vin-supply = <&vddao_3v3>; regulator-always-on; }; +}; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao1v8>; +}; + +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; + bluetooth { + compatible = "brcm,bcm43438-bt"; + shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>; + }; }; &uart_AO {
Signature · 1 line
2.20.1
Re: [PATCH v2 08/11] arm64: dts: meson-g12a-sei510: Add ADC Key and BT support
Quoted 6 lines · Neil Armstrong
Add support for the :
- ADC Touch key
- Bluetooth Module on UART ASigned-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):
Quoted 17 lines
--- .../boot/dts/amlogic/meson-g12a-sei510.dts | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+)arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +1
-0@@ -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> / {
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts line 21
Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +1
-0@@ -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
PATCH v2 9/11 arm64: dts: meson-g12a-sei510: Enable USB
In reply to Neil ArmstrongEnable the USB2 and USB3 Host ports on the SEI520 Set-Top-Box.
--- arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +5 -0
@@ -125,3 +125,8 @@ pinctrl-0 = <&uart_ao_a_pins>; pinctrl-names = "default"; }; + +&usb { + status = "okay"; + dr_mode = "host"; +};
Signature · 1 line
2.20.1
Re: [PATCH v2 09/11] arm64: dts: meson-g12a-sei510: Enable USB
Quoted 4 lines · Neil Armstrong
Enable the USB2 and USB3 Host ports on the SEI520 Set-Top-Box.
Signed-off-by Neil Armstrong <[email protected]>
PATCH v2 10/11 arm64: dts: meson-g12a-u200: Enable USB
In reply to Neil ArmstrongEnable the USB2 OTG and USB3 Host ports on the S905D2 Reference Design.
--- arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts | 12 ++++++++++++ 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-u200.dts +12 -0
@@ -108,3 +108,15 @@ pinctrl-names = "default"; }; +&usb { + status = "okay"; + vbus-supply = <&usb_pwr_en>; +}; + +&usb2_phy0 { + phy-supply = <&vcc_5v>; +}; + +&usb2_phy1 { + phy-supply = <&vcc_5v>; +};
Signature · 1 line
2.20.1
PATCH v2 11/11 arm64: dts: meson-g12a-x96-max: Enable USB
In reply to Neil ArmstrongEnable the USB2 and USB3 Host ports on the X96 Max Set-Top-Box.
--- arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/amlogic/meson-g12a-x96-max.dts +5 -0
@@ -107,3 +107,8 @@ pinctrl-0 = <&uart_ao_a_pins>; pinctrl-names = "default"; }; + +&usb { + status = "okay"; + dr_mode = "host"; +};
Signature · 1 line
2.20.1
Re: [PATCH v2 11/11] arm64: dts: meson-g12a-x96-max: Enable USB
Quoted 4 lines · Neil Armstrong
Enable the USB2 and USB3 Host ports on the X96 Max Set-Top-Box.
Signed-off-by Neil Armstrong <[email protected]>
Kevin Hilman
maintainerQuoted 11 lines · Neil Armstrong
Following [1], add regulators, bluetooth, UART and ADC keys on :
- meson-g12a-x96-max
- meson-g12a-u200
- meson-g12a-sei510Changes since v1:
- Collected martin's reviewed-bys
- Added missing regulators in commit logs
- fixed x96dc_inregulator
- 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