Hello,
This series adds further support for A83T, mainly adds clock support.
Also adds R_PIO, PRCM related clocks, mmc, rsb support.
A83T difference in short:
R_PIO is slightly different from A23 r_pio. AHB1 has different parents as
compared to a31-ahb1, APB1 has different dividers.Bus gates are similar to H3,
apb0 gates are different.mmc and rsb are compatible with earlier sunxi socs.
Patch 1: adds support for r_pio pin controller.
patch 2: adds PRCM apb0 clock gates, it controls prcm related clocks.
patch 3: adds bus gates which are similar to h3, it's not clearly known which
clocks belongs to which parent.
patch 4: adds ahb1 clock support, 0b1x is pll6 parent otherwise it's same as a31
ahb1.
patch 5: adds apb1 clock support, apb1 has different dividers compared to a10
apb0 clock.
patch 6: this patch is form wens, a83t has 16M internal oscillator, to get
aproximately 32k clock, it's divided by 512.
patch 7: adds basics clocks nodes to dtsi, pll6, ahb1, ahb2, apb1, apb2,
bus gates, and resets.
patch 8-9: adds mmc and it's clock nodes.
patch 10: adds A83T PRCM related clocks, clock resets.
patch 11: adds r_pio pin controller nodes to dtsi
patch 12: adds RSB nodes to dtsi
patch 13: enables mmc0 support for h8homlet board, tested by LABBE Corentin.
patch 14: This patch adds support for Sinovoip BPI-M3 A83T based board, it has
2GB LPDDR3, u-boot support is added recently for this board.
Regards,
Vishnu
Chen-Yu Tsai (1):
ARM: dts: sun8i-a83t: Correct low speed oscillator clocks
Vishnu Patekar (13):
pinctrl: sunxi: Add A83T R_PIO controller support
clk: sunxi: Add apb0 gates for A83T
clk: sunxi: add bus gates for A83T
clk: sunxi: add ahb1 clock for A83T
clk: sunxi: Add APB1 clock for A83T
ARM: dts: sun8i-a83t: Add basic clocks and resets
ARM: dts: sun8i-a83t: add mmc clock nodes
ARM: dts: sun8i-a83t: Add mmc controller nodes
ARM: dts: sun8i-a83t: Add PRCM related clocks and resets
ARM: dts: sun8i-a83t: Add R_PIO controller node to the dtsi
ARM: dts: sun8i-a83t: Add RSB nodes to dtsi
ARM: dts: sun8i: enable mmc for H8Homlet Board.
ARM: dts: sun8i: Add A83T based Sinovoip Bpi-M3 Board
Documentation/devicetree/bindings/clock/sunxi.txt | 4 +
.../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 +
arch/arm/boot/dts/Makefile | 1 +
.../boot/dts/sun8i-a83t-allwinner-h8homlet-v2.dts | 20 ++
...omlet-v2.dts => sun8i-a83t-sinovoip-bpi-m3.dts} | 28 +-
arch/arm/boot/dts/sun8i-a83t.dtsi | 314 ++++++++++++++++++++-
drivers/clk/sunxi/clk-simple-gates.c | 2 +
drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 +
drivers/clk/sunxi/clk-sunxi.c | 92 ++++++
drivers/pinctrl/sunxi/Kconfig | 5 +
drivers/pinctrl/sunxi/Makefile | 1 +
drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c | 119 ++++++++
12 files changed, 582 insertions(+), 7 deletions(-)
copy arch/arm/boot/dts/{sun8i-a83t-allwinner-h8homlet-v2.dts => sun8i-a83t-sinovoip-bpi-m3.dts} (79%)
create mode 100644 drivers/pinctrl/sunxi/pinctrl-sun8i-a83t-r.c
--
1.9.1
@@ -20,6 +20,7 @@ Required properties: "allwinner,sun9i-a80-pinctrl" "allwinner,sun9i-a80-r-pinctrl" "allwinner,sun8i-a83t-pinctrl"+ "allwinner,sun8i-a83t-r-pinctrl" "allwinner,sun8i-h3-pinctrl" - reg: Should contain the register physical address and length for the
A83T has similar bus gates that of H3, including single gating register has
different clock parent.
As per H3 and A83T datasheet, usbhost is under AHB2.
However,below shows allwinner source code assignment:
bits: 26 (ehci0), 27 (ehci1), 29 (ohci0) => AHB1 for A83T.
bits: 26 (ehci0), 27 (ehci1) => AHB1 for H3
bits 29, 30, 31(ohci0,1,2) => AHB2 for H3.
until, this confusion is cleared keep it H3 way.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 ++
2 files changed, 3 insertions(+)
@@ -59,6 +59,7 @@ Required properties: "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31 "allwinner,sun8i-a23-apb2-gates-clk" - for the APB2 gates on A23 "allwinner,sun8i-h3-bus-gates-clk" - for the bus gates on H3+ "allwinner,sun8i-a83t-bus-gates-clk" - for the bus gates on A83T "allwinner,sun9i-a80-apbs-gates-clk" - for the APBS gates on A80 "allwinner,sun4i-a10-dram-gates-clk" - for the DRAM gates on A10 "allwinner,sun5i-a13-mbus-clk" - for the MBUS clock on A13
AHB1 on A83T is similar to ahb1 on A31, except parents are different.
clock index 0b1x is PLL6.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-sunxi.c | 75 +++++++++++++++++++++++
2 files changed, 76 insertions(+)
@@ -29,6 +29,7 @@ Required properties: "allwinner,sun6i-a31-ar100-clk" - for the AR100 on A31 "allwinner,sun9i-a80-cpus-clk" - for the CPUS on A80 "allwinner,sun6i-a31-ahb1-clk" - for the AHB1 clock on A31+ "allwinner,sun8i-a83t-ahb1-clk" - for the AHB1 clock on A83T "allwinner,sun8i-h3-ahb2-clk" - for the AHB2 clock on H3 "allwinner,sun6i-a31-ahb1-gates-clk" - for the AHB1 gates on A31 "allwinner,sun8i-a23-ahb1-gates-clk" - for the AHB1 gates on A23
APB1 is similar to sun4i-a10-apb0-clk, except different dividers.
This adds support for apb1 on A83T.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-sunxi.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
@@ -49,6 +49,7 @@ Required properties: "allwinner,sun8i-a23-apb0-gates-clk" - for the APB0 gates on A23 "allwinner,sun9i-a80-apb0-gates-clk" - for the APB0 gates on A80 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock+ "allwinner,sun8i-a83t-apb1-clk" - for the APB1 clock on A83T "allwinner,sun9i-a80-apb1-clk" - for the APB1 bus clock on A80 "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10 "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13
From: Chen-Yu Tsai <redacted>
The A83T does not have a 32.768 kHz low speed oscillator, either as
an external crystal or input. It has a 16 MHz RC-based (inaccurate)
internal oscillator, which is then divided by 512 for a clock close
to 32 kHz.
Signed-off-by: Chen-Yu Tsai <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
This adds A83T system bus clocks, bus gates, and clock resets.
For ahb1 and ahb2, it's not clear which reset belongs to ahb1
or ahb2; so named as ahb_reset0, ahb_reset1, ahb_reset2.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 127 +++++++++++++++++++++++++++++++++++++-
1 file changed, 125 insertions(+), 2 deletions(-)
mmc clocks are compatible with that of earlier sun8i socs.
This adds mmc0, mmc1, and mmc2 clock nodes for A83T.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
This adds A83T PRCM related clocks, clock resets.
As a83t apb0 gates clock support is added earlier, this enables it.
Apart from apb0 gates, other added clocks are compatible with
earlier sun8i socs.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 44 +++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
This patch adds support for Sinovoip BPI-M3 A83T based board.
It has 2G LPDDR3, UART, ethernet, USB, HDMI, USB Sata, MIPI DSI,
mic, AP6212 Wifi, etc on it.
It is paired with AXP813 PMIC which is almost same as AXP818.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/sun8i-a83t-sinovoip-bpi-m3.dts | 88 ++++++++++++++++++++++++
2 files changed, 89 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-a83t-sinovoip-bpi-m3.dts
Now that we have a driver for the R_PIO controller,
add the corresponding device node to the dtsi.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
APB0 is part of PRCM, and is compatible with earlier SOCs.
apb0 gates controls R_PIO, R_UART, R_RSB, etc clocks.
This patch adds support for APB0 gates for A83T.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-simple-gates.c | 2 ++
2 files changed, 3 insertions(+)
@@ -39,6 +39,7 @@ Required properties: "allwinner,sun6i-a31-apb0-clk" - for the APB0 clock on A31 "allwinner,sun8i-a23-apb0-clk" - for the APB0 clock on A23 "allwinner,sun9i-a80-apb0-clk" - for the APB0 bus clock on A80+ "allwinner,sun8i-a83t-apb0-gates-clk" - for the APB0 gates on A83T "allwinner,sun4i-a10-apb0-gates-clk" - for the APB0 gates on A10 "allwinner,sun5i-a13-apb0-gates-clk" - for the APB0 gates on A13 "allwinner,sun5i-a10s-apb0-gates-clk" - for the APB0 gates on A10s
@@ -20,6 +20,7 @@ Required properties: "allwinner,sun9i-a80-pinctrl" "allwinner,sun9i-a80-r-pinctrl" "allwinner,sun8i-a83t-pinctrl"+ "allwinner,sun8i-a83t-r-pinctrl" "allwinner,sun8i-h3-pinctrl" - reg: Should contain the register physical address and length for the
On Sun, Jan 31, 2016 at 9:20 AM, Vishnu Patekar
[off-list ref] wrote:
quoted hunk
APB1 is similar to sun4i-a10-apb0-clk, except different dividers.
This adds support for apb1 on A83T.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-sunxi.c | 17 +++++++++++++++++
2 files changed, 18 insertions(+)
@@ -49,6 +49,7 @@ Required properties: "allwinner,sun8i-a23-apb0-gates-clk" - for the APB0 gates on A23 "allwinner,sun9i-a80-apb0-gates-clk" - for the APB0 gates on A80 "allwinner,sun4i-a10-apb1-clk" - for the APB1 clock+ "allwinner,sun8i-a83t-apb1-clk" - for the APB1 clock on A83T "allwinner,sun9i-a80-apb1-clk" - for the APB1 bus clock on A80 "allwinner,sun4i-a10-apb1-gates-clk" - for the APB1 gates on A10 "allwinner,sun5i-a13-apb1-gates-clk" - for the APB1 gates on A13
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted hunk
Now that we have a driver for the R_PIO controller,
add the corresponding device node to the dtsi.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
As mentioned in the previous patch, r_rsb_pins should be included in this patch,
since it is used here. In general, we mostly have them as individual patches, as
they are referenced from board dts files. Here since it's used in the dtsi, you
can just include them.
See commit ed473ebd9c15 ("ARM: dts: sun9i: Add Reduced Serial Bus controller
device node to A80 dtsi") on how I described it.
ChenYu
On Sun, Jan 31, 2016 at 9:20 AM, Vishnu Patekar
[off-list ref] wrote:
quoted hunk
This adds A83T system bus clocks, bus gates, and clock resets.
For ahb1 and ahb2, it's not clear which reset belongs to ahb1
or ahb2; so named as ahb_reset0, ahb_reset1, ahb_reset2.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 127 +++++++++++++++++++++++++++++++++++++-
1 file changed, 125 insertions(+), 2 deletions(-)
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
mmc clocks are compatible with that of earlier sun8i socs.
This adds mmc0, mmc1, and mmc2 clock nodes for A83T.
Signed-off-by: Vishnu Patekar <redacted>
From: Rob Herring <robh@kernel.org> Date: 2016-02-01 14:49:30
On Sun, Jan 31, 2016 at 09:20:56AM +0800, Vishnu Patekar wrote:
AHB1 on A83T is similar to ahb1 on A31, except parents are different.
clock index 0b1x is PLL6.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
From: Rob Herring <robh@kernel.org> Date: 2016-02-01 14:50:13
On Sun, Jan 31, 2016 at 09:20:57AM +0800, Vishnu Patekar wrote:
APB1 is similar to sun4i-a10-apb0-clk, except different dividers.
This adds support for apb1 on A83T.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
On Mon, Feb 1, 2016 at 10:49 PM, Rob Herring [off-list ref] wrote:
On Sun, Jan 31, 2016 at 09:20:56AM +0800, Vishnu Patekar wrote:
quoted
AHB1 on A83T is similar to ahb1 on A31, except parents are different.
clock index 0b1x is PLL6.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
From: Rob Herring <robh@kernel.org> Date: 2016-02-01 15:01:07
On Sun, Jan 31, 2016 at 09:20:53AM +0800, Vishnu Patekar wrote:
The A83T has R_PIO pin controller, it's same as A23, execpt A83T
interrupt bit is 6th and A83T has one extra pin PL12.
Signed-off-by: Vishnu Patekar <redacted>
---
.../bindings/pinctrl/allwinner,sunxi-pinctrl.txt | 1 +
From: Rob Herring <robh@kernel.org> Date: 2016-02-01 15:02:26
On Sun, Jan 31, 2016 at 09:20:54AM +0800, Vishnu Patekar wrote:
APB0 is part of PRCM, and is compatible with earlier SOCs.
apb0 gates controls R_PIO, R_UART, R_RSB, etc clocks.
This patch adds support for APB0 gates for A83T.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-simple-gates.c | 2 ++
2 files changed, 3 insertions(+)
From: Rob Herring <robh@kernel.org> Date: 2016-02-01 15:03:52
On Sun, Jan 31, 2016 at 09:20:55AM +0800, Vishnu Patekar wrote:
A83T has similar bus gates that of H3, including single gating register has
different clock parent.
As per H3 and A83T datasheet, usbhost is under AHB2.
However,below shows allwinner source code assignment:
bits: 26 (ehci0), 27 (ehci1), 29 (ohci0) => AHB1 for A83T.
bits: 26 (ehci0), 27 (ehci1) => AHB1 for H3
bits 29, 30, 31(ohci0,1,2) => AHB2 for H3.
until, this confusion is cleared keep it H3 way.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 ++
2 files changed, 3 insertions(+)
On Mon, Feb 1, 2016 at 11:02 PM, Rob Herring [off-list ref] wrote:
On Sun, Jan 31, 2016 at 09:20:54AM +0800, Vishnu Patekar wrote:
quoted
APB0 is part of PRCM, and is compatible with earlier SOCs.
apb0 gates controls R_PIO, R_UART, R_RSB, etc clocks.
This patch adds support for APB0 gates for A83T.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-simple-gates.c | 2 ++
2 files changed, 3 insertions(+)
On Mon, Feb 1, 2016 at 11:03 PM, Rob Herring [off-list ref] wrote:
On Sun, Jan 31, 2016 at 09:20:55AM +0800, Vishnu Patekar wrote:
quoted
A83T has similar bus gates that of H3, including single gating register has
different clock parent.
As per H3 and A83T datasheet, usbhost is under AHB2.
However,below shows allwinner source code assignment:
bits: 26 (ehci0), 27 (ehci1), 29 (ohci0) => AHB1 for A83T.
bits: 26 (ehci0), 27 (ehci1) => AHB1 for H3
bits 29, 30, 31(ohci0,1,2) => AHB2 for H3.
until, this confusion is cleared keep it H3 way.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 ++
2 files changed, 3 insertions(+)
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Chen-Yu Tsai <redacted>
We should really get the clk parents sorted out though.
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted hunk
This adds A83T PRCM related clocks, clock resets.
As a83t apb0 gates clock support is added earlier, this enables it.
Apart from apb0 gates, other added clocks are compatible with
earlier sun8i socs.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 44 +++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
This is actually wrong, as it is wrong in sun9i-a80.dtsi.
I've sent a patch series for it.
Also the drivers for "allwinner,sun9i-a80-cpus-clk" and
"allwinner,sun9i-a80-apbs-clk"
are only compiled for CONFIG_MACH_SUN9I. Please add a patch to address this.
Regards
ChenYu
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted hunk
This patch adds support for Sinovoip BPI-M3 A83T based board.
It has 2G LPDDR3, UART, ethernet, USB, HDMI, USB Sata, MIPI DSI,
mic, AP6212 Wifi, etc on it.
It is paired with AXP813 PMIC which is almost same as AXP818.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/sun8i-a83t-sinovoip-bpi-m3.dts | 88 ++++++++++++++++++++++++
2 files changed, 89 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-a83t-sinovoip-bpi-m3.dts
+ * Vishnu Patekar <vishnupatekar0510@gmail.com>+ *+ * 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 "sun8i-a83t.dtsi"+#include "sunxi-common-regulators.dtsi"++/ {+ model = "Sinovoip BananaPi M3 v1.2";+ compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t";++ aliases {+ serial0 = &uart0;+ };++ chosen {+ stdout-path = "serial0:115200n8";+ };+};++&pio {+ mmc0_cd_pin_bpi_m3: mmc0_cd_pin at 0 {+ allwinner,pins = "PF6";+ allwinner,function = "gpio_in";+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;+ };
Maybe we should just put this in the .dtsi and call it
"mmc0_cd_pin_reference_design"?
We have something similar for sun4i-a10.
From: Maxime Ripard <hidden> Date: 2016-02-02 13:12:31
On Sun, Jan 31, 2016 at 09:20:54AM +0800, Vishnu Patekar wrote:
APB0 is part of PRCM, and is compatible with earlier SOCs.
apb0 gates controls R_PIO, R_UART, R_RSB, etc clocks.
This patch adds support for APB0 gates for A83T.
Signed-off-by: Vishnu Patekar <redacted>
From: Maxime Ripard <hidden> Date: 2016-02-02 13:13:51
On Sun, Jan 31, 2016 at 09:20:55AM +0800, Vishnu Patekar wrote:
quoted hunk
A83T has similar bus gates that of H3, including single gating register has
different clock parent.
As per H3 and A83T datasheet, usbhost is under AHB2.
However,below shows allwinner source code assignment:
bits: 26 (ehci0), 27 (ehci1), 29 (ohci0) => AHB1 for A83T.
bits: 26 (ehci0), 27 (ehci1) => AHB1 for H3
bits 29, 30, 31(ohci0,1,2) => AHB2 for H3.
until, this confusion is cleared keep it H3 way.
Signed-off-by: Vishnu Patekar <redacted>
---
Documentation/devicetree/bindings/clock/sunxi.txt | 1 +
drivers/clk/sunxi/clk-sun8i-bus-gates.c | 2 ++
2 files changed, 3 insertions(+)
@@ -59,6 +59,7 @@ Required properties: "allwinner,sun6i-a31-apb2-gates-clk" - for the APB2 gates on A31 "allwinner,sun8i-a23-apb2-gates-clk" - for the APB2 gates on A23 "allwinner,sun8i-h3-bus-gates-clk" - for the bus gates on H3+ "allwinner,sun8i-a83t-bus-gates-clk" - for the bus gates on A83T
From: Maxime Ripard <hidden> Date: 2016-02-02 13:17:29
Hi,
On Sun, Jan 31, 2016 at 09:20:56AM +0800, Vishnu Patekar wrote:
AHB1 on A83T is similar to ahb1 on A31, except parents are different.
clock index 0b1x is PLL6.
Signed-off-by: Vishnu Patekar <redacted>
If the clock is the same but the parents are different, then we don't
need to duplicate all the logic. Simply add the number of parents to
mux_data, and you're all set.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160202/170676f2/attachment.sig>
From: Maxime Ripard <hidden> Date: 2016-02-02 13:18:56
1;4002;0c
On Sun, Jan 31, 2016 at 09:20:58AM +0800, Vishnu Patekar wrote:
quoted hunk
From: Chen-Yu Tsai <redacted>
The A83T does not have a 32.768 kHz low speed oscillator, either as
an external crystal or input. It has a 16 MHz RC-based (inaccurate)
internal oscillator, which is then divided by 512 for a clock close
to 32 kHz.
Signed-off-by: Chen-Yu Tsai <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
We've been using a dash to separate between the clock and its divider
on other SoCs.
I changed that and applied the patch.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160202/63535d6e/attachment.sig>
From: Maxime Ripard <hidden> Date: 2016-02-02 13:19:51
On Sun, Jan 31, 2016 at 09:20:58AM +0800, Vishnu Patekar wrote:
From: Chen-Yu Tsai <redacted>
The A83T does not have a 32.768 kHz low speed oscillator, either as
an external crystal or input. It has a 16 MHz RC-based (inaccurate)
internal oscillator, which is then divided by 512 for a clock close
to 32 kHz.
Signed-off-by: Chen-Yu Tsai <redacted>
Hello Wens,
On Tue, Feb 2, 2016 at 3:37 PM, Chen-Yu Tsai [off-list ref] wrote:
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
This patch adds support for Sinovoip BPI-M3 A83T based board.
It has 2G LPDDR3, UART, ethernet, USB, HDMI, USB Sata, MIPI DSI,
mic, AP6212 Wifi, etc on it.
It is paired with AXP813 PMIC which is almost same as AXP818.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/sun8i-a83t-sinovoip-bpi-m3.dts | 88 ++++++++++++++++++++++++
2 files changed, 89 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-a83t-sinovoip-bpi-m3.dts
+ * Vishnu Patekar <vishnupatekar0510@gmail.com>+ *+ * 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 "sun8i-a83t.dtsi"+#include "sunxi-common-regulators.dtsi"++/ {+ model = "Sinovoip BananaPi M3 v1.2";+ compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t";++ aliases {+ serial0 = &uart0;+ };++ chosen {+ stdout-path = "serial0:115200n8";+ };+};++&pio {+ mmc0_cd_pin_bpi_m3: mmc0_cd_pin at 0 {+ allwinner,pins = "PF6";+ allwinner,function = "gpio_in";+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;+ allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;+ };
Maybe we should just put this in the .dtsi and call it
"mmc0_cd_pin_reference_design"?
We have something similar for sun4i-a10.
Hello Maxime,
On Tue, Feb 2, 2016 at 9:17 PM, Maxime Ripard
[off-list ref] wrote:
Hi,
On Sun, Jan 31, 2016 at 09:20:56AM +0800, Vishnu Patekar wrote:
quoted
AHB1 on A83T is similar to ahb1 on A31, except parents are different.
clock index 0b1x is PLL6.
Signed-off-by: Vishnu Patekar <redacted>
If the clock is the same but the parents are different, then we don't
need to duplicate all the logic. Simply add the number of parents to
mux_data, and you're all set.
Problem here is: parent 0b10 for A31 ahb1 is AXI, 0b11 is pll6/pre_div.
0b10 and 0b11 is pll6/pre_div.
So, just adding number of parents to mux_data will not solve problem.
Regards,
Vishnu
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
From: Maxime Ripard <hidden> Date: 2016-02-04 08:01:21
On Thu, Feb 04, 2016 at 02:06:45PM +0800, Vishnu Patekar wrote:
Hello Maxime,
On Tue, Feb 2, 2016 at 9:17 PM, Maxime Ripard
[off-list ref] wrote:
quoted
Hi,
On Sun, Jan 31, 2016 at 09:20:56AM +0800, Vishnu Patekar wrote:
quoted
AHB1 on A83T is similar to ahb1 on A31, except parents are different.
clock index 0b1x is PLL6.
Signed-off-by: Vishnu Patekar <redacted>
If the clock is the same but the parents are different, then we don't
need to duplicate all the logic. Simply add the number of parents to
mux_data, and you're all set.
Problem here is: parent 0b10 for A31 ahb1 is AXI, 0b11 is pll6/pre_div.
0b10 and 0b11 is pll6/pre_div.
So, just adding number of parents to mux_data will not solve problem.
Hello Maxime,
On Tue, Feb 2, 2016 at 9:19 PM, Maxime Ripard
[off-list ref] wrote:
On Sun, Jan 31, 2016 at 09:20:58AM +0800, Vishnu Patekar wrote:
quoted
From: Chen-Yu Tsai <redacted>
The A83T does not have a 32.768 kHz low speed oscillator, either as
an external crystal or input. It has a 16 MHz RC-based (inaccurate)
internal oscillator, which is then divided by 512 for a clock close
to 32 kHz.
Signed-off-by: Chen-Yu Tsai <redacted>
You should have your SoB here.
Is it ok to add it?
Yes, please add.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
From: Maxime Ripard <hidden> Date: 2016-02-04 12:16:18
On Thu, Feb 04, 2016 at 04:51:06PM +0800, Vishnu Patekar wrote:
Hello Maxime,
On Tue, Feb 2, 2016 at 9:19 PM, Maxime Ripard
[off-list ref] wrote:
quoted
On Sun, Jan 31, 2016 at 09:20:58AM +0800, Vishnu Patekar wrote:
quoted
From: Chen-Yu Tsai <redacted>
The A83T does not have a 32.768 kHz low speed oscillator, either as
an external crystal or input. It has a 16 MHz RC-based (inaccurate)
internal oscillator, which is then divided by 512 for a clock close
to 32 kHz.
Signed-off-by: Chen-Yu Tsai <redacted>
You should have your SoB here.
Is it ok to add it?
On Sun, Jan 31, 2016 at 2:20 AM, Vishnu Patekar
[off-list ref] wrote:
The A83T has R_PIO pin controller, it's same as A23, execpt A83T
interrupt bit is 6th and A83T has one extra pin PL12.
Signed-off-by: Vishnu Patekar <redacted>
Maxime, can you look at this patch?
Yours,
Linus Walleij
From: Maxime Ripard <hidden> Date: 2016-02-11 12:36:54
Hi Linus,
On Thu, Feb 11, 2016 at 12:59:47PM +0100, Linus Walleij wrote:
On Sun, Jan 31, 2016 at 2:20 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
The A83T has R_PIO pin controller, it's same as A23, execpt A83T
interrupt bit is 6th and A83T has one extra pin PL12.
Signed-off-by: Vishnu Patekar <redacted>
Maxime, can you look at this patch?
Chen-Yu had one minor comment on it, and he's also the Allwinner
maintainer now, so you can trust his Acked-by just like you would
trust mine ;)
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160211/f0fd5ef1/attachment.sig>
On Thu, Feb 11, 2016 at 1:36 PM, Maxime Ripard
[off-list ref] wrote:
On Thu, Feb 11, 2016 at 12:59:47PM +0100, Linus Walleij wrote:
quoted
On Sun, Jan 31, 2016 at 2:20 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
The A83T has R_PIO pin controller, it's same as A23, execpt A83T
interrupt bit is 6th and A83T has one extra pin PL12.
Signed-off-by: Vishnu Patekar <redacted>
Maxime, can you look at this patch?
Chen-Yu had one minor comment on it,
OK waiting for a new version.
and he's also the Allwinner
maintainer now, so you can trust his Acked-by just like you would
trust mine ;)
Can you guys supply a MAINTAINERS entry for the sunxi
stuff?
Yours,
Linus Walleij
From: Maxime Ripard <hidden> Date: 2016-02-11 15:20:58
Hi Linus,
On Thu, Feb 11, 2016 at 02:47:57PM +0100, Linus Walleij wrote:
On Thu, Feb 11, 2016 at 1:36 PM, Maxime Ripard
[off-list ref] wrote:
quoted
On Thu, Feb 11, 2016 at 12:59:47PM +0100, Linus Walleij wrote:
quoted
On Sun, Jan 31, 2016 at 2:20 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
The A83T has R_PIO pin controller, it's same as A23, execpt A83T
interrupt bit is 6th and A83T has one extra pin PL12.
Signed-off-by: Vishnu Patekar <redacted>
Maxime, can you look at this patch?
Chen-Yu had one minor comment on it,
OK waiting for a new version.
quoted
and he's also the Allwinner
maintainer now, so you can trust his Acked-by just like you would
trust mine ;)
Can you guys supply a MAINTAINERS entry for the sunxi
stuff?
Hello Maxime,
On Thu, Feb 4, 2016 at 4:01 PM, Maxime Ripard
[off-list ref] wrote:
On Thu, Feb 04, 2016 at 02:06:45PM +0800, Vishnu Patekar wrote:
quoted
Hello Maxime,
On Tue, Feb 2, 2016 at 9:17 PM, Maxime Ripard
[off-list ref] wrote:
quoted
Hi,
On Sun, Jan 31, 2016 at 09:20:56AM +0800, Vishnu Patekar wrote:
quoted
AHB1 on A83T is similar to ahb1 on A31, except parents are different.
clock index 0b1x is PLL6.
Signed-off-by: Vishnu Patekar <redacted>
If the clock is the same but the parents are different, then we don't
need to duplicate all the logic. Simply add the number of parents to
mux_data, and you're all set.
Problem here is: parent 0b10 for A31 ahb1 is AXI, 0b11 is pll6/pre_div.
0b10 and 0b11 is pll6/pre_div.
So, just adding number of parents to mux_data will not solve problem.
Is anyone using 0b11 ? Can't we just ignore it?
Yes, it's used, 0b11 is pll6 parent in case of A31.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Hello Wens,
On Tue, Feb 2, 2016 at 2:44 PM, Chen-Yu Tsai [off-list ref] wrote:
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
This adds A83T PRCM related clocks, clock resets.
As a83t apb0 gates clock support is added earlier, this enables it.
Apart from apb0 gates, other added clocks are compatible with
earlier sun8i socs.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 44 +++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
This is actually wrong, as it is wrong in sun9i-a80.dtsi.
I've sent a patch series for it.
A83T apb0 is different from A80, and it's same as A23, so this should
be correct.
Please correct me in case I'm missing something.
Also the drivers for "allwinner,sun9i-a80-cpus-clk" and
"allwinner,sun9i-a80-apbs-clk"
are only compiled for CONFIG_MACH_SUN9I. Please add a patch to address this.
On Sat, Feb 13, 2016 at 12:06 AM, Vishnu Patekar
[off-list ref] wrote:
Hello Wens,
On Tue, Feb 2, 2016 at 2:44 PM, Chen-Yu Tsai [off-list ref] wrote:
quoted
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
This adds A83T PRCM related clocks, clock resets.
As a83t apb0 gates clock support is added earlier, this enables it.
Apart from apb0 gates, other added clocks are compatible with
earlier sun8i socs.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 44 +++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
This is actually wrong, as it is wrong in sun9i-a80.dtsi.
I've sent a patch series for it.
A83T apb0 is different from A80, and it's same as A23, so this should
be correct.
Please correct me in case I'm missing something.
My user manual (v1.5.1) says A83T apb0 dividers (page. 246) are
/1, /2, /3, /4, while the A23 is /1, /2, /4, /8.
ChenYu
quoted
Also the drivers for "allwinner,sun9i-a80-cpus-clk" and
"allwinner,sun9i-a80-apbs-clk"
are only compiled for CONFIG_MACH_SUN9I. Please add a patch to address this.
On Sat, Feb 13, 2016 at 12:43 AM, Chen-Yu Tsai [off-list ref] wrote:
On Sat, Feb 13, 2016 at 12:06 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
Hello Wens,
On Tue, Feb 2, 2016 at 2:44 PM, Chen-Yu Tsai [off-list ref] wrote:
quoted
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
This adds A83T PRCM related clocks, clock resets.
As a83t apb0 gates clock support is added earlier, this enables it.
Apart from apb0 gates, other added clocks are compatible with
earlier sun8i socs.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 44 +++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
This is actually wrong, as it is wrong in sun9i-a80.dtsi.
I've sent a patch series for it.
A83T apb0 is different from A80, and it's same as A23, so this should
be correct.
Please correct me in case I'm missing something.
My user manual (v1.5.1) says A83T apb0 dividers (page. 246) are
/1, /2, /3, /4, while the A23 is /1, /2, /4, /8.
As Vishnu pointed out on IRC, the A23 driver is wrong. They are in fact,
both one-based dividers. I'll send a patch to fix this.
ChenYu
ChenYu
quoted
quoted
Also the drivers for "allwinner,sun9i-a80-cpus-clk" and
"allwinner,sun9i-a80-apbs-clk"
are only compiled for CONFIG_MACH_SUN9I. Please add a patch to address this.
On Mon, Feb 15, 2016 at 5:34 PM, Chen-Yu Tsai [off-list ref] wrote:
On Sat, Feb 13, 2016 at 12:43 AM, Chen-Yu Tsai [off-list ref] wrote:
quoted
On Sat, Feb 13, 2016 at 12:06 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
Hello Wens,
On Tue, Feb 2, 2016 at 2:44 PM, Chen-Yu Tsai [off-list ref] wrote:
quoted
On Sun, Jan 31, 2016 at 9:21 AM, Vishnu Patekar
[off-list ref] wrote:
quoted
This adds A83T PRCM related clocks, clock resets.
As a83t apb0 gates clock support is added earlier, this enables it.
Apart from apb0 gates, other added clocks are compatible with
earlier sun8i socs.
Signed-off-by: Vishnu Patekar <redacted>
---
arch/arm/boot/dts/sun8i-a83t.dtsi | 44 +++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
This is actually wrong, as it is wrong in sun9i-a80.dtsi.
I've sent a patch series for it.
A83T apb0 is different from A80, and it's same as A23, so this should
be correct.
Please correct me in case I'm missing something.
My user manual (v1.5.1) says A83T apb0 dividers (page. 246) are
/1, /2, /3, /4, while the A23 is /1, /2, /4, /8.
As Vishnu pointed out on IRC, the A23 driver is wrong. They are in fact,
both one-based dividers. I'll send a patch to fix this.
^^^
zero-based
And for this patch,
Acked-by: Chen-Yu Tsai <redacted>
ChenYu
quoted
ChenYu
quoted
quoted
Also the drivers for "allwinner,sun9i-a80-cpus-clk" and
"allwinner,sun9i-a80-apbs-clk"
are only compiled for CONFIG_MACH_SUN9I. Please add a patch to address this.
Modified request:
can you put in F: wildcards there to match the files pertaining to
the sunxi platform, so that scripts/find-maintainer.pl finds them.
Yours,
Linus Walleij
Modified request:
can you put in F: wildcards there to match the files pertaining to
the sunxi platform, so that scripts/find-maintainer.pl finds them.
I don't really know what you mean, on my laptop, if I run it, I get
the following result:
$ ./scripts/get_maintainer.pl -f drivers/pinctrl/sunxi/pinctrl-sun8i-a83t.c
Linus Walleij [off-list ref] (maintainer:PIN CONTROL SUBSYSTEM,commit_signer:2/2=100%)
Maxime Ripard [off-list ref] (maintainer:ARM/Allwinner sunXi SoC support,commit_signer:1/2=50%)
Chen-Yu Tsai [off-list ref] (maintainer:ARM/Allwinner sunXi SoC support)
Fabian Frederick [off-list ref] (commit_signer:1/2=50%,authored:1/2=50%)
Vishnu Patekar [off-list ref] (commit_signer:1/2=50%,authored:1/2=50%)
Hongzhou Yang [off-list ref] (commit_signer:1/2=50%)
linux-gpio at vger.kernel.org (open list:PIN CONTROL SUBSYSTEM)
linux-arm-kernel at lists.infradead.org (moderated list:ARM/Allwinner sunXi SoC support)
linux-kernel at vger.kernel.org (open list)
With both Chen-Yu and I listed as maintainers.
Thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160224/f137e911/attachment-0001.sig>
Modified request:
can you put in F: wildcards there to match the files pertaining to
the sunxi platform, so that scripts/find-maintainer.pl finds them.
I don't really know what you mean, on my laptop, if I run it, I get
the following result:
OK the file is listed under SoC support, that works too.
Yours,
Linus Walleij