ARM64: rockchip: Initial GeekBox enablement
Subsystems (2)
v2 cover ARM64: rockchip: Initial GeekBox enablement
Hello,
This series adds initial support for the RK3368 based GeekBox.
v2 drops the .dtsi for the module, adds some nodes and a Landingship config.
This is pretty much the state demo'ed at FOSDEM 2016.
Regards,
Andreas
Andreas F?rber (10):
Documentation: devicetree: Add vendor prefix for GeekBuying.com
Documentation: devicetree: rockchip: Document GeekBox
ARM64: dts: rockchip: Add GeekBox config
ARM64: dts: rockchip: Add GMAC to GeekBox
ARM64: dts: rockchip: Add eMMC to GeekBox
ARM64: dts: rockchip: Add IR receiver to GeekBox
ARM64: dts: rockchip: Add power key to GeekBox
ARM64: dts: rockchip: Add tsadc for GeekBox
Documentation: devicetree: rockchip: Document Landingship
ARM64: dts: rockchip: Add Landingship config
Documentation/devicetree/bindings/arm/rockchip.txt | 9 + .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm64/boot/dts/rockchip/Makefile | 2 + .../dts/rockchip/rk3368-geekbox-landingship.dts | 56 ++++ arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 321 +++++++++++++++++++++ 5 files changed, 389 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-geekbox-landingship.dts create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
Signature · 1 line
2.6.2
PATCH v2 1/10 Documentation: devicetree: Add vendor prefix for GeekBuying.com
Use "geekbuying".
---
v2: New (Heiko)
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -87,6 +87,7 @@ fcs Fairchild Semiconductor firefly Firefly focaltech FocalTech Systems Co.,Ltd fsl Freescale Semiconductor +geekbuying GeekBuying GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. geniatech Geniatech, Inc.
Signature · 1 line
2.6.2
Re: [PATCH v2 01/10] Documentation: devicetree: Add vendor prefix for GeekBuying.com
Quoted 3 lines · Andreas F?rber
Use "geekbuying".
Signed-off-by Andreas F?rber <[email protected]>
PATCH v2 2/10 Documentation: devicetree: rockchip: Document GeekBox
In reply to Andreas FärberUse "geekbuying,geekbox" compatible string.
---
v2: New (Heiko)
Documentation/devicetree/bindings/arm/rockchip.txt | 4 ++++ 1 file changed, 4 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.txt +4 -0
@@ -87,6 +87,10 @@ Rockchip platforms device tree bindings "google,veyron-speedy-rev3", "google,veyron-speedy-rev2", "google,veyron-speedy", "google,veyron", "rockchip,rk3288"; +- GeekBuying GeekBox: + Required root node properties: + - compatible = "geekbuying,geekbox", "rockchip,rk3368"; + - Rockchip RK3368 evb: Required root node properties: - compatible = "rockchip,rk3368-evb-act8846", "rockchip,rk3368";
Signature · 1 line
2.6.2
Re: [PATCH v2 02/10] Documentation: devicetree: rockchip: Document GeekBox
Quoted 8 lines · Andreas F?rber
Use "geekbuying,geekbox" compatible string.
Signed-off-by Andreas F?rber <[email protected]>---
v2: New (Heiko)Documentation/devicetree/bindings/arm/rockchip.txt | 4 ++++ 1 file changed, 4 insertions(+)
PATCH v2 3/10 ARM64: dts: rockchip: Add GeekBox config
In reply to Andreas FärberThe GeekBox contains an MXM3 module with a Rockchip RK3368 SoC. Some connectors are available directly on the module.
This adds initial support, namely serial and USB.
---
v1 -> v2:
* Dropped rk3368-geekbox.dtsi. rk3368-geekbox-landingship.dts can #include "rk3368-geekbox.dts" just fine, when leaving out /dts-v1/;.
* Revisited always-on / boot-on for PMIC regulator nodes. (Heiko)
* Switched pmic-sleep from RK_FUNC_GPIO to RK_FUNC_2. (schematics)
arch/arm64/boot/dts/rockchip/Makefile | 1 + arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 245 ++++++++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -1,4 +1,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb always := $(dtb-y)
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts new file +245 -0
245 lines not on this page · raw message
Signature · 1 line
2.6.2
PATCH v2 4/10 ARM64: dts: rockchip: Add GMAC to GeekBox
In reply to Andreas Färber---
v2: New
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +20 -0
@@ -56,6 +56,13 @@ reg = <0x0 0x0 0x0 0x80000000>; }; + ext_gmac: gmac-clk { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "ext_gmac"; + #clock-cells = <0>; + }; + leds: gpio-leds { compatible = "gpio-leds";
@@ -82,6 +89,19 @@ }; }; +&gmac { + status = "okay"; + phy-supply = <&vcc_lan>; + phy-mode = "rgmii"; + clock_in_out = "input"; + assigned-clocks = <&cru SCLK_MAC>; + assigned-clock-parents = <&ext_gmac>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + tx_delay = <0x30>; + rx_delay = <0x10>; +}; + &i2c0 { status = "okay";
Signature · 1 line
2.6.2
Heiko Stuebner
maintainerRe: [PATCH v2 04/10] ARM64: dts: rockchip: Add GMAC to GeekBox
Hi Andreas,
Am Montag, 8. Februar 2016, 03:17:33 schrieb Andreas F?rber:
Quoted 1 line
Signed-off-by Andreas F?rber <[email protected]>
is there some special reason that gmac, emmc, ir, etc are in separate patches? I guess I'll just fold them into the core patch otherwise.
Heiko
Quoted 44 lines
---
v2: Newarch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)(quoted diff) +0
-0
b/arch/arm64/boot/dts/rockchip/rk3368-geekbox.dtsindexbc91d39758ab..a8dcf3c2b0c1100644arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +20
-0@@ -56,6 +56,13 @@ reg = <0x0 0x0 0x0 0x80000000>; }; + ext_gmac: gmac-clk { + compatible = "fixed-clock"; + clock-frequency = <125000000>; + clock-output-names = "ext_gmac"; + #clock-cells = <0>; + }; + leds: gpio-leds { compatible = "gpio-leds";@@ -82,6 +89,19 @@ }; }; +&gmac { + status = "okay"; + phy-supply = <&vcc_lan>; + phy-mode = "rgmii"; + clock_in_out = "input"; + assigned-clocks = <&cru SCLK_MAC>; + assigned-clock-parents = <&ext_gmac>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii_pins>; + tx_delay = <0x30>; + rx_delay = <0x10>; +}; + &i2c0 { status = "okay";
Re: [PATCH v2 04/10] ARM64: dts: rockchip: Add GMAC to GeekBox
Hi Heiko,
Am 08.02.2016 um 11:28 schrieb Heiko Stuebner:
Quoted 5 lines
Am Montag, 8. Februar 2016, 03:17:33 schrieb Andreas F?rber:
Quoted 1 line
Signed-off-by Andreas F?rber <[email protected]>is there some special reason that gmac, emmc, ir, etc are in separate patches? I guess I'll just fold them into the core patch otherwise.
Yes, feel free to squash. They are separate because they were not in v1, it makes them easier to review and I didn't want errors in them to hold up the base .dts. :) For example, SDIO I am still fighting with.
Cheers,
Andreas
Signature · 2 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N?rnberg)
PATCH v2 5/10 ARM64: dts: rockchip: Add eMMC to GeekBox
In reply to Andreas Färber---
v2: New
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +15 -0
@@ -89,6 +89,21 @@ }; }; +&emmc { + status = "okay"; + bus-width = <8>; + cap-mmc-highspeed; + clock-frequency = <150000000>; + disable-wp; + keep-power-in-suspend; + non-removable; + num-slots = <1>; + vmmc-supply = <&vcc_io>; + vqmmc-supply = <&vcc18_flash>; + pinctrl-names = "default"; + pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_bus8>; +}; + &gmac { status = "okay"; phy-supply = <&vcc_lan>;
Signature · 1 line
2.6.2
PATCH v2 6/10 ARM64: dts: rockchip: Add IR receiver to GeekBox
In reply to Andreas Färber---
v2: New
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +13 -0
@@ -63,6 +63,13 @@ #clock-cells = <0>; }; + ir: ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&ir_int>; + }; + leds: gpio-leds { compatible = "gpio-leds";
@@ -252,6 +259,12 @@ }; &pinctrl { + ir { + ir_int: ir-int { + rockchip,pins = <3 30 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + pmic { pmic_sleep: pmic-sleep { rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
Signature · 1 line
2.6.2
Re: [PATCH v2 06/10] ARM64: dts: rockchip: Add IR receiver to GeekBox
Am 08.02.2016 um 03:17 schrieb Andreas F?rber:
Quoted 12 lines
Signed-off-by Andreas F?rber <[email protected]>---
v2: Newarch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts line 70
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +5
-0@@ -63,6 +63,13 @@ #clock-cells = <0>; }; + ir: ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&ir_int>;
status = "disabled";
Should only be enabled in the new Landingship config. Will fix.
Andreas
P.S. See Heiko, two bugs in the new nodes already, glad I have them separate. :)
Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +2
-0+ }; + leds: gpio-leds { compatible = "gpio-leds";
[snip]
Signature · 2 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N?rnberg)
Re: Re: [PATCH v2 06/10] ARM64: dts: rockchip: Add IR receiver to GeekBox
Le 09/02/2016 04:08, Andreas F?rber a ?crit :
Quoted 23 lines
Am 08.02.2016 um 03:17 schrieb Andreas F?rber:
Quoted 12 lines
Signed-off-by Andreas F?rber <[email protected]>---
v2: Newarch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+)arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +0
-0arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts line 70
Quoted 8 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +5
-0@@ -63,6 +63,13 @@ #clock-cells = <0>; }; + ir: ir-receiver { + compatible = "gpio-ir-receiver"; + gpios = <&gpio3 30 GPIO_ACTIVE_LOW>; + pinctrl-names = "default"; + pinctrl-0 = <&ir_int>;status = "disabled";
Quoted 3 lines
Should only be enabled in the new Landingship config. Will fix.
Andreas
Actually there's two IR receivers:
- one on the geekbox module (on the bottom side)
- and another one on the landingship.
Both are connected to the same GPIO pin, so you can keep it enabled in the main geekbox dts.
About the pinctrl, same remark as for gpio-keys: there's already external pull-up resistors on this pin, so it should be better to use pcfg_pull_none instead of pcfg_pull_up.
Julien
Quoted 11 lines
P.S. See Heiko, two bugs in the new nodes already, glad I have them separate. :)Quoted 5 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +2
-0+ }; + leds: gpio-leds { compatible = "gpio-leds";[snip]
PATCH v2 7/10 ARM64: dts: rockchip: Add power key to GeekBox
In reply to Andreas Färber---
v2: New
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +22 -0
@@ -70,6 +70,22 @@ pinctrl-0 = <&ir_int>; }; + keys: gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_key>; + #address-cells = <1>; + #size-cells = <0>; + + button at 0 { + reg = <0>; + gpio-key,wakeup = <1>; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + label = "GPIO Power"; + linux,code = <116>; + }; + }; + leds: gpio-leds { compatible = "gpio-leds";
@@ -265,6 +281,12 @@ }; }; + keys { + pwr_key: pwr-key { + rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + pmic { pmic_sleep: pmic-sleep { rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
Signature · 1 line
2.6.2
Re: [PATCH v2 07/10] ARM64: dts: rockchip: Add power key to GeekBox
Hello Andreas,
Quoted 14 lines
Le 8 f?vr. 2016 ? 03:17, Andreas F?rber <[email protected]> a ?crit :
Signed-off-by Andreas F?rber <[email protected]>---
v2: New
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts| 22 ++++++++++++++++++++++1 file changed, 22 insertions(+)arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +0
-0
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts line 78
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +6
-0@@ -70,6 +70,22 @@ pinctrl-0 = <&ir_int>; }; + keys: gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_key>; + #address-cells = <1>; + #size-cells = <0>;
I think #address-cells and #size-cells are not necessary.
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts line 81
Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +3
-0+ + button at 0 { + reg = <0>;
reg can be removed too.
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts line 82
Quoted 1 line
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +1
-0+ gpio-key,wakeup = <1>;
You should use the new "wakeup-source ? property.
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts line 85
Quoted 3 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +3
-0+ gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + label = "GPIO Power"; + linux,code = <116>;
#include <dt-bindings/input/input.h>
and use KEY_POWER instead of 116
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts line 286
Quoted 13 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +6
-0+ }; + }; + leds: gpio-leds { compatible = "gpio-leds";@@ -265,6 +281,12 @@ }; }; + keys { + pwr_key: pwr-key { + rockchip,pins = <0 2 RK_FUNC_GPIO &pcfg_pull_up>;
Is there a reason you want to enable the internal pull-up resistor on this pin?
The schematic shows there's already an external pull-up resistor so the internal one should not be needed.
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +3
-0+ }; + }; + pmic { pmic_sleep: pmic-sleep { rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
PATCH v2 8/10 ARM64: dts: rockchip: Add tsadc for GeekBox
In reply to Andreas Färber---
v2: New
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts | 6 ++++++ 1 file changed, 6 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368-geekbox.dts +6 -0
@@ -298,6 +298,12 @@ }; }; +&tsadc { + status = "okay"; + rockchip,hw-tshut-mode = <0>; /* CRU */ + rockchip,hw-tshut-polarity = <0>; /* low */ +}; + &uart2 { status = "okay"; };
Signature · 1 line
2.6.2
PATCH v2 9/10 Documentation: devicetree: rockchip: Document Landingship
In reply to Andreas FärberUse "geekbuying,landingship" compatible string, plus those of GeekBox.
---
v2: New
Documentation/devicetree/bindings/arm/rockchip.txt | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/rockchip.txt +5 -0
@@ -91,6 +91,11 @@ Rockchip platforms device tree bindings Required root node properties: - compatible = "geekbuying,geekbox", "rockchip,rk3368"; +- GeekBuying Landingship: + Required root node properties: + - compatible = "geekbuying,landingship", + "geekbuying,geekbox", "rockchip,rk3368"; + - Rockchip RK3368 evb: Required root node properties: - compatible = "rockchip,rk3368-evb-act8846", "rockchip,rk3368";
Signature · 1 line
2.6.2
Heiko Stuebner
maintainerRe: [PATCH v2 09/10] Documentation: devicetree: rockchip: Document Landingship
Am Montag, 8. Februar 2016, 03:17:38 schrieb Andreas F?rber:
Quoted 1 line
Use "geekbuying,landingship" compatible string, plus those of GeekBox.
I do believe this would be better as geekbuying,geekbox-landingship . They might reuse the landingship naming for future baseboards as well ;-)
Quoted 25 lines
Signed-off-by Andreas F?rber <[email protected]>---
v2: NewDocumentation/devicetree/bindings/arm/rockchip.txt | 5 +++++ 1 file changed, 5 insertions(+)(quoted diff) +0
-0
b/Documentation/devicetree/bindings/arm/rockchip.txtindexf633595b196c..c6d95f202591100644Documentation/devicetree/bindings/arm/rockchip.txt +5
-0@@ -91,6 +91,11 @@ Rockchip platforms device tree bindings Required root node properties: - compatible = "geekbuying,geekbox", "rockchip,rk3368"; +- GeekBuying Landingship: + Required root node properties: + - compatible = "geekbuying,landingship", + "geekbuying,geekbox", "rockchip,rk3368"; + - Rockchip RK3368 evb: Required root node properties: - compatible = "rockchip,rk3368-evb-act8846", "rockchip,rk3368";
Re: [PATCH v2 09/10] Documentation: devicetree: rockchip: Document Landingship
Am 08.02.2016 um 11:29 schrieb Heiko Stuebner:
Quoted 5 lines
Am Montag, 8. Februar 2016, 03:17:38 schrieb Andreas F?rber:
Quoted 1 line
Use "geekbuying,landingship" compatible string, plus those of GeekBox.
I do believe this would be better as geekbuying,geekbox-landingship . They might reuse the landingship naming for future baseboards as well ;-)
Well, the question is: Is this MXM3 interface as generic as Qseven so that it could be used as is for other modules (and baseboards from other manufacturers could be used for the module)? Then my thought was landingship as identifier for the baseboard and geekbox as identifier for the contained module.
I agree that if this Landingship is specific to the GeekBox then geekbox-landingship would be more appropriate. We could also do both.
Can you tell? Unfortunately I spot no real documentation of the MXM3 connector pins in the schematics we could compare, only an on-board documentation of the three-row pins.
Regards,
Andreas
Signature · 2 lines
SUSE Linux GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Felix Imend?rffer, Jane Smithard, Graham Norton; HRB 21284 (AG N?rnberg)
PATCH v2 10/10 ARM64: dts: rockchip: Add Landingship config
In reply to Andreas Färber---
v2: New - showcases inclusion of GeekBox module config
arch/arm64/boot/dts/rockchip/Makefile | 1 + .../dts/rockchip/rk3368-geekbox-landingship.dts | 56 ++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 arch/arm64/boot/dts/rockchip/rk3368-geekbox-landingship.dts
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -1,5 +1,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-evb-act8846.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox.dtb +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-geekbox-landingship.dtb dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3368-r88.dtb always := $(dtb-y)
arch/arm64/boot/dts/rockchip/rk3368-geekbox-landingship.dts new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
2.6.2