Commit Graph

604760 Commits

Author SHA1 Message Date
Sakari Ailus
68ef162152 BACKPORT: device property: Introduce fwnode_property_get_reference_args
The new fwnode_property_get_reference_args() interface amends the fwnode
property API with the functionality of both of_parse_phandle_with_args()
and __acpi_node_get_property_reference().

The semantics is slightly different: the cells property is ignored on ACPI
as the number of arguments can be explicitly obtained from the firmware
interface.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
(cherry picked from commit 3e3119d308)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

Brian L: Had to de-constify this commit, and picks are unclean due
to the number of commits skipped for this kernel.
Conflicts:
	drivers/acpi/property.c
	drivers/base/property.c
	include/linux/fwnode.h

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I982255df1aabaadb9de09fc71e6db5c4b99b0e02
Reviewed-on: https://chromium-review.googlesource.com/693682
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
bc255db949 UPSTREAM: ACPI: device property: Fix node lookup in acpi_graph_get_child_prop_value()
acpi_graph_get_child_prop_value() is intended to find a child node with a
certain property value pair. The check

	if (!fwnode_property_read_u32(fwnode, prop_name, &nr))
		continue;

is faulty: fwnode_property_read_u32() returns zero on success, not on
failure, leading to comparing values only if the searched property was not
found.

Moreover, the check is made against the parent device node instead of
the child one as it should be.

Fixes: 79389a83bc (ACPI / property: Add support for remote endpoints)
Reported-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: 4.12+ <stable@vger.kernel.org> # 4.12+
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

(cherry picked from commit b5212f57da)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: Ib52ce57f19672c3c15fab66b3abc94dc6d61eb6b
Reviewed-on: https://chromium-review.googlesource.com/693683
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
78c7bff759 UPSTREAM: device property: Introduce fwnode_call_bool_op() for ops that return bool
fwnode_call_int_op() isn't suitable for calling ops that return bool
since it effectively causes the result returned to the user to be
true when an op hasn't been defined or the fwnode is NULL.

Address this by introducing fwnode_call_bool_op() for calling ops
that return bool.

Fixes: 3708184afc "device property: Move FW type specific functionality to FW specific files"
Fixes: 2294b3af05 "device property: Introduce fwnode_device_is_available()"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit e8158b486d)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I82ea61a7dd11337859eea3b4030df4e3bb9a1501
Reviewed-on: https://chromium-review.googlesource.com/693681
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Kieran Bingham
c36f8b2d07 UPSTREAM: device property: Add fwnode_graph_get_port_parent
Provide a helper to obtain the parent device fwnode without first
parsing the remote-endpoint as per fwnode_graph_get_remote_port_parent.

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 6a71d8d777)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I58c0cfd2759aa62ada3d54cfb77f449ff8a0abc3
Reviewed-on: https://chromium-review.googlesource.com/693680
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
c1aa3cab9b UPSTREAM: device property: Add FW type agnostic fwnode_graph_get_remote_node
Add fwnode_graph_get_remote_node() function which is equivalent to
of_graph_get_remote_node() on OF.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 125ee6b3b0)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: Ic450222819fb987342af9170872b91b0044a181f
Reviewed-on: https://chromium-review.googlesource.com/693679
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
fe88941ff6 UPSTREAM: device property: Introduce fwnode_device_is_available()
Add fwnode_device_is_available() to tell whether the device corresponding
to a certain fwnode_handle is available for use.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 2294b3af05)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

Conflicts:
	include/linux/property.h
(purely contextual; dev_fwnode() was added by I41bf4db9d04eeb91)

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I0cd566e2d1cbadbb2fdfe99592fe8ae1ab5589d5
Reviewed-on: https://chromium-review.googlesource.com/693678
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
339a6f76b0 UPSTREAM: device property: Move fwnode graph ops to firmware specific locations
Move firmware specific implementations of the fwnode graph operations to
firmware specific locations.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 3b27d00e7b)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I4ced7427583a5438cfb5624d882ac8da96d03e70
Reviewed-on: https://chromium-review.googlesource.com/693677
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
2bf7ce381d BACKPORT: device property: Move FW type specific functionality to FW specific files
The device and fwnode property API supports Devicetree, ACPI and pset
properties. The implementation of this functionality for each firmware
type was embedded in the fwnode property core. Move it out to firmware
type specific locations, making it easier to maintain.

