ARM64: meson-gxm: R-Box Pro enablement
Subsystems (2)
cover ARM64: meson-gxm: R-Box Pro enablement
Hello,
This mini-series adds initial support for the Amlogic S912 based R-Box Pro TV boxes.
Patch 1 should apply today, patch 2 depends on Martin's Bluetooth series.
Wifi further depends on: https://patchwork.kernel.org/patch/9518447/
(and /etc/wifi/AP6255/nvram.txt as /lib/firmware/brcm/brcmfmac43455-sdio.txt)
Regards,
Andreas
Andreas F?rber (2):
ARM64: dts: meson-gxm: Add R-Box Pro
ARM64: dts: meson-gxm-rbox-pro: Enable Bluetooth
arch/arm64/boot/dts/amlogic/Makefile | 1 + arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 249 +++++++++++++++++++++ 2 files changed, 250 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
Signature · 1 line
2.10.2
PATCH 1/2 ARM64: dts: meson-gxm: Add R-Box Pro
The R-Box Pro is a TV box derived from Amlogic q200 reference design. It uses an AP6255 Wifi module. It features an LED tube that lights a surrounding stripe and the top logo in blue or red or pink'ish - blue is on by default, and red (i.e., pink) is configured as panic indicator.
This device is available in at least two models, with 2 GB vs. 3 GB RAM as well as varying eMMC size. The intent is to handle this with a single .dts that gets the actual RAM size from U-Boot.
The vendor prefix remains to be clarified, therefore no dedicated board compatible string yet.
--- arch/arm64/boot/dts/amlogic/Makefile | 1 + arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 240 +++++++++++++++++++++ 2 files changed, 241 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts
arch/arm64/boot/dts/amlogic/Makefile +1 -0
@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q201.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb always := $(dtb-y) subdir-y := $(dts-dirs)
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts new file +240 -0
240 lines not on this page · raw message
Signature · 1 line
2.10.2
Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add R-Box Pro
Am 17.01.2017 um 04:06 schrieb Andreas F?rber:
Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts new file +7
-0+ leds { + compatible = "gpio-leds"; + + blue { + label = "rbox-pro:blue:on"; + gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; + default-state = "on";
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts line 88
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts new file +10
-0+ }; + + red { + label = "rbox-pro:red:standby"; + gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>; + default-state = "off"; + retain-state-suspended; + panic-indicator; + }; + };
The original property names for these two were led and red. If anyone has better label names than the above, please speak up. Ditto for vega-s95. On the odroidc2 it's called alive but uses heartbeat there.
The vendor device tree had a third "mcu" GPIO in the sysled node, GPIOAO_6, which leads to immediate power-off. I tried using "gpio-poweroff" to configure this pin, but that driver fails to initialize because some pm callback is already registered - I assume from psci, which apparently succeeds to power-off the system, too. For comparison, the S905 based Vega S95 Telos has no such mcu property. Any thoughts?
Also, any ideas how best to switch from blue to red for suspend? Add pinctrl properties above? systemd service doing echo from userspace? I assume in Android the Amlogic sysled driver handles all that logic - didn't find any suspend equivalent to gpio-poweroff.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Kevin Hilman
maintainerRe: [PATCH 1/2] ARM64: dts: meson-gxm: Add R-Box Pro
Quoted 31 lines · Andreas F?rber
Am 17.01.2017 um 04:06 schrieb Andreas F?rber:
Quoted 7 lines
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts new file +7
-0+ leds { + compatible = "gpio-leds"; + + blue { + label = "rbox-pro:blue:on"; + gpios = <&gpio_ao GPIOAO_9 GPIO_ACTIVE_HIGH>; + default-state = "on";arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts line 88
Quoted 10 lines
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts new file +10
-0+ }; + + red { + label = "rbox-pro:red:standby"; + gpios = <&gpio GPIODV_28 GPIO_ACTIVE_HIGH>; + default-state = "off"; + retain-state-suspended; + panic-indicator; + }; + };The original property names for these two were led and red. If anyone has better label names than the above, please speak up. Ditto for vega-s95. On the odroidc2 it's called alive but uses heartbeat there.
The vendor device tree had a third "mcu" GPIO in the sysled node,
GPIOAO_6, which leads to immediate power-off. I tried using "gpio-poweroff" to configure this pin, but that driver fails to initialize because some pm callback is already registered - I assume from psci, which apparently succeeds to power-off the system, too. For comparison, the S905 based Vega S95 Telos has no such mcu property. Any thoughts?
Quoted 4 lines
Also, any ideas how best to switch from blue to red for suspend? Add pinctrl properties above? systemd service doing echo from userspace? I assume in Android the Amlogic sysled driver handles all that logic - didn't find any suspend equivalent to gpio-poweroff.
in leds-gpio, when retain-state-suspended is not set, the LED is automatically set to value 0. I wonder if leds-gpio should grow support to make the suspend value configurable? Or a property like "toggle-state-suspended" ?
Kevin
PATCH 1/3 Documentation: devicetree: Add Kingnovel vendor prefix
In reply to Andreas FärberTheir domain name is spelled kingnoval, but textually Kingnovel.
--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -156,6 +156,7 @@ karo Ka-Ro electronics GmbH keithkoep Keith & Koep GmbH keymile Keymile GmbH kinetic Kinetic Technologies +kingnovel Kingnovel Technology Co., Ltd. kosagi Sutajio Ko-Usagi PTE Ltd. kyo Kyocera Corporation lacie LaCie
Signature · 1 line
2.10.2
PATCH 2/3 Documentation: devicetree: amlogic: Add R-Box Pro
---
Originally I thought we would group by SoC (6, 8, 8b, gxbb, gxl, gmx, etc.) but this got out of order with nexbox,a95x - so inserting kingnovel between amlogic and nexbox here. If that's what we want going forward, we should move the old entries to make the scheme clearer. The alternative would be to reorder alphabetically within each SoC group, but nexbox,a95x with two SoCs makes it difficult to categorize, we could choose gxbb as the earlier one.
Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/arm/amlogic.txt +1 -0
@@ -45,5 +45,6 @@ Board compatible values: - "amlogic,p231" (Meson gxl s905d) - "amlogic,q200" (Meson gxm s912) - "amlogic,q201" (Meson gxm s912) + - "kingnovel,r-box-pro" (Meson gxm S912) - "nexbox,a95x" (Meson gxbb or Meson gxl s905x) - "nexbox,a1" (Meson gxm s912)
Signature · 1 line
2.10.2
Re: [PATCH 2/3] Documentation: devicetree: amlogic: Add R-Box Pro
Quoted 9 lines · Andreas F?rber
Cc ada at kingnoval.comSigned-off-by Andreas F?rber <[email protected]>---
Originally I thought we would group by SoC (6, 8, 8b, gxbb, gxl, gmx, etc.) but this got out of order with nexbox,a95x - so inserting kingnovel between amlogic and nexbox here. If that's what we want going forward, we should move the old entries to make the scheme clearer. The alternative would be to reorder alphabetically within each SoC group, but nexbox,a95x with two SoCs makes it difficult to categorize, we could choose gxbb as the earlier one.
Andreas,
Feel free to provide a fixup.
Neil
Quoted 16 lines
Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+)Documentation/devicetree/bindings/arm/amlogic.txt +1
-0@@ -45,5 +45,6 @@ Board compatible values: - "amlogic,p231" (Meson gxl s905d) - "amlogic,q200" (Meson gxm s912) - "amlogic,q201" (Meson gxm s912) + - "kingnovel,r-box-pro" (Meson gxm S912) - "nexbox,a95x" (Meson gxbb or Meson gxl s905x) - "nexbox,a1" (Meson gxm s912)
Re: [PATCH 2/3] Documentation: devicetree: amlogic: Add R-Box Pro
Am 18.01.2017 um 10:35 schrieb Neil Armstrong:
Quoted 11 lines · Andreas F?rber
Quoted 9 lines
Cc ada at kingnoval.comSigned-off-by Andreas F?rber <[email protected]>---
Originally I thought we would group by SoC (6, 8, 8b, gxbb, gxl, gmx, etc.) but this got out of order with nexbox,a95x - so inserting kingnovel between amlogic and nexbox here. If that's what we want going forward, we should move the old entries to make the scheme clearer. The alternative would be to reorder alphabetically within each SoC group, but nexbox,a95x with two SoCs makes it difficult to categorize, we could choose gxbb as the earlier one.
Quoted 3 lines
Andreas,
Feel free to provide a fixup.
Sure, the question is which way. ;) Kevin? Carlo?
Cheers,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Kevin Hilman
maintainerRe: [PATCH 2/3] Documentation: devicetree: amlogic: Add R-Box Pro
Quoted 12 lines · Andreas F?rber
Am 18.01.2017 um 10:35 schrieb Neil Armstrong:
Quoted 11 lines · Andreas F?rber
Quoted 9 lines
Cc ada at kingnoval.comSigned-off-by Andreas F?rber <[email protected]>---
Originally I thought we would group by SoC (6, 8, 8b, gxbb, gxl, gmx, etc.) but this got out of order with nexbox,a95x - so inserting kingnovel between amlogic and nexbox here. If that's what we want going forward, we should move the old entries to make the scheme clearer. The alternative would be to reorder alphabetically within each SoC group, but nexbox,a95x with two SoCs makes it difficult to categorize, we could choose gxbb as the earlier one.
Quoted 5 lines
Quoted 3 lines
Andreas,
Feel free to provide a fixup.
Sure, the question is which way. ;) Kevin? Carlo?
I don't have a strong preference, but continuing to group by SoC makes the most sense based on what we have there now.
Moving nexbox,a95x up to the first one (gxbb) is fine with me.
Kevin
Re: [PATCH 2/3] Documentation: devicetree: amlogic: Add R-Box Pro
In reply to Andreas FärberQuoted 10 lines · Andreas F?rber
Cc ada at kingnoval.comSigned-off-by Andreas F?rber <[email protected]>---
Originally I thought we would group by SoC (6, 8, 8b, gxbb, gxl, gmx, etc.) but this got out of order with nexbox,a95x - so inserting kingnovel between amlogic and nexbox here. If that's what we want going forward, we should move the old entries to make the scheme clearer. The alternative would be to reorder alphabetically within each SoC group, but nexbox,a95x with two SoCs makes it difficult to categorize, we could choose gxbb as the earlier one.
Quoted 2 lines
Documentation/devicetree/bindings/arm/amlogic.txt | 1 + 1 file changed, 1 insertion(+)
PATCH 3/3 ARM64: dts: meson-gxm-rbox-pro: Add board compatible string
In reply to Andreas Färber---
To be squashed in v2.
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +1 -1
@@ -53,7 +53,7 @@ #include "meson-gxm.dtsi" / { - compatible = "amlogic,s912", "amlogic,meson-gxm"; + compatible = "kingnovel,r-box-pro", "amlogic,s912", "amlogic,meson-gxm"; model = "R-Box Pro"; aliases {
Signature · 1 line
2.10.2
Kevin Hilman
maintainerRe: [PATCH 3/3] ARM64: dts: meson-gxm-rbox-pro: Add board compatible string
Quoted 4 lines · Andreas F?rber
Cc ada at kingnoval.comSigned-off-by Andreas F?rber <[email protected]>---
To be squashed in v2.
FYI, since you mention v2 here, i'll wait on this series and assume you'll update it on top of your cleanup series.
Kevin
Re: [PATCH 3/3] ARM64: dts: meson-gxm-rbox-pro: Add board compatible string
Am 23.01.2017 um 19:21 schrieb Kevin Hilman:
Quoted 9 lines
Quoted 4 lines · Andreas F?rber
Cc ada at kingnoval.comSigned-off-by Andreas F?rber <[email protected]>---
To be squashed in v2.FYI, since you mention v2 here, i'll wait on this series and assume you'll update it on top of your cleanup series.
Yes, I am waiting on the board documentation cleanup to be merged before I rebase though. The others shouldn't matter here.
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Re: [PATCH 1/3] Documentation: devicetree: Add Kingnovel vendor prefix
In reply to Andreas FärberQuoted 7 lines · Andreas F?rber
Their domain name is spelled kingnoval, but textually Kingnovel.
Cc ada at kingnoval.comSigned-off-by Andreas F?rber <[email protected]>--- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add R-Box Pro
In reply to Andreas FärberAm 17.01.2017 um 04:06 schrieb Andreas F?rber:
arch/arm64/boot/dts/amlogic/Makefile dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb · line 14
Quoted 8 lines
arch/arm64/boot/dts/amlogic/Makefile +0
-0@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q201.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtb
What is the logic behind meson-gxm-s912-q201 vs. meson-gxm-nexbox-a1? Should it be renamed to include -s912 for consistency?
arch/arm64/boot/dts/amlogic/Makefile dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb · line 15
Quoted 1 line
arch/arm64/boot/dts/amlogic/Makefile +1
-0+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtb
Should this new board use meson-gxm-s912-?
arch/arm64/boot/dts/amlogic/Makefile dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb · line 18
Quoted 3 lines
arch/arm64/boot/dts/amlogic/Makefile +0
-0always := $(dtb-y) subdir-y := $(dts-dirs)
Regards,
Andreas
Signature · 3 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton HRB 21284 (AG N?rnberg)
Kevin Hilman
maintainerRe: [PATCH 1/2] ARM64: dts: meson-gxm: Add R-Box Pro
Quoted 12 lines · Andreas F?rber
Am 17.01.2017 um 04:06 schrieb Andreas F?rber:
arch/arm64/boot/dts/amlogic/Makefile dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb · line 14
Quoted 8 lines
arch/arm64/boot/dts/amlogic/Makefile +0
-0@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q201.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtbWhat is the logic behind meson-gxm-s912-q201 vs. meson-gxm-nexbox-a1? Should it be renamed to include -s912 for consistency?
Oops, I think it should be renamed for consistency.
I believe there's only one chip in the GXM family (S912) so it might be that we could either drop the -s912 from the q20x boards or, add it to the nexbox.
I lean towards dropping the -s912 since there's a single chip in GXM. (FWIW, GXL has more than one chip in the family so we added the chip there.)
Quoted 3 lines
arch/arm64/boot/dts/amlogic/Makefile dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb · line 15
Quoted 1 line
arch/arm64/boot/dts/amlogic/Makefile +1
-0+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtbShould this new board use meson-gxm-s912-?
No. Unless Neil or you thing otherwise, I think we should send a patch to drop the -s912 from the q20x boards instead. (where "we" == Neil) ;)
Kevin
Re: [PATCH 1/2] ARM64: dts: meson-gxm: Add R-Box Pro
Hi Andreas, Kevin,
Quoted 14 lines · Kevin Hilman
Quoted 12 lines · Andreas F?rber
Am 17.01.2017 um 04:06 schrieb Andreas F?rber:
arch/arm64/boot/dts/amlogic/Makefile dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb · line 14
Quoted 8 lines
arch/arm64/boot/dts/amlogic/Makefile +0
-0@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q200.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-s912-q201.dtb dtb-$(CONFIG_ARCH_MESON) += meson-gxm-nexbox-a1.dtbWhat is the logic behind meson-gxm-s912-q201 vs. meson-gxm-nexbox-a1? Should it be renamed to include -s912 for consistency?
It followed the GXL logic... until I posted the nexbox-a1 without ! Since the q20x and p23x boards are the same, it was to enforce the fact that the S912 was on the q200 and q201 boards.
Quoted 5 lines
Oops, I think it should be renamed for consistency.
I believe there's only one chip in the GXM family (S912) so it might be that we could either drop the -s912 from the q20x boards or, add it to the nexbox.
I believe this aswell AFAIK.
Quoted 11 lines
I lean towards dropping the -s912 since there's a single chip in GXM. (FWIW, GXL has more than one chip in the family so we added the chip there.)
Quoted 3 lines
arch/arm64/boot/dts/amlogic/Makefile dtb-$(CONFIG_ARCH_MESON) += meson-gxl-nexbox-a95x.dtb · line 15
Quoted 1 line
arch/arm64/boot/dts/amlogic/Makefile +1
-0+dtb-$(CONFIG_ARCH_MESON) += meson-gxm-rbox-pro.dtbShould this new board use meson-gxm-s912-?
No. Unless Neil or you thing otherwise, I think we should send a patch to drop the -s912 from the q20x boards instead. (where "we" == Neil) ;)
Ok, will do.
Quoted 2 lines
Kevin
Neil
PATCH 2/2 ARM64: dts: meson-gxm-rbox-pro: Enable Bluetooth
In reply to Andreas FärberAdd an SDIO reset GPIO and enable the serial used by the AP6255 Bluetooth module. Based on work by Martin Blumenstingl.
--- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +10 -1
@@ -58,6 +58,7 @@ aliases { serial0 = &uart_AO; + serial1 = &uart_A; }; chosen {
@@ -122,7 +123,8 @@ sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; - reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>, + <&gpio GPIOX_17 GPIO_ACTIVE_LOW>; clocks = <&wifi32k>; clock-names = "ext_clock"; };
@@ -238,3 +240,10 @@ pinctrl-0 = <&uart_ao_a_pins>; pinctrl-names = "default"; }; + +&uart_A { + status = "okay"; + pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>; + pinctrl-names = "default"; + uart-has-rtscts; +};
Signature · 1 line
2.10.2
Kevin Hilman
maintainerRe: [PATCH 2/2] ARM64: dts: meson-gxm-rbox-pro: Enable Bluetooth
Quoted 21 lines · Andreas F?rber
Add an SDIO reset GPIO and enable the serial used by the AP6255 Bluetooth module. Based on work by Martin Blumenstingl.
Signed-off-by Andreas F?rber <[email protected]>--- arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +1
-0@@ -58,6 +58,7 @@ aliases { serial0 = &uart_AO; + serial1 = &uart_A; }; chosen {
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts line 129
Quoted 8 lines
arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts +2
-1@@ -122,7 +123,8 @@ sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; - reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>; + reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>, + <&gpio GPIOX_17 GPIO_ACTIVE_LOW>; clocks = <&wifi32k>; clock-names = "ext_clock";
c.f. thread on Martin's series. I don't like this (ab)use of
reset-gpios for sdio-pwrseq, and there's some work coming that will make this much cleaner.
So, I'll hold off on this until the other solution is ready.
Kevin