Add MK808 RK3066 device
v2 cover Add MK808 RK3066 device
This patchset adds support for Rikomagic MK808 v1 device with RK901 wifi.
It is hdmi stick with two usb ports(host and otg), sdmmc, wifi and uart onboard.
It is RK3066 based.
Pawe? Jarosz (2):
devicetree: Add vendor prefix for Rikomagic
ARM: dts: rockchip: Add rk3066 MK808 board
Documentation/devicetree/bindings/arm/rockchip.txt | 4 + .../devicetree/bindings/vendor-prefixes.txt | 1 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3066a-mk808.dts | 184 +++++++++++++++++++++ 4 files changed, 190 insertions(+) create mode 100644 arch/arm/boot/dts/rk3066a-mk808.dts
Signature · 1 line
2.7.4
PATCH v2 1/2 devicetree: Add vendor prefix for Rikomagic
Add Rikomagic to vendor-prefixes.txt
---
Changes in v2:
- none
Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/vendor-prefixes.txt +1 -0
@@ -224,6 +224,7 @@ realtek Realtek Semiconductor Corp. renesas Renesas Electronics Corporation richtek Richtek Technology Corporation ricoh Ricoh Co. Ltd. +rikomagic Rikomagic rockchip Fuzhou Rockchip Electronics Co., Ltd samsung Samsung Semiconductor sandisk Sandisk Corporation
Signature · 1 line
2.7.4
PATCH v2 2/2 ARM: dts: rockchip: Add rk3066 MK808 board
In reply to Paweł JaroszMK808 is a tv stick which has rockchip rk3066 CPU inside, two usb ports
- host and otg, micro sd card slot and onboard wifi RK901.
---
Changes in v2:
- included Heiko sugestion.
Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3066a-mk808.dts | 184 +++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 arch/arm/boot/dts/rk3066a-mk808.dts
Documentation/devicetree/bindings/arm/rockchip.txt +4 -0
@@ -17,6 +17,10 @@ Rockchip platforms device tree bindings Required root node properties: - compatible = "chipspark,rayeager-px2", "rockchip,rk3066a"; +- Rikomagic MK808 v1 board: + Required root node properties: + - compatible = "rikomagic,mk808", "rockchip,rk3066a"; + - Radxa Rock board: Required root node properties: - compatible = "radxa,rock", "rockchip,rk3188";
arch/arm/boot/dts/Makefile +1 -0
@@ -639,6 +639,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-kylin.dtb \ rk3066a-bqcurie2.dtb \ rk3066a-marsboard.dtb \ + rk3066a-mk808.dtb \ rk3066a-rayeager.dtb \ rk3188-radxarock.dtb \ rk3228-evb.dtb \
arch/arm/boot/dts/rk3066a-mk808.dts new file +184 -0
184 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 2/2 ARM: dts: rockchip: Add rk3066 MK808 board
Hi Pawe? ,
Quoted 111 lines · Pawe? Jarosz
MK808 is a tv stick which has rockchip rk3066 CPU inside, two usb ports
- host and otg, micro sd card slot and onboard wifi RK901.Signed-off-by Pawe? Jarosz <[email protected]>---
Changes in v2:
- included Heiko sugestion.Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3066a-mk808.dts | 184 +++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 arch/arm/boot/dts/rk3066a-mk808.dtsDocumentation/devicetree/bindings/arm/rockchip.txt +4
-0@@ -17,6 +17,10 @@ Rockchip platforms device tree bindings Required root node properties: - compatible = "chipspark,rayeager-px2", "rockchip,rk3066a"; +- Rikomagic MK808 v1 board: + Required root node properties: + - compatible = "rikomagic,mk808", "rockchip,rk3066a"; + - Radxa Rock board: Required root node properties: - compatible = "radxa,rock", "rockchip,rk3188";arch/arm/boot/dts/Makefile +1
-0@@ -639,6 +639,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-kylin.dtb \ rk3066a-bqcurie2.dtb \ rk3066a-marsboard.dtb \ + rk3066a-mk808.dtb \ rk3066a-rayeager.dtb \ rk3188-radxarock.dtb \ rk3228-evb.dtb \arch/arm/boot/dts/rk3066a-mk808.dts new file +63
-0@@ -0,0 +1,184 @@ +/* + * Copyright (c) 2016 Pawe? Jarosz <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; +#include "rk3066a.dtsi" + +/ { + model = "Rikomagic MK808"; + compatible = "rikomagic,mk808", "rockchip,rk3066a"; + + chosen { + stdout-path = "serial2:115200n8"; + }; + + memory at 60000000 { + device_type = "memory"; + reg = <0x60000000 0x40000000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + blue { + label = "mk808:blue:power";
arch/arm/boot/dts/rk3066a-mk808.dts line 73
Quoted 10 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +10
-0+ gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "default-on"; + }; + }; + + mmc_pwrseq: mmc-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_pwr>;
sd slot does not contain a reset pin. So the power pin should be enough. just add sdmmc_pwr to mmc0's pinctrl-0 and let mmc driver control it should be enough. Typically pwrseq is for emmc and sdio. We don't need a pwerseq to control power for sd slot..
But it seems sdmmc_pwr is a GPIO, but not functional port. So I am interesting that why MK808 board doesn't use the mmc controller's default power pin but chosing another gpio, so finally we have to add thses code for your DT.
Quoted 5 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +5
-0+ reset-gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>; + }; + + sdio_pwrseq: sdio-pwrseq { + compatible = "mmc-pwrseq-simple";
arch/arm/boot/dts/rk3066a-mk808.dts line 88
Quoted 10 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +10
-0+ pinctrl-names = "default"; + pinctrl-0 = <&wifi_pwr>; + reset-gpios = <&gpio3 24 GPIO_ACTIVE_LOW>; + }; + + vcc_io: vcc-io { + compatible = "regulator-fixed"; + regulator-name = "vcc_io"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>;
Are you sure it should be fixed to 5V? I ask this since I see the mmc use this as vmmc which should be 3V~3V3 in principle.
arch/arm/boot/dts/rk3066a-mk808.dts line 89
Quoted 1 line
arch/arm/boot/dts/rk3066a-mk808.dts new file +1
-0+ regulator-always-on;
I'm not sure whether you need this. The regulator would maintain the user_count there. So from this patch, I think it should be turned off since we possible don't enable usb and mmc?
Moreover, the always-on power supply is depreciated by vmmc since it cause some problem to a certain degree.
Quoted 18 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +18
-0+ }; + + vcc_host: usb-host-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&host_drv>; + pinctrl-names = "default"; + regulator-always-on; + regulator-name = "host-pwr"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + startup-delay-us = <100000>; + vin-supply = <&vcc_io>; + }; + + vcc_otg: usb-otg-regulator { + compatible = "regulator-fixed"; + gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
arch/arm/boot/dts/rk3066a-mk808.dts line 117
Quoted 10 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +10
-0+ pinctrl-0 = <&otg_drv>; + pinctrl-names = "default"; + regulator-always-on; + regulator-name = "vcc_otg"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + startup-delay-us = <100000>; + vin-supply = <&vcc_io>; + }; +};
Same concern for these above.
arch/arm/boot/dts/rk3066a-mk808.dts line 123
Quoted 6 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +6
-0+ +&mmc0 { + bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + mmc-pwrseq = <&mmc_pwrseq>;
Removed this could make SD works?
Also do you need disable-wp for sd slot?
Quoted 62 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +61
-0+ num-slots = <1>; + status = "okay"; + vmmc-supply = <&vcc_io>; +}; + +&mmc1 { + bus-width = <4>; + disable-wp; + mmc-pwrseq = <&sdio_pwrseq>; + non-removable; + num-slots = <1>; + status = "okay"; + vmmc-supply = <&vcc_io>; +}; + +&pinctrl { + usb-host { + host_drv: host-drv { + rockchip,pins = <RK_GPIO0 6 RK_FUNC_GPIO &pcfg_pull_default>; + }; + }; + + usb-otg { + otg_drv: otg-drv { + rockchip,pins = <RK_GPIO0 5 RK_FUNC_GPIO &pcfg_pull_default>; + }; + }; + + sdmmc { + sdmmc_pwr: sdmmc-pwr { + rockchip,pins = <RK_GPIO3 7 RK_FUNC_GPIO &pcfg_pull_default>; + }; + }; + + sdio { + wifi_pwr: wifi-pwr { + rockchip,pins = <RK_GPIO3 24 RK_FUNC_GPIO &pcfg_pull_none>; + }; + }; +}; + +&uart2 { + status = "okay"; +}; + +&usb_host { + status = "okay"; +}; + +&usb_otg { + status = "okay"; +}; + +&usbphy { + status = "okay"; +}; + +&wdt { + status = "okay"; +}; +
Signature · 2 lines
Best Regards Shawn Lin
PATCH v2 2/2 ARM: dts: rockchip: Add rk3066 MK808 board
Hi Shawn,
Quoted 7 lines
arch/arm/boot/dts/rk3066a-mk808.dts line 123
Quoted 5 lines
+&mmc0 {
arch/arm/boot/dts/rk3066a-mk808.dts new file +4
-0+ bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + mmc-pwrseq = <&mmc_pwrseq>;Removed this could make SD works?
Yes but disabling bus-width causes sd performance decrease(defaults to 1?) so i'll leave this one.
Other sugestions will be included in v3.
Thanks
Pawe?.
PATCH v2 2/2 ARM: dts: rockchip: Add rk3066 MK808 board
? 2016/10/7 16:40, Pawe? Jarosz ??:
Quoted 9 lines
Hi Shawn,
Quoted 6 lines
Quoted 5 lines
+&mmc0 {
arch/arm/boot/dts/rk3066a-mk808.dts new file +4
-0+ bus-width = <4>; + cap-mmc-highspeed; + cap-sd-highspeed; + mmc-pwrseq = <&mmc_pwrseq>;
Quoted 4 lines
Quoted 1 line
Removed this could make SD works?
Yes but disabling bus-width causes sd performance decrease(defaults to 1?) so i'll leave this one.
I just pointed to the mmc-pwrseq, not for others properties :)
Quoted 15 lines
Other sugestions will be included in v3.
Thanks
Pawe?.
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Signature · 2 lines
Best Regards Shawn Lin
Heiko Stuebner
maintainerPATCH v2 2/2 ARM: dts: rockchip: Add rk3066 MK808 board
In reply to Shawn LinAm Freitag, 7. Oktober 2016, 10:29:48 CEST schrieb Shawn Lin:
Quoted 138 lines
Hi Pawe? ,
Quoted 119 lines · Pawe? Jarosz
MK808 is a tv stick which has rockchip rk3066 CPU inside, two usb ports
- host and otg, micro sd card slot and onboard wifi RK901.Signed-off-by Pawe? Jarosz <[email protected]>---
Changes in v2:
- included Heiko sugestion.Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3066a-mk808.dts | 184 +++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 arch/arm/boot/dts/rk3066a-mk808.dts(quoted diff) +0
-0
b/Documentation/devicetree/bindings/arm/rockchip.txtindex 55f388f..c09595b 100644Documentation/devicetree/bindings/arm/rockchip.txt +4
-0@@ -17,6 +17,10 @@ Rockchip platforms device tree bindings Required root node properties: - compatible = "chipspark,rayeager-px2", "rockchip,rk3066a"; +- Rikomagic MK808 v1 board: + Required root node properties: + - compatible = "rikomagic,mk808", "rockchip,rk3066a"; + - Radxa Rock board:Required root node properties:
- compatible = "radxa,rock", "rockchip,rk3188";arch/arm/boot/dts/Makefile +1
-0@@ -639,6 +639,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-kylin.dtb \ rk3066a-bqcurie2.dtb \ rk3066a-marsboard.dtb \ + rk3066a-mk808.dtb \arch/arm/boot/dts/Makefile +0
-0rk3066a-rayeager.dtb \ rk3188-radxarock.dtb \ rk3228-evb.dtb \(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3066a-mk808.dtsnew file mode 100644 index 0000000..2878562arch/arm/boot/dts/rk3066a-mk808.dts new file +63
-0@@ -0,0 +1,184 @@ +/* + * Copyright (c) 2016 Pawe? Jarosz <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; +#include "rk3066a.dtsi" + +/ { + model = "Rikomagic MK808"; + compatible = "rikomagic,mk808", "rockchip,rk3066a"; + + chosen { + stdout-path = "serial2:115200n8"; + }; + + memory at 60000000 { + device_type = "memory"; + reg = <0x60000000 0x40000000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + blue { + label = "mk808:blue:power";arch/arm/boot/dts/rk3066a-mk808.dts line 73
Quoted 10 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +10
-0+ gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "default-on"; + }; + }; + + mmc_pwrseq: mmc-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_pwr>;sd slot does not contain a reset pin. So the power pin should be enough. just add
sdmmc_pwrto mmc0's pinctrl-0 and let mmc driver control it should be enough. Typically pwrseq is for emmc and sdio. We don't need a pwerseq to control power for sd slot..
Quoted 4 lines
But it seems
sdmmc_pwris a GPIO, but not functional port. So I am interesting that why MK808 board doesn't use the mmc controller's default power pin but chosing another gpio, so finally we have to add thses code for your DT.
Actually, we always model the sd-mmc pwr-pin as gpio-based regulator (see sdmmc-regulator for example in the rk3066a-rayeager.dts), and specifiy this regulator as vmmc. That way the mmc core really can control the power.
Heiko
PATCH v2 2/2 ARM: dts: rockchip: Add rk3066 MK808 board
? 2016/10/7 18:01, Heiko Stuebner ??:
Quoted 139 lines
Am Freitag, 7. Oktober 2016, 10:29:48 CEST schrieb Shawn Lin:
Quoted 138 lines
Hi Pawe? ,
Quoted 119 lines · Pawe? Jarosz
MK808 is a tv stick which has rockchip rk3066 CPU inside, two usb ports
- host and otg, micro sd card slot and onboard wifi RK901.Signed-off-by Pawe? Jarosz <[email protected]>---
Changes in v2:
- included Heiko sugestion.Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3066a-mk808.dts | 184 +++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 arch/arm/boot/dts/rk3066a-mk808.dts(quoted diff) +0
-0
b/Documentation/devicetree/bindings/arm/rockchip.txtindex 55f388f..c09595b 100644Documentation/devicetree/bindings/arm/rockchip.txt +4
-0@@ -17,6 +17,10 @@ Rockchip platforms device tree bindings Required root node properties: - compatible = "chipspark,rayeager-px2", "rockchip,rk3066a"; +- Rikomagic MK808 v1 board: + Required root node properties: + - compatible = "rikomagic,mk808", "rockchip,rk3066a"; + - Radxa Rock board:Required root node properties:
- compatible = "radxa,rock", "rockchip,rk3188";arch/arm/boot/dts/Makefile +1
-0@@ -639,6 +639,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-kylin.dtb \ rk3066a-bqcurie2.dtb \ rk3066a-marsboard.dtb \ + rk3066a-mk808.dtb \arch/arm/boot/dts/Makefile +0
-0rk3066a-rayeager.dtb \ rk3188-radxarock.dtb \ rk3228-evb.dtb \(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3066a-mk808.dtsnew file mode 100644 index 0000000..2878562arch/arm/boot/dts/rk3066a-mk808.dts new file +63
-0@@ -0,0 +1,184 @@ +/* + * Copyright (c) 2016 Pawe? Jarosz <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +/dts-v1/; +#include "rk3066a.dtsi" + +/ { + model = "Rikomagic MK808"; + compatible = "rikomagic,mk808", "rockchip,rk3066a"; + + chosen { + stdout-path = "serial2:115200n8"; + }; + + memory at 60000000 { + device_type = "memory"; + reg = <0x60000000 0x40000000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + blue { + label = "mk808:blue:power";arch/arm/boot/dts/rk3066a-mk808.dts line 73
Quoted 10 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +10
-0+ gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "default-on"; + }; + }; + + mmc_pwrseq: mmc-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_pwr>;sd slot does not contain a reset pin. So the power pin should be enough. just add
sdmmc_pwrto mmc0's pinctrl-0 and let mmc driver control it should be enough. Typically pwrseq is for emmc and sdio. We don't need a pwerseq to control power for sd slot..
Quoted 8 lines
Quoted 4 lines
But it seems
sdmmc_pwris a GPIO, but not functional port. So I am interesting that why MK808 board doesn't use the mmc controller's default power pin but chosing another gpio, so finally we have to add thses code for your DT.Actually, we always model the sd-mmc pwr-pin as gpio-based regulator (see sdmmc-regulator for example in the
rk3066a-rayeager.dts), and specifiy this regulator as vmmc. That way the mmc core really can control the power.
yes it did. There are two ways for us to control vmmc properly. If we use gpio-based regulator or PMIC, mmc core take over it to control the power correctly. But if we use the dafault functional port, namely SDMMC_PWREN, the dw_mmc driver could handle the control when doing set_ios.. Both of these two could work fine. But I always chose the latter one to simplify the dts.
Anyway, I won't insist on it if it looks okay to you. :)
Quoted 9 lines
Heiko
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
Signature · 2 lines
Best Regards Shawn Lin
Heiko Stübner
maintainerPATCH v2 2/2 ARM: dts: rockchip: Add rk3066 MK808 board
Am Samstag, 8. Oktober 2016, 11:01:08 schrieb Shawn Lin:
Quoted 151 lines
? 2016/10/7 18:01, Heiko Stuebner ??:
Quoted 145 lines
Am Freitag, 7. Oktober 2016, 10:29:48 CEST schrieb Shawn Lin:
Quoted 139 lines
Hi Pawe? ,
Quoted 120 lines · Pawe? Jarosz
MK808 is a tv stick which has rockchip rk3066 CPU inside, two usb ports
- host and otg, micro sd card slot and onboard wifi RK901.Signed-off-by Pawe? Jarosz <[email protected]>---
Changes in v2:
- included Heiko sugestion.Documentation/devicetree/bindings/arm/rockchip.txt | 4 + arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/rk3066a-mk808.dts | 184 +++++++++++++++++++++ 3 files changed, 189 insertions(+) create mode 100644 arch/arm/boot/dts/rk3066a-mk808.dts(quoted diff) +0
-0
b/Documentation/devicetree/bindings/arm/rockchip.txtindex 55f388f..c09595b 100644Documentation/devicetree/bindings/arm/rockchip.txt +4
-0@@ -17,6 +17,10 @@ Rockchip platforms device tree bindings Required root node properties: - compatible = "chipspark,rayeager-px2", "rockchip,rk3066a"; +- Rikomagic MK808 v1 board: + Required root node properties: + - compatible = "rikomagic,mk808", "rockchip,rk3066a"; + - Radxa Rock board:Required root node properties:
- compatible = "radxa,rock", "rockchip,rk3188";arch/arm/boot/dts/Makefile +1
-0@@ -639,6 +639,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-kylin.dtb \ rk3066a-bqcurie2.dtb \ rk3066a-marsboard.dtb \ + rk3066a-mk808.dtb \arch/arm/boot/dts/Makefile +0
-0rk3066a-rayeager.dtb \ rk3188-radxarock.dtb \ rk3228-evb.dtb \(quoted diff) +0
-0
b/arch/arm/boot/dts/rk3066a-mk808.dtsnew file mode 100644 index 0000000..2878562arch/arm/boot/dts/rk3066a-mk808.dts new file +11
-0@@ -0,0 +1,184 @@ +/* + * Copyright (c) 2016 Pawe? Jarosz <[email protected]> + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 ofthe
+ * License, or (at your option) any later version.
+ *+ * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details.+ *
+ * Or, alternatively,
+ *
+ * b) Permission is hereby granted, free of charge, to any person+ * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions:+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE.+ */
arch/arm/boot/dts/rk3066a-mk808.dts new file +22
-0+ +/dts-v1/; +#include "rk3066a.dtsi" + +/ { + model = "Rikomagic MK808"; + compatible = "rikomagic,mk808", "rockchip,rk3066a"; + + chosen { + stdout-path = "serial2:115200n8"; + }; + + memory at 60000000 { + device_type = "memory"; + reg = <0x60000000 0x40000000>; + }; + + gpio-leds { + compatible = "gpio-leds"; + + blue { + label = "mk808:blue:power";arch/arm/boot/dts/rk3066a-mk808.dts line 73
Quoted 10 lines
arch/arm/boot/dts/rk3066a-mk808.dts new file +10
-0+ gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; + default-state = "off"; + linux,default-trigger = "default-on"; + }; + }; + + mmc_pwrseq: mmc-pwrseq { + compatible = "mmc-pwrseq-simple"; + pinctrl-names = "default"; + pinctrl-0 = <&sdmmc_pwr>;sd slot does not contain a reset pin. So the power pin should be enough. just add
sdmmc_pwrto mmc0's pinctrl-0 and let mmc driver control it should be enough. Typically pwrseq is for emmc and sdio. We don't need a pwerseq to control power for sd slot..Quoted 4 lines
But it seems
sdmmc_pwris a GPIO, but not functional port. So I am interesting that why MK808 board doesn't use the mmc controller's default power pin but chosing another gpio, so finally we have to add thses code for your DT.Quoted 4 lines
Actually, we always model the sd-mmc pwr-pin as gpio-based regulator (see sdmmc-regulator for example in the
rk3066a-rayeager.dts), and specifiy this
regulator as vmmc. That way the mmc core really can control the power.
Quoted 8 lines
yes it did. There are two ways for us to control vmmc properly. If we use gpio-based regulator or PMIC, mmc core take over it to control the power correctly. But if we use the dafault functional port, namely
SDMMC_PWREN, thedw_mmcdriver could handle the control when doingset_ios.. Both of these two could work fine. But I always chose the latter one to simplify the dts.Anyway, I won't insist on it if it looks okay to you. :)
yes, I'd really prefer the mmc subsystem explicitly controlling the cards power via a regulator :-) .
Heiko