Depends-on: ("of: Move OF property and graph API from base.c to property.c")
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 3708184afc)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

Conflicts:
	include/linux/acpi.h
(Drop update to acpi_alloc_fwnode_static() which is neither present nor used
 anywhere in this version.)

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: Ie432874df71c4af26ab0bd011145b6a120b88f8b
Reviewed-on: https://chromium-review.googlesource.com/693676
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
66769f86b5 BACKPORT: of: Move OF property and graph API from base.c to property.c
base.c contains both core OF functions and increasingly other
functionality such as accessing properties and graphs, including
convenience functions. In the near future this would also include OF
specific implementation of the fwnode property and graph APIs.

Create driver/of/property.c to contain procedures for accessing and
interpreting device tree properties. The procedures are moved from
drivers/of/base.c, with no changes other than copying only the includes
required by the moved procedures.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit 1df09bc66f)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

Conflicts:
	drivers/of/base.c
	drivers/of/property.c
To align the new property.c file better with upstream, add
of_property_read_u64_index() and of_graph_get_remote_node() which we didn't
already have in base.c
To avoid ripple effects of a large constification upstream which we don't
have and don't want for now, deconstify the following three functions:
of_property_read_string(); of_property_read_string();
of_property_read_string_helper()

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I1d95f43651f277f42cd2c6d9a6a94916c503a278
Reviewed-on: https://chromium-review.googlesource.com/693675
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
37c23c6fca BACKPORT: device property: Read strings using string array reading functions
Always read strings using of_property_read_string_array() instead of
of_property_read_string(). This allows using a single operation struct
callback for accessing strings.

Same for pset_prop_read_string_array() and pset_prop_read_string().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit e481747794)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

Brian L: conflicted on removing pset_prop_read_string() - favor
upstream and remove this function.
Conflicts:
	drivers/base/property.c

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I011469cb71a549bf8efc0cd2c89664af3d6c9ff1
Reviewed-on: https://chromium-review.googlesource.com/692691
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
5f17e4a730 UPSTREAM: device property: fwnode_property_read_string_array() returns nr of strings
Functionally fwnode_property_read_string_array() should match
of_property_read_string_array() and work as a drop-in substitute for the
latter. of_property_read_string_array() returns the number of strings read
if the target string pointer array is non-NULL. Make
fwnode_property_read_string_array() do the same.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit b0b027cee0)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I4f3c78b8fc99e8bf1590468631551b9cafb0eecf
Reviewed-on: https://chromium-review.googlesource.com/692690
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
12d3eea6d8 BACKPORT: device property: Fix reading pset strings using array access functions
The length field value of non-array string properties is the length of the
string itself. Non-array string properties thus require specific handling.
Fix this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 0f194992c8)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>
Signed-off-by: Marc Herbert <marc.herbert@intel.com>

Conflicts:
	drivers/base/property.c
(Re-align with upstream const declaration of some local variables without
backporting entire and massive constification 0f194992c8)

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I77cdd26b10c2636155d1f43430f36c42d22212a8
Reviewed-on: https://chromium-review.googlesource.com/692689
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Sakari Ailus
16d8f87b20 UPSTREAM: device property: fwnode_property_read_string_array() may return -EILSEQ
fwnode_property_read_string_array() may return -EILSEQ through
of_property_read_string_array(). Document this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 026b821745)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: Ia9ab1d0d397fb8be8b1628e206225d59bc4def18
Reviewed-on: https://chromium-review.googlesource.com/692688
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Robin Murphy
fa97a0ec99 UPSTREAM: of/platform: Initialise dev->fwnode appropriately
Whilst we're some of the way towards a universal firmware property
interface, drivers which deal with both OF and ACPI probing end up
having to do things like this:

    dev->of_node ? &dev->of_node->fwnode : dev->fwnode

