dt: bindings: net: ath11k: add qcom,board_id definition
Subsystems (3)
PATCH 1/2 dt: bindings: net: ath11k: add qcom,board_id definition
We need to be able to define what id the board has allowing us to load the correct definition data. This patch adds the description of the required property.
--- .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 5 +++++ 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +5 -0
@@ -142,6 +142,11 @@ properties: * reg * reg-names + qcom,board_id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The board id defining what board definition should be loaded + required: - compatible - reg
Signature · 1 line
2.20.1
PATCH 2/2 ath11k: load appropriate board data based on board id
From: Venkateswara Naralasetty <[email protected]>
This patch add support to read board id from dts and load appropriate board data from userland.
--- drivers/net/wireless/ath/ath11k/qmi.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/qmi.c +8 -2
@@ -1712,9 +1712,11 @@ static int ath11k_qmi_alloc_target_mem_chunk(struct ath11k_base *ab)static int ath11k_qmi_request_target_cap (struct ath11k_base *ab) { +struct device *dev = ab->dev;struct qmi_wlanfw_cap_req_msg_v01 req;struct qmi_wlanfw_cap_resp_msg_v01 resp;struct qmi_txn txn = {}; +unsigned int board_id;int ret =0 ;memset (&req,0 ,sizeof (req));
@@ -1753,10 +1755,14 @@ static int ath11k_qmi_request_target_cap(struct ath11k_base *ab) ab->qmi.target.chip_family = resp.chip_info.chip_family; } -if (resp.board_info_valid) +if (!of_property_read_u32 (dev->of_node,"qcom,board_id" , &board_id)) { +if (board_id !=0xFF ) + ab->qmi.target.board_id = board_id; + }else if (resp.board_info_valid) { ab->qmi.target.board_id = resp.board_info.board_id; -else + }else { ab->qmi.target.board_id =0xFF ; + }if (resp.soc_info_valid) ab->qmi.target.soc_id = resp.soc_info.soc_id;
Signature · 7 lines
2.20.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Re: [PATCH 1/2] dt: bindings: net: ath11k: add qcom, board_id definition
In reply to John CrispinQuoted 14 lines · John Crispin
We need to be able to define what id the board has allowing us to load the correct definition data. This patch adds the description of the required property.
Signed-off-by John Crispin <[email protected]>--- .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +0
-0
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml properties: · line 148
Quoted 7 lines
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +4
-0@@ -142,6 +142,11 @@ properties: * reg * reg-names + qcom,board_id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The board id defining what board definition should be loaded
I think this needs more discussion. This is very tricky to get right, as it needs to be extensible and what not. With ath10k we have learned that a simple integer is not enough.
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 19 lines · Kalle Valo
Quoted 17 lines · John Crispin
We need to be able to define what id the board has allowing us to load the correct definition data. This patch adds the description of the required property.
Signed-off-by John Crispin <[email protected]>--- .../devicetree/bindings/net/wireless/qcom,ath11k.yaml | 5 +++++ 1 file changed, 5 insertions(+)Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +0
-0@@ -142,6 +142,11 @@ properties: * reg * reg-names
Quoted 9 lines
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml properties: · line 148
Quoted 4 lines
Documentation/devicetree/bindings/net/wireless/qcom,ath11k.yaml +4
-0+ qcom,board_id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + The board id defining what board definition should be loadedI think this needs more discussion. This is very tricky to get right, as it needs to be extensible and what not. With ath10k we have learned that a simple integer is not enough.
I was expecting this, there seems to be an option to add ranges and/or enums. I did however fail to find any docs on the schemeas.
John