Add Amlogic A311D2 and Khadas Vim4 Board Support
v3 cover Add Amlogic A311D2 and Khadas Vim4 Board Support
The Khadas VIM4 uses the Amlogic A311D2 SoC, based on the Amlogic Meson T7 family. This chip is not the same as A311D used in Vim3 board.
Work based on Khadas 5.4 branch:
https://github.com/khadas/linux/tree/khadas-vims-5.4.y
The current status is Vim4 board booting to emergency shell via uart.
Board Features:
- 8GB LPDDR4X 2016MHz
- 32GB eMMC 5.1 storage
- 32MB SPI flash
- 10/100/1000 Base-T Ethernet
- AP6275S Wireless (802.11 a/b/g/n/ac/ax, BT5.1)
- HDMI 2.1 video
- HDMI Input
- 1x USB 2.0 + 1x USB 3.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 3x LED's (1x red, 1x blue, 1x white)
- 3x buttons (power, function, reset)
- M2 socket with PCIe, USB, ADC & I2C
- 40pin GPIO Header
- 1x micro SD card slot
Changes Since v2:
- Add "amlogic,meson-t7-uart" documentation
Changes Since v1:
- Drop the T7 clock driver as it is not needed for serial boot. It will later use the S4 clock
driver as S4 and T7 seems to be similar chips.
- Use "arm,gic-400" for interrupt controller to fix dtb_check
- Remove CPU node properties not needed for serial boot
- Move UART node to apb4 node
- Drop T7 UART compatible line and use S4 uart
- Use psci V1 instead of 0.2, it works, but I can't verify is correct as the datasheet I have
doesn't contain that information.
- Remove compatible from meson-t7.dtsi, move it to vim4 board dts
- Add memory node with 8GB. Not sure about this one, works without, but doesn't detect 8GB
- Use defines for GIC_CPU_MASK_SIMPLE, IRQ_TYPE_LEVEL_LOW, IRQ_TYPE_LEVEL_HIGH instead of hardcoded values
Lucas Tanure (3):
dt-bindings: arm: amlogic: add Amlogic A311D2 bindings
dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
arm64: dts: meson-t7-a311d2-khadas-vim4: add initial device-tree
.../devicetree/bindings/arm/amlogic.yaml | 7 + .../bindings/serial/amlogic,meson-uart.yaml | 2 + arch/arm64/boot/dts/amlogic/Makefile | 1 + .../amlogic/meson-t7-a311d2-khadas-vim4.dts | 52 ++++++ arch/arm64/boot/dts/amlogic/meson-t7.dtsi | 158 ++++++++++++++++++ 5 files changed, 220 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-t7-a311d2-khadas-vim4.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-t7.dtsi
--
2.41.0
PATCH v3 1/3 dt-bindings: arm: amlogic: add Amlogic A311D2 bindings
Add bindings for the Khadas Vim4 board, using A311D2 soc, a Meson T7 family chip.
--- Documentation/devicetree/bindings/arm/amlogic.yaml | 7 +++++++ 1 file changed, 7 insertions(+)
Documentation/devicetree/bindings/arm/amlogic.yaml +7 -0
@@ -211,6 +211,13 @@ properties: - amlogic,aq222 - const: amlogic,s4 + - description: Boards with the Amlogic Meson t7 A311D2 SoC + items: + - enum: + - khadas,vim4 + - const: amlogic,a311d2 + - const: amlogic,t7 + additionalProperties: true ...
Signature · 1 line
2.41.0
PATCH v3 2/3 dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
In reply to Lucas TanureAmlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +2 -0
@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:
@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - description: Everything-Else power domain UART controller on G12A SoCs items: - const: amlogic,meson-g12a-uart
Signature · 1 line
2.41.0
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 22 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 4 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart
It does not look like you tested the DTS against bindings. Please run make dtbs_check (see Documentation/devicetree/bindings/writing-schema.rst or
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Best regards,
Krzysztof
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Lucas,
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart
Quoted 8 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 2 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0- amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Check back on the previous version, I should've posted an untested version of what you need to add.
Cheers,
Conor.
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 38 lines · Conor Dooley
Lucas,
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uartQuoted 8 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 2 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0- amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Quoted 2 lines
Check back on the previous version, I should've posted an untested version of what you need to add.
I saw that, but adding a S4 doesn't make sense to me. And you didn't show the entire change, so I can't understand what you want there.
Quoted 3 lines
Cheers,
Conor.
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 39 lines · Lucas Tanure
Quoted 38 lines · Conor Dooley
Lucas,
Quoted 33 lines · Krzysztof Kozlowski
Quoted 22 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 4 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Quoted 4 lines
Quoted 2 lines
Check back on the previous version, I should've posted an untested version of what you need to add.
I saw that, but adding a S4 doesn't make sense to me. And you didn't show the entire change, so I can't understand what you want there.
For sure you need something which does not trigger errors. If you claim adding S4 as fallback does not make sense, then why did you use it? Sending a code which is clearly incorrect does not make sense.
Best regards,
Krzysztof
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 41 lines · Krzysztof Kozlowski
Quoted 39 lines · Lucas Tanure
Quoted 38 lines · Conor Dooley
Lucas,
Quoted 33 lines · Krzysztof Kozlowski
Quoted 22 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 4 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
Check back on the previous version, I should've posted an untested version of what you need to add.
I saw that, but adding a S4 doesn't make sense to me. And you didn't show the entire change, so I can't understand what you want there.
For sure you need something which does not trigger errors. If you claim adding S4 as fallback does not make sense, then why did you use it? Sending a code which is clearly incorrect does not make sense.
Sorry, I think we are talking about different things. It does not make sense to me to add an S4 line in the documentation when it is already there. So I could not understand or make sense of the patch Conor sent in reply to my V2.
Krzysztof, I will check again with dtbs_check and re-send.
Quoted 4 lines
Best regards,
Krzysztof
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 44 lines · Lucas Tanure
Quoted 42 lines · Krzysztof Kozlowski
Quoted 40 lines · Lucas Tanure
Quoted 35 lines · Conor Dooley
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uartQuoted 8 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 2 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0- amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).Quoted 2 lines
Check back on the previous version, I should've posted an untested version of what you need to add.
I saw that, but adding a S4 doesn't make sense to me. And you didn't show the entire change, so I can't understand what you want there.
Quoted 8 lines
Quoted 4 lines
For sure you need something which does not trigger errors. If you claim adding S4 as fallback does not make sense, then why did you use it? Sending a code which is clearly incorrect does not make sense.
Sorry, I think we are talking about different things. It does not make sense to me to add an S4 line in the documentation when it is already there. So I could not understand or make sense of the patch Conor sent in reply to my V2.
That is just how it works. You need to spell out exactly which combinations are permitted. The current entry for s4 says that s4 is only permitted in isolation.
Since you are adding "amlogic,meson-t7-uart", "amlogic,meson-s4-uart" you need to explicitly allow that combination. You'll notice if you look at the file that the gx uart appears more than once.
Given the g12a was the most recently added compatible, it might make sense to follow the pattern that it had set, given the thing your original patch copied the match data from was the g12a. That change to the dt-binding would look like:
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +7 -0
@@ -50,6 +50,13 @@ properties: items: - const: amlogic,meson-g12a-uart - const: amlogic,meson-gx-uart + - description: + Everything-Else power domain UART controller on G12A compatible SoCs + items: + - enum: + - amlogic,meson-t7-uart + - const: amlogic,meson-g12a-uart + - const: amlogic,meson-gx-uart reg: maxItems: 1
/I/ don't really care whether you do that, or do the s4 version of it, but following the most recent pattern might make more sense. When I suggested s4, it was because I only looked at the driver patch rather than the code itself.
Quoted 1 line
Krzysztof, I will check again with
dtbs_checkand re-send.
Cheers,
Conor.
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 90 lines · Conor Dooley
Quoted 44 lines · Lucas Tanure
Quoted 42 lines · Krzysztof Kozlowski
Quoted 40 lines · Lucas Tanure
Quoted 35 lines · Conor Dooley
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uartQuoted 8 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 2 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0- amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).Quoted 2 lines
Check back on the previous version, I should've posted an untested version of what you need to add.
I saw that, but adding a S4 doesn't make sense to me. And you didn't show the entire change, so I can't understand what you want there.
Quoted 8 lines
Quoted 4 lines
For sure you need something which does not trigger errors. If you claim adding S4 as fallback does not make sense, then why did you use it? Sending a code which is clearly incorrect does not make sense.
Sorry, I think we are talking about different things. It does not make sense to me to add an S4 line in the documentation when it is already there. So I could not understand or make sense of the patch Conor sent in reply to my V2.
That is just how it works. You need to spell out exactly which combinations are permitted. The current entry for s4 says that s4 is only permitted in isolation.
Since you are adding "amlogic,meson-t7-uart", "amlogic,meson-s4-uart" you need to explicitly allow that combination. You'll notice if you look at the file that the gx uart appears more than once.Given the g12a was the most recently added compatible, it might make sense to follow the pattern that it had set, given the thing your original patch copied the match data from was the g12a. That change to the dt-binding would look like:
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +7
-0@@ -50,6 +50,13 @@ properties: items: - const: amlogic,meson-g12a-uart - const: amlogic,meson-gx-uart + - description: + Everything-Else power domain UART controller on G12A compatible SoCs + items: + - enum: + - amlogic,meson-t7-uart + - const: amlogic,meson-g12a-uart + - const: amlogic,meson-gx-uart reg: maxItems: 1/I/ don't really care whether you do that, or do the s4 version of it, but following the most recent pattern might make more sense. When I suggested s4, it was because I only looked at the driver patch rather than the code itself.
Quoted 4 lines
Quoted 1 line
Krzysztof, I will check again with
dtbs_checkand re-send.Cheers,
Conor.
I am struggling to understand this. Everything I try fails the check.
Neil Armstrong
maintainerRe: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 91 lines · Lucas Tanure
Quoted 90 lines · Conor Dooley
Quoted 44 lines · Lucas Tanure
Quoted 42 lines · Krzysztof Kozlowski
Quoted 40 lines · Lucas Tanure
Quoted 35 lines · Conor Dooley
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uartQuoted 8 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 2 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0- amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).Quoted 2 lines
Check back on the previous version, I should've posted an untested version of what you need to add.
I saw that, but adding a S4 doesn't make sense to me. And you didn't show the entire change, so I can't understand what you want there.
Quoted 8 lines
Quoted 4 lines
For sure you need something which does not trigger errors. If you claim adding S4 as fallback does not make sense, then why did you use it? Sending a code which is clearly incorrect does not make sense.
Sorry, I think we are talking about different things. It does not make sense to me to add an S4 line in the documentation when it is already there. So I could not understand or make sense of the patch Conor sent in reply to my V2.
That is just how it works. You need to spell out exactly which combinations are permitted. The current entry for s4 says that s4 is only permitted in isolation.
Since you are adding "amlogic,meson-t7-uart", "amlogic,meson-s4-uart" you need to explicitly allow that combination. You'll notice if you look at the file that the gx uart appears more than once.Given the g12a was the most recently added compatible, it might make sense to follow the pattern that it had set, given the thing your original patch copied the match data from was the g12a. That change to the dt-binding would look like:
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +7
-0@@ -50,6 +50,13 @@ properties: items: - const: amlogic,meson-g12a-uart - const: amlogic,meson-gx-uart + - description: + Everything-Else power domain UART controller on G12A compatible SoCs + items: + - enum: + - amlogic,meson-t7-uart + - const: amlogic,meson-g12a-uart + - const: amlogic,meson-gx-uart reg: maxItems: 1/I/ don't really care whether you do that, or do the s4 version of it, but following the most recent pattern might make more sense. When I suggested s4, it was because I only looked at the driver patch rather than the code itself.
Quoted 5 lines
Quoted 4 lines
Quoted 1 line
Krzysztof, I will check again with
dtbs_checkand re-send.Cheers,
Conor.I am struggling to understand this. Everything I try fails the check.
I just applied Conor's change on top of v6.4-rc1 and ran:
make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml
and the check was successful.
Neil
_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
Re: [PATCH v3 2/3] dt-bindings: serial: amlogic,meson-uart: Add compatible string for T7
Quoted 97 lines · Neil Armstrong
Quoted 95 lines · Lucas Tanure
Quoted 94 lines · Conor Dooley
Quoted 44 lines · Lucas Tanure
Quoted 42 lines · Krzysztof Kozlowski
Quoted 40 lines · Lucas Tanure
Quoted 35 lines · Conor Dooley
Quoted 25 lines · Krzysztof Kozlowski
Quoted 24 lines · Lucas Tanure
Amlogic T7 SoCs uses the same UART controller as S4 SoCs and G12A. There is no need for an extra compatible line in the driver, but add T7 compatible line for documentation.
Signed-off-by Lucas Tanure <[email protected]>--- .../devicetree/bindings/serial/amlogic,meson-uart.yaml | 2 ++ 1 file changed, 2 insertions(+)Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0@@ -33,6 +33,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uart - amlogic,meson-s4-uart + - amlogic,meson-t7-uart - const: amlogic,meson-ao-uart - description: Always-on power domain UART controller on G12A SoCs items:@@ -46,6 +47,7 @@ properties: - amlogic,meson8b-uart - amlogic,meson-gx-uartQuoted 8 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml properties: · line 50
Quoted 2 lines
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +1
-0- amlogic,meson-s4-uart + - amlogic,meson-t7-uartIt does not look like you tested the DTS against bindings. Please run
make dtbs_check(seeDocumentation/devicetree/bindings/writing-schema.rstor
https://www.linaro.org/blog/tips-and-tricks-for-validating-devicetree-sources-with-the-devicetree-schema/
for instructions).Quoted 2 lines
Check back on the previous version, I should've posted an untested version of what you need to add.
I saw that, but adding a S4 doesn't make sense to me. And you didn't show the entire change, so I can't understand what you want there.
Quoted 8 lines
Quoted 4 lines
For sure you need something which does not trigger errors. If you claim adding S4 as fallback does not make sense, then why did you use it? Sending a code which is clearly incorrect does not make sense.
Sorry, I think we are talking about different things. It does not make sense to me to add an S4 line in the documentation when it is already there. So I could not understand or make sense of the patch Conor sent in reply to my V2.
That is just how it works. You need to spell out exactly which combinations are permitted. The current entry for s4 says that s4 is only permitted in isolation.
Since you are adding "amlogic,meson-t7-uart", "amlogic,meson-s4-uart" you need to explicitly allow that combination. You'll notice if you look at the file that the gx uart appears more than once.Given the g12a was the most recently added compatible, it might make sense to follow the pattern that it had set, given the thing your original patch copied the match data from was the g12a. That change to the dt-binding would look like:
Documentation/devicetree/bindings/serial/amlogic,meson-uart.yaml +7
-0@@ -50,6 +50,13 @@ properties: items: - const: amlogic,meson-g12a-uart - const: amlogic,meson-gx-uart + - description: + Everything-Else power domain UART controller on G12A compatible SoCs + items: + - enum: + - amlogic,meson-t7-uart + - const: amlogic,meson-g12a-uart + - const: amlogic,meson-gx-uart reg: maxItems: 1/I/ don't really care whether you do that, or do the s4 version of it, but following the most recent pattern might make more sense. When I suggested s4, it was because I only looked at the driver patch rather than the code itself.
Quoted 1 line
Krzysztof, I will check again with
dtbs_checkand re-send.Cheers,
Conor.
Quoted 10 lines
Quoted 1 line
I am struggling to understand this. Everything I try fails the check.
I just applied Conor's change on top of v6.4-rc1 and ran:
makedt_binding_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/serial/amlogic,meson-uart.yamland the check was successful.
Neil
I am sending v4 in a few minutes
PATCH v3 3/3 arm64: dts: meson-t7-a311d2-khadas-vim4: add initial device-tree
In reply to Lucas TanureThe Khadas VIM4 uses the Amlogic A311D2 SoC, based on the Amlogic T7 SoC family, on a board with the same form factor as the VIM3 models.
- 8GB LPDDR4X 2016MHz
- 32GB eMMC 5.1 storage
- 32MB SPI flash
- 10/100/1000 Base-T Ethernet
- AP6275S Wireless (802.11 a/b/g/n/ac/ax, BT5.1)
- HDMI 2.1 video
- HDMI Input
- 1x USB 2.0 + 1x USB 3.0 ports
- 1x USB-C (power) with USB 2.0 OTG
- 3x LED's (1x red, 1x blue, 1x white)
- 3x buttons (power, function, reset)
- M2 socket with PCIe, USB, ADC & I2C
- 40pin GPIO Header
- 1x micro SD card slot
--- arch/arm64/boot/dts/amlogic/Makefile | 1 + .../amlogic/meson-t7-a311d2-khadas-vim4.dts | 52 ++++++ arch/arm64/boot/dts/amlogic/meson-t7.dtsi | 158 ++++++++++++++++++ 3 files changed, 211 insertions(+) create mode 100644 arch/arm64/boot/dts/amlogic/meson-t7-a311d2-khadas-vim4.dts create mode 100644 arch/arm64/boot/dts/amlogic/meson-t7.dtsi
arch/arm64/boot/dts/amlogic/Makefile +1 -0
@@ -74,3 +74,4 @@ dtb-$(CONFIG_ARCH_MESON) += meson-sm1-odroid-hc4.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-sei610.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air-gbit.dtb dtb-$(CONFIG_ARCH_MESON) += meson-sm1-x96-air.dtb +dtb-$(CONFIG_ARCH_MESON) += meson-t7-a311d2-khadas-vim4.dtb
arch/arm64/boot/dts/amlogic/meson-t7-a311d2-khadas-vim4.dts new file +52 -0
52 lines not on this page · raw message
arch/arm64/boot/dts/amlogic/meson-t7.dtsi new file +158 -0
158 lines not on this page · raw message
Signature · 1 line
2.41.0