This seems unnecessary, when the OF code could instead simply fill in
the device's fwnode when binding the of_node, and let the drivers use
dev->fwnode either way. Let's give it a go and see what falls out.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit f94277af03)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I4f26ee5173a04fac70b013948d19c89d1c4e5da3
Reviewed-on: https://chromium-review.googlesource.com/693674
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Richard Fitzgerald
9c39086352 UPSTREAM: of: Add array read functions with min/max size limits
Add a new set of array reading functions that take a minimum and
maximum size limit and will fail if the property size is not within
the size limits. This makes it more convenient for drivers that
use variable-size DT arrays which must be bounded at both ends -
data must be at least N entries but must not overflow the array
it is being copied into. It is also more efficient than making this
functionality out of existing public functions and avoids duplication.

The existing array functions have been left in the API, since there
are a very large number of clients of those functions and their
existing functionality is still useful. This avoids turning a small
API improvement into a major kernel rework.

The old functions have been turned into mininmal static inlines calling
the new functions. The old functions had no upper limit on the actual
size of the dts entry, to preserve this functionality rather than keeping
two near-identical implementations, if the new function is called with
max=0 there is no limit on the size of the dts entry but only the min
number of elements are read.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit a67e9472da)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

Conflicts:
	include/linux/of.h
(purely contextual conflict)

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: Ic1c6b8668b6e97cf60b04539571a747914f31994
Reviewed-on: https://chromium-review.googlesource.com/692693
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Richard Fitzgerald
3d4d302b01 UPSTREAM: of: Make of_find_property_value_of_size take a length range
In preparation for adding variable-length array reads, change
of_find_property_value_of_size so that it takes an optional
maximum length. If the maximum is passed as 0, the behaviour is
unchanged and it will return a property if it's >= the requested
minimum length. If maximum is non-zero it will only return a
property whose length is min <= l <= max.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Rob Herring <robh@kernel.org>
(cherry picked from commit 79ac5d31df)
Signed-off-by: Brian J Lovin <brian.j.lovin@intel.com>

BUG=b:64133998
TEST=media device topology shows subdevs registered successfully
TEST=no camera regression

Change-Id: I035d37ac1544c0f478f21032abb5579fa504afd9
Reviewed-on: https://chromium-review.googlesource.com/692692
Commit-Ready: Tomasz Figa <tfiga@chromium.org>
Tested-by: Hyungwoo Yang <hyungwoo.yang@intel.com>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-11-27 14:12:20 +08:00
Zorro Liu
6639a96a5d drivers: sensor: modify sensor calibrate function
1.check gsensor value when doing calibration
2.return calibration err number

Change-Id: Iff2839ad75ba9df1f724e8a6a59848d1af5ac952
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
2017-11-27 12:05:18 +08:00
Liang Chen
13042d1c3b Revert "ARM: dts: rk3126-bnd-d708: set VDD_LOG to 0.9V when suspend"
We had better follow develop-3.10 for stability.

This reverts commit 1b16fb9814.

Change-Id: Ic576675d069c02d15906463d062c44ce6e8d5195
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-27 12:03:01 +08:00
Zhaoyifeng
337c58c247 drivers: rk_nand: fix L04A data lost while SPOR
fix L04A 3D MLC NAND FLASH data lost while SPOR issue.

Change-Id: I8237681102b3e40b0372f9b57bd8901378eec7d3
Signed-off-by: Zhaoyifeng <zyf@rock-chips.com>
2017-11-27 12:02:14 +08:00
Shawn Lin
2adaa94572 UPSTREAM: arm64: dts: rockchip: extent IORESOURCE_MEM_64 of PCIe for rk3399
Make full use of 32 regions and increase IORESOURCE_MEM_64
so that we could have more chance to support PCIe switch with
more endpoints attached to our RC.

Change-Id: I1da5ad041bbcc71807eda8f72320c83ba7dbcefc
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from 81f6660649)
2017-11-27 10:21:10 +08:00
Shawn Lin
ccb9ef6d55 UPSTREAM: arm64: dts: rockchip: extent bus-ranges of PCIe for rk3399
In order to support multiple hierarchy of PCIe buses,
or instance, PCIe switch, we need to extent bus-ranges
to as max as possible. We have 32 regions and could support
up to 31 buses except bus 0 for our root bridge.

