[PATCH v2 09/10] Documentation: devicetree: Add dts description for nuc900
This patch is to add dts description for nuc900 platform. Signed-off-by: Wan Zongshun --- .../devicetree/bindings/arm/nuvoton/nuc970.txt | 12 .../bindings/clock/nuvoton,nuc970-clk.txt | 13 + .../interrupt-controller/nuvoton,nuc900-aic.txt| 15 +++ .../bindings/reset/nuvoton,nuc900-reset.txt| 12 .../devicetree/bindings/serial/nuc970-uart.txt | 22 ++ .../bindings/soc/nuvoton/nuvoton,nuc900-soc.txt| 12 .../bindings/timer/nuvoton,nuc970-tmr.txt | 20 7 files changed, 106 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/nuvoton/nuc970.txt create mode 100644 Documentation/devicetree/bindings/clock/nuvoton,nuc970-clk.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/nuvoton,nuc900-aic.txt create mode 100644 Documentation/devicetree/bindings/reset/nuvoton,nuc900-reset.txt create mode 100644 Documentation/devicetree/bindings/serial/nuc970-uart.txt create mode 100644 Documentation/devicetree/bindings/soc/nuvoton/nuvoton,nuc900-soc.txt create mode 100644 Documentation/devicetree/bindings/timer/nuvoton,nuc970-tmr.txt diff --git a/Documentation/devicetree/bindings/arm/nuvoton/nuc970.txt b/Documentation/devicetree/bindings/arm/nuvoton/nuc970.txt new file mode 100644 index 000..0872f6f --- /dev/null +++ b/Documentation/devicetree/bindings/arm/nuvoton/nuc970.txt @@ -0,0 +1,12 @@ +Nuvoton NUC970 SoC platform Device Tree Bindings +-- + +Boards with the NUC970 SoC shall have the following properties: + +Root node required properties: +- compatible: Should be "syscon" or "nuvoton,nuc970-gcr" + +GCR register required properties: +- compatible: Should be "nuvoton,nuc970-gcr" +- reg: Should contain registers location and length + diff --git a/Documentation/devicetree/bindings/clock/nuvoton,nuc970-clk.txt b/Documentation/devicetree/bindings/clock/nuvoton,nuc970-clk.txt new file mode 100644 index 000..82fcf32 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/nuvoton,nuc970-clk.txt @@ -0,0 +1,13 @@ +NUC970 Clock Controller + +Clock required properties: +- compatible: Should be "nuvoton,nuc970-clk" +- reg: Should contain registers location and length + +Examples: + +clks: clk@b200 { + compatible = "nuvoton,nuc970-clk"; + reg = <0xb200 0x200>; + #clock-cells = <1>; +}; diff --git a/Documentation/devicetree/bindings/interrupt-controller/nuvoton,nuc900-aic.txt b/Documentation/devicetree/bindings/interrupt-controller/nuvoton,nuc900-aic.txt new file mode 100644 index 000..f265095 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/nuvoton,nuc900-aic.txt @@ -0,0 +1,15 @@ +NUC900 interrupt Controller + +Interrupt-controller required properties +- compatible: Should be "nuvoton,nuc900-aic" +- reg: Should contain registers location and length +- interrupt-cells: set to 1 + +Examples: + +aic: interrupt-controller@b8002000 { + compatible = "nuvoton,nuc900-aic"; + interrupt-controller; + #interrupt-cells = <1>; + reg = <0xb8002000 0x1000>; +}; diff --git a/Documentation/devicetree/bindings/reset/nuvoton,nuc900-reset.txt b/Documentation/devicetree/bindings/reset/nuvoton,nuc900-reset.txt new file mode 100644 index 000..ab6056a --- /dev/null +++ b/Documentation/devicetree/bindings/reset/nuvoton,nuc900-reset.txt @@ -0,0 +1,12 @@ +. Nuvoton NUC900 series, reset controller binding. + +Required properties: +- compatible : Should be "nuvoton,nuc900-reset" +- syscon : Reference to gcr controller. + +Example: + +reset { + compatible = "nuvoton,nuc900-reset"; + syscon = <&gcr>; +}; diff --git a/Documentation/devicetree/bindings/serial/nuc970-uart.txt b/Documentation/devicetree/bindings/serial/nuc970-uart.txt new file mode 100644 index 000..a143a5e --- /dev/null +++ b/Documentation/devicetree/bindings/serial/nuc970-uart.txt @@ -0,0 +1,22 @@ +NUC970 UART Controller + +Uart required properties: +- compatible: Should be "nuvoton,nuc970-uart" +- reg: Should contain registers location and length + +Examples: + +aliases { + serial0 = &uart0; +}; + +uart0: serial@b800 { + compatible = "nuvoton,nuc970-uart"; + reg = <0xb800 0x1000>; + interrupts = <36>; + clocks = <&clks UART0_GATE>, +<&clks UART0_ECLK_GATE>; + clock-names = "uart0", "uart0_eclk"; + clock-frequency = <1200>; + status = "disabled"; +}; diff --git a/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,nuc900-soc.txt b/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,nuc900-soc.txt new file mode 100644 index 000..0284edf --- /dev/null +++ b/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,nuc900-soc.txt @@ -0,0 +1,12 @@ +. Nuvoton NUC900 series, Soc specific driver binding. + +Required properties: +- compatible : Should be "nuvoton,nuc90
Re: [PATCH v2 09/10] Documentation: devicetree: Add dts description for nuc900
On Monday, July 11, 2016 10:13:54 AM CEST Wan Zongshun wrote: > > On 2016年07月11日 06:17, Arnd Bergmann wrote: > > On Sunday, July 10, 2016 3:42:21 PM CEST Wan Zongshun wrote: > >> + > >> +Required properties: > >> +- compatible : Should be "nuvoton,nuc970-tmr" > >> +- reg : Address and length of the register set > >> +- clocks : Reference on the timer input clock > >> +- interrupts : Reference to the timer interrupt > >> + > >> +Example: > >> + > >> +tmr@0xb8001000 { > > > > The name should be "timer", not "tmr", and the address should > > not contain a leading "0x". > > Ok, so all dts addresses has no need contain a leading "0x"? In properties, you need the leading 0x for hexadecimal numbers, in the node name the portion after the "@" depends on the bus, but is usually just the value of the address in hexadecimal without the leading 0x. > > > >> + compatible = "nuvoton,nuc970-tmr"; > >> + reg = <0xb8001000 0x1000>; > >> + interrupts = <16>; > >> + clocks = <&clks TIMER0_GATE>, > >> + <&clks TIMER1_GATE>; > >> + clock-names = "timer0", "timer1"; > >> +}; > > > > The clocks/clock-names description does not match the example: > > you only define a single clock in the required properties, but > > have two separate inputs in the example. Please fix one or the > > other. > > Two clocks are necessary, so I only need modify this description like? > > Required properties: >clocks : Reference on the timer input clock, This list should be 2 > clocks, the order is timer0 , timer1. > > Is it ok? Yes, looks good. Arnd
Re: [PATCH v2 09/10] Documentation: devicetree: Add dts description for nuc900
On Sunday, July 10, 2016 3:42:21 PM CEST Wan Zongshun wrote: > + > +Required properties: > +- compatible : Should be "nuvoton,nuc970-tmr" > +- reg : Address and length of the register set > +- clocks : Reference on the timer input clock > +- interrupts : Reference to the timer interrupt > + > +Example: > + > +tmr@0xb8001000 { The name should be "timer", not "tmr", and the address should not contain a leading "0x". > + compatible = "nuvoton,nuc970-tmr"; > + reg = <0xb8001000 0x1000>; > + interrupts = <16>; > + clocks = <&clks TIMER0_GATE>, > + <&clks TIMER1_GATE>; > + clock-names = "timer0", "timer1"; > +}; The clocks/clock-names description does not match the example: you only define a single clock in the required properties, but have two separate inputs in the example. Please fix one or the other. Arnd
Re: [PATCH v2 09/10] Documentation: devicetree: Add dts description for nuc900
On Sunday, July 10, 2016 3:42:21 PM CEST Wan Zongshun wrote: > diff --git > a/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,nuc900-soc.txt > b/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,nuc900-soc.txt > new file mode 100644 > index 000..0284edf > --- /dev/null > +++ b/Documentation/devicetree/bindings/soc/nuvoton/nuvoton,nuc900-soc.txt > @@ -0,0 +1,12 @@ > +. Nuvoton NUC900 series, Soc specific driver binding. > + > +Required properties: > +- compatible : Should be "nuvoton,nuc900-soc" > +- syscon : Reference to gcr controller. > + > +Example: > + > +reset { > + compatible = "nuvoton,nuc900-soc"; > + syscon = <&gcr>; > +}; I think this one should be dropped: Instead of modeling the DT based on what is convenient for the current Linux driver implementation, we only want to list devices in the dts that are physically present, and the "soc" is really the sum of all the on-chip devices. Better change the soc_device driver to bind directly to the "nuvoton,nuc970-gcr" device. Arnd
Re: [PATCH v2 09/10] Documentation: devicetree: Add dts description for nuc900
On 2016年07月11日 06:17, Arnd Bergmann wrote: On Sunday, July 10, 2016 3:42:21 PM CEST Wan Zongshun wrote: + +Required properties: +- compatible : Should be "nuvoton,nuc970-tmr" +- reg : Address and length of the register set +- clocks : Reference on the timer input clock +- interrupts : Reference to the timer interrupt + +Example: + +tmr@0xb8001000 { The name should be "timer", not "tmr", and the address should not contain a leading "0x". Ok, so all dts addresses has no need contain a leading "0x"? + compatible = "nuvoton,nuc970-tmr"; + reg = <0xb8001000 0x1000>; + interrupts = <16>; + clocks = <&clks TIMER0_GATE>, + <&clks TIMER1_GATE>; + clock-names = "timer0", "timer1"; +}; The clocks/clock-names description does not match the example: you only define a single clock in the required properties, but have two separate inputs in the example. Please fix one or the other. Two clocks are necessary, so I only need modify this description like? Required properties: clocks : Reference on the timer input clock, This list should be 2 clocks, the order is timer0 , timer1. Is it ok? Arnd