Devicetree fixes for v6.14:
- Add bindings for QCom QCS8300 clocks, QCom SAR2130P qfprom, powertip,{st7272|hx8238a} displays, - Fix compatible for TI am62a7 dss - Add a kunit test for __of_address_resource_bounds() -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmexKjAACgkQ+vtdtY28 YcN5eg/8CZTaMCYJYSbFs1krSZAirHg7xGdNajL9G2H3NpBjwrMjgN3fHiEn79KR 58HDBbxNdNHw28uiNzB2/SNoddciMWKaPR+OpqQHPzlAxtAwYFg0LLAC2+FQbm8l mxLz+H/8pAsp3T+I20AIVBOOcyQbUjC8t4JxB/9P3oVCVWsbrXjoYsi20ZyEYCAu MWtqVPlOqCTnZNEK9UE8L9oMWUfawZYGaXwPhHX8Et51/KCDPh+EmPgOjZ2aJesh Iu1rTMXnVcfx4sQNdjG0b2wUJC7KsON9EMgzEduC0fgHWCNhsZPqnASo871rXt3u PIHkIa8r9lryEzNktja9kqkz2UpKmFoDcoWW81zoDtTtWIVFBUJhsW8FaTmFmsZA RVxZ89EqC/664vpSafvioX6YVvJsVXmCo4sNPTRwbAH5iOxmqhfNqOnj6WeMCuNB 2AgpgUT84fJdx+mfcYzhyADCBcWCIAmElNf68Il4AIbIbF2qnm9AIIzBnoIUX+aV X7ocqquULcIpGWA8X+GTc5UcGll9fyqliQmrFo2xejizJ8MBMSjJ0/Cld2n5Z8Gv 4a1+GoOLwWbO4HmWZTa10eyvEg37d06vt0Fv3DUVKzAP4A9ZCZxF6NhAnrqRRiCA 8RydI5MXzGRLFK4HcTet4n30dhq9nHvQbtI5SdUddAVQ1m3uXe0= =gmty -----END PGP SIGNATURE----- Merge tag 'devicetree-fixes-for-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Add bindings for QCom QCS8300 clocks, QCom SAR2130P qfprom, and powertip,{st7272|hx8238a} displays - Fix compatible for TI am62a7 dss - Add a kunit test for __of_address_resource_bounds() * tag 'devicetree-fixes-for-6.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: display: Add powertip,{st7272|hx8238a} as DT Schema description dt-bindings: nvmem: qcom,qfprom: Add SAR2130P compatible dt-bindings: display: ti: Fix compatible for am62a7 dss of: address: Add kunit test for __of_address_resource_bounds() dt-bindings: clock: qcom: Add QCS8300 video clock controller dt-bindings: clock: qcom: Add CAMCC clocks for QCS8300 dt-bindings: clock: qcom: Add GPU clocks for QCS8300
This commit is contained in:
commit
ad1b832bf1
12 changed files with 228 additions and 4 deletions
|
@ -8,6 +8,7 @@ title: Qualcomm Graphics Clock & Reset Controller
|
|||
|
||||
maintainers:
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
- Imran Shaik <quic_imrashai@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm graphics clock control module provides the clocks, resets and power
|
||||
|
@ -23,10 +24,12 @@ description: |
|
|||
include/dt-bindings/clock/qcom,gpucc-sm8150.h
|
||||
include/dt-bindings/clock/qcom,gpucc-sm8250.h
|
||||
include/dt-bindings/clock/qcom,gpucc-sm8350.h
|
||||
include/dt-bindings/clock/qcom,qcs8300-gpucc.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,qcs8300-gpucc
|
||||
- qcom,sdm845-gpucc
|
||||
- qcom,sa8775p-gpucc
|
||||
- qcom,sc7180-gpucc
|
||||
|
|
|
@ -8,16 +8,20 @@ title: Qualcomm Camera Clock & Reset Controller on SA8775P
|
|||
|
||||
maintainers:
|
||||
- Taniya Das <quic_tdas@quicinc.com>
|
||||
- Imran Shaik <quic_imrashai@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm camera clock control module provides the clocks, resets and power
|
||||
domains on SA8775p.
|
||||
|
||||
See also: include/dt-bindings/clock/qcom,sa8775p-camcc.h
|
||||
See also:
|
||||
include/dt-bindings/clock/qcom,qcs8300-camcc.h
|
||||
include/dt-bindings/clock/qcom,sa8775p-camcc.h
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,qcs8300-camcc
|
||||
- qcom,sa8775p-camcc
|
||||
|
||||
clocks:
|
||||
|
|
|
@ -18,6 +18,7 @@ description: |
|
|||
properties:
|
||||
compatible:
|
||||
enum:
|
||||
- qcom,qcs8300-videocc
|
||||
- qcom,sa8775p-videocc
|
||||
|
||||
clocks:
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/panel/powertip,hx8238a.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Powertip Electronic Technology Co. 320 x 240 LCD panel
|
||||
|
||||
maintainers:
|
||||
- Lukasz Majewski <lukma@denx.de>
|
||||
|
||||
allOf:
|
||||
- $ref: panel-dpi.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: powertip,hx8238a
|
||||
- {} # panel-dpi, but not listed here to avoid false select
|
||||
|
||||
height-mm: true
|
||||
panel-timing: true
|
||||
port: true
|
||||
power-supply: true
|
||||
width-mm: true
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
...
|
|
@ -0,0 +1,29 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||
%YAML 1.2
|
||||
---
|
||||
$id: http://devicetree.org/schemas/display/panel/powertip,st7272.yaml#
|
||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
|
||||
title: Powertip Electronic Technology Co. 320 x 240 LCD panel
|
||||
|
||||
maintainers:
|
||||
- Lukasz Majewski <lukma@denx.de>
|
||||
|
||||
allOf:
|
||||
- $ref: panel-dpi.yaml#
|
||||
|
||||
properties:
|
||||
compatible:
|
||||
items:
|
||||
- const: powertip,st7272
|
||||
- {} # panel-dpi, but not listed here to avoid false select
|
||||
|
||||
height-mm: true
|
||||
panel-timing: true
|
||||
port: true
|
||||
power-supply: true
|
||||
width-mm: true
|
||||
|
||||
additionalProperties: false
|
||||
|
||||
...
|
|
@ -23,7 +23,7 @@ properties:
|
|||
compatible:
|
||||
enum:
|
||||
- ti,am625-dss
|
||||
- ti,am62a7,dss
|
||||
- ti,am62a7-dss
|
||||
- ti,am65x-dss
|
||||
|
||||
reg:
|
||||
|
|
|
@ -36,6 +36,7 @@ properties:
|
|||
- qcom,qcs404-qfprom
|
||||
- qcom,qcs615-qfprom
|
||||
- qcom,qcs8300-qfprom
|
||||
- qcom,sar2130p-qfprom
|
||||
- qcom,sc7180-qfprom
|
||||
- qcom,sc7280-qfprom
|
||||
- qcom,sc8280xp-qfprom
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/dma-direct.h> /* for bus_dma_region */
|
||||
|
||||
#include <kunit/visibility.h>
|
||||
|
||||
/* Uncomment me to enable of_dump_addr() debugging output */
|
||||
// #define DEBUG
|
||||
|
||||
|
@ -183,7 +185,7 @@ static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns,
|
|||
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
static int __of_address_resource_bounds(struct resource *r, u64 start, u64 size)
|
||||
VISIBLE_IF_KUNIT int __of_address_resource_bounds(struct resource *r, u64 start, u64 size)
|
||||
{
|
||||
if (overflows_type(start, r->start))
|
||||
return -EOVERFLOW;
|
||||
|
@ -197,6 +199,7 @@ static int __of_address_resource_bounds(struct resource *r, u64 start, u64 size)
|
|||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_IF_KUNIT(__of_address_resource_bounds);
|
||||
|
||||
/*
|
||||
* of_pci_range_to_resource - Create a resource from an of_pci_range
|
||||
|
|
|
@ -208,4 +208,8 @@ static void __maybe_unused of_dump_addr(const char *s, const __be32 *addr, int n
|
|||
static void __maybe_unused of_dump_addr(const char *s, const __be32 *addr, int na) { }
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_KUNIT)
|
||||
int __of_address_resource_bounds(struct resource *r, u64 start, u64 size);
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_OF_PRIVATE_H */
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
/*
|
||||
* KUnit tests for OF APIs
|
||||
*/
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
|
@ -54,8 +55,124 @@ static struct kunit_suite of_dtb_suite = {
|
|||
.init = of_dtb_test_init,
|
||||
};
|
||||
|
||||
struct of_address_resource_bounds_case {
|
||||
u64 start;
|
||||
u64 size;
|
||||
int ret;
|
||||
|
||||
u64 res_start;
|
||||
u64 res_end;
|
||||
};
|
||||
|
||||
static void of_address_resource_bounds_case_desc(const struct of_address_resource_bounds_case *p,
|
||||
char *name)
|
||||
{
|
||||
snprintf(name, KUNIT_PARAM_DESC_SIZE, "start=0x%016llx,size=0x%016llx", p->start, p->size);
|
||||
}
|
||||
|
||||
static const struct of_address_resource_bounds_case of_address_resource_bounds_cases[] = {
|
||||
{
|
||||
.start = 0,
|
||||
.size = 0,
|
||||
.ret = 0,
|
||||
.res_start = 0,
|
||||
.res_end = -1,
|
||||
},
|
||||
{
|
||||
.start = 0,
|
||||
.size = 0x1000,
|
||||
.ret = 0,
|
||||
.res_start = 0,
|
||||
.res_end = 0xfff,
|
||||
},
|
||||
{
|
||||
.start = 0x1000,
|
||||
.size = 0,
|
||||
.ret = 0,
|
||||
.res_start = 0x1000,
|
||||
.res_end = 0xfff,
|
||||
},
|
||||
{
|
||||
.start = 0x1000,
|
||||
.size = 0x1000,
|
||||
.ret = 0,
|
||||
.res_start = 0x1000,
|
||||
.res_end = 0x1fff,
|
||||
},
|
||||
{
|
||||
.start = 1,
|
||||
.size = RESOURCE_SIZE_MAX,
|
||||
.ret = 0,
|
||||
.res_start = 1,
|
||||
.res_end = RESOURCE_SIZE_MAX,
|
||||
},
|
||||
{
|
||||
.start = RESOURCE_SIZE_MAX,
|
||||
.size = 1,
|
||||
.ret = 0,
|
||||
.res_start = RESOURCE_SIZE_MAX,
|
||||
.res_end = RESOURCE_SIZE_MAX,
|
||||
},
|
||||
{
|
||||
.start = 2,
|
||||
.size = RESOURCE_SIZE_MAX,
|
||||
.ret = -EOVERFLOW,
|
||||
},
|
||||
{
|
||||
.start = RESOURCE_SIZE_MAX,
|
||||
.size = 2,
|
||||
.ret = -EOVERFLOW,
|
||||
},
|
||||
{
|
||||
.start = ULL(0x100000000),
|
||||
.size = 1,
|
||||
.ret = sizeof(resource_size_t) > sizeof(u32) ? 0 : -EOVERFLOW,
|
||||
.res_start = ULL(0x100000000),
|
||||
.res_end = ULL(0x100000000),
|
||||
},
|
||||
{
|
||||
.start = 0x1000,
|
||||
.size = 0xffffffff,
|
||||
.ret = sizeof(resource_size_t) > sizeof(u32) ? 0 : -EOVERFLOW,
|
||||
.res_start = 0x1000,
|
||||
.res_end = ULL(0x100000ffe),
|
||||
},
|
||||
};
|
||||
|
||||
KUNIT_ARRAY_PARAM(of_address_resource_bounds,
|
||||
of_address_resource_bounds_cases, of_address_resource_bounds_case_desc);
|
||||
|
||||
static void of_address_resource_bounds(struct kunit *test)
|
||||
{
|
||||
const struct of_address_resource_bounds_case *param = test->param_value;
|
||||
struct resource r; /* Intentionally uninitialized */
|
||||
int ret;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_OF_ADDRESS))
|
||||
kunit_skip(test, "CONFIG_OF_ADDRESS not enabled\n");
|
||||
|
||||
ret = __of_address_resource_bounds(&r, param->start, param->size);
|
||||
KUNIT_EXPECT_EQ(test, param->ret, ret);
|
||||
if (ret == 0) {
|
||||
KUNIT_EXPECT_EQ(test, (resource_size_t)param->res_start, r.start);
|
||||
KUNIT_EXPECT_EQ(test, (resource_size_t)param->res_end, r.end);
|
||||
KUNIT_EXPECT_EQ(test, param->size, resource_size(&r));
|
||||
}
|
||||
}
|
||||
|
||||
static struct kunit_case of_address_test_cases[] = {
|
||||
KUNIT_CASE_PARAM(of_address_resource_bounds, of_address_resource_bounds_gen_params),
|
||||
{}
|
||||
};
|
||||
|
||||
static struct kunit_suite of_address_suite = {
|
||||
.name = "of_address",
|
||||
.test_cases = of_address_test_cases,
|
||||
};
|
||||
|
||||
kunit_test_suites(
|
||||
&of_dtb_suite,
|
||||
&of_dtb_suite, &of_address_suite,
|
||||
);
|
||||
MODULE_DESCRIPTION("KUnit tests for OF APIs");
|
||||
MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING");
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
16
include/dt-bindings/clock/qcom,qcs8300-camcc.h
Normal file
16
include/dt-bindings/clock/qcom,qcs8300-camcc.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_QCS8300_CAM_CC_H
|
||||
#define _DT_BINDINGS_CLK_QCOM_QCS8300_CAM_CC_H
|
||||
|
||||
#include "qcom,sa8775p-camcc.h"
|
||||
|
||||
/* QCS8300 introduces below new clocks compared to SA8775P */
|
||||
|
||||
/* CAM_CC clocks */
|
||||
#define CAM_CC_TITAN_TOP_ACCU_SHIFT_CLK 86
|
||||
|
||||
#endif
|
17
include/dt-bindings/clock/qcom,qcs8300-gpucc.h
Normal file
17
include/dt-bindings/clock/qcom,qcs8300-gpucc.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
|
||||
/*
|
||||
* Copyright (c) 2024, Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLK_QCOM_GPUCC_QCS8300_H
|
||||
#define _DT_BINDINGS_CLK_QCOM_GPUCC_QCS8300_H
|
||||
|
||||
#include "qcom,sa8775p-gpucc.h"
|
||||
|
||||
/* QCS8300 introduces below new clocks compared to SA8775P */
|
||||
|
||||
/* GPU_CC clocks */
|
||||
#define GPU_CC_CX_ACCU_SHIFT_CLK 23
|
||||
#define GPU_CC_GX_ACCU_SHIFT_CLK 24
|
||||
|
||||
#endif
|
Loading…
Add table
Reference in a new issue