Change-Id: Iccca42642442a73b1828b17110b11891f1ee5feb
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from d633becc58)
2017-11-27 10:21:03 +08:00
Liang Chen
8fb451af77 ARM: dts: rk312x: adjust leakage-scaling-sel and leakage-voltage-sel
Adjust leakage-scaling-sel and leakage-voltage-sel for the chips with
low leakage(<14mA).

Change-Id: Id73691e0e13d6b37916c594636f43d22762d9ad1
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-24 14:44:35 +08:00
Bian Jin chen
d96a27257d ARM: dts: rk3126c-bnd: default to close verify boot.
Because the performance of rk3126c is less than required, 
the default is closed.

Change-Id: Idf80786d00e01cebfd6d2f68a991880733483862
Signed-off-by: Bian Jin chen <kenjc.bian@rock-chips.com>
2017-11-24 14:09:18 +08:00
Li Dongqiang
613e9f7bd3 arm: rockchip_defconfig: enable gva codec
Change-Id: I4b2ac8e8231940abacc71f0c18a94a26a4fff81d
Signed-off-by: Li Dongqiang <david.li@rock-chips.com>
2017-11-24 12:08:54 +08:00
Li Dongqiang
3655e45471 ASoC: Add gva codec driver
Change-Id: Ifc1e49750e9b203681780b5400f9f1d7acf6afe4
Signed-off-by: Li Dongqiang <david.li@rock-chips.com>
2017-11-24 12:06:10 +08:00
Putin Lee
4071647ece video/rockchip: rga: Fixup dmabuf cannot release
Change-Id: Iacd35c9327a2999fffe2afe3d0ae830a48a032cb
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2017-11-24 11:52:42 +08:00
Putin Lee
9a9d5ed30b video/rockchip: rga: fixup render_mode parameter incorrect
Change-Id: I6a1c64231efb0b17be1fa48d32638bfb0806b3b4
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2017-11-24 11:52:42 +08:00
Putin Lee
46cf9e058b video/rockchip: rga: clean up code.
1.optimize mmu_flag judgement condition
2.remove some useless variables

Change-Id: I0a25cc0a0887dca3390faadd916043eb45f333c6
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2017-11-24 11:52:42 +08:00
Putin Lee
007c8db477 video/rockchip: rga: Fixup yuv output lose uv component when rotation.
Change-Id: I9b0f71bdf2172f0e217b09dfe13fd4f22036883b
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2017-11-24 11:52:42 +08:00
Putin Lee
593f4a7059 video/rockchip: rga: add pm_runtime funtion
Change-Id: I73e6dbb13a366664c4e530f7e35d42feefef765c
Signed-off-by: Putin Lee <putin.li@rock-chips.com>
2017-11-24 11:52:42 +08:00
Jianqun Xu
4961c3cae0 drm/rockchip: gem: init dma_address of sg when cma alloc
Change-Id: Iffe011ee0a0ba5177a9b7f426ebd9dcbdcb5f5d5
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2017-11-24 11:20:36 +08:00
Mark Yao
dffa1132a2 ARM: dts: rockchip: rk3126: reserve cma region for drm
Change-Id: I073d452c683ed2b4535488b19a44cca7e200d714
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:59:42 +08:00
Joseph Chen
70daf10039 ARM: dts: rk3036-kylin: set vdd_arm regulator-on-in-suspend
rk3036 doesn't support vdd_arm power supply off when system suspend.

Change-Id: I46bd8a7c2b672be30d8106b867275e8ba7d77e54
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-24 10:59:11 +08:00
Joseph Chen
46f61f7dba ARM: dts: rk3036: enable rk3036 PSCI
Change-Id: I4c5472587583fb176d88e802d2e7fe20daf9ea48
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2017-11-24 10:59:00 +08:00
lkg
d0d2368bf8 misc: add gpio-detection driver
This driver is used to detect ACC and car reverse signal
on vehicle system

