From: Ivan Uvarov <hidden> Date: 2021-03-22 10:57:32
This patch series adds devicetree support for the Forlinx FETA40i-C SoM
and OKA40i-C carrier board/devboard.
The FETA40i-C is an "industrial/automotive" SoM by Forlinx.
SoM specs:
- SoC: R40 or A40i
- PMIC: AXP221S
- RAM: 1GiB/2GiB DDR3 (dual-rank)
- eMMC: 8GB,
- Mates with carrier board via four 80-pin connectors (AXK6F80337YG).
OKA40i-C is a carrier board by the same manufacturer for this SoM,
whose main purpose is as a development board with a variety of
peripherals:
- Power: DC5V barrel or USB OTG or 4.2V Lipo battery
- Video out: HDMI, TV out, LVDS
- WiFi+Bluetooth: RL-UM02WBS-8723BU-V1.2 (802.11 b/g/n, BT V2.1/3.0/4.0)
- Ethernet: 10/100Mbps
- Storage: µSD, fullsize SD, eMMC (on SoM), SATA
- USB: 3 x USB2.0 Host (2 via hub, 1 native), 1 x USB2.0 OTG (micro-B)
- UART: RS232, RS485, 4 3.3v uarts (of which 2 have RTS/CTS)
- Other I/O: SPI x2, TWI, SDIO header, GPIO header, JTAG header
- Mini PCIe slot with sim holder for WLAN modem
- Smart card holder
- RTC (RX8010SJ)
- Two user LEDs
- Three user buttons (via KeyADC).
Of the board features listed above, support for the following has *NOT*
been tested:
- TV out & LVDS
- SATA
- Smart cards
- KeyADC buttons (no support)
The series consists of four patches, the first three of which are mutually
independent (although patch 2 may not apply without patch 1).
The last patch depends on patches 2 and 3.
Signed-off-by: Ivan Uvarov <redacted>
---
Changelog:
v1 -> v2:
* split patch into series
* edits to sun8i-r40.dtsi are now in separate patch
* add dt bindings for compatible strings (in separate patch)
* add /omit-if-no-ref/ to the new uart pin nodes
* preliminary patch adds the keyword to existing nodes for UART0 & UART3
* whitespace fixes as suggested by checkpatch.pl
draft2 -> v1:
* fix indentation from spaces to tabs;
* remove commented properties and other extraneous comments;
* enable uarts 2,4,5&7 and alias uart3;
* update the user-LED bindings;
* remove mmc1 & add mmc3 binding;
* bring together the max/min microvolts on three regulators;
* The reported 2.5v value in ALDO2 comes from U-Boot, where apparently
this is the KConfig default for this regulator. The correct voltage
is 1.8v.
* remove extraneous `always-on`s from regulators dldo1 and eldo2/3;
* remove reg_dldo3 node entirely.
Ivan Uvarov (4):
ARM: dts: sun8i: r40: add /omit-if-no-ref/ to pinmux nodes for UARTs 0&3
ARM: dts: sun8i: r40: add pinmux settings for MMC3 and UARTs 2,4,5&7
dt-bindings: arm: add compatible strings for Forlinx OKA40i-C
ARM: dts: sun8i: r40: add devicetree for Forlinx FETA40i-C & OKA40i-C
.../devicetree/bindings/arm/sunxi.yaml | 5 +
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/sun8i-r40-feta40i.dtsi | 66 +++++
arch/arm/boot/dts/sun8i-r40-oka40i-c.dts | 243 ++++++++++++++++++
arch/arm/boot/dts/sun8i-r40.dtsi | 43 ++++
6 files changed, 360 insertions(+)
create mode 100644 arch/arm/boot/dts/sun8i-r40-feta40i.dtsi
create mode 100644 arch/arm/boot/dts/sun8i-r40-oka40i-c.dts
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Ivan Uvarov <hidden> Date: 2021-03-22 10:57:31
This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
UART0 and UART3 pins of the R40 SoC, which would reduce the fdt size on
boards which do not use these UARTs.
Signed-off-by: Ivan Uvarov <redacted>
1 file changed, 3 insertions(+)
From: Andre Przywara <andre.przywara@arm.com> Date: 2021-03-22 16:18:48
On Mon, 22 Mar 2021 13:55:35 +0300
Ivan Uvarov [off-list ref] wrote:
Hi,
This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
UART0 and UART3 pins of the R40 SoC, which would reduce the fdt size on
boards which do not use these UARTs.
But what boards are those? It seems like all boards use uart3-pg and
the two existing boards use UART0.
I think the idea is to use omit-if-no-ref on some rarely used nodes, so
if there is only a single user, for instance. Your next patch is a good
example.
So I don't think this patch here is needed at all.
Cheers,
Andre
quoted hunk
Signed-off-by: Ivan Uvarov <redacted>
1 file changed, 3 insertions(+)
From: Ivan Uvarov <hidden> Date: 2021-03-23 10:00:26
On Mon, 22 Mar 2021 16:18:04 +0000
Andre Przywara [off-list ref] wrote:
On Mon, 22 Mar 2021 13:55:35 +0300
Ivan Uvarov [off-list ref] wrote:
Hi,
quoted
This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
UART0 and UART3 pins of the R40 SoC, which would reduce the fdt
size on boards which do not use these UARTs.
But what boards are those? It seems like all boards use uart3-pg and
the two existing boards use UART0.
I think the idea is to use omit-if-no-ref on some rarely used nodes,
so if there is only a single user, for instance. Your next patch is a
good example.
So I don't think this patch here is needed at all.
Cheers,
Andre
This is a valid complaint, and the patch indeed is not strictly
necessary. At the same time, the keyword certainly doesn't hurt, and
it would be a good base for future R40 boards.
As to what boards I'm referring to, there's at least the carrier board
for the FETA40i which our company is privately developing, the support
for which we probably won't upstream as it's highly unlikely it'll ever
get into the hands of anyone who would appreciate such support.
I must also mention that I only added this patch to the series due to
explicit encouragement from Maxime in his last response to v1 of the patch:
On Fri, 19 Mar 2021 14:24:48 +0100
Maxime Ripard [off-list ref] wrote:
On Tue, Mar 16, 2021 at 06:48:58PM +0300, Ivan Uvarov wrote:
quoted
Also, would it be a good idea to add /omit-if-no-ref/ to the uart3
pins as well while I'm here?
To all the nodes honestly. If you want to make a preliminary patch doing
this, go ahead :)
Since there's two differing viewpoints on the subject, this definitely
deserves more discussion.
--
Regards,
Ivan Uvarov
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Maxime Ripard <hidden> Date: 2021-03-25 14:12:55
On Mon, Mar 22, 2021 at 04:18:04PM +0000, Andre Przywara wrote:
On Mon, 22 Mar 2021 13:55:35 +0300
Ivan Uvarov [off-list ref] wrote:
Hi,
quoted
This patch adds the /omit-if-no-ref/ keyword to the pio nodes for
UART0 and UART3 pins of the R40 SoC, which would reduce the fdt size on
boards which do not use these UARTs.
But what boards are those? It seems like all boards use uart3-pg and
the two existing boards use UART0.
I think the idea is to use omit-if-no-ref on some rarely used nodes, so
if there is only a single user, for instance. Your next patch is a good
example.
There's no real cost associated to it though, so it's just easier to
flag all the nodes and let the compiler figure out if it should evict
them or not.
Maxime
From: Ivan Uvarov <hidden> Date: 2021-03-22 10:57:32
The FETA40i-C is a SoM by Forlinx based on the Allwinner R40/A40i.
SoM specifications:
- SoC: R40 or A40i
- PMIC: AXP221S
- RAM: 1GiB/2GiB DDR3 (dual-rank)
- eMMC: 8GB,
- Mates with carrier board via four 80-pin connectors (AXK6F80337YG).
OKA40i-C is a carrier board by the same manufacturer for this SoM,
whose main purpose is as a development board with a wide variety of
peripherals:
- Power: DC5V barrel or USB OTG or 4.2V Lipo battery
- Video out: HDMI, TV out, LVDS
- WiFi+Bluetooth: RL-UM02WBS-8723BU-V1.2 (802.11 b/g/n, BT V2.1/3.0/4.0)
- Ethernet: 10/100Mbps
- Storage: µSD, fullsize SD, eMMC (on SoM), SATA
- USB: 3 x USB2.0 Host (2 via hub, 1 native), 1 x USB2.0 OTG (micro-B)
- UART: RS232, RS485, 4 3.3v uarts (of which 2 have RTS/CTS)
- Other I/O: SPI x2, TWI, SDIO header, GPIO header, JTAG header
- Mini PCIe slot with sim holder for WLAN modem
- Smart card holder
- RTC (RX8010SJ)
- Two user LEDs
- Three user buttons (via KeyADC).
This patch adds a devicetree for the aforementioned SoM and devboard.
In order to reflect the modularity of this devboard and simplify adding
support for future hardware based on the same SoM, the devicetree is split:
Everything pertaining to the SoM itself is described in a separate .dtsi
file, which is included by the devboard's .dts.
Signed-off-by: Ivan Uvarov <redacted>
3 files changed, 310 insertions(+)
From: Andre Przywara <andre.przywara@arm.com> Date: 2021-03-22 16:48:22
On Mon, 22 Mar 2021 13:55:38 +0300
Ivan Uvarov [off-list ref] wrote:
Hi,
quoted hunk
The FETA40i-C is a SoM by Forlinx based on the Allwinner R40/A40i.
SoM specifications:
- SoC: R40 or A40i
- PMIC: AXP221S
- RAM: 1GiB/2GiB DDR3 (dual-rank)
- eMMC: 8GB,
- Mates with carrier board via four 80-pin connectors (AXK6F80337YG).
OKA40i-C is a carrier board by the same manufacturer for this SoM,
whose main purpose is as a development board with a wide variety of
peripherals:
- Power: DC5V barrel or USB OTG or 4.2V Lipo battery
- Video out: HDMI, TV out, LVDS
- WiFi+Bluetooth: RL-UM02WBS-8723BU-V1.2 (802.11 b/g/n, BT V2.1/3.0/4.0)
- Ethernet: 10/100Mbps
- Storage: µSD, fullsize SD, eMMC (on SoM), SATA
- USB: 3 x USB2.0 Host (2 via hub, 1 native), 1 x USB2.0 OTG (micro-B)
- UART: RS232, RS485, 4 3.3v uarts (of which 2 have RTS/CTS)
- Other I/O: SPI x2, TWI, SDIO header, GPIO header, JTAG header
- Mini PCIe slot with sim holder for WLAN modem
- Smart card holder
- RTC (RX8010SJ)
- Two user LEDs
- Three user buttons (via KeyADC).
This patch adds a devicetree for the aforementioned SoM and devboard.
In order to reflect the modularity of this devboard and simplify adding
support for future hardware based on the same SoM, the devicetree is split:
Everything pertaining to the SoM itself is described in a separate .dtsi
file, which is included by the devboard's .dts.
Signed-off-by: Ivan Uvarov <redacted>
3 files changed, 310 insertions(+)
I believe this regulator should be in the SoM .dtsi. If I get this
correctly, this regulator is somewhat essential, also the connection is
entirely on the SoM (as both the AXP and the SoC are).
I don't know for sure if you can actually disable this if you don't
need any "analogue" functionality, but then any board .dts could still
put a: status = "disabled"; property in its .dts.
I guess the same rationale applies to PE: the line is on the SoM, and
any board users could just reference it from there to make use of it.
The rest looks alright.
Cheers,
Andre
From: Ivan Uvarov <hidden> Date: 2021-03-22 10:57:32
The OKA40i-C is a carrier/development board for the Forlinx FETA40i-C SoM
based on the Allwinner R40/A40i SoC.
This patch adds the relevant dt-binding documentation in preparation for
the next patch, which adds a devicetree for the SoM and board.
Signed-off-by: Ivan Uvarov <redacted>
2 files changed, 7 insertions(+)
From: Andre Przywara <andre.przywara@arm.com> Date: 2021-03-22 16:27:51
On Mon, 22 Mar 2021 13:55:37 +0300
Ivan Uvarov [off-list ref] wrote:
Hi,
quoted hunk
The OKA40i-C is a carrier/development board for the Forlinx FETA40i-C SoM
based on the Allwinner R40/A40i SoC.
This patch adds the relevant dt-binding documentation in preparation for
the next patch, which adds a devicetree for the SoM and board.
Signed-off-by: Ivan Uvarov <redacted>
2 files changed, 7 insertions(+)
From: Ivan Uvarov <hidden> Date: 2021-03-22 10:57:32
The Forlinx OKA40i-C devboard makes use of UARTs 0,2,3,4,5 and 7 of the R40
SoC, of which UART 0 is connected to an RS232 converter, UART 5 routed to
an RS485 converter, and the rest broken out directly via labeled headers.
The board also contains a micro-SD slot connected to SDC3.
This patch adds settings to R40's pinmux node for those UARTs that were not
already mapped, which would allow us to make use of all available UARTs and
the micro-SD slot on this board in a further patch.
Signed-off-by: Ivan Uvarov <redacted>
1 file changed, 40 insertions(+)
From: Andre Przywara <andre.przywara@arm.com> Date: 2021-03-22 16:25:11
On Mon, 22 Mar 2021 13:55:36 +0300
Ivan Uvarov [off-list ref] wrote:
Hi,
The Forlinx OKA40i-C devboard makes use of UARTs 0,2,3,4,5 and 7 of the R40
SoC, of which UART 0 is connected to an RS232 converter, UART 5 routed to
an RS485 converter, and the rest broken out directly via labeled headers.
The board also contains a micro-SD slot connected to SDC3.
This patch adds settings to R40's pinmux node for those UARTs that were not
already mapped, which would allow us to make use of all available UARTs and
the micro-SD slot on this board in a further patch.
Signed-off-by: Ivan Uvarov <redacted>
Looks alright, compared against the R40 manual.
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre