Skip to content

Commit

Permalink
Merge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/khilman/linux-amlogic into next/late

Pull "Amlogic 64-bit DT changes for v4.9" from Kevin Hilman:

- add watchdog, reset, IR remote, PWM
- add secure monitor and eFuse
- add always-on (AO) domain clock and reset

* tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
  ARM64: dts: amlogic: gxbb: Enable NVMEM
  documentation: Add nvmem bindings documentation
  ARM64: dts: amlogic: gxbb: Enable secure monitor
  documentation: Add secure monitor bindings documentation
  ARM64: dts: meson-gxbb: Add PWM pinctrl nodes
  ARM64: dts: meson-gxbb: Enable the the IR decoder on supported boards
  ARM64: dts: meson-gxbb: Add Infrared Remote Controller decoder
  dt-bindings: media: meson-ir: Add Meson8b and GXBB compatible strings
  ARM64: dts: amlogic: add the input pin for the IR remote
  ARM64: dts: meson-gxbb: Add GXBB AO Clock and Reset node
  clk: meson: Fix invalid use of sizeof in gxbb_aoclkc_probe()
  clk: meson: Add GXBB AO Clock and Reset controller driver
  dt-bindings: clock: reset: Add GXBB AO Clock and Reset Bindings
  ARM64: DTS: meson-gxbb: switch ethernet to real clock
  ARM64: dts: amlogic: meson-gxbb: Add watchdog node
  • Loading branch information
Arnd Bergmann committed Sep 14, 2016
2 parents 292cc1a + bfe59f9 commit e08644b
Show file tree
Hide file tree
Showing 12 changed files with 575 additions and 3 deletions.
45 changes: 45 additions & 0 deletions Documentation/devicetree/bindings/clock/amlogic,gxbb-aoclkc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
* Amlogic GXBB AO Clock and Reset Unit

The Amlogic GXBB AO clock controller generates and supplies clock to various
controllers within the Always-On part of the SoC.

Required Properties:

- compatible: should be "amlogic,gxbb-aoclkc"
- reg: physical base address of the clock controller and length of memory
mapped region.

- #clock-cells: should be 1.

Each clock is assigned an identifier and client nodes can use this identifier
to specify the clock which they consume. All available clocks are defined as
preprocessor macros in the dt-bindings/clock/gxbb-aoclkc.h header and can be
used in device tree sources.

- #reset-cells: should be 1.

Each reset is assigned an identifier and client nodes can use this identifier
to specify the reset which they consume. All available resets are defined as
preprocessor macros in the dt-bindings/reset/gxbb-aoclkc.h header and can be
used in device tree sources.

Example: AO Clock controller node:

clkc_AO: clock-controller@040 {
compatible = "amlogic,gxbb-aoclkc";
reg = <0x0 0x040 0x0 0x4>;
#clock-cells = <1>;
#reset-cells = <1>;
};

Example: UART controller node that consumes the clock and reset generated
by the clock controller:

uart_AO: serial@4c0 {
compatible = "amlogic,meson-uart";
reg = <0x4c0 0x14>;
interrupts = <0 90 1>;
clocks = <&clkc_AO CLKID_AO_UART1>;
resets = <&clkc_AO RESET_AO_UART1>;
status = "disabled";
};
15 changes: 15 additions & 0 deletions Documentation/devicetree/bindings/firmware/meson/meson_sm.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* Amlogic Secure Monitor

In the Amlogic SoCs the Secure Monitor code is used to provide access to the
NVMEM, enable JTAG, set USB boot, etc...

Required properties for the secure monitor node:
- compatible: Should be "amlogic,meson-gxbb-sm"

Example:

firmware {
sm: secure-monitor {
compatible = "amlogic,meson-gxbb-sm";
};
};
5 changes: 4 additions & 1 deletion Documentation/devicetree/bindings/media/meson-ir.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
* Amlogic Meson IR remote control receiver

Required properties:
- compatible : should be "amlogic,meson6-ir"
- compatible : depending on the platform this should be one of:
- "amlogic,meson6-ir"
- "amlogic,meson8b-ir"
- "amlogic,meson-gxbb-ir"
- reg : physical base address and length of the device registers
- interrupts : a single specifier for the interrupt from the device

Expand Down
39 changes: 39 additions & 0 deletions Documentation/devicetree/bindings/nvmem/amlogic-efuse.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
= Amlogic eFuse device tree bindings =

Required properties:
- compatible: should be "amlogic,meson-gxbb-efuse"

= Data cells =
Are child nodes of eFuse, bindings of which as described in
bindings/nvmem/nvmem.txt

Example:

efuse: efuse {
compatible = "amlogic,meson-gxbb-efuse";
#address-cells = <1>;
#size-cells = <1>;

sn: sn@14 {
reg = <0x14 0x10>;
};

eth_mac: eth_mac@34 {
reg = <0x34 0x10>;
};

bid: bid@46 {
reg = <0x46 0x30>;
};
};

= Data consumers =
Are device nodes which consume nvmem data cells.

For example:

eth_mac {
...
nvmem-cells = <&eth_mac>;
nvmem-cell-names = "eth_mac";
};
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,8 @@
pinctrl-names = "default";
};