Change-Id: I74bedfe64ddb6a0f8eaf7ae8c7af74763ee8bf75
Signed-off-by: Kaige Li <kevin.li@rock-chips.com>
2017-11-24 10:44:26 +08:00
Mark Yao
2083f88b02 ARM: dts: rockchip: use logo-memory-region for logo buffer
Change-Id: I05068d75f650945f760cbab1aa263bc0ec9bd698
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:33:05 +08:00
Mark Yao
772e39d999 arm64: dts: rockchip: use logo-memory-region for logo buffer
Change-Id: Ibd535a9c15b1ee0ee52cf8596ac63eee68ac26a4
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:32:33 +08:00
Mark Yao
a051460ef3 drm/rockchip: logo: rename logo memory region
Change-Id: Ief80e55753134ed0f443830488d9204ac692f93c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:32:13 +08:00
Mark Yao
f741ee5cab drm/rockchip: support using reserved memory region for cma
Change-Id: I829162c21748052525b0583185db67015f24141d
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:30:57 +08:00
Mark Yao
fda0f9d3f6 drm/rockchip: gem: correct dma handle on buffer free
If drm enable iommu support, rk_obj->dma_addr is iommu
mapping address, using dma_addr as dma_free_attrs's handle
is wrong, cause memory leak.

Change-Id: Iee239122602e61e9f54bdf7a90d47904d74f1c38
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
2017-11-24 10:30:34 +08:00
Xinhuang Li
00f0ddd6a2 input: rc: compatible with different numbers of clks definitions
rk3328 has two clk for pwm module

Change-Id: I85e7f08ef2f850a53dd16403f96ee4b0a0596c61
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-24 10:29:26 +08:00
Liang Chen
1b16fb9814 ARM: dts: rk3126-bnd-d708: set VDD_LOG to 0.9V when suspend
Change-Id: Iaf12c5fa9c5c1cdacb482dd0e9fd3d5913991df1
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-24 10:27:28 +08:00
Liang Chen
d79c36b2fd clk: rockchip: rk3128: fix incorrect configuration
1. The first parent name of sclk_cif_out_src is wrong, it is
"sclk_cif_src".
2. The MUX configuration for sclk_cif_out_src is wrong, it should
be muxdiv_offset=29, mux_shift=2, mux_width=1.

Change-Id: I36a0ec0791afdef398d37ac8b92b7831619fb01b
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-24 10:27:07 +08:00
Liang Chen
dfc5ba5499 ARM: dts: rk3126-bnd-d708: power off VDD_ARM when suspend
Change-Id: I533071166932e0b5cf6a248ca566cfaaef0e6e49
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-24 10:26:52 +08:00
shengfei Xu
50f088463d mfd: rk808: fix the rtc resource for rk816
Change-Id: Ia237fbd0bb63b1e8ccad3b95240251d8d4ded533
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
2017-11-24 10:21:42 +08:00
Xinhuang Li
1934ca1c8e arm64: dts: rk3328-evb-android: add new dts for rk3328 evb android
this dts is copy from rk3328-evb.dts and add pwm3/firmware nodes

Change-Id: Id08e5b2e2d11c34dc81d3a335d5e1a7de21e13cb
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
2017-11-24 10:18:14 +08:00
Sandy Huang
cf9715ed8a drm/rockchip: vop: fix csc for rk3288
There is some hardware bug for VOP win CSC, so we ignore this function
and use the default CSC matrix.

Change-Id: I5a498bbba98563ccb5f37ebffa50b274e8422c73
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2017-11-23 18:31:16 +08:00
Caesar Wang
81a9ae5019 ARM: dts: rockchip: support the sdmmc for kylin
Change-Id: If761bb4a1adf857f7315edebb17c31eb6ac08652
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2017-11-23 18:30:43 +08:00
Liang Chen
e351a0f0b3 ARM: dts: rockchip: do not access qos-ebc for rk3126b/c
rk3128 have ebc, but rk3126b/c have no ebc, so we need
manage compatibility for them.

Change-Id: I683f292b40603fe31a5eb4cee4e78a2d5d152626
Signed-off-by: Liang Chen <cl@rock-chips.com>
2017-11-23 16:42:15 +08:00
Alex Zhao
bdea008e08 ARM: dts: rockchip: rk3126-bnd-d708: add rtl8703bs bt support
Change-Id: I5973eef8b17094527e8b54fbe5d9aff8e113ef4e
Signed-off-by: Alex Zhao <zzc@rock-chips.com>
2017-11-23 16:27:13 +08:00