&ir {
status = "okay";
pinctrl-0 = <&remote_input_ao_pins>;
pinctrl-names = "default";
};
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-p20x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,8 @@
pinctrl-names = "default";
};

&ir {
status = "okay";
pinctrl-0 = <&remote_input_ao_pins>;
pinctrl-names = "default";
};
6 changes: 6 additions & 0 deletions arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@
pinctrl-names = "default";

};

&ir {
status = "okay";
pinctrl-0 = <&remote_input_ao_pins>;
pinctrl-names = "default";
};
133 changes: 132 additions & 1 deletion arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/gpio/meson-gxbb-gpio.h>
#include <dt-bindings/reset/amlogic,meson-gxbb-reset.h>
#include <dt-bindings/clock/gxbb-clkc.h>
#include <dt-bindings/clock/gxbb-aoclkc.h>
#include <dt-bindings/reset/gxbb-aoclkc.h>

/ {
compatible = "amlogic,meson-gxbb";
Expand Down Expand Up @@ -99,6 +102,30 @@
method = "smc";
};

firmware {
sm: secure-monitor {
compatible = "amlogic,meson-gxbb-sm";
};
};

efuse: efuse {
compatible = "amlogic,meson-gxbb-efuse";
#address-cells = <1>;
#size-cells = <1>;

sn: sn@14 {
reg = <0x14 0x10>;
};

eth_mac: eth_mac@34 {
reg = <0x34 0x10>;
};

bid: bid@46 {
reg = <0x46 0x30>;
};
};

timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13
Expand Down Expand Up @@ -160,6 +187,12 @@
clocks = <&xtal>;
status = "disabled";
};

watchdog@98d0 {
compatible = "amlogic,meson-gxbb-wdt";
reg = <0x0 0x098d0 0x0 0x10>;
clocks = <&xtal>;
};
};

gic: interrupt-controller@c4301000 {
Expand Down Expand Up @@ -203,6 +236,48 @@
function = "uart_ao";
};
};

remote_input_ao_pins: remote_input_ao {
mux {
groups = "remote_input_ao";
function = "remote_input_ao";
};
};

pwm_ao_a_3_pins: pwm_ao_a_3 {
mux {
groups = "pwm_ao_a_3";
function = "pwm_ao_a_3";
};
};

pwm_ao_a_6_pins: pwm_ao_a_6 {
mux {
groups = "pwm_ao_a_6";
function = "pwm_ao_a_6";
};
};

pwm_ao_a_12_pins: pwm_ao_a_12 {
mux {
groups = "pwm_ao_a_12";
function = "pwm_ao_a_12";
};
};

pwm_ao_b_pins: pwm_ao_b {
mux {
groups = "pwm_ao_b";
function = "pwm_ao_b";
};
};
};

clkc_AO: clock-controller@040 {
compatible = "amlogic,gxbb-aoclkc";
reg = <0x0 0x00040 0x0 0x4>;
#clock-cells = <1>;
#reset-cells = <1>;
};

uart_AO: serial@4c0 {
Expand All @@ -212,6 +287,13 @@
clocks = <&xtal>;
status = "disabled";
};

ir: ir@580 {
compatible = "amlogic,meson-gxbb-ir";
reg = <0x0 0x00580 0x0 0x40>;
interrupts = <GIC_SPI 196 IRQ_TYPE_EDGE_RISING>;
status = "disabled";
};
};

periphs: periphs@c8834000 {
Expand Down Expand Up @@ -306,6 +388,55 @@
function = "eth";
};
};

pwm_a_x_pins: pwm_a_x {
mux {
groups = "pwm_a_x";
function = "pwm_a_x";
};
};

pwm_a_y_pins: pwm_a_y {
mux {
groups = "pwm_a_y";
function = "pwm_a_y";
};
};

pwm_b_pins: pwm_b {
mux {
groups = "pwm_b";
function = "pwm_b";
};
};

pwm_d_pins: pwm_d {
mux {
groups = "pwm_d";
function = "pwm_d";
};
};

pwm_e_pins: pwm_e {
mux {
groups = "pwm_e";
function = "pwm_e";
};
};

pwm_f_x_pins: pwm_f_x {
mux {
groups = "pwm_f_x";
function = "pwm_f_x";
};
};

pwm_f_y_pins: pwm_f_y {
mux {
groups = "pwm_f_y";
function = "pwm_f_y";
};
};
};
};

Expand Down Expand Up @@ -337,7 +468,7 @@
0x0 0xc8834540 0x0 0x4>;
interrupts = <0 8 1>;
interrupt-names = "macirq";
clocks = <&xtal>;
clocks = <&clkc CLKID_ETH>;
clock-names = "stmmaceth";
phy-mode = "rgmii";
status = "disabled";
Expand Down
2 changes: 1 addition & 1 deletion drivers/clk/meson/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

obj-$(CONFIG_COMMON_CLK_AMLOGIC) += clk-pll.o clk-cpu.o clk-mpll.o
obj-$(CONFIG_COMMON_CLK_MESON8B) += meson8b-clkc.o
obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o
obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o
Loading

0 comments on commit e08644b

Please sign in to comment.